ronin 1.0.0 → 1.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (169) hide show
  1. data/.yardopts +0 -1
  2. data/ChangeLog.md +67 -3
  3. data/Gemfile +20 -12
  4. data/README.md +3 -5
  5. data/gemspec.yml +5 -5
  6. data/lib/ronin/address.rb +8 -3
  7. data/lib/ronin/arch.rb +39 -14
  8. data/lib/ronin/author.rb +2 -0
  9. data/lib/ronin/auto_load.rb +67 -0
  10. data/lib/ronin/campaign.rb +15 -2
  11. data/lib/ronin/class_methods.rb +7 -1
  12. data/lib/ronin/config.rb +5 -0
  13. data/lib/ronin/credential.rb +14 -3
  14. data/lib/ronin/database/database.rb +38 -12
  15. data/lib/ronin/database/migrations.rb +3 -1
  16. data/lib/ronin/database/migrations/add_created_at_column_to_targets_table.rb +48 -0
  17. data/lib/ronin/database/migrations/add_updated_at_column_to_campaigns_table.rb +47 -0
  18. data/lib/ronin/database/migrations/create_licenses_table.rb +1 -1
  19. data/lib/ronin/database/migrations/create_passwords_table.rb +1 -1
  20. data/lib/ronin/database/migrations/{create_cached_files_table.rb → create_script_paths_table.rb} +4 -4
  21. data/lib/ronin/database/migrations/migration.rb +3 -6
  22. data/lib/ronin/database/migrations/migrations.rb +3 -3
  23. data/lib/ronin/email_address.rb +20 -3
  24. data/lib/ronin/environment.rb +0 -3
  25. data/lib/ronin/host_name.rb +20 -6
  26. data/lib/ronin/host_name_ip_address.rb +2 -3
  27. data/lib/ronin/installation.rb +92 -23
  28. data/lib/ronin/ip_address.rb +31 -8
  29. data/lib/ronin/ip_address_mac_address.rb +2 -3
  30. data/lib/ronin/license.rb +1 -1
  31. data/lib/ronin/mac_address.rb +6 -4
  32. data/lib/ronin/model/class_methods.rb +4 -0
  33. data/lib/ronin/model/has_authors/class_methods.rb +4 -0
  34. data/lib/ronin/model/has_authors/has_authors.rb +4 -0
  35. data/lib/ronin/model/has_description/class_methods.rb +2 -0
  36. data/lib/ronin/model/has_description/has_description.rb +2 -0
  37. data/lib/ronin/model/has_license/class_methods.rb +2 -0
  38. data/lib/ronin/model/has_license/has_license.rb +4 -0
  39. data/lib/ronin/model/has_name/class_methods.rb +2 -0
  40. data/lib/ronin/model/has_name/has_name.rb +4 -0
  41. data/lib/ronin/model/has_title/class_methods.rb +2 -0
  42. data/lib/ronin/model/has_title/has_title.rb +2 -0
  43. data/lib/ronin/model/has_unique_name/class_methods.rb +2 -0
  44. data/lib/ronin/model/has_unique_name/has_unique_name.rb +7 -1
  45. data/lib/ronin/model/has_version/class_methods.rb +4 -0
  46. data/lib/ronin/model/has_version/has_version.rb +2 -0
  47. data/lib/ronin/model/model.rb +2 -0
  48. data/lib/ronin/model/types.rb +1 -7
  49. data/lib/ronin/model/types/description.rb +2 -0
  50. data/lib/ronin/network/mixins/esmtp.rb +40 -25
  51. data/lib/ronin/network/mixins/http.rb +336 -73
  52. data/lib/ronin/network/mixins/imap.rb +38 -25
  53. data/lib/ronin/network/mixins/pop3.rb +34 -21
  54. data/lib/ronin/network/mixins/smtp.rb +40 -25
  55. data/lib/ronin/network/mixins/tcp.rb +66 -41
  56. data/lib/ronin/network/mixins/telnet.rb +43 -30
  57. data/lib/ronin/network/mixins/udp.rb +59 -40
  58. data/lib/ronin/open_port.rb +12 -5
  59. data/lib/ronin/organization.rb +1 -2
  60. data/lib/ronin/os.rb +10 -3
  61. data/lib/ronin/os_guess.rb +2 -3
  62. data/lib/ronin/password.rb +11 -3
  63. data/lib/ronin/port.rb +7 -2
  64. data/lib/ronin/{engine/exceptions/deploy_failed.rb → repositories.rb} +4 -6
  65. data/lib/ronin/repository.rb +110 -37
  66. data/lib/ronin/ronin.rb +4 -3
  67. data/lib/ronin/{engine.rb → script.rb} +2 -1
  68. data/lib/ronin/{engine → script}/buildable.rb +43 -29
  69. data/lib/ronin/script/class_methods.rb +84 -0
  70. data/lib/ronin/{engine → script}/deployable.rb +61 -40
  71. data/lib/ronin/{engine → script}/exceptions.rb +4 -3
  72. data/lib/ronin/script/exceptions/deploy_failed.rb +27 -0
  73. data/lib/ronin/{engine/exceptions/not_built.rb → script/exceptions/exception.rb} +2 -2
  74. data/lib/ronin/{engine/exceptions/verification_failed.rb → script/exceptions/not_built.rb} +4 -2
  75. data/lib/ronin/script/exceptions/test_failed.rb +27 -0
  76. data/lib/ronin/script/instance_methods.rb +217 -0
  77. data/lib/ronin/script/path.rb +277 -0
  78. data/lib/ronin/{engine/engine.rb → script/script.rb} +52 -15
  79. data/lib/ronin/{engine/verifiable.rb → script/testable.rb} +97 -68
  80. data/lib/ronin/service.rb +1 -2
  81. data/lib/ronin/service_credential.rb +1 -2
  82. data/lib/ronin/software.rb +3 -2
  83. data/lib/ronin/spec/database.rb +0 -4
  84. data/lib/ronin/target.rb +11 -3
  85. data/lib/ronin/tcp_port.rb +3 -2
  86. data/lib/ronin/udp_port.rb +2 -0
  87. data/lib/ronin/ui/cli/cli.rb +6 -0
  88. data/lib/ronin/ui/cli/command.rb +48 -12
  89. data/lib/ronin/ui/cli/commands/campaigns.rb +3 -3
  90. data/lib/ronin/ui/cli/commands/console.rb +2 -1
  91. data/lib/ronin/ui/cli/commands/creds.rb +3 -3
  92. data/lib/ronin/ui/cli/commands/database.rb +1 -17
  93. data/lib/ronin/ui/cli/commands/emails.rb +3 -3
  94. data/lib/ronin/ui/cli/commands/hosts.rb +3 -7
  95. data/lib/ronin/ui/cli/commands/ips.rb +3 -7
  96. data/lib/ronin/ui/cli/commands/repos.rb +5 -17
  97. data/lib/ronin/ui/cli/commands/urls.rb +3 -3
  98. data/lib/ronin/ui/cli/model_command.rb +82 -97
  99. data/lib/ronin/ui/cli/resources_command.rb +89 -0
  100. data/lib/ronin/ui/cli/script_command.rb +115 -0
  101. data/lib/ronin/ui/console.rb +17 -3
  102. data/lib/ronin/ui/output/helpers.rb +18 -0
  103. data/lib/ronin/ui/output/output.rb +20 -1
  104. data/lib/ronin/ui/output/terminal/color.rb +10 -0
  105. data/lib/ronin/ui/output/terminal/raw.rb +10 -0
  106. data/lib/ronin/ui/shell.rb +2 -0
  107. data/lib/ronin/url.rb +47 -12
  108. data/lib/ronin/url_query_param.rb +4 -0
  109. data/lib/ronin/url_scheme.rb +3 -3
  110. data/lib/ronin/user_name.rb +2 -0
  111. data/lib/ronin/version.rb +1 -1
  112. data/lib/ronin/web_credential.rb +6 -3
  113. data/spec/arch_spec.rb +3 -3
  114. data/spec/classes/my_script.rb +21 -0
  115. data/spec/helpers/repos/{test1 → installed}/ronin.yml +1 -1
  116. data/spec/helpers/repos/{hello/cache → installed/scripts}/.keep +0 -0
  117. data/spec/helpers/repos/local/lib/init.rb +1 -0
  118. data/spec/helpers/repos/{hello → local}/lib/stuff/another_test.rb +0 -0
  119. data/spec/helpers/repos/{hello → local}/lib/stuff/test.rb +0 -0
  120. data/spec/helpers/repos/{random → local}/ronin.yml +1 -1
  121. data/spec/helpers/repos/{random/cache → local/scripts}/.keep +0 -0
  122. data/spec/helpers/repos/{hello → remote}/ronin.yml +1 -1
  123. data/spec/helpers/repos/remote/scripts/.keep +0 -0
  124. data/spec/helpers/repos/{test2 → scripts}/ronin.yml +0 -0
  125. data/spec/helpers/repos/scripts/scripts/cached/cached.rb +10 -0
  126. data/spec/helpers/repos/scripts/scripts/cached/missing.rb +10 -0
  127. data/spec/helpers/repos/scripts/scripts/cached/modified.rb +10 -0
  128. data/spec/helpers/repos/scripts/scripts/cached/unmodified.rb +10 -0
  129. data/spec/helpers/repos/scripts/scripts/failures/exceptions.rb +11 -0
  130. data/spec/helpers/repos/{test2/cache/cacheable_model → scripts/scripts/failures}/load_errors.rb +3 -1
  131. data/spec/helpers/repos/{test2/cache/cacheable_model → scripts/scripts/failures}/name_errors.rb +1 -0
  132. data/spec/helpers/repos/scripts/scripts/failures/no_method_errors.rb +10 -0
  133. data/spec/helpers/repos/scripts/scripts/failures/syntax_errors.rb +11 -0
  134. data/spec/helpers/repos/scripts/scripts/failures/validation_errors.rb +11 -0
  135. data/spec/helpers/repos/scripts/scripts/my_scripts/test.rb +16 -0
  136. data/spec/model/spec_helper.rb +0 -2
  137. data/spec/repository_spec.rb +61 -81
  138. data/spec/ronin_spec.rb +2 -2
  139. data/spec/{engine → script}/buildable_spec.rb +9 -9
  140. data/spec/script/classes/buildable_class.rb +15 -0
  141. data/spec/script/classes/deployable_class.rb +13 -0
  142. data/spec/{engine/classes/engine_class.rb → script/classes/script_class.rb} +3 -3
  143. data/spec/{engine/classes/verifiable_class.rb → script/classes/testable_class.rb} +5 -5
  144. data/spec/{engine → script}/deployable_spec.rb +10 -10
  145. data/spec/{cached_file_spec.rb → script/path_spec.rb} +33 -72
  146. data/spec/script/script_spec.rb +130 -0
  147. data/spec/script/testable_spec.rb +117 -0
  148. data/spec/spec_helper.rb +15 -13
  149. metadata +114 -139
  150. data/lib/ronin/cached_file.rb +0 -247
  151. data/lib/ronin/engine/class_methods.rb +0 -135
  152. data/lib/ronin/engine/instance_methods.rb +0 -97
  153. data/lib/ronin/model/cacheable.rb +0 -21
  154. data/lib/ronin/model/cacheable/cacheable.rb +0 -273
  155. data/lib/ronin/model/cacheable/class_methods.rb +0 -60
  156. data/lib/ronin/ui/cli/engine_command.rb +0 -106
  157. data/spec/engine/classes/buildable_class.rb +0 -15
  158. data/spec/engine/classes/deployable_class.rb +0 -13
  159. data/spec/engine/engine_spec.rb +0 -55
  160. data/spec/engine/verifiable_spec.rb +0 -117
  161. data/spec/helpers/repos/hello/lib/init.rb +0 -1
  162. data/spec/helpers/repos/test1/cache/cacheable_model/one.rb +0 -15
  163. data/spec/helpers/repos/test2/cache/cacheable_model/exceptions.rb +0 -7
  164. data/spec/helpers/repos/test2/cache/cacheable_model/no_method_errors.rb +0 -9
  165. data/spec/helpers/repos/test2/cache/cacheable_model/syntax_errors.rb +0 -7
  166. data/spec/helpers/repos/test2/cache/cacheable_model/two.rb +0 -15
  167. data/spec/helpers/repos/test2/cache/cacheable_model/validation_errors.rb +0 -9
  168. data/spec/model/cacheable_spec.rb +0 -96
  169. data/spec/model/models/cacheable_model.rb +0 -13
