Skip to content

Commit

Permalink
changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Brock committed Dec 22, 2014
1 parent d985e85 commit ae5d1bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Intersect-2.0/Intersect2-Beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
import getpass
import pwd

conf = object()
conf.verb = 1
cut = lambda s: str(s).split("\0",1)[0]

logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
Expand Down
7 changes: 5 additions & 2 deletions tcpscan2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@
import socket
import getopt

def detect_port(host, port):
def detect_port(host, port, connect_only = False):
s = socket.socket()
s.settimeout(1)
try:
s.connect((host, port))
if connect_only:
print port
return
s.send('GET / HTTP/1.0\n\n')
buf = s.recv(1024)
print port, buf[:buf.find('\n')]
Expand All @@ -26,7 +29,7 @@ def detect_port(host, port):

s.close()

ports = (21, 22, 23, 25, 53, 69, 80, 110, 135, 137, 139, 445, 1025,
ports = (21, 22, 23, 25, 53, 69, 80, 110, 135, 137, 139, 445, 1025, 1080
1194, 1433, 1521, 3306, 3389, 5900, 8000, 8080)
for port in ports:
detect_port(sys.argv[1], port)
Expand Down

0 comments on commit ae5d1bf

Please sign in to comment.