add support for 3.4.2

This commit is contained in:
anna 2023-03-12 22:18:25 +00:00
parent 7c7066e58e
commit 79814d17e1
No known key found for this signature in database
GPG Key ID: 020F70A824FB8206
1 changed files with 13 additions and 12 deletions

View File

@ -7,14 +7,17 @@ use std::error::Error;
use gdke_gui::{app::gdkeApp, Data};
use poggers::{external::process::ExProcess, traits::Mem};
const SIGS: [&str; 3] = ["48 8D 05 ? ? ? ? 41 8A 04 04","48 8D 05 ? ? ? ? 0F B6 ? 03","4C 8D 05 ? ? ? ? 0F 1F 40 00"];
const SIGS: [&str; 4] = [
"48 8D 3D ? ? ? ? 48 85 C0 74 3B",
"48 8D 05 ? ? ? ? 41 8A 04 04",
"48 8D 05 ? ? ? ? 0F B6 ? 03",
"4C 8D 05 ? ? ? ? 0F 1F 40 00",
];
fn main() {
let (stx, srx) = std::sync::mpsc::channel::<Data>();
let (ctx, crx) = std::sync::mpsc::channel::<Data>();
let jh = std::thread::spawn(move || {
loop {
if let Ok(x) = crx.try_recv() {
@ -22,7 +25,6 @@ fn main() {
Data::Pid(pid) => {
println!("Got pid: {}", pid);
match (|| -> Result<(), Box<dyn Error>> {
let proc = ExProcess::new_from_pid(pid)?;
let bm = proc.get_base_module()?;
for sig in SIGS.iter() {
@ -53,16 +55,15 @@ fn main() {
}
// Ok(())
Err("Failed to find key".into())
})() {
Ok(_) => {},
Ok(_) => {}
Err(er) => {
println!("Error: {}", er);
stx.send(Data::Failure(er.to_string())).unwrap();
continue;
}
}
},
}
_ => {}
}
}