From 0e69edc89ef86ea28192e8e69282cf61512a5c8d Mon Sep 17 00:00:00 2001 From: jvazquez-r7 Date: Sun, 7 Apr 2013 11:39:29 +0200 Subject: [PATCH] fixing use of regex --- .../linux/http/linksys_wrt54gl_apply_exec.rb | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb b/modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb index e89c70b875..edce150675 100644 --- a/modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb +++ b/modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb @@ -116,40 +116,40 @@ class Metasploit3 < Msf::Exploit::Remote @wait_time_orig = get_config(res.body, "") @need_reboot_orig = get_config(res.body, "") @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, "\") - @lan_ipaddr_2_orig = get_config(res.body, "\") - @lan_ipaddr_3_orig = get_config(res.body, "<\/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, "<\/FONT><\/TD>") - @wan_mtu_orig = get_config(res.body, "<\/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, "\") + @lan_ipaddr_2_orig = get_config(res.body, "\") + @lan_ipaddr_3_orig = get_config(res.body, "<\/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, "<\/FONT><\/TD>") + @wan_mtu_orig = get_config(res.body, "<\/TD>") if @wan_mtu_orig.to_i > 1500 @mtu_enable = "0" end @ui_language_orig = get_config(res.body, "<\/SCRIPT>") - @dhcp_lease_orig = get_config(res.body, "<\/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, "<\/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, "") - @wan_dns0_0_orig = get_config(res.body, "") - @wan_dns0_1_orig = get_config(res.body, "") - @wan_dns0_2_orig = get_config(res.body, "") - @wan_dns0_3_orig = get_config(res.body, "") - @wan_dns1_0_orig = get_config(res.body, "") - @wan_dns1_1_orig = get_config(res.body, "") - @wan_dns1_2_orig = get_config(res.body, "") - @wan_dns1_3_orig = get_config(res.body, "") - @wan_dns2_0_orig = get_config(res.body, "") - @wan_dns2_1_orig = get_config(res.body, "") - @wan_dns2_2_orig = get_config(res.body, "") - @wan_dns2_3_orig = get_config(res.body, "") + @wan_dns0_0_orig = get_config(res.body, "") + @wan_dns0_1_orig = get_config(res.body, "") + @wan_dns0_2_orig = get_config(res.body, "") + @wan_dns0_3_orig = get_config(res.body, "") + @wan_dns1_0_orig = get_config(res.body, "") + @wan_dns1_1_orig = get_config(res.body, "") + @wan_dns1_2_orig = get_config(res.body, "") + @wan_dns1_3_orig = get_config(res.body, "") + @wan_dns2_0_orig = get_config(res.body, "") + @wan_dns2_1_orig = get_config(res.body, "") + @wan_dns2_2_orig = get_config(res.body, "") + @wan_dns2_3_orig = get_config(res.body, "") @wan_wins_orig = get_config(res.body, "") - @wan_wins_0_orig = get_config(res.body, "") - @wan_wins_1_orig = get_config(res.body, "") - @wan_wins_2_orig = get_config(res.body, "") - @wan_wins_3_orig = get_config(res.body, "") + @wan_wins_0_orig = get_config(res.body, "") + @wan_wins_1_orig = get_config(res.body, "") + @wan_wins_2_orig = get_config(res.body, "") + @wan_wins_3_orig = get_config(res.body, "") end def restore_conf(user,pass,uri)