Giter VIP home page Giter VIP logo

wol's Introduction

WOL - Wake On Lan

With this smart C program you can send wol magic packets in the network
Version 0.01.07


Author: Timo Furrer [email protected]
License: GPL (See LICENSE)

What ?

With this smart C program you can send wol magic packets to one or more MAC addresses in the network.

How to use

Usage: ./wol.c [-r remoteaddr] [-f filename1, ...|mac1, ...]

You can either pass some MAC addresses or you can pass with the option f some filenames contains a MAC address on each line to wake up. With the option r you can specify the remote ip address. The default value is 255.255.255.255 for a broadcast call.

Some examples:

$ ./wol 00:0B:CD:39:2D:E9 0E:FD:FA:33:5D:A6
$ ./wol -r 192.168.1.36 00:0B:CD:39:2D:E9 0E:FD:FA:33:5D:A6
$ ./wol -f macaddresses
$ ./wol -r 192.168.1.36 -f macaddresses
$ ./wol -f macaddresses macaddresses2

MAC Address file syntax

The mac address syntax is very simple. It expects one mac address per line. Lines starting with # are comment lines and will be ignored.

Valid Syntax:

# Mac address of host 192.168.1.2
00:0B:CD:39:2D:E9

# Brothers mac address
00:05:FE:AB:3D:99

# Servers mac address
00:32:D5:35:EF:63

How to compile

To compile the wol source you just need the gcc. Compile it with the following command:

$ gcc -Wall -o wol src/wol.c

If you want to be able to execute this script from command line without to be in the right directory you can copy the compiled binary file to you /usr/bin/ directory. For this command you need root-privileges:

# cp wol /usr/bin

Now if this worked fine and your PATH environment variable contains /usr/bin/ you can execute this program from everywhere with:

$ wol 00:0B:CD:39:2D:E9

wol's People

Contributors

mbeccati avatar timofurrer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wol's Issues

IPv6-support

It would be great to also be able to use IPv6-addresses.

Segmentation fault

it seems not work in arm-linux.

./wol-arm 4c:cc:6a:42:48:4e
Segmentation fault

arm-linux-gnueabi-gcc -Wall -o wol-arm wol.c

Linux version 3.2.40 (root@build3) (gcc version 4.9.3 20150311 (prerelease) (crosstool-NG 1.20.0) ) #15101 Mon May 22 10:01:34 CST 2017

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.