Jump to content

Getting a signature of a file


Recommended Posts

As you know am creating a cloud anti virus(or my friend, I already sold it to him but he wants me to complete it), I need a signature engine to get a signature for a file.

Can anyone find an easy and fast way? I don't need it to scan the whole file.

Thanks

Link to comment
Share on other sites

As you know am creating a cloud anti virus(or my friend, I already sold it to him but he wants me to complete it), I need a signature engine to get a signature for a file.

Can anyone find an easy and fast way? I don't need it to scan the whole file.

Thanks

you mean like Checksum? FSHash or MD5Hash or SHAHash ?

http://www.autoitscript.com/forum/index.ph...=21010&st=0

Make sure you have MD5Hash.dll in your scriptdir before running this sample. It will Check Sum all files in the D:\test folder

#compiler_plugin_funcs = MD5Hash

Dim $FileMD5
$MD5Plugin  = PluginOpen(@ScriptDir & "\MD5Hash.dll")   
$begin      = TimerInit()
;~ ------------------------------------------------------
    $path   = 'D:\test\'
    $search = FileFindFirstFile($path & "*.*")  

    ; Check if the search was successful
    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

        
        $FileMD5    = MD5Hash($path & $file,1,True)

        $dif = TimerDiff($begin)        
        ConsoleWrite($file & ' ' & $FileMD5 & ' ' & $dif/1000 & @CRLF)  

    WEnd

;~ ------------------------------------------------------

FileClose($search)
PluginClose($MD5Plugin)
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...