1.

Solve : Extracting simple BAT code from EXE??

Answer»

Hi, all...

I know this may seem stupid, but I'd LIKE to ask.

A few months ago, I got around to playing with a U3 drive and I wanted to get the drive to load PStart anytime it was inserted. Unfortunately, where I work, the computers (and the IT people) are crap, and we have viruses which overwrite any autorun.inf files on our drives. Thankfully, I am aware of this and am skilled in getting rid of these things before I take it home to work in my own computer.

Anyway, I figured that I could use the Read-Only partition of the U3 drive to disallow any alterations by viruses, and it worked. I used a HTTP file server to load an autorun.inf and an executable to the R/O partition.

Often, when I insert the drive in a computer at work, different letters may be assigned to the two drives. On one system, it may be E and G. Another, F and G. E and F, etc.

The executable on the R/O partition was compiled using a bat2exe utility, and the batch file was written so that, when the autorun file ran upon insertion, it would SEEK OUT the PStart.exe on any of the other drives, and if it found it, it would run it. This is how I could always get it to run PStart on insertion, no matter where and no matter what viruses.

Problem for me is that I lost the original scripting in that batch file, and all I have is the EXE.

Are there any simple things that could be done to "DECOMPILE" it back to BAT so that I could be smart and save that script?

Help!

Thanks!open it with a text editor, and search through the file for the batch code. Usually it's in plain text.

if that doesn't work this might
Code: [Select]@echo off
start /min %1
dir /s C:\%~n1.bat | FIND "Directory of" > dir.txt
for /f "tokens=1-2*" %%a in (dir.txt) do (
CD /d "%%c"
start notepad %~n1.bat
)it will close itself so don't close it it may take awileYou could try to open the exe with hex-editor and see if there are some FAMILIAR strings inside.



Discussion

No Comment Found