How hercul3s/packet-sniffer works
Main components
• External Packet Source: Represented by the MMORPG.exe (or any network traffic generator) and the Windivert subsystem. The Windivert API (via the Windivert.dll and sys file) is an external dependency.
• Packet Capture / Interception: At the core is the PacketSniffer application (with main.cpp serving as the entry point) that calls the Windivert library to intercept packets.
• Compression/Decompression Subsystem: Under the "src/Compression" directory you have components like Crc32 and Lzf. These are modules for handling decompression tasks.
• Cryption / Decryption Subsystem: Under "src/Cryption" are modules like JvCryption and RijndaelCryption. These components are responsible for decrypting the intercepted data.
• Packet Operations: The "src/Packet Opr" directory includes classes like ByteBuffer, Packet, and related packet operations (PacketsOps, PacketsDefine, etc.) which suggest that this part of the system deals with parsing, buffering, and organizing the raw network data.
• Output Module: While not explicitly a separate directory, the README indicates that the processed packets can be output either to a console or a .Txt file.
Relationships and interactions
• Data Flow: Start with the MMORPG.exe generating network data which is intercepted by Windivert. The intercepted packets then flow into the PacketSniffer application (main.cpp).
• Modular Processing: The main processing logic should call on the Packet Operations module to organize the raw data, then hand over portions of the data to the Compression module (for decompression tasks using Crc32 and Lzf) and to the Cryption module (for decryption tasks via RijndaelCryption or JvCryption).
• Output: After processing, the resulting data flows into an output stage where it is either printed to the console or written to a text file.
Architectural patterns and design principles
• Modular design: The project is broken down into clear modules (compression, cryption, packet operations), reflecting separation of concerns.
• External dependency management: Clearly indicate the use of Windivert as an external library that provides packet interception services.
Specify technologies, frameworks, and libraries
• Windivert: Document the role of the Windivert.dll and sys file and how they interface with the PacketSniffer application.
• Rijndael/AES: Emphasize the cryptographic part which deals with 128-bit encryption.
• (Optional) If Lzf or Crc32 are known libraries, you might note them as specialized compression/decompression tools.
Detailed representation
• External dependencies (MMORPG.exe, Windivert.dll) on one side.
• Internal pipeline: Start from Packet Capture in the main application, proceed to Packet Parsing, then branch out to the two submodules (Compression and Cryption) and combine (if applicable) before sending to the output.
• To visually separate these components as much as possible even if they are logically closely tied. The clearer the separation, the easier it will be to understand the responsibilities of each module.