You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Higher version SQLMAP fails to correctly identify the port in the request message, resulting in error 502
To Reproduce
Create a txt file for the POST request package and set the host to ip:port (not 80 or 443).
Run the command with python3: "..\Python311\python.exe sqlmap.py -r sql.txt --batch --dbs”
"testing connection to the target URL" - phase error:unable to retrieve page content, HTTP error codes detected during run: 502 (Bad Gateway) -1 times
Use the --proxy=http://127.0.0.1:8080 parameter to capture the request. It is found that the host of the test request packet sent by SQLMAP at this stage is only the ip address, not the ip:port specified in the file, resulting in 502 response returned by the server.
For example, my request package is (only the core parameters are shown, there are many parameters) :
**POST /jc6/servlet/uploaddoc HTTP/1.1
Host: 0.0.0.0:8962
Content-Length: 50
a=x***
The test request packet sent by SQLMAP is:
**POST /jc6/servlet/uploaddoc HTTP/1.1
Host: 0.0.0.0
Content-Length: 50
a=x***
Expected behavior
Make SQLMAP use the complete host value (such as 127.0.0.1:8968) in my request packet when sending the test package, instead of only extracting the ip value for packet sending (this will cause the server to respond to 502 error, so that the test can not be carried out normally).I studied for a long time during testing, including using -p, --host and other parameters to try to specify the value of Post, but failed, SQLMAP still sends the test link through request without the request packet or the Port value specified by the parameter.
Screenshots
Running environment :
sqlmap version 1.7.10#stable
Installation Method After downloading from github, use python3 to invoke
OS: Microsoft Windows 11
Python version 3.8.0
Target details :
DBMS Microsoft SQL Server
sqlmap delayed injection
WAF/IPS None
Related console output None
Other context
1.7#stable does not have this issue
Note:I used SQLMAP in one of the integration applications, and while there was no such issue here, the test was stuck in something like the figure below, and there was no end flag.The Python version is unknown.
The situation in the above picture has been quiet since the start time to 17:30. Through communication with the author of the integration program, it is confirmed that the python version used is 2.7.1
The text was updated successfully, but these errors were encountered:
I have the first problem again, I don't know why SQLMAP sends the connectivity test package without the port I specify in the request package, resulting in 502 error o(╥ ╥)o
I am very sorry for the trouble caused to the working group, I have found the cause of this problem.The main reason is that I enabled the "Global proxy" function of the proxy service.It overrides the IE proxy Settings, and SQLMAP seems to be the default IE proxy so sending packets will show error 502.
Here, I would like to make a supplement and share my experience on MacOS. My problem is also a proxy problem, but my operating system is MacOS. After trying to close clash-verge and other proxies, sqlmap can work normally.
turn off too
Higher version SQLMAP fails to correctly identify the port in the request message, resulting in error 502
To Reproduce
For example, my request package is (only the core parameters are shown, there are many parameters) :
**POST /jc6/servlet/uploaddoc HTTP/1.1
Host: 0.0.0.0:8962
Content-Length: 50
a=x***
The test request packet sent by SQLMAP is:
**POST /jc6/servlet/uploaddoc HTTP/1.1
Host: 0.0.0.0
Content-Length: 50
a=x***
Expected behavior
Make SQLMAP use the complete host value (such as 127.0.0.1:8968) in my request packet when sending the test package, instead of only extracting the ip value for packet sending (this will cause the server to respond to 502 error, so that the test can not be carried out normally).I studied for a long time during testing, including using -p, --host and other parameters to try to specify the value of Post, but failed, SQLMAP still sends the test link through request without the request packet or the Port value specified by the parameter.
Screenshots
Running environment :
Target details :
Other context
1.7#stable does not have this issue
Note:I used SQLMAP in one of the integration applications, and while there was no such issue here, the test was stuck in something like the figure below, and there was no end flag.The Python version is unknown.
The situation in the above picture has been quiet since the start time to 17:30. Through communication with the author of the integration program, it is confirmed that the python version used is 2.7.1
The text was updated successfully, but these errors were encountered: