Created
October 13, 2016 23:16
-
-
Save anonymous/f3bd3be63c43bbb837e770f9ea0a42ec to your computer and use it in GitHub Desktop.
script para mudar mtu do roteador GVT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//acessar 192.168.25.1/save_rg_conf.cgi | |
var objts = {}; | |
$.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='1']/MaxMTUSize"); | |
$.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='1']/LowerLayers"); | |
$.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='2']/MaxMTUSize"); | |
$.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='2']/LowerLayers"); | |
$.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='3']/MaxMTUSize"); | |
$.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='3']/LowerLayers"); | |
$.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='4']/MaxMTUSize"); | |
$.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='4']/LowerLayers"); | |
$.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='5']/MaxMTUSize"); | |
$.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='5']/LowerLayers"); | |
Array.from(new Array(5), (x,i) => ++i).reduce((o, i) => { | |
var name = $.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='"+i+"']/LowerLayers"); | |
var mtu = $.xmo.getValuesTree("Device/IP/Interfaces/Interface[@uid='"+i+"']/MaxMTUSize"); | |
o[i] = {name: name, mtu: mtu}; | |
return o; | |
}, {}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment