Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions CH1/1-vulnScanner.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Importing Modules
import socket
import os
import sys


'#This function perform action of connecting to the FTP server and returning the banner.
def retBanner(ip, port):
try:
socket.setdefaulttimeout(2)
Expand All @@ -15,7 +17,8 @@ def retBanner(ip, port):
except:
return


'''checkVulns() takes the variable banner as a parameter and then uses it to make
a determination of the vulnerability of the server.'''
def checkVulns(banner, filename):

f = open(filename, 'r')
Expand All @@ -42,7 +45,7 @@ def main():
print '[-] Usage: ' + str(sys.argv[0]) +\
' <vuln filename>'
exit(0)

#iterate through a known list of ports to check forvulnerabilities.
portList = [21,22,25,80,110,443]
for x in range(147, 150):
ip = '192.168.95.' + str(x)
Expand Down