ronin 2.0.0.beta1 → 2.0.0.beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +72 -4
- data/data/new/project/Rakefile +3 -3
- data/data/new/project/project.rb.erb +1 -1
- data/gemspec.yml +12 -6
- data/lib/ronin/cli/char_set_options.rb +81 -68
- data/lib/ronin/cli/commands/dns.rb +3 -95
- data/lib/ronin/cli/commands/extract.rb +17 -7
- data/lib/ronin/cli/commands/grep.rb +17 -7
- data/lib/ronin/cli/commands/hexdump.rb +8 -2
- data/lib/ronin/cli/commands/host.rb +6 -88
- data/lib/ronin/cli/commands/http.rb +11 -11
- data/lib/ronin/cli/commands/public_suffix_list.rb +16 -2
- data/lib/ronin/cli/commands/tld_list.rb +16 -2
- data/lib/ronin/cli/dns.rb +136 -0
- data/lib/ronin/cli/pattern_options.rb +200 -85
- data/lib/ronin/cli.rb +5 -0
- data/lib/ronin/version.rb +1 -1
- data/man/ronin-extract.1 +52 -12
- data/man/ronin-extract.1.md +42 -12
- data/man/ronin-grep.1 +52 -12
- data/man/ronin-grep.1.md +42 -12
- data/man/ronin-http.1 +2 -2
- data/man/ronin-http.1.md +1 -1
- data/ronin.gemspec +2 -1
- metadata +15 -25
- data/spec/cli/command_spec.rb +0 -10
- data/spec/cli/commands/decode_spec.rb +0 -152
- data/spec/cli/commands/encode_spec.rb +0 -152
- data/spec/cli/commands/escape_spec.rb +0 -128
- data/spec/cli/commands/quote_spec.rb +0 -76
- data/spec/cli/commands/unescape_spec.rb +0 -128
- data/spec/cli/commands/unquote_spec.rb +0 -80
- data/spec/cli/fixtures/file.txt +0 -3
- data/spec/cli/fixtures/file2.txt +0 -3
- data/spec/cli/key_options_spec.rb +0 -56
- data/spec/cli/method_options_spec.rb +0 -71
- data/spec/cli/string_methods_command_spec.rb +0 -25
- data/spec/cli/string_processor_command_spec.rb +0 -258
- data/spec/cli/value_processor_command_spec.rb +0 -127
- data/spec/spec_helper.rb +0 -5
- data/spec/version_spec.rb +0 -11
data/man/ronin-grep.1
CHANGED
@@ -95,7 +95,7 @@ Searches for all AMEX Credit Card numbers\.
|
|
95
95
|
.LP
|
96
96
|
.TP
|
97
97
|
\fB--discover-cc\fR
|
98
|
-
Searches for all
|
98
|
+
Searches for all Discover Card numbers\.
|
99
99
|
.LP
|
100
100
|
.TP
|
101
101
|
\fB--mastercard-cc\fR
|
@@ -158,10 +158,18 @@ Searches for all absolute paths\.
|
|
158
158
|
Searches for all paths\.
|
159
159
|
.LP
|
160
160
|
.TP
|
161
|
+
\fB--identifier\fR
|
162
|
+
Searches for all identifier names\.
|
163
|
+
.LP
|
164
|
+
.TP
|
161
165
|
\fB--variable-name\fR
|
162
166
|
Searches for all variable names\.
|
163
167
|
.LP
|
164
168
|
.TP
|
169
|
+
\fB--variable-assignment\fR
|
170
|
+
Searches for all variable assignments\.
|
171
|
+
.LP
|
172
|
+
.TP
|
165
173
|
\fB--function-name\fR
|
166
174
|
Searches for all function names\.
|
167
175
|
.LP
|
@@ -190,24 +198,24 @@ Searches for all hashes\.
|
|
190
198
|
Searches for all SSH private key data\.
|
191
199
|
.LP
|
192
200
|
.TP
|
193
|
-
\fB--
|
194
|
-
Searches for all
|
201
|
+
\fB--dsa-private-key\fR
|
202
|
+
Searches for all DSA private key data\.
|
195
203
|
.LP
|
196
204
|
.TP
|
197
|
-
\fB-
|
198
|
-
Searches for all private key data\.
|
205
|
+
\fB--ec-private-key\fR
|
206
|
+
Searches for all EC private key data\.
|
199
207
|
.LP
|
200
208
|
.TP
|
201
|
-
\fB--rsa-
|
202
|
-
Searches for all RSA
|
209
|
+
\fB--rsa-private-key\fR
|
210
|
+
Searches for all RSA private key data\.
|
203
211
|
.LP
|
204
212
|
.TP
|
205
|
-
\fB--
|
206
|
-
Searches for all
|
213
|
+
\fB-K\fR, \fB--private-key\fR
|
214
|
+
Searches for all private key data\.
|
207
215
|
.LP
|
208
216
|
.TP
|
209
|
-
\fB--
|
210
|
-
Searches for all
|
217
|
+
\fB--ssh-public-key\fR
|
218
|
+
Searches for all SSH public key data\.
|
211
219
|
.LP
|
212
220
|
.TP
|
213
221
|
\fB--public-key\fR
|
@@ -219,7 +227,7 @@ Searches for all AWS access key IDs\.
|
|
219
227
|
.LP
|
220
228
|
.TP
|
221
229
|
\fB--aws-secret-access-key\fR
|
222
|
-
Searches for all AWS secret access
|
230
|
+
Searches for all AWS secret access keys\.
|
223
231
|
.LP
|
224
232
|
.TP
|
225
233
|
\fB-A\fR, \fB--api-key\fR
|
@@ -242,6 +250,38 @@ Searches for all quoted strings\.
|
|
242
250
|
\fB-B\fR, \fB--base64\fR
|
243
251
|
Searches for all Base64 strings\.
|
244
252
|
.LP
|
253
|
+
.TP
|
254
|
+
\fB--c-comment\fR
|
255
|
+
Searches for all C comments\.
|
256
|
+
.LP
|
257
|
+
.TP
|
258
|
+
\fB--cpp-comment\fR
|
259
|
+
Searches for all C\[pl]\[pl] comments\.
|
260
|
+
.LP
|
261
|
+
.TP
|
262
|
+
\fB--java-comment\fR
|
263
|
+
Searches for all Java comments\.
|
264
|
+
.LP
|
265
|
+
.TP
|
266
|
+
\fB--javascript-comment\fR
|
267
|
+
Searches for all JavaScript comments\.
|
268
|
+
.LP
|
269
|
+
.TP
|
270
|
+
\fB--shell-comment\fR
|
271
|
+
Searches for all Shell comments\.
|
272
|
+
.LP
|
273
|
+
.TP
|
274
|
+
\fB--ruby-comment\fR
|
275
|
+
Searches for all Ruby comments\.
|
276
|
+
.LP
|
277
|
+
.TP
|
278
|
+
\fB--python-comment\fR
|
279
|
+
Searches for all Python comments\.
|
280
|
+
.LP
|
281
|
+
.TP
|
282
|
+
\fB--comment\fR
|
283
|
+
Searches for all comments\.
|
284
|
+
.LP
|
245
285
|
.HP
|
246
286
|
\fB-e\fR, \fB--regexp\fR \[sl]\fIREGEXP\fP\[sl]
|
247
287
|
Custom regular expression to search for\.
|
data/man/ronin-grep.1.md
CHANGED
@@ -71,7 +71,7 @@ Greps for common patterns in the given file(s) or input stream.
|
|
71
71
|
Searches for all AMEX Credit Card numbers.
|
72
72
|
|
73
73
|
`--discover-cc`
|
74
|
-
Searches for all
|
74
|
+
Searches for all Discover Card numbers.
|
75
75
|
|
76
76
|
`--mastercard-cc`
|
77
77
|
Searches for all MasterCard numbers.
|
@@ -118,9 +118,15 @@ Greps for common patterns in the given file(s) or input stream.
|
|
118
118
|
`-P`, `--path`
|
119
119
|
Searches for all paths.
|
120
120
|
|
121
|
+
`--identifier`
|
122
|
+
Searches for all identifier names.
|
123
|
+
|
121
124
|
`--variable-name`
|
122
125
|
Searches for all variable names.
|
123
126
|
|
127
|
+
`--variable-assignment`
|
128
|
+
Searches for all variable assignments.
|
129
|
+
|
124
130
|
`--function-name`
|
125
131
|
Searches for all function names.
|
126
132
|
|
@@ -142,20 +148,20 @@ Greps for common patterns in the given file(s) or input stream.
|
|
142
148
|
`--ssh-private-key`
|
143
149
|
Searches for all SSH private key data.
|
144
150
|
|
145
|
-
`--
|
146
|
-
Searches for all
|
151
|
+
`--dsa-private-key`
|
152
|
+
Searches for all DSA private key data.
|
147
153
|
|
148
|
-
|
149
|
-
Searches for all private key data.
|
154
|
+
`--ec-private-key`
|
155
|
+
Searches for all EC private key data.
|
150
156
|
|
151
|
-
`--rsa-
|
152
|
-
Searches for all RSA
|
157
|
+
`--rsa-private-key`
|
158
|
+
Searches for all RSA private key data.
|
153
159
|
|
154
|
-
`--
|
155
|
-
Searches for all
|
160
|
+
`-K`, `--private-key`
|
161
|
+
Searches for all private key data.
|
156
162
|
|
157
|
-
`--
|
158
|
-
Searches for all
|
163
|
+
`--ssh-public-key`
|
164
|
+
Searches for all SSH public key data.
|
159
165
|
|
160
166
|
`--public-key`
|
161
167
|
Searches for all public key data.
|
@@ -164,7 +170,7 @@ Greps for common patterns in the given file(s) or input stream.
|
|
164
170
|
Searches for all AWS access key IDs.
|
165
171
|
|
166
172
|
`--aws-secret-access-key`
|
167
|
-
Searches for all AWS secret access
|
173
|
+
Searches for all AWS secret access keys.
|
168
174
|
|
169
175
|
`-A`, `--api-key`
|
170
176
|
Searches for all API keys (MD5, SHA1, SHA256, SHA512, AWS access key ID, or
|
@@ -182,6 +188,30 @@ Greps for common patterns in the given file(s) or input stream.
|
|
182
188
|
`-B`, `--base64`
|
183
189
|
Searches for all Base64 strings.
|
184
190
|
|
191
|
+
`--c-comment`
|
192
|
+
Searches for all C comments.
|
193
|
+
|
194
|
+
`--cpp-comment`
|
195
|
+
Searches for all C++ comments.
|
196
|
+
|
197
|
+
`--java-comment`
|
198
|
+
Searches for all Java comments.
|
199
|
+
|
200
|
+
`--javascript-comment`
|
201
|
+
Searches for all JavaScript comments.
|
202
|
+
|
203
|
+
`--shell-comment`
|
204
|
+
Searches for all Shell comments.
|
205
|
+
|
206
|
+
`--ruby-comment`
|
207
|
+
Searches for all Ruby comments.
|
208
|
+
|
209
|
+
`--python-comment`
|
210
|
+
Searches for all Python comments.
|
211
|
+
|
212
|
+
`--comment`
|
213
|
+
Searches for all comments.
|
214
|
+
|
185
215
|
`-e`, `--regexp` /*REGEXP*/
|
186
216
|
Custom regular expression to search for.
|
187
217
|
|
data/man/ronin-http.1
CHANGED
@@ -104,8 +104,8 @@ The proxy to use\.
|
|
104
104
|
\fB-U\fR, \fB--user-agent-string\fR \fISTRING\fP
|
105
105
|
The User\-Agent string to use\.
|
106
106
|
.LP
|
107
|
-
.
|
108
|
-
\fB-u\fR, \fB--user-agent\fR \fIchrome\[ru]linux\fP\[or]\fIchrome\[ru]macos\fP\[or]\fIchrome\[ru]windows\fP\[or]\fIchrome\[ru]iphone\fP\[or]\fIchrome\[ru]ipad\fP\[or]\fIchrome\[ru]android\fP\[or]\fIfirefox\[ru]linux\fP\[or]\fIfirefox\[ru]macos\fP\[or]\fIfirefox\[ru]windows\fP\[or]\fIfirefox\[ru]iphone\fP\[or]\fIfirefox\[ru]ipad\fP\[or]\fIfirefox\[ru]android\fP\[or]\fIsafari\[ru]macos\fP\[or]\fIsafari\[ru]iphone\fP\[or]\fIsafari\[ru]ipad\fP\[or]
|
107
|
+
.TP
|
108
|
+
\fB-u\fR, \fB--user-agent\fR \fIchrome\[ru]linux\fP\[or]\fIchrome\[ru]macos\fP\[or]\fIchrome\[ru]windows\fP\[or]\fIchrome\[ru]iphone\fP\[or]\fIchrome\[ru]ipad\fP\[or]\fIchrome\[ru]android\fP\[or]\fIfirefox\[ru]linux\fP\[or]\fIfirefox\[ru]macos\fP\[or]\fIfirefox\[ru]windows\fP\[or]\fIfirefox\[ru]iphone\fP\[or]\fIfirefox\[ru]ipad\fP\[or]\fIfirefox\[ru]android\fP\[or]\fIsafari\[ru]macos\fP\[or]\fIsafari\[ru]iphone\fP\[or]\fIsafari\[ru]ipad\fP\[or]\fIedge\fP
|
109
109
|
The User\-Agent to use\.
|
110
110
|
.LP
|
111
111
|
.TP
|
data/man/ronin-http.1.md
CHANGED
@@ -78,7 +78,7 @@ Send HTTP requests or spawn an interactive HTTP shell.
|
|
78
78
|
`-U`, `--user-agent-string` *STRING*
|
79
79
|
The User-Agent string to use.
|
80
80
|
|
81
|
-
`-u`, `--user-agent` *chrome_linux*\|*chrome_macos*\|*chrome_windows*\|*chrome_iphone*\|*chrome_ipad*\|*chrome_android*\|*firefox_linux*\|*firefox_macos*\|*firefox_windows*\|*firefox_iphone*\|*firefox_ipad*\|*firefox_android*\|*safari_macos*\|*safari_iphone*\|*safari_ipad*\|*edge
|
81
|
+
`-u`, `--user-agent` *chrome_linux*\|*chrome_macos*\|*chrome_windows*\|*chrome_iphone*\|*chrome_ipad*\|*chrome_android*\|*firefox_linux*\|*firefox_macos*\|*firefox_windows*\|*firefox_iphone*\|*firefox_ipad*\|*firefox_android*\|*safari_macos*\|*safari_iphone*\|*safari_ipad*\|*edge*
|
82
82
|
The User-Agent to use.
|
83
83
|
|
84
84
|
`-H`, `--header` "*NAME*: *VALUE*"
|
data/ronin.gemspec
CHANGED
@@ -26,6 +26,8 @@ Gem::Specification.new do |gem|
|
|
26
26
|
gem.files = `git ls-files`.split($/)
|
27
27
|
gem.files = glob[gemspec['files']] if gemspec['files']
|
28
28
|
gem.files += Array(gemspec['generated_files'])
|
29
|
+
# exclude test files from the packages gem
|
30
|
+
gem.files -= glob[gemspec['test_files'] || 'spec/{**/}*']
|
29
31
|
|
30
32
|
gem.executables = gemspec.fetch('executables') do
|
31
33
|
glob['bin/*'].map { |path| File.basename(path) }
|
@@ -33,7 +35,6 @@ Gem::Specification.new do |gem|
|
|
33
35
|
gem.default_executable = gem.executables.first if Gem::VERSION < '1.7.'
|
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
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: open_namespace
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.0.0.
|
75
|
+
version: 1.0.0.beta2
|
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: 1.0.0.
|
82
|
+
version: 1.0.0.beta2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: ronin-core
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 1.0.0.
|
145
|
+
version: 1.0.0.beta2
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 1.0.0.
|
152
|
+
version: 1.0.0.beta2
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: ronin-code-asm
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,14 +198,14 @@ dependencies:
|
|
198
198
|
requirements:
|
199
199
|
- - "~>"
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: 1.0.0.
|
201
|
+
version: 1.0.0.beta2
|
202
202
|
type: :runtime
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: 1.0.0.
|
208
|
+
version: 1.0.0.beta2
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: ronin-vulns
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -234,7 +234,12 @@ dependencies:
|
|
234
234
|
- - "~>"
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '2.0'
|
237
|
-
description: Ronin is a Ruby toolkit for security research and
|
237
|
+
description: Ronin is a free and Open Source Ruby toolkit for security research and
|
238
|
+
development.Ronin contains many different CLI commands and Ruby libraries for a
|
239
|
+
variety of security tasks, such as encoding/decoding data, filter IPs/hosts/URLs,
|
240
|
+
querying ASNs, querying DNS, HTTP, scanning for web vulnerabilities, spidering websites,
|
241
|
+
install 3rd party repositories of exploits and/or payloads, run exploits, generating
|
242
|
+
new exploits, managing local databases, fuzzing data, and much more.
|
238
243
|
email: postmodern.mod3@gmail.com
|
239
244
|
executables:
|
240
245
|
- ronin
|
@@ -384,6 +389,7 @@ files:
|
|
384
389
|
- lib/ronin/cli/commands/unquote.rb
|
385
390
|
- lib/ronin/cli/commands/url.rb
|
386
391
|
- lib/ronin/cli/commands/xor.rb
|
392
|
+
- lib/ronin/cli/dns.rb
|
387
393
|
- lib/ronin/cli/file_processor_command.rb
|
388
394
|
- lib/ronin/cli/http_shell.rb
|
389
395
|
- lib/ronin/cli/key_options.rb
|
@@ -498,22 +504,6 @@ files:
|
|
498
504
|
- man/ronin.1
|
499
505
|
- man/ronin.1.md
|
500
506
|
- ronin.gemspec
|
501
|
-
- spec/cli/command_spec.rb
|
502
|
-
- spec/cli/commands/decode_spec.rb
|
503
|
-
- spec/cli/commands/encode_spec.rb
|
504
|
-
- spec/cli/commands/escape_spec.rb
|
505
|
-
- spec/cli/commands/quote_spec.rb
|
506
|
-
- spec/cli/commands/unescape_spec.rb
|
507
|
-
- spec/cli/commands/unquote_spec.rb
|
508
|
-
- spec/cli/fixtures/file.txt
|
509
|
-
- spec/cli/fixtures/file2.txt
|
510
|
-
- spec/cli/key_options_spec.rb
|
511
|
-
- spec/cli/method_options_spec.rb
|
512
|
-
- spec/cli/string_methods_command_spec.rb
|
513
|
-
- spec/cli/string_processor_command_spec.rb
|
514
|
-
- spec/cli/value_processor_command_spec.rb
|
515
|
-
- spec/spec_helper.rb
|
516
|
-
- spec/version_spec.rb
|
517
507
|
homepage: https://ronin-rb.dev
|
518
508
|
licenses:
|
519
509
|
- GPL-3.0
|
data/spec/cli/command_spec.rb
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/cli/command'
|
3
|
-
|
4
|
-
describe Ronin::CLI::Command do
|
5
|
-
it { expect(described_class).to be < Ronin::Core::CLI::Command }
|
6
|
-
|
7
|
-
it "must set .man_dir" do
|
8
|
-
expect(described_class.man_dir).to eq(File.join(Ronin::ROOT,'man'))
|
9
|
-
end
|
10
|
-
end
|
@@ -1,152 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/cli/commands/decode'
|
3
|
-
|
4
|
-
describe Ronin::CLI::Commands::Decode do
|
5
|
-
describe "options" do
|
6
|
-
before { subject.parse_options(argv) }
|
7
|
-
|
8
|
-
describe "--base32" do
|
9
|
-
let(:argv) { %w[--base32] }
|
10
|
-
|
11
|
-
it "must require 'ronin/support/encoding/base32'" do
|
12
|
-
expect(require 'ronin/support/encoding/base32').to be(false)
|
13
|
-
end
|
14
|
-
|
15
|
-
it "must add :base32_decode to #method_calls" do
|
16
|
-
expect(subject.method_calls.last).to eq(:base32_decode)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
describe "--base64" do
|
21
|
-
let(:argv) { %w[--base64] }
|
22
|
-
|
23
|
-
it "must require 'ronin/support/encoding/base64'" do
|
24
|
-
expect(require 'ronin/support/encoding/base64').to be(false)
|
25
|
-
end
|
26
|
-
|
27
|
-
it "must add :base64_decode to #method_calls" do
|
28
|
-
expect(subject.method_calls.last).to eq(:base64_decode)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
describe "--c" do
|
33
|
-
let(:argv) { %w[--c] }
|
34
|
-
|
35
|
-
it "must require 'ronin/support/encoding/c'" do
|
36
|
-
expect(require 'ronin/support/encoding/c').to be(false)
|
37
|
-
end
|
38
|
-
|
39
|
-
it "must add :c_decode to #method_calls" do
|
40
|
-
expect(subject.method_calls.last).to eq(:c_decode)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
describe "--hex" do
|
45
|
-
let(:argv) { %w[--hex] }
|
46
|
-
|
47
|
-
it "must require 'ronin/support/encoding/hex'" do
|
48
|
-
expect(require 'ronin/support/encoding/hex').to be(false)
|
49
|
-
end
|
50
|
-
|
51
|
-
it "must add :hex_decode to #method_calls" do
|
52
|
-
expect(subject.method_calls.last).to eq(:hex_decode)
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
describe "--html" do
|
57
|
-
let(:argv) { %w[--html] }
|
58
|
-
|
59
|
-
it "must require 'ronin/support/encoding/html'" do
|
60
|
-
expect(require 'ronin/support/encoding/html').to be(false)
|
61
|
-
end
|
62
|
-
|
63
|
-
it "must add :html_decode to #method_calls" do
|
64
|
-
expect(subject.method_calls.last).to eq(:html_decode)
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
describe "--uri" do
|
69
|
-
let(:argv) { %w[--uri] }
|
70
|
-
|
71
|
-
it "must require 'ronin/support/encoding/uri'" do
|
72
|
-
expect(require 'ronin/support/encoding/uri').to be(false)
|
73
|
-
end
|
74
|
-
|
75
|
-
it "must add :uri_decode to #method_calls" do
|
76
|
-
expect(subject.method_calls.last).to eq(:uri_decode)
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
describe "--http" do
|
81
|
-
let(:argv) { %w[--http] }
|
82
|
-
|
83
|
-
it "must require 'ronin/support/encoding/http'" do
|
84
|
-
expect(require 'ronin/support/encoding/http').to be(false)
|
85
|
-
end
|
86
|
-
|
87
|
-
it "must add :http_decode to #method_calls" do
|
88
|
-
expect(subject.method_calls.last).to eq(:http_decode)
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
describe "--js" do
|
93
|
-
let(:argv) { %w[--js] }
|
94
|
-
|
95
|
-
it "must require 'ronin/support/encoding/js'" do
|
96
|
-
expect(require 'ronin/support/encoding/js').to be(false)
|
97
|
-
end
|
98
|
-
|
99
|
-
it "must add :js_decode to #method_calls" do
|
100
|
-
expect(subject.method_calls.last).to eq(:js_decode)
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
|
-
describe "--shell" do
|
105
|
-
let(:argv) { %w[--shell] }
|
106
|
-
|
107
|
-
it "must require 'ronin/support/encoding/shell'" do
|
108
|
-
expect(require 'ronin/support/encoding/shell').to be(false)
|
109
|
-
end
|
110
|
-
|
111
|
-
it "must add :shell_decode to #method_calls" do
|
112
|
-
expect(subject.method_calls.last).to eq(:shell_decode)
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
describe "--powershell" do
|
117
|
-
let(:argv) { %w[--powershell] }
|
118
|
-
|
119
|
-
it "must require 'ronin/support/encoding/powershell'" do
|
120
|
-
expect(require 'ronin/support/encoding/powershell').to be(false)
|
121
|
-
end
|
122
|
-
|
123
|
-
it "must add :powershell_decode to #method_calls" do
|
124
|
-
expect(subject.method_calls.last).to eq(:powershell_decode)
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
describe "--ruby" do
|
129
|
-
let(:argv) { %w[--ruby] }
|
130
|
-
|
131
|
-
it "must require 'ronin/support/encoding/ruby'" do
|
132
|
-
expect(require 'ronin/support/encoding/ruby').to be(false)
|
133
|
-
end
|
134
|
-
|
135
|
-
it "must add :ruby_decode to #method_calls" do
|
136
|
-
expect(subject.method_calls.last).to eq(:ruby_decode)
|
137
|
-
end
|
138
|
-
end
|
139
|
-
|
140
|
-
describe "--xml" do
|
141
|
-
let(:argv) { %w[--xml] }
|
142
|
-
|
143
|
-
it "must require 'ronin/support/encoding/xml'" do
|
144
|
-
expect(require 'ronin/support/encoding/xml').to be(false)
|
145
|
-
end
|
146
|
-
|
147
|
-
it "must add :xml_decode to #method_calls" do
|
148
|
-
expect(subject.method_calls.last).to eq(:xml_decode)
|
149
|
-
end
|
150
|
-
end
|
151
|
-
end
|
152
|
-
end
|
@@ -1,152 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/cli/commands/encode'
|
3
|
-
|
4
|
-
describe Ronin::CLI::Commands::Encode do
|
5
|
-
describe "options" do
|
6
|
-
before { subject.parse_options(argv) }
|
7
|
-
|
8
|
-
describe "--base32" do
|
9
|
-
let(:argv) { %w[--base32] }
|
10
|
-
|
11
|
-
it "must require 'ronin/support/encoding/base32'" do
|
12
|
-
expect(require 'ronin/support/encoding/base32').to be(false)
|
13
|
-
end
|
14
|
-
|
15
|
-
it "must add :base32_encode to #method_calls" do
|
16
|
-
expect(subject.method_calls.last).to eq(:base32_encode)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
describe "--base64" do
|
21
|
-
let(:argv) { %w[--base64] }
|
22
|
-
|
23
|
-
it "must require 'ronin/support/encoding/base64'" do
|
24
|
-
expect(require 'ronin/support/encoding/base64').to be(false)
|
25
|
-
end
|
26
|
-
|
27
|
-
it "must add :base64_encode to #method_calls" do
|
28
|
-
expect(subject.method_calls.last).to eq(:base64_encode)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
describe "--c" do
|
33
|
-
let(:argv) { %w[--c] }
|
34
|
-
|
35
|
-
it "must require 'ronin/support/encoding/c'" do
|
36
|
-
expect(require 'ronin/support/encoding/c').to be(false)
|
37
|
-
end
|
38
|
-
|
39
|
-
it "must add :c_encode to #method_calls" do
|
40
|
-
expect(subject.method_calls.last).to eq(:c_encode)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
describe "--hex" do
|
45
|
-
let(:argv) { %w[--hex] }
|
46
|
-
|
47
|
-
it "must require 'ronin/support/encoding/hex'" do
|
48
|
-
expect(require 'ronin/support/encoding/hex').to be(false)
|
49
|
-
end
|
50
|
-
|
51
|
-
it "must add :hex_encode to #method_calls" do
|
52
|
-
expect(subject.method_calls.last).to eq(:hex_encode)
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
describe "--html" do
|
57
|
-
let(:argv) { %w[--html] }
|
58
|
-
|
59
|
-
it "must require 'ronin/support/encoding/html'" do
|
60
|
-
expect(require 'ronin/support/encoding/html').to be(false)
|
61
|
-
end
|
62
|
-
|
63
|
-
it "must add :html_encode to #method_calls" do
|
64
|
-
expect(subject.method_calls.last).to eq(:html_encode)
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
describe "--uri" do
|
69
|
-
let(:argv) { %w[--uri] }
|
70
|
-
|
71
|
-
it "must require 'ronin/support/encoding/uri'" do
|
72
|
-
expect(require 'ronin/support/encoding/uri').to be(false)
|
73
|
-
end
|
74
|
-
|
75
|
-
it "must add :uri_encode to #method_calls" do
|
76
|
-
expect(subject.method_calls.last).to eq(:uri_encode)
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
describe "--http" do
|
81
|
-
let(:argv) { %w[--http] }
|
82
|
-
|
83
|
-
it "must require 'ronin/support/encoding/http'" do
|
84
|
-
expect(require 'ronin/support/encoding/http').to be(false)
|
85
|
-
end
|
86
|
-
|
87
|
-
it "must add :http_encode to #method_calls" do
|
88
|
-
expect(subject.method_calls.last).to eq(:http_encode)
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
describe "--js" do
|
93
|
-
let(:argv) { %w[--js] }
|
94
|
-
|
95
|
-
it "must require 'ronin/support/encoding/js'" do
|
96
|
-
expect(require 'ronin/support/encoding/js').to be(false)
|
97
|
-
end
|
98
|
-
|
99
|
-
it "must add :js_encode to #method_calls" do
|
100
|
-
expect(subject.method_calls.last).to eq(:js_encode)
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
|
-
describe "--shell" do
|
105
|
-
let(:argv) { %w[--shell] }
|
106
|
-
|
107
|
-
it "must require 'ronin/support/encoding/shell'" do
|
108
|
-
expect(require 'ronin/support/encoding/shell').to be(false)
|
109
|
-
end
|
110
|
-
|
111
|
-
it "must add :shell_encode to #method_calls" do
|
112
|
-
expect(subject.method_calls.last).to eq(:shell_encode)
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
describe "--powershell" do
|
117
|
-
let(:argv) { %w[--powershell] }
|
118
|
-
|
119
|
-
it "must require 'ronin/support/encoding/powershell'" do
|
120
|
-
expect(require 'ronin/support/encoding/powershell').to be(false)
|
121
|
-
end
|
122
|
-
|
123
|
-
it "must add :powershell_encode to #method_calls" do
|
124
|
-
expect(subject.method_calls.last).to eq(:powershell_encode)
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
describe "--ruby" do
|
129
|
-
let(:argv) { %w[--ruby] }
|
130
|
-
|
131
|
-
it "must require 'ronin/support/encoding/ruby'" do
|
132
|
-
expect(require 'ronin/support/encoding/ruby').to be(false)
|
133
|
-
end
|
134
|
-
|
135
|
-
it "must add :ruby_encode to #method_calls" do
|
136
|
-
expect(subject.method_calls.last).to eq(:ruby_encode)
|
137
|
-
end
|
138
|
-
end
|
139
|
-
|
140
|
-
describe "--xml" do
|
141
|
-
let(:argv) { %w[--xml] }
|
142
|
-
|
143
|
-
it "must require 'ronin/support/encoding/xml'" do
|
144
|
-
expect(require 'ronin/support/encoding/xml').to be(false)
|
145
|
-
end
|
146
|
-
|
147
|
-
it "must add :xml_encode to #method_calls" do
|
148
|
-
expect(subject.method_calls.last).to eq(:xml_encode)
|
149
|
-
end
|
150
|
-
end
|
151
|
-
end
|
152
|
-
end
|