Skip to content

Commit 4dd5ccd

Browse files
authored
Merge pull request #11 from flashnuke/new/add_setup
New/add `setup.py`
2 parents 53c6ec1 + 8d4f545 commit 4dd5ccd

File tree

8 files changed

+53
-9
lines changed

8 files changed

+53
-9
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ In order to truly bring the AP down, I usually run simultaneously two de-authers
1414
| 5 GHz | 35 <--> 165 |
1515

1616
## How it works
17-
<img src="https://github.com/flashnuke/wifi-deauth/assets/59119926/7f9efac1-bb33-4bee-8b75-2aadd376d065" width="480">
17+
<img src="https://github.com/flashnuke/wifi-deauth/assets/59119926/26f75cce-0484-4949-840e-d23fa976ff9b" width="480">
1818

1919
The program iterates over all possible channels, and by sniffing `802.11` packets it determines which access points are available. </br>
2020
After the attacker chooses a target access point to attack, the program:
@@ -23,8 +23,19 @@ After the attacker chooses a target access point to attack, the program:
2323

2424

2525
# Usage
26+
#### Installing on the system
2627
```bash
27-
python3 wifi-deauth.py -i <iface>
28+
git clone https://github.com/flashnuke/wifi-deauth.git
29+
sudo pip3 install .
30+
sudo wifi-deauth -i <iface>
31+
```
32+
33+
#### Running without installing
34+
```bash
35+
git clone https://github.com/flashnuke/wifi-deauth.git
36+
pip3 install -r requirements.txt # install requirements manually
37+
cd wifi_deauth
38+
sudo python3 wifi_deauth.py -i <iface>
2839
```
2940

3041
### Usage notes

setup.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from setuptools import setup, find_packages
2+
3+
setup(
4+
name='wifi_deauth',
5+
version='1.21',
6+
description='WiFi deauthentication tool built with Python using the Scapy library',
7+
long_description=open('README.md').read(),
8+
long_description_content_type='text/markdown',
9+
author='Flashnuke',
10+
author_email='flashnuke@users.noreply.github.com',
11+
url='https://github.com/flashnuke/wifi-deauth',
12+
packages=find_packages(),
13+
install_requires=[
14+
'scapy>=2.4.3'
15+
],
16+
classifiers=[
17+
'Programming Language :: Python :: 3',
18+
'Programming Language :: Python :: 3.6',
19+
'Programming Language :: Python :: 3.7',
20+
'Programming Language :: Python :: 3.8',
21+
'Programming Language :: Python :: 3.9',
22+
'Programming Language :: Python :: 3.10'
23+
],
24+
python_requires='>=3.6',
25+
entry_points={
26+
'console_scripts': [
27+
'wifi-deauth=wifi_deauth.wifi_deauth:main',
28+
],
29+
},
30+
)

wifi_deauth/__init__.py

Whitespace-only changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

wifi-deauth.py renamed to wifi_deauth/wifi_deauth.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
#!/usr/bin/env python3
22

3-
import copy
43
import signal
54
import logging
65
import argparse
7-
import traceback
8-
import pkg_resources
96

107
logging.getLogger("scapy.runtime").setLevel(logging.ERROR) # suppress warnings
118

129
from scapy.all import *
1310
from time import sleep
14-
from utils import *
11+
12+
try:
13+
from .utils import *
14+
except ImportError:
15+
from utils import *
1516

1617
conf.verb = 0
1718

@@ -290,7 +291,7 @@ def user_abort(*args):
290291
exit(0)
291292

292293

293-
if __name__ == "__main__":
294+
def main():
294295
signal.signal(signal.SIGINT, Interceptor.user_abort)
295296

296297
printf(f"\n{BANNER}\n"
@@ -304,8 +305,6 @@ def user_abort(*args):
304305

305306
if "linux" not in platform:
306307
raise Exception(f"Unsupported operating system {platform}, only linux is supported...")
307-
with open("requirements.txt", "r") as reqs:
308-
pkg_resources.require(reqs.readlines())
309308

310309
parser = argparse.ArgumentParser(description='A simple program to perform a deauth attack')
311310
parser.add_argument('-i', '--iface', help='a network interface with monitor mode enabled (i.e -> "eth0")',
@@ -327,3 +326,7 @@ def user_abort(*args):
327326
bssid_name=pargs.custom_bssid,
328327
custom_channels=pargs.custom_channels)
329328
attacker.run()
329+
330+
331+
if __name__ == "__main__":
332+
main()

0 commit comments

Comments
 (0)