Skip to content

Commit

Permalink
Update socksserver.py
Browse files Browse the repository at this point in the history
Fix hostname parsing
  • Loading branch information
gjhami authored Oct 31, 2024
1 parent de9d893 commit 1ef6ade
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion impacket/examples/ntlmrelayx/servers/socksserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def handle(self):
self.targetPort = unpack('>H',request['PAYLOAD'][4:])[0]
elif request['ATYP'] == ATYP.DOMAINNAME.value:
hostLength = unpack('!B',request['PAYLOAD'][:1])[0]
self.targetHost = request['PAYLOAD'][1:hostLength+1]
self.targetHost = request['PAYLOAD'][1:hostLength+1].decode(encoding='utf-8')
self.targetPort = unpack('>H',request['PAYLOAD'][hostLength+1:])[0]
else:
LOG.error('No support for IPv6 yet!')
Expand Down

0 comments on commit 1ef6ade

Please sign in to comment.