ronin-support 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (194) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +11 -0
  3. data/.github/workflows/ruby.yml +28 -0
  4. data/.ruby-version +1 -0
  5. data/.yardopts +1 -1
  6. data/ChangeLog.md +28 -0
  7. data/Gemfile +6 -7
  8. data/README.md +53 -32
  9. data/Rakefile +1 -2
  10. data/gemspec.yml +16 -7
  11. data/lib/ronin/binary.rb +5 -5
  12. data/lib/ronin/binary/hexdump.rb +5 -5
  13. data/lib/ronin/binary/hexdump/parser.rb +5 -5
  14. data/lib/ronin/binary/struct.rb +5 -5
  15. data/lib/ronin/binary/template.rb +7 -7
  16. data/lib/ronin/extensions.rb +5 -5
  17. data/lib/ronin/extensions/enumerable.rb +5 -5
  18. data/lib/ronin/extensions/file.rb +37 -31
  19. data/lib/ronin/extensions/ip_addr.rb +6 -7
  20. data/lib/ronin/extensions/kernel.rb +5 -5
  21. data/lib/ronin/extensions/meta.rb +5 -5
  22. data/lib/ronin/extensions/regexp.rb +5 -5
  23. data/lib/ronin/extensions/resolv.rb +5 -5
  24. data/lib/ronin/extensions/string.rb +5 -5
  25. data/lib/ronin/formatting.rb +5 -5
  26. data/lib/ronin/formatting/binary.rb +5 -5
  27. data/lib/ronin/formatting/digest.rb +5 -5
  28. data/lib/ronin/formatting/extensions.rb +5 -5
  29. data/lib/ronin/formatting/extensions/binary.rb +5 -5
  30. data/lib/ronin/formatting/extensions/binary/array.rb +6 -6
  31. data/lib/ronin/formatting/extensions/binary/base64.rb +5 -5
  32. data/lib/ronin/formatting/extensions/binary/file.rb +5 -5
  33. data/lib/ronin/formatting/extensions/binary/float.rb +6 -6
  34. data/lib/ronin/formatting/extensions/binary/integer.rb +6 -6
  35. data/lib/ronin/formatting/extensions/binary/string.rb +6 -6
  36. data/lib/ronin/formatting/extensions/digest.rb +5 -5
  37. data/lib/ronin/formatting/extensions/digest/file.rb +5 -5
  38. data/lib/ronin/formatting/extensions/digest/string.rb +5 -5
  39. data/lib/ronin/formatting/extensions/html.rb +5 -5
  40. data/lib/ronin/formatting/extensions/html/integer.rb +5 -5
  41. data/lib/ronin/formatting/extensions/html/string.rb +7 -7
  42. data/lib/ronin/formatting/extensions/http.rb +5 -5
  43. data/lib/ronin/formatting/extensions/http/integer.rb +6 -6
  44. data/lib/ronin/formatting/extensions/http/string.rb +7 -7
  45. data/lib/ronin/formatting/extensions/sql.rb +5 -5
  46. data/lib/ronin/formatting/extensions/sql/string.rb +15 -13
  47. data/lib/ronin/formatting/extensions/text.rb +5 -5
  48. data/lib/ronin/formatting/extensions/text/array.rb +5 -5
  49. data/lib/ronin/formatting/extensions/text/string.rb +5 -5
  50. data/lib/ronin/formatting/html.rb +5 -5
  51. data/lib/ronin/formatting/http.rb +5 -5
  52. data/lib/ronin/formatting/sql.rb +5 -5
  53. data/lib/ronin/formatting/text.rb +5 -5
  54. data/lib/ronin/fuzzing.rb +5 -5
  55. data/lib/ronin/fuzzing/extensions.rb +5 -5
  56. data/lib/ronin/fuzzing/extensions/string.rb +5 -5
  57. data/lib/ronin/fuzzing/fuzzer.rb +5 -5
  58. data/lib/ronin/fuzzing/fuzzing.rb +7 -7
  59. data/lib/ronin/fuzzing/mutator.rb +5 -5
  60. data/lib/ronin/fuzzing/repeater.rb +5 -5
  61. data/lib/ronin/fuzzing/template.rb +5 -5
  62. data/lib/ronin/mixin.rb +2 -2
  63. data/lib/ronin/network.rb +5 -5
  64. data/lib/ronin/network/dns.rb +5 -5
  65. data/lib/ronin/network/esmtp.rb +5 -5
  66. data/lib/ronin/network/extensions.rb +5 -5
  67. data/lib/ronin/network/extensions/dns.rb +5 -5
  68. data/lib/ronin/network/extensions/dns/net.rb +5 -5
  69. data/lib/ronin/network/extensions/esmtp.rb +5 -5
  70. data/lib/ronin/network/extensions/esmtp/net.rb +5 -5
  71. data/lib/ronin/network/extensions/http.rb +5 -5
  72. data/lib/ronin/network/extensions/http/net.rb +5 -5
  73. data/lib/ronin/network/extensions/http/uri/http.rb +5 -5
  74. data/lib/ronin/network/extensions/imap.rb +5 -5
  75. data/lib/ronin/network/extensions/imap/net.rb +5 -5
  76. data/lib/ronin/network/extensions/pop3.rb +5 -5
  77. data/lib/ronin/network/extensions/pop3/net.rb +5 -5
  78. data/lib/ronin/network/extensions/smtp.rb +5 -5
  79. data/lib/ronin/network/extensions/smtp/net.rb +5 -5
  80. data/lib/ronin/network/extensions/ssl.rb +5 -5
  81. data/lib/ronin/network/extensions/ssl/net.rb +5 -5
  82. data/lib/ronin/network/extensions/tcp.rb +5 -5
  83. data/lib/ronin/network/extensions/tcp/net.rb +5 -5
  84. data/lib/ronin/network/extensions/telnet.rb +5 -5
  85. data/lib/ronin/network/extensions/telnet/net.rb +5 -5
  86. data/lib/ronin/network/extensions/udp.rb +5 -5
  87. data/lib/ronin/network/extensions/udp/net.rb +5 -5
  88. data/lib/ronin/network/ftp.rb +5 -5
  89. data/lib/ronin/network/http.rb +5 -5
  90. data/lib/ronin/network/http/exceptions.rb +5 -5
  91. data/lib/ronin/network/http/exceptions/unknown_request.rb +5 -5
  92. data/lib/ronin/network/http/http.rb +52 -57
  93. data/lib/ronin/network/http/proxy.rb +5 -5
  94. data/lib/ronin/network/imap.rb +5 -5
  95. data/lib/ronin/network/mixins.rb +5 -5
  96. data/lib/ronin/network/mixins/dns.rb +5 -5
  97. data/lib/ronin/network/mixins/esmtp.rb +5 -5
  98. data/lib/ronin/network/mixins/ftp.rb +5 -5
  99. data/lib/ronin/network/mixins/http.rb +7 -7
  100. data/lib/ronin/network/mixins/imap.rb +5 -5
  101. data/lib/ronin/network/mixins/mixin.rb +5 -5
  102. data/lib/ronin/network/mixins/pop3.rb +5 -5
  103. data/lib/ronin/network/mixins/smtp.rb +5 -5
  104. data/lib/ronin/network/mixins/ssl.rb +5 -5
  105. data/lib/ronin/network/mixins/tcp.rb +5 -5
  106. data/lib/ronin/network/mixins/telnet.rb +5 -5
  107. data/lib/ronin/network/mixins/udp.rb +5 -5
  108. data/lib/ronin/network/mixins/unix.rb +5 -5
  109. data/lib/ronin/network/network.rb +5 -5
  110. data/lib/ronin/network/pop3.rb +5 -5
  111. data/lib/ronin/network/proxy.rb +5 -5
  112. data/lib/ronin/network/smtp.rb +5 -5
  113. data/lib/ronin/network/smtp/email.rb +6 -6
  114. data/lib/ronin/network/smtp/smtp.rb +5 -5
  115. data/lib/ronin/network/ssl.rb +7 -7
  116. data/lib/ronin/network/tcp.rb +5 -5
  117. data/lib/ronin/network/tcp/proxy.rb +5 -5
  118. data/lib/ronin/network/tcp/tcp.rb +32 -23
  119. data/lib/ronin/network/telnet.rb +7 -5
  120. data/lib/ronin/network/udp.rb +5 -5
  121. data/lib/ronin/network/udp/proxy.rb +5 -5
  122. data/lib/ronin/network/udp/udp.rb +28 -26
  123. data/lib/ronin/network/unix.rb +7 -7
  124. data/lib/ronin/path.rb +32 -36
  125. data/lib/ronin/spec/ui/output.rb +5 -5
  126. data/lib/ronin/support.rb +5 -5
  127. data/lib/ronin/support/inflector.rb +5 -5
  128. data/lib/ronin/support/support.rb +5 -5
  129. data/lib/ronin/support/version.rb +6 -6
  130. data/lib/ronin/templates.rb +5 -5
  131. data/lib/ronin/templates/erb.rb +5 -5
  132. data/lib/ronin/templates/template.rb +5 -5
  133. data/lib/ronin/ui/output.rb +5 -5
  134. data/lib/ronin/ui/output/helpers.rb +5 -5
  135. data/lib/ronin/ui/output/output.rb +17 -21
  136. data/lib/ronin/ui/output/terminal.rb +5 -5
  137. data/lib/ronin/ui/output/terminal/color.rb +5 -5
  138. data/lib/ronin/ui/output/terminal/raw.rb +5 -5
  139. data/lib/ronin/ui/shell.rb +5 -5
  140. data/lib/ronin/wordlist.rb +7 -7
  141. data/ronin-support.gemspec +1 -0
  142. data/spec/binary/hexdump/parser_spec.rb +22 -22
  143. data/spec/binary/struct_spec.rb +56 -56
  144. data/spec/binary/template_spec.rb +106 -104
  145. data/spec/extensions/enumerable_spec.rb +4 -4
  146. data/spec/extensions/file_spec.rb +12 -14
  147. data/spec/extensions/ip_addr_spec.rb +30 -30
  148. data/spec/extensions/kernel_spec.rb +7 -7
  149. data/spec/extensions/regexp_spec.rb +69 -69
  150. data/spec/extensions/resolv_spec.rb +2 -2
  151. data/spec/extensions/string_spec.rb +30 -29
  152. data/spec/formatting/binary/array_spec.rb +2 -2
  153. data/spec/formatting/binary/base64_spec.rb +8 -8
  154. data/spec/formatting/binary/float_spec.rb +6 -4
  155. data/spec/formatting/binary/integer_spec.rb +25 -25
  156. data/spec/formatting/binary/string_spec.rb +32 -30
  157. data/spec/formatting/digest/string_spec.rb +5 -5
  158. data/spec/formatting/html/integer_spec.rb +6 -6
  159. data/spec/formatting/html/string_spec.rb +10 -10
  160. data/spec/formatting/http/integer_spec.rb +3 -3
  161. data/spec/formatting/http/string_spec.rb +5 -5
  162. data/spec/formatting/sql/string_spec.rb +21 -19
  163. data/spec/formatting/text/array_spec.rb +15 -15
  164. data/spec/formatting/text/string_spec.rb +33 -33
  165. data/spec/fuzzing/extensions/string_spec.rb +11 -11
  166. data/spec/fuzzing/fuzzer_spec.rb +15 -15
  167. data/spec/fuzzing/fuzzing_spec.rb +5 -5
  168. data/spec/fuzzing/mutator_spec.rb +15 -15
  169. data/spec/fuzzing/repeater_spec.rb +7 -7
  170. data/spec/fuzzing/template_spec.rb +11 -11
  171. data/spec/mixin_spec.rb +10 -12
  172. data/spec/network/dns_spec.rb +34 -32
  173. data/spec/network/ftp_spec.rb +9 -9
  174. data/spec/network/http/http_spec.rb +237 -144
  175. data/spec/network/http/proxy_spec.rb +37 -37
  176. data/spec/network/network_spec.rb +1 -1
  177. data/spec/network/proxy_spec.rb +19 -19
  178. data/spec/network/smtp/email_spec.rb +14 -14
  179. data/spec/network/ssl_spec.rb +9 -9
  180. data/spec/network/tcp/proxy_spec.rb +9 -7
  181. data/spec/network/tcp/tcp_spec.rb +161 -118
  182. data/spec/network/telnet_spec.rb +5 -5
  183. data/spec/network/udp/udp_spec.rb +123 -96
  184. data/spec/network/unix_spec.rb +24 -25
  185. data/spec/path_spec.rb +43 -18
  186. data/spec/spec_helper.rb +0 -1
  187. data/spec/support/inflector_spec.rb +4 -4
  188. data/spec/support_spec.rb +1 -1
  189. data/spec/templates/erb_spec.rb +3 -3
  190. data/spec/templates/template_spec.rb +10 -10
  191. data/spec/ui/shell_spec.rb +15 -15
  192. data/spec/wordlist_spec.rb +19 -19
  193. metadata +408 -366
  194. data/.gemtest +0 -0
@@ -1,20 +1,20 @@
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 Support.
4
+ # This file is part of ronin-support.
5
5
  #
6
- # Ronin Support is free software: you can redistribute it and/or modify
6
+ # ronin-support is free software: you can redistribute it and/or modify
7
7
  # it under the terms of the GNU Lesser General Public License as published
8
8
  # by the Free Software Foundation, either version 3 of the License, or
9
9
  # (at your option) any later version.
10
10
  #
11
- # Ronin Support is distributed in the hope that it will be useful,
11
+ # ronin-support is distributed in the hope that it will be useful,
12
12
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
13
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
14
  # GNU Lesser General Public License for more details.
15
15
  #
16
16
  # You should have received a copy of the GNU Lesser General Public License
17
- # along with Ronin Support. If not, see <http://www.gnu.org/licenses/>.
17
+ # along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/templates/template'
@@ -1,20 +1,20 @@
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 Support.
4
+ # This file is part of ronin-support.
5
5
  #
6
- # Ronin Support is free software: you can redistribute it and/or modify
6
+ # ronin-support is free software: you can redistribute it and/or modify
7
7
  # it under the terms of the GNU Lesser General Public License as published
8
8
  # by the Free Software Foundation, either version 3 of the License, or
9
9
  # (at your option) any later version.
