-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathscript.txt
1 lines (1 loc) · 1.41 KB
/
script.txt
1
javascript:void function(){var a=prompt("Current IP address value? >192.168.?.1 (default:192.168.8.1)",8);sModemIp="192.168."+a+".1";var b=prompt("New ip address range value? 192.168.?.1",1);sXmlData="<%3Fxml version=\"1.0\" encoding=\"UTF-8\"%3F><request><DnsStatus>1</DnsStatus><DhcpStartIPAddress>192.168."+b+".100</DhcpStartIPAddress><DhcpIPAddress>192.168."+b+".1</DhcpIPAddress><accessipaddress></accessipaddress><homeurl>hi.link</homeurl><DhcpStatus>1</DhcpStatus><DhcpLanNetmask>255.255.255.0</DhcpLanNetmask><SecondaryDns>192.168."+b+".1</SecondaryDns><PrimaryDns>192.168."+b+".1</PrimaryDns><DhcpEndIPAddress>192.168."+b+".100</DhcpEndIPAddress><DhcpLeaseTime>86400</DhcpLeaseTime></request>";var c=new XMLHttpRequest;c.open("GET","http://"+sModemIp+"/api/webserver/SesTokInfo",!0),c.overrideMimeType("text/xml"),c.onreadystatechange=function(){if(c.readyState==4%26%26c.status==200%26%26c.responseXML){var a=c.responseXML.querySelector("SesInfo").innerHTML,b=c.responseXML.querySelector("TokInfo").innerHTML,d=new XMLHttpRequest;d.open("POST","http://"+sModemIp+"/api/dhcp/settings",!0),d.setRequestHeader("Content-Type","text/xml; charset=UTF-8"),d.setRequestHeader("__RequestVerificationToken",b),d.setRequestHeader("Cookie",a),d.onreadystatechange=function(){4==d.readyState%26%26200==d.status%26%26alert("Finished the change. Your device will now show up under the newly applied settings")},d.send(sXmlData)}},c.send(null)}();