RieqyNS13 icon

very simple dictionary attack

RieqyNS13 | PRO | 12/31/12 07:14:40 PM UTC | 0 ⭐ | 500 👁️ | Never ⏰ | []
PHP |

2.66 KB

|

None

|

0 👍

/

0 👎

<?php
/*Simple Dictionary Attack via Browser
Coded by RieqyNS13
devilzc0de.org*/
error_reporting(0);
set_time_limit(0);
if(isset($_POST['btnSubmit'])){
        if(empty($_POST['txHash'])){
                $hash = $_POST['txHash'];
                $string = $_POST['txString'];
        }else{
                $string = null;
                $hash = trim($_POST['txHash']);
                $file = "hash.lst";
                $fopen = fopen($file, "w");
                fwrite($fopen, $hash);
                fclose($fopen);
                $str = array_unique(str_replace(array("\n", "\r", "\r\n"), "", file("wordlist_hash.lst")));
                $str2 = array_unique(str_replace(array("\n", "\r", "\r\n"), "", file($file)));
                foreach($str as $key){
                        foreach($str2 as $key2){
                                if($key2==md5($key)){
                                    $string.="[MD5]".$key2.":".$key."\n";
                                    }
                                if($key2==sha1($key)){
                                    $string.="[SHA1]".$key2.":".$key."\n";
                                    }
                                }
                        }
}
                
}else{
        $hash = null;
        $string = null;
 
}
?>
<html>
<head>
<title>Dictionary Attack</title>
<style type="text/css">
body, button{
background:#000;
color:#0F0;
font-family:"Courier New";
}
legend, fieldset{
border:dashed 1px #0F0;
}
#menu1{
position:absolute;
left:0px;
top:30px;
}
#menu2{
position:absolute;
right:0px;
top:30px;
}
button{
border:dashed 1px;
bottom:50px;
}
button:hover{
opacity:0.7;
}
textarea{
background:url("../images/DevilzC0de.png") no-repeat center;
border:solid 1px #0F0;
color:#0F0;
font-family:"Courier New";
}
</style>
</head>
<body>
<center>
 
<form method=POST action="<?php $_SERVER['PHP_SELF']; ?>">
<fieldset id="menu1">
<legend>Hash</legend>
<textarea name="txHash" rows="30" cols="50"><?php echo $hash; ?></textarea>
</fieldset>
<button name="btnSubmit" type="submit">Submit</button>
<fieldset id="menu2">
<legend>String</legend>
<textarea name="txString" id="tx" rows="30" cols="50" readonly><?php echo $string; ?></textarea>
</fieldset>
</form>
 
</center>
</body>
</html>
 
<?php
/*Simple Dictionary Attack via Console
Coded by RieqyNS13
devilzc0de.org*/
error_reporting(0);
set_time_limit(0);
$file = "hash.lst";
$str = array_unique(str_replace(array("\n", "\r", "\r\n"), "", file("wordlist_hash.lst")));
$str2 = array_unique(str_replace(array("\n", "\r", "\r\n"), "", file($file)));
foreach($str as $key){
    foreach($str2 as $key2){
        ob_start();
        if($key2==md5($key)){
            echo "[MD5]".$key2.":".$key."\n";
                }
        $string = ob_get_contents();
        ob_end_clean();
        echo $string;
        
        ob_start();
        if($key2==sha1($key)){
            echo "[SHA1]".$key2.":".$key."\n";
                }
        $string = ob_get_contents();
        ob_end_clean();
        echo $string;
            }
        }
?>

Comments