This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Fri Dec 23, 2005 11:12 am
The code you want to be obfuscated should be between #OBF and #/OBF. See user's example.
lsn
Voice
Posts: 25 Joined: Mon Jul 19, 2004 8:11 am
Post
by lsn » Fri Dec 23, 2005 11:51 am
ok, i tryied to do the exact code of user
Code: Select all
proc demobf args {
#OBF
return "Hello world"
#/OBF
}
and i get exacly the same error
Code: Select all
[17:49:01 lsn@*** ~]$ tclsh8.4 tcl x.tcl z.tcl
0 parts obfuscated.
[17:49:17 lsn@*** ~]$ cat z.tcl
proc demobf args {
#OBF
return "Hello world"
#/OBF
}
Sugestions ?
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sat Dec 24, 2005 10:03 am
Just tried it on my shell and it worked perfectly. Saved the code to obf.tcl and the code that I wanted to obfuscate to obfex.tcl:
Code: Select all
Fz@core:~$ tclsh8.4 obf.tcl obfex.tcl obfex2.tcl
1 part obfuscated.
Fz@core:~$ cat obfex2.tcl
proc demobf args {
\u75\u70\x6c\x65\u76\u65\u6c \60 [\x73\164\x72\151\x6e\x67 \155\141\160 {{ } o d n w l r H l w H u o e e d u t n {"} t r {"} { }} {"""touHtd"nroww "l twen}]
}
]Kami[
Owner
Posts: 590 Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:
Post
by ]Kami[ » Sat Dec 24, 2005 2:37 pm
Don't use notepad or any similar editor use pico or nano.
I had problems when i was using notepad
KrzychuG
Master
Posts: 306 Joined: Sat Aug 16, 2003 2:51 pm
Location: Torun, Poland
Contact:
Post
by KrzychuG » Sat Dec 24, 2005 3:26 pm
Actually you can use any editor which can save files in UNIX format (for example MED or Editplus for Windows).
Que?
lsn
Voice
Posts: 25 Joined: Mon Jul 19, 2004 8:11 am
Post
by lsn » Mon Dec 26, 2005 2:56 pm
Seems like i finally done it. thanks
iamdeath
Master
Posts: 323 Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:
Post
by iamdeath » Sun Sep 17, 2006 10:28 am
user wrote: ...
I am getting this error:
I saved your code in encrypt.tcl
l.tcl contains:
Code: Select all
proc demobf args {
#OBF
return "Hello world"
#/OBF
}
Code: Select all
[cricket@bell(~/eggdrop)] $ tclsh8.0 encrypt.tcl l.tcl l1.tcl
wrong # args: should be "string first string1 string2"
Can you please explain more how it works, I did'nt get you I am sorry.
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Sun Sep 17, 2006 3:13 pm
Update your TCL version, 8.0 is old.
iamdeath
Master
Posts: 323 Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:
Post
by iamdeath » Sun Sep 17, 2006 4:20 pm
Okay tclsh8.4 upgraded this time it does'nt encrypt, creates output.tcl but does'nt encrypts that.
Code: Select all
[cricket@bell(~/eggdrop)] $ tclsh8.4 encrypt.tcl l.tcl l2.tcl
0 parts obfuscated.
Where l.tcl is:
Code: Select all
proc demobf args {
#OBF
return "Hello world"
#/OBF
}
and l2.tcl is:
Code: Select all
proc demobf args {
#OBF
return "Hello world"
#/OBF
}
Ok, I also tried 2nd shell but same thing:
[
Code: Select all
mad@pluto (~/eggy)]$ tclsh8.4 obs.tcl test.tcl test1.tcl
0 parts obfuscated.
[mad@pluto (~/eggy)]$ cat test.tcl
proc demobf args {
#OBF
return "Hello world"
#/OBF
}
[mad@pluto (~/eggy)]$ cat test1.tcl
proc demobf args {
#OBF
return "Hello world"
#/OBF
}
[mad@pluto (~/eggy)]$
Can you please suggest more.
Thanks
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Mon Sep 18, 2006 11:32 am
Code: Select all
proc OBF {infile {outfile {}} {A "#OBF\n"} {B "\n#/OBF\n"}} {
- notice the \n's - if you have \r\n or just \r in your file, these patterns won't match.
Save the script you want to obfuscate (there's no encryption involved) using UNIX line breaks (aka LF, aka \n)
...or change the default argument values of A and B in the OBF proc to match your messed up world
...or find something better to do - this script is pretty useless IMO.
Have you ever read "The Manual"?
Serban
Voice
Posts: 3 Joined: Tue Nov 29, 2005 1:50 pm
Location: NASA
Post
by Serban » Thu Apr 19, 2007 9:16 pm
superb!
only one question: let's say i obfuscated a script and i want to deobfuscate it so i can edit it. how?
IRC is bad for your health.
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Fri Apr 20, 2007 9:08 am
Serban wrote: let's say i obfuscated a script and i want to deobfuscate it so i can edit it. how?
Learn
Tcl , then read the first couple of words in the obfuscated code, think for a second and you'll know
Have you ever read "The Manual"?
rosc2112
Revered One
Posts: 1454 Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania
Post
by rosc2112 » Fri Apr 20, 2007 3:11 pm
Or be lazy and keep 1 unencrypted copy for editting, then run it through the encryption to make a new copy.
Riddler
Halfop
Posts: 60 Joined: Sun May 20, 2007 10:20 pm
Location: Brasov, Romania
Contact:
Post
by Riddler » Sun May 20, 2007 10:51 pm
rosc2112 wrote: Or be lazy and keep 1 unencrypted copy for editting, then run it through the encryption to make a new copy.
Don`t matter at long as the script works very good
:D thank you
user for the method
you have a beer from me
I am a man of few words, but many riddles
while
Voice
Posts: 34 Joined: Sat Jul 11, 2009 9:05 am
Location: beat mort
Post
by while » Fri Jun 04, 2010 4:32 pm
user wrote: ...
srry to reopen an old topic. one question: the script work very well if the #OBC is inside the proc, but if I put it before the proc smth:smth {....} it doesen't crypt the proc. Is there a way to make it work like that? thanks