pub struct HuginnNet<'a> {
pub matcher: Option<SignatureMatcher<'a>>,
/* private fields */
}
Expand description
A multi-protocol passive fingerprinting library inspired by p0f
with JA4 TLS client fingerprinting.
The HuginnNet
struct acts as the core component of the library, handling TCP, HTTP, and TLS packet
analysis and matching signatures using a database of known fingerprints, plus JA4 TLS
client analysis following the official FoxIO specification.
Fields§
§matcher: Option<SignatureMatcher<'a>>
Implementations§
Source§impl<'a> HuginnNet<'a>
impl<'a> HuginnNet<'a>
Sourcepub fn new(
database: Option<&'a Database>,
cache_capacity: usize,
config: Option<AnalysisConfig>,
) -> Self
pub fn new( database: Option<&'a Database>, cache_capacity: usize, config: Option<AnalysisConfig>, ) -> Self
Creates a new instance of HuginnNet
.
§Parameters
database
: Optional reference to the database containing known TCP/Http signatures from p0f. Required if HTTP or TCP analysis is enabled. Not needed for TLS-only analysis.cache_capacity
: The maximum number of connections to maintain in the TTL cache.config
: Optional configuration specifying which protocols to analyze. If None, uses default (all enabled).
§Returns
A new HuginnNet
instance initialized with the given database, cache capacity, and configuration.
Sourcepub fn analyze_network(
&mut self,
interface_name: &str,
sender: Sender<FingerprintResult>,
) -> Result<(), Box<dyn Error>>
pub fn analyze_network( &mut self, interface_name: &str, sender: Sender<FingerprintResult>, ) -> Result<(), Box<dyn Error>>
Captures and analyzes packets on the specified network interface.
Sends FingerprintResult
through the provided channel.
§Parameters
interface_name
: The name of the network interface to analyze.sender
: ASender
to sendFingerprintResult
objects back to the caller.
§Panics
- If the network interface cannot be found or a channel cannot be created.
Sourcepub fn analyze_pcap(
&mut self,
pcap_path: &str,
sender: Sender<FingerprintResult>,
) -> Result<(), Box<dyn Error>>
pub fn analyze_pcap( &mut self, pcap_path: &str, sender: Sender<FingerprintResult>, ) -> Result<(), Box<dyn Error>>
Sourcepub fn analyze_tcp(&mut self, packet: &[u8]) -> FingerprintResult
pub fn analyze_tcp(&mut self, packet: &[u8]) -> FingerprintResult
Auto Trait Implementations§
impl<'a> !Freeze for HuginnNet<'a>
impl<'a> !RefUnwindSafe for HuginnNet<'a>
impl<'a> Send for HuginnNet<'a>
impl<'a> !Sync for HuginnNet<'a>
impl<'a> Unpin for HuginnNet<'a>
impl<'a> UnwindSafe for HuginnNet<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more