Question: N 5 . 2 . If an application needs to ensure the order of the packets, but UDP does not provide such a guarantee, does
N If an application needs to ensure the order of the packets, but UDP does not provide such a guarantee, does the
application have to use TCP Can it still use UDP?
N Why is UDP in general more suitable for realtime applications than TCP
N In the following code snippet, what does the IP address means?
udp socket.socketNET, socket.GRAM
udp.bind
N When spoofing a UDP packet using Scapy, why do we typically set the UDP checksum field to zero?
N An opensource program has the following behavior: after receiving a message on its
UDP port, it immediate sends a response to the client. Alice runs such a program on her
machine using port Bob also runs the program on his machine
using port Please write a simple Python program to trigger a UDP
ping pong between these two machines. Please describe how you can help this opensource
program fix this problem just describing your solution would be sufficient
N What type of services are good candidates for the UDP amplification attack?
N This problem is based on following TCP client program. To get responses from the server, the TCP client
program should register for a source port number, but in the program, this step seems to be missing. Without this port
number, how can the client program get responses? Which line of the code triggers the threeway handshake
protocol? There are two sendall calls in this client program, will each call trigger a separate TCP packet?
#binenv python
import socket
tcp socket.socket socketAFINET, socket.SOCKSTREAM
tcpconnect
tcpsendall bHello Server!
tcpsendall bHello Again!
tcpclose
N This problem is based on the following TCP server program. Does the program
get blocked when invoking listen until a connection comes? What is the
purpose of the accept Why does the accept call create a new socket?
Why cannot we use the same one that is used in the listen call?
#binenv python
import socket
tcp socket.socket socketAFINET, socket.SOCKSTREAM
tcpbind
tcplisten
print data
conn. sendall bGot the data!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
