ciao a tutti ho un problema<br>
sto facendo un programmetto che avvia dei pc trmite wke on lan<br>
il protocollo da inviare è <br>
<b>s.sendto('\xff'*6+'\x14\xDA\xE9\x11\x15\xC2'*16,  ("255.255.255.255",9))</b><br>
cioè l'indirizzo broadcast seguito da 16 volte il macaddress e poi la netmask<br>
se scrivo in questa forma funziona perfettamente<br>
<br>
io leggo da un file testo che l'utente riempirà con il suo macaddress una stringa del tipo<br>
<b>macaddress = "14:DA:E9:11:15:C2"</b><br>
quindi eseguo le operazioni sul testo che ho letto:<br>
<b>macParts = macaddress.split(":")<br>
macaddressRightForm=""<br>
for part in macParts:<br>
         macaddressRightForm +='\x'+part.lower()</b><br>
<b>MagicPacket            = macaddressRightForm*16</b><br>
dopo di che vorrei costruire la stringa da inviare come<br>
<b>s.sendto('\xff'*6+MagicPacket, ("255.255.255.255",9))</b><br>
e così non ne vuol sapere di funzionare...<br>
è come se facesse delle conversioni implicite per il fatto che sono valori esadecimali<br>
potete aiutarmi???<br>
grazie<br>
Vittorio<br clear="all"><div><br></div><br>