oMBRa Posted June 6, 2009 Posted June 6, 2009 dallasgfx said: ok this is the full code in the attechementits better if you post the code here wrapped with "[code ] [/code ]" tags (without the space before the square bracket)
dallasgfx Posted June 6, 2009 Author Posted June 6, 2009 oMBRa said: its better if you post the code here wrapped with "[code ] [/code ]" tags (without the space before the square bracket) i would but with the code source there is the dll ( md5.dll )
oMBRa Posted June 6, 2009 Posted June 6, 2009 dallasgfx said: i would but with the code source there is the dll ( md5.dll )ok, sorry, my fault I didnt read other posts before posting
dallasgfx Posted June 6, 2009 Author Posted June 6, 2009 it"s ok , read and if you have the answer , write it thanks
Bowmore Posted June 6, 2009 Posted June 6, 2009 dallasgfx said: it"s ok , read and if you have the answer , write it thanks The code you posted had syntax errors so it has never run as it is.. You should rename md5.dll to something else giving a txt file a dll extension can only lead to trouble and confusion. Try this. $File="" $Count=0 Dim $aMD5HashValues[1] _FileReadToArray("C:\some pathe\md5.dll",$aMD5HashValues) ;<<<<<< Change this to correct path If @error Then MsgBox(16,"Load MD5.dll", "Unable to load md5.dll" & @CR & "Error: " & @error) Exit EndIf While $File <> -1 ; get the file to be checked $File = ScanFolder("D:\karim\dallas") ToolTip($File,0,200) $md5cod = _MD5Init() ; calculate md5 hash value _MD5Input($md5cod, FileRead ($File)) $result = _MD5Result($md5cod) ; compare result to each of the values stored in md5.dll For $iMD5 = 1 To $aMD5HashValues[0] If $result = $aMD5HashValues[$iMD5] Then MsgBox(16,"find",$File ,$File) EndIf Next $Count += 1 If $Count >= 3000 Then $File = ScanFolder("-ABORT-") EndIf WEnd "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook
dallasgfx Posted June 6, 2009 Author Posted June 6, 2009 Bowmore said: The code you posted had syntax errors so it has never run as it is.. You should rename md5.dll to something else giving a txt file a dll extension can only lead to trouble and confusion. Try this. $File="" $Count=0 Dim $aMD5HashValues[1] _FileReadToArray("C:\some pathe\md5.dll",$aMD5HashValues) ;<<<<<< Change this to correct path If @error Then MsgBox(16,"Load MD5.dll", "Unable to load md5.dll" & @CR & "Error: " & @error) Exit EndIf While $File <> -1 ; get the file to be checked $File = ScanFolder("D:\karim\dallas") ToolTip($File,0,200) $md5cod = _MD5Init() ; calculate md5 hash value _MD5Input($md5cod, FileRead ($File)) $result = _MD5Result($md5cod) ; compare result to each of the values stored in md5.dll For $iMD5 = 1 To $aMD5HashValues[0] If $result = $aMD5HashValues[$iMD5] Then MsgBox(16,"find",$File ,$File) EndIf Next $Count += 1 If $Count >= 3000 Then $File = ScanFolder("-ABORT-") EndIf WEnd thanks a lot my frien your way is worked
dallasgfx Posted June 6, 2009 Author Posted June 6, 2009 the code work , but he serach only for 4 codes of the files
Bowmore Posted June 6, 2009 Posted June 6, 2009 dallasgfx said: the code work , but he serach only for 4 codes of the filesThe reason is that there are only 4 codes in the version of md5.dll that you posted. "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook
dallasgfx Posted June 6, 2009 Author Posted June 6, 2009 Bowmore said: The reason is that there are only 4 codes in the version of md5.dll that you posted. yes , thals allot for your help
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now