{"id":26656233,"url":"https://github.com/moften/tor-nodes-request","last_synced_at":"2025-08-20T23:09:04.863Z","repository":{"id":284234408,"uuid":"954275855","full_name":"moften/TOR-NODES-REQUEST","owner":"moften","description":"TOR End-Nodes request for waf - Aws - Firewall","archived":false,"fork":false,"pushed_at":"2025-03-24T20:42:45.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T21:34:36.232Z","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/moften.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":"2025-03-24T20:40:34.000Z","updated_at":"2025-03-24T20:42:49.000Z","dependencies_parsed_at":"2025-03-24T21:34:38.076Z","dependency_job_id":"3d0a504c-c294-4a3a-b32a-9df5d4204162","html_url":"https://github.com/moften/TOR-NODES-REQUEST","commit_stats":null,"previous_names":["moften/tor-nodes-request"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/moften/TOR-NODES-REQUEST","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moften%2FTOR-NODES-REQUEST","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moften%2FTOR-NODES-REQUEST/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moften%2FTOR-NODES-REQUEST/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moften%2FTOR-NODES-REQUEST/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moften","download_url":"https://codeload.github.com/moften/TOR-NODES-REQUEST/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moften%2FTOR-NODES-REQUEST/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271400259,"owners_count":24752830,"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","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-03-25T07:19:13.654Z","updated_at":"2025-08-20T23:09:04.824Z","avatar_url":"https://github.com/moften.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TOR-NODES-REQUEST\nTOR End-Nodes request for waf - Aws - Firewall\n\n# m10secœproton.me\n\n## TOR Exit Node Blocker for AWS WAF\nThis Python script automatically fetches the list of TOR exit nodes and updates an AWS WAF IP set with the current TOR IPs. This helps block or monitor traffic from the TOR network in your CloudFront distribution.\n\n⚙️ Features\n✅ Fetches the latest TOR exit node list from torproject.org\n✅ Updates an AWS WAF IP set with the TOR exit IPs\n✅ Supports CloudFront distributions\n\n🛠️ Requirements\nPython 3.x\n\nboto3 for AWS interaction\n\nrequests for fetching the TOR exit node list\n\nInstall Dependencies:\nbash\nCopy\nEdit\npip install boto3 requests\n🔥 Usage\nSet up AWS credentials\nEnsure you have valid AWS credentials configured (either using aws configure or environment variables).\n\nRun the script\nReplace the placeholders with your AWS WAF IP set ID and name:\n\nbash\nCopy\nEdit\npython tor_waf_updater.py\nParameters\n\nip_set_id: The ID of the AWS WAF IP set you want to update.\n\nip_set_name: The name of the AWS WAF IP set.\n\nregion: (Optional) AWS region, defaults to us-east-1.\n\n🌐 Example\npython\nCopy\nEdit\nip_set_id = 'your-ip-set-id'\nip_set_name = 'your-ip-set-name'\nregion = 'us-east-1'\n\nupdate_ip_set(ip_set_id, ip_set_name, region)\n⚠️ IAM Permissions Required\nEnsure your AWS IAM role or user has the following permissions to update the WAF IP set:\n\njson\nCopy\nEdit\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"wafv2:UpdateIPSet\",\n                \"wafv2:GetIPSet\"\n            ],\n            \"Resource\": \"*\"\n        }\n    ]\n}\n🚀 Deployment\nYou can schedule this script with a cron job or AWS Lambda function to keep your WAF IP set up to date regularly.\nExample cron job to run every hour:\n\nruby\nCopy\nEdit\n0 * * * * /usr/bin/python3 /path/to/tor_waf_updater.py\n🛠️ Troubleshooting\nbotocore.exceptions.NoCredentialsError: Ensure your AWS credentials are properly configured.\n\nAccessDeniedException: Verify your IAM role has the necessary permissions.\n\nRate limits: AWS WAF may have rate-limiting policies; avoid frequent updates.\n\n📝 License\nMIT License. Feel free to use, modify, and distribute this script.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoften%2Ftor-nodes-request","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoften%2Ftor-nodes-request","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoften%2Ftor-nodes-request/lists"}