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: Send an encypted command

Help for those learning Tcl or writing their own scripts.
Post Reply
k
kennycheung21
Voice
Posts: 10
Joined: Wed Mar 02, 2011 7:22 pm

Help: Send an encypted command

Post by kennycheung21 »

Hi everyone,

I'm wondering how can a user send out an encrypted command to the bot. I mean a user type in an command, then encrypted it before send out to the Bot. so the bot can only received the command encrypted. And the package going through the network is also encrypted.

Please help, I can encrypted an command, but I can just send out the command and let the bot encrypt it after receiving the unencrypted data. Is there any way I can encrypt a DCC command before sending out?

Thanks
Kenny
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Well... you could use the decrypt command to decrypt any incoming, blowfish encrypted, base64 encoded, messages over DCC, msg, etc - provided that your client knows how to encrypt the data in the above mentioned way..

Or, you could use an ssl-enabled eggdrop with an ssl-enabled irc client and use an ssl-encrypted dcc chat link between the both.
NML_375
k
kennycheung21
Voice
Posts: 10
Joined: Wed Mar 02, 2011 7:22 pm

Post by kennycheung21 »

Yeah, I can encrypt and decrypt it without any problem, but this is done by the bot after receiving an unencrypted command. I just don't know how to encrypt it first before I sent it out.

For example, I input the command in the dialog box, then I hit the ENTER, it is sent out without any encryption. What now I can do in tcl script is after the bot receive the plain text then encrypt/decrypt it. So in a word, in this scenario, the message sent out through the internet is still unencrypted before it arrives at the client(Bot).

I don't know how to address this issue.

Thanks
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

As I roughly said in my previous post, you'll have to implement the very same crypto in your irc client, be it blowfish, twofish, rsa, dsa, aes, or other.. (though eggdrop only handles blowfish natively..). How this is done really comes down to the very client in question.

For a more generic solution, ssl - as mentioned - might be a better approach, as it is a well-defined protocol with many pre-written libraries and implementations.
NML_375
k
kennycheung21
Voice
Posts: 10
Joined: Wed Mar 02, 2011 7:22 pm

Post by kennycheung21 »

Could you please give me an example how to encrypt a command before it got send out?

Thanks
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Well, that would be done client-side, and would depend on what languages your client(s) support..

In irssi and X-chat, you could perhaps use the Crypt::CBC, Crypt::Blowfish, and MIME::Base64 packages to implement full blowfish encryption before sending the data to the eggdrop.. But since I don't script in perl, I can't help you much further than that for those clients..

If you're using BitchX, there's a blowfish readily available (actually, I vaugely recall it being ripped from eggdrop), and accessible through Bx's tcl-interpreter. You'll even find a trivial script-pack for Bx/eggdrop to enable encryption along with Bx..

If we're talking mIRC... I have no ideas and could'nt care less (sorry)
NML_375
Post Reply