obscurant1st Posted March 8, 2009 Posted March 8, 2009 I have coded a script to find n display md5's of several files not more than 50 at a time with the help of another opensource utility. here there are two problms i'm facing in this. here is the code for my script. expandcollapse popup#NoTrayIcon #Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_outfile=md5calc.exe #AutoIt3Wrapper_Res_Comment=obscurant1st.biz #AutoIt3Wrapper_Res_Description=Made by obscurant1st #AutoIt3Wrapper_Res_Fileversion=1.0.0.1 #AutoIt3Wrapper_Res_LegalCopyright=obscurant1st #AutoIt3Wrapper_Res_requestedExecutionLevel=highestAvailable #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** ;#AutoIt3Wrapper_icon=icons\icontexto-webdev-emoticon-smile-128x128.ico ;Copy this exe file to send folder and then you can use this ;small utility to calculate md5s of appr. not less than 50 files. #include <Array.au3> #include <GUIConstants.au3> #Include <GuiEdit.au3> #include <file.au3> #include <ClipBoard.au3> #include <INet.au3> #include <String.au3> Dim $hPID Dim $k=0 Dim $md5list[50] Func FindfileName($tempfile) local $tempstr , $tempnum Local $str Local $k $tempfile = StringTrimLeft ( $tempfile , 34 ) $str = StringSplit($tempfile ,"\") $tempstr = "" For $k = 1 to UBound($str)-2 Step +1 $tempstr = $tempstr & $str[$k] & "\" Next Return $tempstr EndFunc DirCreate(@ProgramFilesDir & "\" & "md5chk") FileInstall("C:\Users\obscurant1st\Desktop\Md5.exe", @ProgramFilesDir & "\" & "md5chk" & "\") IF ubound($CmdLine)-1 > 0 Then $FolderName=$CmdLine[1] For $i = 1 to ubound($CmdLine) -1 $hPID = Run("md5.exe " & '"' & $CmdLine[$i] & '"' , @ProgramFilesDir & "\" & "md5chk" & "\", @SW_HIDE , 2) ProcessWaitClose($hPID) $sLine = StdoutRead($hPID) $md5string = FindfileName($sLine) $md5list[$i] = StringReplace($sLine , $md5string , "") If @error = 1 Then ExitLoop EndIf Next EndIf #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Md5 Calculator", 421, 236, 321, 174) GUISetBkColor(0xA6CAF0) $MD5s = GUICtrlCreateEdit("", 16, 16, 385, 201) For $m = 1 to ubound($CmdLine) -1 if $m=1 Then GUICtrlSetData(-1,$md5list[$m]) Else _GUICtrlEdit_AppendText($MD5s,@CRLF) _GUICtrlEdit_AppendText($MD5s,$md5list[$m]) EndIf Next GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd 1 problem is whatever i do the exe file can only be run if the script is compiled at the same place. ie i mean if i try to run the exe file in another system it simply wont work. i think its the problem with file install function coz if i remove that line and do those things manually it works with out any problems.Can any body help me on this??? 2nd problem is is there any method by which i can use this script for finding the md5s of more than 60 files.??? I have attached the exe for findin md5 which i'm using in this script with this msg. Thank you.Md5.exe [u]We don't need people who can spit back facts. We've got Google."[/u] WebguruBB - Free Hosting, Domains, and SEO articles.Awesome Techs - Tips, Tricks and Some Technology NewsCool Facts - Cool Facts, Fun Facts, Weird Facts etc.
rajeshontheweb Posted March 11, 2009 Posted March 11, 2009 yeah thats a troubleyou will have to use a code to find out if the file exists in the PCYou can check a primitive work done i had done http://www.autoitscript.com/forum/index.php?showtopic=91105 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
obscurant1st Posted March 11, 2009 Author Posted March 11, 2009 yeah thats a troubleyou will have to use a code to find out if the file exists in the PCYou can check a primitive work done i had done http://www.autoitscript.com/forum/index.php?showtopic=91105oh thx mate..i dint know that there is a md5.au3 file..thank you for this..Anyway i'm also doin this for malware analysis.. [u]We don't need people who can spit back facts. We've got Google."[/u] WebguruBB - Free Hosting, Domains, and SEO articles.Awesome Techs - Tips, Tricks and Some Technology NewsCool Facts - Cool Facts, Fun Facts, Weird Facts etc.
ChrisL Posted March 11, 2009 Posted March 11, 2009 There is this topic here also http://www.autoitscript.com/forum/index.ph...6976&hl=MD5 [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
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