Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cn-kali-team committed Aug 16, 2024
1 parent 8b4220b commit ee1c1a0
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Change Log

<!-- next-header -->
## [2024.8.16] - 2024.8.16

### Fixes

- 修复nuclei字段`cve-id``null`时解析错误
- 修复`aarch64``arm`架构自更新下载目标文件错误

## [2024.8.15] - 2024.8.15

Expand Down
2 changes: 1 addition & 1 deletion engine/src/common/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl HttpRecord {
self.response = response.clone();
}
// 补充默认路径
let icon_sets = get_favicon_link(&response);
let icon_sets = get_favicon_link(response);
for link in icon_sets {
if self.skip.contains(&link) {
continue;
Expand Down
2 changes: 1 addition & 1 deletion engine/src/info/cse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl From<CSE> for Vec<Matcher> {
keyword.insert(vv);
}
"icon_hash" => {
hash.extend(vv.split(",").map(|x| x.to_string()));
hash.extend(vv.split(',').map(|x| x.to_string()));
}
_ => {}
}
Expand Down
13 changes: 13 additions & 0 deletions engine/src/serde_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ pub mod string_vec_serde {
let name: Vec<String> = value.split_terminator(',').map(String::from).collect();
Ok(name)
}
fn visit_none<E>(self) -> Result<Self::Value, E>
where
E: de::Error,
{
Ok(Vec::new())
}
fn visit_unit<E>(self) -> Result<Self::Value, E>
where
E: de::Error,
{
self.visit_none()
}
fn visit_seq<S>(self, visitor: S) -> Result<Self::Value, S::Error>
where
S: de::SeqAccess<'de>,
Expand All @@ -38,6 +50,7 @@ pub mod string_vec_serde {
d.deserialize_any(StringToVec(PhantomData))
}
}

#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq)]
#[serde(untagged)]
pub enum Value {
Expand Down
6 changes: 5 additions & 1 deletion observer_ward/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,12 @@ impl<'a> Helper<'a> {
let mut download_name = "observer_ward_amd64";
if cfg!(target_os = "windows") {
download_name = "observer_ward.exe";
} else if cfg!(target_os = "linux") {
} else if cfg!(target_os = "linux") && cfg!(target_arch = "x86_64") {
download_name = "observer_ward_amd64";
} else if cfg!(target_os = "linux") && cfg!(target_arch = "aarch64") {
download_name = "observer_ward_aarch64";
} else if cfg!(target_os = "linux") && cfg!(target_arch = "arm") {
download_name = "observer_ward_armv7";
} else if cfg!(target_os = "macos") && cfg!(target_arch = "x86_64") {
download_name = "observer_ward_darwin";
} else if cfg!(target_os = "macos") && cfg!(target_arch = "aarch64") {
Expand Down

0 comments on commit ee1c1a0

Please sign in to comment.