ronin-payloads 0.1.0.beta1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -0
- data/.yardopts +1 -1
- data/README.md +4 -3
- data/bin/ronin-payloads +1 -1
- data/gemspec.yml +8 -7
- data/lib/ronin/payloads/asm_payload.rb +1 -1
- data/lib/ronin/payloads/binary_payload.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/awk/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/bash/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/lua/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/node/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/openssl/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/perl/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/php/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/powershell/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/python/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/ruby/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/java/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/php/cmd_exec.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/bind_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/freebsd/x86_64/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/arm/bind_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/arm/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/arm/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/mips/bind_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/mips/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/mips/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/ppc/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/ppc/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/x86/bind_shell.rb +2 -2
- data/lib/ronin/payloads/builtin/shellcode/linux/x86/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/x86/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/bind_shell.rb +2 -2
- data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/macos/x86_64/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/macos/x86_64/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/netbsd/x86/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/netbsd/x86/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/openbsd/x86/bind_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/openbsd/x86/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/windows/x86_64/cmd.rb +1 -1
- data/lib/ronin/payloads/builtin/test/open_redirect.rb +1 -1
- data/lib/ronin/payloads/builtin/test/xss.rb +1 -1
- data/lib/ronin/payloads/c_payload.rb +1 -1
- data/lib/ronin/payloads/cli/command.rb +1 -1
- data/lib/ronin/payloads/cli/commands/build.rb +1 -1
- data/lib/ronin/payloads/cli/commands/encode.rb +1 -1
- data/lib/ronin/payloads/cli/commands/encoder.rb +1 -1
- data/lib/ronin/payloads/cli/commands/encoders.rb +2 -2
- data/lib/ronin/payloads/cli/commands/irb.rb +1 -1
- data/lib/ronin/payloads/cli/commands/launch.rb +1 -1
- data/lib/ronin/payloads/cli/commands/list.rb +1 -1
- data/lib/ronin/payloads/cli/commands/new.rb +3 -3
- data/lib/ronin/payloads/cli/commands/show.rb +2 -2
- data/lib/ronin/payloads/cli/encoder_methods.rb +1 -1
- data/lib/ronin/payloads/cli/format_option.rb +1 -1
- data/lib/ronin/payloads/cli/generator/payload_types.rb +3 -3
- data/lib/ronin/payloads/cli/payload_command.rb +1 -1
- data/lib/ronin/payloads/cli/payload_methods.rb +1 -1
- data/lib/ronin/payloads/cli/printing.rb +1 -1
- data/lib/ronin/payloads/cli/ruby_shell.rb +1 -1
- data/lib/ronin/payloads/cli.rb +6 -1
- data/lib/ronin/payloads/coldfusion_payload.rb +1 -1
- data/lib/ronin/payloads/command_payload.rb +1 -1
- data/lib/ronin/payloads/encoders/builtin/html/encode.rb +1 -1
- data/lib/ronin/payloads/encoders/builtin/js/encode.rb +1 -1
- data/lib/ronin/payloads/encoders/builtin/powershell/encode.rb +1 -1
- data/lib/ronin/payloads/encoders/builtin/shell/encode.rb +1 -1
- data/lib/ronin/payloads/encoders/builtin/sql/encode.rb +1 -1
- data/lib/ronin/payloads/encoders/builtin/xml/encode.rb +1 -1
- data/lib/ronin/payloads/encoders/encoder.rb +1 -1
- data/lib/ronin/payloads/encoders/exceptions.rb +1 -1
- data/lib/ronin/payloads/encoders/html_encoder.rb +1 -1
- data/lib/ronin/payloads/encoders/javascript_encoder.rb +1 -1
- data/lib/ronin/payloads/encoders/pipeline.rb +2 -2
- data/lib/ronin/payloads/encoders/powershell_encoder.rb +1 -1
- data/lib/ronin/payloads/encoders/registry.rb +1 -1
- data/lib/ronin/payloads/encoders/shell_encoder.rb +1 -1
- data/lib/ronin/payloads/encoders/sql_encoder.rb +1 -1
- data/lib/ronin/payloads/encoders/xml_encoder.rb +1 -1
- data/lib/ronin/payloads/encoders.rb +1 -1
- data/lib/ronin/payloads/exceptions.rb +1 -1
- data/lib/ronin/payloads/go_payload.rb +1 -1
- data/lib/ronin/payloads/html_payload.rb +1 -1
- data/lib/ronin/payloads/java_payload.rb +1 -1
- data/lib/ronin/payloads/javascript_payload.rb +1 -1
- data/lib/ronin/payloads/jsp_payload.rb +1 -1
- data/lib/ronin/payloads/metadata/arch.rb +1 -1
- data/lib/ronin/payloads/metadata/os.rb +1 -1
- data/lib/ronin/payloads/mixins/binary.rb +1 -1
- data/lib/ronin/payloads/mixins/bind_shell.rb +1 -1
- data/lib/ronin/payloads/mixins/build_dir.rb +1 -1
- data/lib/ronin/payloads/mixins/erb.rb +1 -1
- data/lib/ronin/payloads/mixins/network.rb +1 -1
- data/lib/ronin/payloads/mixins/post_ex.rb +1 -1
- data/lib/ronin/payloads/mixins/resolve_host.rb +1 -1
- data/lib/ronin/payloads/mixins/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/mixins/tempfile.rb +1 -1
- data/lib/ronin/payloads/mixins/typescript.rb +1 -1
- data/lib/ronin/payloads/node_js_payload.rb +1 -1
- data/lib/ronin/payloads/payload.rb +1 -1
- data/lib/ronin/payloads/php_payload.rb +1 -1
- data/lib/ronin/payloads/powershell_payload.rb +1 -1
- data/lib/ronin/payloads/python_payload.rb +1 -1
- data/lib/ronin/payloads/registry.rb +1 -1
- data/lib/ronin/payloads/root.rb +1 -1
- data/lib/ronin/payloads/ruby_payload.rb +1 -1
- data/lib/ronin/payloads/rust_payload.rb +1 -1
- data/lib/ronin/payloads/shell_payload.rb +1 -1
- data/lib/ronin/payloads/shellcode/bind_shell_payload.rb +1 -1
- data/lib/ronin/payloads/shellcode/exec_shell_payload.rb +1 -1
- data/lib/ronin/payloads/shellcode/reverse_shell_payload.rb +1 -1
- data/lib/ronin/payloads/shellcode_payload.rb +1 -1
- data/lib/ronin/payloads/sql_payload.rb +1 -1
- data/lib/ronin/payloads/url_payload.rb +2 -2
- data/lib/ronin/payloads/version.rb +2 -2
- data/lib/ronin/payloads/xml_payload.rb +1 -1
- data/lib/ronin/payloads.rb +1 -1
- data/ronin-payloads.gemspec +2 -1
- metadata +16 -215
- data/spec/asm_payload_spec.rb +0 -114
- data/spec/binary_payload_spec.rb +0 -8
- data/spec/builtin/cmd/awk/reverse_shell_spec.rb +0 -38
- data/spec/builtin/cmd/bash/reverse_shell_spec.rb +0 -36
- data/spec/builtin/cmd/lua/reverse_shell_spec.rb +0 -38
- data/spec/builtin/cmd/node/reverse_shell_spec.rb +0 -36
- data/spec/builtin/cmd/openssl/reverse_shell_spec.rb +0 -38
- data/spec/builtin/cmd/perl/reverse_shell_spec.rb +0 -38
- data/spec/builtin/cmd/php/reverse_shell_spec.rb +0 -38
- data/spec/builtin/cmd/powershell/reverse_shell_spec.rb +0 -38
- data/spec/builtin/cmd/python/reverse_shell_spec.rb +0 -38
- data/spec/builtin/cmd/ruby/reverse_shell_spec.rb +0 -38
- data/spec/builtin/java/reverse_shell_spec.rb +0 -103
- data/spec/builtin/php/cmd_exec.rb +0 -52
- data/spec/builtin/shellcode/freebsd/x86/bind_shell_spec.rb +0 -58
- data/spec/builtin/shellcode/freebsd/x86/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/freebsd/x86/reverse_shell_spec.rb +0 -63
- data/spec/builtin/shellcode/freebsd/x86_64/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/linux/arm/bind_shell_spec.rb +0 -62
- data/spec/builtin/shellcode/linux/arm/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/linux/arm/reverse_shell_spec.rb +0 -58
- data/spec/builtin/shellcode/linux/mips/bind_shell_spec.rb +0 -60
- data/spec/builtin/shellcode/linux/mips/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/linux/mips/reverse_shell_spec.rb +0 -58
- data/spec/builtin/shellcode/linux/ppc/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/linux/ppc/reverse_shell_spec.rb +0 -87
- data/spec/builtin/shellcode/linux/x86/bind_shell_spec.rb +0 -60
- data/spec/builtin/shellcode/linux/x86/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/linux/x86/reverse_shell_spec.rb +0 -58
- data/spec/builtin/shellcode/linux/x86_64/bind_shell_spec.rb +0 -60
- data/spec/builtin/shellcode/linux/x86_64/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/linux/x86_64/reverse_shell_spec.rb +0 -58
- data/spec/builtin/shellcode/macos/x86_64/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/macos/x86_64/reverse_shell_spec.rb +0 -58
- data/spec/builtin/shellcode/netbsd/x86/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/netbsd/x86/reverse_shell_spec.rb +0 -63
- data/spec/builtin/shellcode/openbsd/x86/bind_shell_spec.rb +0 -58
- data/spec/builtin/shellcode/openbsd/x86/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/windows/x86_64/cmd_spec.rb +0 -54
- data/spec/builtin/test/open_redirect_spec.rb +0 -24
- data/spec/builtin/test/xss_spec.rb +0 -24
- data/spec/c_payload_spec.rb +0 -139
- data/spec/cli/commands/show_spec.rb +0 -21
- data/spec/cli/encoder_methods_spec.rb +0 -275
- data/spec/cli/format_option_spec.rb +0 -187
- data/spec/cli/payload_command_spec.rb +0 -68
- data/spec/cli/payload_methods_spec.rb +0 -208
- data/spec/cli/printing_spec.rb +0 -65
- data/spec/cli/ruby_shell_spec.rb +0 -14
- data/spec/coldfusion_payload_spec.rb +0 -8
- data/spec/command_payload_spec.rb +0 -8
- data/spec/encoders/builtin/html/encode_spec.rb +0 -17
- data/spec/encoders/builtin/js/encode_spec.rb +0 -17
- data/spec/encoders/builtin/powershell/encode_spec.rb +0 -17
- data/spec/encoders/builtin/shell/encode_spec.rb +0 -17
- data/spec/encoders/builtin/sql/encode_spec.rb +0 -17
- data/spec/encoders/builtin/xml/encode_spec.rb +0 -17
- data/spec/encoders/encoder_spec.rb +0 -62
- data/spec/encoders/html_encoder_spec.rb +0 -8
- data/spec/encoders/javascript_encoder_spec.rb +0 -8
- data/spec/encoders/pipeline_spec.rb +0 -153
- data/spec/encoders/powershell_encoder_spec.rb +0 -8
- data/spec/encoders/shell_encoder_spec.rb +0 -8
- data/spec/encoders/sql_encoder_spec.rb +0 -8
- data/spec/encoders/xml_encoder_spec.rb +0 -8
- data/spec/encoders_spec.rb +0 -25
- data/spec/go_payload_spec.rb +0 -56
- data/spec/helpers/encoders.rb +0 -9
- data/spec/helpers/payloads.rb +0 -9
- data/spec/helpers/scripts/payloads/simple.rb +0 -22
- data/spec/html_payload_spec.rb +0 -12
- data/spec/java_payload_spec.rb +0 -97
- data/spec/javascript_payload_spec.rb +0 -12
- data/spec/jsp_payload_spec.rb +0 -8
- data/spec/metadata/arch_spec.rb +0 -82
- data/spec/metadata/os_spec.rb +0 -164
- data/spec/mixins/binary_spec.rb +0 -129
- data/spec/mixins/bind_shell_spec.rb +0 -73
- data/spec/mixins/build_dir.rb +0 -64
- data/spec/mixins/erb_spec.rb +0 -19
- data/spec/mixins/network_spec.rb +0 -75
- data/spec/mixins/post_ex_spec.rb +0 -40
- data/spec/mixins/resolve_host_spec.rb +0 -322
- data/spec/mixins/reverse_shell_spec.rb +0 -103
- data/spec/mixins/tempfile_spec.rb +0 -97
- data/spec/mixins/typescript_spec.rb +0 -92
- data/spec/node_js_payload_spec.rb +0 -8
- data/spec/payload_spec.rb +0 -288
- data/spec/payloads_spec.rb +0 -29
- data/spec/php_payload_spec.rb +0 -8
- data/spec/powershell_payload_spec.rb +0 -16
- data/spec/python_payload_spec.rb +0 -8
- data/spec/ruby_payload_spec.rb +0 -8
- data/spec/rust_payload_spec.rb +0 -116
- data/spec/shell_payload_spec.rb +0 -16
- data/spec/shellcode/bind_shell_payload_spec.rb +0 -42
- data/spec/shellcode/exec_shell_payload_spec.rb +0 -8
- data/spec/shellcode/reverse_shell_payload_spec.rb +0 -136
- data/spec/shellcode_payload_spec.rb +0 -38
- data/spec/spec_helper.rb +0 -7
- data/spec/sql_payload_spec.rb +0 -12
- data/spec/url_payload_spec.rb +0 -72
- data/spec/xml_payload_spec.rb +0 -12
@@ -1,208 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/cli/payload_methods'
|
3
|
-
require 'ronin/payloads/cli/command'
|
4
|
-
|
5
|
-
describe Ronin::Payloads::CLI::PayloadMethods do
|
6
|
-
module TestPayloadMethods
|
7
|
-
class TestCommand < Ronin::Payloads::CLI::Command
|
8
|
-
include Ronin::Payloads::CLI::PayloadMethods
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
let(:command_class) { TestPayloadMethods::TestCommand }
|
13
|
-
subject { command_class.new }
|
14
|
-
|
15
|
-
describe "#load_payload" do
|
16
|
-
let(:payload_id) { 'html/encode' }
|
17
|
-
|
18
|
-
it "must call Payloads.load_class with the given ID" do
|
19
|
-
expect(Ronin::Payloads).to receive(:load_class).with(payload_id)
|
20
|
-
expect(subject).to_not receive(:exit)
|
21
|
-
|
22
|
-
subject.load_payload(payload_id)
|
23
|
-
end
|
24
|
-
|
25
|
-
context "when Ronin::Payloads::ClassNotfound is raised" do
|
26
|
-
let(:message) { "class not found" }
|
27
|
-
let(:exception) do
|
28
|
-
Ronin::Payloads::ClassNotFound.new(message)
|
29
|
-
end
|
30
|
-
|
31
|
-
it "must print an error message and exit with an error code" do
|
32
|
-
expect(Ronin::Payloads).to receive(:load_class).with(payload_id).and_raise(exception)
|
33
|
-
expect(subject).to receive(:exit).with(1)
|
34
|
-
|
35
|
-
expect {
|
36
|
-
subject.load_payload(payload_id)
|
37
|
-
}.to output("#{subject.command_name}: #{message}#{$/}").to_stderr
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
context "when another type of exception is raised" do
|
42
|
-
let(:message) { "unexpected error" }
|
43
|
-
let(:exception) { RuntimeError.new(message) }
|
44
|
-
|
45
|
-
it "must print the exception, an error message, and exit with -1" do
|
46
|
-
expect(Ronin::Payloads).to receive(:load_class).with(payload_id).and_raise(exception)
|
47
|
-
expect(subject).to receive(:print_exception).with(exception)
|
48
|
-
expect(subject).to receive(:exit).with(-1)
|
49
|
-
|
50
|
-
expect {
|
51
|
-
subject.load_payload(payload_id)
|
52
|
-
}.to output("#{subject.command_name}: an unhandled exception occurred while loading payload #{payload_id}#{$/}").to_stderr
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
describe "#load_payload_from" do
|
58
|
-
let(:file) { '/path/to/html/encode.rb' }
|
59
|
-
|
60
|
-
it "must call Payloads.load_class with the given ID and file" do
|
61
|
-
expect(Ronin::Payloads).to receive(:load_class_from_file).with(file)
|
62
|
-
expect(subject).to_not receive(:exit)
|
63
|
-
|
64
|
-
subject.load_payload_from(file)
|
65
|
-
end
|
66
|
-
|
67
|
-
context "when Ronin::Payloads::ClassNotfound is raised" do
|
68
|
-
let(:message) { "class not found" }
|
69
|
-
let(:exception) do
|
70
|
-
Ronin::Payloads::ClassNotFound.new(message)
|
71
|
-
end
|
72
|
-
|
73
|
-
it "must print an error message and exit with an error code" do
|
74
|
-
expect(Ronin::Payloads).to receive(:load_class_from_file).with(file).and_raise(exception)
|
75
|
-
expect(subject).to receive(:exit).with(1)
|
76
|
-
|
77
|
-
expect {
|
78
|
-
subject.load_payload_from(file)
|
79
|
-
}.to output("#{subject.command_name}: #{message}#{$/}").to_stderr
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
context "when another type of exception is raised" do
|
84
|
-
let(:message) { "unexpected error" }
|
85
|
-
let(:exception) { RuntimeError.new(message) }
|
86
|
-
|
87
|
-
it "must print the exception, an error message, and exit with -1" do
|
88
|
-
expect(Ronin::Payloads).to receive(:load_class_from_file).with(file).and_raise(exception)
|
89
|
-
expect(subject).to receive(:print_exception).with(exception)
|
90
|
-
expect(subject).to receive(:exit).with(-1)
|
91
|
-
|
92
|
-
expect {
|
93
|
-
subject.load_payload_from(file)
|
94
|
-
}.to output(
|
95
|
-
"#{subject.command_name}: an unhandled exception occurred while loading payload from file #{file}#{$/}"
|
96
|
-
).to_stderr
|
97
|
-
end
|
98
|
-
end
|
99
|
-
end
|
100
|
-
|
101
|
-
describe "#initialie_payload" do
|
102
|
-
let(:payload_id) { 'test' }
|
103
|
-
let(:payload_class) { double('Encoder class', id: payload_id) }
|
104
|
-
|
105
|
-
it "must return a new instance of the given payload class" do
|
106
|
-
expect(payload_class).to receive(:new)
|
107
|
-
|
108
|
-
subject.initialize_payload(payload_class)
|
109
|
-
end
|
110
|
-
|
111
|
-
context "when additional keyword arguments are given" do
|
112
|
-
let(:kwargs) do
|
113
|
-
{foo: 1, bar: 2}
|
114
|
-
end
|
115
|
-
|
116
|
-
it "must pass them to new()" do
|
117
|
-
expect(payload_class).to receive(:new).with(**kwargs)
|
118
|
-
|
119
|
-
subject.initialize_payload(payload_class,**kwargs)
|
120
|
-
end
|
121
|
-
end
|
122
|
-
|
123
|
-
context "when a Core::Params::ParamError is raised" do
|
124
|
-
let(:message) { "param foo was not set" }
|
125
|
-
let(:exception) { Ronin::Core::Params::RequiredParam.new(message) }
|
126
|
-
|
127
|
-
it "must print an error message and exit with 1" do
|
128
|
-
expect(payload_class).to receive(:new).and_raise(exception)
|
129
|
-
expect(subject).to receive(:exit).with(1)
|
130
|
-
|
131
|
-
expect {
|
132
|
-
subject.initialize_payload(payload_class)
|
133
|
-
}.to output("#{subject.command_name}: #{message}#{$/}").to_stderr
|
134
|
-
end
|
135
|
-
end
|
136
|
-
|
137
|
-
context "when another type of exception is raised" do
|
138
|
-
let(:message) { "unexpected error" }
|
139
|
-
let(:exception) { RuntimeError.new(message) }
|
140
|
-
|
141
|
-
it "must print the exception, an error message, and exit with -1" do
|
142
|
-
expect(payload_class).to receive(:new).and_raise(exception)
|
143
|
-
expect(subject).to receive(:print_exception).with(exception)
|
144
|
-
expect(subject).to receive(:exit).with(-1)
|
145
|
-
|
146
|
-
expect {
|
147
|
-
subject.initialize_payload(payload_class)
|
148
|
-
}.to output("#{subject.command_name}: an unhandled exception occurred while initializing payload #{payload_id}#{$/}").to_stderr
|
149
|
-
end
|
150
|
-
end
|
151
|
-
end
|
152
|
-
|
153
|
-
describe "#validate_payload" do
|
154
|
-
let(:payload_id) { 'test' }
|
155
|
-
let(:payload) { double('Encoder instance', class_id: payload_id) }
|
156
|
-
|
157
|
-
it "must call #perform_validate on #payload" do
|
158
|
-
expect(payload).to receive(:perform_validate)
|
159
|
-
|
160
|
-
subject.validate_payload(payload)
|
161
|
-
end
|
162
|
-
|
163
|
-
context "when a Core::Params::ParamError is raised" do
|
164
|
-
let(:message) { "param foo was not set" }
|
165
|
-
let(:exception) { Ronin::Core::Params::RequiredParam.new(message) }
|
166
|
-
|
167
|
-
it "must print an error message and exit with 1" do
|
168
|
-
expect(payload).to receive(:perform_validate).and_raise(exception)
|
169
|
-
expect(subject).to receive(:exit).with(1)
|
170
|
-
|
171
|
-
expect {
|
172
|
-
subject.validate_payload(payload)
|
173
|
-
}.to output("#{subject.command_name}: failed to validate the payload #{payload_id}: #{message}#{$/}").to_stderr
|
174
|
-
end
|
175
|
-
end
|
176
|
-
|
177
|
-
context "when a Ronin::Payloads::ValidationError is raised" do
|
178
|
-
let(:message) { "param foo was not set" }
|
179
|
-
let(:exception) do
|
180
|
-
Ronin::Payloads::ValidationError.new(message)
|
181
|
-
end
|
182
|
-
|
183
|
-
it "must print an error message and exit with 1" do
|
184
|
-
expect(payload).to receive(:perform_validate).and_raise(exception)
|
185
|
-
expect(subject).to receive(:exit).with(1)
|
186
|
-
|
187
|
-
expect {
|
188
|
-
subject.validate_payload(payload)
|
189
|
-
}.to output("#{subject.command_name}: failed to validate the payload #{payload_id}: #{message}#{$/}").to_stderr
|
190
|
-
end
|
191
|
-
end
|
192
|
-
|
193
|
-
context "when another type of exception is raised" do
|
194
|
-
let(:message) { "unexpected error" }
|
195
|
-
let(:exception) { RuntimeError.new(message) }
|
196
|
-
|
197
|
-
it "must print the exception, an error message, and exit with -1" do
|
198
|
-
expect(payload).to receive(:perform_validate).and_raise(exception)
|
199
|
-
expect(subject).to receive(:print_exception).with(exception)
|
200
|
-
expect(subject).to receive(:exit).with(-1)
|
201
|
-
|
202
|
-
expect {
|
203
|
-
subject.validate_payload(payload)
|
204
|
-
}.to output("#{subject.command_name}: an unhandled exception occurred while validating the payload #{payload_id}#{$/}").to_stderr
|
205
|
-
end
|
206
|
-
end
|
207
|
-
end
|
208
|
-
end
|
data/spec/cli/printing_spec.rb
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/cli/printing'
|
3
|
-
require 'ronin/payloads/cli/command'
|
4
|
-
|
5
|
-
require 'ronin/payloads/binary_payload'
|
6
|
-
require 'ronin/payloads/asm_payload'
|
7
|
-
require 'ronin/payloads/shellcode_payload'
|
8
|
-
require 'ronin/payloads/c_payload'
|
9
|
-
require 'ronin/payloads/go_payload'
|
10
|
-
require 'ronin/payloads/rust_payload'
|
11
|
-
require 'ronin/payloads/java_payload'
|
12
|
-
require 'ronin/payloads/javascript_payload'
|
13
|
-
require 'ronin/payloads/node_js_payload'
|
14
|
-
require 'ronin/payloads/command_payload'
|
15
|
-
require 'ronin/payloads/shell_payload'
|
16
|
-
require 'ronin/payloads/powershell_payload'
|
17
|
-
require 'ronin/payloads/coldfusion_payload'
|
18
|
-
require 'ronin/payloads/php_payload'
|
19
|
-
require 'ronin/payloads/sql_payload'
|
20
|
-
require 'ronin/payloads/html_payload'
|
21
|
-
require 'ronin/payloads/xml_payload'
|
22
|
-
require 'ronin/payloads/mixins/typescript'
|
23
|
-
|
24
|
-
describe Ronin::Payloads::CLI::Printing do
|
25
|
-
module TestCLIPrinting
|
26
|
-
class TestCommand < Ronin::Payloads::CLI::Command
|
27
|
-
include Ronin::Payloads::CLI::Printing
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
let(:command_class) { TestCLIPrinting::TestCommand }
|
32
|
-
subject { command_class.new }
|
33
|
-
|
34
|
-
describe "#payload_type" do
|
35
|
-
{
|
36
|
-
Ronin::Payloads::HTMLPayload => 'HTML',
|
37
|
-
Ronin::Payloads::XMLPayload => 'XML',
|
38
|
-
Ronin::Payloads::JavaScriptPayload => 'JavaScript',
|
39
|
-
Ronin::Payloads::NodeJSPayload => 'Node.js',
|
40
|
-
Ronin::Payloads::SQLPayload => 'SQL',
|
41
|
-
Ronin::Payloads::CommandPayload => 'Command',
|
42
|
-
Ronin::Payloads::ShellPayload => 'Shell',
|
43
|
-
Ronin::Payloads::PowerShellPayload => 'PowerShell',
|
44
|
-
Ronin::Payloads::CPayload => 'C',
|
45
|
-
Ronin::Payloads::GoPayload => 'Go',
|
46
|
-
Ronin::Payloads::RustPayload => 'Rust',
|
47
|
-
Ronin::Payloads::JavaPayload => 'Java',
|
48
|
-
Ronin::Payloads::ColdFusionPayload => 'ColdFusion',
|
49
|
-
Ronin::Payloads::PHPPayload => 'PHP',
|
50
|
-
Ronin::Payloads::ASMPayload => 'ASM',
|
51
|
-
Ronin::Payloads::ShellcodePayload => 'Shellcode',
|
52
|
-
Ronin::Payloads::BinaryPayload => 'Binary',
|
53
|
-
Ronin::Payloads::Payload => 'Custom'
|
54
|
-
}.each do |payload_class,type|
|
55
|
-
context "when the class inherits from #{payload_class}" do
|
56
|
-
let(:klass) { Class.new(payload_class) }
|
57
|
-
let(:type) { type }
|
58
|
-
|
59
|
-
it "must return '#{type}'" do
|
60
|
-
expect(subject.payload_type(klass)).to eq(type)
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
data/spec/cli/ruby_shell_spec.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/cli/ruby_shell'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::CLI::RubyShell do
|
5
|
-
describe "#initialize" do
|
6
|
-
it "must default #name to 'ronin-payloads'" do
|
7
|
-
expect(subject.name).to eq('ronin-payloads')
|
8
|
-
end
|
9
|
-
|
10
|
-
it "must default #context to Ronin::Payloads" do
|
11
|
-
expect(subject.context).to be(Ronin::Payloads)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/encoders/builtin/html/encode'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Encoders::HTML::Encode do
|
5
|
-
it "must inherit from Ronin::Payloads::Encoders::HTMLEncoder" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Encoders::HTMLEncoder
|
7
|
-
end
|
8
|
-
|
9
|
-
describe "#encode" do
|
10
|
-
let(:data) { "hello world" }
|
11
|
-
let(:encoded) { "hello world" }
|
12
|
-
|
13
|
-
it "must HTML encode each character" do
|
14
|
-
expect(subject.encode(data)).to eq(encoded)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/encoders/builtin/js/encode'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Encoders::JS::Encode do
|
5
|
-
it "must inherit from Ronin::Payloads::Encoders::JavaScriptEncoder" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Encoders::JavaScriptEncoder
|
7
|
-
end
|
8
|
-
|
9
|
-
describe "#encode" do
|
10
|
-
let(:data) { "hello world" }
|
11
|
-
let(:encoded) { "\\x68\\x65\\x6C\\x6C\\x6F\\x20\\x77\\x6F\\x72\\x6C\\x64" }
|
12
|
-
|
13
|
-
it "must JavaScript encode each character" do
|
14
|
-
expect(subject.encode(data)).to eq(encoded)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/encoders/builtin/powershell/encode'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Encoders::PowerShell::Encode do
|
5
|
-
it "must inherit from Ronin::Payloads::Encoders::PowerShellEncoder" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Encoders::PowerShellEncoder
|
7
|
-
end
|
8
|
-
|
9
|
-
describe "#encode" do
|
10
|
-
let(:data) { "hello world" }
|
11
|
-
let(:encoded) { "$([char]0x68)$([char]0x65)$([char]0x6c)$([char]0x6c)$([char]0x6f)$([char]0x20)$([char]0x77)$([char]0x6f)$([char]0x72)$([char]0x6c)$([char]0x64)" }
|
12
|
-
|
13
|
-
it "must PowerShell encode each character" do
|
14
|
-
expect(subject.encode(data)).to eq(encoded)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/encoders/builtin/shell/encode'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Encoders::Shell::Encode do
|
5
|
-
it "must inherit from Ronin::Payloads::Encoders::ShellEncoder" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Encoders::ShellEncoder
|
7
|
-
end
|
8
|
-
|
9
|
-
describe "#encode" do
|
10
|
-
let(:data) { "hello world" }
|
11
|
-
let(:encoded) { "\\x68\\x65\\x6c\\x6c\\x6f\\x20\\x77\\x6f\\x72\\x6c\\x64" }
|
12
|
-
|
13
|
-
it "must shell encode each character" do
|
14
|
-
expect(subject.encode(data)).to eq(encoded)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/encoders/builtin/sql/encode'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Encoders::SQL::Encode do
|
5
|
-
it "must inherit from Ronin::Payloads::Encoders::SQLEncoder" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Encoders::SQLEncoder
|
7
|
-
end
|
8
|
-
|
9
|
-
describe "#encode" do
|
10
|
-
let(:data) { "hello world" }
|
11
|
-
let(:encoded) { "0x68656c6c6f20776f726c64" }
|
12
|
-
|
13
|
-
it "must SQL encode the given String" do
|
14
|
-
expect(subject.encode(data)).to eq(encoded)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/encoders/builtin/xml/encode'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Encoders::XML::Encode do
|
5
|
-
it "must inherit from Ronin::Payloads::Encoders::XMLEncoder" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Encoders::XMLEncoder
|
7
|
-
end
|
8
|
-
|
9
|
-
describe "#encode" do
|
10
|
-
let(:data) { "hello world" }
|
11
|
-
let(:encoded) { "hello world" }
|
12
|
-
|
13
|
-
it "must XML encode each character" do
|
14
|
-
expect(subject.encode(data)).to eq(encoded)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,62 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/encoders/encoder'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Encoders::Encoder do
|
5
|
-
it "must include Ronin::Core::Metadata::ID" do
|
6
|
-
expect(described_class).to include(Ronin::Core::Metadata::ID)
|
7
|
-
end
|
8
|
-
|
9
|
-
it "must include Ronin::Core::Metadata::Summary" do
|
10
|
-
expect(described_class).to include(Ronin::Core::Metadata::Summary)
|
11
|
-
end
|
12
|
-
|
13
|
-
it "must include Ronin::Core::Metadata::Description" do
|
14
|
-
expect(described_class).to include(Ronin::Core::Metadata::Description)
|
15
|
-
end
|
16
|
-
|
17
|
-
it "must include Ronin::Core::Metadata::References" do
|
18
|
-
expect(described_class).to include(Ronin::Core::Metadata::References)
|
19
|
-
end
|
20
|
-
|
21
|
-
it "must include Ronin::Core::Params::Mixin" do
|
22
|
-
expect(described_class).to include(Ronin::Core::Params::Mixin)
|
23
|
-
end
|
24
|
-
|
25
|
-
module TestEncoders
|
26
|
-
class TestEncoder < Ronin::Payloads::Encoders::Encoder
|
27
|
-
|
28
|
-
register 'test_encoder'
|
29
|
-
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
describe ".register" do
|
34
|
-
subject { TestEncoders::TestEncoder }
|
35
|
-
|
36
|
-
it "must register the Encoder class with Encoders.module_registry" do
|
37
|
-
expect(Ronin::Payloads::Encoders.registry['test_encoder']).to be(subject)
|
38
|
-
end
|
39
|
-
|
40
|
-
it "must also set .id" do
|
41
|
-
expect(subject.id).to eq('test_encoder')
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
describe "#validate" do
|
46
|
-
it "must call #validate_params" do
|
47
|
-
expect(subject).to receive(:validate_params)
|
48
|
-
|
49
|
-
subject.validate
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
describe "#encode" do
|
54
|
-
let(:data) { "data" }
|
55
|
-
|
56
|
-
it "must raise NotImplementedError by default" do
|
57
|
-
expect {
|
58
|
-
subject.encode(data)
|
59
|
-
}.to raise_error(NotImplementedError,"#{described_class}#encode was not implemented")
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/encoders/html_encoder'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Encoders::HTMLEncoder do
|
5
|
-
it "must inherit from Ronin::Payloads::Encoders::Encoder" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Encoders::Encoder
|
7
|
-
end
|
8
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/encoders/javascript_encoder'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Encoders::JavaScriptEncoder do
|
5
|
-
it "must inherit from Ronin::Payloads::Encoders::Encoder" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Encoders::Encoder
|
7
|
-
end
|
8
|
-
end
|
@@ -1,153 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/encoders/pipeline'
|
3
|
-
require 'ronin/payloads/encoders/encoder'
|
4
|
-
|
5
|
-
describe Ronin::Payloads::Encoders::Pipeline do
|
6
|
-
module TestEncoderPipeline
|
7
|
-
class EncoderA < Ronin::Payloads::Encoders::Encoder
|
8
|
-
|
9
|
-
id 'encoder_a'
|
10
|
-
|
11
|
-
def encode(data)
|
12
|
-
"AAA#{data}"
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
|
17
|
-
class EncoderB < Ronin::Payloads::Encoders::Encoder
|
18
|
-
|
19
|
-
id 'encoder_b'
|
20
|
-
|
21
|
-
def encode(data)
|
22
|
-
"#{data}BBB"
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
class BadEncoder < Ronin::Payloads::Encoders::Encoder
|
28
|
-
|
29
|
-
id 'bad_encoder'
|
30
|
-
|
31
|
-
def encode(data)
|
32
|
-
end
|
33
|
-
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
describe "#initialize" do
|
38
|
-
subject { described_class.new }
|
39
|
-
|
40
|
-
it "must initialize #encoders to an empty Array" do
|
41
|
-
expect(subject.encoders).to eq([])
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
let(:encoder_a) { TestEncoderPipeline::EncoderA.new }
|
46
|
-
let(:encoder_b) { TestEncoderPipeline::EncoderB.new }
|
47
|
-
let(:encoders) { [encoder_a, encoder_b] }
|
48
|
-
|
49
|
-
subject { described_class.new(encoders) }
|
50
|
-
|
51
|
-
describe "#<<" do
|
52
|
-
subject { described_class.new([encoder_a]) }
|
53
|
-
|
54
|
-
it "must append the encoder to the end of #encoders" do
|
55
|
-
subject << encoder_b
|
56
|
-
|
57
|
-
expect(subject.encoders[0]).to eq(encoder_a)
|
58
|
-
expect(subject.encoders[1]).to eq(encoder_b)
|
59
|
-
end
|
60
|
-
|
61
|
-
it "must return self" do
|
62
|
-
expect(subject << encoder_b).to be(subject)
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
describe "#empty?" do
|
67
|
-
context "when #encoders is empty" do
|
68
|
-
subject { described_class.new }
|
69
|
-
|
70
|
-
it "must return true" do
|
71
|
-
expect(subject.empty?).to be(true)
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
context "when #encoders is not empty" do
|
76
|
-
it "must return false" do
|
77
|
-
expect(subject.empty?).to be(false)
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
describe "#each" do
|
83
|
-
context "when given a block" do
|
84
|
-
it "must yield each encoder in #encoders" do
|
85
|
-
expect { |b|
|
86
|
-
subject.each(&b)
|
87
|
-
}.to yield_successive_args(*subject.encoders)
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
context "when no block is given" do
|
92
|
-
it "must return an Enumerator" do
|
93
|
-
expect(subject.each.to_a).to eq(subject.encoders)
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
describe "#validate" do
|
99
|
-
it "must also call #validate on each encoder in #encoders" do
|
100
|
-
expect(encoder_a).to receive(:validate)
|
101
|
-
expect(encoder_b).to receive(:validate)
|
102
|
-
|
103
|
-
subject.validate
|
104
|
-
end
|
105
|
-
end
|
106
|
-
|
107
|
-
describe "#[]" do
|
108
|
-
context "when given an Integer" do
|
109
|
-
it "must return the encoder at the given index" do
|
110
|
-
expect(subject[0]).to eq(encoders[0])
|
111
|
-
expect(subject[1]).to eq(encoders[1])
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
|
-
context "when given a String" do
|
116
|
-
it "must return the encoder with the matching id" do
|
117
|
-
expect(subject['encoder_a'].class_id).to eq('encoder_a')
|
118
|
-
expect(subject['encoder_b'].class_id).to eq('encoder_b')
|
119
|
-
end
|
120
|
-
|
121
|
-
context "but there is no encoder with the matching id" do
|
122
|
-
it "must return nil" do
|
123
|
-
expect(subject['foo']).to be(nil)
|
124
|
-
end
|
125
|
-
end
|
126
|
-
end
|
127
|
-
end
|
128
|
-
|
129
|
-
describe "#encode" do
|
130
|
-
let(:payload) { "foo" }
|
131
|
-
|
132
|
-
it "must pass the given payload String through each encoder" do
|
133
|
-
expect(subject.encode(payload)).to eq("AAA#{payload}BBB")
|
134
|
-
end
|
135
|
-
|
136
|
-
it "must not change the given payload String" do
|
137
|
-
subject.encode(payload)
|
138
|
-
|
139
|
-
expect(payload).to eq("foo")
|
140
|
-
end
|
141
|
-
|
142
|
-
context "when one of the encoders in #encoders does not return a String" do
|
143
|
-
let(:bad_encoder) { TestEncoderPipeline::BadEncoder.new }
|
144
|
-
before { subject << bad_encoder }
|
145
|
-
|
146
|
-
it do
|
147
|
-
expect {
|
148
|
-
subject.encode(payload)
|
149
|
-
}.to raise_error(Ronin::Payloads::Encoders::BadEncoder,"no result was returned by the encoder: #{bad_encoder.inspect}")
|
150
|
-
end
|
151
|
-
end
|
152
|
-
end
|
153
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/encoders/powershell_encoder'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Encoders::PowerShellEncoder do
|
5
|
-
it "must inherit from Ronin::Payloads::Encoders::Encoder" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Encoders::Encoder
|
7
|
-
end
|
8
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/encoders/shell_encoder'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Encoders::ShellEncoder do
|
5
|
-
it "must inherit from Ronin::Payloads::Encoders::Encoder" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Encoders::Encoder
|
7
|
-
end
|
8
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/encoders/sql_encoder'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Encoders::SQLEncoder do
|
5
|
-
it "must inherit from Ronin::Payloads::Encoders::Encoder" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Encoders::Encoder
|
7
|
-
end
|
8
|
-
end
|