Skip to content

Commit 3c893d7

Browse files
authored
Show IP address for hosts with stupid rdns
1 parent dbd5f22 commit 3c893d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tcpbin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def handle_client(self, sock,addr,idx):
168168
print('New connection from %s:%s (%s)' % (hostname, port, from_addr))
169169
if self.anon:
170170
hostname = 'anon'
171-
host = '%s:%s' % (hostname, port)
171+
host = '%s_%s:%s' % (from_addr, hostname, port)
172172

173173
log_filename = FILENAME_TEMPLATE.format(timestamp=time.strftime(TIMESTAMP_TEMPLATE), conn_id=idx, local_port=self.port, remote_host=host) + self.handler.get_file_ext()
174174
if os.name == 'nt':

0 commit comments

Comments
 (0)