mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-05-01 01:49:58 -07:00
reset language for v3 after installation
This commit is contained in:
committed by
Cooper Quintin
parent
c285e2ca08
commit
92b825a9e3
@@ -61,6 +61,21 @@ pub async fn start_telnet(admin_ip: &str) -> Result<(), Error> {
|
||||
anyhow::bail!("Bad result code when trying to root device: {result}");
|
||||
}
|
||||
|
||||
// resetting the language is important because otherwise the tplink's admin interface is
|
||||
// unusuable.
|
||||
let V3RootResponse { result } = client
|
||||
.post(&qcmap_web_cgi_endpoint)
|
||||
.body(r#"{"module": "webServer", "action": 1, "language": "en"}"#)
|
||||
.send()
|
||||
.await?
|
||||
.error_for_status()?
|
||||
.json()
|
||||
.await?;
|
||||
|
||||
if result != 0 {
|
||||
anyhow::bail!("Bad result code when trying to reset the language: {result}");
|
||||
}
|
||||
|
||||
println!("Detected hardware revision v3");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user