Program | Verification Code Original Program
Http://vifo.vicp.net:8088/datalib/ShowTopic.asp?id=108:10:1:1
A total of three main programs
My calling way <script language= "JavaScript" src= "/verify/num.asp" ></script>
Authentication mode if trim (loginnum) <>trim (Session ("Loginnum")) Then
Response.Write Error ("Authentication code is wrong!") ")
Response.End
End If
Num.asp
<%
' ### to Encrypt/decrypt include-code in your page
' ### strmyencryptedstring = encryptstring (strstring)
' ### strmydecryptedstring = decryptstring (strmyencryptedstring)
' ### you are the free to use this code as long as credits remain into place
' ### also if you are improve this code let me know.
Private Function encryptstring (strstring)
'####################################################################
' ### Crypt Function? 2001 by Slavic Kozyuk grindkore@yahoo.com ###
' ### arguments:strstring <---String wish to encrypt ###
' ### output:encrypted HEX string ###
'####################################################################
Dim Charhexset, Intstringlen, strtemp, Strraw, I, Intkey, Intoffset
Randomize Timer
Intkey = Round ((RND * 1000000) + 1000000) ' ##### Key bitsize
Intoffset = Round ((RND * 1000000) + 1000000) ' ##### keyoffset bitsize
If IsNull (strstring) = False Then
Strraw = strstring
Intstringlen = Len (Strraw)
For i = 0 to IntStringLen-1
strtemp = Left (Strraw, 1)
Strraw = Right (Strraw, Len (Strraw)-1)
Charhexset = Charhexset & Hex (ASC (strtemp) * Intkey) & Hex (Intkey)
Next
encryptstring = charhexset & "|" & Hex (Intoffset + intkey) & "|" & Hex (Intoffset)
Else
EncryptString = ""
End If
End Function
Private Function decryptstring (strcryptstring)
'####################################################################
' ### Crypt Function? 2001 by Slavic Kozyuk grindkore@yahoo.com ###
' ### arguments:encrypted HEX stringt ###
' ### output:decrypted ASCII string ###
'####################################################################
' ### Note This function uses Hexconv () and Get_hxno () functions ###
' ### so make sure they are not removed ###
'####################################################################
Dim Strraw, Arhexcharset, I, Intkey, Intoffset, Strrawkey, Strhexcrypdata
Strrawkey = Right (strcryptstring, Len (strcryptstring)-InStr (strcryptstring, "|"))
Intoffset = Right (Strrawkey, Len (Strrawkey)-InStr (Strrawkey, "|"))
Intkey = Hexconv (left (Strrawkey, InStr (Strrawkey, "|")-1))-Hexconv (Intoffset)
Strhexcrypdata = Left (strcryptstring, Len (strcryptstring)-(Len (Strrawkey) + 1))
Arhexcharset = Split (Strhexcrypdata, Hex (Intkey))
For i=0 to Ubound (Arhexcharset)
Strraw = Strraw & Chr (Hexconv (Arhexcharset (i))/intkey)
Next
decryptstring = Strraw
End Function
Private Function Hexconv (Hexvar)
Dim hxx, Hxx_var, multiply
IF hexvar <> "" THEN
Hexvar = UCASE (Hexvar)
Hexvar = StrReverse (Hexvar)
DIM HX ()
REDIM HX (LEN (Hexvar))
hXX = 0
Hxx_var = 0
For hxx = 1 to LEN (Hexvar)
IF multiply = "" THEN multiply = 1
HX (HXX) = Mid (hexvar,hxx,1)
Hxx_var = (Get_hxno (HX (HXX)) * multiply) + Hxx_var
Multiply = (Multiply * 16)
NEXT
Hexvar = Hxx_var
Hexconv = Hexvar
End IF
End Function
Private Function get_hxno (GHX)
If ghx = "A" Then
GHX = 10
ElseIf ghx = "B" Then
GHX = 11
ElseIf ghx = "C" Then
GHX = 12
ElseIf ghx = "D" Then
GHX = 13
ElseIf ghx = "E" Then
GHX = 14
ElseIf ghx = "F" Then
GHX = 15
End If
Get_hxno = Ghx
End Function
Randomize
Value of num = Int (7999*rnd+2000) ' counter
num2 = encryptstring (num)
Session ("Loginnum") =num
%>
document.write (" ' >") ' This is the path to the call picture
Count.asp
<!--#include file= "numimg.asp"-->
<%
' ### to Encrypt/decrypt include-code in your page
' ### strmyencryptedstring = encryptstring (strstring)
' ### strmydecryptedstring = decryptstring (strmyencryptedstring)
' ### you are the free to use this code as long as credits remain into place
' ### also if you are improve this