10
10
  #
11
- # Ronin Support is distributed in the hope that it will be useful,
11
+ # ronin-support is distributed in the hope that it will be useful,
12
12
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
13
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
14
  # GNU Lesser General Public License for more details.
15
15
  #
16
16
  # You should have received a copy of the GNU Lesser General Public License
17
- # along with Ronin Support. If not, see <http://www.gnu.org/licenses/>.
17
+ # along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/templates/template'
@@ -1,20 +1,20 @@
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 Support.
4
+ # This file is part of ronin-support.
5
5
  #
6
- # Ronin Support is free software: you can redistribute it and/or modify
6
+ # ronin-support is free software: you can redistribute it and/or modify
7
7
  # it under the terms of the GNU Lesser General Public License as published
8
8
  # by the Free Software Foundation, either version 3 of the License, or
9
9
  # (at your option) any later version.
10
10
  #
11
- # Ronin Support is distributed in the hope that it will be useful,
11
+ # ronin-support is distributed in the hope that it will be useful,
12
12
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
13
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
14
  # GNU Lesser General Public License for more details.
15
15
  #
16
16
  # You should have received a copy of the GNU Lesser General Public License
17
- # along with Ronin Support. If not, see <http://www.gnu.org/licenses/>.
17
+ # along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'data_paths/finders'
@@ -1,20 +1,20 @@
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 Support.
4
+ # This file is part of ronin-support.
5
5
  #
