sqlmap post 数据

Sqlmap post data

我试图 运行 使用方法 POST 的 sqlmap 但我得到了这个错误:

[CRITICAL] no parameter(s) found for testing in the provided data (e.g. GET parameter 'id' in 'www.site.com/index.php?id=1')

现在,我知道对于 POST 方法,我必须 运行 带有数据标志的 sqlmap(例如 --data="name=value"
但我的表单输入数据没有名称,数据以字符串形式发送。

这种情况下如何使用sqlmap?

您可以使用星号 * 来指定您的注入点。试试这个:

python sqlmap.py -u "http://www.example.com/index.php?id=1" --data="POST_STRING_HERE*" --dbs

注意数据字符串中的 *。 SQL 地图将询问您是否要处理通配符,在那里输入 Y。它将忽略所有参数并注入有效载荷代替 *.

来自docs

Append an asterisk, *, to the place where sqlmap should check for injections in URI itself. For example, ./sqlmap.py -u "http://target.tld/id1/1*/id2/2", sqlmap will inject its payloads at that place marked with * character. This feature also applies to POST data. Multiple injection points are supported and will be assessed sequentially.