Fixed ms08-067 python3 migration bug (bytes/strings mixup)

This commit is contained in:
VakarisZ 2020-08-26 13:04:34 +03:00
parent bdb7fd4a23
commit 99c302d4dc
1 changed files with 2 additions and 2 deletions

View File

@ -250,8 +250,8 @@ class Ms08_067_Exploiter(HostExploiter):
vulnerable_port=SRVSVC_Exploit.TELNET_PORT)
try:
sock.send("start %s\r\n" % (cmdline,))
sock.send("net user %s /delete\r\n" % (self._config.user_to_add,))
sock.send(("start %s\r\n" % (cmdline,)).encode())
sock.send(("net user %s /delete\r\n" % (self._config.user_to_add,)).encode())
except Exception as exc:
LOG.debug("Error in post-debug phase while exploiting victim %r: (%s)", self.host, exc)
return False