diff options
author | alexej996 <aleksej@spidermail.tk> | 2019-08-13 14:35:41 +0200 |
---|---|---|
committer | alexej996 <aleksej@spidermail.tk> | 2019-08-13 14:35:41 +0200 |
commit | f9b3e6ed7e7363fc6efdd1e87b2ce90e2f14bff9 (patch) | |
tree | af1e7eca70b06ced6ff1702552fe6c6440181461 | |
parent | c07c53e18731be3bdeacf4923a4449be894cdbdc (diff) |
dont print carrige return
-rwxr-xr-x | tmap | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -66,7 +66,7 @@ def getBanner(host, port, wait, notor): try: banner = sckt.recv(80) sckt.close() - return banner.decode().replace('\n','') + return banner.decode().replace('\n','\\n').replace('\r','\\r') except KeyboardInterrupt: exit() except Exception as e: @@ -77,9 +77,9 @@ def getBanner(host, port, wait, notor): payload = "GET / HTTP/1.1\r\nHost: " + str(host) + "\r\nUser-Agent: Mozilla/5.0\r\n\r\n" ## Encode the payload and send it all sckt.sendall(payload.encode()) - banner = sckt.recv(20) + banner = sckt.recv(80) sckt.close() - return banner.decode().replace('\n','') + return banner.decode().replace('\n','\\n').replace('\r','\\r') except: return "banner_error" else: |