ronin 1.5.0 → 1.5.1
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 +7 -0
- data/.editorconfig +11 -0
- data/.github/workflows/ruby.yml +32 -0
- data/.gitignore +7 -7
- data/.ruby-version +1 -0
- data/COPYING.txt +3 -3
- data/ChangeLog.md +25 -11
- data/Gemfile +21 -20
- data/README.md +102 -81
- data/Rakefile +4 -5
- data/bin/ronin +7 -12
- data/bin/ronin-campaigns +7 -12
- data/bin/ronin-console +7 -12
- data/bin/ronin-creds +7 -12
- data/bin/ronin-database +7 -12
- data/bin/ronin-emails +7 -12
- data/bin/ronin-exec +7 -12
- data/bin/ronin-fuzzer +7 -12
- data/bin/ronin-help +7 -12
- data/bin/ronin-hosts +7 -12
- data/bin/ronin-install +7 -12
- data/bin/ronin-ips +7 -12
- data/bin/ronin-net-proxy +7 -12
- data/bin/ronin-repos +7 -12
- data/bin/ronin-uninstall +7 -12
- data/bin/ronin-update +7 -12
- data/bin/ronin-urls +7 -12
- data/bin/ronin-wordlist +7 -12
- data/gemspec.yml +8 -8
- data/lib/bond/completions/ronin.rb +23 -23
- data/lib/ronin.rb +3 -3
- data/lib/ronin/address.rb +6 -7
- data/lib/ronin/arch.rb +3 -3
- data/lib/ronin/author.rb +5 -7
- data/lib/ronin/auto_load.rb +5 -5
- data/lib/ronin/bootstrap.rb +3 -3
- data/lib/ronin/campaign.rb +3 -3
- data/lib/ronin/config.rb +5 -7
- data/lib/ronin/credential.rb +3 -3
- data/lib/ronin/database.rb +3 -3
- data/lib/ronin/database/database.rb +8 -12
- data/lib/ronin/database/exceptions.rb +3 -3
- data/lib/ronin/database/exceptions/invalid_config.rb +3 -3
- data/lib/ronin/database/exceptions/unknown_repository.rb +3 -3
- data/lib/ronin/database/migrations.rb +3 -3
- data/lib/ronin/database/migrations/1.0.0.rb +3 -3
- data/lib/ronin/database/migrations/1.1.0.rb +3 -3
- data/lib/ronin/database/migrations/exceptions.rb +3 -3
- data/lib/ronin/database/migrations/exceptions/duplicate_migration.rb +3 -3
- data/lib/ronin/database/migrations/exceptions/unknown_migration.rb +3 -3
- data/lib/ronin/database/migrations/graph.rb +3 -3
- data/lib/ronin/database/migrations/migration.rb +3 -3
- data/lib/ronin/database/migrations/migrations.rb +3 -3
- data/lib/ronin/email_address.rb +5 -7
- data/lib/ronin/environment.rb +3 -3
- data/lib/ronin/exceptions.rb +3 -3
- data/lib/ronin/exceptions/duplicate_repository.rb +3 -3
- data/lib/ronin/exceptions/repository_not_found.rb +3 -3
- data/lib/ronin/host_name.rb +3 -3
- data/lib/ronin/host_name_ip_address.rb +3 -3
- data/lib/ronin/installation.rb +5 -7
- data/lib/ronin/ip_address.rb +6 -8
- data/lib/ronin/ip_address_mac_address.rb +3 -3
- data/lib/ronin/license.rb +6 -6
- data/lib/ronin/mac_address.rb +3 -3
- data/lib/ronin/model.rb +3 -3
- data/lib/ronin/model/has_authors.rb +3 -3
- data/lib/ronin/model/has_description.rb +3 -3
- data/lib/ronin/model/has_license.rb +3 -3
- data/lib/ronin/model/has_name.rb +3 -3
- data/lib/ronin/model/has_title.rb +3 -3
- data/lib/ronin/model/has_unique_name.rb +5 -7
- data/lib/ronin/model/has_version.rb +3 -3
- data/lib/ronin/model/importable.rb +3 -3
- data/lib/ronin/model/model.rb +7 -8
- data/lib/ronin/model/types.rb +3 -3
- data/lib/ronin/model/types/description.rb +9 -12
- data/lib/ronin/open_port.rb +5 -7
- data/lib/ronin/organization.rb +3 -3
- data/lib/ronin/os.rb +5 -7
- data/lib/ronin/os_guess.rb +3 -3
- data/lib/ronin/password.rb +3 -3
- data/lib/ronin/port.rb +3 -3
- data/lib/ronin/repositories.rb +3 -3
- data/lib/ronin/repository.rb +3 -3
- data/lib/ronin/ronin.rb +3 -3
- data/lib/ronin/script.rb +3 -3
- data/lib/ronin/script/buildable.rb +3 -3
- data/lib/ronin/script/deployable.rb +3 -3
- data/lib/ronin/script/exceptions.rb +3 -3
- data/lib/ronin/script/exceptions/build_failed.rb +3 -3
- data/lib/ronin/script/exceptions/deploy_failed.rb +3 -3
- data/lib/ronin/script/exceptions/exception.rb +3 -3
- data/lib/ronin/script/exceptions/not_built.rb +3 -3
- data/lib/ronin/script/exceptions/test_failed.rb +3 -3
- data/lib/ronin/script/path.rb +3 -3
- data/lib/ronin/script/script.rb +3 -3
- data/lib/ronin/script/testable.rb +3 -3
- data/lib/ronin/service.rb +3 -3
- data/lib/ronin/service_credential.rb +3 -3
- data/lib/ronin/software.rb +3 -3
- data/lib/ronin/spec/database.rb +27 -21
- data/lib/ronin/target.rb +3 -3
- data/lib/ronin/tcp_port.rb +3 -3
- data/lib/ronin/udp_port.rb +3 -3
- data/lib/ronin/ui.rb +3 -3
- data/lib/ronin/ui/cli.rb +3 -3
- data/lib/ronin/ui/cli/class_command.rb +14 -7
- data/lib/ronin/ui/cli/cli.rb +5 -5
- data/lib/ronin/ui/cli/command.rb +5 -7
- data/lib/ronin/ui/cli/commands.rb +3 -3
- data/lib/ronin/ui/cli/commands/campaigns.rb +5 -7
- data/lib/ronin/ui/cli/commands/console.rb +3 -3
- data/lib/ronin/ui/cli/commands/creds.rb +3 -3
- data/lib/ronin/ui/cli/commands/database.rb +3 -3
- data/lib/ronin/ui/cli/commands/emails.rb +3 -3
- data/lib/ronin/ui/cli/commands/exec.rb +3 -3
- data/lib/ronin/ui/cli/commands/fuzzer.rb +16 -16
- data/lib/ronin/ui/cli/commands/help.rb +3 -3
- data/lib/ronin/ui/cli/commands/hosts.rb +5 -7
- data/lib/ronin/ui/cli/commands/install.rb +7 -11
- data/lib/ronin/ui/cli/commands/ips.rb +5 -7
- data/lib/ronin/ui/cli/commands/net/proxy.rb +19 -12
- data/lib/ronin/ui/cli/commands/repos.rb +3 -3
- data/lib/ronin/ui/cli/commands/uninstall.rb +3 -3
- data/lib/ronin/ui/cli/commands/update.rb +3 -3
- data/lib/ronin/ui/cli/commands/urls.rb +3 -3
- data/lib/ronin/ui/cli/commands/wordlist.rb +3 -3
- data/lib/ronin/ui/cli/exceptions.rb +3 -3
- data/lib/ronin/ui/cli/exceptions/unknown_command.rb +3 -3
- data/lib/ronin/ui/cli/model_command.rb +6 -9
- data/lib/ronin/ui/cli/printing.rb +3 -3
- data/lib/ronin/ui/cli/resources_command.rb +7 -11
- data/lib/ronin/ui/cli/script_command.rb +5 -10
- data/lib/ronin/ui/console.rb +3 -3
- data/lib/ronin/ui/console/commands.rb +3 -3
- data/lib/ronin/ui/console/console.rb +3 -3
- data/lib/ronin/ui/console/context.rb +3 -3
- data/lib/ronin/ui/console/shell.rb +3 -3
- data/lib/ronin/url.rb +5 -7
- data/lib/ronin/url_query_param.rb +3 -3
- data/lib/ronin/url_query_param_name.rb +6 -6
- data/lib/ronin/url_scheme.rb +4 -4
- data/lib/ronin/user_name.rb +3 -3
- data/lib/ronin/vendor.rb +3 -3
- data/lib/ronin/version.rb +5 -5
- data/lib/ronin/web_credential.rb +5 -7
- data/man/ronin-campaigns.1.md +20 -20
- data/man/ronin-console.1.md +17 -17
- data/man/ronin-creds.1.md +16 -16
- data/man/ronin-database.1.md +23 -23
- data/man/ronin-emails.1.md +18 -18
- data/man/ronin-exec.1.md +11 -11
- data/man/ronin-fuzzer.1.md +23 -23
- data/man/ronin-help.1.md +5 -5
- data/man/ronin-hosts.1.md +20 -20
- data/man/ronin-install.1.md +18 -18
- data/man/ronin-ips.1.md +21 -21
- data/man/ronin-net-proxy.1.md +24 -24
- data/man/ronin-repos.1.md +18 -18
- data/man/ronin-uninstall.1.md +14 -14
- data/man/ronin-update.1.md +14 -14
- data/man/ronin-urls.1.md +22 -22
- data/man/ronin-wordlist.1.md +14 -13
- data/man/ronin.1.md +1 -1
- data/spec/arch_spec.rb +59 -46
- data/spec/author_spec.rb +14 -14
- data/spec/campaign_spec.rb +8 -0
- data/spec/credential_spec.rb +11 -8
- data/spec/database_spec.rb +6 -6
- data/spec/email_address_spec.rb +23 -20
- data/spec/host_name_spec.rb +24 -22
- data/spec/installation_spec.rb +6 -6
- data/spec/ip_address_spec.rb +31 -26
- data/spec/license_spec.rb +15 -9
- data/spec/mac_address_spec.rb +17 -8
- data/spec/model/has_authors_spec.rb +56 -37
- data/spec/model/has_description_spec.rb +36 -23
- data/spec/model/has_license_spec.rb +38 -28
- data/spec/model/has_name_spec.rb +36 -19
- data/spec/model/has_title_spec.rb +27 -14
- data/spec/model/has_version_spec.rb +64 -35
- data/spec/model/model_spec.rb +57 -33
- data/spec/model/models/{basic_model.rb → base_model.rb} +1 -1
- data/spec/model/models/{custom_model.rb → inherited_model.rb} +2 -3
- data/spec/os_spec.rb +24 -20
- data/spec/password_spec.rb +17 -9
- data/spec/port_spec.rb +30 -22
- data/spec/repository_spec.rb +59 -60
- data/spec/ronin_spec.rb +4 -4
- data/spec/script/buildable_spec.rb +8 -8
- data/spec/script/deployable_spec.rb +7 -7
- data/spec/script/path_spec.rb +42 -40
- data/spec/script/script_spec.rb +23 -23
- data/spec/script/testable_spec.rb +20 -20
- data/spec/service_spec.rb +14 -8
- data/spec/software_spec.rb +30 -17
- data/spec/spec_helper.rb +4 -4
- data/spec/ui/cli/classes/test_command.rb +2 -4
- data/spec/ui/cli/cli_spec.rb +5 -5
- data/spec/ui/cli/command_spec.rb +34 -30
- data/spec/url_query_param_spec.rb +23 -14
- data/spec/url_scheme_spec.rb +12 -9
- data/spec/url_spec.rb +64 -61
- data/spec/vendor_spec.rb +15 -8
- metadata +122 -150
- data/.gemtest +0 -0
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/script/exceptions/test_failed'
|
data/lib/ronin/service.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/model'
|
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/credential'
|
data/lib/ronin/software.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/model'
|
data/lib/ronin/spec/database.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,37 +14,43 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/database'
|
21
21
|
|
22
22
|
require 'rspec'
|
23
|
-
require '
|
23
|
+
require 'tmpdir'
|
24
24
|
|
25
25
|
RSpec.configure do |spec|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
defaults.merge(:adapter => adapter)
|
42
|
-
end
|
26
|
+
defaults = {
|
27
|
+
:user => 'ronin_test',
|
28
|
+
:password => 'ronin_test',
|
29
|
+
:database => 'ronin_test'
|
30
|
+
}
|
31
|
+
adapter = ENV.fetch('ADAPTER','sqlite3')
|
32
|
+
|
33
|
+
uri = case adapter
|
34
|
+
when 'sqlite3', 'sqlite'
|
35
|
+
path = File.join(Dir.tmpdir,'ronin_database.sqlite3')
|
36
|
+
|
37
|
+
{:adapter => 'sqlite3', :database => path}
|
38
|
+
else
|
39
|
+
defaults.merge(:adapter => adapter)
|
40
|
+
end
|
43
41
|
|
42
|
+
spec.before(:suite) do
|
44
43
|
# setup the database
|
45
44
|
Ronin::Database.setup(uri)
|
46
45
|
|
47
46
|
# auto-migrate any models defined in the specs
|
48
47
|
DataMapper.finalize.auto_migrate!
|
49
48
|
end
|
49
|
+
|
50
|
+
spec.after(:suite) do
|
51
|
+
case adapter
|
52
|
+
when 'sqlite3', 'sqlite'
|
53
|
+
File.unlink(path)
|
54
|
+
end
|
55
|
+
end
|
50
56
|
end
|
data/lib/ronin/target.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/model'
|
data/lib/ronin/tcp_port.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/port'
|
data/lib/ronin/udp_port.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/port'
|
data/lib/ronin/ui.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/ui/output'
|
data/lib/ronin/ui/cli.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/ui/cli/command'
|
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/ui/cli/command'
|
@@ -32,6 +32,15 @@ module Ronin
|
|
32
32
|
# The object created from the Class
|
33
33
|
attr_reader :object
|
34
34
|
|
35
|
+
#
|
36
|
+
# Initializes the class command.
|
37
|
+
#
|
38
|
+
# @param [Hash] options
|
39
|
+
# Options for the class command and for the object.
|
40
|
+
#
|
41
|
+
# @raise [TypeError]
|
42
|
+
# The class associated with the command does not support Parameters.
|
43
|
+
#
|
35
44
|
def initialize(options={})
|
36
45
|
super(options)
|
37
46
|
|
@@ -78,10 +87,8 @@ module Ronin
|
|
78
87
|
# @api semipublic
|
79
88
|
#
|
80
89
|
def self.class_name(name=nil)
|
81
|
-
if name
|
82
|
-
|
83
|
-
else
|
84
|
-
@class_name ||= self.name.split('::').last.to_sym
|
90
|
+
if name then @class_name = name.to_sym
|
91
|
+
else @class_name ||= self.name.split('::').last.to_sym
|
85
92
|
end
|
86
93
|
end
|
87
94
|
|
data/lib/ronin/ui/cli/cli.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/ui/cli/exceptions/unknown_command'
|
@@ -35,7 +35,7 @@ module Ronin
|
|
35
35
|
DEFAULT_COMMAND = 'console'
|
36
36
|
|
37
37
|
# The loaded command names
|
38
|
-
@commands =
|
38
|
+
@commands = Set[]
|
39
39
|
|
40
40
|
#
|
41
41
|
# All command-line names of Commands available to the {CLI}.
|
@@ -63,7 +63,7 @@ module Ronin
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
-
return @commands
|
66
|
+
return @commands.sort
|
67
67
|
end
|
68
68
|
|
69
69
|
#
|
data/lib/ronin/ui/cli/command.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/ui/cli/printing'
|
@@ -276,10 +276,8 @@ module Ronin
|
|
276
276
|
Output.quiet! if quiet?
|
277
277
|
Output.silent! if silent?
|
278
278
|
|
279
|
-
Output.handler = if color?
|
280
|
-
|
281
|
-
else
|
282
|
-
Output::Terminal::Raw
|
279
|
+
Output.handler = if color? then Output::Terminal::Color
|
280
|
+
else Output::Terminal::Raw
|
283
281
|
end
|
284
282
|
end
|
285
283
|
|
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'open_namespace'
|
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/ui/cli/resources_command'
|
@@ -96,10 +96,8 @@ module Ronin
|
|
96
96
|
# @since 1.0.0
|
97
97
|
#
|
98
98
|
def execute
|
99
|
-
if add
|
100
|
-
|
101
|
-
elsif list?
|
102
|
-
super
|
99
|
+
if add? then add(@add)
|
100
|
+
elsif list? then super
|
103
101
|
end
|
104
102
|
end
|
105
103
|
|
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/ui/cli/command'
|
@@ -1,7 +1,7 @@
|
|
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.
|
5
5
|
#
|
6
6
|
# Ronin is free software: you can redistribute it and/or modify
|
7
7
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU General Public License for more details.
|
15
15
|
#
|
16
16
|
# You should have received a copy of the GNU General Public License
|
17
|
-
# along with Ronin. If not, see <
|
17
|
+
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'ronin/ui/cli/resources_command'
|