line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Form::XSS::Result; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=pod |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
HTML::Form::XSS::Result - Result of XSS HTML form test. |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $result = HTML::Form::XSS::Result->new( #using are modified result class |
12
|
|
|
|
|
|
|
form => $form, |
13
|
|
|
|
|
|
|
names => \@names, |
14
|
|
|
|
|
|
|
check => '' |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 DESCRIPTION |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Please see for details, as this object inherits |
20
|
|
|
|
|
|
|
all of its functions. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 METHODS |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=cut |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
2
|
|
6
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
46
|
|
27
|
2
|
|
|
2
|
|
5
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
47
|
|
28
|
2
|
|
|
2
|
|
727
|
use parent qw(HTML::XSSLint::Result); |
|
2
|
|
|
|
|
422
|
|
|
2
|
|
|
|
|
7
|
|
29
|
|
|
|
|
|
|
############################################### |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=pod |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head2 example(); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $exampleUrl $result->example(); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Returns a full URL with query string to get an example for |
38
|
|
|
|
|
|
|
a vulnerable result. Returns undef if the result is not vulnerable. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
############################################### |
43
|
|
|
|
|
|
|
sub example { #we show the actual check that we picked up |
44
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
45
|
0
|
0
|
|
|
|
|
return undef unless $self->vulnerable; |
46
|
0
|
|
|
|
|
|
my $uri = URI->new($self->action); |
47
|
0
|
|
|
|
|
|
$uri->query_form(map { $_ => $self->_getCheck() } $self->names); |
|
0
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
return $uri; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
############################################## |
51
|
|
|
|
|
|
|
# |
52
|
|
|
|
|
|
|
# private methods |
53
|
|
|
|
|
|
|
# |
54
|
|
|
|
|
|
|
############################################## |
55
|
|
|
|
|
|
|
sub _getCheck{ #accessor |
56
|
0
|
|
|
0
|
|
|
my $self = shift; |
57
|
0
|
|
|
|
|
|
return $self->{'check'}; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
############################################## |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=pod |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 AUTHOR |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
MacGyveR |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Development questions, bug reports, and patches are welcome to the above address |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 COPYRIGHT |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Copyright (c) 2011 MacGyveR. All rights reserved. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
#################################################### |
78
|
|
|
|
|
|
|
return 1; |