6
- # Ronin Support is free software: you can redistribute it and/or modify
6
+ # ronin-support is free software: you can redistribute it and/or modify
7
7
  # it under the terms of the GNU Lesser General Public License as published
8
8
  # by the Free Software Foundation, either version 3 of the License, or
9
9
  # (at your option) any later version.
10
10
  #
11
- # Ronin Support is distributed in the hope that it will be useful,
11
+ # ronin-support is distributed in the hope that it will be useful,
12
12
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
13
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
14
  # GNU Lesser General Public License for more details.
15
15
  #
16
16
  # You should have received a copy of the GNU Lesser General Public License
17
- # along with Ronin Support. If not, see <http://www.gnu.org/licenses/>.
17
+ # along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/ui/output/output'
@@ -1,20 +1,20 @@
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 Support.
4
+ # This file is part of ronin-support.
5
5
  #
6
- # Ronin Support is free software: you can redistribute it and/or modify
6
+ # ronin-support is free software: you can redistribute it and/or modify
7
7
  # it under the terms of the GNU Lesser General Public License as published
8
8
  # by the Free Software Foundation, either version 3 of the License, or
9
9
  # (at your option) any later version.
10
10
  #
11
- # Ronin Support is distributed in the hope that it will be useful,
11
+ # ronin-support is distributed in the hope that it will be useful,
12
12
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
13
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
14
  # GNU Lesser General Public License for more details.
15
15
  #
16
16
  # You should have received a copy of the GNU Lesser General Public License
17
- # along with Ronin Support. If not, see <http://www.gnu.org/licenses/>.
17
+ # along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/ui/output/output'
@@ -1,20 +1,20 @@
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 Support.
4
+ # This file is part of ronin-support.
5
5
  #
