ronin-support 1.0.0.beta2 → 1.0.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (313) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +1 -0
  3. data/.yardopts +1 -1
  4. data/ChangeLog.md +5 -3
  5. data/Gemfile +2 -2
  6. data/README.md +139 -69
  7. data/gemspec.yml +3 -2
  8. data/lib/ronin/support/archive/core_ext/file.rb +1 -1
  9. data/lib/ronin/support/archive/core_ext.rb +1 -1
  10. data/lib/ronin/support/archive/mixin.rb +1 -1
  11. data/lib/ronin/support/archive/tar/reader.rb +1 -1
  12. data/lib/ronin/support/archive/tar/writer.rb +1 -1
  13. data/lib/ronin/support/archive/tar.rb +1 -1
  14. data/lib/ronin/support/archive/zip/reader/entry.rb +1 -1
  15. data/lib/ronin/support/archive/zip/reader/statistics.rb +1 -1
  16. data/lib/ronin/support/archive/zip/reader.rb +1 -1
  17. data/lib/ronin/support/archive/zip/writer.rb +1 -1
  18. data/lib/ronin/support/archive/zip.rb +1 -1
  19. data/lib/ronin/support/archive.rb +10 -1
  20. data/lib/ronin/support/binary/array.rb +1 -1
  21. data/lib/ronin/support/binary/bit_flip/core_ext/integer.rb +79 -0
  22. data/lib/ronin/support/binary/bit_flip/core_ext/string.rb +61 -0
  23. data/lib/ronin/support/binary/{hexdump.rb → bit_flip/core_ext.rb} +3 -3
  24. data/lib/ronin/support/binary/bit_flip.rb +18 -1
  25. data/lib/ronin/support/binary/buffer.rb +1 -1
  26. data/lib/ronin/support/binary/byte_slice.rb +1 -1
  27. data/lib/ronin/support/binary/core_ext/array.rb +1 -1
  28. data/lib/ronin/support/binary/core_ext/float.rb +1 -1
  29. data/lib/ronin/support/binary/core_ext/integer.rb +1 -58
  30. data/lib/ronin/support/binary/core_ext/io.rb +1 -1
  31. data/lib/ronin/support/binary/core_ext/string.rb +1 -40
  32. data/lib/ronin/support/binary/core_ext.rb +3 -1
  33. data/lib/ronin/support/binary/cstring.rb +1 -1
  34. data/lib/ronin/support/binary/ctypes/aggregate_type.rb +1 -1
  35. data/lib/ronin/support/binary/ctypes/arch/arm/big_endian.rb +1 -1
  36. data/lib/ronin/support/binary/ctypes/arch/arm.rb +1 -1
  37. data/lib/ronin/support/binary/ctypes/arch/arm64/big_endian.rb +1 -1
  38. data/lib/ronin/support/binary/ctypes/arch/arm64.rb +1 -1
  39. data/lib/ronin/support/binary/ctypes/arch/mips/little_endian.rb +1 -1
  40. data/lib/ronin/support/binary/ctypes/arch/mips.rb +1 -1
  41. data/lib/ronin/support/binary/ctypes/arch/mips64/little_endian.rb +1 -1
  42. data/lib/ronin/support/binary/ctypes/arch/mips64.rb +1 -1
  43. data/lib/ronin/support/binary/ctypes/arch/ppc.rb +1 -1
  44. data/lib/ronin/support/binary/ctypes/arch/ppc64.rb +1 -1
  45. data/lib/ronin/support/binary/ctypes/arch/x86.rb +1 -1
  46. data/lib/ronin/support/binary/ctypes/arch/x86_64.rb +1 -1
  47. data/lib/ronin/support/binary/ctypes/arch.rb +1 -1
  48. data/lib/ronin/support/binary/ctypes/array_object_type.rb +1 -1
  49. data/lib/ronin/support/binary/ctypes/array_type.rb +1 -1
  50. data/lib/ronin/support/binary/ctypes/big_endian.rb +1 -1
  51. data/lib/ronin/support/binary/ctypes/char_type.rb +1 -1
  52. data/lib/ronin/support/binary/ctypes/char_types.rb +1 -1
  53. data/lib/ronin/support/binary/ctypes/enum_type.rb +1 -1
  54. data/lib/ronin/support/binary/ctypes/float32_type.rb +1 -1
  55. data/lib/ronin/support/binary/ctypes/float64_type.rb +1 -1
  56. data/lib/ronin/support/binary/ctypes/float_type.rb +1 -1
  57. data/lib/ronin/support/binary/ctypes/int16_type.rb +1 -1
  58. data/lib/ronin/support/binary/ctypes/int32_type.rb +1 -1
  59. data/lib/ronin/support/binary/ctypes/int64_type.rb +1 -1
  60. data/lib/ronin/support/binary/ctypes/int8_type.rb +1 -1
  61. data/lib/ronin/support/binary/ctypes/int_type.rb +1 -1
  62. data/lib/ronin/support/binary/ctypes/little_endian.rb +1 -1
  63. data/lib/ronin/support/binary/ctypes/mixin.rb +1 -1
  64. data/lib/ronin/support/binary/ctypes/native.rb +1 -1
  65. data/lib/ronin/support/binary/ctypes/network.rb +1 -1
  66. data/lib/ronin/support/binary/ctypes/object_type.rb +1 -1
  67. data/lib/ronin/support/binary/ctypes/os/bsd.rb +1 -1
  68. data/lib/ronin/support/binary/ctypes/os/freebsd.rb +1 -1
  69. data/lib/ronin/support/binary/ctypes/os/linux.rb +1 -1
  70. data/lib/ronin/support/binary/ctypes/os/macos.rb +1 -1
  71. data/lib/ronin/support/binary/ctypes/os/netbsd.rb +1 -1
  72. data/lib/ronin/support/binary/ctypes/os/openbsd.rb +1 -1
  73. data/lib/ronin/support/binary/ctypes/os/unix.rb +1 -1
  74. data/lib/ronin/support/binary/ctypes/os/windows.rb +1 -1
  75. data/lib/ronin/support/binary/ctypes/os.rb +1 -1
  76. data/lib/ronin/support/binary/ctypes/scalar_type.rb +1 -1
  77. data/lib/ronin/support/binary/ctypes/string_type.rb +1 -1
  78. data/lib/ronin/support/binary/ctypes/struct_object_type.rb +1 -1
  79. data/lib/ronin/support/binary/ctypes/struct_type.rb +1 -1
  80. data/lib/ronin/support/binary/ctypes/type.rb +1 -1
  81. data/lib/ronin/support/binary/ctypes/type_resolver.rb +1 -1
  82. data/lib/ronin/support/binary/ctypes/uint16_type.rb +1 -1
  83. data/lib/ronin/support/binary/ctypes/uint32_type.rb +1 -1
  84. data/lib/ronin/support/binary/ctypes/uint64_type.rb +1 -1
  85. data/lib/ronin/support/binary/ctypes/uint8_type.rb +1 -1
  86. data/lib/ronin/support/binary/ctypes/uint_type.rb +1 -1
  87. data/lib/ronin/support/binary/ctypes/unbounded_array_type.rb +1 -1
  88. data/lib/ronin/support/binary/ctypes/union_object_type.rb +1 -1
  89. data/lib/ronin/support/binary/ctypes/union_type.rb +1 -1
  90. data/lib/ronin/support/binary/ctypes.rb +1 -1
  91. data/lib/ronin/support/binary/memory.rb +1 -1
  92. data/lib/ronin/support/binary/packet.rb +1 -1
  93. data/lib/ronin/support/binary/stack.rb +1 -1
  94. data/lib/ronin/support/binary/stream/methods.rb +1 -1
  95. data/lib/ronin/support/binary/stream.rb +1 -1
  96. data/lib/ronin/support/binary/struct/member.rb +1 -1
  97. data/lib/ronin/support/binary/struct.rb +1 -1
  98. data/lib/ronin/support/binary/template.rb +1 -1
  99. data/lib/ronin/support/binary/{hexdump → unhexdump}/core_ext/file.rb +16 -4
  100. data/lib/ronin/support/binary/{hexdump → unhexdump}/core_ext/string.rb +16 -4
  101. data/lib/ronin/support/binary/{hexdump → unhexdump}/core_ext.rb +3 -3
  102. data/lib/ronin/support/binary/{hexdump → unhexdump}/parser.rb +2 -2
  103. data/lib/ronin/support/binary/unhexdump.rb +37 -0
  104. data/lib/ronin/support/binary/union.rb +1 -1
  105. data/lib/ronin/support/binary.rb +28 -2
  106. data/lib/ronin/support/cli/ansi.rb +1 -1
  107. data/lib/ronin/support/cli/io_shell/core_ext/io.rb +1 -1
  108. data/lib/ronin/support/cli/io_shell/core_ext.rb +1 -1
  109. data/lib/ronin/support/cli/io_shell.rb +1 -1
  110. data/lib/ronin/support/cli/printing.rb +1 -1
  111. data/lib/ronin/support/cli.rb +1 -1
  112. data/lib/ronin/support/compression/core_ext/file.rb +1 -1
  113. data/lib/ronin/support/compression/core_ext/string.rb +1 -1
  114. data/lib/ronin/support/compression/core_ext.rb +1 -1
  115. data/lib/ronin/support/compression/gzip/reader.rb +2 -2
  116. data/lib/ronin/support/compression/gzip/writer.rb +2 -2
  117. data/lib/ronin/support/compression/gzip.rb +1 -1
  118. data/lib/ronin/support/compression/mixin.rb +1 -1
  119. data/lib/ronin/support/compression/zlib.rb +56 -1
  120. data/lib/ronin/support/compression.rb +14 -3
  121. data/lib/ronin/support/core_ext/enumerable.rb +1 -1
  122. data/lib/ronin/support/core_ext/file.rb +1 -1
  123. data/lib/ronin/support/core_ext/integer.rb +1 -1
  124. data/lib/ronin/support/core_ext/ipaddr.rb +1 -1
  125. data/lib/ronin/support/core_ext/kernel.rb +1 -1
  126. data/lib/ronin/support/core_ext/string.rb +1 -1
  127. data/lib/ronin/support/core_ext.rb +1 -2
  128. data/lib/ronin/support/crypto/cert.rb +1 -1
  129. data/lib/ronin/support/crypto/cert_chain.rb +1 -1
  130. data/lib/ronin/support/crypto/cipher/aes.rb +1 -1
  131. data/lib/ronin/support/crypto/cipher/aes128.rb +1 -1
  132. data/lib/ronin/support/crypto/cipher/aes256.rb +1 -1
  133. data/lib/ronin/support/crypto/cipher.rb +1 -1
  134. data/lib/ronin/support/crypto/core_ext/file.rb +1 -1
  135. data/lib/ronin/support/crypto/core_ext/string.rb +1 -1
  136. data/lib/ronin/support/crypto/core_ext.rb +1 -1
  137. data/lib/ronin/support/crypto/hmac.rb +1 -1
  138. data/lib/ronin/support/crypto/key/dh.rb +1 -1
  139. data/lib/ronin/support/crypto/key/dsa.rb +1 -1
  140. data/lib/ronin/support/crypto/key/ec.rb +1 -1
  141. data/lib/ronin/support/crypto/key/methods.rb +1 -1
  142. data/lib/ronin/support/crypto/key/rsa.rb +1 -1
  143. data/lib/ronin/support/crypto/key.rb +1 -1
  144. data/lib/ronin/support/crypto/mixin.rb +1 -1
  145. data/lib/ronin/support/crypto/openssl.rb +1 -1
  146. data/lib/ronin/support/crypto.rb +41 -1
  147. data/lib/ronin/support/encoding/base16/core_ext/string.rb +1 -1
  148. data/lib/ronin/support/encoding/base16/core_ext.rb +1 -1
  149. data/lib/ronin/support/encoding/base16.rb +6 -1
  150. data/lib/ronin/support/encoding/base32/core_ext/string.rb +1 -1
  151. data/lib/ronin/support/encoding/base32/core_ext.rb +1 -1
  152. data/lib/ronin/support/encoding/base32.rb +8 -3
  153. data/lib/ronin/support/encoding/base64/core_ext/string.rb +1 -1
  154. data/lib/ronin/support/encoding/base64/core_ext.rb +1 -1
  155. data/lib/ronin/support/encoding/base64.rb +9 -2
  156. data/lib/ronin/support/encoding/c/core_ext/integer.rb +1 -1
  157. data/lib/ronin/support/encoding/c/core_ext/string.rb +1 -1
  158. data/lib/ronin/support/encoding/c/core_ext.rb +1 -1
  159. data/lib/ronin/support/encoding/c.rb +11 -1
  160. data/lib/ronin/support/encoding/core_ext/string.rb +1 -1
  161. data/lib/ronin/support/encoding/core_ext.rb +1 -1
  162. data/lib/ronin/support/encoding/hex/core_ext/integer.rb +1 -1
  163. data/lib/ronin/support/encoding/hex/core_ext/string.rb +1 -1
  164. data/lib/ronin/support/encoding/hex/core_ext.rb +1 -1
  165. data/lib/ronin/support/encoding/hex.rb +13 -1
  166. data/lib/ronin/support/encoding/html/core_ext/integer.rb +1 -1
  167. data/lib/ronin/support/encoding/html/core_ext/string.rb +1 -1
  168. data/lib/ronin/support/encoding/html/core_ext.rb +1 -1
  169. data/lib/ronin/support/encoding/html.rb +10 -1
  170. data/lib/ronin/support/encoding/http/core_ext/integer.rb +1 -1
  171. data/lib/ronin/support/encoding/http/core_ext/string.rb +1 -1
  172. data/lib/ronin/support/encoding/http/core_ext.rb +1 -1
  173. data/lib/ronin/support/encoding/http.rb +10 -1
  174. data/lib/ronin/support/encoding/js/core_ext/integer.rb +1 -1
  175. data/lib/ronin/support/encoding/js/core_ext/string.rb +1 -1
  176. data/lib/ronin/support/encoding/js/core_ext.rb +1 -1
  177. data/lib/ronin/support/encoding/js.rb +12 -1
  178. data/lib/ronin/support/encoding/powershell/core_ext/integer.rb +1 -1
  179. data/lib/ronin/support/encoding/powershell/core_ext/string.rb +1 -1
  180. data/lib/ronin/support/encoding/powershell/core_ext.rb +1 -1
  181. data/lib/ronin/support/encoding/powershell.rb +12 -1
  182. data/lib/ronin/support/encoding/punycode/core_ext/string.rb +1 -1
  183. data/lib/ronin/support/encoding/punycode/core_ext.rb +1 -1
  184. data/lib/ronin/support/encoding/punycode.rb +6 -1
  185. data/lib/ronin/support/encoding/quoted_printable/core_ext/string.rb +1 -1
  186. data/lib/ronin/support/encoding/quoted_printable/core_ext.rb +1 -1
  187. data/lib/ronin/support/encoding/quoted_printable.rb +6 -1
  188. data/lib/ronin/support/encoding/ruby/core_ext/string.rb +1 -1
  189. data/lib/ronin/support/encoding/ruby/core_ext.rb +1 -1
  190. data/lib/ronin/support/encoding/ruby.rb +10 -1
  191. data/lib/ronin/support/encoding/shell/core_ext/integer.rb +1 -1
  192. data/lib/ronin/support/encoding/shell/core_ext/string.rb +1 -1
  193. data/lib/ronin/support/encoding/shell/core_ext.rb +1 -1
  194. data/lib/ronin/support/encoding/shell.rb +12 -1
  195. data/lib/ronin/support/encoding/smtp.rb +1 -1
  196. data/lib/ronin/support/encoding/sql/core_ext/string.rb +1 -1
  197. data/lib/ronin/support/encoding/sql/core_ext.rb +1 -1
  198. data/lib/ronin/support/encoding/sql.rb +13 -1
  199. data/lib/ronin/support/encoding/uri/core_ext/integer.rb +1 -1
  200. data/lib/ronin/support/encoding/uri/core_ext/string.rb +1 -1
  201. data/lib/ronin/support/encoding/uri/core_ext.rb +1 -1
  202. data/lib/ronin/support/encoding/uri.rb +16 -1
  203. data/lib/ronin/support/encoding/uuencoding/core_ext/string.rb +1 -1
  204. data/lib/ronin/support/encoding/uuencoding/core_ext.rb +1 -1
  205. data/lib/ronin/support/encoding/uuencoding.rb +6 -1
  206. data/lib/ronin/support/encoding/xml/core_ext/integer.rb +1 -1
  207. data/lib/ronin/support/encoding/xml/core_ext/string.rb +1 -1
  208. data/lib/ronin/support/encoding/xml/core_ext.rb +1 -1
  209. data/lib/ronin/support/encoding/xml.rb +10 -1
  210. data/lib/ronin/support/encoding.rb +1 -1
  211. data/lib/ronin/support/home.rb +1 -1
  212. data/lib/ronin/support/mixin.rb +1 -1
  213. data/lib/ronin/support/network/asn/dns_record.rb +1 -1
  214. data/lib/ronin/support/network/asn/list.rb +1 -1
  215. data/lib/ronin/support/network/asn/record.rb +1 -1
  216. data/lib/ronin/support/network/asn/record_set.rb +1 -1
  217. data/lib/ronin/support/network/asn.rb +1 -1
  218. data/lib/ronin/support/network/core_ext.rb +1 -1
  219. data/lib/ronin/support/network/dns/idn.rb +1 -1
  220. data/lib/ronin/support/network/dns/mixin.rb +1 -1
  221. data/lib/ronin/support/network/dns/resolver.rb +1 -1
  222. data/lib/ronin/support/network/dns.rb +1 -1
  223. data/lib/ronin/support/network/domain.rb +1 -1
  224. data/lib/ronin/support/network/email_address.rb +1 -1
  225. data/lib/ronin/support/network/esmtp/mixin.rb +1 -1
  226. data/lib/ronin/support/network/exceptions.rb +1 -1
  227. data/lib/ronin/support/network/ftp/mixin.rb +1 -1
  228. data/lib/ronin/support/network/host.rb +1 -1
  229. data/lib/ronin/support/network/http/cookie.rb +1 -1
  230. data/lib/ronin/support/network/http/core_ext/uri/http.rb +1 -1
  231. data/lib/ronin/support/network/http/core_ext.rb +1 -1
  232. data/lib/ronin/support/network/http/mixin.rb +1 -1
  233. data/lib/ronin/support/network/http/request.rb +1 -1
  234. data/lib/ronin/support/network/http/set_cookie.rb +1 -1
  235. data/lib/ronin/support/network/http/user_agents.rb +1 -1
  236. data/lib/ronin/support/network/http.rb +6 -1
  237. data/lib/ronin/support/network/imap/mixin.rb +1 -1
  238. data/lib/ronin/support/network/ip/mixin.rb +1 -1
  239. data/lib/ronin/support/network/ip.rb +1 -1
  240. data/lib/ronin/support/network/ip_range/cidr.rb +1 -1
  241. data/lib/ronin/support/network/ip_range/glob.rb +1 -1
  242. data/lib/ronin/support/network/ip_range/range.rb +1 -1
  243. data/lib/ronin/support/network/ip_range.rb +1 -1
  244. data/lib/ronin/support/network/mixin.rb +1 -1
  245. data/lib/ronin/support/network/packet.rb +6 -1
  246. data/lib/ronin/support/network/pop3/mixin.rb +1 -1
  247. data/lib/ronin/support/network/proxy.rb +1 -1
  248. data/lib/ronin/support/network/public_suffix/list.rb +1 -1
  249. data/lib/ronin/support/network/public_suffix/suffix.rb +1 -1
  250. data/lib/ronin/support/network/public_suffix/suffix_set.rb +1 -1
  251. data/lib/ronin/support/network/public_suffix.rb +1 -1
  252. data/lib/ronin/support/network/smtp/email.rb +1 -1
  253. data/lib/ronin/support/network/smtp/mixin.rb +1 -1
  254. data/lib/ronin/support/network/smtp.rb +1 -1
  255. data/lib/ronin/support/network/ssl/local_cert.rb +1 -1
  256. data/lib/ronin/support/network/ssl/local_key.rb +1 -1
  257. data/lib/ronin/support/network/ssl/mixin.rb +1 -1
  258. data/lib/ronin/support/network/ssl/openssl.rb +1 -1
  259. data/lib/ronin/support/network/ssl/proxy.rb +1 -1
  260. data/lib/ronin/support/network/ssl.rb +1 -1
  261. data/lib/ronin/support/network/tcp/mixin.rb +1 -1
  262. data/lib/ronin/support/network/tcp/proxy.rb +1 -1
  263. data/lib/ronin/support/network/tcp.rb +1 -1
  264. data/lib/ronin/support/network/telnet/mixin.rb +1 -1
  265. data/lib/ronin/support/network/telnet.rb +1 -1
  266. data/lib/ronin/support/network/tld/list.rb +1 -1
  267. data/lib/ronin/support/network/tld.rb +1 -1
  268. data/lib/ronin/support/network/tls/mixin.rb +1 -1
  269. data/lib/ronin/support/network/tls/proxy.rb +1 -1
  270. data/lib/ronin/support/network/tls.rb +1 -1
  271. data/lib/ronin/support/network/udp/mixin.rb +1 -1
  272. data/lib/ronin/support/network/udp/proxy.rb +1 -1
  273. data/lib/ronin/support/network/udp.rb +1 -1
  274. data/lib/ronin/support/network/unix/mixin.rb +1 -1
  275. data/lib/ronin/support/network.rb +1 -1
  276. data/lib/ronin/support/path.rb +1 -1
  277. data/lib/ronin/support/text/core_ext/regexp.rb +1 -1
  278. data/lib/ronin/support/text/core_ext/string.rb +1 -1
  279. data/lib/ronin/support/text/core_ext.rb +1 -1
  280. data/lib/ronin/support/text/entropy/core_ext/string.rb +1 -1
  281. data/lib/ronin/support/text/entropy/core_ext.rb +1 -1
  282. data/lib/ronin/support/text/entropy.rb +1 -1
  283. data/lib/ronin/support/text/erb/mixin.rb +1 -1
  284. data/lib/ronin/support/text/erb.rb +1 -1
  285. data/lib/ronin/support/text/homoglyph/core_ext/string.rb +1 -1
  286. data/lib/ronin/support/text/homoglyph/core_ext.rb +1 -1
  287. data/lib/ronin/support/text/homoglyph/exceptions.rb +1 -1
  288. data/lib/ronin/support/text/homoglyph/table.rb +1 -1
  289. data/lib/ronin/support/text/homoglyph.rb +10 -1
  290. data/lib/ronin/support/text/mixin.rb +1 -1
  291. data/lib/ronin/support/text/patterns/credentials.rb +1 -1
  292. data/lib/ronin/support/text/patterns/crypto.rb +1 -1
  293. data/lib/ronin/support/text/patterns/file_system.rb +1 -1
  294. data/lib/ronin/support/text/patterns/language.rb +1 -1
  295. data/lib/ronin/support/text/patterns/network/public_suffix.rb +1 -1
  296. data/lib/ronin/support/text/patterns/network.rb +1 -1
  297. data/lib/ronin/support/text/patterns/numeric.rb +1 -1
  298. data/lib/ronin/support/text/patterns/pii.rb +1 -1
  299. data/lib/ronin/support/text/patterns/source_code.rb +1 -1
  300. data/lib/ronin/support/text/patterns.rb +1 -1
  301. data/lib/ronin/support/text/random/mixin.rb +1 -1
  302. data/lib/ronin/support/text/random.rb +1 -1
  303. data/lib/ronin/support/text/typo/core_ext/string.rb +1 -1
  304. data/lib/ronin/support/text/typo/core_ext.rb +1 -1
  305. data/lib/ronin/support/text/typo/exceptions.rb +1 -1
  306. data/lib/ronin/support/text/typo/generator.rb +1 -1
  307. data/lib/ronin/support/text/typo.rb +12 -1
  308. data/lib/ronin/support/text.rb +1 -1
  309. data/lib/ronin/support/version.rb +2 -2
  310. data/lib/ronin/support.rb +1 -1
  311. data/ronin-support.gemspec +2 -2
  312. metadata +13 -10
  313. data/lib/ronin/support/core_ext/resolv.rb +0 -55
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d96039ef4f773da9342b3d259bf962d9f55a905e14059d63b8ff6d083e48a48
4
- data.tar.gz: c5bf732c0dfa506ccf45f212e041c5341d7b01c95b2cdd9ea7bb0c8ac096d84e
3
+ metadata.gz: a415c3911b85e9e91bf65516137c0ad9efef4941206fb428150081d64f8ad5e9
4
+ data.tar.gz: fcb32969d49e88aa7b78c6293ad884aa9f5e6584178381b52a817cd6cf6c6e91
5
5
  SHA512:
6
- metadata.gz: 025746e89756222d9feb09d87a02bf76ccf82df466a5e605e63ae01676cb3f0feec9084f9b32b1f5ec7dc85f7310863bc739f07b6d86e3b3efe16f05d67cd653
7
- data.tar.gz: 2cba1d2ec2e473136650a41cbc5e6703c326278f206144df0afa7a3316bf445b26948e95c22261f725d8efcd01142895b229ce9e835afa52549eaea119abe1e5
6
+ metadata.gz: 3da437502dba45f3daa30d12f28c591a69aa9fe5eed3627407a7056cda319c405a63cd2869da59806b9e581e7397941b92340ab089a33fa1d141f073dfdefe52
7
+ data.tar.gz: bb9d8c9511c329a2dcb7e1c1dd0b51956b60c494c6e07668952b4ca3d59ae82f8e1e62f610ab0d147e8fe1866f58cfd0f4225748d2221d0a9a8a4eeadd5c89e6
@@ -21,6 +21,7 @@ jobs:
21
21
  uses: ruby/setup-ruby@v1
22
22
  with:
23
23
  ruby-version: ${{ matrix.ruby }}
24
+ bundler-cache: true
24
25
  - name: Install dependencies
25
26
  run: bundle install --jobs 4 --retry 3
