1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-14 03:39:02 +00:00
Commit Graph

8287 Commits

Author SHA1 Message Date
henri
19a01d75ab Let FPEngine use nsock proxy chains. 2013-04-22 19:33:22 +00:00
henri
18cf677548 Let NSE use nsock proxy chains. 2013-04-22 19:33:15 +00:00
henri
6700abe1e8 Added svn properties. 2013-04-22 19:33:08 +00:00
henri
71e23318e9 Removed list of todo items from source. 2013-04-22 19:33:00 +00:00
henri
6e8b30d721 Added support to resolve proxy hostnames. 2013-04-22 19:32:52 +00:00
henri
b7b3b4bd3e Default port is set to -1 (and not zero) when not specified in proxy specification string. 2013-04-22 19:32:44 +00:00
henri
99258673ad Added handling of the new NSE_STATUS_PROXYERROR case. 2013-04-22 19:32:36 +00:00
henri
c9d237f26b Added a new NSE_STATUS_PROXYERROR status type to report proxy-related errors
back to caller.
2013-04-22 19:32:29 +00:00
henri
da1559b237 Replaced a couple macros by corresponding static inline functions.
Removed unused PROXY_CTX_NODES() macro.
2013-04-22 19:32:20 +00:00
henri
6c0d537efb Removed unused http_proxy_info structure. 2013-04-22 19:32:11 +00:00
henri
152490e630 Removed per-node information structures as well as data encoding/decoding
interface.

These were unused and I think won't be required by any proxy type (HTTP and
SOCKS).
2013-04-22 19:32:04 +00:00
henri
173adc678b Implemented a more robust URI parser. Code largely adapted from ncat/http.c. 2013-04-22 19:31:56 +00:00
henri
26f918e310 Use an intermediate proxy_chain pointer for readability. 2013-04-22 19:31:47 +00:00
henri
ba27c10458 Removed the proxy-specific tcp_connect hook.
This simplifies the interface that proxies export to the library but also relies
upon the assumption that a proxy chain starts with a TCP connection from the
scanner to the next hop proxy. That will be enough ATM.
2013-04-22 19:31:40 +00:00
henri
4d5bb41361 Added skeletton for having px_info list in each Nsock IOD.
When establishing the tunnel through proxy chain, we need to track status of
each proxy (storing R/W buffers, stats, retries...).

This patch lets proxies store and manage whatever structure they want to have
for this in a Nsock IOD. Since types can differ between proxy types, the
proxy_info are stored as a list of void *, ordered like the proxy nodes.
2013-04-22 19:31:30 +00:00
henri
21327ee56c Return 1 on success to (try to) improve consistency. 2013-04-22 19:31:21 +00:00
henri
af65c7448f Removed 'data_' prefixes to encoding/decoding functions to avoid confusion with functions that deal with proxy internal data structures. 2013-04-22 19:31:14 +00:00
henri
5168ff9113 Moved prototypes to nsock_proxy.h 2013-04-22 19:31:06 +00:00
henri
4b9ff7f562 Removed unused macros. 2013-04-22 19:30:57 +00:00
henri
f1a04abd6b Removed the global ProxyOps list.
Each proxy node now provides a pointer to its operations struct.
2013-04-22 19:30:49 +00:00
henri
3451220630 Refactored proxy code to use a "strategy" design pattern.
Proxy backends are selected at runtime. Each proxy exports a list of operations
to the rest of the library. This is similar to the way IO engines are
implemented within nsock.
2013-04-22 19:30:40 +00:00
henri
08c44fe775 Added nsock_proxy.h to the DEPS list. 2013-04-22 19:30:30 +00:00
henri
48354754a8 Renamed proxy actions into proxy op, which seems to be rather more meaningful. 2013-04-22 19:30:23 +00:00
henri
e1030f2fe7 Cosmetic fixes. 2013-04-22 19:30:14 +00:00
henri
f5e437cdbf Removed undesired debugging printf() call. 2013-04-22 19:30:07 +00:00
henri
2b3a3ca5df Fixed ProxyAction extern declaration. 2013-04-22 19:29:58 +00:00
henri
34e825f26e Use the new API that nsock provides for proxychain parsing/handling. 2013-04-22 19:29:50 +00:00
henri
91af533ca2 Added missing initializer. 2013-04-22 19:29:43 +00:00
henri
641d63efb4 Reduced scope of the top level proxy event handler.
There is no need anymore for exporting this function to the rest of the library.
It's called by the proxy hooks when registering new events.
2013-04-22 19:29:35 +00:00
henri
9084805bbf Added destructor for proxy_chain_context. 2013-04-22 19:29:26 +00:00
henri
28604b63e3 Design improvements.
Externally:
  The calling application can build a proxychain object and assign it to one (or
  more) NSP. Once a NSP get assigned a proxychain it's not possible to remove
  it so that consistency is (should be...) ensured.

