asp³£Óú¯Êý
1.·Å×¢È뺯Êý
sub aspsql()
SQL_injdata = "'|;|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"
SQL_inj = split(SQL_Injdata,"|")
If Request.Form<>"" Then
For Each Sql_Post In Request.Form
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.Form(Sql_Post),Sql_Inj(Sql_DATA))>0 Then
response.write "<mce:script language='javascript'><!--
"
response.write "alert('ÍøÕ¾°²È«Ìáʾ£ºÇë²»ÒªÔÚ²ÎÊýÖаüº¬·Ç·¨×Ö·û£¡');"
response.write "location.href='javascript:history.go(-1)';"
response.write "
// --></mce:script>"
response.end
end if
next
next
end if
If Request.QueryString<>"" Then
For Each SQL_Get In Request.QueryString
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.QueryString(SQL_Get),Sql_Inj(Sql_DATA))>0 Then
response.write "<mce:script language='javascript'><!--
"
response.write "alert('ÍøÕ¾°²È«Ìáʾ£ºÇë²»ÒªÔÚ²ÎÊýÖаüº¬·Ç·¨×Ö·û£¡');"
response.write "location.href='javascript:history.go(-1)';"
response.write "
// --></mce:script>"
response.end
end if
next
Next
end If
end sub
2.»áÔ±ÃûÊÇ·ñº¬Óкº×Ö
function jc(s)
r=true
str="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXYZ"
for i=1 to len(s)
w=mid(s,i,1)
if instr(str,w)=0 then
r=false
end if
next
jc=r
end function
3.¹ýÂË×Ö·ûÖеÄÌØÊâ×Ö·û
Function inHTML(str)
Dim sTemp
sTemp = str
inHTML = ""
If IsNull(sTemp) = True Then
Exit Function
End If
sTemp = Replace(sTemp, "&", "&")
sTemp = Replace(sTemp, "<", "<")
sTemp = Replace(sTemp, ">", ">")
sTemp = Replace(sTemp, Chr(34), """)
inHTML = sTemp
End Function
4.'¾Ü¾ø¿äÕ¾Ìá½»´úÂë
function postFormfrom()
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
CuBox "ÄãÌá½»µÄ·¾¶ÓÐÎ󣬽ûÖ¹´ÓÕ¾µãÍⲿÌá½»Êý¾ÝÇë²»ÒªÂҸòÎÊý£¡",1,""
re
Ïà¹ØÎĵµ£º
½ñÌìÔÚÐÞ¸ÄÒÔÇ°¿ª·¢µÄÒ»¸öÍøÕ¾µÄʱºòÓöµ½Ò»¸öÎÊÌ⣬ÒòΪ¹¦ÄܵÄÐèÒª£¬ÒÔÇ°µÄÒ»¸öÊý×ÖÀàÐÍ×ֶθıäΪÎı¾×ֶΣ¬ÒòΪÕâ¸ö×Ö¶ÎÐèÒª°üº¬¶à¸öÀà±ðµÄID£¬ÒÔÇ°Õâ¸ö×Ö¶ÎÖ»¶ÔÓ¦Ò»¸öIDµÄ¡£
ÍøÕ¾ÊÇASP VBÓïÑԵģ¬Êý¾Ý¿âʹÓõÄÊÇAccess
ÐÞ¸ÄÊý¾ÝÀàÐÍÖ®ºóǰ̨µÄ²éѯ´úÂë¾Í²»ÄÜʹÓÃÖîÈçxID=1ÕâÖÖÌõ¼þÁË¡£ÓÉÓÚÏÖÔÚ¸Ã×ֶαäΪÎı¾ÀàÐ ......
<%
'//////////// GPS£ºGet Picture Size //////////////
'//////////////ÀûÓÃADODB.stream»ñȡͼƬ³ß´ç//////////////
Class GPS
Dim aso
Private Sub Class_Initialize
Set aso=CreateObject("Adodb.Stream")
aso.Mode=3
aso.Type=1
aso.Open
End Sub
Private Sub Class_Terminate
set aso=nothing
En ......
<%
Call RemoveAllCache()
Sub RemoveAllCache()
Dim cachelist,i
Call InnerHtml("UpdateInfo","<b>¿ªÊ¼Ö´ÐÐÇåÀíµ±Ç°Õ¾µã»º´æ</b>£º")
Cachelist=split(GetallCache(),",")
If UBound(cachelist)>1 Then
For i=0 to UBound(cachelist)-1
DelCahe Cachelist(i)
Call InnerHtml("UpdateInf ......
µÚÒ»ÖÖ·½·¨:
<%
d = date()
response.write d&" "&WeekdayName(Weekday(d))
%>
Êä³öÑùʽ:2004-5-7 ÐÇÆÚÎå
************************************************************************* ......
VISTA+IIS+ASP¼ÜÕ¾
1. VISTA裝IIS
1-1. ¿ØÖÆÃæ°åÖГ³ÌÐòºÍ¹¦ÄÜ”µÄλ ......