Code Monkey home page Code Monkey logo

sniffer's Introduction

Sniff

Sniffer capture all packets, appeared in your network adapter. Also allows you to dump all packets to pcap format.

Unfortunately that sniffer cold be used on linux systems only :(

Usage

Before usage don't forget to add execution permission to file.

cmod +x ./sniff.py

After that you can use program as in the example:

sudo ./sniff.py [options]

Yes, you have to run program with root privileges, because only root able to listen all packets on your network adapter

Parameters and options

To dump your traffic in file use -d option with file path, where information sould be saved.

Filters

Filter is very simple and is able to filter only by one argument.

General syntax is SOMETHING == VALUE

First kind of filtering packets is by protocol used in it. To filter by proto just use constructions like this:

proto == IP

Allowed protocols are: Ethernet, IP, TCP, UDP, ARP. The list of allowed protocols will be extended soon.

Other kind of filtering is by some attributes of protocols. For example:

TCP.syn == True

IP.src == 127.0.0.1

First part is (protocol of packet).(attribute to be compared), and the second is some Value.

All the attributes of packets you may see here:

TCP

TCP.src_port
TCP.dst.port
TCP.syn (True, False)
TCP.ack (True, False)
TCP.push (True, False)
TCP.rst (True, False)
TCP.fin (True, False)
TCP.flags (int, 2, for example is equal to syn)
TCP.seq_num
TCP.ack_num
TCP.data_offset
TCP.urg_ptr
TCP.window_size \

UDP

UDP.src_port
UDP.dst_port \

IP

IP.qos
IP.id
IP.flags (int value)
IP.ttl
IP.proto (by integer value)
IP.src
IP.dst

Ethernet

Ethernet.src_mac
Ethernet.dst_mac
Ethernet.typ (type by integer value) \

ARP

ARP.h_type (hardware type by integer value)
ARP.p_type (protocol type by integer value)
ARP.h_len (length of hardware address)
ARP.p_len (length of protocol address)
ARP.op (operation by integer value)
ARP.h_src
ARP.p_src
ARP.h_dst
ARP.p_dst

sniffer's People

Contributors

lololozhkin avatar

Stargazers

 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.