Coder Social home page Coder Social logo

docker-netsniff-ng's Introduction

netsniff-ng

ย  Circle CI

Project: [https://github.com/jumanjihouse/docker-netsniff-ng] (https://github.com/jumanjihouse/docker-netsniff-ng)

Image: [https://registry.hub.docker.com/u/jumanjiman/netsniff-ng/] (https://registry.hub.docker.com/u/jumanjiman/netsniff-ng/)

About

This git repo puts netsniff-ng in a tiny Docker container with Alpine Linux userspace.

How-to

Build

docker build --rm -t jumanjiman/netsniff-ng .

Run

Add the following to ~/.bashrc:

netsniff-ng() {
  docker run --rm -it \
  --privileged \
  --net host \
  -v /tmp:/tmp \
  jumanjiman/netsniff-ng $*
}

Confirm your settings:

user@devenv:~$ source ~/.bashrc
user@devenv:~$ type netsniff-ng
netsniff-ng is a function
netsniff-ng ()
{
    docker run --rm -it --privileged --net host -v /tmp:/tmp jumanjiman/netsniff-ng $*
}

Run netsniff-ng with options, such as:

user@devenv:~$ netsniff-ng --in eth0 --out dump.pcap -s -T 0xa1b2c3d4 --b 0 tcp or udp
Running! Hang up with ^C!

           9  packets incoming (2 unread on exit)
          11  packets passed filter
           0  packets failed filter (out of space)
      0.0000% packet droprate
          13  sec, 104553 usec in total

Tag

It is useful to provide an informative tag similar to 0.5.8-r0-20150627T1306-git-56f20fd. The tag indicates:

  • version-release of netsniff-ng package in the image
  • date/time when the image is built
  • git hash of this repo at the time of build

Run these commands to tag the image:

version=$(awk '/^ENV VERSION/ {print $NF}' Dockerfile)
now=$(date +%Y%m%dT%H%M)
hash=$(git rev-parse HEAD | cut -b1-7)
tag="${version}-${now}-git-${hash}"
docker tag jumanjiman/netsniff-ng jumanjiman/netsniff-ng:${tag}

docker-netsniff-ng's People

Contributors

jumanjiman avatar

Watchers

 avatar  avatar  avatar

Forkers

lukeweber

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.