Improved exception throwing

This commit is contained in:
VakarisZ 2019-09-11 17:23:28 +03:00
parent 02c7d6c30e
commit 994b6ed63d
2 changed files with 2 additions and 2 deletions

View File

@ -185,7 +185,7 @@ class MSSQLExploiter(HostExploiter):
LOG.warning('No user/password combo was able to connect to host: {0}:{1}, '
'aborting brute force'.format(host, port))
raise Exception("Bruteforce process failed on host: {0}".format(self.host.ip_addr))
raise RuntimeError("Bruteforce process failed on host: {0}".format(self.host.ip_addr))
class MSSQLLimitedSizePayload(LimitedSizePayload):

View File

@ -85,6 +85,6 @@ class MonkeyHTTPServer(HTTPTools):
def stop(self):
if not self.http_path or not self.http_thread:
raise Exception("Can't stop http server that wasn't started!")
raise RuntimeError("Can't stop http server that wasn't started!")
self.http_thread.join(DOWNLOAD_TIMEOUT)
self.http_thread.stop()