This commit is contained in:
Maks Snegov 2020-02-10 09:24:07 +03:00
parent 7f7cd1944f
commit 364d6a9784
2 changed files with 65 additions and 0 deletions

17
vulnftp/banner.txt Normal file
View File

@ -0,0 +1,17 @@
3Com 3CDaemon FTP Server Version 2.0
Ability Server 2.34
CCProxy Telnet Service Ready
ESMTP TABS Mail Server for Windows NT
FreeFloat Ftp Server (Version 1.00)
IMAP4rev1 MDaemon 9.6.4 ready
MailEnable Service, Version: 0-1.54
NetDecision-HTTP-Server 1.0
PSO Proxy 0.9
SAMBAR
Sami FTP Server 2.0.2
Spipe 1.0
TelSrv 1.5
WDaemon 6.8.5
WinGate 6.1.1
Xitami
YahooPOPs! Simple Mail Transfer Service Ready

48
vulnftp/vulnftp.py Normal file
View File

@ -0,0 +1,48 @@
import socket
import os
import sys
def retBanner(ip, port):
try:
socket.setdefaulttimeout(2)
s = socket.socket()
s.connect((ip, port))
banner = s.recv(1024)
return banner
except:
return
def checkVulns(banner, filename):
f = open(filename, "r")
for line in f.readlines():
if line.strip("\n") in str(banner):
print("[+] Server is vulnerable: %s " % banner.strip("\n"))
def main():
if len(sys.argv) == 2:
filename = sys.argv[1]
if not os.path.isfile(filename):
print("[-] " + filename + " does not exist.")
exit(0)
if not os.access(filename, os.R_OK):
print("[-] " + filename + " access denied.")
exit(0)
else:
print("[-] Usage: " + str(sys.argv[0]) + "<vuln filename")
exit(0)
portList = [21, 22, 25, 80, 110, 443]
for x in range(17, 18):
ip = "10.211.55." + str(x)
for port in portList:
banner = retBanner(ip, port)
if banner:
print(f"[+] {ip}: {banner}")
checkVulns(banner, filename)
if __name__ == "__main__":
main()