{"id":22261668,"url":"https://github.com/marplex/nat-port-starvation","last_synced_at":"2025-03-25T13:41:43.901Z","repository":{"id":93577732,"uuid":"473982956","full_name":"Marplex/nat-port-starvation","owner":"Marplex","description":"Fill the NAT port mapping table with useless ip/port records","archived":false,"fork":false,"pushed_at":"2022-03-25T11:29:29.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T12:29:42.888Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Marplex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-25T11:29:01.000Z","updated_at":"2022-03-25T11:29:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"bc2a9e57-ae0a-4f5e-920e-8d078cfcf5ea","html_url":"https://github.com/Marplex/nat-port-starvation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marplex%2Fnat-port-starvation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marplex%2Fnat-port-starvation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marplex%2Fnat-port-starvation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marplex%2Fnat-port-starvation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marplex","download_url":"https://codeload.github.com/Marplex/nat-port-starvation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245472647,"owners_count":20621155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T09:13:44.462Z","updated_at":"2025-03-25T13:41:43.886Z","avatar_url":"https://github.com/Marplex.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAT Port Starvation\n\nFill the NAT port mapping table with useless port/ip records.\n\n## How it works\n\n```python\nfor sport in range(0, 60999):\n    udp_header = struct.pack('!HHHH', sport, dport, length, checksum)\n    s.sendto(udp_header+data, ('1.1.1.1', 0));\n```\n\nI made this tool for fun while learning NAT, specifically port mapping.\nOn the transport layer, TCP and UDP protocols use source and destination ports to communicate with other hosts.\nTo connect with servers out of the local network, the router creates and maintains a table associating internal port/ip to destination port/ip.\n\n|        LAN        |        WAN         |\n| :---------------: | :----------------: |\n| 192.168.1.2: 1546 | 230.100.10.1: 7777 |\n| 192.168.1.2: 1547 | 230.100.10.1: 7778 |\n\nIf never used, entries on this table are deleted after some time (depends on the router). But if you are quick, you can fill this table with junk data, leaving no space for real requests and therefore \"disabling\" access to the WAN.\n\n## How to use\n\nJust run `main.py` and you'll disable internet access for 1/2 minutes depending on your router (or it might not work)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarplex%2Fnat-port-starvation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarplex%2Fnat-port-starvation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarplex%2Fnat-port-starvation/lists"}