Title: How to exit netfilter block? · Issue #65 · oremanj/python-netfilterqueue · GitHub
Open Graph Title: How to exit netfilter block? · Issue #65 · oremanj/python-netfilterqueue
X Title: How to exit netfilter block? · Issue #65 · oremanj/python-netfilterqueue
Description: I'm running this code: import os, sys queue = NetfilterQueue() QUEUE_NUM1 = 1 def changing_payload(pkt): global binary_rep if len(binary_rep) == 0: raise KeyboardInterrupt print(binary_rep) binary_rep = binary_rep[1:] binary_rep = "01010...
Open Graph Description: I'm running this code: import os, sys queue = NetfilterQueue() QUEUE_NUM1 = 1 def changing_payload(pkt): global binary_rep if len(binary_rep) == 0: raise KeyboardInterrupt print(binary_rep) binary_...
X Description: I'm running this code: import os, sys queue = NetfilterQueue() QUEUE_NUM1 = 1 def changing_payload(pkt): global binary_rep if len(binary_rep) == 0: raise KeyboardInterrupt print(binary_rep) bin...
Opengraph URL: https://github.com/oremanj/python-netfilterqueue/issues/65
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to exit netfilter block?","articleBody":"I'm running this code:\r\n```from netfilterqueue import NetfilterQueue\r\nimport os, sys\r\n\r\nqueue = NetfilterQueue()\r\nQUEUE_NUM1 = 1\r\n\r\ndef changing_payload(pkt):\r\n global binary_rep\r\n if len(binary_rep) == 0:\r\n raise KeyboardInterrupt\r\n print(binary_rep)\r\n binary_rep = binary_rep[1:]\r\n \r\n\r\nbinary_rep = \"0101000021002220201551051101545\"\r\n\r\ntry:\r\n os.system(\"iptables -I OUTPUT -d 10.0.1.0/24 -p udp --dport 7078 -j NFQUEUE --queue-num {}\".format(QUEUE_NUM1))\r\n queue.bind(QUEUE_NUM1, changing_payload)\r\n queue.run()\r\nexcept KeyboardInterrupt:\r\n queue.unbind()\r\n os.system(\"iptables --flush\")\r\n print('Message sent..')\r\n```\r\n\r\n\r\nand get error message but netfilterqueue que is still running:\r\n```Exception ignored in: 'netfilterqueue.global_callback'\r\nTraceback (most recent call last):\r\n File \"/home/nfq.py\", line 10, in changing_payload\r\n raise KeyboardInterrupt(\"Should stop\")\r\nKeyboardInterrupt: Should stop\r\n```\r\nAny ideas how could I stop netfilterqueue without exiting program? (BTW pressing \"CTRL+C\" isn't working too)","author":{"url":"https://github.com/k-zd","@type":"Person","name":"k-zd"},"datePublished":"2021-04-23T14:39:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/65/python-netfilterqueue/issues/65"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a58a7129-fec6-2bef-15a8-ba54fdc818eb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA24:B2578:CEE20A:1047ECB:69901A8E |
| html-safe-nonce | 0c0639a545ba4680040b26e17b154aa7cb2f56bdd407570443c4d1f90c4c2e3c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTI0OkIyNTc4OkNFRTIwQToxMDQ3RUNCOjY5OTAxQThFIiwidmlzaXRvcl9pZCI6IjE3NjEzNzI1MTUxMzE3MjY0NzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 001d27b891cc34c91f0701aec96681913ebb06774d4a33dbd24a36a441d61429 |
| hovercard-subject-tag | issue:866175931 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/oremanj/python-netfilterqueue/65/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4e77ccd440febf01b15b8d03817fd9452e5a2a123397e3e537d5f257d7725c2a/oremanj/python-netfilterqueue/issues/65 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4e77ccd440febf01b15b8d03817fd9452e5a2a123397e3e537d5f257d7725c2a/oremanj/python-netfilterqueue/issues/65 |
| og:image:alt | I'm running this code: import os, sys queue = NetfilterQueue() QUEUE_NUM1 = 1 def changing_payload(pkt): global binary_rep if len(binary_rep) == 0: raise KeyboardInterrupt print(binary_rep) binary_... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | k-zd |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/oremanj/python-netfilterqueue git https://github.com/oremanj/python-netfilterqueue.git |
| octolytics-dimension-user_id | 4316136 |
| octolytics-dimension-user_login | oremanj |
| octolytics-dimension-repository_id | 1736893 |
| octolytics-dimension-repository_nwo | oremanj/python-netfilterqueue |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1736893 |
| octolytics-dimension-repository_network_root_nwo | oremanj/python-netfilterqueue |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width