Skip to content

Commit

Permalink
Final Update
Browse files Browse the repository at this point in the history
  • Loading branch information
PSNAppz committed Nov 26, 2016
1 parent 2a5f672 commit 9dddc16
Show file tree
Hide file tree
Showing 34 changed files with 1,002 additions and 106 deletions.
37 changes: 35 additions & 2 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,16 @@ public function index()
}
public function script(Request $request)
{
$xss=0;
$inj=0;
$head=0;
$crs=null;
$sql=null;
$url = $request->get('url');
$save = $request->get('log');
$process = new Process('cd ViPER && python3 viper.py -u '.$url);
$cross = $request->get('xss');
$sqli = $request->get('inj');
$process = new Process('cd ViPER && python3 ViPER.py -u '.$url.' -a');
$process->setTimeout(3600);
$process->run(function ($type, $buffer){
});
Expand All @@ -51,15 +58,41 @@ public function script(Request $request)
$user = Auth::user();
$user->scans +=1;
$user->save();
if(strpos ($echo,'200')!=false ){
$head=substr_count($echo, "200");
$head = ($head/6)*100;
}
$xss=substr_count($echo, "Vulnerable to Clickjacking");
$xss = ($xss/1)*100;
$inj=substr_count($echo, "SQL Injection!");
$inj-=4;
$inj = ($inj/4)*100;
if($save){
$log = new Log();
$log->url = $source;
$log->user_id=$user->id;
$log->output=$process->getOutput();
$log->save();
}
if($cross){
$process = new Process('cd ViPER && python3 ViPER.py -u '.$url.' -A3');
$process->setTimeout(3600);
$process->run(function ($type, $buffer){
});
$crs = $process->getOutput();

}
if($sqli){
$process = new Process('cd ViPER && python3 ViPER.py -u '.$url.' -A1');
$process->setTimeout(3600);
$process->run(function ($type, $buffer){
});
$sql = $process->getOutput();

}

return view('results')->withEcho($echo)->withSource($source);
$overall=(($head+$inj+$xss)/300)*100;
return view('results')->withEcho($echo)->withSource($source)->withXss($xss)->withInj($inj)->withHead($head)->withCrs($crs)->withSql($sql)->withOverall($overall);

}
public function delete($id){
Expand Down
38 changes: 27 additions & 11 deletions public/ViPER/modules/Cookie.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import base64
import base64
import requests
#from urllib.parse import urlparse
from termcolor.termcolor import colored, cprint


class Cookie():
Expand All @@ -10,21 +10,37 @@ class Cookie():
def __init__(self):
pass

def execute_all_func(self, target):
try:
self.get_cookie(target)
except:
cprint("Errror Getting Cookies", "red")
try:
self.decode_cookie(target)
except:
cprint("Error Decoding Cookies (base64)", "red")

def get_cookie(self, target):
cprint("[*]Getting Cookie", "yellow")
req = requests.get(target)
c = req.cookies
i = c.items()
for name, value in i:
print(name, value)
if i:
for name, value in i:
print(name, value)
else:
cprint("No cookies found", "red")

""" def decode_cookie(self, target):
def decode_cookie(self, target):
cprint("")
cprint("[*]Decoding Cookie", "yellow")
req = requests.get(target)
c = req.cookies
i = c.items()
for name, value in i:
rep = ""
b64 = ""
rep = value.replace("%3D", "=")
b64 = base64.b64decode(rep)
print(b64)
"""
b64 = value.replace("%3D", "=")
try:
b64 = base64.b64decode(b64).decode('ascii')
except:
print("")
print(name, b64)
Binary file modified public/ViPER/modules/Cookie.pyc
Binary file not shown.
Binary file modified public/ViPER/modules/__init__.pyc
Binary file not shown.
Binary file modified public/ViPER/modules/__pycache__/Cookie.cpython-35.pyc
Binary file not shown.
Binary file modified public/ViPER/modules/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file modified public/ViPER/modules/__pycache__/get_Arguments.cpython-35.pyc
Binary file not shown.
Binary file modified public/ViPER/modules/__pycache__/head.cpython-35.pyc
Binary file not shown.
Binary file modified public/ViPER/modules/__pycache__/httpcommands.cpython-35.pyc
Binary file not shown.
Binary file modified public/ViPER/modules/__pycache__/info_disclosure.cpython-35.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions public/ViPER/modules/get_Arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ class arguments():
def get_arguments(self):
parser = argparse.ArgumentParser(description="Web Recon Script")
parser.add_argument('-u', '--url', type=str, help='URL', required=True)
parser.add_argument('-A1', '--info', type=str, help='Injection Attacks')
parser.add_argument('-A3', '--sql', type=str, help='XSS')
args = parser.parse_args()
target = args.url
return target
Binary file modified public/ViPER/modules/get_Arguments.pyc
Binary file not shown.
3 changes: 2 additions & 1 deletion public/ViPER/modules/head.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import requests
from termcolor.termcolor import colored, cprint


class header:
Expand All @@ -12,4 +13,4 @@ def get_headers(self, target):
req = requests.head(target)
req = req.headers
for i in req.items():
print(i[0].ljust(50), i[1].rjust(50))
cprint(i[0].ljust(60)+i[1].rjust(50),'blue')
Binary file modified public/ViPER/modules/head.pyc
Binary file not shown.
64 changes: 45 additions & 19 deletions public/ViPER/modules/httpcommands.py
Original file line number Diff line number Diff line change
@@ -1,53 +1,79 @@
import requests
from termcolor.termcolor import colored, cprint


class httpCommands():
def __init__(self):
pass

def execute_all_func(self, target):
try:
self.get_method(target)
except:
cprint("Error", "red")
try:
self.post_method(target)
except:
cprint("Error", "red")
try:
self.head_method(target)
except:
cprint("Error", "red")
try:
self.put_method(target)
except:
cprint("Error", "red")
try:
self.delete_method(target)
except:
cprint("Error", "red")

def get_method(self, target):
print("Testing GET Method#")
cprint("Testing GET Method", 'yellow')
print("")
req = requests.get(target)
r = req.status_code
if r == 200:
print(r, "OK#")
print(r, "OK")
else:
print("Response:", r)

def post_method(self, target):
print("Testing POST Method#")
try:
req = requests.post(target)
r = req.status_code
if r == 200:
print(r, "OK#")
else:
print("Response", r,"#")
except:
print("I/O Error")
cprint("Testing POST Method",'yellow')
print("")
req = requests.post(target)
r = req.status_code
if r == 200:
print(r, "OK")
else:
print("Response", r)

def head_method(self, target):
print("Testing Head Method#")
cprint("Testing Head Method",'yellow')
print("")
req = requests.head(target)
r = req.status_code
if r == 200:
print(r, "OK#")
print(r, "OK")
else:
print("Response", OK)

def put_method(self, target):
print("Testing Put Method#")
cprint("Testing Put Method",'yellow')
print("")
req = requests.put(target)
r = req.status_code
if r == 200:
print(r,"OK#")
print(r, "OK")
else:
print("Response", r)

def delete_method(self, target):
print("Testing Delete Method#")
cprint("Testing Delete Method",'yellow')
print("")
req = requests.delete(target)
r = req.status_code
if r == 200:
print(r,"OK#")
print(r, "OK")
else:
print("Response", r,"#")
print("Response", r)
Binary file modified public/ViPER/modules/httpcommands.pyc
Binary file not shown.
52 changes: 45 additions & 7 deletions public/ViPER/modules/info_disclosure.py
Original file line number Diff line number Diff line change
@@ -1,36 +1,74 @@
import requests
from urllib.parse import urlsplit
from termcolor.termcolor import colored, cprint


class info():
def __init__(self):
pass

def execute_all_func(self, target):
try:
self.get_robots_txt(target)
except:
cprint("No robots.txt file Found!", "blue")
try:
self.get_dot_git(target)
except:
cprint("Error !", "red")
try:
self.get_dot_svn(target)
except:
cprint("Error", "red")
try:
self.get_dot_htaccess(target)
except:
cprint("Error", "red")

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
print(r,"#")
cprint(r, '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:
subprocess.call("wget -r"+target, shell=True)
cprint("Alert!", 'red')
cprint(".git folder exposed publicly", 'red')
else:
print("NO .git folder found#")
print("NO .git folder found", 'blue')

def get_dot_svn(self, target):
cprint("[*]Checking for .svn folder", 'yellow')
url = target
target = "{0.scheme}://{0.netloc}/".format(urlsplit(url))
req = requests.get(target+"/.svn/entries")
r = req.status_code
if r == 200:
print(r,"#")
cprint("Alert!", 'red')
cprint(".SVN folder exposed publicly", 'red')
else:
print("NO .SVN folder found#")
cprint("NO .SVN folder found", '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:
print("403 Forbidden#")
cprint("403 Forbidden", 'blue')
elif statcode == 200:
cprint("Alert!!", 'blue')
cprint(".htaccess file found publicly!", 'blue')
else:
print(r,"#")
cprint("Status code", 'blue')
cprint(statcode, 'blue')
Binary file modified public/ViPER/modules/info_disclosure.pyc
Binary file not shown.
Loading

0 comments on commit 9dddc16

Please sign in to comment.