Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evil Twin Not turn off after giving right password #30

Open
Kuntalchanda opened this issue Jan 23, 2022 · 3 comments
Open

Evil Twin Not turn off after giving right password #30

Kuntalchanda opened this issue Jan 23, 2022 · 3 comments

Comments

@Kuntalchanda
Copy link

Hey I'm checking this project on my own router,
deauthentication attack working great, but issues with EvilTwin, after giving right Wi-Fi password that showing "WRONG PASSWORD" but AP was connected to my ROUTER ( checking my router DHCP client) , but at your Given instranctions ESP8266 not restarted with default ssid M1z23R / deauther and so can't check the stored password !!! , please fix this issue

@cakralithium
Copy link

add intruksi deauthing false after get right password

@giadat
Copy link

giadat commented Oct 21, 2022

thêm intruksi deauthing false sau khi có đúng mật khẩu

What is the order of the line in the code table bro?

@MrDrak045
Copy link

Try this code
from scapy.all import *
import os

Define the legitimate network details

trusted_ssid = "YourNetworkName"
trusted_bssid = "XX:XX:XX:XX:XX:XX" # Replace with your AP's BSSID (MAC address)

def detect_evil_twin(packet):
# Look for beacon frames (type 0, subtype 8)
if packet.haslayer(Dot11Beacon):
ssid = packet[Dot11Elt].info.decode() # Get SSID
bssid = packet[Dot11].addr2 # Get BSSID (MAC address)

    if ssid == trusted_ssid and bssid != trusted_bssid:
        print(f"[ALERT] Evil Twin Detected! SSID: {ssid}, Fake BSSID: {bssid}")

        # Optional: Disable Wi-Fi to stop further connection
        os.system("nmcli radio wifi off")
        print("Wi-Fi disabled for protection.")

Sniff packets on the default Wi-Fi interface

try:
print("Scanning for Evil Twins...")
sniff(iface="wlan0", prn=detect_evil_twin, store=False)
except KeyboardInterrupt:
print("Scan stopped.")
except PermissionError:
print("Run the script with sudo or admin privileges.")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants