ronin-rb / ronin

Ronin is a Free and Open Source Ruby Toolkit for Security Research and Development. Ronin also allows for the rapid development and distribution of code, exploits, payloads, etc, via 3rd-party git repositories.
https://ronin-rb.dev
GNU General Public License v3.0
693 stars 50 forks source link

Add `ronin compress` command #184

Open AI-Mozi opened 10 months ago

AI-Mozi commented 10 months ago

145

AI-Mozi commented 10 months ago

@postmodern 0.1 version of this PR. Let me know if at least my idea is correct. I'm not sure if I understand CommandKit correctly 😄

postmodern commented 10 months ago

@AI-Mozi what do you think about adding separate ronin archive and ronin unarchive commands? This might help with the bifurcating logic that uses Ronin::Support::Compression or Ronin::Support::Archive. ronin archive/ronin unarchive would probably inherit from FileProcessorCommand, while ronin compress/ronin uncompress would inherit from StringProcessorCommand that could accept both --string values and FILEs to allow specifying a raw zlib/gzip compressed string or a .gz file.

AI-Mozi commented 10 months ago

It's definitely a good idea!

AI-Mozi commented 6 months ago

@postmodern It's been a while. I did some changes. Let me know what do you thing and we can discuss that later :D

postmodern commented 6 months ago

@AI-Mozi I'm not sure about how the compression and uncompress commands should handle multiple files. Whether they should compress/uncompress each file individually, or concat the output into a single output file or print to stdout, etc. Unless we can come up with a useful and logical solution, maybe we should hold off on these commands.

I do however think there should be a single ronin archive command that has --list, --extract, --create options.