| View previous topic :: View next topic |
| Author |
Message |
BiLL Halfop
Joined: 26 Sep 2001 Posts: 78 Location: Germany
|
Posted: Tue Apr 29, 2003 5:03 pm Post subject: Eggdrop Blow Encryption |
|
|
Hi,
is it possible to encrypt EVERYTHING what an eggdrop say's in a special chan? For mIRC I've an addon - BlowCrypt - there I can set a special key for every chan and it get's encrypter and auto decrypted. I need this in TCL for eggdrop - where I can an special key for the chan too.
Is there such script out? |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Tue Apr 29, 2003 7:17 pm Post subject: |
|
|
The short answer is "no".
The long answer is...
Eggdrop has no clue about what channel you're sending messages to, so you'd have to rewrite the internal output commands to parse everything sent to the server.
This sounds like a bad idea to me. I get the feeling you're after encrypting messages sent by a script, and that would be much easier. Just change every line that makes some output to your channel to call your encryption/output proc. I bet your decryption is based on some keyword at the start of every message to determine that it's an encrypted string, so that would make it easy for the eggdrop to pick up these lines and decrypt them for you.
Now there's only one problem left; the actual encrypt/decrypt function. If it's compatible with eggdrop's own blowfish encryption (even using the same salts), no problem. If not: start reading the source of that addon (it's open source, right?) |
|
| Back to top |
|
 |
BiLL Halfop
Joined: 26 Sep 2001 Posts: 78 Location: Germany
|
Posted: Thu Aug 21, 2003 10:59 pm Post subject: |
|
|
I just saw an eggdrop with blow encryption.
How is that possible?
I searched around the web but didn't find any public script ;-(. |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Fri Aug 22, 2003 3:08 pm Post subject: |
|
|
Actualy is possible to encrypt EVERYTHING what the eggdrop says in a special channel by using the encrypt to encrypt and decrypt to.. doh!  _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
BiLL Halfop
Joined: 26 Sep 2001 Posts: 78 Location: Germany
|
Posted: Fri Aug 22, 2003 5:22 pm Post subject: |
|
|
Ok great, got it working right now.
But the problem is it doesnt decrypt my input. So when i try to do !hello it wont respond cause I am sending with blowcrypt. How can I make the bot that it will decrypt my message and will execute the proc for !hello ?
Thanks. |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Fri Aug 22, 2003 6:41 pm Post subject: |
|
|
| use a 'pubm' bind (with the channel name included in the mask to avoid having to decrypt EVERY public message recieved by the bot) and call the other procs after decrypting the message and extracting the command part. |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Sat Aug 23, 2003 1:19 am Post subject: |
|
|
Why do you want to encrypt the commands? Sound silly to me.. _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
BiLL Halfop
Joined: 26 Sep 2001 Posts: 78 Location: Germany
|
Posted: Sat Aug 23, 2003 8:56 am Post subject: |
|
|
No,
you got me wrong.
When someone sends the public command with blowfish encyption THEN the bot WONT reply, cause it couldnt decrypt the input (so it couldnt read it correctly). I will try that way which "user" told me this evening. I think that will do it . |
|
| Back to top |
|
 |
BiLL Halfop
Joined: 26 Sep 2001 Posts: 78 Location: Germany
|
Posted: Sat Aug 23, 2003 9:30 pm Post subject: |
|
|
Damn, it is not that easy as I thought.
set key "asdf"
bind pubm - "#mychan *" decryptall
proc decryptall { nick uhost handle chan arg } {
global key
set arg [decrypt $key "$arg"]
putserv "PRIVMSG $chan :arg = $arg"
return 0
}
It won't decrypt the input correctly.
If I sent a TEXT WITH BLOWFISH (same key!) the bot will not decrypt the text correctly. Why? I am using same keys!
The interesting thing is that I CAN read the encrypted messages of the bot with my blowfish script for mIRC. So I thought eggdrop/mircblowfish got the same salts. But it doesn't look like that now in the decrypt function. Maybe I am doing something wrong ? Can anyone help me? PLEASE ! |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Aug 24, 2003 6:38 am Post subject: |
|
|
just a thought, try spliting the $arg or specifying first word ? _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
BiLL Halfop
Joined: 26 Sep 2001 Posts: 78 Location: Germany
|
Posted: Mon Aug 25, 2003 2:43 pm Post subject: |
|
|
set text [decrypt $blowkey [string range $arg 4 9999]]
that worked - thanks all! |
|
| Back to top |
|
 |
|