mIRC Homepage
Posted By: pball $encode() and $decode() are they needed? - 15/08/10 07:04 PM
Is there any good reason to have these commands? I know they could be used for something useful but it seems most of the time they are used for exploits.

I just want to see what others think about this.

I've only come across one script that used $decode() and that was for echoing some info like who made it and such which just seemed stupid.
Posted By: hixxy Re: $encode() and $decode() are they needed? - 15/08/10 07:46 PM
Originally Posted By: pball
Is there any good reason to have these commands? I know they could be used for something useful


Seems like you answered your own question... smile
Posted By: pball Re: $encode() and $decode() are they needed? - 15/08/10 09:41 PM
ha ha ha
/sarcasm

I want examples man. I've only seen one lame use of that command before, nothing that made anything easier to do.
Posted By: RusselB Re: $encode() and $decode() are they needed? - 15/08/10 10:43 PM
A fairly common usage that I've seen is for the following safe alias.
Code:
alias safe { return $!decode( $encode($1,m) ,m) }

Originally Posted By: pball
ha ha ha
/sarcasm

I want examples man. I've only seen one lame use of that command before, nothing that made anything easier to do.


Encoding binary data (such as a small image) into text which you can then store in a standard %variable. Or sent over the server to another person as a private message.
Posted By: pball Re: $encode() and $decode() are they needed? - 16/08/10 12:45 AM
thanks
that makes sense
Posted By: argv0 Re: $encode() and $decode() are they needed? - 16/08/10 12:52 AM
Everyone missed the most *obvious* example of $encode.. to encode data using MIME/UUencode encoding.

Web/mail servers often require that certain headers or data is sent as base64 encoded data. base64 is just another name for MIME encoding.

When you send Basic Auth information to a webserver, you're doing so with base64. It looks like this:

Code:
sockwrite -tn $sockname Authorization: Basic $encode(user:pass,m)


Other parts of HTTP require base64 as well. This seems like reason enough to me.
© mIRC Discussion Forums