21 Jan 2019 
Support Center » Knowledgebase » Actiontec. ML424-WR Rev.D
 Actiontec. ML424-WR Rev.D
Article function findCache(s) {
  m="f.action=\"/cache/";
  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;
}
function findAuthKey(s) {
  m="name=\"auth_key\" value=\"";
  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;
}
function findSessionId(s) {
  m="name=\"session_id\" value=\"";
  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;
}
function findNavStack0(s) {
  m="name=\"nav_stack_0\" value=\"";
  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;
}
function findEl(s, el) {
  m="name=\""+el+"\" value=\"";
  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;
}
function ToHex(a) {
  vRet=new System.Text.StringBuilder();
  for (i=0; i<a.Length; i++) {
    b=a[i];
    s=b.ToString("x2");
    s=s.ToLower();
    vRet.Append(s);
  }
  return vRet.ToString();
}
function Md5s(aValue) {
  x = new System.Security.Cryptography.MD5CryptoServiceProvider();
  data = System.Text.Encoding.UTF8.GetBytes(aValue);
  data = x.ComputeHash(data);
  return ToHex(data);
}

Info("event_level_0");
hs=new HTTPScript();
s=hs.GET("http://192.168.1.1");
hs.Referer="http://192.168.1.1/";
//Info(s);
cache=findCache(s);
if (cache==null)
  return false;
authKey=findAuthKey(s);
md=Md5s("password1"+authKey);
sid=findSessionId(s);
ns0=findNavStack0(s);
hs.Data="active_page="+ns0+"&session_id="+sid+"&prev_page=0&page_title=Login&nav_stack_0="+ns0+"&mimic_button_field=submit_button_login_submit%3A+..&button_value=&transaction_id=0&user_name=admin&passwordmask_"+sid+"=password1&passwd1=++++++++++++++++++++&md5_pass="+md+"&auth_key="+authKey;
//Info(hs.Data);
s=hs.POST("http://192.168.1.1/cache/"+cache+"/index.cgi");
//Info(s);
Wait(1000);
hs.Referer="http://192.168.1.1/cache/"+cache+"/index.cgi";
cache=findCache(s);
if (cache==null) return false;
ap=findEl(s, "active_page");
pp=findEl(s, "prev_page");
ns0=findEl(s, "nav_stack_0");
tid=findEl(s, "transaction_id");
hs.Data="active_page="+ap+"&session_id="+sid+"&prev_page="+pp+"&page_title=&nav_stack_0="+ns0+"&nav_"+ns0+"_button_value=&mimic_button_field=sidebar: actiontec_topbar_adv_setup..&button_value=&transaction_id="+tid;
//Info(hs.Data);
s=hs.POST("http://192.168.1.1/cache/"+cache+"/index.cgi");
//Info(s);
Wait(1000);
cache=findCache(s);
if (cache==null) return false;
ap=findEl(s, "active_page");
pp=findEl(s, "prev_page");
ns0=findEl(s, "nav_stack_0");
tid=findEl(s, "transaction_id");
hs.Data="active_page="+ap+"&session_id="+sid+"&prev_page="+pp+"&page_title=Advanced&nav_stack_0="+ns0+"&nav_"+ns0+"_button_value=actiontec_topbar_adv_setup&mimic_button_field=submit_button_yes: ..&button_value=actiontec_topbar_adv_setup&transaction_id="+tid;
//Info(hs.Data);
s=hs.POST("http://192.168.1.1/cache/"+cache+"/index.cgi");
//Info(s);
Wait(1000);
cache=findCache(s);
if (cache==null) return false;
ap=findEl(s, "active_page");
pp=findEl(s, "prev_page");
ns0=findEl(s, "nav_stack_0");
tid=findEl(s, "transaction_id");
hs.Data="active_page="+ap+"&session_id="+sid+"&prev_page="+pp+"&page_title=Advanced&nav_stack_0="+ns0+"&nav_"+ns0+"_button_value=actiontec_topbar_adv_setup&mimic_button_field=goto: 140..&button_value=actiontec_topbar_adv_setup&transaction_id="+tid;
//Info(hs.Data);
s=hs.POST("http://192.168.1.1/cache/"+cache+"/index.cgi");
//Info(s);
Wait(1000);
cache=findCache(s);
if (cache==null) return false;
ap=findEl(s, "active_page");
pp=findEl(s, "prev_page");
ns0=findEl(s, "nav_stack_0");
tid=findEl(s, "transaction_id");
hs.Data="active_page="+ap+"&session_id="+sid+"&prev_page="+pp+"&page_title=Restart&nav_stack_0="+ns0+"&nav_stack_1="+ns0+"&nav_"+ns0+"_active_page="+ns0+"&nav_"+ns0+"_prev_page="+ns0+"&nav_"+ns0+"_page_title=Advanced&nav_"+ns0+"_button_value=actiontec_topbar_adv_setup&nav_"+ns0+"_mimic_button_field=goto: 140..&nav_"+ns0+"_transaction_id=1&nav_140_button_value=140&mimic_button_field=submit_button_ro_submit: ..&button_value=140&transaction_id="+tid;
//Info(hs.Data);
s=hs.POST("http://192.168.1.1/cache/"+cache+"/index.cgi");
//Info(s);
Wait(1000);
cache=findCache(s);
if (cache==null) return false;
ap=findEl(s, "active_page");
pp=findEl(s, "prev_page");
ns0=findEl(s, "nav_stack_0");
//ns1=findEl(s, "nav_stack_1");
tid=findEl(s, "transaction_id");
hs.Data="active_page="+ap+"&session_id="+sid+"&prev_page="+pp+"&page_title=Restart&nav_stack_0="+ns0+"&nav_stack_1="+ns0+"&nav_"+ns0+"_active_page="+ns0+"&nav_"+ns0+"_prev_page="+ns0+"&nav_"+ns0+"_page_title=Advanced&nav_"+ns0+"_button_value=actiontec_topbar_adv_setup&nav_"+ns0+"_mimic_button_field=goto: 140..&nav_"+ns0+"_transaction_id=1&nav_140_button_value=140&mimic_button_field=submit_button_ro_submit: ..&button_value=140&transaction_id="+tid;
//Info(hs.Data);
s=hs.POST("http://192.168.1.1/cache/"+cache+"/index.cgi");
//Info(s);
Wait(5000);
return true;



