ronin-support 0.4.0.rc1 → 0.4.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. data/.yardopts +1 -0
  2. data/ChangeLog.md +10 -0
  3. data/Gemfile +1 -1
  4. data/README.md +1 -1
  5. data/Rakefile +8 -0
  6. data/gemspec.yml +2 -1
  7. data/lib/ronin/extensions.rb +1 -1
  8. data/lib/ronin/extensions/enumerable.rb +1 -1
  9. data/lib/ronin/extensions/file.rb +1 -1
  10. data/lib/ronin/extensions/ip_addr.rb +1 -1
  11. data/lib/ronin/extensions/kernel.rb +1 -1
  12. data/lib/ronin/extensions/meta.rb +1 -1
  13. data/lib/ronin/extensions/regexp.rb +1 -1
  14. data/lib/ronin/extensions/resolv.rb +1 -1
  15. data/lib/ronin/extensions/string.rb +1 -1
  16. data/lib/ronin/formatting.rb +1 -1
  17. data/lib/ronin/formatting/binary.rb +1 -1
  18. data/lib/ronin/formatting/digest.rb +1 -1
  19. data/lib/ronin/formatting/extensions.rb +1 -1
  20. data/lib/ronin/formatting/extensions/binary.rb +1 -1
  21. data/lib/ronin/formatting/extensions/binary/file.rb +1 -1
  22. data/lib/ronin/formatting/extensions/binary/integer.rb +1 -1
  23. data/lib/ronin/formatting/extensions/binary/string.rb +1 -1
  24. data/lib/ronin/formatting/extensions/digest.rb +1 -1
  25. data/lib/ronin/formatting/extensions/digest/file.rb +1 -1
  26. data/lib/ronin/formatting/extensions/digest/string.rb +1 -1
  27. data/lib/ronin/formatting/extensions/html.rb +1 -1
  28. data/lib/ronin/formatting/extensions/html/integer.rb +1 -1
  29. data/lib/ronin/formatting/extensions/html/string.rb +1 -1
  30. data/lib/ronin/formatting/extensions/http.rb +1 -1
  31. data/lib/ronin/formatting/extensions/http/integer.rb +1 -1
  32. data/lib/ronin/formatting/extensions/http/string.rb +1 -1
  33. data/lib/ronin/formatting/extensions/sql.rb +1 -1
  34. data/lib/ronin/formatting/extensions/sql/string.rb +1 -1
  35. data/lib/ronin/formatting/extensions/text.rb +1 -1
  36. data/lib/ronin/formatting/extensions/text/array.rb +1 -1
  37. data/lib/ronin/formatting/extensions/text/string.rb +1 -1
  38. data/lib/ronin/formatting/html.rb +1 -1
  39. data/lib/ronin/formatting/http.rb +1 -1
  40. data/lib/ronin/formatting/sql.rb +1 -1
  41. data/lib/ronin/formatting/text.rb +1 -1
  42. data/lib/ronin/fuzzing.rb +1 -1
  43. data/lib/ronin/fuzzing/extensions.rb +1 -1
  44. data/lib/ronin/fuzzing/extensions/string.rb +1 -1
  45. data/lib/ronin/fuzzing/fuzzing.rb +1 -1
  46. data/lib/ronin/mixin.rb +1 -1
  47. data/lib/ronin/network.rb +1 -1
  48. data/lib/ronin/network/esmtp.rb +1 -1
  49. data/lib/ronin/network/extensions.rb +1 -1
  50. data/lib/ronin/network/extensions/esmtp.rb +1 -1
  51. data/lib/ronin/network/extensions/esmtp/net.rb +1 -1
  52. data/lib/ronin/network/extensions/http.rb +1 -1
  53. data/lib/ronin/network/extensions/http/net.rb +1 -1
  54. data/lib/ronin/network/extensions/http/uri/http.rb +1 -1
  55. data/lib/ronin/network/extensions/imap.rb +1 -1
  56. data/lib/ronin/network/extensions/imap/net.rb +1 -1
  57. data/lib/ronin/network/extensions/pop3.rb +1 -1
  58. data/lib/ronin/network/extensions/pop3/net.rb +1 -1
  59. data/lib/ronin/network/extensions/smtp.rb +1 -1
  60. data/lib/ronin/network/extensions/smtp/net.rb +1 -1
  61. data/lib/ronin/network/extensions/ssl.rb +1 -1
  62. data/lib/ronin/network/extensions/ssl/net.rb +1 -1
  63. data/lib/ronin/network/extensions/tcp.rb +1 -1
  64. data/lib/ronin/network/extensions/tcp/net.rb +1 -1
  65. data/lib/ronin/network/extensions/telnet.rb +1 -1
  66. data/lib/ronin/network/extensions/telnet/net.rb +1 -1
  67. data/lib/ronin/network/extensions/udp.rb +1 -1
  68. data/lib/ronin/network/extensions/udp/net.rb +1 -1
  69. data/lib/ronin/network/http.rb +1 -1
  70. data/lib/ronin/network/http/exceptions.rb +1 -1
  71. data/lib/ronin/network/http/exceptions/unknown_request.rb +1 -1
  72. data/lib/ronin/network/http/http.rb +103 -72
  73. data/lib/ronin/network/http/proxy.rb +1 -1
  74. data/lib/ronin/network/imap.rb +1 -1
  75. data/lib/ronin/network/mixins.rb +1 -1
  76. data/lib/ronin/network/mixins/esmtp.rb +1 -1
  77. data/lib/ronin/network/mixins/http.rb +3 -3
  78. data/lib/ronin/network/mixins/imap.rb +1 -1
  79. data/lib/ronin/network/mixins/mixin.rb +1 -1
  80. data/lib/ronin/network/mixins/pop3.rb +1 -1
  81. data/lib/ronin/network/mixins/smtp.rb +1 -1
  82. data/lib/ronin/network/mixins/ssl.rb +144 -0
  83. data/lib/ronin/network/mixins/tcp.rb +6 -5
  84. data/lib/ronin/network/mixins/telnet.rb +1 -1
  85. data/lib/ronin/network/mixins/udp.rb +29 -3
  86. data/lib/ronin/network/network.rb +1 -1
  87. data/lib/ronin/network/pop3.rb +1 -1
  88. data/lib/ronin/network/smtp.rb +1 -1
  89. data/lib/ronin/network/smtp/email.rb +1 -1
  90. data/lib/ronin/network/smtp/smtp.rb +1 -1
  91. data/lib/ronin/network/ssl.rb +3 -6
  92. data/lib/ronin/network/tcp.rb +27 -28
  93. data/lib/ronin/network/telnet.rb +1 -1
  94. data/lib/ronin/network/udp.rb +56 -19
  95. data/lib/ronin/path.rb +1 -1
  96. data/lib/ronin/spec/ui/output.rb +1 -1
  97. data/lib/ronin/support.rb +1 -1
  98. data/lib/ronin/support/inflector.rb +1 -1
  99. data/lib/ronin/support/support.rb +1 -1
  100. data/lib/ronin/support/version.rb +2 -2
  101. data/lib/ronin/templates.rb +1 -1
  102. data/lib/ronin/templates/erb.rb +1 -1
  103. data/lib/ronin/templates/template.rb +1 -1
  104. data/lib/ronin/ui/output.rb +1 -1
  105. data/lib/ronin/ui/output/helpers.rb +1 -1
  106. data/lib/ronin/ui/output/output.rb +1 -1
  107. data/lib/ronin/ui/output/terminal.rb +1 -1
  108. data/lib/ronin/ui/output/terminal/color.rb +1 -1
  109. data/lib/ronin/ui/output/terminal/raw.rb +1 -1
  110. data/lib/ronin/ui/shell.rb +67 -7
  111. data/lib/ronin/wordlist.rb +51 -1
  112. data/spec/extensions/ip_addr_spec.rb +1 -1
  113. data/spec/network/http/http_spec.rb +193 -0
  114. data/spec/network/tcp_spec.rb +244 -0
  115. data/spec/network/udp_spec.rb +245 -0
  116. data/spec/spec_helper.rb +5 -0
  117. data/spec/ui/shell_spec.rb +7 -3
  118. data/spec/wordlist_spec.rb +25 -0
  119. metadata +35 -19
