Giter Site home page Giter Site logo

cocowalla / snifter Goto Github PK

View Code? Open in Web Editor NEW
42.0 42.0 17.0 86 KB

Snifter is a raw socket IP packet capturing library/app for Windows, with a tiny CPU and memory footprint

License: Apache License 2.0

C# 99.67% Batchfile 0.15% Shell 0.18%
cross-platform packet-capture packet-sniffer raw-sockets sniffer sockets

snifter's People

Contributors

cameron-elliott avatar chigusa0w0 avatar cocowalla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

snifter's Issues

The handle is invalid.

$ ./Snifter.App.exe --interface=8 --filename=foo.txt
Unhandled Exception: System.IO.IOException: The handle is invalid.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
   at Snifter.App.Program.Main(String[] args)

Feature Request - time/packet count

Would it be at all possible to add a time to stop sniffing and packet count to stop sniffing option to this?

(Pretty much just the features from RawCap that I find pretty useful, especially when running the tool on a remote computer).

F:\Tools>RawCap.exe --help
NETRESEC RawCap version 0.1.5.0
http://www.netresec.com

Usage: RawCap.exe [OPTIONS] <interface_nr> <target_pcap_file>

OPTIONS:
 -f          Automatically flush data to file after each packet (no buffer)
 -c <count>  Stop sniffing after receiving <count> packets
 -s <sec>    Stop sniffing after <sec> seconds

https://www.netresec.com/?page=RawCap

Many thanks, love this tool!

Small issues PR?

Hey Coco, thanks for writing and sharing this, it rocks! You saved me from writing it, or trying to use rawcap.exe which requires a very difficult to install .Net Framework 3.5 package.
https://www.netresec.com/?page=RawCap

Anyway, during use I noticed a small nit or two, and I wonder if you are taking PR's?

To monitor both sides of a port 8096 conversation, I had to use: snifter -i 3 -x -24545 -y -24545

Cameron

[Bug] Regarding BitConverter and endianness

As we know, IP, TCP and UDP protocols are transmitted in big-endian order. But BitConverter Class is not always treat data as big-endian. Instead, they use machine endianness.

Quoted from MSDN:

Similarly, the order of bytes in the array and returned by the To_IntegerValue_ methods and the ToChar method depends on whether the computer architecture is little-endian or big-endian.

Although this is not matter in most scenarios where Snifter calls BitConverter. This will lead to problems on a little-endian machine using -x or -y filters (port filters) as port filters uses C# built-in equality operators.

Please use a big-endian converter instead of BitConverter in IPPacket.cs: L34-35. Note that IPAddress Class constructor assumes the Int64 value to be in network byte order, so that L29-30 should not be changed.

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.