mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-05-22 07:44:46 -07:00
Implement basic telnet shell for both orbic and tplink
This commit is contained in:
committed by
Will Greenberg
parent
676cd3c862
commit
5fbc540fa0
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user