Jump to content
Sign in to follow this  
Dgameman1

IMPORTANT! Accidently deleted file!

Recommended Posts

Dgameman1

I ran a script which basically deleted itself

and I can't find my file!

HELPPPP =[[[[[

Share this post


Link to post
Share on other sites
sleepydvdr

http://www.piriform.com/recuva


#include <ByteMe.au3>

Share this post


Link to post
Share on other sites
Dgameman1

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 by Dgameman1

Share this post


Link to post
Share on other sites
sleepydvdr

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>

Share this post


Link to post
Share on other sites
Dgameman1

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

Share this post


Link to post
Share on other sites
Dgameman1

Ok, i'm doing other, all, and deep scan. Better find this or im going to cry =O

Share this post


Link to post
Share on other sites
Unsigned

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 :graduated: ) 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 by Unsigned
  • Like 1

.

Share this post


Link to post
Share on other sites
Dgameman1

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 :graduated: ) 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

Share this post


Link to post
Share on other sites
Unsigned

....become root or something.

The command is "sudo" :graduated: And download TestDisk and run it from an external drive (such as a USB flashdrive) instead of the harddrive you lost your file on.

  • Like 1

.

Share this post


Link to post
Share on other sites
Dgameman1

The command is "sudo" :graduated: 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 cd

I go into terminal and i type what exactly?

Share this post


Link to post
Share on other sites
Dgameman1

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 =[

Share this post


Link to post
Share on other sites
AdmiralAlkex

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.

Share this post


Link to post
Share on other sites
Unsigned

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 by Unsigned
  • Like 1

.

Share this post


Link to post
Share on other sites
martin

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.
  • Like 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.

Share this post


Link to post
Share on other sites
Unsigned

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 by Unsigned

.

Share this post


Link to post
Share on other sites
martin

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.

Share this post


Link to post
Share on other sites
stormbreaker

:bye: 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:

$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
    EndFunc

You could later use a Disk-Editor to make a dump of the content at that offset and then save it as AU3 file.

:oops:Note: Workable only if you have not made any changes to the Drive after the file was deleted.

Edited by MKISH
  • Like 1

----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

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  

×