line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id$ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# network::sqlmap Brik |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
package Metabrik::Network::Sqlmap; |
7
|
1
|
|
|
1
|
|
700
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
28
|
|
8
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
14
|
use base qw(Metabrik::System::Package); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
366
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub brik_properties { |
13
|
|
|
|
|
|
|
return { |
14
|
0
|
|
|
0
|
1
|
|
revision => '$Revision$', |
15
|
|
|
|
|
|
|
tags => [ qw(unstable security scan vulnerability vuln scanner sql injection blind) ], |
16
|
|
|
|
|
|
|
author => 'GomoR ', |
17
|
|
|
|
|
|
|
license => 'http://opensource.org/licenses/BSD-3-Clause', |
18
|
|
|
|
|
|
|
attributes => { |
19
|
|
|
|
|
|
|
datadir => [ qw(datadir) ], |
20
|
|
|
|
|
|
|
cookie => [ qw(string) ], |
21
|
|
|
|
|
|
|
parameter => [ qw(parameter_name) ], |
22
|
|
|
|
|
|
|
request_file => [ qw(file) ], |
23
|
|
|
|
|
|
|
args => [ qw(sqlmap_arguments) ], |
24
|
|
|
|
|
|
|
output => [ qw(file) ], |
25
|
|
|
|
|
|
|
}, |
26
|
|
|
|
|
|
|
attributes_default => { |
27
|
|
|
|
|
|
|
request_file => 'sqlmap_request.txt', |
28
|
|
|
|
|
|
|
parameter => 'parameter', |
29
|
|
|
|
|
|
|
args => '--ignore-proxy -v 3 --level=5 --risk=3 --user-agent "Mozilla"', |
30
|
|
|
|
|
|
|
}, |
31
|
|
|
|
|
|
|
commands => { |
32
|
|
|
|
|
|
|
install => [ ], # Inherited |
33
|
|
|
|
|
|
|
start => [ ], |
34
|
|
|
|
|
|
|
}, |
35
|
|
|
|
|
|
|
need_packages => { |
36
|
|
|
|
|
|
|
ubuntu => [ qw(python python-pip) ], |
37
|
|
|
|
|
|
|
debian => [ qw(python python-pip) ], |
38
|
|
|
|
|
|
|
kali => [ qw(python python-pip) ], |
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
}; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
# python /usr/share/sqlmap-dev/sqlmap.py -p PARAMETER -r /root/XXX/outil_sqlmap/request.raw --ignore-proxy -v 3 --level=5 --risk=3 --user-agent "Mozilla" 2>&1 | tee /root/XXX/outil_sqlmap/XXX.txt |
44
|
|
|
|
|
|
|
sub start { |
45
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
my $datadir = $self->datadir; |
48
|
0
|
|
|
|
|
|
my $args = $self->args; |
49
|
0
|
|
|
|
|
|
my $cookie = $self->cookie; |
50
|
0
|
|
|
|
|
|
my $parameter = $self->parameter; |
51
|
0
|
|
|
|
|
|
my $request_file = $datadir.'/'.$self->request_file; |
52
|
0
|
|
|
|
|
|
my $output = $datadir.'/'.$self->output; |
53
|
|
|
|
|
|
|
|
54
|
0
|
0
|
|
|
|
|
$self->brik_help_run_file_not_found('start', $request_file) or return; |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
my $cmd = "sqlmap -p $parameter $args -r $request_file"; |
57
|
0
|
0
|
|
|
|
|
if (defined($output)) { |
58
|
0
|
|
|
|
|
|
$cmd .= ' 2>&1 | tee '.$output; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
system($cmd); |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
return 1; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
__END__ |