How to use the wakeonlan.wol.BROADCAST_IP function in wakeonlan

To help you get started, we’ve selected a few wakeonlan examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ywangd / stash / bin / wol.py View on Github external
parser = argparse.ArgumentParser(
    description="""Wake one or more computers using the wake on lan protocol.
Note that this requires suitable configuration of the target system, and only
works within a network segment (i.e. not across routers or VPN)."""
)
parser.add_argument(
    'macs',
    metavar='mac addresses',
    nargs='+',
    help='The mac addresses or of the computers you are trying to wake, for instance 40:16:7e:ae:af:43'
)
parser.add_argument(
    '-i',
    metavar='ip',
    default=wol.BROADCAST_IP,
    help='The ip address of the host to send the magic packet to. (default {})'.format(wol.BROADCAST_IP)
)
parser.add_argument(
    '-p',
    metavar='port',
    default=wol.DEFAULT_PORT,
    help='The port of the host to send the magic packet to (default 9)'
)
args = parser.parse_args()
wol.send_magic_packet(*args.macs, ip_address=args.i, port=args.p)
github ywangd / stash / bin / wol.py View on Github external
parser = argparse.ArgumentParser(
    description="""Wake one or more computers using the wake on lan protocol.
Note that this requires suitable configuration of the target system, and only
works within a network segment (i.e. not across routers or VPN)."""
)
parser.add_argument(
    'macs',
    metavar='mac addresses',
    nargs='+',
    help='The mac addresses or of the computers you are trying to wake, for instance 40:16:7e:ae:af:43'
)
parser.add_argument(
    '-i',
    metavar='ip',
    default=wol.BROADCAST_IP,
    help='The ip address of the host to send the magic packet to. (default {})'.format(wol.BROADCAST_IP)
)
parser.add_argument(
    '-p',
    metavar='port',
    default=wol.DEFAULT_PORT,
    help='The port of the host to send the magic packet to (default 9)'
)
args = parser.parse_args()
wol.send_magic_packet(*args.macs, ip_address=args.i, port=args.p)

wakeonlan

A small python module for wake on lan.

MIT
Latest version published 1 year ago

Package Health Score

56 / 100
Full package analysis