diff --git a/lib/controller/controller.py b/lib/controller/controller.py index b0fbf0b98..8a2b94783 100755 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -277,7 +277,7 @@ def start(self) -> None: self.fuzzer.start() self.process() - except KeyboardInterrupt: + except (KeyboardInterrupt, asyncio.CancelledError): pass finally: @@ -330,7 +330,7 @@ def set_target(self, url: str) -> None: if not port: port = STANDARD_PORTS.get(parsed.scheme, None) elif not 0 < port < 65536: - raise InvalidURLException(f"Invalid port number: {port}") + raise InvalidURLException(f"Invalid port number: {port}") if options["ip"]: cache_dns(parsed.hostname, port, options["ip"])