@@ -0,0 +1,115 @@
1
+ #
2
+ # Copyright (c) 2006-2011 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ #
4
+ # This file is part of Ronin.
5
+ #
6
+ # Ronin is free software: you can redistribute it and/or modify
7
+ # it under the terms of the GNU General Public License as published by
8
+ # the Free Software Foundation, either version 3 of the License, or
9
+ # (at your option) any later version.
10
+ #
11
+ # Ronin is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
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/>.
18
+ #
19
+
20
+ require 'ronin/ui/cli/model_command'
21
+ require 'ronin/ui/console'
22
+ require 'ronin/script'
23
+
24
+ module Ronin
25
+ module UI
26
+ module CLI
27
+ #
28
+ # A base-command for querying and loading {Script}s.
29
+ #
30
+ class ScriptCommand < ModelCommand
31
+
32
+ query_option :named, :type => :string, :aliases => '-n'
33
+ query_option :describing, :type => :string, :aliases => '-d'
34
+ query_option :revision, :type => :string, :aliases => '-V'
35
+ query_option :licensed_under, :type => :string, :aliases => '-L'
36
+
37
+ class_option :file, :type => :string, :aliases => '-f'
38
+ class_option :params, :type => :hash,
39
+ :default => {},
40
+ :banner => 'NAME:VALUE ...',
41
+ :aliases => '-p'
42
+ class_option :console, :type => :boolean, :default => false
43
+
44
+ #
45
+ # Loads the script, sets its parameters and runs the script.
46
+ #
47
+ # @since 1.1.0.
48
+ #
49
+ # @api semipublic
50
+ #
51
+ def execute
52
+ script = load_script
53
+ script.params = options[:params]
54
+
55
+ if options.console?
56
+ print_info "Starting the console with @script set ..."
57
+
58
+ UI::Console.start(:script => script)
59
+ else
60
+ script.run
61
+ end
62
+ end
63
+
64
+ protected
65
+
66
+ #
67
+ # Defines the class to load scripts from.
68
+ #
69
+ # @param [Script] script
70
+ # The script class.
71
+ #
72
+ # @return [Script]
73
+ # The new script class.
74
+ #
75
+ # @raise [ArgumentError]
76
+ # The given script class does not include {Ronin::Script}.
77
+ #
78
+ # @since 1.1.0
79
+ #
80
+ # @api semipublic
81
+ #
82
+ def self.script_class(script)
83
+ unless script.included_modules.include?(Script)
84
+ raise(ArgumentError,"#{script} does not include Ronin::Script")
85
+ end
86
+
87
+ model(script)
88
+ end
89
+
90
+ #
91
+ # Loads an script using the commands options.
92
+ #
93
+ # @return [Script, nil]
94
+ # The newly loaded script.
95
+ #
96
+ # @raise [RuntimeError]
97
+ # The script class did not define the query method for one of the
98
+ # query options.
99
+ #
100
+ # @since 1.1.0
101
+ #
102
+ # @api semipublic
103
+ #
104
+ def load_script
105
+ if options[:file]
106
+ self.class.query_model.load_from(options[:file])
107
+ else
108
+ query.load_first
109
+ end
110
+ end
111
+
112
+ end
113
+ end
114
+ end
115
+ end
@@ -44,6 +44,8 @@ module Ronin
44
44
  #
