proxycheck(1)

๐Ÿ“ฆ
version 0.49a ยท 2 versions
  • 0.49a ยท debian bookworm, debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.49a ยท ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– proxycheck โ€” open proxy server checker ๐Ÿ’–

okay so bestie, we're in the General Commands Manual, section 1 โ€” yes, the proxycheck(1) girlies know what's up. sit down, grab a strawberry ๐Ÿ“, and let's talk about the open proxy checker that literally eats.


โœจ NAME โœจ

proxycheck โ€” open proxy server checker ๐Ÿ•ต๏ธโ™€๏ธ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

proxycheck options host[:proto_port_spec]...

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so proxycheck is this simple open proxy checking tool, and she is fast โ€” like, capable of quickly discovering open proxy servers across many hosts at once. her whole main character goal? detecting an open proxy server so it can't get abused by various "bad guys" โ€” mostly spammers, no cap. ๐Ÿšซ๐Ÿ“ง

having a wide-open proxy service running on a publicly accessible network is a very bad idea nowadays, and proxycheck may be used to find such a system so you can either secure it, or refuse servicing it until it gets secured properly. it's giving... intervention. ๐Ÿ’…

so how does she tell if a given host is running an open proxy service? proxycheck tries to connect to a given destination system via a host and perform some actions, trying to talk with the destination system. if the talk is successful, proxycheck assumes the proxy service is running and wide-open. periodt. โœจ

proxycheck supports all commonly used proxy protocols, namely:

  • HTTP CONNECT method
  • SOCKS versions 4 and 5
  • Wingate "telnet"-style proxies

in the future, support for more protocols may be added. she's growing, your honor. ๐ŸŒฑ

please note: with the current number of various trojan horses circulating around, each opening a proxy on a random port, it is not really enough to probe for standard (in whatever reason) ports built into proxycheck. instead, it is highly recommended to use a list of currently active ports maintained by several people on the 'net. iykyk ๐Ÿ‘€

๐Ÿ’… OPTIONS ๐Ÿ’…

the following command-line options are recognized:

  • -h โ€” print a short help and exit. short n sweet ๐ŸŽ€
  • -v โ€” increase the verbosity level. all debugging messages will go to standard error stream.
  • -d deshost:destport (required) โ€” try to establish a proxied connection to the given dsthost, port dstport. this option is required. no skipping, bestie. ๐Ÿซถ
  • -c check[:params] (required) โ€” the "method" proxycheck will use when talking to a destination system to determine if a proxy is open or not. interpretation of params is check-dependant. this option is required. several methods are available:
    • chat:sendstr:expectstr โ€” try to perform a simple "chat" with the destination system: send the string given as sendstr and wait for expectstr on output. if sendstr is empty, proxycheck will send the proxy parameters in the form
protocol:ip-address:portnumber

to the remote system. proxy assumed to be open if expectstr is found. ๐Ÿ’ฌ

  • dsbl (no parameters accepted) โ€” try to submit all found proxies to the DSBL.org-like system, see http://dsbl.org/ for more details. all the parameters required (username, password, recipient address, cookie server, ...) are expected to be found in environment variables. run proxycheck with -h option to see a list of recognized variables and their default values. by default, proxycheck will anonimously submit all found proxies to unconfirmed.dsbl.org (which isn't very useful). for trusted DSBL user, at least DSBL_USER and DSBL_PASS variables should be set properly. ๐Ÿ“ฎ
  • -p proto_port_spec โ€” specifies protocol and ports to connect to. if not given, proxycheck will try its built-in default list. this option may be specified more than once. see below for proto_port_spec. if proto_port_spec is specified for a single host to check, it applies to that host only, and no protocols/ports in the default list will be checked for that host. ๐ŸŽฏ
  • -D โ€” do not reset default port list when using -p option, but prepend new ports to it instead.
  • -a โ€” use more "advanced" ports/protocols. the more -a's given, the more ports/protocols will be probed. for a complete list of all ports and protocols and their level, execute proxycheck with -h option. stacking them like pokรฉmon cards fr fr ๐Ÿ”ฅ
  • -t timeout โ€” a timeout, in secounds, for every operation. default value is 30 secounds. the timer starts at the connection attempt to the proxy itself, after sending the "connect" command to the proxy and so on. โฐ
  • -m maxconn โ€” do not attempt to make more than maxconn parallel connections. by default, maximum number of parallel connections limited by the operating system and on most systems it is around 1000.
  • -M maxhconn โ€” do not make more than maxhconn parallel connections to the same host (default is unlimited). this may be useful for overloaded proxies which can't handle many parallel connections using different ports/protocols, but may significantly slow down the whole process. ๐Ÿข
  • -s โ€” when an open proxy is found on a given IP, stop probing for other ports/protocols for this IP. best used when many IPs are tested, and/or with -M option. this is because currently, proxycheck will not make any new connections to such host, but will wait for already active connections to complete. she's polite like that ๐Ÿ’…
  • -b bindaddr โ€” use bindaddr as a source address for all outgoing connections.
  • -n โ€” write a line about definitely closed proxies to stdout in addition to writing about open proxies, in a form
