mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-30 01:19:58 -07:00
When there is a significant difference between the user's browser's time and the system time, a button appears in the web UI to fix the system time. This time will then be used to correct both data inside of PCAPs and any metadata. We don't actually set the system time to this value. Instead, rayhunter adjusts any timestamps it handles by an offset. That offset defaults to zero, and the user adjusts it by hitting the button in the web UI. The main reason for this is device portability. I haven't investigated whether it would actually be easy to set the real system time. It's possible that it works the same way across all devices.
42 lines
1.1 KiB
Rust
42 lines
1.1 KiB
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
/// Initialize logging with the given default level, suppressing noisy warnings
|
|
/// from hampi about undecoded ASN1 extensions. Respects `RUST_LOG` overrides.
|
|
pub fn init_logging(default_level: log::LevelFilter) {
|
|
env_logger::Builder::new()
|
|
.filter_level(default_level)
|
|
//Filter out a stupid massive amount of uneccessary warnings from hampi about undecoded extensions
|
|
.filter_module("asn1_codecs", log::LevelFilter::Error)
|
|
.parse_default_env()
|
|
.init();
|
|
}
|
|
|
|
pub mod analysis;
|
|
pub mod clock;
|
|
pub mod diag;
|
|
pub mod gsmtap;
|
|
pub mod gsmtap_parser;
|
|
pub mod hdlc;
|
|
pub mod log_codes;
|
|
pub mod pcap;
|
|
pub mod qmdl;
|
|
pub mod util;
|
|
|
|
// bin/check.rs may target windows and does not use this mod
|
|
#[cfg(target_family = "unix")]
|
|
pub mod diag_device;
|
|
|
|
// re-export telcom_parser, since we use its types in our API
|
|
pub use telcom_parser;
|
|
|
|
#[derive(PartialEq, Debug, Clone, Deserialize, Serialize)]
|
|
#[serde(rename_all = "lowercase")]
|
|
pub enum Device {
|
|
Orbic,
|
|
Tplink,
|
|
Tmobile,
|
|
Wingtech,
|
|
Pinephone,
|
|
Uz801,
|
|
}
|