Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
What are mean things...
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Detox" data-source="post: 259813" data-attributes="member: 596"><p>How would I find my n/e/d keys? and this is my banner.php</p><p></p><p>I changed the Prime and Generator keys</p><p>@[USER=591]Sledmore[/USER]</p><p>[PHP]<?php</p><p></p><p>/*</p><p>*****************</p><p>* @author capos *</p><p>*****************</p><p>*/</p><p></p><p>$width = 100;</p><p>$height = 114;</p><p></p><p>function buildimg($bytes, $width, $height)</p><p>{</p><p> $img=imagecreatetruecolor($width, $height);imagealphablending($img, false);imagesavealpha($img, true);$x=0;$y=0;</p><p> $colors=unpack("N*", $bytes);</p><p> foreach($colors as $color)</p><p> {</p><p> imagesetpixel($img, $x, $y, (0x7f-($color>>25)<<24)|($color&0xffffff));</p><p> if(++$x==$width)</p><p> {$x=0;$y++;}</p><p> }</p><p> header('Content-Type: image/png');</p><p> imagepng($img);</p><p>}</p><p></p><p>$pixels = file_get_contents('./banner.txt'); // the banner pixels</p><p></p><p>if($_GET)</p><p>{</p><p> $token = trim($_GET["token"]);</p><p> if(strlen($token) >= 10)</p><p> {</p><p> // Stuff to connect to mus and get banner data.. (prime and generator)</p><p> /*$fp = fsockopen("127.0.0.1", 30000, $errno, $errstr, 1);</p><p> if (!is_resource($fp))</p><p> {</p><p> exit("LE FAIL...");</p><p> }</p><p> </p><p> $packet = '0'.chr(1).$token;</p><p></p><p> fwrite($fp, $packet);</p><p> fflush($fp);</p><p> </p><p> stream_set_timeout($fp, 1);</p><p> $data = fgets($fp, 512);</p><p> list($prime, $generator) = explode(':', $data);</p><p> fclose($fp);*/</p><p> </p><p> $prime = '1443333365574086635562623176740968262939106259281338539110827';</p><p> $generator = '824827513999001055484330447115198127824256892964722983737957';</p><p></p><p> $insert = chr(strlen($prime)).$prime.chr(strlen($generator)).$generator;</p><p> $Length = strlen($token);$Length2 = strlen($insert);</p><p> $p = 0;$bitsnum = "";</p><p> for($i=0;$i<$Length2;$i++)</p><p> {</p><p> $bits = base_convert(ord($insert[$i]) ^ ord($token[$p]),10,2);</p><p> $need = 8 - strlen($bits);</p><p> for($o=0;$o<$need;$o++)$bits = "0".$bits;</p><p> $bitsnum .= $bits;</p><p> if (++$p == $Length) $p = 0;</p><p> }</p><p> $insertpos = 0;$Length = strlen($bitsnum);</p><p> for ($y = 39; $y < 69; $y++)</p><p> {</p><p> $a = 0;</p><p> for ($r = 4; $r < 84; $r++)</p><p> {</p><p> $pos = (($y + $a) * $width + $r) * 4;</p><p> $b = 1;</p><p> while ($b < 4)</p><p> {</p><p> if($insertpos < $Length)</p><p> {</p><p> $binaryData = base_convert(ord($pixels[$pos + $b]),10,2);</p><p> $need = 8 - strlen($binaryData);</p><p> for($o=0;$o<$need;$o++) $binaryData = "0".$binaryData;</p><p> $binaryData[7] = $bitsnum[$insertpos];</p><p> $pixels[$pos + $b] = chr(base_convert($binaryData,2,10));</p><p> $insertpos++;$b++;</p><p> continue;</p><p> }</p><p> break 3;</p><p> }</p><p> if ($r % 2 == 0) $a++;</p><p> }</p><p> }</p><p> </p><p> }</p><p>}</p><p>buildimg($pixels, $width, $height);</p><p>?>[/PHP]</p></blockquote><p></p>
[QUOTE="Detox, post: 259813, member: 596"] How would I find my n/e/d keys? and this is my banner.php I changed the Prime and Generator keys @[USER=591]Sledmore[/USER] [PHP]<?php /* ***************** * @author capos * ***************** */ $width = 100; $height = 114; function buildimg($bytes, $width, $height) { $img=imagecreatetruecolor($width, $height);imagealphablending($img, false);imagesavealpha($img, true);$x=0;$y=0; $colors=unpack("N*", $bytes); foreach($colors as $color) { imagesetpixel($img, $x, $y, (0x7f-($color>>25)<<24)|($color&0xffffff)); if(++$x==$width) {$x=0;$y++;} } header('Content-Type: image/png'); imagepng($img); } $pixels = file_get_contents('./banner.txt'); // the banner pixels if($_GET) { $token = trim($_GET["token"]); if(strlen($token) >= 10) { // Stuff to connect to mus and get banner data.. (prime and generator) /*$fp = fsockopen("127.0.0.1", 30000, $errno, $errstr, 1); if (!is_resource($fp)) { exit("LE FAIL..."); } $packet = '0'.chr(1).$token; fwrite($fp, $packet); fflush($fp); stream_set_timeout($fp, 1); $data = fgets($fp, 512); list($prime, $generator) = explode(':', $data); fclose($fp);*/ $prime = '1443333365574086635562623176740968262939106259281338539110827'; $generator = '824827513999001055484330447115198127824256892964722983737957'; $insert = chr(strlen($prime)).$prime.chr(strlen($generator)).$generator; $Length = strlen($token);$Length2 = strlen($insert); $p = 0;$bitsnum = ""; for($i=0;$i<$Length2;$i++) { $bits = base_convert(ord($insert[$i]) ^ ord($token[$p]),10,2); $need = 8 - strlen($bits); for($o=0;$o<$need;$o++)$bits = "0".$bits; $bitsnum .= $bits; if (++$p == $Length) $p = 0; } $insertpos = 0;$Length = strlen($bitsnum); for ($y = 39; $y < 69; $y++) { $a = 0; for ($r = 4; $r < 84; $r++) { $pos = (($y + $a) * $width + $r) * 4; $b = 1; while ($b < 4) { if($insertpos < $Length) { $binaryData = base_convert(ord($pixels[$pos + $b]),10,2); $need = 8 - strlen($binaryData); for($o=0;$o<$need;$o++) $binaryData = "0".$binaryData; $binaryData[7] = $bitsnum[$insertpos]; $pixels[$pos + $b] = chr(base_convert($binaryData,2,10)); $insertpos++;$b++; continue; } break 3; } if ($r % 2 == 0) $a++; } } } } buildimg($pixels, $width, $height); ?>[/PHP] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
What are mean things...
Top