Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The PR to compare upstream & this fork #2

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7cef9d7
create a LogIterator struct
mrguiman Apr 29, 2024
ee26842
pub mod error
jrouaix Jun 26, 2023
ac6913f
pub chunks
jrouaix Jun 26, 2023
6cd3c37
some clones
jrouaix Jun 26, 2023
0abf491
disable clippy as a workaround
mrguiman Apr 12, 2024
b9db2ef
allow clippy in example file
mrguiman May 14, 2024
21819c6
avoid panics when parsee_formatter out of range index
jrouaix Aug 6, 2024
7aaead3
trying to correct a lot of potential index out of bound with help of …
jrouaix Aug 6, 2024
2c933e9
did a nasty thing for it to behave like before
jrouaix Aug 6, 2024
7043277
another `off by one`
jrouaix Aug 9, 2024
4def6ff
removed code (after compared from incoming branch)
jrouaix Oct 2, 2024
65c5a4b
smashed message.rs from mandiant into ours
jrouaix Oct 2, 2024
f241e72
toml deps workspace = true
jrouaix Nov 28, 2024
683b830
create a LogIterator struct
mrguiman Apr 29, 2024
358df54
pub mod error
jrouaix Jun 26, 2023
74e4f49
pub chunks
jrouaix Jun 26, 2023
dc82566
some clones
jrouaix Jun 26, 2023
3fed62f
disable clippy as a workaround
mrguiman Apr 12, 2024
ff49971
allow clippy in example file
mrguiman May 14, 2024
5713c81
avoid panics when parsee_formatter out of range index
jrouaix Aug 6, 2024
88a01f5
trying to correct a lot of potential index out of bound with help of …
jrouaix Aug 6, 2024
f633bad
did a nasty thing for it to behave like before
jrouaix Aug 6, 2024
a7e365b
another `off by one`
jrouaix Aug 9, 2024
8723597
smashed message.rs from mandiant into ours
jrouaix Oct 2, 2024
d2685e5
toml deps workspace = true
jrouaix Nov 28, 2024
f03339a
Merge branch 'shindan/main' into shindan/main_rebase
jrouaix Dec 16, 2024
f991b22
Merge pull request #3 from shindan-io/shindan/main_rebase
jrouaix Dec 16, 2024
135ab0d
removed changes from upstream
jrouaix Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ keywords = ["forensics", "macOS", "unifiedlog"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
nom = "7.1.3"
serde_json = "1.0.133"
serde = { version = "1.0.215", features = ["derive"] }
log = "0.4.22"
nom = { workspace = true }
serde_json = { workspace = true }
serde = { workspace = true }
log = { workspace = true }
lz4_flex = "0.11.3"
byteorder = "1.5.0"
plist = "1.7.0"
regex = "1.11.1"
base64 = "0.22.1"
chrono = "0.4.38"
plist = { workspace = true }
regex = { workspace = true }
base64 = { workspace = true }
chrono = { workspace = true }

[dev-dependencies]
simplelog = "0.12.2"
csv = "1.3.1"
chrono = "0.4.38"
criterion = "0.5.1"
anyhow = "1.0.94"
csv = { workspace = true }
chrono = { workspace = true }
criterion = { workspace = true }
anyhow = { workspace = true }

[[bench]]
name = "high_sierra_benchmark"
Expand Down
2 changes: 1 addition & 1 deletion benches/big_sur_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Unless required by applicable law or agreed to in writing, software distributed under the License
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.

#![allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
use std::path::PathBuf;

use criterion::{criterion_group, criterion_main, Criterion};
Expand Down
2 changes: 1 addition & 1 deletion benches/high_sierra_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Unless required by applicable law or agreed to in writing, software distributed under the License
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.

#![allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
use std::path::PathBuf;

use criterion::{criterion_group, criterion_main, Criterion};
Expand Down
2 changes: 1 addition & 1 deletion benches/monterey_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Unless required by applicable law or agreed to in writing, software distributed under the License
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.

#![allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
use std::path::PathBuf;

use criterion::{criterion_group, criterion_main, Criterion};
Expand Down
1 change: 1 addition & 0 deletions examples/unifiedlog_parser/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.

#![allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
use chrono::{SecondsFormat, TimeZone, Utc};
use log::LevelFilter;
use macos_unifiedlogs::dsc::SharedCacheStrings;
Expand Down
4 changes: 4 additions & 0 deletions src/decoders/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ pub(crate) fn check_objects(
let mut index = item_index;
const PRECISION_ITEM: u8 = 0x12;

if index >= message_values.len() {
return format!("Index out of bounds for FirehoseItemInfo Vec. Got adjusted index {}, Vec size is {}. This should not have happened", index, message_values.len());
}

// Increment index get the actual firehose item data
if item_type == PRECISION_ITEM {
index += 1;
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
clippy::checked_conversions,
clippy::unnecessary_cast
)]

#![allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
mod catalog;
mod chunks;
pub mod chunks;
mod chunkset;
mod decoders;
pub mod dsc;
mod error;
pub mod error;
mod header;
pub mod iterator;
mod message;
Expand Down
8 changes: 4 additions & 4 deletions src/timesync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ impl TimesyncBoot {
let expected_boot_signature = 0xbbb0;
if expected_boot_signature != timesync_signature {
error!(
"[macos-unifiedlogs] Incorrect Timesync boot header signature. Expected {}. Got: {}",
expected_boot_signature, timesync_signature
"[macos-unifiedlogs] Incorrect Timesync boot header signature. Expected {}. Got: {}",
expected_boot_signature, timesync_signature
);
return Err(nom::Err::Incomplete(Needed::Unknown));
}
Expand Down Expand Up @@ -130,8 +130,8 @@ impl TimesyncBoot {
let expected_record_signature = 0x207354;
if expected_record_signature != timesync_signature {
error!(
"[macos-unifiedlogs] Incorrect Timesync record header signature. Expected {}. Got: {}",
expected_record_signature, timesync_signature
"[macos-unifiedlogs] Incorrect Timesync record header signature. Expected {}. Got: {}",
expected_record_signature, timesync_signature
);
return Err(nom::Err::Incomplete(Needed::Unknown));
}
Expand Down
Loading