-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
nozaki.pl
executable file
·68 lines (56 loc) · 1.87 KB
/
nozaki.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
61
62
63
64
65
66
67
68
#!/usr/bin/env perl
use 5.018;
use strict;
use threads;
use warnings;
use Thread::Queue;
use Find::Lib "./lib";
use Functions::Helper;
use Functions::Parser;
use Engine::Orchestrator;
use Getopt::Long qw(:config no_ignore_case);
sub main {
my ($workflow, $plugin, @targets);
my %options = (
accept => "*/*",
wordlist => "wordlists/default.txt",
method => "GET,POST,PUT,DELETE,HEAD,OPTIONS,TRACE,PATCH,PUSH",
headers => {},
timeout => 10,
agent => "Nozaki / 0.2.6",
tasks => 10,
delay => 0,
);
Getopt::Long::GetOptions (
"W|workflow=s" => \$workflow,
"u|url=s@" => \@targets,
"A|accept=s" => \$options{accept},
"w|wordlist=s" => \$options{wordlist},
"m|method=s" => \$options{method},
"d|delay=i" => \$options{delay},
"t|timeout=i" => \$options{timeout},
"a|agent=s" => \$options{agent},
"r|return=s" => \$options{return},
"p|payload=s" => \$options{payload},
"j|json" => \$options{json},
"H|header=s%" => \$options{headers},
"T|tasks=i" => \$options{tasks},
"e|exclude=s" => \$options{exclude},
"S|skip-ssl" => \$options{skipssl},
"l|length=s" => \$options{length},
"p|plugin=s" => \$options{plugin},
);
return Functions::Helper -> new() unless @targets;
Engine::Orchestrator::add_target(@targets);
if ($workflow) {
my $rules = Functions::Parser -> new($workflow);
for my $rule (@$rules) {
my %new_options = %options;
map { $new_options{$_} = $rule -> {$_} || 1 } keys %{$rule};
Engine::Orchestrator -> run_fuzzer(%new_options);
}
return 0;
}
return Engine::Orchestrator -> run_fuzzer (%options);
}
exit main() unless caller;