Skip to content

Commit 1b153e5

Browse files
committed
Fix packaging, remove debug prints, modernize class definitions
Packaging: - Add missing packages to setup.py: native, ui, attack/portal These subpackages were not included in the install, causing ImportError when installed via pip/setup.py Debug cleanup: - Remove stray `print('@@@ to dict', ...)` debug statements from wps_result.py and ignored_result.py Modernize Python 3 style: - Remove unnecessary `(object)` base class from 12 class definitions across wifite.py, config.py, args.py, all.py, result.py, attack.py, color.py, scanner.py, client.py, handshake.py, target.py All 575 tests pass. https://claude.ai/code/session_015S3rdrYgPHPLA4hWo6yr5g
1 parent 8283b7e commit 1b153e5

14 files changed

Lines changed: 15 additions & 14 deletions

File tree

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@
1919
packages=[
2020
'wifite',
2121
'wifite/attack',
22+
'wifite/attack/portal',
2223
'wifite/model',
24+
'wifite/native',
2325
'wifite/tools',
26+
'wifite/ui',
2427
'wifite/util',
2528
],
2629
data_files=[

wifite/args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import sys
88

99

10-
class Arguments(object):
10+
class Arguments:
1111
""" Holds arguments used by the Wifite """
1212

1313
def __init__(self, configuration):

wifite/attack/all.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Answer(Enum):
2020
Continue = 3
2121
Ignore = 4
2222

23-
class AttackAll(object):
23+
class AttackAll:
2424
@classmethod
2525
def attack_multiple(cls, targets, session=None, session_mgr=None):
2626
"""

wifite/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from .tools.macchanger import Macchanger
88

99

10-
class Configuration(object):
10+
class Configuration:
1111
""" Stores configuration variables and functions for Wifite. """
1212

1313
initialized = False # Flag indicating config has been initialized

wifite/model/attack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from ..config import Configuration
66

77

8-
class Attack(object):
8+
class Attack:
99
"""Contains functionality common to all attacks."""
1010

1111
target_wait = min(60, Configuration.wpa_attack_timeout)

wifite/model/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44

5-
class Client(object):
5+
class Client:
66
"""
77
Holds details for a 'Client' - a wireless device (e.g. computer)
88
that is associated with an Access Point (e.g. router)

wifite/model/handshake.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import os
1010

1111

12-
class Handshake(object):
12+
class Handshake:
1313

1414
def __init__(self, capfile, bssid=None, essid=None):
1515
self.capfile = capfile

wifite/model/ignored_result.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def print_single_line(self, longest_essid):
3434

3535
def to_dict(self):
3636
with suppress_stdout_stderr():
37-
print('@@@ to dict', self.__dict__)
3837
return {
3938
'type': self.result_type,
4039
'date': self.date,

wifite/model/result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from json import loads, dumps
1010

1111

12-
class CrackResult(object):
12+
class CrackResult:
1313
""" Abstract class containing results from a crack session """
1414

1515
# File to save cracks to, in PWD

wifite/model/target.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class WPSState:
99
NONE, UNLOCKED, LOCKED, UNKNOWN = list(range(4))
1010

1111

12-
class ArchivedTarget(object):
12+
class ArchivedTarget:
1313
"""
1414
Holds information between scans from a previously found target
1515
"""
@@ -42,7 +42,7 @@ def __eq__(self, other):
4242
# Check if the other class type is either ArchivedTarget or Target
4343
return isinstance(other, (self.__class__, Target)) and self.bssid == other.bssid
4444

45-
class Target(object):
45+
class Target:
4646
"""
4747
Holds details for a 'Target' aka Access Point (e.g. router).
4848
"""

0 commit comments

Comments
 (0)