\n"; $counter = 0; $sum = 0; for ($i=0; $i<256; $i++) $keytable[$i] = sprintf("%02X", $keytable[$i] & 0xff); } //========================================================================================================== function xorr($bufbin) { global $keytable, $state, $counter, $sum; $cccam = array("C","C","c","a","m"); $buf = array(); $out = ""; for ($i=0; $i\n"; } else { $server_packet_count = 0; $data = fread($fp, 256); //printf("Got packet %d from server with length of %d.
\n", $server_packet_count, strlen($data)); if (trim($data != "")) { $packet_valid = check_connect_checksum($data, strlen($data)); if (!$packet_valid) { echo "Checksum of connection packet is not valid!
\n"; } else { //echo "got seed from server: " . strToHex($data) . "
\n"; //echo "Checksum of connection packet is valid.
\n"; $data = xorr($data); //echo "seed xor = $data
\n"; $data = HexToBin($data); $enc_key = strtoupper(sha1($data)); //echo "Using this encryption key: " . $enc_key . "
\n"; $enc_key = HexToBin($enc_key); initialize_encryption($enc_key, strlen($enc_key)); $decrypt_seed = decrypt($data, strlen($data)); //echo "decrypt = " . $decrypt_seed . "
\n"; $decrypt_seed = HexToBin($decrypt_seed); initialize_encryption($decrypt_seed, strlen($decrypt_seed)); $decrypt_hash = decrypt($enc_key, strlen($enc_key)); //echo "decrypt hash = " . $decrypt_hash . "
\n"; $decrypt_hash = HexToBin($decrypt_hash); $encrypt_hash = encrypt($decrypt_hash, strlen($decrypt_hash)); //echo "encrypt hash = " . $encrypt_hash . "
\n"; $encrypt_hash = HexToBin($encrypt_hash); if (strlen($USR) > 20 || strlen($USR) == 0) { echo "

Error: username too big or empty!


\n"; } else { $username = array(); $user = ""; for ($i=0; $i<20; $i++) $username[$i] = "00"; for ($i=0; $i\n"; $userenc = HexToBin($userenc); $password = encrypt($PASS, strlen($PASS)); //echo "password = $password
\n"; $password = HexToBin($password); $cccam = encrypt("CCcam" . "\x00", 6); //echo "cccam = $cccam
\n"; $cccam = HexToBin($cccam); fwrite($fp, $encrypt_hash); fwrite($fp, $userenc); fwrite($fp, $cccam); $data = fread($fp, 256); if (trim($data) != "") { if (!strstr(HexToBin(decrypt($data, strlen($data))), "CCcam")) { echo "FTF this can not give string CCcam??? Anybody have idea where I missing this???
\n"; echo "Probably I can not move further since decryption seed is not changed corectly and I can not send more commands???
\n"; echo "Decription seed must give string CCcam but I can not get it now :( Login is cucced but no more commands after login :(
\n"; } echo "

User: " . $user . " ( login succed! )


\n"; } else { echo "

User: " . $user . " ( login failed! )


\n"; } $server_packet_count++; } if ($fp) fclose($fp); } } else { echo "

Reaply null bytes!


\n"; } } ?>