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

Server override #120

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Server override #120

wants to merge 5 commits into from

Conversation

DeliciousBounty
Copy link
Collaborator

#119
Hey @GuyL99 ,
I resolved the server override in accordance with the opened issue.

Simply put, the "server override" property from the configuration file overrides every server in the OAS file. Secondly, the "—server" flag from the command line will override the configuration file's server.

In macro.rs.req.rs, I changed few things.

I did not make changes to all of the other tests; at this time, just one check has changes, and the rest are commented.

Cargo.toml Outdated
@@ -24,11 +24,12 @@ clap = { version = "4.0.29", features = ["derive"] }
const_format = "0.2.30"
serde = { version = "^1.0", features = ["derive"] }
serde_json = "^1.0"
cherrybomb-engine = "^0.1"
cherrybomb-engine = {path = "cherrybomb-engine"}
Copy link
Contributor

Choose a reason for hiding this comment

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

path

@@ -20,6 +20,37 @@ pub fn change_payload(orig: &Value, path: &[String], new_val: Value) -> Value {
}

impl<T: OAS + Serialize> ActiveScan<T> {
pub async fn check_ssl(&self, auth: &Authorization, serv: &Vec<Server>) -> CheckRetVal {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not in the description of the pull, this is a new check

for (k, v) in vars {
new_server_addr =
new_server_addr.replace(&format!("{{{k}}}"), v.default.as_str());
pub fn servers(
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to review it

@@ -93,109 +94,108 @@ impl_passive_checks![
];

impl_active_checks![
Copy link
Contributor

Choose a reason for hiding this comment

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

All of the checks seem commented out

@@ -74,6 +74,7 @@ async fn main() -> anyhow::Result<ExitCode> {
if !opt.no_telemetry {
telemetry::send(config.profile.clone(), config.verbosity.clone()).await?;
}
dbg!(&config.servers_override);
Copy link
Contributor

Choose a reason for hiding this comment

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

dbg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants