SRL Archive - Other Scripts

Image Decompiler


Jason2gs

2007-05-17 22:46:42

Decompiles an image taken from the internet, into text; recompiles it into picture form, on your computer.

I was bored.

I did this partly just to see if it was possible, and what do you know :p


program New;

var
SaveFile: Integer;
TextPic: String;

procedure SavePic;
begin
TextPic := GetPage('http://MusicFolder.fileave.com/Pic1.bmp');
SaveFile := RewriteFile('C:\Pictures\Pic1.bmp', False);
WriteFileString(SaveFile, TextPic);
end;

begin
SavePic;
end.

Edit: I was playin' around, and found that this also works with other file types. (Why shouldn't it?) I did it to an exe :)

Jason2gs

2007-05-18 12:00:29

From: c0de
Doesn't really decompile it :p

Everything can be represented as TEXT, only you need viewer to view that type of text.


Aww, it doesn't?

Dang, I thought it was pretty cool for a while (h)

Edit: Still cool that you can use SCAR to download things. Didn't know you could before.

Yakman

2007-05-18 13:45:53

yeah i always found that was a good trick for getting flash videos and page sources that have 'no-right-click' scripts
also remember to use CloseFile() cause while scar is open, you wont be able to access the file, it will say 'another program is using it'

Jason2gs

2007-05-18 15:30:46

Ah, thanks for that ;)

I tried to use this to experiment a theory I had. Downloading a program in much less time that it would take with all the graphics that Windows adds.

Anyways, I filled everything in, but it gave me the following error:

HTTP/1.1 503 Limit Exceeded

I'll post the script below. Is this supposed to happen?

Oh, and it might take a while before SCAR asks you if it can access C:\Applications\VB6.zip; the package is ~388 Meg.

program New;

var
SaveFile: Integer;
TextPic: String;

procedure SavePic;
begin
TextPic := GetPage('http://www34.megaupload.com/files/71a6bece6ff6968ac6c8ada8e9abf0e4/Visual%20Basics.zip');
SaveFile := RewriteFile('C:\Applications\VB6.zip', False);
WriteFileString(SaveFile, TextPic);
end;

begin
SavePic;
end.

Smartzkid

2007-05-18 17:36:36

I doubt you'd get much improvement from downloading files with SCAR; Firefox's downloader is made and optimized to download files.

Check this out:

program New;
const
grad = 1; //1 ------------------- 350 (negative number
//Choppy Lines Smooth gradient reverses slant)

var
SaveFile, i: Integer;
TextPic: String;

procedure SavePic;
begin
TextPic := GetPage('http://MusicFolder.fileave.com/Pic1.bmp');
for i := 1 to 86875 do
TextPic[(Length(TextPic)/2)-43420+i] := chr(i/grad);
SaveFile := RewriteFile('C:\Pic.bmp', False);
WriteFileString(SaveFile, TextPic);
CloseFile(SaveFile);
end;

begin
SavePic;
end.

Jason2gs

2007-05-18 22:06:56

From: Smartzkid
I doubt you'd get much improvement from downloading files with SCAR; Firefox's downloader is made and optimized to download files.

Check this out:

program New;
const
grad = 1; //1 ------------------- 350 (negative number
//Choppy Lines Smooth gradient reverses slant)

var
SaveFile, i: Integer;
TextPic: String;

procedure SavePic;
begin
TextPic := GetPage('http://MusicFolder.fileave.com/Pic1.bmp');
for i := 1 to 86875 do
TextPic[(Length(TextPic)/2)-43420+i] := chr(i/grad);
SaveFile := RewriteFile('C:\Pic.bmp', False);
WriteFileString(SaveFile, TextPic);
CloseFile(SaveFile);
end;

begin
SavePic;
end.


Ooo, fancy :D

Smartzkid

2007-05-18 22:24:32

:p Very.


I'm thinking about making a simple .exe 'encrypter' with this idea…

'td be pretty fun to play around with…

Jason2gs

2007-05-18 23:29:30

With what? VB6?

And what do you mean by "encrypter"? (Which, by the way, isn't a word :p [Dang you Firefox! And dang your spell check!])

Smartzkid

2007-05-19 00:49:05

Simply push the application through scar, and bump every character up by one

To 'decrypt' the application, just run it through scar again, and bring every character down by one.

Jason2gs

2007-05-19 01:08:00

Application? SCAR script? .EXE converted to text?

What would be better, would be to have a small "tag" along with the encryption, to tell SCAR how many characters to decrypt it by. (Kinda like what I did with my ISM encrypter/decrypter; only, encrypt it in the encryption.)

(Copy() a certain line of text, decrypt it for more encryption, then Copy()/Between() parts of that, and perhaps add certain numbers up to check how many chrs/ords to decrypt by?

Smartzkid

2007-05-19 01:22:22

Yes, I was also thinking of something like that:


When you're encrypting it, add the encryption key (two digits or so) to the end of the file.

Decrypting it should be easy:

encryptionkey := Copy(Length(app) - 2, Length(app), app);

Jason2gs

2007-05-19 01:36:47

Mind me asking what this would be useful for? (:p)

Not that most (Ok… All) of my scripts are the least bit useful…

[offtopic]

So, did you get that VB6 link I sent ya?

[/offtopic]