SRL Archive - Other Scripts

SCAR Obfuscator by Ron


Ron

2008-08-21 14:16:45

SCAR Obfuscator v.06 Beta by Ron


Features:
* Deletes ALL comments
* Converts strings to hexadecimal
* Deletes unneeded spaces
* Deletes unneeded blank lines
* Converts script to one line



If you download this script and/or find any bugs, please make sure to post a comment! Thank you.

Changes in v.05 Beta to v.06 Beta:
* Fixed: Deleting includes in curly braces. By Runescaplan.
* Fixed: Deleting compiler directives in curly braces. By nielsie95.
* Fixed: Deleting only one curly braced comment on a line instead of all curly comments on the same line. By nielsie95.
* Fixed: Curly braced comments, if surrounded by keywords/vars without a space (e.g. with{test}t{test}do), will be deleted and will render the script uncompilable. By nielsie95.
* Misc: Set tab to obfuscated code tab after obfuscation.


~Ron

Runescapian321

2008-08-21 14:23:26

Looks nice :)

Though, after running it on timothegreat's quickpowerminer, it seems that it no longer includes any includes though, so when running it gives the same errors as if nothing were included (Like Unknown Identifier: HowManyPlayers).

Ron

2008-08-21 14:26:22

Yeah it still needs some work, this is just the beginning. But thank you. I forgot to check for includes. My beta versions are not normally rush jobs, but I really wanted to post this before lunch. :D

Runescapian321

2008-08-21 15:30:59

Works great for other than that, nice job :)

Only suggestion would be to make it so that the const and DeclarePlayers would appear normal, this way a form wouldn't be necessary.

Shuttleu

2008-08-21 15:54:18

so do Bitmaps and DTM's still work if the string is in hexdecimal format?

oh and nice release :D

~shut

Bobarkinator

2008-08-21 18:24:05

Ron, you make great programs. You're pretty awesome :)

kingarabian

2008-08-21 20:39:50

From: Bobarkinator
Ron, you make great programs. You're pretty awesome :)


I know right. He made an awesome keylogger. And now an obfuscator. Naiice. Will test soon. And since it obfuscates the include lines, can we just add the includes above the obfuscated stuff?

mastaraymond

2008-08-21 21:06:59

Haha :). Gj. Do Types work? Oh wait.. You donnot rename procedure\vars yet :p.

Runescapian321

2008-08-21 21:12:28

From: kingarabian
I know right. He made an awesome keylogger. And now an obfuscator. Naiice. Will test soon. And since it obfuscates the include lines, can we just add the includes above the obfuscated stuff?


Yeah, that works.

P1nky

2008-08-21 22:16:53

awsome release Ron

a working obfusserrrrrr

Ron

2008-08-22 13:02:41

Thanks. This script took me a while to write. I had to try to think of every way possible to render the obfuscated script uncompilable. Im surprised I forgot about includes haha.

nielsie95

2008-08-22 13:07:09

Compiler Directives also aren't working ;)

Shuttleu

2008-08-22 15:38:31

i didnt get an answer :(

do DTM's and bitmaps still work if they are in hexdecimal?

~shut

EDIT: dont worry i found out that they do still work in hexdecimal form :D

Ron

2008-08-22 23:14:37

Hmm compiler directives. I never used them but have seen them in scripts. I'll read up on them and fix it in the next version, thanks for reporting it neilsie. :)

I thought it would still work because the bitmaps and dtms in scar are strings. Thanks for checking that.

~ron :)

Daniel

2008-08-22 23:14:43

[quote=Ron's Image][URL=http://imageshack.us][IMG]http://img231.imageshack.us/img231/2786/dfmparserv26byronmh4.jpg[/IMG][/URL][/quote]

GIMMIE GIMMIE GIMMIE :D :p

NiCbaZ

2008-08-22 23:32:28

ahh cool… includes?? tho and best to use Srl player form with this if you wanting to realse the script you use it on?

nielsie95

2008-08-23 05:29:59

It still seems to do compiler directives wrong. Also I think it removes the comments here wrong:


program New;
{$Define Test}
var
t: TLabel;
begin
t := TLabel.Create(nil);
with{test}t{test}do
{$IfDef Test}
Caption := 'Test';
{$Else}
Caption := 'No Test';
{$EndIf}
t.Free;
end.

Nice job though :)

Ron

2008-08-23 06:02:50

Thanks again Nielsie95. I fixed those two problems in the new version.

And the reason the uploaded script is still messing up compiler directives is because I haven't uploaded the new v.06 beta version yet lol. I will soon though, I just want to make a few changes.

