Skip to content

Commit

Permalink
Update cve-2019-19781_scanner.py
Browse files Browse the repository at this point in the history
  • Loading branch information
trustedsec authored Jan 15, 2020
1 parent 5bb7046 commit 91cd8ca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cve-2019-19781_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,14 @@ def check_server(target, targetport, verbose):
You can use CIDR notations as well for example: 192.168.1.1/24
You can use hostnames instead of IP addresses also.
You can also use a file with IP addresses generated by some external tool.
Example: python3 cve-2019-19781_scanner.py 192.168.1.1/24 443
Example2: python3 cve-2019-19781_scanner.py 192.168.1.1 443
Example3: python3 cve-2019-19781_scanner.py fakewebsiteaddress.com 443
Example4: python3 cve-2019-19781_scanner.py as15169 443
Example5: python3 cve-2019-19781_scanner.py 192.168.1.1/24 443 verbose
Example6: python3 cve-2019-19781_scanner.py file:hostsfile 443
Example6: python3 cve-2019-19781_scanner.py filename(host:port) 443
Usage: python3 cve-2019-19781_scanner.py targetip targetport
""")

Expand All @@ -123,7 +125,9 @@ def check_server(target, targetport, verbose):
else: verbose = False

try:
# specify file option to import host:port
if "file" in (args.target):
print("[*] Importing in list of hosts mapped as host:port from filename: %s" % (args.target))
with open(args.target.split(':')[1], 'r') as file:
hosts= file.read().splitlines()
for ip in hosts:
Expand All @@ -133,6 +137,7 @@ def check_server(target, targetport, verbose):
# wait for the threads to complete
thread.join()

# cidr lookups for ASN lookups
if "as" in (args.target).lower():
CIDR_Blocks = asn_to_ip(args.target)
for ip_block in CIDR_Blocks:
Expand Down

0 comments on commit 91cd8ca

Please sign in to comment.