[原创]在ASP中的ASP代码色彩替换代码完美版倾情巨献
文章标题:[
原创]在ASP中的ASP代码色彩替换代码完美版倾情巨献顶部 勇敢的风 发布于:2005-06-0900:16 [楼主][原创]在ASP中的ASP代码色彩替换代码完美版倾情巨献
文章作者:勇敢的风[E.S.T顾问团](fengblog)
信息来源:邪恶八进制信息安全团队(eviloctal)
演示:fengblog/Look.asp?logid=354
[CODE]<%
functionasp(str)&;#39;asp代码色彩替换
str=replace(str,vbcrlf,"")
str=replace(str,"""","◆")
str=replace(str,"","
"&;vbcrlf)
dimre,Match,Matches
setre=NewRegExp
re.Global=True
re.IgnoreCase=True
dimvbscript_command
vbscript_command="Empty|False|Nothing|Null|True|Call|Class|Const|Dim|Do|Loop|Erase|ExecuteGlobal|Exit|For|Each|Next|For|Next|Function|If|Then|Else|On|Error|Option|Explicit|Private|Property|Get|Let|Set|Public|Randomize|ReDim|SelectCase|Set|Sub|While|Wend|With|end|resume"
vbscript_command=split(vbscript_command,"|")
fori=0toubound(vbscript_command)
iftrim(vbscript_command(i))<>""then
re.Pattern="\b("&;vbscript_command(i)&;quot;)\b"
str=re.Replace(str,"
$1")
endif
next
vbscript_command="Abs|Array|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Maths|Eval|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fixs|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Join|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trims|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|VarType|Weekday|WeekdayName|Year|not"
vbscript_command=split(vbscript_command,"|")
fori=0toubound(vbscript_command)
iftrim(vbscript_command(i))<>""then
re.Pattern="\b("&;vbscript_command(i)&;quot;)\b"
str=re.Replace(str,"$1")
endif
next
dimasp_command
asp_command="server|request|response|session|Application|ObjectContext|cookies|open|ActiveXControls|BackgroundSounds|Beta|CDF|Cookies|Crawler|CSSVersion|Frames|IFrames|JavaApplets|JavaScriptMajorVersion|MinorVersion|Name|NetCLR|Platform|Tables|Type|VBScript|Version|WAP|Win16|UserAgent|ClientCertificate|Form|QueryString|ServerVariables|TotalBytes|ContentType|BinaryRead|Buffer|CacheControl|ContentEncoding|ContentType|Expires|ExpiresAbsolute|PICS|Status|AddHeader|AppendToLog|BinaryWrite|Clear|Flush|IsClientConnected|MapToFile|Redirect|Write|ScriptTimeout|CreateObject|Execute|GetLastError|HTMLEncode|MapPath|Transfer|UrlEncode|LastAccessTime|SessionID|SessionKey|Timeout|Abandon|Reset|ApplicationID|Lock|Unlock"
asp_command=split(asp_co
mmand,"|")
fori=0toubound(asp_command)
iftrim(asp_command(i))<>""then
re.Pattern="\b("&;asp_command(i)&;quot;)\b"
str=re.Replace(str,"$1")
endif
next
re.Pattern="(&;#39;.[^\n|^◆]*)"
SetMatches=re.Execute(str)
ForEachMatchin