May 2018
Beginner
230 pages
4h 49m
English
A network socket address contains an IP address and port number. In a very simple way, a socket is a way to talk to other computers. By means of a socket, a process can communicate with another process over the network.
In order to create a socket, use the socket.socket() that is available in the socket module. The general syntax of a socket function is as follows:
s = socket.socket (socket_family, socket_type, protocol=0)
Here is the description of the parameters:
socket_family: socket.AF_INET, PF_PACKET
AF_INET is the address family for IPv4. PF_PACKET operates at the device driver layer. The pcap library for Linux uses PF_PACKET. You will see more details on PF_PACKET in Chapter 3, Sniffing and Penetration Testing. These ...
Read now
Unlock full access