Skip to content

Commit

Permalink
Error as WifimitmError
Browse files Browse the repository at this point in the history
  • Loading branch information
mvondracek committed Jul 4, 2016
1 parent a20462c commit 27d13c9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion wifimitm/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import subprocess
from contextlib import contextmanager

from wifimitm.common import WifimitmError
from .model import WirelessInterface, WirelessAccessPoint
from .wep import WepAttacker
from .wpa2 import Wpa2Attacker
Expand All @@ -23,7 +24,7 @@
logger = logging.getLogger(__name__)


class NotCrackedError(Exception):
class NotCrackedError(WifimitmError):
pass


Expand Down
4 changes: 4 additions & 0 deletions wifimitm/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
logger = logging.getLogger(__name__)


class WifimitmError(Exception):
pass


def csv_row_station_bssid(row):
"""
Provide associated bssid of given station.
Expand Down
3 changes: 2 additions & 1 deletion wifimitm/impersonation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from enum import Enum, unique
from typing import Optional, Dict

from wifimitm.common import WifimitmError
from wifimitm.updatableProcess import UpdatableProcess
from .model import WirelessInterface, WirelessAccessPoint

Expand Down Expand Up @@ -112,7 +113,7 @@ def parse_from_line(cls, line: str):
client_id = parts[4]
return cls(expiration, mac_address, ip_address, hostname, client_id)

class UnexpectedTerminationError(Exception):
class UnexpectedTerminationError(WifimitmError):
pass

def __init__(self,
Expand Down
4 changes: 3 additions & 1 deletion wifimitm/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
from abc import ABC, abstractmethod
from typing import List

from wifimitm.common import WifimitmError

__author__ = 'Martin Vondracek'
__email__ = '[email protected]'

Expand Down Expand Up @@ -41,7 +43,7 @@ def msg(self) -> str:
"""


class RequirementError(Exception):
class RequirementError(WifimitmError):
def __init__(self, requirement: Requirement):
"""
:type requirement: Requirement
Expand Down
4 changes: 2 additions & 2 deletions wifimitm/wpa2.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
import pkg_resources

from .model import WirelessAccessPoint, WirelessInterface
from .common import WirelessCapturer, deauthenticate
from .common import WirelessCapturer, deauthenticate, WifimitmError

__author__ = 'Martin Vondracek'
__email__ = '[email protected]'

logger = logging.getLogger(__name__)


class Wpa2Error(Exception):
class Wpa2Error(WifimitmError):
pass


Expand Down

0 comments on commit 27d13c9

Please sign in to comment.