Oh and Dans The Man, the new feature in my dfm parser is buggy and I'm still trying to work out the kinks. Since I'm starting college soon and won't have enough time to test each script I write, I might just release it as a beta like this obfusssseeerr. :)

Daniel

2008-08-24 00:01:06

From: Ron

Oh and Dans The Man, the new feature in my dfm parser is buggy and I'm still trying to work out the kinks. Since I'm starting college soon and won't have enough time to test each script I write, I might just release it as a beta like this obfusssseeerr. :)

Ok, thanks Ronny boy :p Also, how did you discover all these hexes?

Ron

2008-08-24 00:21:20

I didn't discover each hexadecimal code for each character. I just used a function in scar called Ord(). Here is an example.


program HexExampleByRon;

const
Text = 'HeyInHex';

var
i, n : Integer;

begin
ClearDebug;
n := Length(Text);
for i := 1 to n do
WriteLn(Text[i] + ' = #' + IntToStr(Ord(Text[i])));
end.

That will print out the hexadecimal code for each character in the string Text. You can also use an ascii table.

Daniel

2008-08-25 06:00:10

:o Thanks so much Ron! :D

Ron

2008-08-28 01:25:26

No prob Dan. Uploaded v.06 Beta. Again, find any problems, let me know. :)

Changes in v.05 Beta to v.06 Beta:
* Fixed: Deleting includes in curly braces. By Runescaplan.
* Fixed: Deleting compiler directives in curly braces. By nielsie95.
* Fixed: Deleting only one curly braced comment on a line instead of all curly comments on the same line. By nielsie95.
* Fixed: Curly braced comments, if surrounded by keywords/vars without a space (e.g. with{test}t{test}do), will be deleted and will render the script uncompilable. By nielsie95.
* Misc: Set tab to obfuscated code tab after obfuscation.

Westside Rep

2009-01-07 20:39:57

ord wont convert to hexadecimal, it just returns the byte of the character.

Hexadecimal is this: #DEADBEEF, #FF, #1F, etc

Ron

2009-01-13 11:24:01

Oops, thanks for pointing that out. Yeah those are decimal characters. I don't know how I got that confused.

Here is a decimal to hexadecimal converter.

program DecimalToHexadecimalConversionByRon;

const
decimal = 188;

{******************************************************************************]
function DecToHex( decimal : LongInt ) : String;
By: Ron
Description: Converts decimal to hexadecimal
Used: http://www.permadi.com/tutorial/numDecToHex/
[******************************************************************************}
function DecToHex( decimal : LongInt ) : String;
var
int, remain : LongInt;
begin
int := decimal;
repeat
remain := int mod 16;
if ( remain >= 10 ) then
begin
case remain of
10 : Result := 'A' + Result;
11 : Result := 'B' + Result;
12 : Result := 'C' + Result;
13 : Result := 'D' + Result;
14 : Result := 'E' + Result;
15 : Result := 'F' + Result;
end;
end else
Result := IntToStr( remain ) + Result;
int := int / 16;
until ( int <= 0 );
end;

//var
// i : integer;

begin
ClearDebug;
WriteLn( IntToStr( decimal ) + ' = ' + DecToHex( decimal ) );
//for i := 0 to 15 do
// WriteLn( IntToStr( i ) + ' = ' + DecToHex( i ) );
end.

~Ron

P1nky

2009-01-18 23:06:56

can you make it to change the letters diffrent???
like function to ehhhh NtOFICN
or something similar like that?

ZaSz

2009-01-18 23:33:03

dude, you sure you wanna be posting this info? I can give u a de-fusicator within a few hours… (I will show u and only u cause I don't steal scripts, i just show flaws.)

Ron

2009-01-19 23:45:56

I don't really care zasc, this was a fun project. Feel free to post whatever you like. :) I probably will not get around to changing variable names as that is an intense feature making this script a lot more complicated.

@~~Joker~~, if you changed the A, B, C, D, E, or F it would change the output to whatever you like.

noidea

2009-01-20 08:53:46

From: zasz
dude, you sure you wanna be posting this info? I can give u a de-fusicator within a few hours… (I will show u and only u cause I don't steal scripts, i just show flaws.)


Please do post it:p Make it harder for Ron :p

XRaye

2009-03-24 22:07:20

(Last post was 3 months ago and Ron is still kind of active so I don't know if this is grave digging or not.)

I ran this on my script and when I tried to play my script i got the error "Line 26: [Error] (23589:915): 'BEGIN' expected in script ******"

Yes I know you can't post the script on srl that you use this with.

EDIT:

Found a different obfuscator.