detected Posted March 2, 2009 Posted March 2, 2009 Hi, there is a little trick, making an AUTORUN.INF folder with in that folder a folder, ending with a dot.. This makes the folder not valid, wich makes it unable to use/delete it. Perfect for disabling the autorun.inf virus. How do I create a folder ending with a dot? Whatever I try, AutoIt keeps creating a normal folder, ignoring the dot. Thnx in advance
Dampe Posted March 2, 2009 Posted March 2, 2009 #include <Process.au3> $tVal = _MakeDir (@ScriptDir & '\.test') If @error Then MsgBox (48, "Error", "Directory could not be made.") EndIf Func _MakeDir($sDir) _RunDOS ("mkdir " & '"' & $sDir & '"') If @error Then SetError (1) Return -1 Else Return 1 EndIf EndFunc I believe it can only be done through the command line
Ascend4nt Posted March 2, 2009 Posted March 2, 2009 Dampe, you put a dot before the foldername, not after. @detected - I don't believe it's possible. Technically, foldernames without an extension are 'seen' as ending in 'dot'. Any filenames or foldernames with trailing dots and/or spaces are truncated to the last non-whitespace non-dot character. I've done a number of experiments with this - through explorer, AutoIT, and the command prompt. I just don't think what you're looking to do is possible. But then, I've been proven wrong before.. My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code)
martin Posted March 2, 2009 Posted March 2, 2009 #include <Process.au3> $tVal = _MakeDir (@ScriptDir & '\.test') If @error Then MsgBox (48, "Error", "Directory could not be made.") EndIf Func _MakeDir($sDir) _RunDOS ("mkdir " & '"' & $sDir & '"') If @error Then SetError (1) Return -1 Else Return 1 EndIf EndFunc I believe it can only be done through the command line Making a folder which ends in '.' using the command prompt doesn't work on my XP SP3. I believe that if you have an Apple computer on your network which can write to your folder then the Apple can create a folder which ends with '.'. Maybe other OS's can as well. If the folder name is longer than 8 characters you can remove it by renaming it from the command prompt using the 8-character name and then you can delete it. To see the short folder names from the command prompt you can use Dir /AD /x Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
detected Posted March 2, 2009 Author Posted March 2, 2009 (edited) Dampe, you put a dot before the foldername, not after.@detected - I don't believe it's possible. Technically, foldernames without an extension are 'seen' as ending in 'dot'. Any filenames or foldernames with trailing dots and/or spaces are truncated to the last non-whitespace non-dot character. I've done a number of experiments with this - through explorer, AutoIT, and the command prompt. I just don't think what you're looking to do is possible.But then, I've been proven wrong before..It is possible I just can't find out how they do it Maybe by adding an invalid character after the dot? (You know,... The ones that end out becomming a square)But how do I get that character? I know that there are some characters that are invisible if you add them in a file/foldername! Edited March 2, 2009 by detected
James Posted March 2, 2009 Posted March 2, 2009 I don't know how that happens actually. This is interesting :hmm: Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
detected Posted March 2, 2009 Author Posted March 2, 2009 I don't know how that happens actually. This is interesting :hmm:They do it so the autorun.inf virus cannot overwrite the AUTORUN.INF folder..When you try to rename or remove the folder you get a error that it's not a valid folder.Really nice technique, can't find it anywhere on the internet!Or maybe I'm just using the wrong words to search for it
Dampe Posted March 3, 2009 Posted March 3, 2009 Dampe, you put a dot before the foldername, not after.@detected - I don't believe it's possible. Technically, foldernames without an extension are 'seen' as ending in 'dot'. Any filenames or foldernames with trailing dots and/or spaces are truncated to the last non-whitespace non-dot character. I've done a number of experiments with this - through explorer, AutoIT, and the command prompt. I just don't think what you're looking to do is possible.But then, I've been proven wrong before..Hah.. I just realised this now my bad.Making a folder which ends in '.' using the command prompt doesn't work on my XP SP3.I believe that if you have an Apple computer on your network which can write to your folder then the Apple can create a folder which ends with '.'. Maybe other OS's can as well. If the folder name is longer than 8 characters you can remove it by renaming it from the command prompt using the 8-character name and then you can delete it. To see the short folder names from the command prompt you can useDir /AD /xAfter noticing I stupidly didn't read the original post properly I attempted to alter the function I wrote, and no deal on SP2 for a . at the end.
lewcamino Posted August 24, 2009 Posted August 24, 2009 Hah.. I just realised this now >_< my bad.After noticing I stupidly didn't read the original post properly I attempted to alter the function I wrote, and no deal on SP2 for a . at the end.I know this is a bit old but I stumbled on it and thought I would answer.echo Hi > "\\?\C:\File with Dots..."mkdir "\\?\C:\Folder with Dots..." BabyIT 1
Mobius Posted August 25, 2009 Posted August 25, 2009 (edited) I know this is a bit old but I stumbled on it and thought I would answer.echo Hi > "\\?\C:\File with Dots..."mkdir "\\?\C:\Folder with Dots...">_< genius.... nice find lewcamino.working with files and folders like this is tricky, but not impossible. Edited August 25, 2009 by Mobius
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