This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
class Waker(): | |
def send_magic_packet(self, macAddress: str, ip_address: str, port: int = 9) -> None: | |
macAddress = self.format_macAddress(macAddress) | |
temp = "" | |
for i in range(16): | |
temp += macAddress | |
packet = bytes.fromhex("FFFFFFFFFFFF" + temp) |