https://github.com/byteshiva/tcp-data-flow-exploration
TCP Data Flow Exploration: Python server-client interaction with three-way handshake and data transfer phases.
https://github.com/byteshiva/tcp-data-flow-exploration
Last synced: 3 months ago
JSON representation
TCP Data Flow Exploration: Python server-client interaction with three-way handshake and data transfer phases.
- Host: GitHub
- URL: https://github.com/byteshiva/tcp-data-flow-exploration
- Owner: byteshiva
- License: apache-2.0
- Created: 2024-01-26T09:51:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-03T23:26:03.000Z (over 1 year ago)
- Last Synced: 2025-03-15T23:19:40.819Z (10 months ago)
- Language: Python
- Homepage: https://byteshiva.medium.com/decoding-the-network-python-server-client-interaction-with-wireshark-data-analysis-56c482db3920
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
```markdown
# TCP Data Flow Exploration
This repository provides a simple example of TCP data flow exploration using Python. It includes a basic TCP server (`server.py`) and client (`client.py`) script, showcasing the three-way handshake, data transfer, and connection closing phases.
```
## Setup
To explore the TCP data flow, follow these steps:
1. Clone the repository:
```bash
git clone https://github.com/byteshiva/tcp-data-flow-exploration.git
cd tcp-data-flow-exploration
```
2. Run the server in one terminal:
```bash
nix develop
python server.py
```
3. Open another terminal and run the client:
```bash
nix develop
python client.py
```
4. In a new terminal, open Wireshark to capture traffic on localhost:
```bash
nix develop
pkexec tcpdump -U -s0 -i lo -w - | wireshark -k -i -
```
In Wireshark, select the appropriate network interface (e.g., `lo` for localhost) and start capturing.
## Observing TCP Data Flow
Once the server and client are running, you can observe the TCP data flow in the Wireshark window. Explore the packets exchanged during the three-way handshake, data transfer, and connection closing phases.
Feel free to analyze and modify the scripts to further understand the intricacies of TCP communication.
Happy exploring!
```
This README.md provides instructions for setting up and exploring the TCP data flow using the provided Python scripts and Wireshark.