ronin-support 0.4.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +11 -0
- data/.github/workflows/ruby.yml +28 -0
- data/.ruby-version +1 -0
- data/.yardopts +1 -1
- data/ChangeLog.md +121 -33
- data/Gemfile +17 -18
- data/README.md +57 -33
- data/Rakefile +10 -3
- data/gemspec.yml +16 -7
- data/lib/ronin/binary.rb +21 -0
- data/lib/ronin/binary/hexdump.rb +20 -0
- data/lib/ronin/binary/hexdump/parser.rb +403 -0
- data/lib/ronin/binary/struct.rb +567 -0
- data/lib/ronin/binary/template.rb +454 -0
- data/lib/ronin/extensions.rb +5 -5
- data/lib/ronin/extensions/enumerable.rb +5 -5
- data/lib/ronin/extensions/file.rb +39 -33
- data/lib/ronin/extensions/ip_addr.rb +29 -31
- data/lib/ronin/extensions/kernel.rb +5 -5
- data/lib/ronin/extensions/meta.rb +5 -5
- data/lib/ronin/extensions/regexp.rb +50 -5
- data/lib/ronin/extensions/resolv.rb +7 -9
- data/lib/ronin/extensions/string.rb +10 -10
- data/lib/ronin/formatting.rb +5 -5
- data/lib/ronin/formatting/binary.rb +5 -5
- data/lib/ronin/formatting/digest.rb +5 -5
- data/lib/ronin/formatting/extensions.rb +5 -5
- data/lib/ronin/formatting/extensions/binary.rb +7 -5
- data/lib/ronin/formatting/extensions/binary/array.rb +61 -0
- data/lib/ronin/formatting/extensions/binary/base64.rb +106 -0
- data/lib/ronin/formatting/extensions/binary/file.rb +44 -11
- data/lib/ronin/formatting/extensions/binary/float.rb +65 -0
- data/lib/ronin/formatting/extensions/binary/integer.rb +66 -50
- data/lib/ronin/formatting/extensions/binary/string.rb +81 -205
- data/lib/ronin/formatting/extensions/digest.rb +5 -5
- data/lib/ronin/formatting/extensions/digest/file.rb +5 -5
- data/lib/ronin/formatting/extensions/digest/string.rb +5 -5
- data/lib/ronin/formatting/extensions/html.rb +5 -5
- data/lib/ronin/formatting/extensions/html/integer.rb +9 -13
- data/lib/ronin/formatting/extensions/html/string.rb +31 -39
- data/lib/ronin/formatting/extensions/http.rb +5 -5
- data/lib/ronin/formatting/extensions/http/integer.rb +6 -6
- data/lib/ronin/formatting/extensions/http/string.rb +7 -7
- data/lib/ronin/formatting/extensions/sql.rb +5 -5
- data/lib/ronin/formatting/extensions/sql/string.rb +22 -24
- data/lib/ronin/formatting/extensions/text.rb +5 -5
- data/lib/ronin/formatting/extensions/text/array.rb +13 -11
- data/lib/ronin/formatting/extensions/text/string.rb +70 -13
- data/lib/ronin/formatting/html.rb +5 -5
- data/lib/ronin/formatting/http.rb +5 -5
- data/lib/ronin/formatting/sql.rb +5 -5
- data/lib/ronin/formatting/text.rb +5 -5
- data/lib/ronin/fuzzing.rb +5 -5
- data/lib/ronin/fuzzing/extensions.rb +5 -5
- data/lib/ronin/fuzzing/extensions/string.rb +42 -213
- data/lib/ronin/fuzzing/fuzzer.rb +110 -0
- data/lib/ronin/fuzzing/fuzzing.rb +33 -26
- data/lib/ronin/fuzzing/mutator.rb +161 -0
- data/lib/ronin/fuzzing/repeater.rb +81 -0
- data/lib/ronin/fuzzing/template.rb +133 -0
- data/lib/ronin/mixin.rb +2 -2
- data/lib/ronin/network.rb +7 -5
- data/lib/ronin/network/dns.rb +64 -24
- data/lib/ronin/network/esmtp.rb +5 -5
- data/lib/ronin/network/extensions.rb +5 -5
- data/lib/ronin/network/extensions/dns.rb +5 -5
- data/lib/ronin/network/extensions/dns/net.rb +5 -5
- data/lib/ronin/network/extensions/esmtp.rb +5 -5
- data/lib/ronin/network/extensions/esmtp/net.rb +5 -5
- data/lib/ronin/network/extensions/http.rb +5 -5
- data/lib/ronin/network/extensions/http/net.rb +5 -5
- data/lib/ronin/network/extensions/http/uri/http.rb +5 -5
- data/lib/ronin/network/extensions/imap.rb +5 -5
- data/lib/ronin/network/extensions/imap/net.rb +5 -5
- data/lib/ronin/network/extensions/pop3.rb +5 -5
- data/lib/ronin/network/extensions/pop3/net.rb +5 -5
- data/lib/ronin/network/extensions/smtp.rb +5 -5
- data/lib/ronin/network/extensions/smtp/net.rb +5 -5
- data/lib/ronin/network/extensions/ssl.rb +5 -5
- data/lib/ronin/network/extensions/ssl/net.rb +5 -5
- data/lib/ronin/network/extensions/tcp.rb +5 -5
- data/lib/ronin/network/extensions/tcp/net.rb +5 -5
- data/lib/ronin/network/extensions/telnet.rb +5 -5
- data/lib/ronin/network/extensions/telnet/net.rb +5 -5
- data/lib/ronin/network/extensions/udp.rb +5 -5
- data/lib/ronin/network/extensions/udp/net.rb +5 -5
- data/lib/ronin/network/ftp.rb +149 -0
- data/lib/ronin/network/http.rb +5 -5
- data/lib/ronin/network/http/exceptions.rb +5 -5
- data/lib/ronin/network/http/exceptions/unknown_request.rb +5 -5
- data/lib/ronin/network/http/http.rb +65 -70
- data/lib/ronin/network/http/proxy.rb +5 -5
- data/lib/ronin/network/imap.rb +16 -15
- data/lib/ronin/network/mixins.rb +6 -5
- data/lib/ronin/network/mixins/dns.rb +5 -5
- data/lib/ronin/network/mixins/esmtp.rb +5 -5
- data/lib/ronin/network/mixins/ftp.rb +155 -0
- data/lib/ronin/network/mixins/http.rb +58 -587
- data/lib/ronin/network/mixins/imap.rb +5 -5
- data/lib/ronin/network/mixins/mixin.rb +5 -5
- data/lib/ronin/network/mixins/pop3.rb +5 -5
- data/lib/ronin/network/mixins/smtp.rb +5 -5
- data/lib/ronin/network/mixins/ssl.rb +5 -5
- data/lib/ronin/network/mixins/tcp.rb +43 -10
- data/lib/ronin/network/mixins/telnet.rb +5 -5
- data/lib/ronin/network/mixins/udp.rb +126 -6
- data/lib/ronin/network/mixins/unix.rb +279 -0
- data/lib/ronin/network/network.rb +5 -5
- data/lib/ronin/network/pop3.rb +10 -10
- data/lib/ronin/network/proxy.rb +578 -0
- data/lib/ronin/network/smtp.rb +5 -5
- data/lib/ronin/network/smtp/email.rb +6 -6
- data/lib/ronin/network/smtp/smtp.rb +12 -13
- data/lib/ronin/network/ssl.rb +16 -17
- data/lib/ronin/network/tcp.rb +7 -310
- data/lib/ronin/network/tcp/proxy.rb +417 -0
- data/lib/ronin/network/tcp/tcp.rb +452 -0
- data/lib/ronin/network/telnet.rb +34 -28
- data/lib/ronin/network/udp.rb +7 -271
- data/lib/ronin/network/udp/proxy.rb +191 -0
- data/lib/ronin/network/udp/udp.rb +452 -0
- data/lib/ronin/network/unix.rb +286 -0
- data/lib/ronin/path.rb +35 -39
- data/lib/ronin/spec/ui/output.rb +6 -12
- data/lib/ronin/support.rb +6 -5
- data/lib/ronin/support/inflector.rb +8 -12
- data/lib/ronin/support/support.rb +7 -5
- data/lib/ronin/support/version.rb +6 -6
- data/lib/ronin/templates.rb +5 -5
- data/lib/ronin/templates/erb.rb +5 -5
- data/lib/ronin/templates/template.rb +5 -5
- data/lib/ronin/ui/output.rb +5 -5
- data/lib/ronin/ui/output/helpers.rb +42 -28
- data/lib/ronin/ui/output/output.rb +17 -21
- data/lib/ronin/ui/output/terminal.rb +5 -5
- data/lib/ronin/ui/output/terminal/color.rb +15 -9
- data/lib/ronin/ui/output/terminal/raw.rb +5 -5
- data/lib/ronin/ui/shell.rb +8 -11
- data/lib/ronin/wordlist.rb +110 -30
- data/ronin-support.gemspec +39 -109
- data/spec/binary/hexdump/helpers/hexdumps.rb +13 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/ascii.bin +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/hexdump_decimal_shorts.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/hexdump_hex_bytes.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/hexdump_hex_shorts.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/hexdump_octal_bytes.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/hexdump_octal_shorts.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/hexdump_repeated.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/od_decimal_bytes.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/od_decimal_ints.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/od_decimal_quads.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/od_decimal_shorts.txt +0 -0
- data/spec/binary/hexdump/helpers/hexdumps/od_doubles.txt +17 -0
- data/spec/binary/hexdump/helpers/hexdumps/od_floats.txt +17 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/od_hex_bytes.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/od_hex_ints.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/od_hex_quads.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/od_hex_shorts.txt +0 -0
- data/spec/binary/hexdump/helpers/hexdumps/od_named_chars.txt +17 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/od_octal_bytes.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/od_octal_ints.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/od_octal_quads.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/od_octal_shorts.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/od_repeated.txt +0 -0
- data/spec/{formatting/binary → binary/hexdump}/helpers/hexdumps/repeated.bin +0 -0
- data/spec/binary/hexdump/parser_spec.rb +302 -0
- data/spec/binary/struct_spec.rb +496 -0
- data/spec/binary/template_spec.rb +416 -0
- data/spec/extensions/enumerable_spec.rb +4 -4
- data/spec/extensions/file_spec.rb +12 -14
- data/spec/extensions/ip_addr_spec.rb +76 -50
- data/spec/extensions/kernel_spec.rb +7 -7
- data/spec/extensions/regexp_spec.rb +119 -59
- data/spec/extensions/resolv_spec.rb +2 -2
- data/spec/extensions/string_spec.rb +31 -30
- data/spec/formatting/binary/array_spec.rb +26 -0
- data/spec/formatting/binary/base64_spec.rb +50 -0
- data/spec/formatting/binary/float_spec.rb +36 -0
- data/spec/formatting/binary/integer_spec.rb +76 -50
- data/spec/formatting/binary/string_spec.rb +91 -198
- data/spec/formatting/digest/string_spec.rb +5 -5
- data/spec/formatting/html/integer_spec.rb +6 -6
- data/spec/formatting/html/string_spec.rb +10 -10
- data/spec/formatting/http/integer_spec.rb +3 -3
- data/spec/formatting/http/string_spec.rb +5 -5
- data/spec/formatting/sql/string_spec.rb +21 -19
- data/spec/formatting/text/array_spec.rb +15 -15
- data/spec/formatting/text/string_spec.rb +58 -28
- data/spec/fuzzing/extensions/string_spec.rb +87 -0
- data/spec/fuzzing/fuzzer_spec.rb +109 -0
- data/spec/fuzzing/fuzzing_spec.rb +24 -0
- data/spec/fuzzing/mutator_spec.rb +112 -0
- data/spec/fuzzing/repeater_spec.rb +57 -0
- data/spec/fuzzing/template_spec.rb +54 -0
- data/spec/mixin_spec.rb +10 -12
- data/spec/network/dns_spec.rb +89 -23
- data/spec/network/ftp_spec.rb +81 -0
- data/spec/network/http/http_spec.rb +237 -144
- data/spec/network/http/proxy_spec.rb +37 -37
- data/spec/network/network_spec.rb +2 -2
- data/spec/network/proxy_spec.rb +121 -0
- data/spec/network/shared/unix_server.rb +31 -0
- data/spec/network/smtp/email_spec.rb +14 -14
- data/spec/network/ssl_spec.rb +53 -3
- data/spec/network/tcp/proxy_spec.rb +118 -0
- data/spec/network/tcp/tcp_spec.rb +316 -0
- data/spec/network/telnet_spec.rb +67 -0
- data/spec/network/udp/udp_spec.rb +298 -0
- data/spec/network/unix_spec.rb +182 -0
- data/spec/path_spec.rb +43 -18
- data/spec/spec_helper.rb +2 -3
- data/spec/support/inflector_spec.rb +4 -4
- data/spec/support_spec.rb +1 -1
- data/spec/templates/erb_spec.rb +3 -3
- data/spec/templates/template_spec.rb +10 -10
- data/spec/ui/shell_spec.rb +15 -15
- data/spec/wordlist_spec.rb +80 -19
- metadata +176 -121
- data/.gemtest +0 -0
- data/spec/formatting/binary/helpers/hexdumps.rb +0 -16
- data/spec/fuzzing/string_spec.rb +0 -158
- data/spec/network/tcp_spec.rb +0 -247
- data/spec/network/udp_spec.rb +0 -248
data/lib/ronin/path.rb
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
3
|
#
|
4
|
-
# This file is part of
|
4
|
+
# This file is part of ronin-support.
|
5
5
|
#
|
6
|
-
#
|
6
|
+
# ronin-support is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU Lesser General Public License as published
|
8
8
|
# by the Free Software Foundation, either version 3 of the License, or
|
9
9
|
# (at your option) any later version.
|
10
10
|
#
|
11
|
-
#
|
11
|
+
# ronin-support is distributed in the hope that it will be useful,
|
12
12
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
13
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
14
|
# GNU Lesser General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU Lesser General Public License
|
17
|
-
# along with
|
17
|
+
# along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'pathname'
|
@@ -24,13 +24,24 @@ module Ronin
|
|
24
24
|
# The {Path} class extends `Pathname` to allow representing directory
|
25
25
|
# traversal paths.
|
26
26
|
#
|
27
|
+
# @api public
|
28
|
+
#
|
27
29
|
class Path < Pathname
|
28
30
|
|
29
31
|
# The separator to join paths together with
|
30
32
|
attr_accessor :separator
|
31
33
|
|
32
|
-
|
33
|
-
|
34
|
+
#
|
35
|
+
# Initializes a new Path.
|
36
|
+
#
|
37
|
+
# @param [String] path
|
38
|
+
# The path.
|
39
|
+
#
|
40
|
+
# @param [String] separator
|
41
|
+
# The directory separator to use.
|
42
|
+
#
|
43
|
+
def initialize(path,separator=File::SEPARATOR)
|
44
|
+
@separator = separator
|
34
45
|
|
35
46
|
super(path)
|
36
47
|
end
|
@@ -41,8 +52,6 @@ module Ronin
|
|
41
52
|
# @return [Path]
|
42
53
|
# The root path.
|
43
54
|
#
|
44
|
-
# @api public
|
45
|
-
#
|
46
55
|
def Path.root
|
47
56
|
Path.new('/')
|
48
57
|
end
|
@@ -62,34 +71,28 @@ module Ronin
|
|
62
71
|
# @raise [ArgumentError]
|
63
72
|
# A negative number was given as the first argument.
|
64
73
|
#
|
65
|
-
# @example Generate a relative path that goes up 7 directories
|
74
|
+
# @example Generate a relative path that goes up 7 directories:
|
66
75
|
# Path.up(7)
|
67
76
|
# # => #<Ronin::Path:../../../../../../..>
|
68
77
|
#
|
69
|
-
# @example Generate multiple relative paths, going up 1 to 3 directories
|
78
|
+
# @example Generate multiple relative paths, going up 1 to 3 directories:
|
70
79
|
# Path.up(1..3)
|
71
80
|
# # => [#<Ronin::Path:..>, #<Ronin::Path:../..>,
|
72
81
|
# #<Ronin::Path:../../..>]
|
73
82
|
#
|
74
|
-
# @api public
|
75
|
-
#
|
76
83
|
def self.up(n,separator=File::SEPARATOR)
|
77
84
|
case n
|
78
85
|
when Integer
|
79
86
|
if n == 0
|
80
|
-
|
81
|
-
elsif n
|
87
|
+
separator
|
88
|
+
elsif n > 0
|
89
|
+
path = new('..',separator)
|
90
|
+
path.join(*(['..'] * (n-1)))
|
91
|
+
else
|
82
92
|
raise(ArgumentError,"negative argument")
|
83
93
|
end
|
84
|
-
|
85
|
-
path = new('..')
|
86
|
-
path.separator = separator
|
87
|
-
|
88
|
-
dirs = (['..'] * (n-1))
|
89
|
-
|
90
|
-
return Path.new(path.join(*dirs))
|
91
94
|
when Enumerable
|
92
|
-
|
95
|
+
n.map { |i| up(i) }
|
93
96
|
else
|
94
97
|
raise(ArgumentError,"The first argument of Path.up must be either an Integer or Enumerable")
|
95
98
|
end
|
@@ -109,26 +112,19 @@ module Ronin
|
|
109
112
|
# Path.up(7).join('etc/passwd')
|
110
113
|
# # => #<Ronin::Path:../../../../../../../etc/passwd>
|
111
114
|
#
|
112
|
-
# @api public
|
113
|
-
#
|
114
115
|
def join(*names)
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
names.reject! { |dir| dir == @separator }
|
116
|
+
joined_path = if root? then ''
|
117
|
+
else self.to_s
|
118
|
+
end
|
119
119
|
|
120
|
-
|
121
|
-
|
120
|
+
names.each do |name|
|
121
|
+
name = name.to_s
|
122
122
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
else
|
127
|
-
# join the path with the sub-path
|
128
|
-
[self.to_s, sub_path].join(@separator)
|
129
|
-
end
|
123
|
+
joined_path << @separator unless name.start_with?(@separator)
|
124
|
+
joined_path << name unless name == @separator
|
125
|
+
end
|
130
126
|
|
131
|
-
return self.class.new(
|
127
|
+
return self.class.new(joined_path,@separator)
|
132
128
|
end
|
133
129
|
|
134
130
|
alias / join
|
data/lib/ronin/spec/ui/output.rb
CHANGED
@@ -1,28 +1,22 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
3
|
#
|
4
|
-
# This file is part of
|
4
|
+
# This file is part of ronin-support.
|
5
5
|
#
|
6
|
-
#
|
6
|
+
# ronin-support is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU Lesser General Public License as published
|
8
8
|
# by the Free Software Foundation, either version 3 of the License, or
|
9
9
|
# (at your option) any later version.
|
10
10
|
#
|
11
|
-
#
|
11
|
+
# ronin-support is distributed in the hope that it will be useful,
|
12
12
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
13
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
14
|
# GNU Lesser General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU Lesser General Public License
|
17
|
-
# along with
|
17
|
+
# along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/ui/output'
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
RSpec.configure do |spec|
|
25
|
-
spec.before(:suite) do
|
26
|
-
Ronin::UI::Output.silent! unless ENV['DEBUG']
|
27
|
-
end
|
28
|
-
end
|
22
|
+
Ronin::UI::Output.silent! unless ENV['DEBUG']
|
data/lib/ronin/support.rb
CHANGED
@@ -1,25 +1,26 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
3
|
#
|
4
|
-
# This file is part of
|
4
|
+
# This file is part of ronin-support.
|
5
5
|
#
|
6
|
-
#
|
6
|
+
# ronin-support is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU Lesser General Public License as published
|
8
8
|
# by the Free Software Foundation, either version 3 of the License, or
|
9
9
|
# (at your option) any later version.
|
10
10
|
#
|
11
|
-
#
|
11
|
+
# ronin-support is distributed in the hope that it will be useful,
|
12
12
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
13
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
14
|
# GNU Lesser General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU Lesser General Public License
|
17
|
-
# along with
|
17
|
+
# along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/extensions'
|
21
21
|
require 'ronin/formatting'
|
22
22
|
require 'ronin/fuzzing'
|
23
|
+
require 'ronin/binary'
|
23
24
|
require 'ronin/network'
|
24
25
|
require 'ronin/path'
|
25
26
|
require 'ronin/templates'
|
@@ -1,37 +1,33 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
3
|
#
|
4
|
-
# This file is part of
|
4
|
+
# This file is part of ronin-support.
|
5
5
|
#
|
6
|
-
#
|
6
|
+
# ronin-support is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU Lesser General Public License as published
|
8
8
|
# by the Free Software Foundation, either version 3 of the License, or
|
9
9
|
# (at your option) any later version.
|
10
10
|
#
|
11
|
-
#
|
11
|
+
# ronin-support is distributed in the hope that it will be useful,
|
12
12
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
13
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
14
|
# GNU Lesser General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU Lesser General Public License
|
17
|
-
# along with
|
17
|
+
# along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
module Ronin
|
21
21
|
module Support
|
22
22
|
# The Inflectors supported by ronin-support
|
23
23
|
INFLECTORS = {
|
24
|
-
:
|
24
|
+
:data_mapper => {
|
25
25
|
:path => 'dm-core',
|
26
26
|
:const => 'DataMapper::Inflector'
|
27
27
|
},
|
28
28
|
:active_support => {
|
29
29
|
:path => 'active_support/inflector',
|
30
30
|
:const => 'ActiveSupport::Inflector'
|
31
|
-
},
|
32
|
-
:extlib => {
|
33
|
-
:path => 'extlib/inflection',
|
34
|
-
:const => 'Extlib::Inflection'
|
35
31
|
}
|
36
32
|
}
|
37
33
|
|
@@ -41,7 +37,7 @@ module Ronin
|
|
41
37
|
#
|
42
38
|
# @param [Symbol, String] name
|
43
39
|
# The name of the Inflector library to load. May be either
|
44
|
-
# `:datamapper
|
40
|
+
# `:datamapper` or `:active_support`.
|
45
41
|
#
|
46
42
|
# @return [true]
|
47
43
|
# Specifies that the Inflector library was successfully loaded.
|
@@ -81,7 +77,7 @@ module Ronin
|
|
81
77
|
return true
|
82
78
|
end
|
83
79
|
|
84
|
-
[:
|
80
|
+
[:data_mapper, :active_support].each do |name|
|
85
81
|
begin
|
86
82
|
Support.load_inflector!(name)
|
87
83
|
break
|
@@ -1,20 +1,20 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
3
|
#
|
4
|
-
# This file is part of
|
4
|
+
# This file is part of ronin-support.
|
5
5
|
#
|
6
|
-
#
|
6
|
+
# ronin-support is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU Lesser General Public License as published
|
8
8
|
# by the Free Software Foundation, either version 3 of the License, or
|
9
9
|
# (at your option) any later version.
|
10
10
|
#
|
11
|
-
#
|
11
|
+
# ronin-support is distributed in the hope that it will be useful,
|
12
12
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
13
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
14
|
# GNU Lesser General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU Lesser General Public License
|
17
|
-
# along with
|
17
|
+
# along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/ui/output'
|
@@ -30,11 +30,13 @@ module Ronin
|
|
30
30
|
include Network::TCP
|
31
31
|
include Network::UDP
|
32
32
|
include Network::SSL
|
33
|
+
include Network::UNIX
|
33
34
|
include Network::SMTP
|
34
35
|
include Network::ESMTP
|
35
36
|
include Network::POP3
|
36
37
|
include Network::IMAP
|
37
38
|
include Network::Telnet
|
39
|
+
include Network::FTP
|
38
40
|
include Network::HTTP
|
39
41
|
end
|
40
42
|
end
|
@@ -1,25 +1,25 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
3
|
#
|
4
|
-
# This file is part of
|
4
|
+
# This file is part of ronin-support.
|
5
5
|
#
|
6
|
-
#
|
6
|
+
# ronin-support is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU Lesser General Public License as published
|
8
8
|
# by the Free Software Foundation, either version 3 of the License, or
|
9
9
|
# (at your option) any later version.
|
10
10
|
#
|
11
|
-
#
|
11
|
+
# ronin-support is distributed in the hope that it will be useful,
|
12
12
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
13
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
14
|
# GNU Lesser General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU Lesser General Public License
|
17
|
-
# along with
|
17
|
+
# along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
module Ronin
|
21
21
|
module Support
|
22
22
|
# ronin-support version
|
23
|
-
VERSION = '0.
|
23
|
+
VERSION = '0.5.2'
|
24
24
|
end
|
25
25
|
end
|
data/lib/ronin/templates.rb
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
3
|
#
|
4
|
-
# This file is part of
|
4
|
+
# This file is part of ronin-support.
|
5
5
|
#
|
6
|
-
#
|
6
|
+
# ronin-support is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU Lesser General Public License as published
|
8
8
|
# by the Free Software Foundation, either version 3 of the License, or
|
9
9
|
# (at your option) any later version.
|
10
10
|
#
|
11
|
-
#
|
11
|
+
# ronin-support is distributed in the hope that it will be useful,
|
12
12
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
13
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
14
|
# GNU Lesser General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU Lesser General Public License
|
17
|
-
# along with
|
17
|
+
# along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/templates/template'
|
data/lib/ronin/templates/erb.rb
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
3
|
#
|
4
|
-
# This file is part of
|
4
|
+
# This file is part of ronin-support.
|
5
5
|
#
|
6
|
-
#
|
6
|
+
# ronin-support is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU Lesser General Public License as published
|
8
8
|
# by the Free Software Foundation, either version 3 of the License, or
|
9
9
|
# (at your option) any later version.
|
10
10
|
#
|
11
|
-
#
|
11
|
+
# ronin-support is distributed in the hope that it will be useful,
|
12
12
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
13
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
14
|
# GNU Lesser General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU Lesser General Public License
|
17
|
-
# along with
|
17
|
+
# along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/templates/template'
|
@@ -1,20 +1,20 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
3
|
#
|
4
|
-
# This file is part of
|
4
|
+
# This file is part of ronin-support.
|
5
5
|
#
|
6
|
-
#
|
6
|
+
# ronin-support is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU Lesser General Public License as published
|
8
8
|
# by the Free Software Foundation, either version 3 of the License, or
|
9
9
|
# (at your option) any later version.
|
10
10
|
#
|
11
|
-
#
|
11
|
+
# ronin-support is distributed in the hope that it will be useful,
|
12
12
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
13
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
14
|
# GNU Lesser General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU Lesser General Public License
|
17
|
-
# along with
|
17
|
+
# along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'data_paths/finders'
|
data/lib/ronin/ui/output.rb
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
|
3
3
|
#
|
4
|
-
# This file is part of
|
4
|
+
# This file is part of ronin-support.
|
5
5
|
#
|
6
|
-
#
|
6
|
+
# ronin-support is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU Lesser General Public License as published
|
8
8
|
# by the Free Software Foundation, either version 3 of the License, or
|
9
9
|
# (at your option) any later version.
|
10
10
|
#
|
11
|
-
#
|
11
|
+
# ronin-support is distributed in the hope that it will be useful,
|
12
12
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
13
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
14
|
# GNU Lesser General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU Lesser General Public License
|
17
|
-
# along with
|
17
|
+
# along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/ui/output/output'
|