import socket import sys a=socket.socket(family=socket.AF_INET,type=socket.SOCK_DGRAM) a.bind(("135.125.239.22",0x2357)) c=int("0x"+sys.argv[1],base=16) print(c) while(True): b=a.recvfrom(1024) print(b[0]) print(b[1]) a.sendto(str.encode("HelloClient"),b[1]) f=open('/home/arch/ab/noos/','wb') f.write(b[0]) f.close()