WilliamLLee / IPWatch

An IP packets capture and analysis program based on PyQT and Raw Socket.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IPWatch

An IP packets capture and analysis program based on PyQT and raw socket.

Environment setting

In this project, we capture the IP packets by the raw socket and use pyqt to realize the front-end visual interface, and code on Python environment.

  • Create a virtual environment by anaconda.
    conda create -n $env_name python=3.6 
    conda activate $env_name 
  • Install the PyQT5 and PyQT5-tools dependencies, and you can refer to this blog for more detail information.
    pip install PyQt5
    pip install PyQt5-tools
  • IP packet Capture by row socket mode, refer to this blog.

And if you want to capture the ip packet by PyPcap,you can install the PyPcap as follows.

  • Install the PyPCAP dependency, and for more installation details please refer to the PyPCAP Documentation. For Windows users, you should install PyPCAP from the source code, and you can refer to the github repository pypcap. And there is a more clear instruction manual.

Attention Please:

  • You may face the problem as follows when you install the PyPCAP as the tutorial. error This means you need to install Microsoft Visual C++ Building Tools. Installation Tutorial
  • Another Error: error: command 'G:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2, which may means you need to install windows xx SDK.
  • And if you meet the problem in follow picture, you can fix this error by refering to this.
    error1
  • Once you install PyPCAP successfully, you may get this response. success

Coding tutorials

Display

Final version interface display:

Final interface display

Functional support:

  • ip packets capture
  • packet capture duration time limit
  • filter the packets captured by device according to the source IP and distination IP
  • terminal the packet capture thread in advance
  • clear the packet list
  • analyse the packets by protocol and application service
  • display the details of IP packet

For more details, please refer to the report.pdf.

How to run

  • You can down load the released version project, and execute the main.exe file with administrator privileges.

  • python main.py

About

An IP packets capture and analysis program based on PyQT and Raw Socket.

License:MIT License


Languages

Language:Python 100.0%