Merge pull request #676 from Yamato-Security/674-bug-hayabusa-crashes-with-l-logon-summary

Fixed hayabusa crashes with  logon summary option
This commit is contained in:
DustInDark
2022-08-23 09:26:57 +09:00
committed by GitHub
3 changed files with 16 additions and 3 deletions

View File

@@ -13,7 +13,7 @@
**バグ修正:**
- XXX
- ログオン情報の要約オプションを追加した場合に、Hayabusaがクラッシュしていたのを修正した。 (#674) (@hitenkoku)
## v1.5.1 [2022/08/20]

View File

@@ -13,7 +13,7 @@
**Bug Fixes:**
- XXX
- Hayabusa would crash with `-L` option (logon summary option). (#674) (@hitenkoku)
## v1.5.1 [2022/08/20]

View File

@@ -110,8 +110,21 @@ impl EventStatistics {
if evtid.is_none() {
continue;
}
let idnum: i64 = if evtid.unwrap().is_number() {
evtid.unwrap().as_i64().unwrap()
} else {
evtid
.unwrap()
.as_str()
.unwrap()
.parse::<i64>()
.unwrap_or_default()
};
if !(idnum == 4624 || idnum == 4625) {
continue;
}
let username = utils::get_event_value("TargetUserName", &record.record);
let idnum = evtid.unwrap().as_i64().unwrap();
let countlist: [usize; 2] = [0, 0];
if idnum == 4624 {
let count: &mut [usize; 2] = self