egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Encrypt
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Dec 23, 2005 11:12 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
lsn
Voice


Joined: 19 Jul 2004
Posts: 25

PostPosted: Fri Dec 23, 2005 11:51 am    Post subject: Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Dec 24, 2005 10:03 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
]Kami[
Owner


Joined: 24 Jul 2003
Posts: 590
Location: Slovenia

PostPosted: Sat Dec 24, 2005 2:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
KrzychuG
Master


Joined: 16 Aug 2003
Posts: 306
Location: Torun, Poland

PostPosted: Sat Dec 24, 2005 3:26 pm    Post subject: Reply with quote

Actually you can use any editor which can save files in UNIX format (for example MED or Editplus for Windows).
_________________
Que?
Back to top
View user's profile Send private message Visit poster's website
lsn
Voice


Joined: 19 Jul 2004
Posts: 25

PostPosted: Mon Dec 26, 2005 2:56 pm    Post subject: Reply with quote

Seems like i finally done it. thanks Cool
Back to top
View user's profile Send private message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Sun Sep 17, 2006 10:28 am    Post subject: Re: Maybe a bit too late... :) Reply with quote

user wrote:
...

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
View user's profile Send private message Visit poster's website
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Sun Sep 17, 2006 3:13 pm    Post subject: Reply with quote

Update your TCL version, 8.0 is old.
Back to top
View user's profile Send private message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Sun Sep 17, 2006 4:20 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Mon Sep 18, 2006 11:32 am    Post subject: I love having to support old proof of concept code Reply with quote

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. Laughing
_________________
Have you ever read "The Manual"?
Back to top
View user's profile Send private message
Serban
Voice


Joined: 29 Nov 2005
Posts: 3
Location: NASA

PostPosted: Thu Apr 19, 2007 9:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Fri Apr 20, 2007 9:08 am    Post subject: Reply with quote

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 Smile
_________________
Have you ever read "The Manual"?
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Fri Apr 20, 2007 3:11 pm    Post subject: Reply with quote

Or be lazy and keep 1 unencrypted copy for editting, then run it through the encryption to make a new copy.
Back to top
View user's profile Send private message
Riddler
Halfop


Joined: 20 May 2007
Posts: 60
Location: Brasov, Romania

PostPosted: Sun May 20, 2007 10:51 pm    Post subject: Reply with quote

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 Very HappyVery Happy thank you user for the method Cool you have a beer from me Laughing Laughing
_________________
I am a man of few words, but many riddles
Back to top
View user's profile Send private message Send e-mail Visit poster's website
while
Voice


Joined: 11 Jul 2009
Posts: 34
Location: beat mort

PostPosted: Fri Jun 04, 2010 4:32 pm    Post subject: Re: Maybe a bit too late... :) Reply with quote

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
_________________
Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber