
Code:
import socket
import struct
from noscrypto import Server,Client
# the public network interface
HOST = socket.gethostbyname(socket.gethostname())
print(HOST)
# create a raw socket and bind it to the public interface
s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
s.bind((HOST, 0))
# Include IP headers
s.setsockopt(socket.IPPROTO_IP, socket.IP_HDRINCL, 1)
# receive all packages
s.ioctl(socket.SIO_RCVALL, socket.RCVALL_ON)
n=1
while(n <= 400):
data = s.recvfrom(65565)
packet=data[0]
address= data[1]
header=struct.unpack('!BBHHHBBHBBBBBBBB', packet[:20])
try:
x = Client.WorldDecrypt(packet)
print(x)
except:
print("error")
n+=1
can someone please explain me how it is work. am i wrong? did i get it wrong?






