This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scapy.all import sniff, PPPoED | |
import threading | |
import subprocess | |
def packet_listener(): | |
print("Starting packet listener on interface eth0...") | |
def handle_packet(packet): | |
print("Packet detected. Checking for PADI packets...") | |
# Check if it's a PADI packet (code 0x09 for PPPoE Discovery Initiation) | |
if PPPoED in packet and packet[PPPoED].code == 0x09: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This software is licensed under the GNU Affero General Public License (AGPL) version 3.0 or later. | |
# For more details, see <https://www.gnu.org/licenses/agpl-3.0.html>. | |
from scapy import all as sp | |
import sys | |
import random as rn | |
iface = sys.argv[1] | |
src_mac = sp.get_if_hwaddr(iface) |