__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
use crate::{
    daemon::{PollLoop, PromptUpdate},
    recording::PromptRecording,
    snapd_client::{PromptId, SnapdSocketClient, TypedPrompt},
    Result,
};
use tokio::sync::mpsc::unbounded_channel;
use tracing::info;

/// A simple echo loop that prints out the prompts seen when polling for notices
pub async fn run_echo_loop(
    snapd_client: &mut SnapdSocketClient,
    path: Option<String>,
) -> Result<()> {
    let (tx_prompts, mut rx_prompts) = unbounded_channel();
    let mut rec = PromptRecording::new(path);

    info!("starting poll loop");
    let mut poll_loop = PollLoop::new(snapd_client.clone(), tx_prompts);
    poll_loop.skip_outstanding_prompts();
    tokio::spawn(async move { poll_loop.run().await });

    loop {
        match rec.await_update_handling_ctrl_c(&mut rx_prompts).await {
            Some(PromptUpdate::Add(ep)) => match &ep.prompt {
                TypedPrompt::Home(p) if rec.is_prompt_for_writing_output(p) => {
                    return rec.allow_write(p.clone(), snapd_client).await;
                }

                p => {
                    println!("PROMPT: {}", serde_json::to_string(&ep)?);
                    rec.push_prompt(p);
                }
            },

            Some(PromptUpdate::Drop(PromptId(id))) => println!("PROMPT ACTIONED: {id}"),

            None => return Ok(()),
        }
    }
}

Filemanager

Name Type Size Permission Actions
echo_loop.rs File 1.33 KB 0644
log_level.rs File 1.16 KB 0644
mod.rs File 152 B 0644
scripted.rs File 7.78 KB 0644
Filemanager