Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

PythonHackingScripts

A collection of Python scripts for network reconnaissance and penetration testing, built with Scapy. Written as practical learning exercises for understanding core network attack techniques at the packet level.

⚠️ LEGAL & ETHICAL DISCLAIMER These scripts are for educational purposes and authorized security testing only. You may only run them against systems and networks you own or have explicit written permission to test. Unauthorized use is illegal and may result in criminal prosecution. You are responsible for how you use this code.

Requirements

pip install -r requirements.txt

netfilterqueue needs the system headers (on Debian/Ubuntu: sudo apt install libnetfilter-queue-dev) before it can build. It's only used by dnsspoofer.py.

Run all scripts with sudo — they manipulate network interfaces and packets.

Scripts

arpscanner.py

Discovers live hosts on a network by sending ARP requests to a target range and listing the IP + MAC address of every responding device.

sudo python3 arpscanner.py -r 192.168.1.0/24
IP address              MAC address
192.168.1.1             00:11:22:33:44:55
192.168.1.42            aa:bb:cc:dd:ee:ff

arpspoofer.py

Classic ARP man-in-the-middle attack. Continuously poisons the ARP tables of a target and the router so traffic flows through your machine. Restores the ARP tables automatically when stopped with Ctrl+C.

sudo python3 arpspoofer.py -t 192.168.1.100 -r 192.168.1.1

Enable IP forwarding to route the victim's traffic: sudo sysctl net.ipv4.ip_forward=1

macchanger.py

Changes the MAC address of a network interface and verifies the change.

sudo python3 macchanger.py -i wlan0 -m 00:11:22:33:44:55

packetsniffer.py

HTTP packet sniffer. Captures live traffic on an interface, prints HTTP request URLs, and flags payloads that look like credentials (username/password keywords).

sudo python3 packetsniffer.py

The target interface is hardcoded to wlan0 — edit the sniff("wlan0") line to match your interface.

dnsspoofer.py

Work-in-progress DNS spoofing skeleton. Currently only binds to a NetfilterQueue and prints packets — it does not yet modify or forge DNS responses.

sudo iptables -I FORWARD -j NFQUEUE --queue-num 0
sudo python3 dnsspoofer.py

Notes

  • These scripts use the legacy optparse module and were written as educational exercises; they prioritize readability over robustness.
  • Some scripts have hardcoded values (e.g. the sniffing interface) — adjust them to your environment.

License

Free to use and modify.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages