Jump to content

The GateWay Watcher(detect speeofing)


Ibrahim
 Share

Recommended Posts

Link to comment
Share on other sites

as for binging www.autoitscript.com i shortened the script and forgot to delete that line

as for being banned from your router "nice try" is good or bad!!!!

Link to comment
Share on other sites

  • 4 months later...

I needed a function for getting a mac address from an ip address,

I customized your script for my purposes.

Here is the function I came up with

#include <Constants.au3>

Func _get_mac($hostname)

    local $foo, $bar
     If (Ping($hostname, 1000) > 0) Then    
        $foo = Run("arp -a", @SystemDir, @SW_HIDE, $STDOUT_CHILD)
        Global $line = ""
        While 1
            $line = $line & StdoutRead($foo)
            If @error Then ExitLoop
        Wend

        $result = StringRegExp($line, "(?i)((?:\d{1,3}\.){3}\d{1,3})\s+?((?:[0-9A-F]{2}-){5}[0-9A-F]{2})", 3)

        For $i = 0 to UBound($result) - 1 step 2
            if $result[$i]=$hostname Then
                 $bar = $result[$i+1]
             EndIf
        Next
    EndIf

    Return $bar

EndFunc
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...