fixing use of regex

bug/bundler_fix
jvazquez-r7 2013-04-07 11:39:29 +02:00
parent 6a410d984d
commit 0e69edc89e
1 changed files with 27 additions and 27 deletions

View File

@ -116,40 +116,40 @@ class Metasploit3 < Msf::Exploit::Remote
@wait_time_orig = get_config(res.body, "<input\ type=hidden\ name=\"wait_time\"\ value=(.*)>")
@need_reboot_orig = get_config(res.body, "<input\ type=hidden\ name=\"need_reboot\"\ value=(.*)>")
@wan_proto_orig = get_config(res.body, "var\ wan_proto\ =\ \'(.*)\'\;")
@lan_ipaddr_0_orig = get_config(res.body, "onBlur\=valid_range\(this\,1\,223\,\"IP\"\)\ size=3\ value=\'(.*)\'\ name=\"lan_ipaddr_0\"\>")
@lan_ipaddr_1_orig = get_config(res.body, "\<INPUT\ class=num\ maxLength=3\ onBlur=valid_range\(this\,0\,255\,\"IP\"\)\ size=3\ value=\'(.*)\'\ name=\"lan_ipaddr_1\">")
@lan_ipaddr_2_orig = get_config(res.body, "\<INPUT\ class=num maxLength=3\ onBlur=valid_range\(this\,0\,255\,\"IP\"\)\ size=3\ value=\'(.*)\'\ name=\"lan_ipaddr_2\">")
@lan_ipaddr_3_orig = get_config(res.body, "<INPUT class=num maxLength=3\ onBlur=\"valid_range\(this,1,254,'IP'\)\;Sel_SubMask\(this.form.lan_netmask,this.form\);\"\ size=3\ value='(.*)'\ name=\"lan_ipaddr_3\"><\/TD>")
@router_name_orig = get_config(res.body, "name=\"router_name\"\ size=\"20\"\ value=\'(.*)\'\ onBlur=valid_name\(this\,\"Router%20Name\"\)><\/FONT><\/TD>")
@wan_domain_orig = get_config(res.body, "name=\"wan_domain\"\ size=\"20\"\ value=\'(.*)\'\ onBlur=valid_name\(this\,\"Domain%20name\"\,SPACE_NO\)><\/FONT><\/TD>")
@wan_hostname_orig = get_config(res.body, "<INPUT\ maxLength=39\ name=\"wan_hostname\"\ size=\"20\"\ value=\'(.*)\'\ onBlur=valid_name\(this\,\"Host%20Name\"\)><\/FONT><\/TD>")
@wan_mtu_orig = get_config(res.body, "<INPUT\ class=num\ maxLength=4\ onBlur=valid_mtu\(this\)\ size=5\ value='(.*)'\ name=\"wan_mtu\"><\/TD>")
@lan_ipaddr_0_orig = get_config(res.body, "onBlur\=valid_range\\(this\,1\,223\,\"IP\"\\)\ size=3\ value=\'(.*)\'\ name=\"lan_ipaddr_0\"\>")
@lan_ipaddr_1_orig = get_config(res.body, "\<INPUT\ class=num\ maxLength=3\ onBlur=valid_range\\(this\,0\,255\,\"IP\"\\)\ size=3\ value=\'(.*)\'\ name=\"lan_ipaddr_1\">")
@lan_ipaddr_2_orig = get_config(res.body, "\<INPUT\ class=num maxLength=3\ onBlur=valid_range\\(this\,0\,255\,\"IP\"\\)\ size=3\ value=\'(.*)\'\ name=\"lan_ipaddr_2\">")
@lan_ipaddr_3_orig = get_config(res.body, "<INPUT class=num maxLength=3\ onBlur=\"valid_range\\(this,1,254,'IP'\\)\;Sel_SubMask\\(this.form.lan_netmask,this.form\\);\"\ size=3\ value='(.*)'\ name=\"lan_ipaddr_3\"><\/TD>")
@router_name_orig = get_config(res.body, "name=\"router_name\"\ size=\"20\"\ value=\'(.*)\'\ onBlur=valid_name\\(this\,\"Router%20Name\"\\)><\/FONT><\/TD>")
@wan_domain_orig = get_config(res.body, "name=\"wan_domain\"\ size=\"20\"\ value=\'(.*)\'\ onBlur=valid_name\\(this\,\"Domain%20name\"\,SPACE_NO\\)><\/FONT><\/TD>")
@wan_hostname_orig = get_config(res.body, "<INPUT\ maxLength=39\ name=\"wan_hostname\"\ size=\"20\"\ value=\'(.*)\'\ onBlur=valid_name\\(this\,\"Host%20Name\"\\)><\/FONT><\/TD>")
@wan_mtu_orig = get_config(res.body, "<INPUT\ class=num\ maxLength=4\ onBlur=valid_mtu\\(this\\)\ size=5\ value='(.*)'\ name=\"wan_mtu\"><\/TD>")
if @wan_mtu_orig.to_i > 1500
@mtu_enable = "0"
end
@ui_language_orig = get_config(res.body, "<SCRIPT\ language=\"Javascript\"\ type=\"text\/javascript\" src=\"(.*)_lang_pack\/capsec.js\"><\/SCRIPT>")
@dhcp_lease_orig = get_config(res.body, "<INPUT\ maxLength=4\ onBlur=valid_range\(this\,0\,9999\,\"DHCP%20Lease%20Time\"\)\ size=4\ value=\'(.*)\'\ name=\"dhcp_lease\"\ class=num")
@dhcp_num_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,1\,253\,\"Number%20of%20DHCP%20users\"\)\;Sel_SubMask_onblur\(this.form.lan_netmask\,this.form\)\ size=3\ value=\'(.*)\'\ name=\"dhcp_num\"\ class=num><\/TD>")
@dhcp_start_orig = get_config(res.body, "Sel_SubMask_onblur\(this.form.lan_netmask\,this.form\)\ size=3\ value=\'(.*)\'\ name=\"dhcp_start\"\ class=num\ onChange=\"valid_dhcpd_start_ip\(this.form\,\ this\)\">")
@dhcp_lease_orig = get_config(res.body, "<INPUT\ maxLength=4\ onBlur=valid_range\\(this\,0\,9999\,\"DHCP%20Lease%20Time\"\\)\ size=4\ value=\'(.*)\'\ name=\"dhcp_lease\"\ class=num")
@dhcp_num_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,1\,253\,\"Number%20of%20DHCP%20users\"\\)\;Sel_SubMask_onblur\\(this.form.lan_netmask\,this.form\\)\ size=3\ value=\'(.*)\'\ name=\"dhcp_num\"\ class=num><\/TD>")
@dhcp_start_orig = get_config(res.body, "Sel_SubMask_onblur\\(this.form.lan_netmask\,this.form\\)\ size=3\ value=\'(.*)\'\ name=\"dhcp_start\"\ class=num\ onChange=\"valid_dhcpd_start_ip\\(this.form\,\ this\\)\">")
@netmask_orig = get_config(res.body, "value=.*\ selected\>255\.255\.255\.(.*)\<\/OPTION\>")
@wan_dns_orig = get_config(res.body, "<input\ type=hidden\ name=wan_dns\ value=(.*)>")
@wan_dns0_0_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,223\,\"DNS\"\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns0_0\"\ class=num\>")
@wan_dns0_1_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,255\,\"DNS\"\)\ size=3\ value=\'(.*)\' name=\"wan_dns0_1\"\ class=num\>")
@wan_dns0_2_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,255\,\"DNS\"\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns0_2\"\ class=num\>")
@wan_dns0_3_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,254\,\"DNS\"\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns0_3\"\ class=num\>")
@wan_dns1_0_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,223\,\"DNS\"\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns1_0\"\ class=num\>")
@wan_dns1_1_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,255\,\"DNS\"\)\ size=3\ value=\'(.*)\' name=\"wan_dns1_1\"\ class=num\>")
@wan_dns1_2_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,255\,\"DNS\"\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns1_2\"\ class=num\>")
@wan_dns1_3_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,254\,\"DNS\"\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns1_3\"\ class=num\>")
@wan_dns2_0_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,223\,\"DNS\"\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns2_0\"\ class=num\>")
@wan_dns2_1_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,255\,\"DNS\"\)\ size=3\ value=\'(.*)\' name=\"wan_dns2_1\"\ class=num\>")
@wan_dns2_2_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,255\,\"DNS\"\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns2_2\"\ class=num\>")
@wan_dns2_3_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,254\,\"DNS\"\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns2_3\"\ class=num\>")
@wan_dns0_0_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,223\,\"DNS\"\\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns0_0\"\ class=num\>")
@wan_dns0_1_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,255\,\"DNS\"\\)\ size=3\ value=\'(.*)\' name=\"wan_dns0_1\"\ class=num\>")
@wan_dns0_2_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,255\,\"DNS\"\\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns0_2\"\ class=num\>")
@wan_dns0_3_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,254\,\"DNS\"\\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns0_3\"\ class=num\>")
@wan_dns1_0_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,223\,\"DNS\"\\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns1_0\"\ class=num\>")
@wan_dns1_1_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,255\,\"DNS\"\\)\ size=3\ value=\'(.*)\' name=\"wan_dns1_1\"\ class=num\>")
@wan_dns1_2_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,255\,\"DNS\"\\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns1_2\"\ class=num\>")
@wan_dns1_3_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,254\,\"DNS\"\\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns1_3\"\ class=num\>")
@wan_dns2_0_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,223\,\"DNS\"\\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns2_0\"\ class=num\>")
@wan_dns2_1_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,255\,\"DNS\"\\)\ size=3\ value=\'(.*)\' name=\"wan_dns2_1\"\ class=num\>")
@wan_dns2_2_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,255\,\"DNS\"\\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns2_2\"\ class=num\>")
@wan_dns2_3_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,254\,\"DNS\"\\)\ size=3\ value=\'(.*)\'\ name=\"wan_dns2_3\"\ class=num\>")
@wan_wins_orig = get_config(res.body, "<input\ type=hidden\ name=wan_wins\ value=(.*)>")
@wan_wins_0_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,223\,\"WINS\"\)\ size=3\ value=\'(.*)\'\ name=\"wan_wins_0\"\ class=num>")
@wan_wins_1_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,255\,\"WINS\"\)\ size=3\ value=\'(.*)\'\ name=\"wan_wins_1\"\ class=num>")
@wan_wins_2_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,255\,\"WINS\"\)\ size=3\ value=\'(.*)\'\ name=\"wan_wins_2\"\ class=num>")
@wan_wins_3_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\(this\,0\,254\,\"WINS\"\)\ size=3\ value=\'(.*)\'\ name=\"wan_wins_3\"\ class=num>")
@wan_wins_0_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,223\,\"WINS\"\\)\ size=3\ value=\'(.*)\'\ name=\"wan_wins_0\"\ class=num>")
@wan_wins_1_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,255\,\"WINS\"\\)\ size=3\ value=\'(.*)\'\ name=\"wan_wins_1\"\ class=num>")
@wan_wins_2_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,255\,\"WINS\"\\)\ size=3\ value=\'(.*)\'\ name=\"wan_wins_2\"\ class=num>")
@wan_wins_3_orig = get_config(res.body, "<INPUT\ maxLength=3\ onBlur=valid_range\\(this\,0\,254\,\"WINS\"\\)\ size=3\ value=\'(.*)\'\ name=\"wan_wins_3\"\ class=num>")
end
def restore_conf(user,pass,uri)