6
- # Ronin Support is free software: you can redistribute it and/or modify
6
+ # ronin-support is free software: you can redistribute it and/or modify
7
7
  # it under the terms of the GNU Lesser General Public License as published
8
8
  # by the Free Software Foundation, either version 3 of the License, or
9
9
  # (at your option) any later version.
10
10
  #
11
- # Ronin Support is distributed in the hope that it will be useful,
11
+ # ronin-support is distributed in the hope that it will be useful,
12
12
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
13
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
14
  # GNU Lesser General Public License for more details.
15
15
  #
16
16
  # You should have received a copy of the GNU Lesser General Public License
17
- # along with Ronin Support. If not, see <http://www.gnu.org/licenses/>.
17
+ # along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/ui/output/terminal/raw'
@@ -26,16 +26,12 @@ module Ronin
26
26
  # Controls {Output} from Ronin.
27
27
  #
28
28
  module Output
29
- @mode = if ($VERBOSE || $DEBUG)
30
- :verbose
31
- else
32
- :quiet
29
+ @mode = if ($VERBOSE || $DEBUG) then :verbose
30
+ else :quiet
33
31
  end
34
32
 
35
- @handler = if $stdout.tty?
36
- Terminal::Color
37
- else
38
- Terminal::Raw
33
+ @handler = if $stdout.tty? then Terminal::Color
34
+ else Terminal::Raw
39
35
  end
40
36
 
41
37
  #
@@ -46,7 +42,7 @@ module Ronin
46
42
  #
47
43
  # @api semipublic
48
44
  #
49
- def Output.verbose?
45
+ def self.verbose?
50
46
  @mode == :verbose
51
47
  end
52
48
 
@@ -58,7 +54,7 @@ module Ronin
58
54
  #
59
55
  # @api semipublic
60
56
  #
61
- def Output.quiet?
57
+ def self.quiet?
62
58
  @mode == :quiet
63
59
  end
64
60
 
@@ -70,7 +66,7 @@ module Ronin
70
66
  #
71
67
  # @api semipublic
72
68
  #
73
- def Output.silent?
69
+ def self.silent?
74
70
  @mode == :silent
75
71
  end
76
72
 
@@ -83,7 +79,7 @@ module Ronin
83
79
  #
84
80
  # @api semipublic
85
81
  #
86
- def Output.verbose!
82
+ def self.verbose!
87
83
  @mode = :verbose
88
84
  return self
89
85
  end
@@ -97,7 +93,7 @@ module Ronin
97
93
  #
98
94
  # @api semipublic
99
95
  #
100
- def Output.quiet!
96
+ def self.quiet!
101
97
  @mode = :quiet
102
98
  return self
103
99
  end
@@ -109,7 +105,7 @@ module Ronin
109
105
  #
110
106
  # @since 1.0.0
111
107
  #
112
- def Output.silent!
108
+ def self.silent!
113
109
  @mode = :silent
114
110
  return self
115
111
  end
@@ -122,7 +118,7 @@ module Ronin
122
118
  #
123
119
  # @api semipublic
124
120
  #
125
- def Output.handler
121
+ def self.handler
126
122
  @handler
127
123
  end
128
124
 
@@ -138,7 +134,7 @@ module Ronin
138
134
  #
139
135
  # @api semipublic
140
136
  #
141
- def Output.handler=(new_handler)
137
+ def self.handler=(new_handler)
142
138
  @handler = new_handler
143
139
  end
144
140
  end
@@ -1,20 +1,20 @@
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 Support.
4
+ # This file is part of ronin-support.
5
5
  #
6
- # Ronin Support is free software: you can redistribute it and/or modify
6
+ # ronin-support is free software: you can redistribute it and/or modify
7
7
  # it under the terms of the GNU Lesser General Public License as published
8
8
  # by the Free Software Foundation, either version 3 of the License, or
9
9
  # (at your option) any later version.
10
10
  #
11
- # Ronin Support is distributed in the hope that it will be useful,
11
+ # ronin-support is distributed in the hope that it will be useful,
12
12
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
13
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
14
  # GNU Lesser General Public License for more details.
15
15
  #
16
16
  # You should have received a copy of the GNU Lesser General Public License
17
- # along with Ronin Support. If not, see <http://www.gnu.org/licenses/>.
17
+ # along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/ui/output/terminal/raw'
@@ -1,20 +1,20 @@
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 Support.
4
+ # This file is part of ronin-support.
5
5
  #
