Sign in to follow this  
Followers 0
GHOSTSKIKDA

ScanMD5

5 posts in this topic

Hi, This code for scan all files with MD5:

#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]

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

(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]

Share this post


Link to post
Share on other sites

When i run this I get 4 message box's saying Virus... then the MD5

Share this post


Link to post
Share on other sites

When i run this I get 4 message box's saying Virus... then the MD5

The trial version only :D


[center]I LOVE ALGERIA .... ;-)[/center]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0