Björn Benouarets 0cf7a0f82c feat(wake): Make authentication optional for wake command
- Remove required flag from username/password for wake command
- Add validation to ensure both auth params are provided together
- Update help text and examples to show optional authentication
- Update README documentation to reflect authentication requirements
2025-11-12 12:28:17 +01:00

Wake on LAN (WOL) CLI tool with authentication support

Description

This is a CLI tool that sends Wake on LAN (WOL) and Sleep packets to a target device. It supports authentication using a username and password.

Usage

The tool now uses subcommands for different operations:

Wake Command (sends WOL packet on port 9)

python index.py wake -m AA:BB:CC:DD:EE:FF -u admin -p secret

Sleep Command (sends sleep packet on port 9999)

python index.py sleep -m AA:BB:CC:DD:EE:FF -u admin -p secret

Commands

wake

Send a Wake-on-LAN packet to wake up a target device (default port: 9)

sleep

Send a Sleep packet to put a target device to sleep (default port: 9999)

Arguments

  • -m, --mac: MAC address of the target device (format: XX:XX:XX:XX:XX:XX or XX-XX-XX-XX-XX-XX) [required]
  • -u, --username: Username for authentication [optional for wake, required for sleep]
  • -p, --password: Password for authentication [optional for wake, required for sleep]
  • -H, --host: Target host address (default: 255.255.255.255 for broadcast)
  • -P, --port: Target UDP port (default: 9 for wake, 9999 for sleep)

Examples

Wake up a device without authentication:

python index.py wake -m AA:BB:CC:DD:EE:FF

Wake up a device with authentication:

python index.py wake -m AA:BB:CC:DD:EE:FF -u admin -p secret -H 192.168.1.100

Put a device to sleep (authentication required):

python index.py sleep -m AA:BB:CC:DD:EE:FF -u admin -p secret -H 192.168.1.100 -P 9999

Notes

  • The tool sends packets using the UDP protocol.
  • Authentication is optional for wake commands but required for sleep commands.
  • The tool supports broadcasting to the target host address.
  • The tool supports specifying the target UDP port.
  • Default ports differ between commands: wake uses port 9, sleep uses port 9999.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Description
No description provided
Readme 34 KiB
WolSOL CLI Latest
2025-11-11 20:00:10 +00:00
Languages
Python 100%