| View previous topic :: View next topic |
| Author |
Message |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Dec 23, 2005 11:12 am Post subject: |
|
|
The code you want to be obfuscated should be between #OBF and #/OBF. See user's example. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
lsn Voice
Joined: 19 Jul 2004 Posts: 25
|
Posted: Fri Dec 23, 2005 11:51 am Post subject: |
|
|
ok, i tryied to do the exact code of user | Code: | proc demobf args {
#OBF
return "Hello world"
#/OBF
} |
and i get exacly the same error
| Code: |
[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 ? |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Dec 24, 2005 10:03 am Post subject: |
|
|
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: | 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}]
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
]Kami[ Owner

Joined: 24 Jul 2003 Posts: 590 Location: Slovenia
|
Posted: Sat Dec 24, 2005 2:37 pm Post subject: |
|
|
Don't use notepad or any similar editor use pico or nano.
I had problems when i was using notepad _________________ Slovene Eggdrop Page |
|
| Back to top |
|
 |
KrzychuG Master

Joined: 16 Aug 2003 Posts: 306 Location: Torun, Poland
|
Posted: Sat Dec 24, 2005 3:26 pm Post subject: |
|
|
Actually you can use any editor which can save files in UNIX format (for example MED or Editplus for Windows). _________________ Que? |
|
| Back to top |
|
 |
lsn Voice
Joined: 19 Jul 2004 Posts: 25
|
Posted: Mon Dec 26, 2005 2:56 pm Post subject: |
|
|
Seems like i finally done it. thanks  |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Sun Sep 17, 2006 10:28 am Post subject: Re: Maybe a bit too late... :) |
|
|
I am getting this error:
I saved your code in encrypt.tcl
l.tcl contains:
| Code: | proc demobf args {
#OBF
return "Hello world"
#/OBF
} |
| Code: | [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. |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Sun Sep 17, 2006 3:13 pm Post subject: |
|
|
| Update your TCL version, 8.0 is old. |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Sun Sep 17, 2006 4:20 pm Post subject: |
|
|
Okay tclsh8.4 upgraded this time it does'nt encrypt, creates output.tcl but does'nt encrypts that.
| Code: | [cricket@bell(~/eggdrop)] $ tclsh8.4 encrypt.tcl l.tcl l2.tcl
0 parts obfuscated. |
Where l.tcl is:
| Code: | proc demobf args {
#OBF
return "Hello world"
#/OBF
} |
and l2.tcl is:
| Code: | proc demobf args {
#OBF
return "Hello world"
#/OBF
} |
Ok, I also tried 2nd shell but same thing:
[ | Code: | 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 |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Mon Sep 18, 2006 11:32 am Post subject: I love having to support old proof of concept code |
|
|
| Code: | | 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"? |
|
| Back to top |
|
 |
Serban Voice
Joined: 29 Nov 2005 Posts: 3 Location: NASA
|
Posted: Thu Apr 19, 2007 9:16 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Fri Apr 20, 2007 9:08 am Post subject: |
|
|
| 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"? |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Fri Apr 20, 2007 3:11 pm Post subject: |
|
|
| Or be lazy and keep 1 unencrypted copy for editting, then run it through the encryption to make a new copy. |
|
| Back to top |
|
 |
Riddler Halfop
Joined: 20 May 2007 Posts: 60 Location: Brasov, Romania
|
Posted: Sun May 20, 2007 10:51 pm Post subject: |
|
|
| 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  thank you user for the method you have a beer from me  _________________ I am a man of few words, but many riddles |
|
| Back to top |
|
 |
while Voice
Joined: 11 Jul 2009 Posts: 34 Location: beat mort
|
Posted: Fri Jun 04, 2010 4:32 pm Post subject: Re: Maybe a bit too late... :) |
|
|
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 _________________
 |
|
| Back to top |
|
 |
|