mIRC Home    About    Download    Register    News    Help

Print Thread
#196622 20/03/08 05:16 PM
Joined: Sep 2007
Posts: 109
K
kwell Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Sep 2007
Posts: 109
A variable saves me a password, you can encrypt the variable so it can not be vizualizar At A Glance ?

kwell #196628 20/03/08 06:53 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
In theory a variable can never be encrypted it can always be viewed. Weither you $encode your password it can always be viewed.

The only thing I can think that comes to mind is maybe making a small algorhitm with hash routine in your script but then again mIRC might not allow you to go that far unless you use a .dll


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
kwell #196657 21/03/08 07:57 AM
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Since you say "at a glance" you can just use:
Code:
set %var $encode(password,m)

For instance, that will encode the word "password" to "cGFzc3dvcmQ=", so people looking at it won't see what it says unless they do $decode(cGFzc3dvcmQ=,m)

kwell #196658 21/03/08 08:31 AM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
If you're the owner of the password then you can't do the following but if you're receiving passwords from users (as a bot) for comparison to a master password, you can $md5 or $crc the stored master value and then compare it to the respective $md5 or $crc of the input.

There's also $base(hello,36,20) and then to revert it do $base(<encodedvalue>,20,36) but this will only work if you use *case-insensitive* alphanumeric passwords (a-z and 0-9). The "20" can be pretty much any positive integer under 36, btw-- the further it is from 36 the more the password will change, but the bigger the resulting output string will be


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
kwell #196664 21/03/08 03:27 PM
Joined: Sep 2007
Posts: 109
K
kwell Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Sep 2007
Posts: 109
Thank you, I was most helpful !!

kwell #196667 21/03/08 03:50 PM
Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
Originally Posted By: kwell
Thank you, I was most helpful !!


hey there's no need to rub it in


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde

Link Copied to Clipboard