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?
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.
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).
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.
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)