Skip to content

Commit 9f69428

Browse files
committed
Interface Update
1 parent 680a4cd commit 9f69428

32 files changed

+421
-12
lines changed

app/Http/Controllers/HomeController.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
namespace App\Http\Controllers;
44

55
use Illuminate\Http\Request;
6+
use Symfony\Component\Process\Process;
7+
use Symfony\Component\Process\Exception\ProcessFailedException;
8+
use App\Log;
69

710
class HomeController extends Controller
811
{
@@ -25,4 +28,22 @@ public function index()
2528
{
2629
return view('home');
2730
}
31+
public function script(Request $request)
32+
{
33+
$url = $request->get('url');
34+
$save = $request->get('log');
35+
$process = new Process('cd ViPER && python3 viper.py -u '.$url);
36+
$process->setTimeout(3600);
37+
$process->run(function ($type, $buffer){
38+
});
39+
$echo = $process->getOutput();
40+
if($save){
41+
$log = new Log();
42+
$log->url = $url;
43+
$log->output=$process->getOutput();
44+
$log->save();
45+
}
46+
return view('results')->withEcho($echo);
47+
48+
}
2849
}

app/Log.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace App;
4+
5+
use Illuminate\Database\Eloquent\Model;
6+
7+
class Log extends Model
8+
{
9+
//
10+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class Logs extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('logs', function (Blueprint $table) {
17+
$table->increments('id');
18+
$table->string('url');
19+
$table->text('output');
20+
$table->timestamps();
21+
});
22+
}
23+
24+
/**
25+
* Reverse the migrations.
26+
*
27+
* @return void
28+
*/
29+
public function down()
30+
{
31+
Schema::dropIfExists('logs');
32+
}
33+
}

public/ViPER/modules/Cookie.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#import base64
2+
import requests
3+
#from urllib.parse import urlparse
4+
5+
6+
class Cookie():
7+
"""
8+
Class for extracting Cookies
9+
"""
10+
def __init__(self):
11+
pass
12+
13+
def get_cookie(self, target):
14+
req = requests.get(target)
15+
c = req.cookies
16+
i = c.items()
17+
for name, value in i:
18+
print(name, value)
19+
20+
""" def decode_cookie(self, target):
21+
req = requests.get(target)
22+
c = req.cookies
23+
i = c.items()
24+
for name, value in i:
25+
rep = ""
26+
b64 = ""
27+
rep = value.replace("%3D", "=")
28+
b64 = base64.b64decode(rep)
29+
print(b64)
30+
"""

public/ViPER/modules/Cookie.pyc

855 Bytes
Binary file not shown.

public/ViPER/modules/__init__.py

Whitespace-only changes.

public/ViPER/modules/__init__.pyc

112 Bytes
Binary file not shown.
758 Bytes
Binary file not shown.
136 Bytes
Binary file not shown.
682 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)