From 760e27fb23ed3923764f997fab6e96abe4912d41 Mon Sep 17 00:00:00 2001 From: REinject Date: Mon, 2 Sep 2024 13:26:16 +0800 Subject: [PATCH] fix #18 --- Cargo.toml | 2 +- README.md | 1 + src/main.rs | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9e99c1c..6bcbdaf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wechat-dump-rs" -version = "1.0.7" +version = "1.0.8" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/README.md b/README.md index 580c3c6..d448937 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ key: b16aa99b8e8323f6bb0ebf2ef83ff88f2e47d86d913345933a7168d55aa7e362 - 3.9.8.9 - 3.9.8.15 - 3.9.10.19 +- 3.9.11.25 ## 如何手动寻找偏移 diff --git a/src/main.rs b/src/main.rs index f42d12b..907d892 100644 --- a/src/main.rs +++ b/src/main.rs @@ -84,7 +84,7 @@ fn get_pid_by_name(pname: &str) -> Vec { let mut result = vec![]; unsafe { for pp in tasklist::Tasklist::new() { - if pp.get_pname() == pname { + if pp.get_pname().trim_end_matches("\x00") == pname { result.push(pp.get_pid()); } } @@ -522,7 +522,7 @@ fn cli() -> clap::Command { use clap::{arg, value_parser, Command}; Command::new("wechat-dump-rs") - .version("1.0.7") + .version("1.0.8") .about("A wechat db dump tool") .author("REinject") .help_template("{name} ({version}) - {author}\n{about}\n{all-args}")