{"id":51266358,"url":"https://github.com/ma1loc/arp_spoofing","last_synced_at":"2026-06-29T15:37:52.913Z","repository":{"id":294298155,"uuid":"985188575","full_name":"ma1loc/arp_spoofing","owner":"ma1loc","description":"This ARP spoofing tool allows an attacker to intercept or manipulate traffic between a target device and its router by sending forged ARP replies","archived":false,"fork":false,"pushed_at":"2025-05-22T10:03:11.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-29T15:37:51.568Z","etag":null,"topics":["arp","arp-spoofing","ethical-hacking-tools","network-analysis","python-networking","python-tools","python3","scapy-library"],"latest_commit_sha":null,"homepage":"","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/ma1loc.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,"zenodo":null}},"created_at":"2025-05-17T08:40:03.000Z","updated_at":"2025-05-22T10:03:14.000Z","dependencies_parsed_at":"2025-05-19T20:21:58.916Z","dependency_job_id":"784e691c-04da-42ed-9045-23b1d058b6af","html_url":"https://github.com/ma1loc/arp_spoofing","commit_stats":null,"previous_names":["ma1loc/arp_spoofing"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ma1loc/arp_spoofing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ma1loc%2Farp_spoofing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ma1loc%2Farp_spoofing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ma1loc%2Farp_spoofing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ma1loc%2Farp_spoofing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ma1loc","download_url":"https://codeload.github.com/ma1loc/arp_spoofing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ma1loc%2Farp_spoofing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34933502,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"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":["arp","arp-spoofing","ethical-hacking-tools","network-analysis","python-networking","python-tools","python3","scapy-library"],"created_at":"2026-06-29T15:37:51.878Z","updated_at":"2026-06-29T15:37:52.891Z","avatar_url":"https://github.com/ma1loc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ARP Spoofing Tool\nA Python-based tool for performing ARP spoofing attacks on local networks for penetration testing and educational purposes.\n\n## Features\n- **Bidirectional Spoofing**: Intercepts traffic between target and gateway by spoofing both directions\n- **Automatic MAC Resolution**: Automatically discovers MAC addresses of target and router\n- **Network Restoration**: Restores legitimate ARP entries when the attack is stopped\n- **IP Validation**: Validates input IP addresses to ensure proper format\n- **Colorized Output**: Uses color-coded terminal messages for better readability\n- **Graceful Exit**: Handles interruption signals and properly restores network state\n\n## Prerequisites\n- Python 3.x\n- Root/Administrator privileges (required for raw packet operations)\n- Linux/Unix operating system (recommended for best compatibility)\n\n## Installation\n1. Clone the repository or download the source code\n2. Install the required dependencies:\n```bash\npip install scapy\n```\n\n## Project Structure\n```\narp_spoofing/\n├── arp.py              # ARP spoofing and restoration functions\n├── arp_spoofing.py     # Main entry point for the application\n├── arp_utils.py        # Utility functions (root check, MAC resolution)\n├── arg_parsing.py      # Command-line argument parsing\n├── rgb_msg.py          # Colored output functions\n└── README.md\n6 files\n```\n\n## Usage\n### Basic Usage\nPerform ARP spoofing between a target and router:\n```bash\nsudo python arp_spoofing.py -t 192.168.1.100 -r 192.168.1.1\n```\n\n### Using Long Form Arguments\n```bash\nsudo python arp_spoofing.py --target 192.168.1.100 --router 192.168.1.1\n```\n\n## Command Line Arguments\n| Argument | Long Form | Description |\n|----------|-----------|-------------|\n| `-t` | `--target` | IP address of the target/victim to spoof (required) |\n| `-r` | `--router` | IP address of the router/gateway (required) |\n\n## Output Format\nThe tool displays real-time packet information:\n```\n[+] packet_send -\u003e 1\n[+] packet_send -\u003e 2\n[+] packet_send -\u003e 3\n...\n```\n\nWhen stopped with Ctrl+C:\n```\n^C\n[*] Restoring network...\n[+] Quit\n```\n\n## How It Works\n1. The tool resolves MAC addresses for both target and router using ARP requests\n2. Sends crafted ARP responses to both target and router:\n   - Tells the target that the attacker's MAC address belongs to the router\n   - Tells the router that the attacker's MAC address belongs to the target\n3. All traffic between target and router is redirected through the attacker's machine\n4. On exit, sends legitimate ARP responses to restore normal network communication\n\n## Security and Ethical Use\nThis tool is intended for authorized penetration testing and educational purposes only. Please ensure you have explicit written permission before testing on any network. Unauthorized use of this tool may be illegal and unethical.\n\n## Troubleshooting\n### Common Issues\n- **\"You must run this script as root\"**: The application requires root privileges to send raw packets\n- **\"Failed to get MAC for [IP]\"**: The target IP address is unreachable or not responding to ARP requests\n- **\"IPs format not valid\"**: One or both IP addresses are not in valid IPv4 format\n\n### Debug Steps\n1. Verify target and router IPs are reachable with `ping`\n2. Check current ARP table with `arp -a`\n3. Ensure you're on the same network segment as the targets\n4. Verify network interface is active and properly configured\n\n## Contributing\nContributions are welcome for educational improvements! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fma1loc%2Farp_spoofing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fma1loc%2Farp_spoofing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fma1loc%2Farp_spoofing/lists"}