1. Welcome to PHCorner Forums. Take a moment to Sign up and gain unlimited access and extra privileges that guests are not entitled to, such as:

    All that and more! Registration is quick, simple and absolutely free. Join our community today!

Globe Mac Changer/Factory Reset Auto ...credits to the coder

Discussion in 'WiMAX, DSL Modems' started by mike0924, Oct 16, 2015.

  1. copy and paste the scripts to notepad then save as DV235t-Globe-MyBro-Mac-Changer.vbs


    <job>
    <script language="jscript">
    var add=[12,2,17,5,16,31,28,10,16,20,22,1];
    var subst={58:122,59:121,60:120,61:119,62:118,63:117,64:116,91:115,92:114,93:113,94:112,45:111,96:110};

    function generatePassword(input){
    var inputMac=input.replace(/:/g,"").toUpperCase();
    var macPassword="";
    if((inputMac.search(/^[A-F0-9]{12}$/)==-1) || (inputMac =="000000000000")){
    return macPassword="invalid"}
    else{
    var b;
    var a;
    var c="";
    for(b=0;b<12;b++){
    a=inputMac.charCodeAt(b)+add;
    if(subst[a]){
    a=subst[a]
    }
    c+=String.fromCharCode(a)
    }
    return macPassword="2008"+c+"";
    }
    };
    function doMath(hexValue1,hexValue2) {
    var outHex;
    var stringHex1 = parseInt(hexValue1,16);
    var stringHex2 = parseInt(hexValue2,16);
    var number = stringHex1;
    var number2 = stringHex2;
    var hexaddansv = eval(number) + eval(number2);
    outHex = (hexaddansv);
    return outHex = Number(hexaddansv).toString(16);
    }
    </script>

    <script language="vbscript">
    'Dim out


    Dim telnetUserName, telnetPassword, telnetHost,sMac,genPassOut,sM
    Set cloner = CreateObject("WScript.Shell")


    '===Server settings===

    telnetUserName = "mt7109"
    telnetPassword = "wimax"
    telnetHost = "10.1.1.254"

    '===End server settings===

    'connectToHost(telnetHost)

    If Ping(telnetHost) Then
    connectToHost(telnetHost)
    Else
    MsgBox vbCr & vbLf & "Failed to connect! Please check your WIMAX IP!!! and TRY AGAIN...",16,"Status Window [Recode by: Dr.Yell] "
    WScript.Quit
    End If

    'Function check Host if reachable
    Function Ping(Target)
    Dim results

    On Error Resume Next

    Set shell = CreateObject("WScript.Shell")

    ' Send 1 echo request, waiting 2 seconds for result
    Set exec = shell.Exec("ping -n 1 -w 2000 " & Target)
    results = LCase(exec.StdOut.ReadAll)

    Ping = (InStr(results, "reply from") > 0)
    End Function

    Function getBaseMacFourtOctetSixTTm(macFull)
    Dim mac,baseMac
    mac = macFull
    baseMacValue = Mid(mac,1,12)
    getBaseMacFourtOctetSixTTm =baseMacValue
    'inputMacBase.value = baseMac
    Set mac = Nothing
    Set baseMac = Nothing
    End Function 'end getbaseMac

    ''Begin IncrementMAC by One
    Function IncrementMacbyOne (lanMAc)
    Dim mac, lastHex, lastHexRange,inc,incTest,newMac,genMethodString
    mac = lanMAc
    fullNewMAc = "30:87:30:C6:83:18"
    ''LogContents.value = "Generating MAC started..."
    intNumberofMAc = CLng(Trim(1))
    inc = 1
    genMethodString = "Increment"
    howManyMac = 0
    getNewBaseMac = UCase(getBaseMacFourtOctetSixTTm(mac))
    Do
    myCurrenMacFifthHex = Mid(mac,13,2)
    myCurrenMacSixthHex = Mid(mac,16,2)
    fifthAndSixthMac = myCurrenMacFifthHex & myCurrenMacSixthHex
    howManyMac = howManyMac + 1
    incTest = doMath(fifthAndSixthMac,inc)
    newMac = incTest
    If incTest < "0000" Then
    ''DisplayLogMacGenScan genMethodString & " is out of range... Try use INCREMENT method."
    Exit do
    End If
    If Len(incTest) = 3 Then
    newMac = "0" & newMac
    ElseIf Len(incTest) = 2 Then
    newMac = "00" & newMac
    ElseIf Len(incTest) = 1 Then
    newMac = "000" & newMac
    ElseIf Len(incTest) >4 Then
    ''DisplayLogMacGenScan genMethodString & " is out of range... Try use DECREMENT method."
    Exit Do
    End If
    newMacFifth = Mid(newMac,1,2)
    newMacSixth = Mid(newMac,3,2)
    newMac = newMacFifth &":"& newMacSixth
    fullNewMAc = getNewBaseMac & UCase(newMac)
    mac = fullNewMAc
    Loop While howManyMac <> intNumberofMAc
    IncrementMacbyOne = fullNewMAc
    End Function
    ''End IncrementMAC by one

    'Ask MAc and Connect to telnet
    Sub connectToHost(hostAddress)
    Do
    sMac = InputBox( vbCr & vbLf & "Supported device:" & vbCr & vbLf & " BM622M2K12-13 WITH GREENPACKET FIRMWARE, DV235T" & vbCr & vbLf & "" & vbCr & vbLf & "NOTE: Paglagay ng GlobeMac, pindutin ang OK, tapos sipol kana, wag pipindot ng kahit ano hanggang matapos ang pag change mac!!!" & vbCr & vbLf & "When TELNET windows open it SHOULD be ACTIVE!!! " & vbCr & vbLf & "" & vbCr & vbLf & "Please enter a VALID MAC Address! EX. 00:11:22:33:44:55" , "WIMAX MAC Changer [Recode by: Dr.Yell]")


    If TypeName(sMac) = "Empty" Then
    MsgBox vbCr & vbLf & " Operation Canceled! ",16,"Goodbye... [Recode by: Dr.Yell] "
    WScript.Quit
    End If

    If Len(Trim(sMac)) = 0 Then
    MsgBox "Please Enter valid MAC Address!",16,"Status Window [Recode by: Dr.Yell] "
    End If
    passWord =generatePassword(sMac)
    Loop While (passWord="invalid")
    wanMacEntry = Replace(sMac ,":","")
    currentMacAddOne = IncrementMacbyOne(sMac)

    cloner.run "Telnet " & hostAddress
    WScript.Sleep 2000

    cloner.SendKeys telnetUserName
    cloner.SendKeys("{Enter}")
    WScript.Sleep 2000

    cloner.SendKeys telnetPassword
    cloner.SendKeys("{Enter}")
    WScript.Sleep 2000

    cloner.SendKeys"sncfg dset ADMIN_NAME admin"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset ADMIN_PASSWD '$1$k2I9hJe4$OkHKF43oTmjvv3zJtrEZ4.'"
    cloner.SendKeys("{Enter}")
    WScript.sleep 400

    cloner.SendKeys"sncfg dset WMX_IGNORE_CERT 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset WAN_MAC_ENCRY " & wanMacEntry
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset WAN_MAC " & sMac
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset LAN_MAC " & currentMacAddOne
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset WMX_USER_NAME " & passWord & "@globelines.com.ph"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset WMX_PASSW " & passWord
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset WMX_ANONYMOUS_ID " & wanMacEntry & "@globelines.com.ph"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset WMX_FREQ_LIST 2507500,2602000,2612000,2638000,2622000,2505000,2510000"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset WMX_GEMTEK_FREQUENCY_RANGE_LH_BOUND 2500000KHz-2600000KHz"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset WMX_SAME_EAP_OUTER_ID disable"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset WMX_MAC_IN_OUTER_ID disable"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset WMX_RANDOM_OUTER_ID disable"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset WMX_IGNORE_CERT 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset MGMT_WEB_WAN 0"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset MGMT_TELNET_WAN 0"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset MGMT_SSH_WAN 0"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset HTTPD_ENABLE 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset HTTPD_PORT 80"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset HTTPSD_ENABLE 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset HTTPSD_PORT 443"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset TELNETD_ENABLE 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset TELNETD_PORT 23"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset MGMT_TELNET_LAN 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset SSHD_Enable 0"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset SSHD_PORT 22"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset MGMT_SSH_LAN 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset TR_ENABLE 0"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset TR_BOOTSTRAP 0"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset TR_INFORM_ENABLE 0"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_DDOS_SYNFLOOD 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_DDOS_UDPFLOOD 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_DDOS_ICMPFLOOD 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_DDOS_PORTSCAN 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_DDOS_LANDATTACK 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_DDOS_IPSPOOF 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_DDOS_ICMPREDIRECT 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_DDOS_PINGOFDEATH 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_DDOS_PINGFROMWAN 1"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_ALG_FTP 0"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_ALG_H323 0"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_ALG_IPSEC 0"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_ALG_L2TP 0"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_ALG_PPTP 0"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_ALG_RTSP 0"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg dset NETFILTER_ALG_SIP 0"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"sncfg commit"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"clear"
    cloner.SendKeys("{Enter}")
    WScript.Sleep 400

    cloner.SendKeys"/factoryreset.sh"
    cloner.SendKeys("{Enter}")
    WScript.quit


    end sub
    Sub tymsg(hostadd)
    MsgBox "Recode by: Dr.Yell" & vbCr & vbLf & out,48,"Status Window"
    end sub
    </script>

    </job>
     
  2. master ano to?

    cloner.SendKeys"sncfg dset ADMIN_PASSWD

    '$1$k2I9hJe4$OkHKF43oTmjvv3zJtrEZ4.'"
    eto master ^ (admin) ba yan
     
Tags / Keywords: