Network traffic monitor with pcapy in python

前端 未结 1 1160
我寻月下人不归
我寻月下人不归 2020-12-21 07:02

I have written simple network traffic monitor to get transfer rate in B/s and/or total data transfer (in B). However when I test it by transferring a file with ftp (using To

相关标签:
1条回答
  • 2020-12-21 07:29

    Use a filter to capture only the useful tcp streams, ftp-data :

    port ftp-data
    

    I suggest also to capture in promiscous mode, only the packet headers ( you don't need the full data to know the length ):

    open_live( device, 4096, True, 100 )
    

    In your handler, it is correct to use header.getlen().

    0 讨论(0)
提交回复
热议问题