https://github.com/GramThanos/WakeOnLAN
A simple C program that sends a magic packet
https://github.com/GramThanos/WakeOnLAN
lan network packets wakeonlan
Last synced: 2 months ago
JSON representation
A simple C program that sends a magic packet
- Host: GitHub
- URL: https://github.com/GramThanos/WakeOnLAN
- Owner: GramThanos
- License: mit
- Created: 2017-10-24T15:07:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-23T17:06:53.000Z (6 months ago)
- Last Synced: 2024-12-23T18:20:22.968Z (6 months ago)
- Topics: lan, network, packets, wakeonlan
- Language: C
- Homepage:
- Size: 44.9 KB
- Stars: 109
- Watchers: 6
- Forks: 37
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/GramThanos/WakeOnLAN/releases/latest)
[](https://github.com/GramThanos/WakeOnLAN/releases/latest)


# WakeOnLAN
A simple C program that sends a magic packetYou can use this program to wake up a PC over the network. It sends the so-called magic packet to the network card of the target PC, instructing it to open the PC. [[Download]](https://github.com/GramThanos/WakeOnLAN/releases)
___
### Usage
```bash
./WakeOnLAN [ ][ ]
```
The first parameter is the mac address of the target (usually your network card's mac address).
The second parameter is optional and defines the broadcast address to send the packet.
The third parameter is optional and defines the source interface to send the packet from (not for Windows).Example
```bash
./WakeOnLAN 00:11:22:33:44:55 192.168.1.255 eth0
```
or, from a file with MAC addresses inside:
```bash
./WakeOnLAN -f macs-list.txt
```
where `macs-list.txt` has one MAC address per line:
```
00:1A:2B:3C:4D:5E
00:11:22:33:44:55
12:34:56:78:90:AB
.
.
.
```
___### Pre-compiled Binaries (Latest Release)
Platform | Links v0.3
------------ | -------------
Windows | [x86](https://github.com/GramThanos/WakeOnLAN/releases/download/v0.3/WakeOnLAN_v0.3_windows_x86.zip)
Linux | [x64](https://github.com/GramThanos/WakeOnLAN/releases/download/v0.3/WakeOnLAN_v0.3_linux_x64.zip)
Raspberry Pi | [arm](https://github.com/GramThanos/WakeOnLAN/releases/download/v0.3/WakeOnLAN_v0.3_raspberrypi.zip)___
### Compile from source
For Linux, you can compile the source using GCC
```bash
gcc WakeOnLAN.c -o WakeOnLAN
```For Windows, you can compile the source using MinGW
```bash
gcc WakeOnLAN.c -o WakeOnLAN.exe -lwsock32
```Or Open up a Visual Studio Native Tools Command Prompt, navigate to your source directory
```bash
cl WakeOnLAN.c -o WakeOnLAN.exe
```### Makefile
GNU make can be used in order to compile the sources on Linux/Mac:
```bash
make
```To clean everything:
```bash
make clean
```### CMake
CMake can also be used on Linux/Mac:
```bash
mkdir build
cd build
cmake ..
cmake --build .
```
___### Feedback
For any problems, you may [open an issue](https://github.com/GramThanos/WakeOnLAN/issues)
Also, you can [send me an email](mailto:[email protected])
___
### License
This project is under [The MIT license](https://opensource.org/licenses/MIT).
I do appreciate attribution.Copyright (c) 2024 Grammatopoulos Athanasios-Vasileios
___
[](https://github.com/GramThanos)
[](https://github.com/DinoDevs)