-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
nozaki.pl
executable file
·72 lines (58 loc) · 1.93 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
69
70
71
72
#!/usr/bin/env perl
use 5.030;
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, @targets);
my %options = (
accept => "*/*",
wordlist => "wordlists/default.txt",
method => "GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH,PUSH",
headers => {},
timeout => 10,
agent => "Nozaki / 0.2.9",
tasks => 10,
delay => 0
);
Getopt::Long::GetOptions (
"A|accept=s" => \$options{accept},
"a|agent=s" => \$options{agent},
"c|content=s" => \$options{content},
"d|delay=i" => \$options{delay},
"e|exclude=s" => \$options{exclude},
"H|header=s%" => \$options{headers},
"w|wordlist=s" => \$options{wordlist},
"W|workflow=s" => \$workflow,
"m|method=s" => \$options{method},
"r|return=s" => \$options{return},
"p|payload=s" => \$options{payload},
"j|json" => \$options{json},
"S|skip-ssl" => \$options{skipssl},
"T|tasks=i" => \$options{tasks},
"t|timeout=i" => \$options{timeout},
"u|url=s@" => \@targets,
"l|length=s" => \$options{length},
"P|proxy=s" => \$options{proxy}
);
return Functions::Helper -> new() unless @targets;
if ($workflow) {
my $rules = Functions::Parser -> new($workflow);
for my $rule (@$rules) {
my %new_options = %options;
Engine::Orchestrator::add_target(@targets);
map { $new_options{$_} = $rule -> {$_} || 1 } keys %{$rule};
Engine::Orchestrator -> run_fuzzer(%new_options);
}
return 0;
}
Engine::Orchestrator::add_target(@targets);
return Engine::Orchestrator -> run_fuzzer(%options);
}
exit main() unless caller;