mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-26 15:39:59 -07:00
Bump Rust edition to 2024
Includes new cargo fmt changes
This commit is contained in:
committed by
Markus Unterwaditzer
parent
25978a4da4
commit
5019f2a9d1
@@ -1,8 +1,8 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
use pycrate_rs::nas::NASMessage;
|
||||
use pycrate_rs::nas::emm::EMMMessage;
|
||||
use pycrate_rs::nas::generated::emm::emm_identity_request::IDTypeV;
|
||||
use pycrate_rs::nas::NASMessage;
|
||||
|
||||
use super::analyzer::{Analyzer, Event, EventType, Severity};
|
||||
use super::information_element::{InformationElement, LteInformationElement};
|
||||
|
||||
@@ -86,7 +86,7 @@ impl TryFrom<&GsmtapMessage> for InformationElement {
|
||||
_ => {
|
||||
return Err(InformationElementError::UnsupportedGsmtapType(
|
||||
gsmtap_msg.header.gsmtap_type,
|
||||
))
|
||||
));
|
||||
}
|
||||
};
|
||||
Ok(InformationElement::LTE(Box::new(lte)))
|
||||
|
||||
@@ -4,8 +4,8 @@ use super::analyzer::{Analyzer, Event, EventType, Severity};
|
||||
use super::information_element::{InformationElement, LteInformationElement};
|
||||
use telcom_parser::lte_rrc::{
|
||||
BCCH_DL_SCH_MessageType, BCCH_DL_SCH_MessageType_c1, CellReselectionPriority,
|
||||
SystemInformationBlockType7, SystemInformationCriticalExtensions,
|
||||
SystemInformation_r8_IEsSib_TypeAndInfo, SystemInformation_r8_IEsSib_TypeAndInfo_Entry,
|
||||
SystemInformationBlockType7, SystemInformationCriticalExtensions,
|
||||
};
|
||||
|
||||
/// Based on heuristic T7 from Shinjo Park's "Why We Cannot Win".
|
||||
@@ -41,7 +41,9 @@ impl Analyzer for LteSib6And7DowngradeAnalyzer {
|
||||
}
|
||||
|
||||
fn get_description(&self) -> Cow<str> {
|
||||
Cow::from("Tests for LTE cells broadcasting a SIB type 6 and 7 which include 2G/3G frequencies with higher priorities.")
|
||||
Cow::from(
|
||||
"Tests for LTE cells broadcasting a SIB type 6 and 7 which include 2G/3G frequencies with higher priorities.",
|
||||
)
|
||||
}
|
||||
|
||||
fn analyze_information_element(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::diag::{
|
||||
build_log_mask_request, DataType, DiagParsingError, LogConfigRequest, LogConfigResponse,
|
||||
Message, MessagesContainer, Request, RequestContainer, ResponsePayload, CRC_CCITT,
|
||||
CRC_CCITT, DataType, DiagParsingError, LogConfigRequest, LogConfigResponse, Message,
|
||||
MessagesContainer, Request, RequestContainer, ResponsePayload, build_log_mask_request,
|
||||
};
|
||||
use crate::hdlc::hdlc_encapsulate;
|
||||
use crate::log_codes;
|
||||
|
||||
@@ -47,7 +47,7 @@ fn log_to_gsmtap(value: LogBody) -> Result<Option<GsmtapMessage>, GsmtapParserEr
|
||||
return Err(GsmtapParserError::InvalidLteRrcOtaHeaderPduNum(
|
||||
ext_header_version,
|
||||
pdu,
|
||||
))
|
||||
));
|
||||
}
|
||||
},
|
||||
0x09 | 0x0c => match packet.get_pdu_num() {
|
||||
@@ -63,7 +63,7 @@ fn log_to_gsmtap(value: LogBody) -> Result<Option<GsmtapMessage>, GsmtapParserEr
|
||||
return Err(GsmtapParserError::InvalidLteRrcOtaHeaderPduNum(
|
||||
ext_header_version,
|
||||
pdu,
|
||||
))
|
||||
));
|
||||
}
|
||||
},
|
||||
0x0e..=0x10 => match packet.get_pdu_num() {
|
||||
@@ -79,7 +79,7 @@ fn log_to_gsmtap(value: LogBody) -> Result<Option<GsmtapMessage>, GsmtapParserEr
|
||||
return Err(GsmtapParserError::InvalidLteRrcOtaHeaderPduNum(
|
||||
ext_header_version,
|
||||
pdu,
|
||||
))
|
||||
));
|
||||
}
|
||||
},
|
||||
0x13 | 0x1a | 0x1b => match packet.get_pdu_num() {
|
||||
@@ -102,7 +102,7 @@ fn log_to_gsmtap(value: LogBody) -> Result<Option<GsmtapMessage>, GsmtapParserEr
|
||||
return Err(GsmtapParserError::InvalidLteRrcOtaHeaderPduNum(
|
||||
ext_header_version,
|
||||
pdu,
|
||||
))
|
||||
));
|
||||
}
|
||||
},
|
||||
0x14 | 0x18 | 0x19 => match packet.get_pdu_num() {
|
||||
@@ -125,13 +125,13 @@ fn log_to_gsmtap(value: LogBody) -> Result<Option<GsmtapMessage>, GsmtapParserEr
|
||||
return Err(GsmtapParserError::InvalidLteRrcOtaHeaderPduNum(
|
||||
ext_header_version,
|
||||
pdu,
|
||||
))
|
||||
));
|
||||
}
|
||||
},
|
||||
_ => {
|
||||
return Err(GsmtapParserError::InvalidLteRrcOtaExtHeaderVersion(
|
||||
ext_header_version,
|
||||
))
|
||||
));
|
||||
}
|
||||
};
|
||||
let mut header = GsmtapHeader::new(gsmtap_type);
|
||||
|
||||
@@ -5,10 +5,10 @@ use crate::gsmtap::GsmtapMessage;
|
||||
|
||||
use chrono::prelude::*;
|
||||
use deku::prelude::*;
|
||||
use pcap_file_tokio::pcapng::PcapNgWriter;
|
||||
use pcap_file_tokio::pcapng::blocks::enhanced_packet::EnhancedPacketBlock;
|
||||
use pcap_file_tokio::pcapng::blocks::interface_description::InterfaceDescriptionBlock;
|
||||
use pcap_file_tokio::pcapng::blocks::section_header::{SectionHeaderBlock, SectionHeaderOption};
|
||||
use pcap_file_tokio::pcapng::PcapNgWriter;
|
||||
use pcap_file_tokio::{Endianness, PcapError};
|
||||
use std::borrow::Cow;
|
||||
use thiserror::Error;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//! QmdlReader and QmdlWriter can read and write MessagesContainers to and from
|
||||
//! QMDL files.
|
||||
|
||||
use crate::diag::{DataType, HdlcEncapsulatedMessage, MessagesContainer, MESSAGE_TERMINATOR};
|
||||
use crate::diag::{DataType, HdlcEncapsulatedMessage, MESSAGE_TERMINATOR, MessagesContainer};
|
||||
|
||||
use futures::TryStream;
|
||||
use log::error;
|
||||
|
||||
Reference in New Issue
Block a user