6
- # Ronin Support is free software: you can redistribute it and/or modify
6
+ # ronin-support is free software: you can redistribute it and/or modify
7
7
  # it under the terms of the GNU Lesser General Public License as published
8
8
  # by the Free Software Foundation, either version 3 of the License, or
9
9
  # (at your option) any later version.
10
10
  #
11
- # Ronin Support is distributed in the hope that it will be useful,
11
+ # ronin-support is distributed in the hope that it will be useful,
12
12
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
13
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
14
  # GNU Lesser General Public License for more details.
15
15
  #
16
16
  # You should have received a copy of the GNU Lesser General Public License
17
- # along with Ronin Support. If not, see <http://www.gnu.org/licenses/>.
17
+ # along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  module Ronin
@@ -1,20 +1,20 @@
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 Support.
4
+ # This file is part of ronin-support.
5
5
  #
6
- # Ronin Support is free software: you can redistribute it and/or modify
6
+ # ronin-support is free software: you can redistribute it and/or modify
7
7
  # it under the terms of the GNU Lesser General Public License as published
8
8
  # by the Free Software Foundation, either version 3 of the License, or
9
9
  # (at your option) any later version.
10
10
  #
11
- # Ronin Support is distributed in the hope that it will be useful,
11
+ # ronin-support is distributed in the hope that it will be useful,
12
12
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
13
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
14
  # GNU Lesser General Public License for more details.
15
15
  #
16
16
  # You should have received a copy of the GNU Lesser General Public License
17
- # along with Ronin Support. If not, see <http://www.gnu.org/licenses/>.
17
+ # along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  module Ronin
@@ -1,20 +1,20 @@
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 Support.
4
+ # This file is part of ronin-support.
5
5
  #
6
- # Ronin Support is free software: you can redistribute it and/or modify
6
+ # ronin-support is free software: you can redistribute it and/or modify
7
7
  # it under the terms of the GNU Lesser General Public License as published
8
8
  # by the Free Software Foundation, either version 3 of the License, or
9
9
  # (at your option) any later version.
10
10
  #
11
- # Ronin Support is distributed in the hope that it will be useful,
11
+ # ronin-support is distributed in the hope that it will be useful,
12
12
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
13
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
14
  # GNU Lesser General Public License for more details.
15
15
  #
16
16
  # You should have received a copy of the GNU Lesser General Public License
17
- # along with Ronin Support. If not, see <http://www.gnu.org/licenses/>.
17
+ # along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/ui/output/helpers'
@@ -1,20 +1,20 @@
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 Support.
4
+ # This file is part of ronin-support.
5
5
  #
6
- # Ronin Support is free software: you can redistribute it and/or modify
6
+ # ronin-support is free software: you can redistribute it and/or modify
7
7
  # it under the terms of the GNU Lesser General Public License as published
8
8
  # by the Free Software Foundation, either version 3 of the License, or
9
9
  # (at your option) any later version.
10
10
  #
11
- # Ronin Support is distributed in the hope that it will be useful,
11
+ # ronin-support is distributed in the hope that it will be useful,
12
12
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
13
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
14
  # GNU Lesser General Public License for more details.
15
15
  #
16
16
  # You should have received a copy of the GNU Lesser General Public License
17
- # along with Ronin Support. If not, see <http://www.gnu.org/licenses/>.
17
+ # along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
20
  require 'ronin/fuzzing/template'
@@ -107,11 +107,11 @@ module Ronin
107
107
  # @yieldparam [String] word
108
108
  # A unique word from the text.
109
109
  #
110
- # @return [SortedSet]
110
+ # @return [Set]
111
111
  # The unique set of words from the text.
112
112
  #
113
113
  def self.parse(text)
114
- words_seen = SortedSet[]
114
+ words_seen = Set[]
115
115
 
116
116
  text.each_line do |line|
117
117
  line.scan(Regexp::WORD) do |word|
@@ -20,6 +20,7 @@ Gem::Specification.new do |gem|
20
20
  gem.authors = Array(gemspec['authors'])
21
21
  gem.email = gemspec['email']
22
22
  gem.homepage = gemspec['homepage']
23
+ gem.metadata = gemspec['metadata'] if gemspec['metadata']
23
24
 
24
25
  glob = lambda { |patterns| gem.files & Dir[*patterns] }
25
26
 
@@ -18,7 +18,7 @@ describe Binary::Hexdump::Parser do
18
18
  let(:hexdump) { load_hexdump('hexdump_octal_bytes') }