data/spec/spec_helper.rb CHANGED
@@ -2,3 +2,8 @@ require 'rspec'
2
2
  require 'ronin/support/version'
3
3
 
4
4
  include Ronin
5
+
6
+ RSpec.configure do |config|
7
+ config.treat_symbols_as_metadata_keys_with_true_values = true
8
+ config.filter_run_excluding :network
9
+ end
@@ -22,15 +22,19 @@ describe UI::Shell do
22
22
 
23
23
  describe "#commands" do
24
24
  it "should include builtin methods" do
25
- subject.commands.should include(:help, :exit)
25
+ subject.commands.should include('help', 'exit')
26
26
  end
27
27
 
28
28
  it "should include protected methods" do
29
- subject.commands.should include(:command1, :command_with_arg, :command_with_args)
29
+ subject.commands.should include(
30
+ 'command1',
31
+ 'command_with_arg',
32
+ 'command_with_args'
33
+ )
30
34
  end
31
35
 
32
36
  it "should not include public methods" do
33
- subject.commands.should_not include(:a_public_method)
37
+ subject.commands.should_not include('a_public_method')
34
38
  end
35
39
  end
36
40
 
@@ -16,6 +16,31 @@ describe Wordlist do
16
16
 
17
17
  subject { described_class.new(words) }
