This is about socket connection and packet sniffing on the network. PL is Python, and the driving test was performed through Linux.
JEONGMUK LIM
Department of Computer Science
Chungbuk National University
- Conditions
- Output of Ethernet and IP headers
- Using while statement to write multiple times
- Read the part that contains the length of the IP header first, then cut the IP header part based on the value and parse it.
- The IP header option does not need to be considered.
- Write only when Ethernet Type is IPv4
● packet_sniffer.py
○ -i : NIC Name
- Conditions
- Output of Ethernet and IP headers
- Using while statement to write multiple times
- Read the part that contains the length of the IP header first, then cut the IP header part based on the value and parse it.
- The IP header option does not need to be considered.
- Write only when Ethernet Type is IPv4
● server.py
○ -p: port number for connection
● client.py
○ -p: port number for connection
○ -i: host address
$ python3 packet_sniffer.py -i lo
$ python server.py -p 8888
$ python client.py -i 127.0.0.1 -p 8888