ronin-support 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. data/.gitignore +11 -0
  2. data/ChangeLog.md +42 -1
  3. data/README.md +4 -1
  4. data/gemspec.yml +2 -1
  5. data/lib/ronin/extensions.rb +2 -0
  6. data/lib/ronin/extensions/enumerable.rb +54 -0
  7. data/lib/ronin/extensions/file.rb +70 -2
  8. data/lib/ronin/extensions/ip_addr.rb +45 -45
  9. data/lib/ronin/extensions/regexp.rb +45 -0
  10. data/lib/ronin/extensions/resolv.rb +80 -0
  11. data/lib/ronin/extensions/string.rb +35 -32
  12. data/lib/ronin/formatting/extensions/binary/integer.rb +12 -5
  13. data/lib/ronin/formatting/extensions/binary/string.rb +44 -16
  14. data/lib/ronin/formatting/extensions/html/integer.rb +51 -31
  15. data/lib/ronin/formatting/extensions/html/string.rb +50 -31
  16. data/lib/ronin/formatting/extensions/http/integer.rb +10 -2
  17. data/lib/ronin/formatting/extensions/sql.rb +20 -0
  18. data/lib/ronin/formatting/extensions/sql/string.rb +98 -0
  19. data/lib/ronin/formatting/extensions/text/array.rb +11 -9
  20. data/lib/ronin/formatting/extensions/text/string.rb +213 -29
  21. data/lib/ronin/formatting/sql.rb +20 -0
  22. data/lib/ronin/network/extensions/http.rb +1 -0
  23. data/lib/ronin/network/extensions/http/net.rb +2 -2
  24. data/lib/ronin/network/extensions/http/uri/http.rb +226 -0
  25. data/lib/ronin/network/extensions/imap/net.rb +1 -1
  26. data/lib/ronin/network/extensions/ssl/net.rb +7 -1
  27. data/lib/ronin/network/http/proxy.rb +20 -21
  28. data/lib/ronin/network/mixins.rb +27 -0
  29. data/lib/ronin/network/mixins/esmtp.rb +165 -0
  30. data/lib/ronin/network/mixins/http.rb +723 -0
  31. data/lib/ronin/network/mixins/imap.rb +151 -0
  32. data/lib/ronin/network/mixins/pop3.rb +141 -0
  33. data/lib/ronin/network/mixins/smtp.rb +159 -0
  34. data/lib/ronin/network/mixins/tcp.rb +331 -0
  35. data/lib/ronin/network/mixins/telnet.rb +199 -0
  36. data/lib/ronin/network/mixins/udp.rb +227 -0
  37. data/lib/ronin/network/ssl.rb +17 -11
  38. data/lib/ronin/path.rb +3 -3
  39. data/lib/ronin/spec/ui/output.rb +28 -0
  40. data/lib/ronin/support.rb +3 -0
  41. data/lib/ronin/support/version.rb +1 -1
  42. data/lib/ronin/ui/output.rb +21 -0
  43. data/lib/ronin/ui/output/helpers.rb +248 -0
  44. data/lib/ronin/ui/output/output.rb +146 -0
  45. data/lib/ronin/ui/output/terminal.rb +21 -0
  46. data/lib/ronin/ui/output/terminal/color.rb +118 -0
  47. data/lib/ronin/ui/output/terminal/raw.rb +103 -0
  48. data/lib/ronin/ui/shell.rb +219 -0
  49. data/ronin-support.gemspec +1 -1
  50. data/spec/extensions/enumerable_spec.rb +24 -0
  51. data/spec/extensions/file_spec.rb +39 -0
  52. data/spec/extensions/ip_addr_spec.rb +6 -0
  53. data/spec/extensions/resolv_spec.rb +18 -0
  54. data/spec/formatting/html/integer_spec.rb +2 -2
  55. data/spec/formatting/html/string_spec.rb +1 -1
  56. data/spec/formatting/sql/string_spec.rb +55 -0
  57. data/spec/formatting/text/string_spec.rb +110 -0
  58. data/spec/network/ssl_spec.rb +10 -4
  59. data/spec/ui/classes/test_shell.rb +22 -0
  60. data/spec/ui/output_spec.rb +32 -0
  61. data/spec/ui/shell_spec.rb +79 -0
  62. metadata +132 -90
metadata CHANGED
@@ -1,111 +1,120 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ronin-support
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.0
4
5
  prerelease:
5
- version: 0.2.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Postmodern
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-07-04 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2011-10-17 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: chars
17
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &13653760 !ruby/object:Gem::Requirement
18
17
  none: false
19
- requirements:
18
+ requirements:
20
19
  - - ~>