26
27
  - name: Run tests
data/.yardopts CHANGED
@@ -1 +1 @@
1
- --markup markdown --title 'ronin-support Documentation' --protected
1
+ --markup markdown --title 'Ronin::Support Documentation' --protected
data/ChangeLog.md CHANGED
@@ -100,8 +100,8 @@
100
100
  * Added {Ronin::Support::Binary::Stack}.
101
101
  * Added {Ronin::Support::Binary::Stream}.
102
102
  * Added {Ronin::Support::Binary::Union}.
103
- * Added {Ronin::Support::Binary::Hexdump::Parser#unpack}.
104
- * Added {Ronin::Support::Binary::Hexdump::Parser#unhexdump}.
103
+ * Added {Ronin::Support::Binary::Unhexdump::Parser#unpack}.
104
+ * Added {Ronin::Support::Binary::Unhexdump::Parser#unhexdump}.
105
105
  * Added {Ronin::Support::CLI::ANSI}.
106
106
  * Added {Ronin::Support::CLI::Printing}.
107
107
  * Added {Ronin::Support::Compression}.
@@ -304,10 +304,12 @@
304
304
  * Added {Ronin::Support::Text::Random::Mixin}.
305
305
  * Added {Ronin::Support::Text::Typo}.
306
306
  * Added {Ronin::Support::Text::Typo::Generator}.
307
- * Renamed `ronin/support/formatting` to `ronin/support/encoding`.
308
307
  * Moved all `Ronin::` constants into the {Ronin::Support} namespace.
309
308
  * Moved `ronin/support/formatting/digest` core-ext methods into
310
309
  `ronin/support/crypto`.
310
+ * Renamed `ronin/support/formatting` to `ronin/support/encoding`.
311
+ * Renamed `Ronin::Support::Binary::Hexdump::Parser` to
312
+ {Ronin::Support::Binary::Unhexdump::Parser}.
311
313
  * Merged `ronin/support/network/network` into `ronin/support/network`.
312
314
  * Removed the `data_paths` gem dependency.
313
315
  * Removed the `parameters` gem dependency.
data/Gemfile CHANGED
@@ -25,6 +25,6 @@ group :development do
25
25
  gem 'yard-spellcheck', require: false
26
26
 
27
27
  gem 'dead_end', require: false
28
- gem 'sord', require: false
29
- gem 'stackprof', require: false
28
+ gem 'sord', require: false, platform: :mri
29
+ gem 'stackprof', require: false, platform: :mri
30
30
  end
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![CI](https://github.com/ronin-rb/ronin-support/actions/workflows/ruby.yml/badge.svg)](https://github.com/ronin-rb/ronin-support/actions/workflows/ruby.yml)
4
4
  [![Code Climate](https://codeclimate.com/github/ronin-rb/ronin-support.svg)](https://codeclimate.com/github/ronin-rb/ronin-support)
5
+ [![Gem Version](https://badge.fury.io/rb/ronin-support.svg)](https://badge.fury.io/rb/ronin-support)
5
6
 
6
7
  * [Source](https://github.com/ronin-rb/ronin-support)
7
8
  * [Issues](https://github.com/ronin-rb/ronin-support/issues)
@@ -13,84 +14,86 @@
13
14
  ## Description
14
15
 
15
16
  ronin-support is a support library for [Ronin][ronin-rb]. ronin-support provides
16
- many Core Extensions to Ruby's built-in classes as well as it's own
17
+ many Core Extensions to Ruby's built-in classes as well as its own
17
18
  Classes/Modules. ronin-support can be used by other Ruby libraries, tools, or
18
- scripts.
19
+ [scripts](#examples).
19
20
 
20
- It's like [pwntools] combined with [activesupport].
21
+ **tl;dr** It's like [pwntools] combined with [activesupport].
21
22
 
22
- [Ronin][ronin-rb] is a [Ruby] toolkit for security research and development.
23
+ ronin-support is part of the [ronin-rb] project, a [Ruby] toolkit for security
24
+ research and development.
23
25
 
24
26
  ## Features
25
27
 
26
28
  * Provides user-friendly APIs for:
27
- * Bit-flipping.
28
- * Hexdump/unhexdump data.
29
+ * [Bit-flipping][docs-binary-bit_flip]
30
+ * [Hexdump][hexdump] / [unhexdump][docs-unhexdump] data.
29
31
  * Packing/unpacking binary data:
30
- * C types
31
- * Buffers
32
- * IO streams
33
- * Stacks
34
- * Strings
35
- * Arrays
36
- * Structs
37
- * Unions
32
+ * [C types][docs-binary-ctypes]
33
+ * [Buffers][docs-binary-buffer]
34
+ * [IO streams][docs-binary-stream]
35
+ * [Stacks][docs-binary-stack]
36
+ * [Strings][docs-binary-cstring]
37
+ * [Arrays][docs-binary-array]
38
+ * [Structs][docs-binary-struct]
39
+ * [Unions][docs-binary-union]
38
40
  * Encoding data:
39
- * Base16
40
- * Base32
41
- * Base64
42
- * C strings
43
- * Hex
44
- * HTML
45
- * HTTP
46
- * JavaScript
47
- * PowerShell
48
- * Punycode
49
- * Quoted-printable
50
- * Ruby strings
51
- * Shell
52
- * SQL
53
- * URI
54
- * UUencoding
55
- * XML
56
- * Reading/writing compressed data:
57
- * Zlib
58
- * GZip
59
- * Reading/writing archive files:
60
- * Tar
61
- * Zip
62
- * Cryptography:
63
- * RSA
64
- * DSA
65
- * DH
66
- * EC
67
- * HMAC
68
- * Ciphers
69
- * X509 certificates
41
+ * [Base16][docs-encoding-base16]
42
+ * [Base32][docs-encoding-base32]
43
+ * [Base64][docs-encoding-base64]
44
+ * [C strings][docs-encoding-c]
45
+ * [Hex][docs-encoding-hex]
46
+ * [HTML][docs-encoding-html]
47
+ * [HTTP][docs-encoding-http]
48
+ * [JavaScript][docs-encoding-js]
49
+ * [PowerShell][docs-encoding-powershell]
50
+ * [Punycode][docs-encoding-punycode]
51
+ * [Quoted-printable][docs-encoding-quoted-printable]
52
+ * [Ruby strings][docs-encoding-ruby]
53
+ * [Shell][docs-encoding-shell]
54
+ * [SQL][docs-encoding-sql]
55
+ * [URI][docs-encoding-uri]
56
+ * [UUencoding][docs-encoding-uuencoding]
57
+ * [XML][docs-encoding-xml]
58
+ * [Reading/writing compressed data][docs-compression]:
59
+ * [Zlib][docs-compression-zlib]
60
+ * [Gzip][docs-compression-gzip]
61
+ * [Reading/writing archive files][docs-archive]:
62
+ * [Tar][docs-archive-tar]
63
+ * [Zip][docs-archive-zip]
64
+ * [Cryptography][docs-crypto]:
65
+ * [RSA][docs-crypto-key-rsa]
66
+ * [DSA][docs-crypto-key-dsa]
67
+ * [DH][docs-crypto-key-dh]
68
+ * [EC][docs-crypto-key-ec]
69
+ * [HMAC][docs-crypto-hmac]
70
+ * [Ciphers][docs-crypto-cipher]
71
+ * [X509 certificates][docs-crypto-cert]
70
72
  * Networking:
71
- * DNS
72
- * UNIX
73
- * TCP
74
- * UDP
75
- * SSL / TLS
76
- * FTP
77
- * SMTP / ESMTP
78
- * POP3
79
- * IMAP
80
- * Telnet
81
- * HTTP / HTTPS
82
- * Raw packets
83
- * ASNs
84
- * IP addresses
85
- * IP ranges
86
- * TLDs
87
- * Public Suffix List
88
- * Host names
89
- * Domain names
73
+ * [DNS][docs-network-dns]
74
+ * [UNIX][docs-network-unix-mixin]
75
+ * [TCP][docs-network-tcp-mixin]
76
+ * [UDP][docs-network-udp-mixin]
77
+ * [SSL][docs-network-ssl-mixin] / [TLS][docs-network-tls-mixin]
78
+ * [FTP][docs-network-ftp-mixin]
79
+ * [SMTP][docs-network-smtp-mixin] / [ESMTP][docs-network-esmtp-mixin]
80
+ * [POP3][docs-network-pop3-mixin]
81
+ * [IMAP][docs-network-imap-mixin]
82
+ * [Telnet][docs-network-telnet-mixin]
83
+ * [HTTP / HTTPS][docs-network-http]
84
+ * [Raw packets][docs-network-packet]
85
+ * [ASNs][docs-network-asn]
86
+ * [IP addresses][docs-network-ip]
87
+ * [IP ranges][docs-network-ip_range]
88
+ * [TLDs][docs-network-tld]
89
+ * [Public Suffix List][docs-network-public_suffix]
90
+ * [Host names][docs-network-host]
91
+ * [Domain names][docs-network-domain]
90
92
  * Working with text:
91
- * Generating typos.
92
- * Generating homoglyphs.
93
- * Regexs for matching/extracting common types of data.
93
+ * [Generating typos][docs-text-typo].
94
+ * [Generating homoglyphs][docs-text-homoglyp].
95
+ * [Regexs for matching/extracting common types of data][docs-text-patterns].
96
+ * Adds additional methods to many of [Ruby's core classes][docs-core-exts].
94
97
  * Small memory footprint (~46Kb).
95
98
  * Has 95% documentation coverage.
96
99
  * Has 93% test coverage.
@@ -123,7 +126,7 @@ please see the [API documentation](https://ronin-rb.dev/docs/ronin-support).
123
126
 
124
127
  ## Requirements
125
128
 
126
- * [Ruby] >= 1.9.1
129
+ * [Ruby] >= 3.0.0
127
130
  * [chars] ~> 0.3, >= 0.3.2
128
131
  * [hexdump] ~> 1.0
129
132
  * [combinatorics] ~> 0.4
@@ -155,7 +158,7 @@ gem 'ronin-support', '~> 0.5'
155
158
 
156
159
  ## License
157
160
 
158
- Copyright (c) 2006-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
161
+ Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
159
162
 
160
163
  ronin-support is free software: you can redistribute it and/or modify
161
164
  it under the terms of the GNU Lesser General Public License as published
@@ -181,3 +184,70 @@ along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
181
184
  [combinatorics]: https://github.com/postmodern/combinatorics#readme
182
185
  [addressable]: https://github.com/sporkmonger/addressable#readme
183
186
  [uri-query_params]: https://github.com/postmodern/uri-query_params#readme
187
+
188
+ [docs-binary-bit_flip]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Binary/BitFlip.html
189
+ [docs-unhexdump]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Binary/Unhexdump.html
190
+ [docs-binary-ctypes]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Binary/CTypes.html
191
+ [docs-binary-buffer]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Binary/Buffer.html
192
+ [docs-binary-stream]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Binary/Stream.html
193
+ [docs-binary-stack]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Binary/Stack.html
194
+ [docs-binary-cstring]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Binary/CString.html
195
+ [docs-binary-array]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Binary/Array.html
196
+ [docs-binary-struct]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Binary/Struct.html
197
+ [docs-binary-union]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Binary/Union.html
198
+ [docs-encoding-base16]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/Base16.html
199
+ [docs-encoding-base32]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/Base32.html
200
+ [docs-encoding-base64]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/Base64.html
201
+ [docs-encoding-c]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/C.html
202
+ [docs-encoding-hex]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/Hex.html
203
+ [docs-encoding-html]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/HTML.html
204
+ [docs-encoding-http]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/HTTP.html
205
+ [docs-encoding-js]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/JS.html
206
+ [docs-encoding-powershell]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/PowerShell.html
207
+ [docs-encoding-punycode]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/Punycode.html
208
+ [docs-encoding-quoted-printable]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/QuotedPrintable.html
209
+ [docs-encoding-ruby]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/Ruby.html
210
+ [docs-encoding-shell]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/Shell.html
211
+ [docs-encoding-sql]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/SQL.html
212
+ [docs-encoding-uri]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/URI.html
213
+ [docs-encoding-uuencoding]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/UUEncoding.html
214
+ [docs-encoding-xml]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Encoding/XML.html
215
+ [docs-compression]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Compression.html
216
+ [docs-compression-zlib]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Compression/Zlib.html
217
+ [docs-compression-gzip]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Compression/Gzip.html
218
+ [docs-archive]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Archive.html
219
+ [docs-archive-tar]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Archive/Tar.html
220
+ [docs-archive-zip]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Archive/Zip.html
221
+ [docs-crypto]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Crypto.html
222
+ [docs-crypto-key-rsa]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Crypto/Key/RSA.html
223
+ [docs-crypto-key-dsa]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Crypto/Key/DSA.html
224
+ [docs-crypto-key-dh]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Crypto/Key/DH.html
225
+ [docs-crypto-key-ec]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Crypto/Key/EC.html
226
+ [docs-crypto-hmac]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Crypto/Key/EC.html
227
+ [docs-crypto-cipher]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Crypto/Cipher.html
228
+ [docs-crypto-cert]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Crypto/Cert.html
229
+ [docs-network-dns]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/DNS.html
230
+ [docs-network-unix-mixin]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/UNIX/Mixin.html
231
+ [docs-network-tcp-mixin]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/TCP/Mixin.html
232
+ [docs-network-udp-mixin]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/UDP/Mixin.html
233
+ [docs-network-ssl-mixin]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/SSL/Mixin.html
234
+ [docs-network-tls-mixin]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/TLS/Mixin.html
235
+ [docs-network-ftp-mixin]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/FTP/Mixin.html
236
+ [docs-network-smtp-mixin]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/SMTP/Mixin.html
237
+ [docs-network-esmtp-mixin]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/ESMTP/Mixin.html
238
+ [docs-network-pop3-mixin]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/POP3/Mixin.html
239
+ [docs-network-imap-mixin]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/IMAP/Mixin.html
240
+ [docs-network-telnet-mixin]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/Telnet/Mixin.html
241
+ [docs-network-http]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/HTTP.html
242
+ [docs-network-packet]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Binary/Packet.html
243
+ [docs-network-asn]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/ASN.html
244
+ [docs-network-ip]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/IP.html
245
+ [docs-network-ip_range]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/IPRange.html
246
+ [docs-network-tld]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/TLD.html
247
+ [docs-network-public_suffix]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/PublicSuffix.html
248
+ [docs-network-host]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/Host.html
249
+ [docs-network-domain]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Network/Domain.html
250
+ [docs-text-typo]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Text/Typo.html
251
+ [docs-text-homoglyp]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Text/Homoglyph.html
252
+ [docs-text-patterns]: https://ronin-rb.dev/docs/ronin-support/Ronin/Support/Text/Patterns.html
253
+ [docs-core-exts]: https://ronin-rb.dev/docs/ronin-support/top-level-namespace.html
data/gemspec.yml CHANGED
@@ -2,13 +2,14 @@ name: ronin-support
2
2
  summary: A support library for ronin-rb.
3
3
  description: |
4
4
  ronin-support is a support library for ronin-rb. ronin-support provides
5
- many Core Extensions to Ruby's built-in classes as well as it's own
5
+ many Core Extensions to Ruby's built-in classes as well as its own
6
6
  Classes/Modules. ronin-support can be used by other Ruby libraries, tools, or
7
7
  scripts.
8
8
 
9
9
  It's like pwntools combined with activesupport.
10
10
 
11
- Ronin is a Ruby toolkit for security research and development.
11
+ ronin-support is part of the ronin-rb project, a Ruby toolkit for security
12
+ research and development.
12
13
 
13
14
  license: LGPL-3.0
14
15
  authors: Postmodern
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
- # Copyright (c) 2006-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
5
  # ronin-support is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU Lesser General Public License as published
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
- # Copyright (c) 2006-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
5
  # ronin-support is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU Lesser General Public License as published
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
- # Copyright (c) 2006-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
5
  # ronin-support is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU Lesser General Public License as published
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
- # Copyright (c) 2006-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
5
  # ronin-support is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU Lesser General Public License as published
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
- # Copyright (c) 2006-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
5
  # ronin-support is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU Lesser General Public License as published
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
- # Copyright (c) 2006-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
5
  # ronin-support is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU Lesser General Public License as published
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
- # Copyright (c) 2006-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
5
  # ronin-support is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU Lesser General Public License as published
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
- # Copyright (c) 2006-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
5
  # ronin-support is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU Lesser General Public License as published
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
- # Copyright (c) 2006-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
5
  # ronin-support is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU Lesser General Public License as published
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
- # Copyright (c) 2006-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
5
  # ronin-support is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU Lesser General Public License as published
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
- # Copyright (c) 2006-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
5
  # ronin-support is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU Lesser General Public License as published
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
- # Copyright (c) 2006-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
5
  # ronin-support is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU Lesser General Public License as published
@@ -22,6 +22,15 @@ require 'ronin/support/archive/core_ext'
22
22
 
23
23
  module Ronin
24
24
  module Support
25
+ #
26
+ # Methods for reading or writing archive files.
27
+ #
28
+ # ## Core-Ext Methods
29
+ #
30
+ # * {File.tar}
31
+ # * {File.untar}
32
+ # * {File.zip}
33
+ # * {File.unzip}
25
34
  #
26
35
  # @api public
27
36
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
- # Copyright (c) 2006-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
5
  # ronin-support is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU Lesser General Public License as published
@@ -0,0 +1,79 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
+ #
5
+ # ronin-support is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU Lesser General Public License as published
7
+ # by the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+ #
10
+ # ronin-support is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public License
16
+ # along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
17
+ #
18
+
19
+ require 'ronin/support/binary/bit_flip'
20
+
21
+ class Integer
22
+
23
+ #
24
+ # Enumerates over every bit flip in the integer.
25
+ #
26
+ # @param [Integer, Range(Integer)] bits
27
+ # The number of bits to flip or a range of bit indexes to flip.
28
+ #
29
+ # @yield [int]
30
+ # If a block is given, it will be passed each bit-flipped integer.
31
+ #
32
+ # @yieldparam [Integer] int
33
+ # The integer but with one of it's bits flipped.
34
+ #
35
+ # @return [Enumerator]
36
+ # If no block is given, an Enumerator object will be returned.
37
+ #
38
+ # @raise [ArgumentError]
39
+ # The given bits must be either a Range or an Integer.
40
+ #
41
+ # @example bit-flip all eight bits:
42
+ # 0x41.each_bit_flip(8) { |int| puts "%.8b" % int }
43
+ #
44
+ # @example bit-flip bits 8-16:
45
+ # 0xffff.each_bit_flip(8...16) { |int| puts "%.16b" % int }
46
+ #
47
+ # @api public
48
+ #
49
+ def each_bit_flip(bits,&block)
50
+ Ronin::Support::Binary::BitFlip::Integer.each_bit_flip(self,bits,&block)
51
+ end
52
+
53
+ #
54
+ # Returns every bit flip in the integer.
55
+ #
56
+ # @param [Integer, Range(Integer)] bits
57
+ # The number of bits to flip or a range of bit indexes to flip.
58
+ #
59
+ # @return [Array<Integer>]
60
+ # The bit-flipped integers.
61
+ #
62
+ # @raise [ArgumentError]
63
+ # The given bits must be either a Range or an Integer.
64
+ #
65
+ # @example bit-flip all eight bits:
66
+ # 0x41.bit_flips(8)
67
+ #
68
+ # @example bit-flip bits 8-16:
69
+ # 0xffff.bit_flips(8...16)
70
+ #
71
+ # @api public
72
+ #
73
+ def bit_flips(bits)
74
+ Ronin::Support::Binary::BitFlip::Integer.bit_flips(self,bits)
75
+ end
76
+
77
+ alias flip_bits bit_flips
78
+
79
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
+ #
5
+ # ronin-support is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU Lesser General Public License as published
7
+ # by the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+ #
10
+ # ronin-support is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public License
16
+ # along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
17
+ #
18
+
19
+ require 'ronin/support/binary/bit_flip'
20
+
21
+ class String
22
+
23
+ #
24
+ # Enumerates over every bit flip of every byte in the string.
25
+ #
26
+ # @yield [string]
27
+ # If a block is given, it will be passed each bit-flipped string.
28
+ #
29
+ # @yieldparam [String] string
30
+ # The String, but with one of it's bits flipped.
31
+ #
32
+ # @return [Enumerator]
33
+ # If no block is given, an Enumerator object will be returned.
34
+ #
35
+ # @example bit-flip all bytes in the String:
36
+ # "foo".each_bit_flip { |string| puts string }
37
+ #
38
+ # @api public
39
+ #
40
+ def each_bit_flip(&block)
41
+ Ronin::Support::Binary::BitFlip::String.each_bit_flip(self,&block)
42
+ end
43
+
44
+ #
45
+ # Returns every bit flip of every byte in the string.
46
+ #
47
+ # @return [Array<String>]
48
+ # The bit-flipped strings.
49
+ #
50
+ # @example bit-flip all bytes in the String:
51
+ # "foo".bit_flips
52
+ #
53
+ # @api public
54
+ #
55
+ def bit_flips
56
+ Ronin::Support::Binary::BitFlip::String.bit_flips(self)
57
+ end
58
+
59
+ alias flip_bits bit_flips
60
+
61
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
- # Copyright (c) 2006-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
5
  # ronin-support is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU Lesser General Public License as published
@@ -16,5 +16,5 @@
16
16
  # along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
17
17
  #
18
18
 
19
- require 'ronin/support/binary/hexdump/parser'
20
- require 'ronin/support/binary/hexdump/core_ext'
19
+ require 'ronin/support/binary/bit_flip/core_ext/integer'
20
+ require 'ronin/support/binary/bit_flip/core_ext/string'