ronin 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +11 -0
  3. data/.github/workflows/ruby.yml +32 -0
  4. data/.gitignore +7 -7
  5. data/.ruby-version +1 -0
  6. data/COPYING.txt +3 -3
  7. data/ChangeLog.md +25 -11
  8. data/Gemfile +21 -20
  9. data/README.md +102 -81
  10. data/Rakefile +4 -5
  11. data/bin/ronin +7 -12
  12. data/bin/ronin-campaigns +7 -12
  13. data/bin/ronin-console +7 -12
  14. data/bin/ronin-creds +7 -12
  15. data/bin/ronin-database +7 -12
  16. data/bin/ronin-emails +7 -12
  17. data/bin/ronin-exec +7 -12
  18. data/bin/ronin-fuzzer +7 -12
  19. data/bin/ronin-help +7 -12
  20. data/bin/ronin-hosts +7 -12
  21. data/bin/ronin-install +7 -12
  22. data/bin/ronin-ips +7 -12
  23. data/bin/ronin-net-proxy +7 -12
  24. data/bin/ronin-repos +7 -12
  25. data/bin/ronin-uninstall +7 -12
  26. data/bin/ronin-update +7 -12
  27. data/bin/ronin-urls +7 -12
  28. data/bin/ronin-wordlist +7 -12
  29. data/gemspec.yml +8 -8
  30. data/lib/bond/completions/ronin.rb +23 -23
  31. data/lib/ronin.rb +3 -3
  32. data/lib/ronin/address.rb +6 -7
  33. data/lib/ronin/arch.rb +3 -3
  34. data/lib/ronin/author.rb +5 -7
  35. data/lib/ronin/auto_load.rb +5 -5
  36. data/lib/ronin/bootstrap.rb +3 -3
  37. data/lib/ronin/campaign.rb +3 -3
  38. data/lib/ronin/config.rb +5 -7
  39. data/lib/ronin/credential.rb +3 -3
  40. data/lib/ronin/database.rb +3 -3
  41. data/lib/ronin/database/database.rb +8 -12
  42. data/lib/ronin/database/exceptions.rb +3 -3
  43. data/lib/ronin/database/exceptions/invalid_config.rb +3 -3
  44. data/lib/ronin/database/exceptions/unknown_repository.rb +3 -3
  45. data/lib/ronin/database/migrations.rb +3 -3
  46. data/lib/ronin/database/migrations/1.0.0.rb +3 -3
  47. data/lib/ronin/database/migrations/1.1.0.rb +3 -3
  48. data/lib/ronin/database/migrations/exceptions.rb +3 -3
  49. data/lib/ronin/database/migrations/exceptions/duplicate_migration.rb +3 -3
  50. data/lib/ronin/database/migrations/exceptions/unknown_migration.rb +3 -3
  51. data/lib/ronin/database/migrations/graph.rb +3 -3
  52. data/lib/ronin/database/migrations/migration.rb +3 -3
  53. data/lib/ronin/database/migrations/migrations.rb +3 -3
  54. data/lib/ronin/email_address.rb +5 -7
  55. data/lib/ronin/environment.rb +3 -3
  56. data/lib/ronin/exceptions.rb +3 -3
  57. data/lib/ronin/exceptions/duplicate_repository.rb +3 -3
  58. data/lib/ronin/exceptions/repository_not_found.rb +3 -3
  59. data/lib/ronin/host_name.rb +3 -3
  60. data/lib/ronin/host_name_ip_address.rb +3 -3
  61. data/lib/ronin/installation.rb +5 -7
  62. data/lib/ronin/ip_address.rb +6 -8
  63. data/lib/ronin/ip_address_mac_address.rb +3 -3
  64. data/lib/ronin/license.rb +6 -6
  65. data/lib/ronin/mac_address.rb +3 -3
  66. data/lib/ronin/model.rb +3 -3
  67. data/lib/ronin/model/has_authors.rb +3 -3
  68. data/lib/ronin/model/has_description.rb +3 -3
  69. data/lib/ronin/model/has_license.rb +3 -3
  70. data/lib/ronin/model/has_name.rb +3 -3
  71. data/lib/ronin/model/has_title.rb +3 -3
  72. data/lib/ronin/model/has_unique_name.rb +5 -7
  73. data/lib/ronin/model/has_version.rb +3 -3
  74. data/lib/ronin/model/importable.rb +3 -3
  75. data/lib/ronin/model/model.rb +7 -8
  76. data/lib/ronin/model/types.rb +3 -3
  77. data/lib/ronin/model/types/description.rb +9 -12
  78. data/lib/ronin/open_port.rb +5 -7
  79. data/lib/ronin/organization.rb +3 -3
  80. data/lib/ronin/os.rb +5 -7
  81. data/lib/ronin/os_guess.rb +3 -3
  82. data/lib/ronin/password.rb +3 -3
  83. data/lib/ronin/port.rb +3 -3
  84. data/lib/ronin/repositories.rb +3 -3
  85. data/lib/ronin/repository.rb +3 -3
  86. data/lib/ronin/ronin.rb +3 -3
  87. data/lib/ronin/script.rb +3 -3
  88. data/lib/ronin/script/buildable.rb +3 -3
  89. data/lib/ronin/script/deployable.rb +3 -3
  90. data/lib/ronin/script/exceptions.rb +3 -3
  91. data/lib/ronin/script/exceptions/build_failed.rb +3 -3
  92. data/lib/ronin/script/exceptions/deploy_failed.rb +3 -3
  93. data/lib/ronin/script/exceptions/exception.rb +3 -3
  94. data/lib/ronin/script/exceptions/not_built.rb +3 -3
  95. data/lib/ronin/script/exceptions/test_failed.rb +3 -3
  96. data/lib/ronin/script/path.rb +3 -3
  97. data/lib/ronin/script/script.rb +3 -3
  98. data/lib/ronin/script/testable.rb +3 -3
  99. data/lib/ronin/service.rb +3 -3
  100. data/lib/ronin/service_credential.rb +3 -3
  101. data/lib/ronin/software.rb +3 -3
  102. data/lib/ronin/spec/database.rb +27 -21
  103. data/lib/ronin/target.rb +3 -3
  104. data/lib/ronin/tcp_port.rb +3 -3
  105. data/lib/ronin/udp_port.rb +3 -3
  106. data/lib/ronin/ui.rb +3 -3
  107. data/lib/ronin/ui/cli.rb +3 -3
  108. data/lib/ronin/ui/cli/class_command.rb +14 -7
  109. data/lib/ronin/ui/cli/cli.rb +5 -5
  110. data/lib/ronin/ui/cli/command.rb +5 -7
  111. data/lib/ronin/ui/cli/commands.rb +3 -3
  112. data/lib/ronin/ui/cli/commands/campaigns.rb +5 -7
  113. data/lib/ronin/ui/cli/commands/console.rb +3 -3
  114. data/lib/ronin/ui/cli/commands/creds.rb +3 -3
  115. data/lib/ronin/ui/cli/commands/database.rb +3 -3
  116. data/lib/ronin/ui/cli/commands/emails.rb +3 -3
  117. data/lib/ronin/ui/cli/commands/exec.rb +3 -3
  118. data/lib/ronin/ui/cli/commands/fuzzer.rb +16 -16
  119. data/lib/ronin/ui/cli/commands/help.rb +3 -3
  120. data/lib/ronin/ui/cli/commands/hosts.rb +5 -7
  121. data/lib/ronin/ui/cli/commands/install.rb +7 -11
  122. data/lib/ronin/ui/cli/commands/ips.rb +5 -7
  123. data/lib/ronin/ui/cli/commands/net/proxy.rb +19 -12
  124. data/lib/ronin/ui/cli/commands/repos.rb +3 -3
  125. data/lib/ronin/ui/cli/commands/uninstall.rb +3 -3
  126. data/lib/ronin/ui/cli/commands/update.rb +3 -3
  127. data/lib/ronin/ui/cli/commands/urls.rb +3 -3
  128. data/lib/ronin/ui/cli/commands/wordlist.rb +3 -3
  129. data/lib/ronin/ui/cli/exceptions.rb +3 -3
  130. data/lib/ronin/ui/cli/exceptions/unknown_command.rb +3 -3
  131. data/lib/ronin/ui/cli/model_command.rb +6 -9
  132. data/lib/ronin/ui/cli/printing.rb +3 -3
  133. data/lib/ronin/ui/cli/resources_command.rb +7 -11
  134. data/lib/ronin/ui/cli/script_command.rb +5 -10
  135. data/lib/ronin/ui/console.rb +3 -3
  136. data/lib/ronin/ui/console/commands.rb +3 -3
  137. data/lib/ronin/ui/console/console.rb +3 -3
  138. data/lib/ronin/ui/console/context.rb +3 -3
  139. data/lib/ronin/ui/console/shell.rb +3 -3
  140. data/lib/ronin/url.rb +5 -7
  141. data/lib/ronin/url_query_param.rb +3 -3
  142. data/lib/ronin/url_query_param_name.rb +6 -6
  143. data/lib/ronin/url_scheme.rb +4 -4
  144. data/lib/ronin/user_name.rb +3 -3
  145. data/lib/ronin/vendor.rb +3 -3
  146. data/lib/ronin/version.rb +5 -5
  147. data/lib/ronin/web_credential.rb +5 -7
  148. data/man/ronin-campaigns.1.md +20 -20
  149. data/man/ronin-console.1.md +17 -17
  150. data/man/ronin-creds.1.md +16 -16
  151. data/man/ronin-database.1.md +23 -23
  152. data/man/ronin-emails.1.md +18 -18
  153. data/man/ronin-exec.1.md +11 -11
  154. data/man/ronin-fuzzer.1.md +23 -23
  155. data/man/ronin-help.1.md +5 -5
  156. data/man/ronin-hosts.1.md +20 -20
  157. data/man/ronin-install.1.md +18 -18
  158. data/man/ronin-ips.1.md +21 -21
  159. data/man/ronin-net-proxy.1.md +24 -24
  160. data/man/ronin-repos.1.md +18 -18
  161. data/man/ronin-uninstall.1.md +14 -14
  162. data/man/ronin-update.1.md +14 -14
  163. data/man/ronin-urls.1.md +22 -22
  164. data/man/ronin-wordlist.1.md +14 -13
  165. data/man/ronin.1.md +1 -1
  166. data/spec/arch_spec.rb +59 -46
  167. data/spec/author_spec.rb +14 -14
  168. data/spec/campaign_spec.rb +8 -0
  169. data/spec/credential_spec.rb +11 -8
  170. data/spec/database_spec.rb +6 -6
  171. data/spec/email_address_spec.rb +23 -20
  172. data/spec/host_name_spec.rb +24 -22
  173. data/spec/installation_spec.rb +6 -6
  174. data/spec/ip_address_spec.rb +31 -26
  175. data/spec/license_spec.rb +15 -9
  176. data/spec/mac_address_spec.rb +17 -8
  177. data/spec/model/has_authors_spec.rb +56 -37
  178. data/spec/model/has_description_spec.rb +36 -23
  179. data/spec/model/has_license_spec.rb +38 -28
  180. data/spec/model/has_name_spec.rb +36 -19
  181. data/spec/model/has_title_spec.rb +27 -14
  182. data/spec/model/has_version_spec.rb +64 -35
  183. data/spec/model/model_spec.rb +57 -33
  184. data/spec/model/models/{basic_model.rb → base_model.rb} +1 -1
  185. data/spec/model/models/{custom_model.rb → inherited_model.rb} +2 -3
  186. data/spec/os_spec.rb +24 -20
  187. data/spec/password_spec.rb +17 -9
  188. data/spec/port_spec.rb +30 -22
  189. data/spec/repository_spec.rb +59 -60
  190. data/spec/ronin_spec.rb +4 -4
  191. data/spec/script/buildable_spec.rb +8 -8
  192. data/spec/script/deployable_spec.rb +7 -7
  193. data/spec/script/path_spec.rb +42 -40
  194. data/spec/script/script_spec.rb +23 -23
  195. data/spec/script/testable_spec.rb +20 -20
  196. data/spec/service_spec.rb +14 -8
  197. data/spec/software_spec.rb +30 -17
  198. data/spec/spec_helper.rb +4 -4
  199. data/spec/ui/cli/classes/test_command.rb +2 -4
  200. data/spec/ui/cli/cli_spec.rb +5 -5
  201. data/spec/ui/cli/command_spec.rb +34 -30
  202. data/spec/url_query_param_spec.rb +23 -14
  203. data/spec/url_scheme_spec.rb +12 -9
  204. data/spec/url_spec.rb +64 -61
  205. data/spec/vendor_spec.rb +15 -8
  206. metadata +122 -150
  207. data/.gemtest +0 -0
@@ -1,7 +1,7 @@
1
1
  #
2
- # Copyright (c) 2006-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
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-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
17
+ # along with Ronin. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/ui/cli/resources_command'
@@ -1,7 +1,7 @@
1
1
  #
2
- # Copyright (c) 2006-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
17
+ # along with Ronin. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/ui/output/helpers'
@@ -1,7 +1,7 @@
1
1
  #
2
- # Copyright (c) 2006-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
17
+ # along with Ronin. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/ui/cli/command'
@@ -38,19 +38,19 @@ module Ronin
38
38
  #
39
39
  # ## Options
40
40
  #
41
- # -v, --[no-]verbose Enable verbose output.
42
- # -q, --[no-]quiet Disable verbose output.
43
- # --[no-]silent Silence all output.
44
- # --[no-]color Enables color output.
45
- # Default: true
46
- # -r [[PATTERN|/REGEXP/]:[METHOD|STRING*N[-M]]],
47
- # --rule Fuzzing rules.
48
- # -i, --input [FILE] Input file to fuzz.
49
- # -o, --output [FILE] Output file path.
50
- # -c [PROGRAM [OPTIONS|#string#|#path#] ...],
51
- # --command Template command to run.
52
- # -t, --tcp [HOST:PORT] TCP service to fuzz.
53
- # -u, --udp [HOST:PORT] UDP service to fuzz.
41
+ # -v, --[no-]verbose Enable verbose output.
42
+ # -q, --[no-]quiet Disable verbose output.
43
+ # --[no-]silent Silence all output.
44
+ # --[no-]color Enables color output.
45
+ # Default: true
46
+ # -r [[PATTERN|/REGEXP/]:[METHOD|STRING*N[-M]]],
47
+ # --rule Fuzzing rules.
48
+ # -i, --input [FILE] Input file to fuzz.
49
+ # -o, --output [FILE] Output file path.
50
+ # -c [PROGRAM [OPTIONS|#string#|#path#] ...],
51
+ # --command Template command to run.
52
+ # -t, --tcp [HOST:PORT] TCP service to fuzz.
53
+ # -u, --udp [HOST:PORT] UDP service to fuzz.
54
54
  #
55
55
  # ## Examples
56
56
  #
@@ -1,7 +1,7 @@
1
1
  #
2
- # Copyright (c) 2006-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
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-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
17
+ # along with Ronin. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/ui/cli/resources_command'
@@ -97,10 +97,8 @@ module Ronin
97
97
  # @since 1.0.0
98
98
  #
99
99
  def execute
100
- if lookup?
101
- lookup(@lookup)
102
- else
103
- super
100
+ if lookup? then lookup(@lookup)
101
+ else super
104
102
  end
105
103
  end
106
104
 
@@ -1,7 +1,7 @@
1
1
  #
2
- # Copyright (c) 2006-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
17
+ # along with Ronin. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/ui/cli/command'
@@ -94,14 +94,10 @@ module Ronin
94
94
  exit -1
95
95
  end
96
96
 
97
- scm = if rsync?
98
- :rsync
99
- elsif svn?
100
- :sub_version
101
- elsif hg?
102
- :mercurial
103
- elsif git?
104
- :git
97
+ scm = if rsync? then :rsync
98
+ elsif svn? then :sub_version
99
+ elsif hg? then :mercurial
100
+ elsif git? then :git
105
101
  end
106
102
 
107
103
  repository = begin
@@ -1,7 +1,7 @@
1
1
  #
