Welcome to my repository showcasing projects related to Socket Programming! In this collection, you'll find two main projects that demonstrate how to work with sockets for various networking tasks.
This repository includes examples of network communication through socket programming, where I explore both basic and advanced networking concepts:
- Packet Sniffer: Using Python to capture and analyze network packets.
- Client-Server Chat Application: Using C to create a basic chat application that communicates over a network using sockets.
- Developed a packet sniffer using Python and the
socketlibrary to capture and analyze network packets. - The program listens on a specific interface, intercepting incoming and outgoing packets.
- Analyzed packet data to extract useful information like source/destination IP, port numbers, and protocol.
- This project helps in understanding how packet-level communication works and how data is transmitted across networks.
- Captures packets on a given network interface.
- Displays basic information (source IP, destination IP, ports, etc.).
- Written in Python using the
socketandstructlibraries.
- Clone the repository:
git clone https://github.com/aidhas23/socket-programming-projects.git
- Navigate to the project folder and run the script:
cd simple-packet-sniffer python packet_sniffer.py
- Developed a chat program using C that implements a client-server relationship through TCP sockets.
- The client connects to a server, sends messages, and receives responses.
- The server listens for incoming client connections, handles multiple clients, and facilitates message exchange.
- This project demonstrates the core concepts of socket-based communication, handling incoming connections, and maintaining persistent connections for real-time communication.
- TCP-based communication between client and server.
- Simple user interface for sending and receiving messages.
- Supports real-time, bidirectional messaging.
- Written in C using the
socketandstdiolibraries.
- Clone the repository:
git clone https://github.com/aidhas23/socket-programming.git
- Navigate to the project folder and compile the code:
cd Chat Programm Client Server gcc server.c -o server gcc client.c -o client - Run the server in one terminal window:
./server
- Run the client in another terminal window:
./client
- Python: For the packet sniffer project using Python's
socketlibrary. - C: For the chat program using C's
socketlibrary. - Wireshark: Optionally used to analyze the network traffic captured by the packet sniffer.
- Linux: Recommended OS for running these projects, especially the packet sniffer (requires root permissions).