45
45
  # @since 1.0.0
46
46
  #
47
+ # @api semipublic
48
+ #
47
49
  def Console.color?
48
50
  @@color
49
51
  end
@@ -59,6 +61,8 @@ module Ronin
59
61
  #
60
62
  # @since 1.0.0
61
63
  #
64
+ # @api semipublic
65
+ #
62
66
  def Console.color=(mode)
63
67
  @@color = mode
64
68
  end
@@ -72,6 +76,8 @@ module Ronin
72
76
  #
73
77
  # @since 1.0.0
74
78
  #
79
+ # @api semipublic
80
+ #
75
81
  def Console.short_errors?
76
82
  @@short_errors
77
83
  end
@@ -87,6 +93,8 @@ module Ronin
87
93
  #
88
94
  # @since 1.0.0
89
95
  #
96
+ # @api semipublic
97
+ #
90
98
  def Console.short_errors=(mode)
91
99
  @@short_errors = mode
92
100
  end
@@ -97,6 +105,8 @@ module Ronin
97
105
  # @return [Array]
98
106
  # The files to require when the Console starts.
99
107
  #
108
+ # @api semipublic
109
+ #
100
110
  def Console.auto_load
101
111
  @@auto_load
102
112
  end
@@ -108,6 +118,8 @@ module Ronin
108
118
  # @yield []
