AutoProgramming Posted April 6, 2009 Share Posted April 6, 2009 expandcollapse popup;~ scan all drives for autorun.inf #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=C:\Users\alexander\Documents\AutoIt\projects\AntiVir\Forms\autorun_editor.kxf $Form1 = GUICreate("Autorun.inf Scanner // by AutoProgramming", 635, 444, 193, 125) $Edit1 = GUICtrlCreateEdit("", 8, 40, 617, 393) $CButton = GUICtrlCreateButton("Close", 8, 8, 75, 25, 0) $IButton = GUICtrlCreateButton("Search for autorun.inf", 96, 8, 131, 25, 0) $RCheckbox = GUICtrlCreateCheckbox("Search Removable Drives?", 240, 16, 169, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $IButton GUICtrlSetData($Edit1, "") If GUICtrlRead($RCheckbox) = 1 Then GetAll("removable") EndIf GetAll("fixed") GetAll("cdrom") Case $CButton Exit EndSwitch WEnd GetAll("fixed") GetAll("cdrom") Func GetAll($type) $var = DriveGetDrive($type) If NOT @error Then For $i = 1 to $var[0] $path = $var[$i] & "\autorun.inf" If FileExists($path) Then GUICtrlAddData($Edit1, "--------------------------------------------------" & @CRLF) GUICtrlAddData($Edit1, "Autorun.inf @ " & $path & @CRLF) GUICtrlAddData($Edit1, "--------------------------------------------------" & @CRLF) $autorun = FileRead($path) GUICtrlAddData($Edit1, $autorun) GUICtrlAddData($Edit1, @CRLF & @CRLF) EndIf Next EndIf EndFunc Func GUICtrlAddData($GUIElement, $Data) GUICtrlSetData($GUIElement, GUICtrlRead($GUIElement) & $Data) EndFunc I think it's quite self-explainig -> This tool searches for autorun.inf in all drives and displays its content. Enjoy. [u]My OpenSource Projects:[/u]- [BEEP] proMusiX- Search autorun.inf Link to comment Share on other sites More sharing options...
Yashied Posted April 6, 2009 Share Posted April 6, 2009 It's a good idea. Suitable for finding viruses on flash drives. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
DaRam Posted April 6, 2009 Share Posted April 6, 2009 Excellent idea, it can be used to defeat the effort going on here http://www.autoitscript.com/forum/index.ph...c=92643&hl= It's a good idea. Suitable for finding viruses on flash drives. Link to comment Share on other sites More sharing options...
A. Percy Posted April 6, 2009 Share Posted April 6, 2009 unless you have disabled the autorun function before, it may not be effective. Like that question: which came first, the chicken or the egg? Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator VW Bug user Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral Link to comment Share on other sites More sharing options...
AutoProgramming Posted April 6, 2009 Author Share Posted April 6, 2009 Excellent idea, it can be used to defeat the effort going on here http://www.autoitscript.com/forum/index.ph...c=92643&hl= That's actualy where the idea comes from ;D [u]My OpenSource Projects:[/u]- [BEEP] proMusiX- Search autorun.inf Link to comment Share on other sites More sharing options...
GEOSoft Posted April 6, 2009 Share Posted April 6, 2009 unless you have disabled the autorun function before, it may not be effective. Like that question: which came first, the chicken or the egg?If AutoRun is disabled, it won't matter if the AutoRun.inf file exists or not. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
A. Percy Posted April 6, 2009 Share Posted April 6, 2009 If AutoRun is disabled, it won't matter if the AutoRun.inf file exists or not.But if isn't, it won't matter if you can see the contents of autorun.inf or not, your machine is infected if the file have bad content. Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator VW Bug user Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral Link to comment Share on other sites More sharing options...
killerofsix Posted April 6, 2009 Share Posted April 6, 2009 glad to see I inspired something But for most PC's autorun is disabled and only appears as an option. For my USB finder it's just another way to lure the person who has your USB to run your app. This is a good defense against any malicious attempts to destroy your system through a usb or cd. good job with this script "The quieter you are, the more you are able to hear..." My AppsUSB Finder Link to comment Share on other sites More sharing options...
rajeshontheweb Posted April 7, 2009 Share Posted April 7, 2009 guys, i thought i had posted my edited version of the autorun finder ?? i will post the mod tomoro :-) 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...
rajeshontheweb Posted April 8, 2009 Share Posted April 8, 2009 (edited) Here it is , > shows which drives user has scanned already - as a confirmation that the program has run already :-) > alerts user if the drive was not ready (typically if the memory card / zipdrive / removable media not inserted properly ) > Selects removable media also by default <edited> > search button on default focusScan4Autorun_old.au3 Edited April 8, 2009 by rajeshontheweb 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...
rajeshontheweb Posted April 8, 2009 Share Posted April 8, 2009 Added Features: > Edit Control is read only, > If autorun.inf is a folder (typically ninja pendisk / flashdisinfector / myown driveprotection script, do that for security enabling on removable drives) lists folder contents.Scan4Autorun.au3 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...
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