diff options
author | David Timber <mieabby@gmail.com> | 2021-08-17 12:07:24 +1000 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2021-08-17 12:07:24 +1000 |
commit | af9f23da9f3ce89353cf06878bf8ab49b405e331 (patch) | |
tree | f49c0aaa74ee09ca11c03f0aead5010d41eb18f6 /src/proone-recon.c | |
parent | a161674bcee21384a73834e3ca16ad3bf1c70cf3 (diff) |
Impl full IPv6 support ...
* Use different strategy for discovering IPv6 hosts on the network
* Multicast IPv6 packet with bogus destination options to get ICMPv6
responses(type 4, code 2)
* Send SYN packets to the hosts responds to the packet to confirm that
they have target ports open
* Add full scope_id support
* Fix potential infinite loop when receiving raw packets
Diffstat (limited to 'src/proone-recon.c')
-rw-r--r-- | src/proone-recon.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/proone-recon.c b/src/proone-recon.c index 43fe8d5..71ece91 100644 --- a/src/proone-recon.c +++ b/src/proone-recon.c @@ -136,21 +136,22 @@ INV_LINE: static void evt_cb (void *ctx, const prne_net_endpoint_t *ep) { char addr_str[prne_op_max(INET_ADDRSTRLEN, INET6_ADDRSTRLEN)]; - const char *fmt; switch (ep->addr.ver) { case PRNE_IPV_4: inet_ntop(AF_INET, ep->addr.addr, addr_str, sizeof(addr_str)); - fmt = "%s:%"PRIu16"\n"; + printf("%s:%"PRIu16"\n", addr_str, ep->port); break; case PRNE_IPV_6: inet_ntop(AF_INET6, ep->addr.addr, addr_str, sizeof(addr_str)); - fmt = "[%s]:%"PRIu16"\n"; + printf( + "[%s%%%"PRIu32"]:%"PRIu16"\n", + addr_str, + ep->addr.scope_id, + ep->port); break; default: abort(); } - - printf(fmt, addr_str, ep->port); } int main (const int argc, const char **args) { |