mac_string = '001485e55503' (This is the mac address of a computer.)
I am using wake on LAN python script to start computer remote.It uses
format like this ....
s.sendto('\xff' *6 + '\x00\x014\x85\ xe5\x55\x03'*16 , ('192.168.1.255 ',
80))
where '\x00\x14\x85\x e5\x55\x03' is the MAC address to be used.
What I do is break the string into 6 parts like this,
str01=mac_strin g[0:2]
str02=mac_strin g[2:4]
str03=mac_strin g[4:6]
str04=mac_strin g[6:8]
str05=mac_strin g[8:10]
str06=mac_strin g[10:12]
and if I use it like this
s.sendto('\xff' *6 + '\xstr01\xstr02 \xstr03\xstr04\ xstr05\xstr06'* 16,
('192.168.1.255 ', 80))
I get an error
I also tried like this
s.sendto('\xff' *6 + 'mac_string'*16 , ('192.168.1.255 ', 80))
Thiis also didnt work.
Since the MAC adddress are hexadecimal, how should I go about it here.
Please help, every help is appreciated. Thanks
I am using wake on LAN python script to start computer remote.It uses
format like this ....
s.sendto('\xff' *6 + '\x00\x014\x85\ xe5\x55\x03'*16 , ('192.168.1.255 ',
80))
where '\x00\x14\x85\x e5\x55\x03' is the MAC address to be used.
What I do is break the string into 6 parts like this,
str01=mac_strin g[0:2]
str02=mac_strin g[2:4]
str03=mac_strin g[4:6]
str04=mac_strin g[6:8]
str05=mac_strin g[8:10]
str06=mac_strin g[10:12]
and if I use it like this
s.sendto('\xff' *6 + '\xstr01\xstr02 \xstr03\xstr04\ xstr05\xstr06'* 16,
('192.168.1.255 ', 80))
I get an error
I also tried like this
s.sendto('\xff' *6 + 'mac_string'*16 , ('192.168.1.255 ', 80))
Thiis also didnt work.
Since the MAC adddress are hexadecimal, how should I go about it here.
Please help, every help is appreciated. Thanks
Comment