Helping out a Friend - go-rest-wol

October 6, 2017

Was talking to a friend and he was i need of simple solution to wakeup computers remote over a rest call.

I want to learn some golang also, always read some epic stuff about it on the interwebz so why not!

So here it is, mostly 1 or 2 evenings work, and looking epic :-)

EPIC BOOTSTRAP POOWWAA!

Download the Release Binarys from https://github.com/daBONDi/go-rest-wol/releases or grab the code from the Repo https://github.com/daBONDi/go-rest-wol.

Copy it to a Folder and run it

It use the computer.csv in the same folder so you can append only the Computername on the Get Request

Example

name,mac,ip
Computer1,64-07-2D-BB-BB-BF,192.168.10.254:9
Computer2,2D-F2-3D-06-17-00,192.168.10.254:9
Computer3,FF-B3-95-62-1C-DD,192.168.10.254:9

HTTP Request

HTTP GET /api/computer/<Computername>
{
  "success":true,
  "message":"Succesfully Wakeup Computer Computer1 with Mac 64-07-2D-BB-BB-BF on Broadcast IP 192.168.10.254:9",
  "error":null
}

In addition it has some params for configuration

Commandline Argument Example Description
–port –port 80 Define the Port where the Webserver will listen to (Default: 8080)
–file –file comp.csv Path to the CSV File containing the Computerlist

Was an realy good execise thanks for the request! So i got meaning behind learning golang :-)

I realy like the languange its like the c++ i ever wanted :-) and the crossplattform stuff is an WIN!

And like always…

Improve, Automate, Rinse and Repeat!

comments powered by Disqus