Skip to content

Conversation

@Rameen-Mahmood
Copy link
Member

@Rameen-Mahmood Rameen-Mahmood commented Jul 2, 2025

This PR adds support for extracting and enriching device metadata from PCAP files, including:

  • OUI resolution via eth.src.oui_resolved
  • User-Agent parsing from HTTP headers
  • DHCP hostname extraction from bootp.option.hostname

Changes

  • Added dhcp_hostname, user_agent, and eth.src.oui_resolved fields
  • Fallback to reverse DNS if no hostname mappings exist
  • Built-in IP → hostname caching to avoid redundant DNS lookups
  • Compatible with .pcap and .pcapng files, batch or single-file input

Note: While SSDP messages and mDNS PTR queries are visible in the traffic, XML-based device metadata (e.g., description.xml) cannot be fetched because the analysis is being performed offline—outside the local network. As a result, UPnP fields like model_name, manufacturer, etc., are not included.

Resolves #19

uses the working tshark in PATH rather than macOS app bundle version
- Included 'dhcp_hostname' in flow aggregation
- Changed docstring to reflect DHCP hostname integration
@Rameen-Mahmood Rameen-Mahmood added the enhancement New feature or request label Jul 2, 2025
@Rameen-Mahmood Rameen-Mahmood self-assigned this Jul 2, 2025
@Rameen-Mahmood Rameen-Mahmood merged commit c1de3be into main Sep 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend pcap-parser to Extract Device Metadata + Advertising Domain Flagging

2 participants