Hi all, I am a newbie in Python Programming, I am trying to send this hex code " ABBA05B80000AF11"
to reset the Machine through Tcp/ IP Protocol
Do anyone know what I have did wrong , as i was unable to " reset" the machine after i send the Hex Code ,below is my code.
Please Refer.
to reset the Machine through Tcp/ IP Protocol
Do anyone know what I have did wrong , as i was unable to " reset" the machine after i send the Hex Code ,below is my code.
Please Refer.
import socket
import sys
import struct
import time
import binascii
host = '192.168.1.40'
port = 800
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
inputHex = binascii.unhexlify("ABBA05B80000AF11")
try:
#remote_ip = socket.gethostbyname(host)
s.connect((host, port))
except socket.gaierror:
print('Hostname could not be resolved Exiting')
sys.exit()
print('Socket connected to ' + host + ' on ip ')
try:
while True:
s.send(inputHex)
print('Message sent Successfully')
time.sleep(1)
print('sending')
except socket.error:
print('send fail')
sys.exit()