109
119
  # The block to be ran from within the Console.
110
120
  #
121
+ # @api semipublic
122
+ #
111
123
  def Console.setup(&block)
112
124
  @@setup_blocks << block if block
113
125
  end
@@ -138,6 +150,8 @@ module Ronin
138
150
  # # >> @var
139
151
  # # # => "hello"
140
152
  #
153
+ # @api semipublic
154
+ #
141
155
  def Console.start(variables={},&block)
142
156
  require 'ripl'
143
157
  require 'ripl/completion'
@@ -147,11 +161,9 @@ module Ronin
147
161
  require 'ripl/short_errors' if @@short_errors
148
162
 
149
163
  require 'ronin'
164
+ require 'ronin/repositories'
150
165
  require 'pp'
151
166
 
152
- # activates all installed or added repositories
153
- Repository.activate!
154
-
155
167
  # append the current directory to $LOAD_PATH for Ruby 1.9.
156
168
  $LOAD_PATH << '.' unless $LOAD_PATH.include?('.')
157
169
 
@@ -194,6 +206,8 @@ module Ronin
194
206
  #
195
207
  # @since 1.0.0
196
208
  #
209
+ # @api semipublic
210
+ #
197
211
  def inspect
198
212
  "#<Ronin::UI::Console>"
199
213
  end
