因此,这里有一个网站(http://md5decrypter.co.uk),它会在给定md5散列的情况下,尝试返回原始字符串。
有没有API,或者有人制作了一个PHP类来使用它?我找不到..。
在此之前,你会问,让我向你保证,我没有恶意。
提前谢谢你。
发布于 2012-04-20 03:20:58
即使md5decryptor的人很好,他也不会因为你的请求就让你通过超文本传输协议访问他的资产。和其他任何人一样,你可以使用公开可用的you界面,它需要验证码--它可以说出一切。
或者简而言之:不,没有PHP。
但是,你为什么不运行自己的呢?这是相当琐碎的:
$decryptors = array('Google', 'Gromweb');
foreach ($hashes as $hash) {
echo "$hash";
foreach($decryptors as $decrytor)
{
if (NULL !== ($plain = MD5Decryptor::plain($hash, $decrytor))) {
echo " - found: $plain ($decrytor)";
break;
}
}
echo "\n";
}输出:
fcf1eed8596699624167416a1e7e122e - found: octopus (Google)
bed128365216c019988915ed3add75fb - found: passw0rd (Google)
d0763edaa9d9bd2a9516280e9044d885 - found: monkey (Google)
dfd8c10c1b9b58c8bf102225ae3be9eb - found: 12081977 (Google)
ede6b50e7b5826fe48fc1f0fe772c48f - found: 1q2w3e4r5t6y (Google)那些你不能直接查找的内容,你可以手动粘贴到该站点。请记住,如果更多的人像你一样思考,越来越多的网站将会关闭(其中大多数已经关闭)。
abstract class MD5Decryptor
{
abstract public function probe($hash);
public static function plain($hash, $class = NULL)
{
if ($class === NULL) {
$class = get_called_class();
} else {
$class = sprintf('MD5Decryptor%s', $class);
}
$decryptor = new $class();
if (count($hash) > 1) {
foreach ($hash as &$one) {
$one = $decryptor->probe($one);
}
} else {
$hash = $decryptor->probe($hash);
}
return $hash;
}
public function dictionaryAttack($hash, array $wordlist)
{
$hash = strtolower($hash);
foreach ($wordlist as $word) {
if (md5($word) === $hash)
return $word;
}
}
}
abstract class MD5DecryptorWeb extends MD5Decryptor
{
protected $url;
public function getWordlist($hash)
{
$list = FALSE;
$url = sprintf($this->url, $hash);
if ($response = file_get_contents($url)) {
$list[$response] = 1;
$list += array_flip(preg_split('/\s+/', $response));
$list += array_flip(preg_split('/(?:\s|\.)+/', $response));
$list = array_keys($list);
}
return $list;
}
public function probe($hash)
{
$hash = strtolower($hash);
return $this->dictionaryAttack($hash, $this->getWordlist($hash));
}
}
class MD5DecryptorGoogle extends MD5DecryptorWeb
{
protected $url = 'http://www.google.com/search?q=%s';
}
class MD5DecryptorGromweb extends MD5DecryptorWeb
{
protected $url = 'http://md5.gromweb.com/query/%s';
}发布于 2012-04-19 16:01:15
BozoCrack是一个非常简单的ruby脚本,它使用google作为彩虹盘,并且非常擅长破解无盐MD5密码。看一下代码,把它移植到PHP应该不会太难。
PS:每个使用无盐MD5作为密码散列算法的人都应该破解他的密码,一对一……不要使用md5,use bcrypt!
发布于 2012-04-17 05:06:48
你可以随时创建自己的:
<?php
//From file or some John the ripper piped input
$wordlist=file('some_word_list.lst');
foreach ($wordlist as $word){
$sql="INSERT INTO table (plain_word,hashed_word)values('$word','".md5($word)."')";
...
}
?>https://stackoverflow.com/questions/10181616
复制相似问题