Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Ronin::Recon::Config#to_yaml method #161

Merged
merged 1 commit into from
Aug 31, 2024

Conversation

AI-Mozi
Copy link
Member

@AI-Mozi AI-Mozi commented Aug 19, 2024

Closing #159
I don't know how (and if it's even possible) to save workers with indents :/

Copy link
Member

@postmodern postmodern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, just minor suggestions.

I may have realized a problem with my Config::Workers#initialize implementation. Since it converts the input value to a Array, and we dump that Array value back out to the YAML file, this means the workers: will always end up being an explicit Array of worker IDs. This means that when we release a new version of ronin-recon, which adds new default built-in workers, users won't have those workers enabled by default because their config file will contain an explicit Array of worker IDs. I think I need to refactor Workers#initialize to preserve the original value so we load a Hash of worker_id: true|false and save the workers: back to a Hash. I'll need to think about this.

lib/ronin/recon/config.rb Outdated Show resolved Hide resolved
lib/ronin/recon/config.rb Outdated Show resolved Hide resolved
lib/ronin/recon/config.rb Outdated Show resolved Hide resolved
spec/config_spec.rb Show resolved Hide resolved
@postmodern postmodern added the feature New Feature label Aug 19, 2024
@postmodern postmodern added this to the 0.2.0 milestone Aug 19, 2024
@AI-Mozi AI-Mozi force-pushed the add_config_to_yaml_method branch 2 times, most recently from 00aa5aa to fc0b678 Compare August 26, 2024 12:48
Copy link
Member

@postmodern postmodern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed one last thing. Looks good though.

I will need to re-think how to properly store the list of workers as a Hash by default.

lib/ronin/recon/config.rb Outdated Show resolved Hide resolved
Copy link
Member

@postmodern postmodern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing @since tags on new methods.

lib/ronin/recon/config.rb Show resolved Hide resolved
lib/ronin/recon/config.rb Show resolved Hide resolved
@postmodern postmodern merged commit cf4cad3 into ronin-rb:0.2.0 Aug 31, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants