Title: Exception ignored in: 'netfilterqueue.global_callback' · Issue #50 · oremanj/python-netfilterqueue · GitHub
Open Graph Title: Exception ignored in: 'netfilterqueue.global_callback' · Issue #50 · oremanj/python-netfilterqueue
X Title: Exception ignored in: 'netfilterqueue.global_callback' · Issue #50 · oremanj/python-netfilterqueue
Description: from netfilterqueue import NetfilterQueue from scapy.all import * def print_and_accept(pkt): print(pkt) pl = IP(pkt.get_payload()) print(pl.show()) pl[IP].dst = "172.17.0.3" del pl[IP].len, pl[IP].chksum, pl[TCP].chksum print(">>>payload...
Open Graph Description: from netfilterqueue import NetfilterQueue from scapy.all import * def print_and_accept(pkt): print(pkt) pl = IP(pkt.get_payload()) print(pl.show()) pl[IP].dst = "172.17.0.3" del pl[IP].len, pl[IP]....
X Description: from netfilterqueue import NetfilterQueue from scapy.all import * def print_and_accept(pkt): print(pkt) pl = IP(pkt.get_payload()) print(pl.show()) pl[IP].dst = "172.17.0.3" del pl[IP].le...
Opengraph URL: https://github.com/oremanj/python-netfilterqueue/issues/50
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Exception ignored in: 'netfilterqueue.global_callback'","articleBody":"from netfilterqueue import NetfilterQueue\r\nfrom scapy.all import *\r\n\r\ndef print_and_accept(pkt):\r\n print(pkt)\r\n pl = IP(pkt.get_payload())\r\n print(pl.show())\r\n pl[IP].dst = \"172.17.0.3\"\r\n del pl[IP].len, pl[IP].chksum, pl[TCP].chksum\r\n print(\"\u003e\u003e\u003epayload: \",str(pl))\r\n pkt.set_payload(str(pl))\r\n hw = pkt.get_hw()\r\n if hw:\r\n print(\":\".join(\"{:02x}\".format(c) for c in hw[0:6]))\r\n pkt.accept()\r\n\r\nnfqueue = NetfilterQueue()\r\nnfqueue.bind(0, print_and_accept)\r\ntry:\r\n nfqueue.run()\r\nexcept KeyboardInterrupt:\r\n print('')\r\n\r\nnfqueue.unbind()\r\n\r\nfollowing is the output:\r\n\r\n###[ IP ]### \r\n version = 4\r\n ihl = 5\r\n tos = 0x0\r\n len = 52\r\n id = 43486\r\n flags = DF\r\n frag = 0\r\n ttl = 127\r\n proto = tcp\r\n chksum = 0x2028\r\n src = 192.168.197.1\r\n dst = 172.17.0.2\r\n \\options \\\r\n###[ TCP ]### \r\n sport = 10732\r\n dport = http\r\n seq = 3132586654\r\n ack = 0\r\n dataofs = 8\r\n reserved = 0\r\n flags = S\r\n window = 64240\r\n chksum = 0xe2cf\r\n urgptr = 0\r\n options = [('MSS', 1460), ('NOP', None), ('WScale', 8), ('NOP', None), ('NOP', None), ('SAckOK', b'')]\r\n\r\nNone\r\n\u003e\u003e\u003epayload: b'E\\x00\\x004\\xa9\\xde@\\x00\\x7f\\x06 (\\xc0\\xa8\\xc5\\x01\\xac\\x11\\x00\\x03)\\xec\\x00P\\xba\\xb7z\\x9e\\x00\\x00\\x00\\x00\\x80\\x02\\xfa\\xf0\\xe2\\xcf\\x00\\x00\\x02\\x04\\x05\\xb4\\x01\\x03\\x03\\x08\\x01\\x01\\x04\\x02'\r\nException ignored in: 'netfilterqueue.global_callback'\r\nTraceback (most recent call last):\r\n File \"nfq3.py\", line 10, in print_and_accept\r\n pkt.set_payload(str(pl))\r\nTypeError: Argument 'payload' has incorrect type (expected bytes, got str)","author":{"url":"https://github.com/jieyoujun","@type":"Person","name":"jieyoujun"},"datePublished":"2019-04-23T13:09:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/50/python-netfilterqueue/issues/50"}
| 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:bbe78d5b-a2d8-c7aa-6d93-68502a4b8862 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BB18:1478FE:764C0A:981F15:6990AC4B |
| html-safe-nonce | 3af2365d879a713096015294fb13e720e0188ba4431d4547bfd9a68da13260e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjE4OjE0NzhGRTo3NjRDMEE6OTgxRjE1OjY5OTBBQzRCIiwidmlzaXRvcl9pZCI6Ijc5NDkyMzY5OTIwMzM3Mjk2MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b6d8814fe6609019c2f0bd889203f1e75b6fb274afea222c006cbde94ab8684a |
| hovercard-subject-tag | issue:436178771 |
| 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/50/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4e77ccd440febf01b15b8d03817fd9452e5a2a123397e3e537d5f257d7725c2a/oremanj/python-netfilterqueue/issues/50 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4e77ccd440febf01b15b8d03817fd9452e5a2a123397e3e537d5f257d7725c2a/oremanj/python-netfilterqueue/issues/50 |
| og:image:alt | from netfilterqueue import NetfilterQueue from scapy.all import * def print_and_accept(pkt): print(pkt) pl = IP(pkt.get_payload()) print(pl.show()) pl[IP].dst = "172.17.0.3" del pl[IP].len, pl[IP].... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jieyoujun |
| 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 | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width