diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f48821a..58b18aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,6 @@ jobs: - name: Install MinGW-w64 run: > - sudo rm /var/lib/man-db/auto-update && sudo DEBIAN_FRONTEND=noninteractive XZ_DEFAULTS="-T0" XZ_OPT="-T0" eatmydata apt install -y --no-install-recommends gcc-mingw-w64 diff --git a/src/fakepackets.c b/src/fakepackets.c index d4d2254..479af01 100644 --- a/src/fakepackets.c +++ b/src/fakepackets.c @@ -17,6 +17,7 @@ struct fake_t { static struct fake_t *fakes[30] = {0}; int fakes_count = 0; int fakes_resend = 1; +unsigned int iphdr_id = 0; static const unsigned char fake_http_request[] = "GET / HTTP/1.1\r\nHost: www.w3.org\r\n" "User-Agent: curl/7.65.3\r\nAccept: */*\r\n" @@ -203,6 +204,13 @@ static int send_fake_data(const HANDLE w_filter, if (set_ttl) ppIpHdr->TTL = set_ttl; + + // ppIpHdr->FragOff0 = ((ppIpHdr->FragOff0) & 0xFFBF) | //uncomment if DF flag must be zero + // (((FALSE) & 0x0001) << 6); + + ppIpHdr->Id = htons(iphdr_id); + iphdr_id++; + } else { ppIpV6Hdr->Length = htons( @@ -283,6 +291,7 @@ int send_fake_http_request(const HANDLE w_filter, const BYTE set_seq ) { int ret = 0; + rand_s(&iphdr_id); for (int i=0; i