Internally:
  An IOD comes with a proxychain context structure storing the whole tunnel
  state. Also each proxy type now has a table of associated functions to use
  as hooks for TCP connects(), read() and write() requests. As a result, adding
  support of new proxy type should be easier. Code also gains readability in
  comparison to large switch/cases that redirect the execution flow according to
  the given proxy type.
2013-04-22 19:29:18 +00:00
henri
a6bcd9cb7e Added proxy support to service_scan. 2013-04-22 19:29:08 +00:00
henri
c631af1c09 Added a --proxies <chain> option to nmap to let users specify proxies to use
from command line.

<chain> is expected (by nsock) to be a comma-separated list of proxies.
e.g.:
  http://relay1.local:8080,http://relay2.local:3128

This option has currently no effect.
2013-04-22 19:29:01 +00:00
henri
06219414a6 Initial version with a _very_ raw support for HTTP proxy chains (using the
CONNECT method). This is mostly intended to validate the concepts, data models
and programming approach.
2013-04-22 19:28:53 +00:00
david
e0896d4617 Add IE lines to two OS fingerprint missing them.
http://seclists.org/nmap-dev/2013/q2/88
2013-04-20 04:16:41 +00:00
henri
6d9a68ecb9 Code cleanup.
Removed unused nse.time_created field.
Use bitfields instead of integers for nse.eof and nse.event_done
Indentation fixes.
2013-04-19 23:21:40 +00:00
david
13abd4df8a Restore empty rpc_info field to gnmap port output from r29619.
Patch by Daniel Miller.
2013-04-17 22:48:31 +00:00
fyodor
2a61d7229d Add an infrastructure task (ipv6 for secwiki website) to todo 2013-04-16 19:51:45 +00:00
david
3f3bb4a546 Regen po files.
Recommitted after recovery from backup.
2013-04-12 17:29:35 +00:00
david
87bbbfa0e4 Regen zenmap.pot.
Recommitted after recovery from backup.
2013-04-12 17:29:33 +00:00
david
24f378acdb Regen it translation mo.
Recommitted after recovery from backup.
2013-04-12 17:29:31 +00:00
david
fac98776b7 Update Zenmap it.po translation.
By Giacomo.
http://seclists.org/nmap-dev/2013/q2/0

Recommitted after recovery from backup.
2013-04-12 17:29:29 +00:00
david
67db6f0829 Fix another outError → nping_warning.
Apparently missed in r30691. Reported by Gisle Vanem.
http://seclists.org/nmap-dev/2013/q2/32

Recommitted after recovery from backup.
2013-04-12 17:29:28 +00:00
david
a58e6d0f33 -Adds digest support to basic login method.
-Adds detection entry for Digital Sprite 2 ( Digital recorder )

Originally committed by paulino but recommitted by david after recovery
from backup.
2013-04-12 17:29:26 +00:00
david
f43f163ec2 Remove http-robtex-reverse-ip script because it pretty much does the same thing as our newer hostmap-robtex
Originally committed by fyodor but recommitted by david after recovery
from backup.
2013-04-12 17:29:24 +00:00
david
08849111be Change Arturo name in Robtex scripts to match how it is in the other scripts he has authored
Originally committed by fyodor but recommitted by david after recovery
from backup.
2013-04-12 17:29:23 +00:00
david
b9bf5ec5cc Update documentation and example usage and output to be (I hope) more clear.
Originally committed by fyodor but recommitted by david after recovery
from backup.
2013-04-12 17:29:21 +00:00
david
4df392f1a2 Applied Dan Miller's fix to use new Robtex API (http://seclists.org/nmap-dev/2013/q2/1). I had to modify it slightly to allow [a-z]+.robtex.com in the pattern rather than just dns.robtex.com because many entries used host.robtex.com, top.robtex.com, etc. More improvements to follow.
Originally committed by fyodor but recommitted by david after recovery
from backup.
2013-04-12 17:29:20 +00:00
david
b7c49e4276 Update nmap-protocols from IANA (5 additions)
Originally committed by dmiller but recommitted by david after recovery
from backup.
2013-04-12 17:29:18 +00:00
david
3b728a40df Update banner.nse to use script-args
Added 2 args:

banner.timeout is a timespec for how long to wait for output. Default is
still 5s.

banner.ports is a ports list for limiting which ports to connect to. The
default is still all ports, but using banner.ports=common will limit to
some common ports that always return a banner.

Originally committed by dmiller but recommitted by david after recovery
from backup.
2013-04-12 17:29:17 +00:00