Wopy wake on Lan/Wan

Wopy

Wopy is yet another Wake on LAN/WAN tool, that allow a computer to be turned on or woken up remotely
by a network message sent usually on another computer on the network.

What is WOL and WOW ?
Wake on LAN, or WOL, is the ability to send a signal over a local area network (LAN) to power up a PC.
Wake on WAN or WOW, is the ability to send that same signal over a wide area network (WAN), such as the Internet,
to trigger power-up of a PC on a private LAN.

The frame sent to the target PC carries a special datagram, called a “magic packet”.
The Magic Packet is a packet containing the hardware (or MAC) address of a specific network card repeated 16 times,
NICs that are WOL capable & active, upon receiving the Magic Packet, will send a power-on signal to the motherboard,
activating the power supply and booting the system.

How a Magic Packet Frame looks like:
_________________________________________
| 0xff | 0xff | 0xff | 0xff | 0xff | 0xff |
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
|MAC[0]|MAC[1]|MAC[2]|MAC[3]|MAC[4]|MAC[5]|
—————————————–
optional SecureON ™ password:
_________________________________________
|PASS0 |PASS1 |PASS2 |PASS3 |PASS4 |PASS5 |
—————————————–

The port 9 is used by default to send packet.
Check that your firewall routes broadcast messages sent on this port to your network to ensure successful execution.

Wopy wake on Lan/Wan

Pymedia on debian lenny

Pymedia is a Python module for wav, mp3, ogg, avi, divx, dvd, cdda etc files manipulations.
It allows you to parse, demutiplex, multiplex, decode and encode all supported formats.
It can be compiled for Windows, Linux and cygwin.
we will focus on how to install pymedia 1.3.7.3 on a debian lenny

First install all the dependencies:
$ wget http://debian-multimedia.org/pool/main/l/lame/libmp3lame0_3.98.2-0.4_i386.deb
$ wget http://debian-multimedia.org/pool/main/l/lame/libmp3lame-dev_3.98.2-0.4_i386.deb
$ sudo apt-get install python-dev libogg-dev libvorbis-dev libfaad-dev libasound2-dev python-pygame
$ sudo dpkg -i libmp3lame0_3.98.2-0.4_i386.deb libmp3lame-dev_3.98.2-0.4_i386.deb

Extract a download of pymedia-1.3.7.3.tar.gz and open a terminal in the extracted folder,
Edit the audio/acodec/acodec.c file and on line 31 insert the following :

#define HAVE_LRINTF

So you should have:

#include <libavcodec/avcodec.h>
#define HAVE_LRINTF
#include “libavcodec/dsputil.h”
#include “version.h”

So we can build pymedia:
$ python setup.py build

This should display:
Using UNIX configuration…
OGG : found
VORBIS : found
FAAD : found
MP3LAME : found
VORBISENC : found
ALSA : found
Continue building pymedia ? [Y,n]:
If everything is found press Y

Finally install pymedia:

$ sudo python setup.py install

Pymedia on debian lenny