Coder Social home page Coder Social logo

packet-analyzer's Introduction

PCAP Analyzer

A rust implementation of a packet capture analyzer, built from scratch without relying on external libraries. This program parses pcap files and prints information about the Ethernet header, IP header, and header data of TCP, UDP, or ICMP packets.

Getting Started

To run the PCAP analyzer program, you need to have Rust installed on your system.

Move into the folder:

$ cd packet_analyzer

Build using cargo

/packet_analyzer $ cargo build

Usage

To analyze a pcap file, run the following command:

$ cargo run -r [filename]

To filter the packets while analyzing, use the following command:

$ cargo run -r [filename] [filter]

Filters

The following filters are supported for packet analysis:

  • host
  • port
  • ip
  • icmp
  • tcp
  • udp
  • net

Example

To analyze the test.pcap file and filter the packets based on the TCP protocol, run the following command:

$ cargo run -r test.pcap tcp

This command will parse the test.pcap file, print information about the Ethernet header, IP header, and header data of TCP packets, and display only the filtered results based on the TCP protocol.

packet-analyzer's People

Contributors

karan9123 avatar

Stargazers

 avatar hirak0 avatar  avatar Josh Reuben avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.