Question
How do I go about converting this: (b'Ex00x00xc8xc5x00x00x00xffx11xebn x00x00xb6xffxffxffxffxc0x02x1a x00xb4xeexdfx00x00Uxaax00x00x00x00x00x00x00x00x00x00x00x9cx00x00x00x00{ip:10.0.0.182,gwId:10024200b4e62d51d062,active:2,ability:0,mode:0,encrypt:true,productKey:66mNaBqLdsYhX5lA,version:3.1}xd9xe4xcax16x00x00xaaU', ('10.0.0.182', 0)) To readable format? My code to get this is: import socket # the
How do I go about converting this:
(b'E\x00\x00\xc8\xc5\x00\x00\x00\xff\x11\xebn \x00\x00\xb6\xff\xff\xff\xff\xc0\x02\x1a \x00\xb4\xee\xdf\x00\x00U\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x00\x00\x00{"ip":"10.0.0.182","gwId":"10024200b4e62d51d062","active":2,"ability":0,"mode":0,"encrypt":true,"productKey":"66mNaBqLdsYhX5lA","version":"3.1"}\xd9\xe4\xca\x16\x00\x00\xaaU', ('10.0.0.182', 0))
To readable format? My code to get this is:
import socket
# the public network interface
HOST = socket.gethostbyname(socket.gethostname())
# 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)
# receive a package
print(s.recvfrom(65565))
# disabled promiscuous mode
s.ioctl(socket.SIO_RCVALL, socket.RCVALL_OFF)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started