Coder Social home page Coder Social logo

pydivert2's Introduction

PyDivert2

This isn't some shiny new project. It's more like a slightly polished version of the original PyDivert because the original author seems to have other priorities right now and the project is not up-to-date with the current version of WinDivert.

You can visit the original PyDivert repository and learn about its usage here: https://github.com/ffalcinelli/pydivert

Also, there is great documentation available: https://pythonhosted.org/pydivert/

Changes

Not much has changed in terms of usage. It's mostly the same old stuff, but I added access to the socket and flow layers, plus their data structures like events, constants, some fixes over parameters etc.

The WinDivert binaries are also updated to their latest version (2.2.2).

If you run into any issues or want to contribute, feel free to do so. Apparently, some of the features are not working, and it might take some time for me to implement all of them.

Installation and example

You can either

  • Clone this repo and directly import from it.
  • Install the original repo with pip install pydivert then change the pydivert folder with the one in this repo.

Example.py

from pydivert import WinDivert
from pydivert.consts import *

with WinDivert("true", Layer.SOCKET, 0, Flag.SNIFF | Flag.RECV_ONLY) as w:
    w.set_param(Param.QUEUE_LEN, Constants.PARAM_QUEUE_LENGTH_MAX)
    w.set_param(Param.QUEUE_SIZE, Constants.PARAM_QUEUE_SIZE_MAX)
    w.set_param(Param.QUEUE_TIME, Constants.PARAM_QUEUE_TIME_MAX)

    for packet in w:
        print(packet)

pydivert2's People

Contributors

xshiraori avatar

Stargazers

 avatar  avatar  avatar  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.