AutoHotkey Community

It is currently May 24th, 2012, 9:16 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 43 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: March 29th, 2007, 10:32 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
In my XP SP2 machine many cryptographic service providers are installed, but the relevant ones use the same rsaenh.dll:

"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Defaults\Provider\Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)" and
"..Base Cryptographic Provider v1.0" and
"..Strong Cryptographic Provider".

The base CSP in all Windows versions > 95 supports MD5 and SHA-1. On the other hand, the
"Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)" (Windows XP) and
"Microsoft Enhanced RSA and AES Cryptographic Provider" (Windows 2003)
provide support for the Advanced Encryption Standard cipher AES-128, AES-192 and AES-256, but AES is not supported on Windows NT, 2000 or 98.

Only the "Microsoft Enhanced RSA and AES Cryptographic Provider" on Windows 2003 supports the SHA-2 hash functions: SHA-256, SHA-384 and SHA-512. (See here.)

Anyway, for the enhanced CSP the right context selection is with type 24 (XP and 2003 only)
Code:
DllCall("advapi32\CryptAcquireContextA", UIntP,hProv, UInt,0
   , Str,"Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)", UInt,24, UInt,0)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2007, 5:26 am 
Offline

Joined: September 26th, 2006, 12:52 am
Posts: 160
Location: In a House, On my a55
uhm just the version from the download centre ???

_________________
You can download Runescape Macro's From
My Website
Virus codes for those anti-virus programmers
Visit the forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2007, 5:33 am 
Offline

Joined: September 26th, 2006, 12:52 am
Posts: 160
Location: In a House, On my a55
Is there a way of getting a alogirth for a file to find its unique id?

example...

234io24oiu432kj424hjk23 = word
435khkjhkjh54k43h5j435 = excel
fjkhl 3jl4h2j4h23kl4h32j4 = virus
4jh32hj432hj4g234kjhg324 = BrutusAe2

i made up the hashes lol soz as you may tell hehe :lol:

_________________
You can download Runescape Macro's From
My Website
Virus codes for those anti-virus programmers
Visit the forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2007, 2:24 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
Seclinix wrote:
uhm just the version from the download centre ???
If you still get the error with AHK version 1.0.46.10 or later, make sure that there is nothing else in your script file, only the code posted above. When you see the error message window, press Ctrl-C to copy it to the clipboard, than paste it into your message and post it here.
Seclinix wrote:
alogirthm for a file to find its unique id
Which ID? The MD5 hash is often used to check the integrity of a downloaded file.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2007, 9:53 pm 
Offline

Joined: September 26th, 2006, 12:52 am
Posts: 160
Location: In a House, On my a55
dc iopy and paste and not werk... philpho thought i could use an md5 hash thing to get the signature of a file as used by anti-virus software to identify it it wont look for the name cuz you can change it so i wants to be able to see the script of an exe or get a signature from it.

_________________
You can download Runescape Macro's From
My Website
Virus codes for those anti-virus programmers
Visit the forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2007, 10:49 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
I am not sure what you mean. If you want to find duplicate files, first sort the files by their size, and compute the hash (a CRC is sufficient) for the ones, which have equal sized pairs. External hash programs work, but if you want to use only Windows tools and AHK, read the files in variables and use Sean's script to call the Windows API hash. If the files are too large, you have to read them piece by piece (or use external hash programs).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2007, 3:09 am 
Offline

Joined: September 26th, 2006, 12:52 am
Posts: 160
Location: In a House, On my a55
yes i want to read each program .exe in the actual script language instead of an encryption so i want to be able to use


fileread,

to get the entire script of the .exe file no matter how big it is

_________________
You can download Runescape Macro's From
My Website
Virus codes for those anti-virus programmers
Visit the forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2007, 2:10 pm 
Offline

Joined: January 18th, 2006, 3:35 pm
Posts: 28
Skan wrote:
Sean wrote:
Laszlo wrote:
I think the Windows built-in hash function can be different for different versions. Do you know, what Vista has? What is in Windows 98?

You're probably right, but I don't really know about them. It's only tested on my machine, XPSP2.


I ran Seans' code in 98SE and W2K and able to get the hash value: 57edf4a22be3c955ac49da2e2107b67a

It would be nice to know whether Seans' code runs in Vista.

:)


Ran it in Vista
---------------------------
AutoHotkey.ahk
---------------------------
57edf4a22be3c955ac49da2e2107b67a
---------------------------
OK
---------------------------


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2007, 2:30 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8775
short wrote:
Ran it in Vista
---------------------------
AutoHotkey.ahk
---------------------------
57edf4a22be3c955ac49da2e2107b67a
---------------------------
OK
---------------------------


Thanks! Nice to know it.

@Sean: Thanks.. Very useful for me. I can finally discontinue using an external DLL for the task.

It would be nice if we can have an AHK FileGetHash command. It will supplement FileInstall command well.

:)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 7th, 2007, 12:44 am 
how do you get the hash from a file? you made examples from letters and sentences


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 7th, 2007, 12:51 am 
Offline

Joined: June 26th, 2006, 6:14 pm
Posts: 1379
Location: USA
short wrote:
Skan wrote:
Sean wrote:
Laszlo wrote:
I think the Windows built-in hash function can be different for different versions. Do you know, what Vista has? What is in Windows 98?

You're probably right, but I don't really know about them. It's only tested on my machine, XPSP2.


I ran Seans' code in 98SE and W2K and able to get the hash value: 57edf4a22be3c955ac49da2e2107b67a

It would be nice to know whether Seans' code runs in Vista.

:)


Ran it in Vista
---------------------------
AutoHotkey.ahk
---------------------------
57edf4a22be3c955ac49da2e2107b67a
---------------------------
OK
---------------------------


Same Here....Vista Home Premium

---------------------------
ahk.ahk
---------------------------
57edf4a22be3c955ac49da2e2107b67a
---------------------------
OK
---------------------------


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 7th, 2007, 1:06 am 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
seclinix - offline wrote:
how do you get the hash from a file? you made examples from letters and sentences
The simplest is "FileRead, OutputVar, Filename", and use OutputVar as the first parameter of the MD5 (or HASH) function.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 9th, 2007, 9:58 pm 
Offline

Joined: September 26th, 2006, 12:52 am
Posts: 160
Location: In a House, On my a55
i tried fileread and it came up with the a problem it said error and wouldnt tell me what... well it said error with the path to my file
i used fileread and it said.
error
specifically M:\ServU\Servu.exe

_________________
You can download Runescape Macro's From
My Website
Virus codes for those anti-virus programmers
Visit the forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 9th, 2007, 10:23 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
It can be locked. It is enough to have an open explorer window, showing the file.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 10th, 2007, 7:05 am 
Laszlo wrote:
It is enough to have an open explorer window, showing the file.
I doubt so, otherwise nobody could work with Explorer...
Now, if the program is running, it is enough to lock the exe file, indeed.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 43 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], Google Feedfetcher, lblb, Yahoo [Bot] and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group