-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathvhost-brute.php
executable file
·93 lines (74 loc) · 1.31 KB
/
vhost-brute.php
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/php
<?php
spl_autoload_register(function ( $c ) {
include( dirname(__FILE__).'/class.'.$c.'.php' );
});
// parse command line
{
$options = [
'domain:',
'fail:',
'help',
'ip:',
'port:',
'ssl',
'st:',
'threads:',
'wordlist:',
];
$t_options = getopt( '', $options );
//var_dump( $t_options );
$vbrute = new VhostBrute();
foreach( $t_options as $k=>$v ) {
switch( $k ) {
case 'domain':
$vbrute->setDomain( $v );
break;
case 'fail':
$vbrute->setMaxFail( $v );
break;
case '-h':
case 'help':
Utils::help();
break;
case 'ip':
$vbrute->setIp( $v );
break;
case 'ssl':
$vbrute->forceSsl( true );
break;
case 'st':
$vbrute->setSimilarTextConfirm( $v );
break;
case 'port':
$vbrute->setPort( $v );
break;
case 'threads':
$vbrute->setMaxThreads( $v );
break;
case 'wordlist':
$vbrute->setWordlist( $v );
break;
default:
Utils::help( 'Unknown option: '.$k );
}
}
if( !$vbrute->getWordlist() ) {
Utils::help('Wordlist not found!');
}
if( !$vbrute->getIp() ) {
Utils::help('IP not found!');
}
if( !$vbrute->getDomain() ) {
Utils::help('Domain not found!');
}
}
// ---
// main loop
{
echo "\n";
$vbrute->run();
echo "\n".str_pad( '', 100, '-' )."\n\n";
}
// ---
exit();