Implement basic telnet shell for both orbic and tplink

This commit is contained in:
Markus Unterwaditzer
2025-11-16 18:39:13 +01:00
committed by Will Greenberg
parent 676cd3c862
commit 5fbc540fa0
6 changed files with 131 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ use tokio::time::sleep;
use crate::InstallTpLink;
use crate::output::println;
use crate::util::{telnet_send_command, telnet_send_file};
use crate::util::{interactive_shell, telnet_send_command, telnet_send_file};
type HttpProxyClient = hyper_util::client::legacy::Client<HttpConnector, Body>;
@@ -383,6 +383,12 @@ fn get_rayhunter_daemon(sdcard_path: &str) -> String {
)
}
/// Root the TP-Link device and open an interactive shell
pub async fn shell(admin_ip: &str) -> Result<(), Error> {
start_telnet(admin_ip).await?;
interactive_shell(admin_ip, 23, true).await
}
#[test]
fn test_get_rayhunter_daemon() {
let s = get_rayhunter_daemon("/media/card");