21
- - !ruby/object:Gem::Version
22
- version: "0.2"
20
+ - !ruby/object:Gem::Version
21
+ version: '0.2'
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
24
+ version_requirements: *13653760
25
+ - !ruby/object:Gem::Dependency
27
26
  name: hexdump
28
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ requirement: &13615160 !ruby/object:Gem::Requirement
29
28
  none: false
30
- requirements:
29
+ requirements:
31
30
  - - ~>
32
- - !ruby/object:Gem::Version
33
- version: "0.1"
31
+ - !ruby/object:Gem::Version
32
+ version: '0.1'
34
33
  type: :runtime
35
34
  prerelease: false
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *13615160
36
+ - !ruby/object:Gem::Dependency
38
37
  name: combinatorics
39
- requirement: &id003 !ruby/object:Gem::Requirement
38
+ requirement: &13608820 !ruby/object:Gem::Requirement
40
39
  none: false
41
- requirements:
40
+ requirements:
42
41
  - - ~>
43
- - !ruby/object:Gem::Version
44
- version: "0.3"
42
+ - !ruby/object:Gem::Version
43
+ version: '0.4'
45
44
  type: :runtime
46
45
  prerelease: false
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
46
+ version_requirements: *13608820
47
+ - !ruby/object:Gem::Dependency
49
48
  name: uri-query_params
50
- requirement: &id004 !ruby/object:Gem::Requirement
49
+ requirement: &13381960 !ruby/object:Gem::Requirement
51
50
  none: false
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: 0.5.2
51
+ requirements:
56
52
  - - ~>
57
- - !ruby/object:Gem::Version
58
- version: "0.5"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.5'
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: 0.5.2
59
58
  type: :runtime
60
59
  prerelease: false
61
- version_requirements: *id004
62
- - !ruby/object:Gem::Dependency
60
+ version_requirements: *13381960
61
+ - !ruby/object:Gem::Dependency
63
62
  name: data_paths
64
- requirement: &id005 !ruby/object:Gem::Requirement
63
+ requirement: &12320000 !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '0.3'
69
+ type: :runtime
70
+ prerelease: false
71
+ version_requirements: *12320000
72
+ - !ruby/object:Gem::Dependency
73
+ name: parameters
74
+ requirement: &12317320 !ruby/object:Gem::Requirement
65
75
  none: false
66
- requirements:
76
+ requirements:
67
77
  - - ~>
68
- - !ruby/object:Gem::Version
69
- version: "0.3"
78
+ - !ruby/object:Gem::Version
79
+ version: '0.2'
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: 0.2.3
70
83
  type: :runtime
71
84
  prerelease: false
72
- version_requirements: *id005
73
- - !ruby/object:Gem::Dependency
85
+ version_requirements: *12317320
86
+ - !ruby/object:Gem::Dependency
74
87
  name: bundler
75
- requirement: &id006 !ruby/object:Gem::Requirement
88
+ requirement: &15940760 !ruby/object:Gem::Requirement
76
89
  none: false
77
- requirements:
90
+ requirements:
78
91
  - - ~>
79
- - !ruby/object:Gem::Version
92
+ - !ruby/object:Gem::Version
80
93
  version: 1.0.10
81
94
  type: :development
82
95
  prerelease: false
83
- version_requirements: *id006
84
- - !ruby/object:Gem::Dependency
96
+ version_requirements: *15940760
97
+ - !ruby/object:Gem::Dependency
85
98
  name: yard
86
- requirement: &id007 !ruby/object:Gem::Requirement
99
+ requirement: &15973540 !ruby/object:Gem::Requirement
87
100
  none: false
88
- requirements:
101
+ requirements:
89
102
  - - ~>
90
- - !ruby/object:Gem::Version
103
+ - !ruby/object:Gem::Version
91
104
  version: 0.7.0
92
105
  type: :development
93
106
  prerelease: false
94
- version_requirements: *id007
95
- description: Ronin Support is a support library for Ronin. Ronin Support contains many of the convenience methods used by Ronin and additional libraries.
96
- email:
97
- - postmodern.mod3@gmail.com
107
+ version_requirements: *15973540
108
+ description: Ronin Support is a support library for Ronin. Ronin Support contains
109
+ many of the convenience methods used by Ronin and additional libraries.
110
+ email: postmodern.mod3@gmail.com
98
111
  executables: []
99
-
100
112
  extensions: []
101
-
102
- extra_rdoc_files:
103
- - README.md
104
- - ChangeLog.md
105
- - COPYING.txt
106
- files:
113
+ extra_rdoc_files: []
114
+ files:
107
115
  - .document
108
116
  - .gemtest
117
+ - .gitignore
109
118
  - .rspec
110
119
  - .yardopts
111
120
  - COPYING.txt
@@ -115,11 +124,14 @@ files:
115
124
  - Rakefile
116
125
  - gemspec.yml
117
126
  - lib/ronin/extensions.rb
127
+ - lib/ronin/extensions/enumerable.rb
118
128
  - lib/ronin/extensions/file.rb
119
129
  - lib/ronin/extensions/ip_addr.rb
120
130
  - lib/ronin/extensions/kernel.rb
121
131
  - lib/ronin/extensions/meta.rb
122
132
  - lib/ronin/extensions/meta/object.rb
133
+ - lib/ronin/extensions/regexp.rb
134
+ - lib/ronin/extensions/resolv.rb
123
135
  - lib/ronin/extensions/string.rb
124
136
  - lib/ronin/formatting.rb
125
137
  - lib/ronin/formatting/binary.rb
@@ -138,11 +150,14 @@ files:
138
150
  - lib/ronin/formatting/extensions/http.rb
139
151
  - lib/ronin/formatting/extensions/http/integer.rb
140
152
  - lib/ronin/formatting/extensions/http/string.rb
153
+ - lib/ronin/formatting/extensions/sql.rb
154
+ - lib/ronin/formatting/extensions/sql/string.rb
141
155
  - lib/ronin/formatting/extensions/text.rb
142
156
  - lib/ronin/formatting/extensions/text/array.rb
143
157
  - lib/ronin/formatting/extensions/text/string.rb
144
158
  - lib/ronin/formatting/html.rb
145
159
  - lib/ronin/formatting/http.rb
160
+ - lib/ronin/formatting/sql.rb
146
161
  - lib/ronin/formatting/text.rb
147
162
  - lib/ronin/mixin.rb
148
163
  - lib/ronin/network.rb
@@ -152,6 +167,7 @@ files:
152
167
  - lib/ronin/network/extensions/esmtp/net.rb
153
168
  - lib/ronin/network/extensions/http.rb
154
169
  - lib/ronin/network/extensions/http/net.rb
170
+ - lib/ronin/network/extensions/http/uri/http.rb
155
171
  - lib/ronin/network/extensions/imap.rb
156
172
  - lib/ronin/network/extensions/imap/net.rb
157
173
  - lib/ronin/network/extensions/pop3.rb
@@ -172,6 +188,15 @@ files:
172
188
  - lib/ronin/network/http/http.rb
173
189
  - lib/ronin/network/http/proxy.rb
174
190
  - lib/ronin/network/imap.rb
191
+ - lib/ronin/network/mixins.rb
192
+ - lib/ronin/network/mixins/esmtp.rb
193
+ - lib/ronin/network/mixins/http.rb
194
+ - lib/ronin/network/mixins/imap.rb
195
+ - lib/ronin/network/mixins/pop3.rb
196
+ - lib/ronin/network/mixins/smtp.rb
197
+ - lib/ronin/network/mixins/tcp.rb
198
+ - lib/ronin/network/mixins/telnet.rb
199
+ - lib/ronin/network/mixins/udp.rb
175
200
  - lib/ronin/network/network.rb
176
201
  - lib/ronin/network/pop3.rb
177
202
  - lib/ronin/network/smtp.rb
@@ -182,16 +207,26 @@ files:
182
207
  - lib/ronin/network/telnet.rb
183
208
  - lib/ronin/network/udp.rb
184
209
  - lib/ronin/path.rb
210
+ - lib/ronin/spec/ui/output.rb
185
211
  - lib/ronin/support.rb
186
212
  - lib/ronin/support/inflector.rb
187
213
  - lib/ronin/support/version.rb
188
214
  - lib/ronin/templates.rb
189
215
  - lib/ronin/templates/erb.rb
190
216
  - lib/ronin/templates/template.rb
217
+ - lib/ronin/ui/output.rb
218
+ - lib/ronin/ui/output/helpers.rb
219
+ - lib/ronin/ui/output/output.rb
220
+ - lib/ronin/ui/output/terminal.rb
221
+ - lib/ronin/ui/output/terminal/color.rb
222
+ - lib/ronin/ui/output/terminal/raw.rb
223
+ - lib/ronin/ui/shell.rb
191
224
  - ronin-support.gemspec
225
+ - spec/extensions/enumerable_spec.rb
192
226
  - spec/extensions/file_spec.rb
193
227
  - spec/extensions/ip_addr_spec.rb
194
228
  - spec/extensions/kernel_spec.rb
229
+ - spec/extensions/resolv_spec.rb
195
230
  - spec/extensions/string_spec.rb