2
- # Copyright (c) 2006-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
17
+ # along with Ronin. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/ui/cli/resources_command'
@@ -102,10 +102,8 @@ module Ronin
102
102
  # @since 1.0.0
103
103
  #
104
104
  def execute
105
- if lookup?
106
- lookup(@lookup)
107
- else
108
- super
105
+ if lookup? then lookup(@lookup)
106
+ else super
109
107
  end
110
108
  end
111
109
 
@@ -1,7 +1,7 @@
1
1
  #
2
- # Copyright (c) 2006-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
17
+ # along with Ronin. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/ui/cli/command'
@@ -158,12 +158,22 @@ module Ronin
158
158
  :usage => '/REGEXP/ [...]',
159
159
  :description => 'Server reset rules'
160
160
 
161
+ examples [
162
+ "ronin net:proxy --port 8080 --server google.com:80",
163
+ "ronin net:proxy --port 53 --server 4.2.2.1 --udp --hexdump"
164
+ ]
165
+
161
166
  #
162
167
  # Sets up the proxy command.
163
168
  #
164
169
  def setup
165
170
  super
166
171
 
172
+ unless (tcp? || udp?)
173
+ print_error "Must specify --tcp or --udp"
174
+ exit -1
175
+ end
176
+
167
177
  unless server?
