mIRC Home    About    Download    Register    News    Help

Print Thread
#49368 14/09/03 06:49 AM
Joined: Jan 2003
Posts: 52
L
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2003
Posts: 52
/set %test ST,m#r3)Ewny*QKLk0&bq0*)%6L95h,62bEL8tyqj9Z10Hc7PiRmrcyYcIrr1sR32D

//echo -a $md5(%test)

for me it returns: 1b760d965e79af72d8d7f946c585b3e6
other md5 hash generators return (which is should be): 1e37c30052a2764298cf2805fcc267f5

Either I am making a mistake, or the $md5() function is generating the hash incorrectly.


edit: After some more testing, it seems only hashes with % in the text come out wrong, even if set through a variable as the above example, which in theory should work fine because the % should be treated as plain text and not a variable...

comments, ideas?

Last edited by lordares; 14/09/03 07:09 AM.
#49369 14/09/03 06:55 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
I can't reproduce this on 6.1 or 6.03.

#49370 14/09/03 07:06 AM
Joined: Jan 2003
Posts: 52
L
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2003
Posts: 52
Did it for both of those for me with Remotes OFF

System: XP Service Pack 1

#49371 14/09/03 07:12 AM
Joined: Dec 2002
Posts: 12
G
Pikka bird
Offline
Pikka bird
G
Joined: Dec 2002
Posts: 12
$md5(text|&binvar|filename,[N])
Returns md5 hash value for the specified data, where N = 0 for plain text (default), 1 for &binvar, 2 for filename.

Don't put the character "," if you'll put something different of 0, 1 or 2.

/set %test te,st
//echo -a $md5(%test)
will returns:
9cfd05a790a462d5cbad1dda35e3f8dc

//echo -a $md5(te,st)
will return:
569ef72642be0fadd711d6a468d68ee1

//echo -a $md5(te)
will return:
569ef72642be0fadd711d6a468d68ee1

* I'm using mIRC 6.03.

#49372 14/09/03 07:14 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
The comma doesn't matter since it is in a variable.

#49373 14/09/03 07:51 AM
Joined: Jan 2003
Posts: 52
L
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2003
Posts: 52
Its the % char causing the problem for sure, all other hashes come out correctly.

#49374 14/09/03 08:14 AM
Joined: Jan 2003
Posts: 150
J
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
Yep

php md5(just%test) --- d41d8cd98f00b204e9800998ecf8427e
mIRC $md5(just%test) - a0c20c3b6f0c5127d629c13d5b3feec9

php md5("just test") -- e7ab31147f7524fb34e2a32beb896d82
mIRC $md5(just test) - e7ab31147f7524fb34e2a32beb896d82


Go ahead, jump. 100,000 lemmings can't be wrong.
#49375 14/09/03 08:59 AM
Joined: Jan 2003
Posts: 52
L
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2003
Posts: 52
//echo -a $md5(ABCDEF,0) $md5(ABC%DEF,0)
-Same

//echo -a $md5(ABCXYZ,0) $md5(ABC%XYZ,0)
-Second hash changes randomly

//echo -a $md5(ABCDEF,0) $md5(ABC%DEF,0) $md5(ABC%%DEF,0)
8827a41122a5028b9808c7bf84b9fcf6 8827a41122a5028b9808c7bf84b9fcf6 499f3282711728688c924228353485eb

the second $md5 should return what the third $md5 returned.

%% was evalled as % and % is evalled as NULL, so it seems.



Khaled get on this please :>

Last edited by lordares; 14/09/03 09:03 AM.
#49376 14/09/03 09:09 AM
Joined: Feb 2003
Posts: 2,810
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,810
passing &binvars also seems drasticly fubared, returning incorrect results for ALL strings, containing % or not.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#49377 14/09/03 09:21 AM
Joined: Jan 2003
Posts: 150
J
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
that's weird shocked


Go ahead, jump. 100,000 lemmings can't be wrong.
#49378 14/09/03 09:31 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Now you've edited your post yes I can reproduce it.

#49379 14/09/03 09:33 AM
Joined: Jan 2003
Posts: 52
L
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2003
Posts: 52
haha, all I did was add the "edit:" text on the bottom.

#49380 14/09/03 09:36 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
If you say so, but I was sure it read differently before..

Last edited by Collective; 14/09/03 09:42 AM.

Link Copied to Clipboard