flashnuke / wifi-deauth

A deauth attack that disconnects all devices from the target wifi network (2.4Ghz & 5Ghz)
GNU General Public License v3.0
386 stars 41 forks source link

Error after300 sec #23

Open Benoulimou opened 4 weeks ago

Benoulimou commented 4 weeks ago

Hi, Could you tell me what this error means? It happens all the time after about 300 seconds.

[!] Exception in deauth-loop -> Traceback (most recent call last): File "/usr/local/lib/python3.11/dist-packages/wifi_deauth/wifi_deauth.py", line 321, in _run_deauther self._send_deauth_client(ap_mac, client_mac) File "/usr/local/lib/python3.11/dist-packages/wifi_deauth/wifi_deauth.py", line 335, in _send_deauth_client sendp(RadioTap() / File "/usr/lib/python3/dist-packages/scapy/sendrecv.py", line 480, in sendp return _send( ^^^^^^ File "/usr/lib/python3/dist-packages/scapy/sendrecv.py", line 417, in _send results = __gen_send(socket, x, inter=inter, loop=loop,

thx

flashnuke commented 4 weeks ago

Hi Does the de-auth work during those 300 seconds?

Can you please share the full exception log? (It seems to be truncated)

Benoulimou commented 4 weeks ago

yes, it works Can you tell me where the log is? I don't see anything in the file

flashnuke commented 4 weeks ago

I mean from the output, as the snippet you provided doesn't seem to be full (it gets truncated at results = __gen_send(socket, x, inter=inter, loop=loop,)

Also, which OS are you using? Is it Nethunter (Kali on Android) by any chance?

Benoulimou commented 4 weeks ago

image that's all I have, I'm on kali linux on vm

Benoulimou commented 4 weeks ago

image here's another one after 16 sec

Benoulimou commented 4 weeks ago

image another one after 1096 sec on root user

flashnuke commented 4 weeks ago

Seems like an unhandled exception that comes from scapy library... I will add a try-except mechanism that should help overcome temporary exceptions (I assume this is temporary as the next time you run the script it runs ok)

I will deploy this in the next version, meanwhile I'd suggest to try connecting the network interface to a different USB port

Benoulimou commented 3 weeks ago

ok, I tried to install it on another kali linux machine and I get this error that I can't bypass:

`pip3 install error: externally-managed-environment

× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.

If you wish to install a non-Kali-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have pypy3-venv installed.

If you wish to install a non-Kali-packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

For more information, refer to the following:
* https://www.kali.org/blog/python-externally-managed/
* /usr/share/doc/python3.12/README.venv

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification.

`

flashnuke commented 3 weeks ago

try setting up venv:

python3 -m venv venv
source venv/bin/activate
pip3 install .
Benoulimou commented 3 weeks ago

image

Sorry don't work

flashnuke commented 3 weeks ago

You need to create the venv inside the wifi-deauth directory

git clone https://github.com/flashnuke/wifi-deauth.git
cd wifi-deauth
// Create venv and install here (Using the commands I provided above)
Benoulimou commented 3 weeks ago

great it's work ! thk !

But then I have to stay on venv for it to work?

flashnuke commented 3 weeks ago

great it's work ! thk !

But then I have to stay on venv for it to work?

Your welcome!

Yes, you should stay on venv This limitation is imposed by the new Kali machine it seems

flashnuke commented 3 weeks ago

hey @Benoulimou I believe what you had is a network buffer overflow (due to network congestion - too many packets at a short period) I addressed this in https://github.com/flashnuke/wifi-deauth/pull/24:

now, If a deauth attempt fails - the program would throttle down between each failed attempt, this would allow the buffer to deplete (if the successive attempts fail also - the program will eventually exit as it did before) also I fixed the malformed exception prints

Benoulimou commented 3 weeks ago

Great! this is the error I get on the 1st launch, then when I relaunch it works. image

flashnuke commented 3 weeks ago

Just to clarify, '1st launch' means just once, and now it works flawlessly every time?

Benoulimou commented 3 weeks ago

no, I run it, I get the error, I run it again, I don't get the error and I get it every time

flashnuke commented 3 weeks ago

can you please pull latest, run with debug mode and share the output? i want to see if your interface it set up correctly

git pull
sudo python3 wifi_deauth.py -d -i ...  # use the '-d' flag for debug mode