Nmap http-open-proxy NSE Script


This page contains detailed information about how to use the http-open-proxy NSE script. For list of all NSE scripts, visit the Nmap NSE Library.

Select:
Overview
Error Messages

Script Overview


Script source code: https://github.com/nmap/nmap/tree/master/scripts/http-open-proxy.nse
Script categories: default, discovery, external, safe
Target service / protocol: polipo, squid-http, http-proxy
Target network port(s): 8123, 3128, 8000, 8080
List of CVEs: -

Script Description


The http-open-proxy.nse script checks if an HTTP proxy is open.

The script attempts to connect to www.google.com through the proxy and checks for a valid HTTP response code. Valid HTTP response codes are 200, 301, and 302. If the target is an open proxy, this script causes the target to retrieve a web page from www.google.com.

Http-open-proxy NSE Script Arguments


This is a full list of arguments supported by the http-open-proxy.nse script:

proxy.pattern

Pattern that will be searched inside the request results

proxy.url

Url that will be requested to the proxy

- - -
To use these script arguments, add them to the Nmap command line using the --script-args arg1=value,[arg2=value,..] syntax. For example:

nmap --script=http-open-proxy --script-args proxy.pattern=value,proxy.url=value <target>

Http-open-proxy NSE Script Example Usage


Here's an example of how to use the http-open-proxy.nse script:

nmap --script http-open-proxy.nse \
--script-args proxy.url=<url>,proxy.pattern=<pattern>

Http-open-proxy NSE Script Example Output


Here's a sample output from the http-open-proxy.nse script:

Interesting ports on scanme.nmap.org (64.13.134.52):
PORT     STATE SERVICE
8080/tcp open  http-proxy
|  proxy-open-http: Potentially OPEN proxy.
|_ Methods successfully tested: GET HEAD CONNECT

Http-open-proxy NSE Script Example XML Output


There is no sample XML output for this module. However, by providing the -oX <file> option, Nmap will produce a XML output and save it in the file.xml file.

Author


  • Arturo Buanzo Busleiman

References


See Also


Related NSE scripts to the http-open-proxy.nse script:

Visit Nmap NSE Library for more scripts.

The http-open-proxy.nse script may fail with the following error messages. Check for the possible causes by using the code snippets highlighted below found in the script source code. This can often times help in identifying the root cause of the problem.

Proxy might be redirecting requests


Here is a relevant code snippet related to the "Proxy might be redirecting requests" error message:

172:	    stdnse.debug1("Test 3 - Computer History\nReceived valid status codes, but pattern does not match")
173:	  end
174:	
175:	  -- Check if GET is being redirected
176:	  if proxy.redirectCheck(get_r1, get_r2) and proxy.redirectCheck(get_r2, get_r3) then
177:	    return false, "Proxy might be redirecting requests"
178:	  end
179:	
180:	  -- Check if at least CONNECTION worked
181:	  if cstatus then return true, "Methods supported:" .. table.concat(response, " ") end
182:	

Version


This page has been created based on Nmap version 7.92.

Go back to menu.