Dgameman1 Posted October 1, 2011 Share Posted October 1, 2011 I ran a script which basically deleted itself and I can't find my file! HELPPPP =[[[[[ Link to comment Share on other sites More sharing options...
sleepydvdr Posted October 1, 2011 Share Posted October 1, 2011 http://www.piriform.com/recuva #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
Dgameman1 Posted October 1, 2011 Author Share Posted October 1, 2011 (edited) http://www.piriform.com/recuva Ok thank you so much. I'm trying this right now. but right after I posted this thread, i did a system restore. Could recuva still find it?And under what option would a .au3 be?Compressed?Other?Video?Music? Edited October 1, 2011 by Dgameman1 Link to comment Share on other sites More sharing options...
sleepydvdr Posted October 1, 2011 Share Posted October 1, 2011 If the file was saved at some point, then it is possible to recover the file. System restore does not affect any files except executable and dll files. Therefore, an AutoIt script will be completely ignored by system restore. #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
Dgameman1 Posted October 1, 2011 Author Share Posted October 1, 2011 If the file was saved at some point, then it is possible to recover the file. System restore does not affect any files except executable and dll files. Therefore, an AutoIt script will be completely ignored by system restore.What option should I search it under? I'm having a slight panic attack =O Link to comment Share on other sites More sharing options...
Dgameman1 Posted October 1, 2011 Author Share Posted October 1, 2011 Ok, i'm doing other, all, and deep scan. Better find this or im going to cry =O Link to comment Share on other sites More sharing options...
Unsigned Posted October 1, 2011 Share Posted October 1, 2011 (edited) Step 1: If you have another computer, get off the affected one right now. Seriously. Right now. I know you already System Restore'd, but stop using it. Anything you do to the computer (including that System Restore ) could potentially overwrite the leftover pieces of your file. Step 2: Use TestDisk. It's the best data recovery tool I have ever used and it's free. Ideally, you should shut down the computer and boot back up from LiveCD with TestDisk (preferrably BackTrack in Forensics mode). This is the first thing I do whenever a client brings me a problem along these lines. If you don't have a LiveCD, download and burn it on a different computer. Edited October 1, 2011 by Unsigned Dgameman1 1 . Link to comment Share on other sites More sharing options...
Dgameman1 Posted October 1, 2011 Author Share Posted October 1, 2011 Step 1: If you have another computer, get off the affected one right now. Seriously. Right now. I know you already System Restore'd, but stop using it. Anything you do to the computer (including that System Restore ) could potentially overwrite the leftover pieces of your file. Step 2: Use TestDisk. It's the best data recovery tool I have ever used and it's free. Ideally, you should shut down the computer and boot back up from LiveCD with TestDisk (preferrably BackTrack in Forensics mode). This is the first thing I do whenever a client brings me a problem along these lines. If you don't have a LiveCD, download and burn it on a different computer. I don't have another computer, but i did have a linux live cd. I booted up into it, and it was the biggest pain in the ass. I didn't know how to run testdisk or become root or something. I have no idea what's happening. I'm just going to download testdisk in windows Link to comment Share on other sites More sharing options...
Unsigned Posted October 1, 2011 Share Posted October 1, 2011 ....become root or something. The command is "sudo" And download TestDisk and run it from an external drive (such as a USB flashdrive) instead of the harddrive you lost your file on. Dgameman1 1 . Link to comment Share on other sites More sharing options...
Dgameman1 Posted October 1, 2011 Author Share Posted October 1, 2011 The command is "sudo" And download TestDisk and run it from an external drive (such as a USB flashdrive) instead of the harddrive you lost your file on. I do this on the linux live cd?So i put testdisk.tar or whatever inside a usb flashdrive, and i go into my linux cdI go into terminal and i type what exactly? Link to comment Share on other sites More sharing options...
Dgameman1 Posted October 1, 2011 Author Share Posted October 1, 2011 Let's say I can't find it because im really losing hope Is there any .exe to .au3 converteR? My code had about 2k lines of scripts and i'd be very very upset if I couldn't get it back =[ Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted October 1, 2011 Share Posted October 1, 2011 Let's say I can't find it because im really losing hope Is there any .exe to .au3 converteR? My code had about 2k lines of scripts and i'd be very very upset if I couldn't get it back =[ We are not going to discuss that. See Forum Rules about decompiling scripts. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Unsigned Posted October 1, 2011 Share Posted October 1, 2011 (edited) I do this on the linux live cd?Yes, testdisk usually requires root (superuser) permissions to run due to the low-level disk access it requires. Privilege elevation in *nix is accomplished via the "sudo" and "su" commands. Edited October 2, 2011 by Unsigned Dgameman1 1 . Link to comment Share on other sites More sharing options...
martin Posted October 2, 2011 Share Posted October 2, 2011 Let's say I can't find it because im really losing hope Is there any .exe to .au3 converteR? My code had about 2k lines of scripts and i'd be very very upset if I couldn't get it back =[ When I saw the first post I somehow saw that coming. If you can convince a mod that your case is valid then perhaps a mod could be persuaded to decompile it for you but you would have to be able to prove that you wrote the script. Of course if you did write the script then the best advice might be to write it again and at the same time learn to back up things. Dgameman1 1 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. Link to comment Share on other sites More sharing options...
Unsigned Posted October 2, 2011 Share Posted October 2, 2011 (edited) When I saw the first post I somehow saw that coming. If you can convince a mod that your case is valid then perhaps a mod could be persuaded to decompile it for you but you would have to be able to prove that you wrote the script. Of course if you did write the script then the best advice might be to write it again and at the same time learn to back up things.AFAIK, he did recover it, with testdisk. Edited October 2, 2011 by Unsigned . Link to comment Share on other sites More sharing options...
martin Posted October 2, 2011 Share Posted October 2, 2011 AFAIK, he did recover it, with testdisk.OK, then you know somethink I didn't. I was was responding to the OP's last post #11 which suggested otherwise. 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. Link to comment Share on other sites More sharing options...
JohnOne Posted October 2, 2011 Share Posted October 2, 2011 When I saw the first post I somehow saw that coming. lol I seen the first few lines and immediately wondered how many posts it would take, I wonder if a suspicious mind is a healthy one. AutoIt Absolute Beginners  Require a serial  Pause Script  Video Tutorials by Morthawt  ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
stormbreaker Posted March 28, 2012 Share Posted March 28, 2012 (edited) It is possible to recover your file (completely), if you have not performed any cut/copy/paste/defrag operations on the drive where the file was present. This could be accomplished using AutoIt (WINAPI functions). Use the following code:expandcollapse popup$HRESULT = _FindSomething(".D:", StringToBinary("<Any text specific to your AU3 file>"), Default) Msgbox(64, "", $HRESULT) Func _FindSomething($FilePath, $BinaryValue, $StartOffset = Default) Local $Buffer, $ptr, $hFile, $Result, $Read, $SearchValue, $Pos, $BufferSize = 2048 ;## Parameter Defaults If $StartOffset = Default Then $StartOffset = 0 ;## Prep the supplied binary value for search $SearchValue = BinaryToString($BinaryValue) ;## Define the dll structure to store the data. $Buffer = DllStructCreate("byte[" & $BufferSize & "]") $ptr = DllStructGetPtr($Buffer) ;## Open File $hFile = _WinAPI_CreateFile($FilePath, 2, 2, 1) If $hFile = 0 Then Return SetError(5, @error, 0) ;## Move file pointer to offset location $Result = _WinAPI_SetFilePointer($hFile, $StartOffset) $err = @error If $Result = 0xFFFFFFFF Then _WinAPI_CloseHandle($hFile) Return SetError(5, $err, 0) EndIf ;## Track the file pointer's position $Pos = $StartOffset ;## Start Search Loop While True $Read = 0 $Result = _WinAPI_ReadFile($hFile, $ptr, $BufferSize, $Read) $err = @error If Not $Result Then _WinAPI_CloseHandle($hFile) Return SetError(6, $err, 0) EndIf $Result = DllStructGetData($Buffer, 1) $Result = BinaryToString($Result) $Result = StringInStr($Result, $SearchValue) If $Result > 0 Then ExitLoop If $Read < $BufferSize Then _WinAPI_CloseHandle($hFile) Return -1 EndIf $Pos += $Read WEnd _WinAPI_CloseHandle($hFile) If Not $Result Then Return SetError(7, @error, 0) $Result = $Pos + $Result - 1 Return $Result EndFuncYou could later use a Disk-Editor to make a dump of the content at that offset and then save it as AU3 file. Note: Workable only if you have not made any changes to the Drive after the file was deleted. Edited March 28, 2012 by MKISH Unsigned 1 ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1 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