Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
trustedsec committed Jan 13, 2020
2 parents 3996f8d + 9db5d27 commit 1b5dc3f
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions cve-2019-19781_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def asn_to_ip(asn):
# our main function for testing the vulnerability
def check_server(target, targetport):
try:
print("Testing: %s " % target, end="\r") # Cleaning up output a little
# if for some ungodly reason they are using HTTP
if targetport == "80":
req = requests.get("http://%s:%s/vpn/../vpns/cfg/smb.conf" % (target,targetport), verify=False, timeout=2)
Expand All @@ -44,21 +45,25 @@ def check_server(target, targetport):

# if the system responds with a Citrix message (fixed) or a 403 (fixed)
elif ("Citrix") in str(req.content) or "403" in str(req.status_code): # only seen if system is not vulnerable
print("[\033[92m*\033[0m] Awesome! The server %s is not vulnerable." % (target))
print("[\033[92m*\033[0m] CITRIX Server found, However the server %s is not vulnerable. Awesome!" % (target))

# if we run into something other than Citrix
else:
print("[-] Server %s does not appear to be a Citrix server." % (target))
#print("[-] Server %s does not appear to be a Citrix server." % (target))
pass

# handle exception errors due to timeouts
except requests.ReadTimeout:
print("[-] ReadTimeout: Server %s timed out and didn't respond on port: %s." % (target, targetport))
#print("[-] ReadTimeout: Server %s timed out and didn't respond on port: %s." % (target, targetport))
pass # I don't see the value of printing non-responding servers

except requests.ConnectTimeout:
print("[-] ConnectTimeout: Server %s did not respond to a web request or the port (%s) is not open." % (target, targetport))
#print("[-] ConnectTimeout: Server %s did not respond to a web request or the port (%s) is not open." % (target, targetport))
pass # I don't see the value of printing non-responding servers

except requests.ConnectionError:
print("[-] ConnectionError: Server %s did not respond to a web request or the port (%s) is not open." % (target,targetport))
#print("[-] ConnectionError: Server %s did not respond to a web request or the port (%s) is not open." % (target,targetport))
pass # I don't see the value of printing non-responding servers

print("""
_______ ________ ___ ___ __ ___ __ ___ ______ ___ __
Expand All @@ -68,7 +73,6 @@ def check_server(target, targetport):
| |____ \ / | |____ / /_| |_| || | / / | | / / / / | (_) || |
\_____| \/ |______| |____|\___/ |_| /_/ |_| /_/ /_/ \___/ |_|
CVE-2019-19781-Scanner
Company: TrustedSec
Expand Down Expand Up @@ -128,10 +132,7 @@ def check_server(target, targetport):
if counter == 1: countername = "was"
else: countername = "were"
print("Tested %s Servers : %s %s vulnerable" % (counter, len(vulnServers), countername))
print("-" * 45)
for server in vulnServers:
print("-" * 45)
print(server)




0 comments on commit 1b5dc3f

Please sign in to comment.