@@ -37,6 +37,8 @@ module Ronin
37
37
  #
38
38
  # @since 1.0.0
39
39
  #
40
+ # @api public
41
+ #
40
42
  def write(data)
41
43
  unless Output.silent?
42
44
  data = data.to_s
@@ -57,6 +59,8 @@ module Ronin
57
59
  #
58
60
  # @since 1.0.0
59
61
  #
62
+ # @api public
63
+ #
60
64
  def putc(data)
61
65
  char = data.chr if data.kind_of?(Integer)
62
66
 
@@ -75,6 +79,8 @@ module Ronin
75
79
  #
76
80
  # @since 0.3.0
77
81
  #
82
+ # @api public
83
+ #
78
84
  def puts(*messages)
79
85
  unless messages.empty?
80
86
  messages.each { |message| write("#{message}#{$/}") }
@@ -98,6 +104,8 @@ module Ronin
98
104
  #
99
105
  # @since 1.0.0
100
106
  #
107
+ # @api public
108
+ #
101
109
  def printf(format,*data)
102
110
  write(format % data)
103
111
  return nil
@@ -120,6 +128,8 @@ module Ronin
120
128
  #
121
129
  # @since 0.3.0
122
130
  #
131
+ # @api public
132
+ #
123
133
  def print_info(*message)
124
134
  unless Output.silent?
125
135
  Output.handler.print_info(format_message(message))
@@ -143,6 +153,8 @@ module Ronin
143
153
  #
144
154
  # @since 0.3.0
145
155
  #
156
+ # @api public
157
+ #
146
158
  def print_debug(*message)
147
159
  if (Output.verbose? && !(Output.silent?))
148
160
  Output.handler.print_debug(format_message(message))
@@ -169,6 +181,8 @@ module Ronin
169
181
  #
170
182
  # @since 0.3.0
171
183
  #
184
+ # @api public
185
+ #
172
186
  def print_warning(*message)
173
187
  if (Output.verbose? && !(Output.silent?))
174
188
  Output.handler.print_warning(format_message(message))
@@ -195,6 +209,8 @@ module Ronin
195
209
  #
196
210
  # @since 0.3.0
197
211
  #
212
+ # @api public
213
+ #
198
214
  def print_error(*message)
199
215
  unless Output.silent?
200
216
  Output.handler.print_error(format_message(message))
@@ -217,6 +233,8 @@ module Ronin
217
233
  #
218
234
  # @since 1.0.0
219
235
  #
236
+ # @api private
237
+ #
220
238
  def format_message(message)
221
239
  if message.length == 1
222
240
  message[0]
@@ -17,6 +17,7 @@
17
17
  # along with Ronin. If not, see <http://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
+ require 'ronin/ui/output/terminal/raw'
20
21
  require 'ronin/ui/output/terminal/color'
21
22
 
22
23
  module Ronin
@@ -26,7 +27,11 @@ module Ronin
26
27
  #
27
28
  module Output
28
29
  @mode = :quiet
29
- @handler = Terminal::Color
30
+ @handler = if STDOUT.tty?
31
+ Terminal::Color
32
+ else
33
+ Terminal::Raw
34
+ end
30
35
 
31
36
  #
32
37
  # @return [Boolean]
@@ -34,6 +39,8 @@ module Ronin
34
39
  #
35
40
  # @since 0.3.0
36
41
  #
42
+ # @api semipublic
43
+ #
37
44
  def Output.verbose?
38
45
  @mode == :verbose
39
46
  end
@@ -44,6 +51,8 @@ module Ronin
44
51
  #
45
52
  # @since 0.3.0
46
53
  #
54
+ # @api semipublic
55
+ #
47
56
  def Output.quiet?
48
57
  @mode == :quiet
