Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_dot_git(self, target):
cprint("[*]Checking for .git folder", 'yellow')
url = target
target = "{0.scheme}://{0.netloc}/".format(urlsplit(url))
req = requests.get(target+"/.git/")
r = req.status_code
if r == 200:
cprint("Alert!", 'red')
cprint(".git folder exposed publicly", 'red')
else:
print("NO .git folder found", 'blue')
def get_dot_git(self, target):
cprint("[*]Checking for .git folder", 'yellow')
url = target
target = "{0.scheme}://{0.netloc}/".format(urlsplit(url))
req = requests.get(target+"/.git/")
r = req.status_code
if r == 200:
cprint("Alert!", 'red')
cprint(".git folder exposed publicly", 'red')
else:
print("NO .git folder found", 'blue')
def get_robots_txt(self, target):
cprint("[*]Checking for Robots.txt", 'yellow')
url = target
target = "{0.scheme}://{0.netloc}/".format(urlsplit(url))
req = requests.get(target+"/robots.txt")
r = req.text
cprint(r, 'blue')
def get_dot_htaccess(self, target):
cprint("[*]Checking for .htaccess", 'yellow')
url = target
target = "{0.scheme}://{0.netloc}/".format(urlsplit(url))
req = requests.get(target+"/.htaccess")
r = req.text
statcode = req.status_code
if statcode == 403:
cprint("403 Forbidden", 'blue')
elif statcode == 200:
cprint("Alert!!", 'blue')
cprint(".htaccess file found!", 'blue')
else:
cprint("Status code", 'blue')
cprint(statcode, 'blue')
def get_dot_htaccess(self, target):
cprint("[*]Checking for .htaccess", 'yellow')
url = target
target = "{0.scheme}://{0.netloc}/".format(urlsplit(url))
req = requests.get(target+"/.htaccess")
r = req.text
statcode = req.status_code
if statcode == 403:
cprint("403 Forbidden", 'blue')
elif statcode == 200:
cprint("Alert!!", 'blue')
cprint(".htaccess file found!", 'blue')
else:
cprint("Status code", 'blue')
cprint(statcode, 'blue')
i.execute_all_func(target)
cprint("--------------------------------------------------------------", 'green')
cprint("[+] Testing HTTP Methods", 'yellow')
cprint("--------------------------------------------------------------", 'green')
hc = httpCommands()
hc.execute_all_func(target)
if args.injection or args.All:
cprint("--------------------------------------------------------------", 'green')
cprint("[+] Checking for SQL Injection", 'yellow')
cprint("--------------------------------------------------------------", 'green')
sql = sqli()
sql.execute_all_func(target)
if args.xss or args.All:
cprint("---------------------------------------------------------------", 'green')
cprint("[+] Checking for XSS Injection", 'yellow')
cprint("--------------------------------------------------------------", 'green')
x = xss()
x.execute_all_func(target)
if __name__ == '__main__':
def main():
parser = argparse.ArgumentParser(description="Web Recon Script")
parser.add_argument('-u', '--url', type=str, help='URL', required=True)
parser.add_argument('-A1', '--injection', help='Injection Attacks', action="store_true")
parser.add_argument('-A3', '--xss', help='XSS', action="store_true")
parser.add_argument('-a', '--All', help='All possible Attacks', action="store_true")
args = parser.parse_args()
target = args.url
cprint('`````````````````````````````````````````````````````', 'red')
cprint('````````` ```````', 'red')
cprint('````````` ```````', 'red')
cprint('````````` ```````', 'red')
cprint('```````````````````````````````````````````````````````', 'red')
cprint("--------------------------------------------------------------", 'green')
cprint("[+] Getting the Headers", 'yellow')
cprint("--------------------------------------------------------------", 'green')
h = header()
h.get_headers(target)
cprint("--------------------------------------------------------------", 'green')
cprint("[+] Extracting Cookies ", 'yellow')
cprint("--------------------------------------------------------------", 'green')
c = Cookie()
c.execute_all_func(target)
cprint("--------------------------------------------------------------", 'green')
cprint("[+] Information Disclosure", 'yellow')
cprint("--------------------------------------------------------------", 'green')
i = info()
i.execute_all_func(target)
cprint("--------------------------------------------------------------", 'green')
def main():
parser = argparse.ArgumentParser(description="Web Recon Script")
parser.add_argument('-u', '--url', type=str, help='URL', required=True)
parser.add_argument('-A1', '--injection', help='Injection Attacks', action="store_true")
parser.add_argument('-A3', '--xss', help='XSS', action="store_true")
parser.add_argument('-a', '--All', help='All possible Attacks', action="store_true")
args = parser.parse_args()
target = args.url
cprint('`````````````````````````````````````````````````````', 'red')
cprint('````````` ```````', 'red')
cprint('````````` ```````', 'red')
cprint('````````` ```````', 'red')
cprint('```````````````````````````````````````````````````````', 'red')
cprint("--------------------------------------------------------------", 'green')
cprint("[+] Getting the Headers", 'yellow')
cprint("--------------------------------------------------------------", 'green')
h = header()
h.get_headers(target)
cprint("--------------------------------------------------------------", 'green')
cprint("[+] Extracting Cookies ", 'yellow')
cprint("--------------------------------------------------------------", 'green')
c = Cookie()
c.execute_all_func(target)
cprint("--------------------------------------------------------------", 'green')
cprint("[+] Information Disclosure", 'yellow')
cprint("--------------------------------------------------------------", 'green')
def main():
parser = argparse.ArgumentParser(description="Web Recon Script")
parser.add_argument('-u', '--url', type=str, help='URL', required=True)
parser.add_argument('-A1', '--injection', help='Injection Attacks', action="store_true")
parser.add_argument('-A3', '--xss', help='XSS', action="store_true")
parser.add_argument('-a', '--All', help='All possible Attacks', action="store_true")
args = parser.parse_args()
target = args.url
cprint('`````````````````````````````````````````````````````', 'red')
cprint('````````` ```````', 'red')
cprint('````````` ```````', 'red')
cprint('````````` ```````', 'red')
cprint('```````````````````````````````````````````````````````', 'red')
cprint("--------------------------------------------------------------", 'green')
cprint("[+] Getting the Headers", 'yellow')
cprint("--------------------------------------------------------------", 'green')
h = header()
h.get_headers(target)
cprint("--------------------------------------------------------------", 'green')
cprint("[+] Extracting Cookies ", 'yellow')
cprint("--------------------------------------------------------------", 'green')
c = Cookie()
c.execute_all_func(target)
cprint("--------------------------------------------------------------", 'green')
cprint("[+] Information Disclosure", 'yellow')
cprint("--------------------------------------------------------------", 'green')
i = info()