Skip to content

Commit

Permalink
Fix UDP fragmentOffset
Browse files Browse the repository at this point in the history
  • Loading branch information
xfangfang committed May 26, 2024
1 parent f1da8f6 commit c0ac85d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/exploit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c0ac85d

Please sign in to comment.