<%
''방문자의 주소를 알아보세요
ip=Request.ServerVariables(REMOTE_ADDR)
''허용되는 IP 주소 범위는 10.0.0.0~10.68.63.255입니다.
허용ip1=10.0.0.0
허용ip2=10.68.10.71
response.writecheckip(ip,allowip1,allowip2)
functioncheckip(ip,allowip1,allowip2)
딤체크(4)
checkip=false
ipstr=분할(ip,.)
허용1=분할(allowip1,.)
허용2=분할(allowip2,.)
ifcint(allow1(0))>cint(allow2(0))then''은 IP 주소 세그먼트가 유효한지 여부를 결정합니다.
response.write액세스 금지
종료 기능
엔디프
fori=0toubound(ipstr)
ifcint(allow1(i))<cint(allow2(i))then
ifcint(allow1(i))=cint(ipstr(i))then
확인(i)=true
checkip=true
출구
또 다른
ifcint(ipstr(i))<cint(allow2(i))then
확인(i)=true
checkip=true
출구
또 다른
ifcint(ipstr(i))>cint(allow2(i))then
확인(i)=거짓
checkip=false
출구
또 다른
확인(i)=true
checkip=true
엔디프
엔디프
엔디프
또 다른
ifcint(allow1(i))>cint(ipstr(i))orcint(allow1(i))<cint(ipstr(i))then
확인(i)=거짓
checkip=false
ifi<>ubound(ipstr)then
출구
엔디프
또 다른
확인(i)=true
엔디프
엔디프
다음
if(check(0)=trueandcheck(1)=trueandcheck(2)=trueandcheck(3)=false)and(cint(allow2(2))>cint(ipstr(2)))then
checkip=true
엔디프
최종 기능
%>
WebShell 블로그에서 발췌