INNER CODE UNIT · Rust

update

pumpbin/pumpbin · src/lib.rs:202

    pub fn update(&mut self, message: Message) -> iced::Task<Message> {
        match message {
            Message::ShellcodeSrcChanged(x) => self.shellcode_src = x,
            Message::ChooseShellcodeClicked => {
                let choose_shellcode = async {
                    AsyncFileDialog::new()
                        .set_directory(home_dir().unwrap_or(".".into()))
                        .set_title("Select shellcode file")
                        .pick_file()
                        .await
                        .map(|x| x.path().to_path_buf())
                };

                return Task::perform(
                    choose_shellcode,
                    match self.shellcode_save_type() {
                        ShellcodeSaveType::Local => Message::ChooseShellcodeDone,
                        ShellcodeSaveType::Remote => Message::EncryptShellcode,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…