-
Notifications
You must be signed in to change notification settings - Fork 160
/
scan.py
68 lines (59 loc) · 2.63 KB
/
scan.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env python
# WebPwn3r is a Web Applications Security Scanner
# By Ebrahim Hegazy - twitter.com/zigoo0
# First demo conducted 12Apr-2014 @OWASP Chapter Egypt
# https://www.owasp.org/index.php/Cairo
import re
import urllib
from headers import *
from vulnz import *
print ga.green+'''
__ __ _ _____ ____
\ \ / / | | | __ \ |___ \
\ \ /\ / /__| |__ | |__) |_ ___ __ __) |_ __
\ \/ \/ / _ \ '_ \| ___/\ \ /\ / / '_ \ |__ <| '__|
\ /\ / __/ |_) | | \ V V /| | | |___) | |
\/ \/ \___|_.__/|_| \_/\_/ |_| |_|____/|_|
##############################################################
#| "WebPwn3r" Web Applications Security Scanner #
#| By Ebrahim Hegazy - @Zigoo0 #
#| This Version Supports Remote Code/Command Execution, XSS #
#| And SQL Injection. #
#| Thanks @lnxg33k, @dia2diab @Aelhemily, @okamalo #
#| More Details: http://www.sec-down.com/wordpress/?p=373 #
##############################################################
'''+ga.end
def urls_or_list():
url_or_list = raw_input(" [!] Scan URL or List of URLs? [1/2]: ")
if url_or_list == "1":
url = raw_input(" [!] Enter the URL: ")
#if not url.startswith("http://"):
#Thanks to Nu11 for the HTTP checker
#print ga.red+'''\n Invalid URL, Please Make Sure That The URL Starts With \"http://\" \n'''+ga.end
#exit()
if "?" in url:
rce_func(url)
xss_func(url)
error_based_sqli_func(url)
else:
print ga.red +"\n [Warning] "+ ga.end + ga.bold+"%s"%url +ga.end + ga.red +" is not a valid URL"+ga.end
print ga.red +" [Warning] You should write a Full URL .e.g http://site.com/page.php?id=value \n"+ ga.end
exit()
if url_or_list =="2":
urls_list = raw_input( ga.green+" [!] Enter the list file name .e.g [list.txt]: "+ga.end)
open_list = open(urls_list).readlines()
for line in open_list:
if "?" in line:
links = line.strip()
url = links
print ga.green+" \n [!] Now Scanning %s"%url +ga.end
rce_func(url)
xss_func(url)
error_based_sqli_func(url)
else:
links = line.strip()
url = links
print ga.red +"\n [Warning] "+ ga.end + ga.bold+"%s"%url +ga.end + ga.red +" is not a valid URL"+ga.end
print ga.red +" [Warning] You should write a Full URL .e.g http://site.com/page.php?id=value \n"+ ga.end
exit()
urls_or_list()