Encoder and Decoder Tool (base64 - Hex - URL - md5 - Binary - Rot13 - l33t)

Stato
Discussione chiusa ad ulteriori risposte.

Langy

Utente Silver
11 Giugno 2007
148
5
1
83
Finalmente ho terminato il grosso che c'era da fare col mio nuovo tool di encode e decode.

http://www.googlebig.com/sections/Encoder-Decoder-Tool/

Per ora e' possibile codare e decodare:
-Base 64
-Binary
-Hex
-Rot13
-Url
-Uppercase / Lowercase

Ho inserito anche gli algoritmi irreversibili.

Nel caso dell' md5 ho inserito il "try decode" che si collega direttamente al DB di md5crack

FUNZIONI PHP UTILIZZATE:
Codice:
function txt2bin($str) {
			$text_array = explode("\r\n", chunk_split($str, 1));
			for ($n = 0; $n < count($text_array) - 1; $n++) {
			$newstring .= substr("0000".base_convert(ord($text_array[$n]), 10, 2), -8);
			}
			return $newstring;
		}
		 function bin2txt($str) {
		   $text_array = explode("\r\n", chunk_split($str, 8));
		   for ($n = 0; $n < count($text_array) - 1; $n++) {
		     $new_str = $new_str . stripslashes(chr(base_convert($text_array[$n], 2, 10)));
		   }
		   return $new_str;
		 }
		 function hex2bin($str) {
		    $bin = "";
		    $i = 0;
		    do {
		        $bin .= chr(hexdec($str{$i}.$str{($i + 1)}));
		        $i += 2;
		    } while ($i < strlen($str));
		    return $bin;
		}
		function t3xt_2_1337($textfalt)
		{
			$_1337 = array("g" => "9", "c" => "(", "i" => "I", "a" => "4", "b" => "8", "e" => "3", "l" => "1", "o" => "0", "s" => "5", "t" => "7", "å" => "4", "ä" => "'4'", "ö" => "'0'");
			$_1337 = str_replace(array_keys($_1337), array_values($_1337), $textfalt); 
			return $_1337;
		}

FUNZIONI GIA ESISTENTI IN PHP:
Codice:
base64_encode($plaintext)
base64_decode($plaintext)
bin2hex($plaintext);
urlencode($plaintext);
str_rot13($plaintext);
md5($plaintext);
strtoupper($plaintext)
strtolower($plaintext)
 
Un po' come il mio Roberto's Encryption Tool:
http://www.informarts.org/ret

Per il leet avevo fatto uno script per emesene ma non è ovviamente difficile farlo in PHP, anzi :asd:
Per il binario comunque esisteva dec2bin.

Per il Try decode potevi fare una cosa più interessante, potevi fare che si connetteva direttamente al server e poi tramite regex interpretava il risultato. Lo faccio e poi lo faccio, roba da 5 minuti :p
 
Robertof ha detto:
Per il Try decode potevi fare una cosa più interessante, potevi fare che si connetteva direttamente al server e poi tramite regex interpretava il risultato. Lo faccio e poi lo faccio, roba da 5 minuti :p

domani lo faccio!

:]
 
Eccolo, se ti può essere di spunto ;)
PHP:
<?php
$md5crack_searchpage = "http://www.md5crack.com/crackmd5.php";
$term = "9cdfb439c7876e703e307864c9167a15"; // = lol
$fields = "term=".rawurlencode ($term)."&crackbtn=".rawurlencode ("Crack that hash baby!");
// Go
$engine = curl_init (); // Initialize cURL
/* Set some options! */
curl_setopt($engine, CURLOPT_URL, $md5crack_searchpage);
curl_setopt($engine, CURLOPT_HEADER, 0);
curl_setopt($engine, CURLOPT_POST, 1);
curl_setopt($engine, CURLOPT_POSTFIELDS, $fields);
curl_setopt($engine, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($engine, CURLOPT_RETURNTRANSFER, 1);
$exec = curl_exec ($engine); // Exec the request
if (curl_errno ($engine)) die ("Fatal error to get the page: ".curl_error ($engine)); // If there is an error, show it and exit the page.

if (preg_match ("/md5\(\"(.+)\"\)/", $exec, $matches)) { // If can get a hash
	print "Hash {$term} found. The original word is {$matches[1]}";
} else {
	print "No hashes found :(";
}

// Bye bye
?>

PS: Quando ho un po' di tempo da perdere lo faccio con i socket :)
 
Stato
Discussione chiusa ad ulteriori risposte.