Karlnet
[Top] [All Lists]

Re: [Karlnet] KN v4.43k Released Today

To: Karlnet Mailing List <karlnet@WISPNotes.com>
Subject: Re: [Karlnet] KN v4.43k Released Today
From: Chris Conn <cconn@abacom.com>
Reply-to: Karlnet Mailing List <karlnet@WISPNotes.com>
Date: Mon, 09 Jun 2003 17:33:18 -0400
List-post: <mailto:karlnet@WISPNotes.com>
Bob Hrbek wrote:
no, I was not aware of any scripting abilities short of writing the SNMP
attribs of the RG.  Do you have a working example?  ...Care to share?


Hello,

Here is is. Rename it to script.vbs in order to run it. You have to give it your snmp read-write password as an argument (or code it yourself in the script).

Like so:

script.vbs public

Notes:

1) This is very rudimentary code. I would have done it cleaner in Perl but they have yet to port the configurator to Linux.

2) You have a maximum of 35 satellites. Make more room in the "clean" function at the bottom if you want more

3) You have to fill in the blanks for your WEP keys, SAP, and what WEP key , NWID and frequency to match your network (or change it =)

4) You will have to modify the script if you are not using WEP since it will set WEP keys and what key to use etc

5) This script assumes the 802.11b interface is number 2

5) Enter all the satellite IP addresses at the top

6) fix the path to your config.exe or whatever it is called on your system

I guess that's it. This script will basically re-configure one satellite after another and then run it on the base. I am not offering tech-support for this, it works for me, if it does not for you, write another one you like better.

Chris
'35 satelite maximum


Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set args = WScript.Arguments
pass = args(0)
interfacenumber = "2"
Dim ips()
ReDim ips(35)

'=============================================================================================


        keywanted = "1"
        'be sure to use the correct lenght for the key
        key1 = "key01"
        key2 = "key02"
        key3 = "key03"
        key4 = "key04"
        networkid = "1"
        frequency = "1"
        sapkey = "yoursapkey"
        baseip = "10.1.1.1"
Function init
        ips(0) = "10.1.1.2"
        ips(1) = "10.1.1.3"
        ips(2) = "10.1.1.4"
        ips(3) = "10.1.1.5"
        ips(4) = "10.1.1.6"
        ips(5) = "10.1.1.7"
        
End Function

'=============================================================================================


clear
init
        For each ip in ips
                If ip = "0.0.0.0" then 

                Else
                        Set oExec = WshShell.Exec("c:\configurator\config.exe " 
& ip & " -rwpwd " & pass & " -i " & interfacenumber & " -key " & keywanted & " 
-key1 " & key1 & " -key2 " & key2 & " -key3 " & key3 & " -key4 " & key4 & " /f 
" & frequency & " /nwid " & networkid & " /sap " & sapkey & " /log log.txt /s 
/e")
                        Do While oExec.Status = 0
                                WScript.Sleep 300
                        Loop
                End If
        Next


        Set oExec = WshShell.Exec("c:\configurator\config.exe " & baseip & " 
-rwpwd " & pass & " -i " & interfacenumber & " -key " & keywanted & " -key1 " & 
key1 & " -key2 " & key2 & " -key3 " & key3 & " -key4 " & key4 & " /f " & 
frequency & " /nwid " & networkid & " /sap " & sapkey & " /log log.txt /s /e")
        Do While oExec.Status = 0
                WScript.Sleep 100
        Loop

Function clear
        ips(0) = "0.0.0.0"
        ips(1) = "0.0.0.0"
        ips(2) = "0.0.0.0"
        ips(3) = "0.0.0.0"
        ips(4) = "0.0.0.0"
        ips(5) = "0.0.0.0"
        ips(6) = "0.0.0.0"
        ips(7) = "0.0.0.0"
        ips(8) = "0.0.0.0"
        ips(9) = "0.0.0.0"
        ips(10) = "0.0.0.0"
        ips(11) = "0.0.0.0"
        ips(12) = "0.0.0.0"
        ips(13) = "0.0.0.0"
        ips(14) = "0.0.0.0"
        ips(15) = "0.0.0.0"
        ips(16) = "0.0.0.0"
        ips(17) = "0.0.0.0"
        ips(18) = "0.0.0.0"
        ips(19) = "0.0.0.0"     
        ips(20) = "0.0.0.0"
        ips(21) = "0.0.0.0"
        ips(22) = "0.0.0.0"
        ips(23) = "0.0.0.0"
        ips(24) = "0.0.0.0"
        ips(25) = "0.0.0.0"
        ips(26) = "0.0.0.0"
        ips(27) = "0.0.0.0"
        ips(28) = "0.0.0.0"
        ips(29) = "0.0.0.0"
        ips(30) = "0.0.0.0"
        ips(31) = "0.0.0.0"
        ips(32) = "0.0.0.0"
        ips(33) = "0.0.0.0"
        ips(34) = "0.0.0.0"
        ips(35) = "0.0.0.0"
End Function
<Prev in Thread] Current Thread [Next in Thread>