20 Sep 2019 
Support Center » Knowledgebase » Scripts for DSL/Cable modems / routers » MAC change for WGR614V10
 MAC change for WGR614V10
Article function findId(s) {
 m="ether.cgi?id=";
 i=s.IndexOf(m);
 if (i==-1) return null;
 s=s.Substring(i+m.Length);
 i=s.IndexOf("\"");
 if (i==-1) return null;
 s=s.Substring(0, i);
 return s;
}


hs=new HTTPScript("admin", "password");
hs.ForceAuthHeader=true;
s=hs.GET("http://192.168.1.1/BAS_ether.htm");
id=findId(s);
vMac=RandomMAC();
vMac=MACToString(vMac, "");
Info("Changing Router MAC to "+vMac+", id="+id);
hs.Data="system_name=WGR614V10&domain_name=&WANAssign=dhcp&DNSAssign=0&MACAssign=2&Spoofmac="+vMac+"&apply=Apply&runtest=no&wan_proto=dhcp&wan_ipaddr=68.229.31.146&wan_netmask=255.255.254.0&wan_gateway=68.229.30.1&wan_dns_sel=0&wan_dns1_pri=0.0.0.0&wan_dns1_sec=...&wan_hwaddr_sel=2&wan_hwaddr_def=00%3A04%3AE1%3A3F%3A95%3A65&wan_hwaddr2=%0D%0Afunction+toUpperCase%28%29+%7B%0D%0A++++%5Bnative+code%5D%0D%0A%7D%0D%0A&wan_hwaddr_pc=00%3AA0%3A50%3A12%3A60%3A39&lan_ipaddr=192.168.1.1&lan_netmask=255.255.255.0";
hs.POST("http://192.168.1.1/ether.cgi?id="+id);
Wait(10000);
return true;  



Article Details
Article ID: 174
Created On: 23 May 2011 1:46 PM

 This article was helpful  This article was not helpful

 Back
 Log in [Lost Password] 
E-mail:
Password:
Remember Me:
 
 Search
 Article Options
Home | Submit a Ticket | Knowledgebase | Troubleshooter
Language:

Help Desk Software by Kayako SupportSuite v3.70.02