Author | Post | |||
unknown user |
sure, well I would grately appreciate if you could send me a patch for http://www.bright-shadows.net/forum/forum_showtopic.php?topicid=2604 so that i could decode it in your way. |
|||
02.01.2007 19:04:01 |
|
|||
Phas(retired) |
I'm not good at Qt, but you can get the PHP version: function Decode($ct) { $ct = str_replace(":roll:", "0", $ct); $ct = str_replace("LOL", "1", $ct); $key = "Q 0*/eY\*f.Y,ijYvprCB"; $p = 0; while (strlen($ct)) { $letter = substr($ct, 0, 8); $ct = substr($ct, 8); $key[$p] = chr(bindec($letter)^(ord($key[$p++])-23)); } return $key; } |
|||
02.01.2007 19:41:50 |
|
|||
unknown user |
i fear that the key was damaged in transfer ... also ... that looks a lot like a decryption, and not that much like a decoding. unless if i'm a "QrLLr{c-dmd}üï" |
|||
02.01.2007 21:59:38 |
|
|||
theAnswer |
That's because in Phas' php.ini phasmode = true Change: $key[$p] = chr(bindec($letter)^(ord($key[$p++])-23)); To: $key[$p] = chr(bindec($letter)^(ord($key[$p])-23)); $p++; Must be something with his PHP version (v4). |
|||
02.01.2007 22:10:22 |
|
|||
unknown user |
that's odd, it indeed fixed it... ~/test $ php -v PHP 5.1.6-pl6-gentoo (cli) (built: Oct 28 2006 11:47:34) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies i investigated it a bit, and this is what happens: php evaluates the right hand side first. so by the the time $key[$p] is assigned it's value $p was already incremented ie: $a[0]="A"; $a[1]="B"; $p=0; $a[$p]=$a[$p++]; echo implode("",$a); returns "AA" instead of "AB" |
|||
02.01.2007 22:27:21 |
|
|||
theAnswer |
Well, if you want "AB" use: $a[$p]=$a[++$p]; |
|||
02.01.2007 22:58:49 |
|
|||
unknown user |
o and let me apologize, I probably didn't realize how much time you spent thinking up this original cipher, and taking the time to post this message. I must be such an ass for ruining this mind numbing fun, certainly when there are only 336 other challenges out there, some even with the same trick. Also i would like to apologize everybody sparing them from the disappointment of the actual content. No all the fun aside, I really didn't realize there was actually something to spoil, but I live, I learn I'll never do it again. |
|||
02.01.2007 22:59:00 |
|
|||
aceldama |
wow, respect@rhican |
|||
03.01.2007 08:32:39 |
|
|||
Inferno |
Another perfect example of how a thread can go in a totally different way. Next post totally unrelated to it's topic will be deleted. Including this one, so before I forget: Happy New Year. |
|||
Edited by Inferno on 04.01.2007 11:43:49 | ||||
04.01.2007 11:43:32 |
|
|||
unknown user |
Not to poop on your fun but don't you think the moderation came a bit late ... but perhaps it's best. Let me forfill all your wishes. I wouldn't want to come over as a crybaby or is that what you take me for? Don't feel bad, I'm a pest to all internet fora, ask around you will find that i'm known as "the". Simply because people were to uninspired to find a word for me that was new. Anyhow don't worry i'll be gone in less than a year. Now is this completly unrelated? Perhaps I encoded a secret message. . . |
|||
04.01.2007 15:45:17 |
|