Zyxel keenetic

Zyxel keenetic

Postby Natter » Tue Mar 09, 2021 5:42 pm

There is an Internet center Zyxel keenetic. I need to programmatically reload it.
Can I do this via FW or do I need to use Telnet ?
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Zyxel keenetic

Postby Baxajaun » Thu Mar 11, 2021 12:03 pm

Hi Natter!

Please, could you specify the model and what you want to do?

TIA!

Best regards,
User avatar
Baxajaun
 
Posts: 962
Joined: Wed Oct 19, 2005 2:17 pm
Location: Gatika. Bizkaia

Re: Zyxel keenetic

Postby Natter » Thu Mar 11, 2021 2:39 pm

The router says Zyxel Keenetic 3G/4G with an access point WI-FI 802,11n 150Mb and Ethernet switch
I need to programmatically reload it. Firmware is old-2.04
In the new firmware, it seems, there is such an option. In this case, you need your own script

I tried using Telnet - it doesn't work, there is no access.
It looks like Telnet access is disabled in the router itself. Apparently I need to try to insert my script into the router via FTP
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Zyxel keenetic

Postby Otto » Thu Mar 11, 2021 3:53 pm

Hello Natter,
what do you mean with "reload"? Do you mean restart the ACCESSPOINT?
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6015
Joined: Fri Oct 07, 2005 7:07 pm

Re: Zyxel keenetic

Postby Natter » Thu Mar 11, 2021 4:41 pm

Sorry. I meant Restart !
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Zyxel keenetic

Postby Otto » Thu Mar 11, 2021 5:50 pm

Hello Natter,
maybe these functions are of any help.

I restarted with these functions TPLink ACCESSPoints every night.

Best regards,
Otto




Code: Select all  Expand view

FUNCTION    AP_Resetten()
    local cUser := ""
    local cIP   := ""
    local cPW   := ""
    local cvar  := ""
    local cPWobfuscator := pw_obfuscator()
   *---------------------------------------------------------- 
   
    use "c:\xWHSystem\doku\NETWORK.DBF" new
   
    //xbrowse()
   
    do while .not. eof()
   
        if ALLTRIM( field->ART ) = "AP-TPLink"

            ? FIELD->ip + FIELD->room
            //? Decrypt( FIELD->USERNAME, cPWobfuscator )
            //? Decrypt( FIELD->PASSWORD, cPWobfuscator )

            cUser := ALLTRIM( Decrypt( FIELD->USERNAME, cPWobfuscator ) )
            cIP   := ALLTRIM( FIELD->ip )
            cPW   := ALLTRIM( Decrypt( FIELD->PASSWORD, cPWobfuscator ) )
           
            PING_tplinkAP(cIP)
           
            cVar := 'c:\_temp\curl.exe --user ' + cUser +':' + cPW + ' "http://' + cIP + '/userRpm/SysRebootRpm.htm?&wan=1&Reboot=Reboot"'
       
            logfile( "reset.log", {   cVar } )
       
            //  MEMOWRIT2( 'http.bat', cVar )
            sysrefresh()
       
            msgwait(cvar, , 1 )
           

            WINEXEC( cVar )
        endif

        skip
   
    enddo
   
    use
    msginfo( "TP Link AccessPoints wurden resettet" )

return NIL
//----------------------------------------------------------------------------//

function pw_obfuscator()
   local cPassword1 := "W"
   local cPassword2 := "H"
   local cPassword3 := "A"
   local cFiller    := "xyz"
   local cPassword4 := "d"
   local cPassword5 := "v"
   local cFiller1   := "abi"
   local cPassword6 := "v"
   local cPassword7 := "n"
   local cPassword8 := ""
   *----------------------------------------------------------

return ( cPassword1 + cPassword2 +  cPassword3 + cPassword4 + cPassword5 +  cPassword6 + cPassword7 + cPassword8 )
//----------------------------------------------------------------------------//


function PING_tplinkAP( cIP )
    local cPing1    := ""
    local cVar     := ""
    local cTXTFILE := ""
   
     cTXTFILE := STRTRAN(cIP, ".", "_"  )
   
    cVar := "PING " + cIP + " -n 100 >PING_" + cTXTFILE + ".txt" + CRLF
   
    MEMOWRIT2( 'ping1.bat', cVar )
   
    winexec  ('ping1.bat' )

    //msginfo(cPing1)

return nil
//----------------------------------------------------------------------------//

 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6015
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 16 guests