首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >md5decrypter接口

md5decrypter接口
EN

Stack Overflow用户
提问于 2012-04-17 04:57:29
回答 3查看 4.8K关注 0票数 1

因此,这里有一个网站(http://md5decrypter.co.uk),它会在给定md5散列的情况下,尝试返回原始字符串。

有没有API,或者有人制作了一个PHP类来使用它?我找不到..。

在此之前,你会问,让我向你保证,我没有恶意。

提前谢谢你。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-04-20 03:20:58

即使md5decryptor的人很好,他也不会因为你的请求就让你通过超文本传输协议访问他的资产。和其他任何人一样,你可以使用公开可用的you界面,它需要验证码--它可以说出一切。

或者简而言之:不,没有PHP。

但是,你为什么不运行自己的呢?这是相当琐碎的:

代码语言:javascript
复制
$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";
}

输出:

代码语言:javascript
复制
fcf1eed8596699624167416a1e7e122e - found: octopus (Google)
bed128365216c019988915ed3add75fb - found: passw0rd (Google)
d0763edaa9d9bd2a9516280e9044d885 - found: monkey (Google)
dfd8c10c1b9b58c8bf102225ae3be9eb - found: 12081977 (Google)
ede6b50e7b5826fe48fc1f0fe772c48f - found: 1q2w3e4r5t6y (Google)

那些你不能直接查找的内容,你可以手动粘贴到该站点。请记住,如果更多的人像你一样思考,越来越多的网站将会关闭(其中大多数已经关闭)。

代码语言:javascript
复制
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';
}
票数 4
EN

Stack Overflow用户

发布于 2012-04-19 16:01:15

BozoCrack是一个非常简单的ruby脚本,它使用google作为彩虹盘,并且非常擅长破解无盐MD5密码。看一下代码,把它移植到PHP应该不会太难。

PS:每个使用无盐MD5作为密码散列算法的人都应该破解他的密码,一对一……不要使用md5,use bcrypt

票数 1
EN

Stack Overflow用户

发布于 2012-04-17 05:06:48

你可以随时创建自己的:

代码语言:javascript
复制
<?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)."')";
    ...
}
?>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10181616

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档