GHOSTSKIKDA Posted May 14, 2009 Share Posted May 14, 2009 Hi, This code for scan all files with MD5: expandcollapse popup#AutoIt3Wrapper_plugin_funcs = MD5Hash global $n,$file,$a,$s,$m=1000 ;$var = FileSelectFolder("Choose a folder.", "") ;$search = FileFindFirstFile($var &"\*.*") $search = FileFindFirstFile("*.*") If $search = -1 Then MsgBox(0, "Error", "No files/directories matched the search pattern") Exit EndIf While 1 $file = FileFindNextFile($search) If @error Then ExitLoop $plH = PluginOpen("MD5Hash.dll") $a=MD5Hash($file, 1, True) for $n=0 to $m step 1 $s=$n+1 $b=FileReadLine("FileMD5.ini",$s) if $b=$a Then MsgBox(16,"Virus",$file) EndIf If @error = -1 Then ExitLoop Next MsgBox(0, "Virus",$a) ;$n=0 ;While 1 ;$n=$n+1 ; $b=FileReadLine("..\FileMD5.ini",$n) ;if $b=$a Then ;MsgBox(16,"Virus","Attention",$file) ;EndIf ; If @error = -1 Then ExitLoop ;MsgBox(0, "Test MD5Hash.DLL",$a) ;$n=$n+0 ;Wend PluginClose($plH) WEnd FileClose($search)ScanMD5.zip [center]I LOVE ALGERIA .... ;-)[/center] Link to comment Share on other sites More sharing options...
rajeshontheweb Posted May 14, 2009 Share Posted May 14, 2009 i had similar code, but main difference is that i used both dll and pure autoit md5.au3 udf to calculate md5 so that dll doesnt need to be present on host system :-) it becomes a standalone executable which will detect all files with a given md5 (specially useful when searching for virus variants ) also, my script used to search recursively on all folders under the given path. when i get the gui built properly (if ever that happens!) i will post it. Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
GHOSTSKIKDA Posted May 14, 2009 Author Share Posted May 14, 2009 (specially useful when searching for virus variants )Yes , as part of the programmed anti-virus I will do it soon Anti-virus and then I developed a simple [center]I LOVE ALGERIA .... ;-)[/center] Link to comment Share on other sites More sharing options...
Rorka Posted May 14, 2009 Share Posted May 14, 2009 When i run this I get 4 message box's saying Virus... then the MD5 Link to comment Share on other sites More sharing options...
GHOSTSKIKDA Posted June 15, 2009 Author Share Posted June 15, 2009 When i run this I get 4 message box's saying Virus... then the MD5The trial version only [center]I LOVE ALGERIA .... ;-)[/center] Link to comment Share on other sites More sharing options...
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