Jump to content
Sign in to follow this  
jerem488

Get signature of files

Recommended Posts

jerem488

Hi all !

I want to get the signature of my exe files.

like this :

Posted Image

I try with filegetversion(MYFILE, "CompiledScript"), filegetversion(MYFILE, "ProductVersion") and filegetversion(MYFILE, "SpecialBuild")

within success

Thansk in advance


Qui ose gagneWho Dares Win[left]CyberExploit[/left]

Share this post


Link to post
Share on other sites
Casey

Sorry, I am lost as to what you are really asking. Is this of any help?

#RequireAdmin
#include <GUIConstantsEx.au3>
#Include <File.au3>
#include <WindowsConstants.au3>

Global $FileVersion_1, $FileVersion_1a

If Not FileExists( @ScriptDir & "\info.log") Then
    _FileCreate( @ScriptDir & "\info.log")
EndIf
$InstallLog = @ScriptDir & "\info.log"

GUICreate("Get Info For Scripting", 300, 150) ; will create a dialog box that when displayed is centered
$GetFileVer = GUICtrlCreateButton("Get File Version Info", 19, 33, 270, 25)
$ViewFileVer=GUICtrlCreateButton("View Results", 19, 90, 270, 25)
GUISetState(@SW_SHOW) ; will display an empty dialog box

    ; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $GetFileVer
            $FileVersion_1a = ""
            _GetFile()
            _FileWriteLog($InstallLog, @CRLF & @CRLF & "The queried computers operating system VERSION was:    " & @OSVersion & @CRLF)
            _FileWriteLog($InstallLog, @CRLF & @CRLF & "The queried computers operating system BUILD was:    " & @OSBuild & @CRLF)
            _FileWriteLog($InstallLog, @CRLF & @CRLF & "The queried computers operating system SERVICEPACK was:    " & @OSServicePack & @CRLF)
            _FileWriteLog($InstallLog, @CRLF & @CRLF & "The queried computers operating system ARCHITECTUE was:    " & @OSArch & @CRLF)
            _FileWriteLog($InstallLog, @CRLF & @CRLF & "The queried computers operating system TYPE was:    " & @OSTYPE & @CRLF & "____________________________________________________________________")
            $FileVersion_1b = FileGetVersion($FileVersion_1a, "Comments")
            _FileWriteLog($InstallLog, @CRLF & @CRLF & "File version information for " & $FileVersion_1a & @CRLF & @CRLF & "                      Comments:" & @CRLF & "____________________________________________________________________")
            $FileVersion_1c = FileGetVersion($FileVersion_1a, "InternalName")
            _FileWriteLog($InstallLog, "InternalName,:   " & $FileVersion_1c & @CRLF & "____________________________________________________________________")
            $FileVersion_1d = FileGetVersion($FileVersion_1a, "ProductName")
            _FileWriteLog($InstallLog, "ProductName:   " & $FileVersion_1d & @CRLF & "____________________________________________________________________")
            $FileVersion_1e = FileGetVersion($FileVersion_1a, "CompanyName")
            _FileWriteLog($InstallLog, "CompanyName:   " & $FileVersion_1e & @CRLF & "____________________________________________________________________")
            $FileVersion_1f = FileGetVersion($FileVersion_1a, "LegalCopyright")
            _FileWriteLog($InstallLog, "LegalCopyright:   " & $FileVersion_1f & @CRLF & "____________________________________________________________________")
            $FileVersion_1g = FileGetVersion($FileVersion_1a, "ProductVersion")
            _FileWriteLog($InstallLog, "ProductVersion:   " & $FileVersion_1g & @CRLF & "____________________________________________________________________")
            $FileVersion_1h = FileGetVersion($FileVersion_1a, "FileDescription")
            _FileWriteLog($InstallLog, "FileDescription:   " & $FileVersion_1h & @CRLF & "____________________________________________________________________")
            $FileVersion_1i = FileGetVersion($FileVersion_1a, "LegalTrademarks")
            _FileWriteLog($InstallLog, "LegalTrademarks:   " & $FileVersion_1i & @CRLF & "____________________________________________________________________")
            $FileVersion_1j = FileGetVersion($FileVersion_1a, "PrivateBuild")
            _FileWriteLog($InstallLog, "PrivateBuild:   " & $FileVersion_1j & @CRLF & "____________________________________________________________________")
            $FileVersion_1k = FileGetVersion($FileVersion_1a, "FileVersion")
            _FileWriteLog($InstallLog, "FileVersion:   " & $FileVersion_1k & @CRLF & "____________________________________________________________________")
            $FileVersion_1l = FileGetVersion($FileVersion_1a, "OriginalFilename")
            _FileWriteLog($InstallLog, "OriginalFilename:   " & $FileVersion_1l & @CRLF & "____________________________________________________________________")
            $FileVersion_1m = FileGetVersion($FileVersion_1a, "SpecialBuild")
            _FileWriteLog($InstallLog, "SpecialBuild:   " & $FileVersion_1m & @CRLF & "____________________________________________________________________")
            $FileVersion_1n = FileGetVersion($FileVersion_1a, "CompiledScript")
            _FileWriteLog($InstallLog, "CompiledScript:   " & $FileVersion_1n & @CRLF & "____________________________________________________________________")
            $FileVersion_1o = FileGetVersion($FileVersion_1a, "DefaultLangCodepage")
            _FileWriteLog($InstallLog, "DefaultLangCodepage:   " & $FileVersion_1o & @CRLF & "____________________________________________________________________")
            $FileVersion_1p = FileGetVersion($FileVersion_1a)
            _FileWriteLog($InstallLog, "Argument without additional string name (Version):   " & $FileVersion_1p & @CRLF & "____________________________________________________________________")
            $FileSize_1a = FileGetSize($FileVersion_1a)
            _FileWriteLog($InstallLog, "File Size:   " & $FileSize_1a & @CRLF & "____________________________________________________________________") 
            Case $msg = $ViewFileVer
            ;Run("notepad.exe " & @ScriptDir & "\00_InfoHarvest.log")
            Run("C:\Windows\explorer.exe " & $InstallLog, "")
        Case Else
    EndSelect
WEnd

GUIDelete()

Func _GetFile()
    $SearchIt = InputBox("Remote System", "Do you want to explore a remote system")
    If @error = 1 Or $SearchIt = "" Then
        $message = "Browse for the file you wish to examine."
        $FileVersion_1xa = FileOpenDialog($message, @WindowsDir & "\", "All (*.*)", 1 + 4)
        $FileVersion_1a = $FileVersion_1xa
        Return $FileVersion_1a
    EndIf
    If $SearchIt <> "" Then
        $message = "Browse for the file you wish to examine."
        $FileVersion_1xa = FileOpenDialog($message, "\\" & $SearchIt & "\C$\Windows", "All (*.*)", 1 + 4)
        $FileVersion_1a = $FileVersion_1xa
        FileClose($FileVersion_1xa)
        Return $FileVersion_1a
    EndIf

EndFunc   ;==>_GetFile

Share this post


Link to post
Share on other sites
guinness

A quick search of the forum and you might have come across this >> :mellow:


UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

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  

×