19
19
 
20
20
  it "should unhexdump octal-byte hexdump output" do
21
- subject.parse(hexdump).should == ascii
21
+ expect(subject.parse(hexdump)).to eq(ascii)
22
22
  end
23
23
  end
24
24
 
@@ -30,7 +30,7 @@ describe Binary::Hexdump::Parser do
30
30
  let(:hexdump) { load_hexdump('hexdump_hex_bytes') }
31
31
 
32
32
  it "should unhexdump hex-byte hexdump output" do
33
- subject.parse(hexdump).should == ascii
33
+ expect(subject.parse(hexdump)).to eq(ascii)
34
34
  end
35
35
  end
36
36
 
@@ -42,7 +42,7 @@ describe Binary::Hexdump::Parser do
42
42
  let(:hexdump) { load_hexdump('hexdump_decimal_shorts') }
43
43
 
44
44
  it "should unhexdump decimal-short hexdump output" do
45
- subject.parse(hexdump).should == ascii
45
+ expect(subject.parse(hexdump)).to eq(ascii)
46
46
  end
47
47
  end
48
48
 
@@ -54,7 +54,7 @@ describe Binary::Hexdump::Parser do
54
54
  let(:hexdump) { load_hexdump('hexdump_octal_shorts') }
55
55
 
56
56
  it "should unhexdump octal-short hexdump output" do
57
- subject.parse(hexdump).should == ascii
57
+ expect(subject.parse(hexdump)).to eq(ascii)
58
58
  end
59
59
  end
60
60
 
@@ -66,7 +66,7 @@ describe Binary::Hexdump::Parser do
66
66
  let(:hexdump) { load_hexdump('hexdump_hex_shorts') }
67
67
 
68
68
  it "should unhexdump hex-short hexdump output" do
69
- subject.parse(hexdump).should == ascii
69
+ expect(subject.parse(hexdump)).to eq(ascii)
70
70
  end
71
71
  end
72
72
 
@@ -78,7 +78,7 @@ describe Binary::Hexdump::Parser do
78
78
  let(:hexdump) { load_hexdump('hexdump_repeated') }
79
79
 
80
80
  it "should unhexdump repeated hexdump output" do
81
- subject.parse(hexdump).should == repeated
81
+ expect(subject.parse(hexdump)).to eq(repeated)
82
82
  end
83
83
  end
84
84
  end
@@ -95,7 +95,7 @@ describe Binary::Hexdump::Parser do
95
95
  let(:hexdump) { load_hexdump('od_octal_bytes') }
96
96
 
97
97
  it "should unhexdump octal-byte hexdump output" do
98
- subject.parse(hexdump).should == ascii
98
+ expect(subject.parse(hexdump)).to eq(ascii)
99
99
  end
100
100
  end
101
101
 
@@ -107,7 +107,7 @@ describe Binary::Hexdump::Parser do
107
107
  let(:hexdump) { load_hexdump('od_octal_shorts') }
108
108
 
109
109
  it "should unhexdump octal-shorts hexdump output" do
110
- subject.parse(hexdump).should == ascii
110
+ expect(subject.parse(hexdump)).to eq(ascii)
111
111
  end
112
112
  end
113
113
 
@@ -119,7 +119,7 @@ describe Binary::Hexdump::Parser do
119
119
  let(:hexdump) { load_hexdump('od_octal_ints') }
120
120
 
121
121
  it "should unhexdump octal-ints hexdump output" do
122
- subject.parse(hexdump).should == ascii
122
+ expect(subject.parse(hexdump)).to eq(ascii)
123
123
  end
124
124
  end
125
125
 
@@ -132,7 +132,7 @@ describe Binary::Hexdump::Parser do
132
132
  let(:hexdump) { load_hexdump('od_octal_quads') }
133
133
 
134
134
  it "should unhexdump octal-quads hexdump output" do
135
- subject.parse(hexdump).should == ascii
135
+ expect(subject.parse(hexdump)).to eq(ascii)
136
136
  end
137
137
  end
138
138
  end
@@ -145,7 +145,7 @@ describe Binary::Hexdump::Parser do
145
145
  let(:hexdump) { load_hexdump('od_decimal_bytes') }
146
146
 
147
147
  it "should unhexdump decimal-byte hexdump output" do
148
- subject.parse(hexdump).should == ascii
148
+ expect(subject.parse(hexdump)).to eq(ascii)
149
149
  end
150
150
  end
151
151
 
