summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralexej996 <aleksej@spidermail.tk>2019-08-13 14:35:41 +0200
committeralexej996 <aleksej@spidermail.tk>2019-08-13 14:35:41 +0200
commitf9b3e6ed7e7363fc6efdd1e87b2ce90e2f14bff9 (patch)
treeaf1e7eca70b06ced6ff1702552fe6c6440181461
parentc07c53e18731be3bdeacf4923a4449be894cdbdc (diff)
dont print carrige return
-rwxr-xr-xtmap6
1 files changed, 3 insertions, 3 deletions
diff --git a/tmap b/tmap
index 90d4971..2871e92 100755
--- a/tmap
+++ b/tmap
@@ -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: