hoi,
ich möchte gerne einen MD5-Cracker auf meiner Webseite einbinden. Siehe Code unten. Allerdings frag ich mich noch warum der String "Der Hash ist sicher" immer angezeigt wird, obwohl der Funktion noch kein Wert übergeben wurde. Ich hoffe jemand weiß Rat. Danke.
ich möchte gerne einen MD5-Cracker auf meiner Webseite einbinden. Siehe Code unten. Allerdings frag ich mich noch warum der String "Der Hash ist sicher" immer angezeigt wird, obwohl der Funktion noch kein Wert übergeben wurde. Ich hoffe jemand weiß Rat. Danke.
PHP:
{php}function hashkiller_check_md5($md5)
{
// Config:
$timeout = 5; // Seconds
//-----------------------------
// Do not edit below here!
//-----------------------------
// Reject if its no correct md5 hash
if(!preg_match('/[A-Fa-f0-9]{32}$/',$md5)) return false;
// Try to set timeout
// May not work everywhere but lets try
@ini_set('default_socket_timeout', $timeout);
// Get result from hashkiller.com API
$result = @file('http://hashkiller.com/api/api.php?md5='.$md5);
// Handle timeouts and errors
if (!$result) return false;
$result = implode('', $result);
// Found in database??
if (strpos($result, '<found>false</found>')) return false;
// Extract plain for the Hash
$preg = preg_match('@<plain>(.+)</plain>@', $result, $match);
if ($preg == 1)
{
// Plain correct?
if (md5($match['1']) == $md5)
{
return $match['1'];
}
else
{
return false;
}
}
else
{
return false;
}
}{/php}
<table width="90%">
<tr>
<td>
<p>Bitte geben sie ihren MD5-Hash hier ein.</p>
<form action='http://kip.x8.to/joomla/index.php?option=com_content&view=category&layout=blog&id=36&Itemid=31' method='post' enctype='multipart/form-data'>
<table cellpadding="5">
<tr>
<td><input name='md5' type='text' size='30' /></td>
<td><input class="button" type='submit' value='Súchen' /></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
{php}
$md5 = $_POST['md5'];
if(hashkiller_check_md5($md5) == true)
{
$fuck = implode ('', file ('http://hashkiller.com/api/api.php?md5='.$md5));
$shit = explode(' ', $fuck);
echo '<br />';
echo 'Der Hash ( '.$shit[5].') ist nicht sicher!<br />';
echo 'Entschlüsselter Hash: '.$shit[4];
}
elseif(hashkiller_check_md5($md5) == false)
{
echo 'Der Hash ist sicher!';
}
else { echo '<br />';}
{/php}
<br />
<br />
<p><i>sponsered by http://hashkiller.com</i></p>)