Git Product home page Git Product logo

pcap's Introduction

编译

编译pcap
make pcap

运行demo程序

默认使用轮询模式

./pcap ./data/1.pcap
./pcap ./data/1.pcap "(&(sport>2000)(&(!(sport=2140))(proto=udp)))"
./pcap ./data/1.pcap "(&(sip=200.*)(&(!(sport=2140))(proto=tcp)))"

第二个参数是pcap文件所在路径 第三个参数是pcap过滤的表达式 注意表达式用()包裹,里面可以包含多个条件 示列:筛选出源端口大于2000,且源端口不等于2140,且协议的udp的表项,支持字段sport, dport, sip, dsip, proto等,具体看demo程序里注册了多少相关的比较字段吧

测试程序

make test

清空编译产物

make clean

pcap's People

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.