18
18
 
19
+ describe "parse" do
20
+ subject { described_class }
21
+
22
+ let(:words) { ('aa'..'zz').to_a }
23
+ let(:text) {
24
+ words.each_slice(100).map { |w| w.shuffle.join(' ') }.join("\n")
25
+ }
26
+
27
+ it "should parse unique words" do
28
+ subject.parse(text).to_a =~ words
29
+ end
30
+
31
+ it "should sort the unique words" do
32
+ subject.parse(text).to_a == words.sort
33
+ end
34
+
35
+ it "should yield unique words when they are seen" do
36
+ seen = []
37
+
38
+ subject.parse(text) { |word| seen << word }
39
+
40
+ seen.should =~ words
41
+ end
42
+ end
43
+
19
44
  describe "#initialize" do
20
45
  it "should accept a list of words" do
21
46
  subject.to_a.should == words
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ronin-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.rc1
4
+ version: 0.4.0.rc2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-31 00:00:00.000000000 Z
12
+ date: 2012-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chars
16
- requirement: &11794840 !ruby/object:Gem::Requirement
16
+ requirement: &20344600 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *11794840
24
+ version_requirements: *20344600
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: hexdump
27
- requirement: &11792620 !ruby/object:Gem::Requirement
27
+ requirement: &20343920 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.1'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *11792620
35
+ version_requirements: *20343920
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: combinatorics
38
- requirement: &11791900 !ruby/object:Gem::Requirement
38
+ requirement: &20343320 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0.4'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *11791900
46
+ version_requirements: *20343320
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: uri-query_params
49
- requirement: &11791120 !ruby/object:Gem::Requirement
49
+ requirement: &20342700 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0.6'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *11791120
57
+ version_requirements: *20342700
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: data_paths
60
- requirement: &11789140 !ruby/object:Gem::Requirement
60
+ requirement: &20341880 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0.3'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *11789140
68
+ version_requirements: *20341880
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: parameters
71
- requirement: &11788500 !ruby/object:Gem::Requirement
71
+ requirement: &20340860 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,21 +76,21 @@ dependencies:
76
76
  version: '0.4'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *11788500
79
+ version_requirements: *20340860
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: bundler
82
- requirement: &11787520 !ruby/object:Gem::Requirement
82
+ requirement: &20338400 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
86
86
  - !ruby/object:Gem::Version
87
- version: 1.0.10
87
+ version: '1.0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *11787520
90
+ version_requirements: *20338400
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: yard
93
- requirement: &11787040 !ruby/object:Gem::Requirement
93
+ requirement: &20337460 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,7 +98,18 @@ dependencies:
98
98
  version: 0.7.0
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *11787040
101
+ version_requirements: *20337460
102
+ - !ruby/object:Gem::Dependency
103
+ name: yard-parameters
104
+ requirement: &20336720 !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 0.1.0
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: *20336720
102
113
  description: Ronin Support is a support library for Ronin. Ronin Support contains
103
114
  many of the convenience methods used by Ronin and additional libraries.
104
115
  email: postmodern.mod3@gmail.com
@@ -193,6 +204,7 @@ files:
193
204
  - lib/ronin/network/mixins/mixin.rb
194
205
  - lib/ronin/network/mixins/pop3.rb
195
206
  - lib/ronin/network/mixins/smtp.rb
207
+ - lib/ronin/network/mixins/ssl.rb
196
208
  - lib/ronin/network/mixins/tcp.rb
197
209
  - lib/ronin/network/mixins/telnet.rb
198
210
  - lib/ronin/network/mixins/udp.rb
@@ -269,6 +281,8 @@ files:
269
281
  - spec/network/network_spec.rb
270
282
  - spec/network/smtp/email_spec.rb
271
283
  - spec/network/ssl_spec.rb
284
+ - spec/network/tcp_spec.rb
285
+ - spec/network/udp_spec.rb
272
286
  - spec/path_spec.rb
273
287
  - spec/spec_helper.rb
274
288
  - spec/support/inflector_spec.rb
@@ -334,6 +348,8 @@ test_files:
334
348
  - spec/network/network_spec.rb
335
349
  - spec/network/smtp/email_spec.rb
336
350
  - spec/network/ssl_spec.rb
351
+ - spec/network/tcp_spec.rb
352
+ - spec/network/udp_spec.rb
337
353
  - spec/path_spec.rb
338
354
  - spec/support/inflector_spec.rb
339
355
  - spec/support_spec.rb