127.0.0.1 http:8080 closed
  • -x โ€” print extended proxy information (proxy-agent and the like) if available. this will be on the same "open" (or "closed" with -n) line, last, enclosed in square brackets [].
  • -i filename โ€” read list of hosts to check from a given file filename (in addition to command line), or from stdin if filename is -.

๐ŸŒˆ Protocol and Port specification ๐ŸŒˆ

proxy protocols and ports to try (proto_port_spec) specified using the following syntax:

[proto:][port,port,port]

like:

hc:3128,8080 (http protocol on ports 3128 and 8080)
hc:    (default list of ports for http protocol)
3128   (try http protocol on standard http port 3128)
1234   (try all protocols on non-standard port 1234)

run proxycheck -h to see a list of supported protocols and default ports. ๐Ÿ‘‘


๐ŸŽ€ USAGE ๐ŸŽ€

simplest usage of proxycheck is to try to connect to e.g. your own mailserver with the chat check method. first, connect to your mailserver on port 25 to see which line it outputs upon connection (SMTP greething line), and use it with chat:

proxycheck -d yourmailserver.example.org:25 \
  -c chat::greething ip.add.re.ss...

proxycheck will write a single line for every proto:port it finds to be open on stdout, in the form:

127.0.0.3 hc:80 open

where 127.0.0.3 is an IP address of a host being tested, hc is the protocol name (HTTP CONNECT, consult proxycheck -h for a full list of protocols) and 80 is a port number where the proxy service is running.

in addition, if proxycheck is able to guess outgoing IP address of a proxy as seen by a destination system, and if that address is different from input proxycheck is connecting to, it will print this information too on the same line, like:

127.0.0.2 hc:80 open 127.0.0.3

where 127.0.0.3 is outgoing IP address of a multihomed/cascaded proxy as reported by the destination system. this IP address is hint only, there is no simple and reliable way currently exists for proxycheck to determine that information. proxycheck is able to parse a line sent by remote system in -c chat mode โ€” in this mode, proxycheck skips all printable characters after expstr it found and searches for opening `[`, when tries to find closing ']' and interpret digits and dots in between as an IP address which gets printed like above. if your mailserver's initial reply contains remote system's IP, or if your mailserver replies with remote system's IP address to HELO/EHLO command, this feature may be useful (in the last case, HELO command should be specified in chat). ๐Ÿ•ต๏ธโ™€๏ธ

when -n option is specified, for proto:ports which aren't running open proxy service, and for which proxycheck is able to strongly determine this, a line in the following format will be written:

127.0.0.4 hc:80 closed
note however that in most cases there is no way to reliable determine whenever a given service is not open: for example, an open proxy server may be overloaded and refusing connections. in most cases, proxycheck assumes proxy is in unknown state, only a few codes are recognized as real indication of "closed" state. don't come for her, she's doing her best ๐Ÿ˜ญ

when -x option is specified, there will be additional proxy info written on the same line (if available), like:

127.0.0.2 hc:80 open 127.0.0.3 [AnalogX 3.1415926]
127.0.0.3 hc:80 open [AnalogX 3.1415926]
127.0.0.4 hc:80 closed [AnalogX 3.1415926]

one may see some detail of proxycheck's operations giving sufficient number of -v options in the command line. verbosity level of 5 (-vvvvv) will show almost everything. all the debugging output will go to the standard error stream and thus will not affect normal operations (when you process proxycheck's output using some script). ๐Ÿงš


โญ EXIT CODE โญ

  • proxycheck will exit with code 100 if at least one open proxy server was found. ๐ŸŽ‰
  • in case of incorrect usage, it will exit with code 1. ๐Ÿ™ˆ
  • if no open proxies where found, proxycheck will return 0.

๐Ÿ‘‘ LICENSE ๐Ÿ‘‘

this program is free software. it may be used and distributed in the terms of General Public License (GPL) version 2 or later. free as in... you know the vibe ๐Ÿ’œ


๐Ÿซถ AUTHOR ๐Ÿซถ

proxycheck written by Michael Tokarev <mjt@corpit.ru>. latest version of this utlilty may be found at http://www.corpit.ru/mjt/proxycheck.html.


and that's the whole page bestie!! ๐ŸŽ€ this was section 1 of the General Commands Manual, proxycheck(1), and ngl the footer didn't come with a date on it so we're not gonna make one up โ€” the source line is just the manual itself, proxycheck(1), general commands manual. slay, go check some proxies, stay safe, mwah ๐Ÿ’–โœจ