aboutsummaryrefslogtreecommitdiff
path: root/src/inet.c
diff options
context:
space:
mode:
authorDavid Timber <mieabby@gmail.com>2021-08-12 16:01:50 +1000
committerDavid Timber <mieabby@gmail.com>2021-08-12 16:01:50 +1000
commita685a85d71e4948c61e811ca24c7b85d601bfcba (patch)
tree37a96e1f63a574cd80df73a41a9febc81376032b /src/inet.c
parentbbd889f13f94d59a5b78f3c3bc93499d523b8264 (diff)
Recon: use ICMPv6 echo instead of random SYN ...
* proone-htbtclient: mlock() tls password * Recon * Send ICMPv6 echo requests to discover IPv6 hosts in the link-local network * Check OS code as the implementation is heavily os-dependent * Fix wrong II_UPDATE values * Fix sending wrong number of SYN packets
Diffstat (limited to 'src/inet.c')
-rw-r--r--src/inet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/inet.c b/src/inet.c
index bf73e2a..26c79ab 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -42,7 +42,7 @@ uint16_t prne_calc_tcp_chksum4 (
sum += prne_recmb_msb16(
ih->daddr[2],
ih->daddr[3]);
- sum += 6; // IPPROTO_TCP
+ sum += ih->protocol;
sum += (uint16_t)(th_len + data_len);
// tcp header
@@ -99,7 +99,7 @@ uint16_t prne_calc_tcp_chksum6 (
sum += (uint16_t)((tcp_length & 0xFFFF0000) >> 16);
sum += (uint16_t)(tcp_length & 0xFFFF);
- sum += 6; // IPPROTO_TCP
+ sum += ih->next_hdr;
// tcp header
while (th_len > 1) {