49
58
  end
@@ -54,6 +63,8 @@ module Ronin
54
63
  #
55
64
  # @since 0.3.0
56
65
  #
66
+ # @api semipublic
67
+ #
57
68
  def Output.silent?
58
69
  @mode == :silent
59
70
  end
@@ -65,6 +76,8 @@ module Ronin
65
76
  #
66
77
  # @since 1.0.0
67
78
  #
79
+ # @api semipublic
80
+ #
68
81
  def Output.verbose!
69
82
  @mode = :verbose
70
83
  return self
@@ -77,6 +90,8 @@ module Ronin
77
90
  #
78
91
  # @since 1.0.0
79
92
  #
93
+ # @api semipublic
94
+ #
80
95
  def Output.quiet!
81
96
  @mode = :quiet
82
97
  return self
@@ -100,6 +115,8 @@ module Ronin
100
115
  #
101
116
  # @since 0.3.0
102
117
  #
118
+ # @api semipublic
119
+ #
103
120
  def Output.handler
104
121
  @handler
105
122
  end
@@ -114,6 +131,8 @@ module Ronin
114
131
  #
115
132
  # @since 0.3.0
116
133
  #
134
+ # @api semipublic
135
+ #
117
136
  def Output.handler=(new_handler)
118
137
  @handler = new_handler
119
138
  end
@@ -49,6 +49,8 @@ module Ronin
49
49
  #
50
50
  # @since 1.0.0
51
51
  #
52
+ # @api private
53
+ #
52
54
  def self.write(data)
53
55
  STDOUT.write(data)
54
56
  end
@@ -61,6 +63,8 @@ module Ronin
61
63
  #
62
64
  # @since 1.0.0
63
65
  #
66
+ # @api private
67
+ #
64
68
  def self.print_info(message)
65
69
  puts "#{GREEN}[-] #{message}#{CLEAR}"
66
70
  end
@@ -73,6 +77,8 @@ module Ronin
73
77
  #
74
78
  # @since 1.0.0
75
79
  #
80
+ # @api private
81
+ #
76
82
  def self.print_debug(message)
77
83
  puts "#{CYAN}[=] #{message}#{CLEAR}"
78
84
  end
@@ -85,6 +91,8 @@ module Ronin
85
91
  #
86
92
  # @since 1.0.0
87
93
  #
94
+ # @api private
95
+ #
88
96
  def self.print_warning(message)
89
97
  puts "#{YELLOW}[*] #{message}#{CLEAR}"
90
98
  end
@@ -97,6 +105,8 @@ module Ronin
97
105
  #
98
106
  # @since 1.0.0
99
107
  #
108
+ # @api private
109
+ #
100
110
  def self.print_error(message)
101
111
  puts "#{RED}[!] #{message}#{CLEAR}"
102
112
  end
@@ -34,6 +34,8 @@ module Ronin
34
34
  #
35
35
  # @since 1.0.0
36
36
  #
37
+ # @api private
38
+ #
37
39
  def self.write(data)
38
40
  STDOUT.write(data)
39
41
  end
@@ -46,6 +48,8 @@ module Ronin
46
48
  #
47
49
  # @since 1.0.0
48
50
  #
51
+ # @api private
52
+ #
49
53
  def self.print_info(message)
50
54
  puts "[-] #{message}"
51
55
  end
@@ -58,6 +62,8 @@ module Ronin
58
62
  #
59
63
  # @since 1.0.0
60
64
  #
65
+ # @api private
66
+ #
61
67
  def self.print_debug(message)
62
68
  puts "[=] #{message}"
63
69
  end
@@ -70,6 +76,8 @@ module Ronin
70
76
  #
71
77
  # @since 1.0.0
72
78
  #
79
+ # @api private
80
+ #
73
81
  def self.print_warning(message)
74
82
  puts "[*] #{message}"
75
83
  end
@@ -82,6 +90,8 @@ module Ronin
82
90
  #
83
91
  # @since 1.0.0
84
92
  #
93
+ # @api private
94
+ #
85
95
  def self.print_error(message)
86
96
  puts "[!] #{message}"
87
97
  end
@@ -57,6 +57,8 @@ module Ronin
57
57
  # @example
58
58
  # Shell.start(:prompt => '$') { |shell,line| system(line) }
59
59
  #
60
+ # @api semipublic
61
+ #
60
62
  def Shell.start(options={},&block)
61
63
  name = (options[:name] || '')
62
64
  prompt = (options[:prompt] || DEFAULT_PROMPT)