<%
''الحصول على عنوان الزائر
ip=Request.ServerVariables(REMOTE_ADDR)
''نطاق عنوان IP المسموح به هو 10.0.0.0~10.68.63.255
allowip1=10.0.0.0
allowip2=10.68.10.71
Response.writecheckip(ip,allowip1,allowip2)
وظيفة التحقق (ip،allowip1،allowip2)
فحص خافت(4)
checkip=false
ipstr=سبليت(ip,.)
allow1=سبليت(allowip1,.)
allow2=split(allowip2,.)
ifcint(allow1(0))>cint(allow2(0))ثم'' يحدد ما إذا كان مقطع عنوان IP قانونيًا أم لا
استجابة.كتابة الوصول المحظور
وظيفة الخروج
com.endif
فوري = 0toubound(ipstr)
ifcint(allow1(i))<cint(allow2(i))then
ifcint(allow1(i))=cint(ipstr(i))then
تحقق (ط) = صحيح
checkip=true
exitfor
آخر
ifcint(ipstr(i))<cint(allow2(i))then
تحقق (ط) = صحيح
checkip=true
exitfor
آخر
ifcint(ipstr(i))>cint(allow2(i))then
تحقق (ط) = خطأ
checkip=false
exitfor
آخر
تحقق (ط) = صحيح
checkip=true
com.endif
com.endif
com.endif
آخر
ifcint(allow1(i))>cint(ipstr(i))orcint(allow1(i))<cint(ipstr(i))ثم
تحقق (ط) = خطأ
checkip=false
ifi<>ubound(ipstr)ثم
exitfor
com.endif
آخر
تحقق (ط) = صحيح
com.endif
com.endif
التالي
إذا (check(0)=trueandcheck(1)=trueandcheck(2)=trueandcheck(3)=false)and(cint(allow2(2))>cint(ipstr(2)))ثم
checkip=true
com.endif
endfunction
%>
مقتبس من مدونة WebShell