@@ -157,7 +157,7 @@ describe Binary::Hexdump::Parser do
157
157
  let(:hexdump) { load_hexdump('od_decimal_shorts') }
158
158
 
159
159
  it "should unhexdump decimal-shorts hexdump output" do
160
- subject.parse(hexdump).should == ascii
160
+ expect(subject.parse(hexdump)).to eq(ascii)
161
161
  end
162
162
  end
163
163
 
@@ -169,7 +169,7 @@ describe Binary::Hexdump::Parser do
169
169
  let(:hexdump) { load_hexdump('od_decimal_ints') }
170
170
 
171
171
  it "should unhexdump decimal-ints hexdump output" do
172
- subject.parse(hexdump).should == ascii
172
+ expect(subject.parse(hexdump)).to eq(ascii)
173
173
  end
174
174
  end
175
175
 
@@ -182,7 +182,7 @@ describe Binary::Hexdump::Parser do
182
182
  let(:hexdump) { load_hexdump('od_decimal_quads') }
183
183
 
184
184
  it "should unhexdump decimal-quads hexdump output" do
185
- subject.parse(hexdump).should == ascii
185
+ expect(subject.parse(hexdump)).to eq(ascii)
186
186
  end
187
187
  end
188
188
  end
@@ -197,7 +197,7 @@ describe Binary::Hexdump::Parser do
197
197
  let(:hexdump) { load_hexdump('od_named_chars') }
198
198
 
199
199
  it "should unhexdump named characters" do
200
- subject.parse(hexdump).should == data
200
+ expect(subject.parse(hexdump)).to eq(data)
201
201
  end
202
202
  end
203
203
 
@@ -209,7 +209,7 @@ describe Binary::Hexdump::Parser do
209
209
  let(:hexdump) { load_hexdump('od_hex_bytes') }
210
210
 
211
211
  it "should unhexdump hex-byte hexdump output" do
212
- subject.parse(hexdump).should == ascii
212
+ expect(subject.parse(hexdump)).to eq(ascii)
213
213
  end
214
214
  end
215
215
 
@@ -221,7 +221,7 @@ describe Binary::Hexdump::Parser do
221
221
  let(:hexdump) { load_hexdump('od_hex_shorts') }
222
222
 
223
223
  it "should unhexdump hex-shorts hexdump output" do
224
- subject.parse(hexdump).should == ascii
224
+ expect(subject.parse(hexdump)).to eq(ascii)
225
225
  end
226
226
  end
227
227
 
@@ -233,7 +233,7 @@ describe Binary::Hexdump::Parser do
233
233
  let(:hexdump) { load_hexdump('od_hex_ints') }
234
234
 
235
235
  it "should unhexdump hex-ints hexdump output" do
236
- subject.parse(hexdump).should == ascii
236
+ expect(subject.parse(hexdump)).to eq(ascii)
237
237
  end
238
238
  end
239
239
 
@@ -246,7 +246,7 @@ describe Binary::Hexdump::Parser do
246
246
  let(:hexdump) { load_hexdump('od_hex_quads') }
247
247
 
248
248
  it "should unhexdump hex-quads hexdump output" do
249
- subject.parse(hexdump).should == ascii
249
+ expect(subject.parse(hexdump)).to eq(ascii)
250
250
  end
251
251
  end
252
252
  end
@@ -265,7 +265,7 @@ describe Binary::Hexdump::Parser do
265
265
  let(:hexdump) { load_hexdump('od_floats') }
266
266
 
267
267
  it "should unhexdump floats" do
268
- subject.parse(hexdump).should == data
268
+ expect(subject.parse(hexdump)).to eq(data)
269
269
  end
270
270
  end
271
271
 
@@ -283,7 +283,7 @@ describe Binary::Hexdump::Parser do
283
283
  let(:hexdump) { load_hexdump('od_doubles') }
284
284
 
285
285
  it "should unhexdump doubles" do
286
- subject.parse(hexdump).should == data
286
+ expect(subject.parse(hexdump)).to eq(data)
287
287
  end
288
288
  end
289
289
 
@@ -295,7 +295,7 @@ describe Binary::Hexdump::Parser do
295
295
  let(:hexdump) { load_hexdump('od_repeated') }
296
296
 
297
297
  it "should unhexdump repeated hexdump output" do
298
- subject.parse(hexdump).should == repeated
298
+ expect(subject.parse(hexdump)).to eq(repeated)
299
299
  end
300
300
  end
301
301
  end