Skip to content

Commit

Permalink
#83 fix the add input argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
anouarbensaad committed Apr 20, 2020
1 parent 1287542 commit 91b5950
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 11 deletions.
3 changes: 3 additions & 0 deletions mywebs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
www.google.com
www.yahoo.com
www.gmail.com
38 changes: 27 additions & 11 deletions vulnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
import signal
import requests

HEADERS = {
'User-Agent': random_UserAgent(),
'Content-type' : '*/*',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language': 'en-US,en;q=0.5',
'Connection': 'keep-alive',
}

warnings.filterwarnings(
action="ignore", message=".*was already imported", category=UserWarning)
Expand Down Expand Up @@ -93,7 +100,7 @@ def parse_args():
def detection():
instance = CMS(
url,
headers=headers,
headers=HEADERS,
exploit=args.exploit,
domain=args.subdomains,
webinfo=args.webinfo,
Expand All @@ -108,7 +115,7 @@ def dork_engine():
if args.dorks:
DEngine = Dork(
exploit=args.dorks,
headers=headers,
headers=HEADERS,
pages=(args.numberpage or 1)
)
DEngine.search()
Expand All @@ -122,7 +129,7 @@ def dorks_manual():

def interactive_cli():
if args.cli:
cli = CLI(headers=headers)
cli = CLI(headers=HEADERS)
cli.general("")

def signal_handler(signal, frame):
Expand All @@ -133,13 +140,6 @@ def signal_handler(signal, frame):

if __name__ == "__main__":

headers = {
'User-Agent': random_UserAgent(),
'Content-type' : '*/*',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language': 'en-US,en;q=0.5',
'Connection': 'keep-alive',
}
dork_engine()
dorks_manual()
interactive_cli()
Expand All @@ -152,4 +152,20 @@ def signal_handler(signal, frame):
else:
url = 'http://'+root
print(url)
detection()
detection()

if input_file:
with open(input_file,'r') as urls:
u_array = [url.strip('\n') for url in urls]
try:
for url in u_array:
root = url
#url condition entrypoint
if root.startswith('http'):
url = root
else:
url = 'http://'+root
detection()
urls.close()
except Exception as error:
print('error : '+error)

0 comments on commit 91b5950

Please sign in to comment.