I'm trying to change simple GET request with pydivert (WinDivert for python)
What i seem to encounter is problem with packet lenght.
when i rewrite url so it has same amount or less of letters it works:
ie. GET /?a=asdf
=> GET /?a=z
But when i add more letters to the request, browser loops and ends up without showing anything
Below is example code i use
filter_ = "true and tcp.PayloadLength > 0"
with Handle(filter=filter_) as handle:
while True:
packet = handle.receive()
if packet.payload[0:3]=="GET":
packet.payload=packet.payload.replace("GET /?a=asdf","GET /?a=gfdsazzz")
handle.send(packet)
and
<?php
echo $_GET['a'];
?>
Is there somewhere a MAX packet size setted. If yes then how to increase it?
If that would be a hint for you then if i will print all packets in console
then i clearly see that request was responded by server because see packet.payload with gfdsazzz