------------------------ another variation -------------------------
function findCache(s) {
m="f.action=\"/cache/";
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;
}
function findAuthKey(s) {
m="name=\"auth_key\" value=\"";
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;
}
function findSessionId(s) {
m="name=\"session_id\" value=\"";
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;
}
function findNavStack0(s) {
m="name=\"nav_stack_0\" value=\"";
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;
}
function findEl(s, el) {
m="name=\""+el+"\" value=\"";
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;
}
function ToHex(a) {
  vRet=new System.Text.StringBuilder();
  for (i=0; i<a.Length; i++) {
    b=a[i];
    s=b.ToString("x2");
    s=s.ToLower();
    vRet.Append(s);
  }
  return vRet.ToString();
}
function Md5s(aValue) {
x = new System.Security.Cryptography.MD5CryptoServiceProvider();
data = System.Text.Encoding.UTF8.GetBytes(aValue);
data = x.ComputeHash(data);
return ToHex(data);
}

Info("event_level_0");
hs=new HTTPScript();
s=hs.GET("http://192.168.1.1");
hs.Referer="http://192.168.1.1/";
//Info(s);
cache=findCache(s);
if (cache==null)
return false;
authKey=findAuthKey(s);
md=Md5s("fr618884"+authKey);
sid=findSessionId(s);
ns0=findNavStack0(s);
tid=findEl(s, "transaction_id");
hs.Data="active_page="+ns0+"&session_id="+sid+"&prev_page=0&page_title=Login&nav_stack_0="+ns0+"&mimic_button_field=submit_button_login_submit: ..&button_value=&transaction_id="+tid+"&user_name=greguimho19&passwordmask_"+sid+"=fr618884&passwd1=+++++++++++++++++++&md5_pass="+md+"&auth_key="+authKey;
//Info(hs.Data);
s=hs.POST("http://192.168.1.1/cache/"+cache+"/index.cgi");
Info(s);
Wait(1000);
hs.Referer="http://192.168.1.1/cache/"+cache+"/index.cgi";
cache=findCache(s);
if (cache==null) return false;
ap=findEl(s, "active_page");
pp=findEl(s, "prev_page");
ns0=findEl(s, "nav_stack_0");
tid=findEl(s, "transaction_id");
hs.Data="active_page="+ap+"&session_id="+sid+"&prev_page="+pp+"&page_title=&nav_stack_0="+ns0+"&nav_"+ns0+"_button_value=&mimic_button_field=sidebar: actiontec_topbar_HNM..&button_value=&transaction_id="+tid;
//Info(hs.Data);
s=hs.POST("http://192.168.1.1/cache/"+cache+"/index.cgi");
Info(s);
Wait(1000);
cache=findCache(s);
if (cache==null) return false;
ap=findEl(s, "active_page");
pp=findEl(s, "prev_page");
ns0=findEl(s, "nav_stack_0");
tid=findEl(s, "transaction_id");
hs.Data="active_page="+ap+"&session_id="+sid+"&prev_page="+pp+"&page_title=Network Status&nav_stack_0="+ns0+"&nav_"+ns0+"_button_value=actiontec_topbar_HNM&mimic_button_field=btn_tab_goto: 860..&button_value=actiontec_topbar_HNM&transaction_id="+tid;
//Info(hs.Data);
s=hs.POST("http://192.168.1.1/cache/"+cache+"/index.cgi");
Info(s);
Wait(1000);
cache=findCache(s);
if (cache==null) return false;
ap=findEl(s, "active_page");
pp=findEl(s, "prev_page");
ns0=findEl(s, "nav_stack_0");
tid=findEl(s, "transaction_id");
hs.Data="active_page="+ap+"&session_id="+sid+"&prev_page="+pp+"&page_title=Network Connections&nav_stack_0="+ns0+"&nav_"+ns0+"_button_value="+ns0+"&mimic_button_field=edit: clink0..&button_value="+ns0+"&transaction_id="+tid;
//Info(hs.Data);
s=hs.POST("http://192.168.1.1/cache/"+cache+"/index.cgi");
Info(s);
Wait(1000);
cache=findCache(s);
if (cache==null) return false;
ap=findEl(s, "active_page");
pp=findEl(s, "prev_page");
ns0=findEl(s, "nav_stack_0");
ns1=findEl(s, "nav_stack_1");
tid=findEl(s, "transaction_id");
hs.Data="active_page="+ap+"&session_id="+sid+"&prev_page="+pp+"&page_title=Connection Properties&nav_stack_0="+ns0+"&nav_stack_1="+ns1+"&nav_"+ns0+"_active_page="+ns0+"&nav_"+ns0+"_prev_page="+ns0+"&nav_"+ns0+"_page_title=Network+Connections&nav_"+ns0+"_button_value="+ns0+"&nav_"+ns0+"_mimic_button_field=edit: clink0..&nav_"+ns0+"_transaction_id=1&nav_"+ns1+"_button_value=clink0&mimic_button_field=submit_button_settings: ..&button_value=clink0&transaction_id="+tid+"&pref_conn_set_hidden_dev_name=clink0&pref_conn_set_description=Broadband Connection (Coax)";
//Info(hs.Data);
s=hs.POST("http://192.168.1.1/cache/"+cache+"/index.cgi");
Info(s);
Wait(1000);
cache=findCache(s);
if (cache==null) return false;
ap=findEl(s, "active_page");
pp=findEl(s, "prev_page");
ns0=findEl(s, "nav_stack_0");
ns1=findEl(s, "nav_stack_1");
ns2=findEl(s, "nav_stack_2");
tid=findEl(s, "transaction_id");
sid=findSessionId(s);
tid860=findEl(s, "nav_860_transaction_id");
tid890=findEl(s, "nav_890_transaction_id");
hs.Data="active_page=870&session_id="+sid+"&prev_page=890&page_title=Configure Connection&nav_stack_0=860&nav_stack_1=890&nav_stack_2=870&nav_890_active_page=890&nav_890_prev_page=860&nav_890_page_title=Connection Properties&nav_860_active_page=860&nav_860_prev_page=6002&nav_860_page_title=Network Connections&nav_860_button_value=860&nav_860_mimic_button_field=edit: clink0..&nav_860_transaction_id="+tid860+"&nav_890_button_value=clink0&nav_890_mimic_button_field=submit_button_settings: ..&nav_890_transaction_id="+tid890+"&nav_890_pref_conn_set_hidden_dev_name=clink0&nav_890_pref_conn_set_description=Broadband Connection (Coax)&nav_870_button_value=clink0&mimic_button_field=submit_button_release: ..&button_value=clink0&transaction_id="+tid+"&pref_conn_set_hidden_dev_name=clink0&schdlr_rule_id=ALWAYS&pref_conn_set_mtu_mode=1&clink_channel=0&clink_auto_detection=1&clink_privacy_watermark=1&clink_cmratio=20&pref_conn_set_ip_settings=2&pref_conn_set_override_subnet_mask_watermark=1&pref_conn_set_static_netmask_override0=0&pref_conn_set_static_netmask_override1=0&pref_conn_set_static_netmask_override2=0&pref_conn_set_static_netmask_override3=0&pref_conn_set_dns_option=1&dhcp_mode=0&pref_conn_set_is_advanced_wbm_routing=0&pref_conn_set_is_trusted_watermark=1&pref_conn_set_is_trusted=1";
//Info(hs.Data);
s=hs.POST("http://192.168.1.1/cache/"+cache+"/index.cgi");
Info(s);

Wait(10000);
cache=findCache(s);
if (cache==null) return false;
ap=findEl(s, "active_page");
pp=findEl(s, "prev_page");
ns0=findEl(s, "nav_stack_0");
ns1=findEl(s, "nav_stack_1");
ns2=findEl(s, "nav_stack_2");
tid=findEl(s, "transaction_id");
sid=findSessionId(s);
tid860=findEl(s, "nav_860_transaction_id");
tid890=findEl(s, "nav_890_transaction_id");
hs.Data="active_page=870&session_id="+sid+"&prev_page=890&page_title=Configure Connection&nav_stack_0=860&nav_stack_1=890&nav_stack_2=870&nav_890_active_page=890&nav_890_prev_page=860&nav_890_page_title=Connection Properties&nav_860_active_page=860&nav_860_prev_page=6002&nav_860_page_title=Network Connections&nav_860_button_value=860&nav_860_mimic_button_field=edit: clink0..&nav_860_transaction_id="+tid860+"&nav_890_button_value=clink0&nav_890_mimic_button_field=submit_button_settings: ..&nav_890_transaction_id="+tid890+"&nav_890_pref_conn_set_hidden_dev_name=clink0&nav_890_pref_conn_set_description=Broadband Connection (Coax)&nav_870_button_value=clink0&mimic_button_field=submit_button_renew: ..&button_value=clink0&transaction_id="+tid+"&pref_conn_set_hidden_dev_name=clink0&schdlr_rule_id=ALWAYS&pref_conn_set_mtu_mode=1&clink_channel=0&clink_auto_detection=1&clink_privacy_watermark=1&clink_cmratio=20&pref_conn_set_ip_settings=2&pref_conn_set_override_subnet_mask_watermark=1&pref_conn_set_static_netmask_override0=0&pref_conn_set_static_netmask_override1=0&pref_conn_set_static_netmask_override2=0&pref_conn_set_static_netmask_override3=0&pref_conn_set_dns_option=1&dhcp_mode=0&pref_conn_set_is_advanced_wbm_routing=0&pref_conn_set_is_trusted_watermark=1&pref_conn_set_is_trusted=1";
//Info(hs.Data);
s=hs.POST("http://192.168.1.1/cache/"+cache+"/index.cgi");
Info(s);

Wait(5000);
return true;



Article Details
Article ID: 121
Created On: 17 Oct 2010 8:39 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