Added check if retcode was 201 when getting the login_response, and giving an error that says it's the pw

This commit is contained in:
BeigeBox
2026-02-07 13:35:25 -08:00
committed by Markus Unterwaditzer
parent ed2781a4be
commit 2d3824072d

View File

@@ -97,7 +97,10 @@ async fn login_and_exploit(admin_ip: &str, username: &str, password: &str) -> Re
.context("Failed to parse login response")?;
if login_result.retcode != 0 {
bail!("Login failed with retcode: {}", login_result.retcode);
match login_result.retcode {
201 => bail!("Login failed: incorrect password"),
code => bail!("Login failed with retcode: {}", code),
}
}
// Step 4: Exploit using authenticated session