Day 9/90: Network Scanning with Sockets -- Python Security 90 Day Python Security Scripting Challenge Today I dug into Python's socket module to build network scanning tools from scratch. Understanding socket-level scanning is essential before relying on wrapper tools. Threaded Port Scanner with Service Mapping A practical scanner needs speed and context. This version scans ports in parallel and maps open ports to known service names. import socket import concurrent.futures COMMON_SERVICES = { 21 : " FTP " , 22 : " SSH " , 25 : " SMTP " , 53 : " DNS " , 80 : " HTTP " , 110 : " POP3 " , 143 : " IMAP " , 443 : " HTTPS " , 993 : " IMAPS " , 995 : " POP3S " , 3306 : " MySQL " , 5432 : " PostgreSQL " , 6379 : " Redis " , 8080 : " HTTP-Alt " , } def probe_port ( host , port , timeout = 1.5 ): """ Probe a single port and return service info. """ s = socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) s . settimeout ( timeout ) try : if s . connect_ex (( host , port )) == 0 : svc = COMMON_SERVICES .…