196
231
  - spec/formatting/binary/helpers/hexdumps.rb
197
232
  - spec/formatting/binary/helpers/hexdumps/ascii.bin
@@ -222,6 +257,7 @@ files:
222
257
  - spec/formatting/html/string_spec.rb
223
258
  - spec/formatting/http/integer_spec.rb
224
259
  - spec/formatting/http/string_spec.rb
260
+ - spec/formatting/sql/string_spec.rb
225
261
  - spec/formatting/text/array_spec.rb
226
262
  - spec/formatting/text/string_spec.rb
227
263
  - spec/mixin_spec.rb
@@ -241,55 +277,61 @@ files:
241
277
  - spec/templates/helpers/data/includes/_relative.erb
242
278
  - spec/templates/helpers/data/templates/example.erb
243
279
  - spec/templates/template_spec.rb
280
+ - spec/ui/classes/test_shell.rb
281
+ - spec/ui/output_spec.rb
282
+ - spec/ui/shell_spec.rb
244
283
  homepage: http://github.com/ronin-ruby/ronin-support
245
- licenses:
284
+ licenses:
246
285
  - LGPL-3
247
286
  post_install_message:
248
287
  rdoc_options: []
249
-
250
- require_paths:
288
+ require_paths:
251
289
  - lib
252
- required_ruby_version: !ruby/object:Gem::Requirement
290
+ required_ruby_version: !ruby/object:Gem::Requirement
253
291
  none: false
254
- requirements:
255
- - - ">="
256
- - !ruby/object:Gem::Version
292
+ requirements:
293
+ - - ! '>='
294
+ - !ruby/object:Gem::Version
257
295
  version: 1.8.7
258
- required_rubygems_version: !ruby/object:Gem::Requirement
296
+ required_rubygems_version: !ruby/object:Gem::Requirement
259
297
  none: false
260
- requirements:
261
- - - ">="
262
- - !ruby/object:Gem::Version
263
- version: 1.3.6
298
+ requirements:
299
+ - - ! '>='
300
+ - !ruby/object:Gem::Version
301
+ version: '0'
264
302
  requirements: []
265
-
266
- rubyforge_project: ronin-support
267
- rubygems_version: 1.8.5
303
+ rubyforge_project:
304
+ rubygems_version: 1.8.10
268
305
  signing_key:
269
306
  specification_version: 3
270
307
  summary: A support library for Ronin.
271
- test_files:
272
- - spec/network/network_spec.rb
273
- - spec/network/smtp/email_spec.rb
274
- - spec/network/http/http_spec.rb
275
- - spec/network/http/proxy_spec.rb
276
- - spec/network/ssl_spec.rb
277
- - spec/templates/erb_spec.rb
278
- - spec/templates/template_spec.rb
279
- - spec/support/inflector_spec.rb
280
- - spec/path_spec.rb
308
+ test_files:
309
+ - spec/extensions/enumerable_spec.rb
281
310
  - spec/extensions/file_spec.rb
311
+ - spec/extensions/ip_addr_spec.rb
282
312
  - spec/extensions/kernel_spec.rb
313
+ - spec/extensions/resolv_spec.rb
283
314
  - spec/extensions/string_spec.rb
284
- - spec/extensions/ip_addr_spec.rb
285
- - spec/mixin_spec.rb
286
315
  - spec/formatting/binary/integer_spec.rb
287
316
  - spec/formatting/binary/string_spec.rb
317
+ - spec/formatting/digest/string_spec.rb
288
318
  - spec/formatting/html/integer_spec.rb
289
319
  - spec/formatting/html/string_spec.rb
290
- - spec/formatting/digest/string_spec.rb
291
- - spec/formatting/text/array_spec.rb
292
- - spec/formatting/text/string_spec.rb
293
320
  - spec/formatting/http/integer_spec.rb
294
321
  - spec/formatting/http/string_spec.rb
322
+ - spec/formatting/sql/string_spec.rb
323
+ - spec/formatting/text/array_spec.rb
324
+ - spec/formatting/text/string_spec.rb
325
+ - spec/mixin_spec.rb
326
+ - spec/network/http/http_spec.rb
327
+ - spec/network/http/proxy_spec.rb
328
+ - spec/network/network_spec.rb
329
+ - spec/network/smtp/email_spec.rb
330
+ - spec/network/ssl_spec.rb
331
+ - spec/path_spec.rb
332
+ - spec/support/inflector_spec.rb
295
333
  - spec/support_spec.rb
334
+ - spec/templates/erb_spec.rb
335
+ - spec/templates/template_spec.rb
336
+ - spec/ui/output_spec.rb
337
+ - spec/ui/shell_spec.rb