diff --git a/setup.py b/setup.py index 081ed6a..2d7401d 100644 --- a/setup.py +++ b/setup.py @@ -8,10 +8,14 @@ import re from distutils.dir_util import copy_tree import sys -# check version the python install +# check version the python install if not (sys.version_info.major == 3 and sys.version_info.minor >= 7): print("[!] Wifipumpkin3 requires Python 3.7 or higher!") - print("[*] You are using Python {}.{}.".format(sys.version_info.major, sys.version_info.minor)) + print( + "[*] You are using Python {}.{}.".format( + sys.version_info.major, sys.version_info.minor + ) + ) sys.exit(1) diff --git a/wifipumpkin3/__init__.py b/wifipumpkin3/__init__.py index 5516631..2582dad 100644 --- a/wifipumpkin3/__init__.py +++ b/wifipumpkin3/__init__.py @@ -70,9 +70,9 @@ class PumpkinShell(Qt.QObject, ConsoleUI): self.all_modules = module_list - # intialize the LoggerManager - #TODO: this change solve IndexError: list index out of range - # but not a definitive solution + # intialize the LoggerManager + # TODO: this change solve IndexError: list index out of range + # but not a definitive solution self.logger_manager = LoggerManager(self) self.coreui = DefaultController(self) diff --git a/wifipumpkin3/core/servers/dhcp/pyDHCP.py b/wifipumpkin3/core/servers/dhcp/pyDHCP.py index 09d288a..719c95a 100644 --- a/wifipumpkin3/core/servers/dhcp/pyDHCP.py +++ b/wifipumpkin3/core/servers/dhcp/pyDHCP.py @@ -1,5 +1,6 @@ from wifipumpkin3.core.packets.dhcpserver import DHCPThread from wifipumpkin3.core.servers.dhcp.dhcp import DHCPServers +from wifipumpkin3.core.utility.printer import display_messages, setcolor # This file is part of the wifipumpkin3 Open Source Project. # wifipumpkin3 is licensed under the Apache 2.0. @@ -40,6 +41,15 @@ class PyDHCP(DHCPServers): def get_DHCPoutPut(self, data): self._connected[data["MAC"]] = data + if self.conf.get("accesspoint", "status_ap", format=bool): + print( + display_messages( + "{} client join the AP ".format( + setcolor(data["MAC"], color="green") + ), + info=True, + ) + ) def boot(self): self.reactor = DHCPThread(self.ifaceHostapd, self.DHCPConf)