168
178
  print_error "Must specify the SERVER argument"
169
179
  exit -1
@@ -189,7 +199,8 @@ module Ronin
189
199
  :server => [@server_host, @server_port]
190
200
  )
191
201
 
192
- if tcp?
202
+ case @proxy
203
+ when Network::TCP::Proxy
193
204
  @proxy.on_client_connect do |client|
194
205
  print_outgoing client, '[connecting]'
195
206
  end
@@ -327,10 +338,8 @@ module Ronin
327
338
  # The proxy class.
328
339
  #
329
340
  def proxy_class
330
- if udp?
331
- Network::UDP::Proxy
332
- elsif tcp?
333
- Network::TCP::Proxy
341
+ if udp? then Network::UDP::Proxy
342
+ elsif tcp? then Network::TCP::Proxy
334
343
  end
335
344
  end
336
345
 
@@ -389,10 +398,8 @@ module Ronin
389
398
  # The data from a message.
390
399
  #
391
400
  def print_data(data)
392
- if hexdump?
393
- @hexdumper.dump(data)
394
- else
395
- puts data
401
+ if hexdump? then @hexdumper.dump(data)
402
+ else puts data
396
403
  end
397
404
  end
398
405
 
@@ -1,7 +1,7 @@
1
1
  #
2
- # Copyright (c) 2006-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
17
+ # along with Ronin. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/ui/cli/model_command'
@@ -1,7 +1,7 @@
1
1
  #
2
- # Copyright (c) 2006-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
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-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
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-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
17
+ # along with Ronin. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/ui/cli/resources_command'
@@ -1,7 +1,7 @@
1
1
  #
2
- # Copyright (c) 2006-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
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-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
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'
@@ -1,7 +1,7 @@
1
1
  #
2
- # Copyright (c) 2006-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
17
+ # along with Ronin. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  module Ronin
@@ -1,7 +1,7 @@
1
1
  #
2
- # Copyright (c) 2006-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
2
+ # Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
3
  #
4
- # This file is part of Ronin.
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 <http://www.gnu.org/licenses/>.
17
+ # along with Ronin. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/ui/cli/command'
@@ -164,12 +164,9 @@ module Ronin
164
164
  query_method = model.method(name)
165
165
 
166
166
  query = case query_method.arity
167
- when 0
168
- query.send(name)
169
- when 1
170
- query.send(name,value)
171
- else
172
- query.send(name,*value)
167
+ when 0 then query.send(name)
168
+ when 1 then query.send(name,value)
169
+ else query.send(name,*value)
173
170
  end
174
171
  else
175
172
  raise("unknown query method or property #{name} for #{model}")