Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCannot set the payload #30
Comments
|
I am having this exact same issue, i was wondering if you ever figured out what was going on? I am using code that has worked before in the past so i don't think it is an error on my part. I was wondering if there was some update to the kernel that broke this? |
|
I am not sure what is broken in this. And the lack of reply from the contributors did not help either.
This method works for me and should work in general, unless you want some connection oriented features and the client is expecting sequence id or something. Even in that case, this should work but I haven't tested it! |
|
Thanks for the work around! Yea it doesn't look like this repo has been active for a little while. |
|
My "workaround" so far ist to use https://github.com/chifflier/nfqueue-bindings. Unfortunately, that works with python2 only and you'll need to compile the C-Extension yourself (with cmake). |
|
@3wille I have tried it earlier. But I don't remember why i did not go with it. Probably it was because of the fact that I need to compile it myself. |
|
I also noticed this behavior when I tried to confirm that I changed the payload by logging it after I used set_payload(). While the log did seem to show that the payload was not modified, when I checked what was actually being sent with Wireshark it did show my modified packet being set. So what we're getting with get_payload() may just be an unmodifiable version of the original payload but what's actually being sent is still the modified payload. I found this with the git version of netfilterqueue (though it may already work in the latest release at this time, 0.8.1), I'm not sure if this was already working this way when this issue was created. |
|
I have now tried this with version 0.8.1 as well and it also works with that (on Python 3.6). |
Here is my code
After the set_payload, when I print the payload , I see the payload same as the input payload.
And I am not the only person who is facing this issue. Similar case here:
http://stackoverflow.com/questions/43319070/netfilterqueue-set-payload-not-work (This issue is raised by another person)
Am I doing something wrong?