Jump to content

Copyright-free Wake on LAN script !


Olish
 Share

Recommended Posts

Hello everybody !

You want a source code for Wake On LAN without copyright ? It's here !

ENJOY ! :whistle:

$IPAddress = "192.168.1.255"; This is the broadcast address !
$MACAddress = "000D8787E226"


UDPStartUp()

$connexion = UDPOpen($IPAddress, 7)
$res = UDPSend($connexion, GenerateMagicPacket($MACAddress))
MsgBox(0, "", $res)

UDPCloseSocket($connexion)
UDPShutdown()


; ===================================================================
; Functions
; ===================================================================


; This function convert a MAC Address Byte (e.g. "1f") to a char
Func HexToChar($strHex)
    
    Return Chr(Dec($strHex))
    
EndFunc

; This function generate the "Magic Packet"
Func GenerateMagicPacket($strMACAddress)
    
    $MagicPacket = ""
    $MACData = ""
    
    For $p = 1 To 11 Step 2
        $MACData = $MACData & HexToChar(StringMid($strMACAddress, $p, 2))
    Next
    
    For $p = 1 To 6
        $MagicPacket = HexToChar("ff") & $MagicPacket
    Next
    
    For $p = 1 To 16
        $MagicPacket = $MagicPacket & $MACData
    Next
    
    Return $MagicPacket
    
EndFunc

Thanks for your remarks...

Next to see you !

Olivier, from France.Free Wake On LAN script

Link to comment
Share on other sites

I love wake on lan but I couldn't test this yet. So it does work with you b8bboi?

At least it creates the same WOL packet than any other WOL tool (sniffed with Ethereal), so I guess it works.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

At least it creates the same WOL packet than any other WOL tool (sniffed with Ethereal), so I guess it works.

Cheers

Kurt

Time to switch to wireshark :whistle:

So long,

Mega

Thanks for sharing & others for testing.

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

I noticed that WoL only boots up a machine if it is completely off. If a machine is in hybernate or standby, WoL will not work, at least for Dells. Has anyone else experienced this?

Or is there another way to wake up a PC that is in standby or hibernate mode?

Thanks,

-John

Link to comment
Share on other sites

Time to switch to wireshark :whistle:

Yep, I'm just TOO used to the old name.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

I noticed that WoL only boots up a machine if it is completely off. If a machine is in hybernate or standby, WoL will not work, at least for Dells. Has anyone else experienced this?

Or is there another way to wake up a PC that is in standby or hibernate mode?

Thanks,

-John

Yes it runs when your PC is in "standby" or "hibernate" mode !

Olivier, from France.Free Wake On LAN script

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...