-
-
Save xymor/6f93d59f0ffee23a3db71379d476723c 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; | |
}, {}) | |
//setar com $.xmo.setValuesTree('1500',"Device/IP/Interfaces/Interface[@uid='5']/MaxMTUSize"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment