62,234
社区成员




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>无标题页</title>
</head>
<body>
<script>
function tt(){alert(1)}
</script>
</body>
</html>
default.aspx
protected void Page_Load(object sender, EventArgs e)
{
System.Net.WebClient wc = new System.Net.WebClient();
string s = wc.DownloadString("http://localhost:2528/WebSite1/1.htm");
System.Text.RegularExpressions.Regex re=new System.Text.RegularExpressions.Regex("<script[^>]*>[^<]*<\\/script>",System.Text.RegularExpressions.RegexOptions.IgnoreCase);
string functions="tt";//函数名
System.Text.RegularExpressions.MatchCollection mcl= re.Matches(s, 0);
for (int i = 0; i < mcl.Count; i++)
{
Response.Write(mcl[i].Value);
}
Response.Write("<script>" + functions + "();</script>");
}