-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
fuzzpm.pl
executable file
·60 lines (46 loc) · 1.41 KB
/
fuzzpm.pl
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
#!/usr/bin/env perl
use 5.030;
use strict;
use warnings;
use YAML::Tiny;
use Getopt::Long;
use Find::Lib "./lib";
use List::MoreUtils qw(any);
sub main {
my ($case, $help, @result);
Getopt::Long::GetOptions (
"c|case=s" => \$case,
"h|help" => \$help
);
if ($case) {
my $yamlfile = YAML::Tiny -> read($case);
foreach my $seed_dump ($yamlfile -> [0] -> {test} -> {seeds}) {
for my $seed (@$seed_dump) {
open (my $file, "<", $seed);
while (<$file>) {
chomp ($_);
print "[-] Seed \t -> $_\n";
foreach my $lib_dump ($yamlfile -> [0] -> {test} -> {targets}) {
for my $lib (@$lib_dump) {
require "./targets/" . lc $lib . ".pm";
my $fuzz = $lib -> new($_);
if ($fuzz) {
push @result, $fuzz;
if (any {$_ ne $fuzz} @result) {
print "[+] $lib \t $fuzz\n";
}
}
}
}
print "\n";
}
close ($file);
}
}
}
else {
print "[-] Usage: fuzzpm.pl -c <case>\n";
return 0;
}
}
main();