mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 14:36:16 +01:00
Implement process control
This commit is contained in:
33
tools/src/dvt_packet_parser.rs
Normal file
33
tools/src/dvt_packet_parser.rs
Normal file
@@ -0,0 +1,33 @@
|
||||
// Jackson Coxson
|
||||
|
||||
use idevice::dvt::message::Message;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let file = std::env::args().nth(1).expect("No file passed");
|
||||
let mut bytes = tokio::fs::File::open(file).await.unwrap();
|
||||
|
||||
let message = Message::from_reader(&mut bytes).await.unwrap();
|
||||
println!("{message:#?}");
|
||||
|
||||
println!("----- AUX -----");
|
||||
if let Some(aux) = message.aux {
|
||||
for v in aux.values {
|
||||
match v {
|
||||
idevice::dvt::message::AuxValue::Array(a) => {
|
||||
match ns_keyed_archive::decode::from_bytes(&a) {
|
||||
Ok(a) => {
|
||||
println!("{a:#?}");
|
||||
}
|
||||
Err(_) => {
|
||||
println!("{a:?}");
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
println!("{v:?}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user