Process and principles of ASP verification code

xiaoxiao2021-03-06  134

##### Copyright reproduced leave thank you ##### ##### of parts of the program from the network: Yangzi ##### Email: yangzinet@hotmail.com ##### QQ: 21112856 ##### Website: www.tingfo.net 4 pages: form.asp; chk.asp; num.asp; count.asp Get an additional number.

encryption! Into a decrypted image using the session is determined to XBM form.asp <% '### To encrypt / decrypt include this code in your page' ### strMyEncryptedString = EncryptString (strString) '### strMyDecryptedString = DeCryptString (strMyEncryptedString)' # #################################################################################################################################################################################################################################################################################################### ######################################################################################################################################################################################################################################################################################################## ##### '### Crypt Function (c) 2001 by Slavic Kozyuk grindkore@yahoo.com ###' ### arguments: strstring <- string you wish to encrypt ### '### Output : Encrypted Hex String ### '#################################################################################################################################################################################################################################################### ################################################################################################################################## ) 1000000) '##### Key Bitsize INTOFFSET = ROUND ((RND * 1000000) 1000000)' #### kyoffset bitsize if isnull (strstring) = false dam = 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 ifnd function private function decryptstring (strcryptstring) '############## ######################################################################################################################################################################################################################################################################################################## #### '### Crypt Function (c) 2001 by Slavic Kozyuk Grindkore@yahoo.com ###'

### Arguments: Encrypted Hex Stringt ### '### Output: Decrypted ASCII STRING ###' ########################################################################################################################################################################################################################################################### ######################################################## HEXCONV () and get_hxno () Functions ### '### so make Sure the 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 = strRAWEnd 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 lenvar 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 IFEnd 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 = ghxend function %> <% randomizenum = int (7999 * RND 2000) 'counter Num2 = EncryptString (NUM) Session ("PWDT") = NUM%>

Please enter verification Code: TRIM (Session ("PWDT")) ")") The%> Enter an error: should be: <% = session ("pwdt")%>, you can enter Yes: <% = Request.form ("PWDS")%> <% else%> Enter correct <% end if%> count.asp <% ' ### to encrypt / decrypt include this code in your page '### strMyEncryptedString = encryptString (strString)' ### strMyDecryptedString = DeCryptString (strMyEncryptedString) '### You are free to use this code as long as credits remain in Place '### Also if you improve this code let me know (strivate function encryptstring (strstring)' ############# ######################################################################################################################################################################################################################################################################################################## ##### '### Crypt Function (c) 2001 by Slavic Kozyuk grindkore@yahoo.com ###' ### arguments: strstring <- string you wish to encrypt ### '### Output : Encrypted Hex String ### '

######################################################################################################################################################################################################################################################################################################## ############################################################################################################################################################################################################################################### ## 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 ifnd function private function decryptstring (strcryptstring) '#################################################################################################################################################################################################################################################### #################################################### Function (c) 2001 by slavic kozyuk grindkore@yahoo.com ### '### arguments: encrypted hex stringt ###' ### Output: DECR Ypted ascii string ### '############################################################################################################################################################################################################################################################################################# ################## ### Note this function uses HEXCONV () and get_hxno () functions ### '### So Make Sure the isy not removed ### '############################################################################################################################################################################################################################################################################################# ################################ (strightptstring, len) ) - 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 = strRAWEnd 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 = "" "" 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 IFEnd 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 = ghxEnd Function%> <% Dim ImageDim Width, HeightDim numDim digtalDim LengthDim sortLength = 4 'Customary Counter Length Redim Sort (LENGTH) NUM = CINT (DecryptString ("Sksid"))) Digital = "" "for i = 1 to length -len (num)' 补 0 Digital = Digital &" 0 "Nextfor I = 1 to Len (Num) Digital = Digital & Mid (Num, i, 1) Nextfor I =

1 TO LEN (DIGITAL) SORT (I) = MID (Digital, I, 1) NEXTWIDTH = 8 * LEN (DIGITAL) 'The height of the width = 10' image of the image, in this example, fixed value response.contentType = "image / x-xbitmap" hc = chr (13) & chr (10) Image = "#define counter_width" & Width & hcImage = Image & "#define counter_height" & Height & hcImage = Image & "static unsigned char counter_bits [ ] = {"& HC for i = 1 to height for j = 1 to length image = Image & a (sort (j), i) &", "nextnext image = left (image, len (image) - 1) ' Remove the last comma image = image & "};" & HC%> <% response.write image%> Num.asp <% DIM A (10, 10) A (0, 1) = "0x3c" 'Digital 0A ( 0, 2) = "0x66" A (0, 3) = "0xC3" A (0, 4) = "0xC3" A (0, 5) = "0xC3" A (0, 6) = "0xc3" A ( 0, 7) = "0xC3" A (0, 8) = "0xC3" A (0, 9) = "0x66" A (0, 10) = "0x3c" a (1, 1) = "0x18" number 1A (1, 2) = "0x1c" A (1, 3) = "0x18" A (1, 4) = "0x18" A (1,5) = "0x18" A (1, 6) = "0x18" A (1,7) = "0x18" A (1, 8) = "0x18" A (1, 9) = "0x18" a (0, 10) = "0x7e" a (2, 1) = "0x3c" 'Number 2a (2, 2) = "0x66" A (2, 3) = "0x60" A (2, 4) = "0x60" A (2, 5) = "0x30" A (2, 6) = " 0x18 "A (2, 7) =" 0x0c "a (2, 8) =" 0x06 "A (2 9) = "0x06" A (2, 10) = "0x7e" a (3, 1) = "0x3c" 'number 3a (3, 2) = "0x66" a (3, 3) = "0xc0" A (3, 4) = "0x60" a (3, 5) = "0x1c" a (3, 6) = "

0x60 "A (3, 7) =" 0xc0 "A (3, 8) =" 0xc0 "A (3, 9) =" 0x66 "A (3, 10) =" 0x38 "A (4, 1) =" 0x38 "'Number 4A (4, 2) =" 0x3C "A (4, 3) =" 0x36 "A (4, 4) =" 0x33 "A (4, 5) =" 0x33 "A (4, 6) = "0x33" A (4, 7) = "0xFF" A (4, 8) = "0x30" A (4, 9) = "0x30" a (4, 10) = "0xfe" A (5, 1) = "0xfe" 'Number 5A (5, 2) = "0xfe" A (5, 3) = "0x06" A (5, 4) = "0x06" a (5, 5) = "0x3e" a (5, 6) = "0x60" A (5, 7) = "0xc0" A (5, 8) = "0xC3" A (5, 9) = "0x66" A (5, 10) = "0x3c" A (6, 1) = "0x60" 'Number 6A (6, 2) = "0x30" A (6, 3) = "0x18" A (6, 4) = "0x0c" A (6, 5) = "0x3e" A ( 6, 6) = "0x63" A (6, 7) = "0xC3" A (6, 8) = "0xC3" A (6, 9) = "0x66" A (6, 10) = "0x3c" A ( 7, 1) = "0xFF" 'Number 7A (7, 2) = "0xc0" A (7, 3) = "0x60" A (7, 4) = "0x30" A (7, 5) = "0x18" A (7,6) = "0x18" A (7, 7) = "0x18" A (7, 8) = "0x18" A (7, 9) = "0x18" A (7, 10) = "0x18" A (8, 1) = "0x3c" 'Number 8A (8, 2) = "0x66" A (8, 3) = "0xC3" A (8, 4) = "0x66" A (8, 5) = " 0x3C "A (8, 6) =" 0x66 "A (8, 7) =" 0xc3 "A (8) =" 0xc3 "A (8, 9) =" 0x66 "A (8, 10) =" 0x3c "a (9, 1) =" 0x3c "'number 9A (9, 2) =" 0x66 "A (9, 3) =" 0xc3 "A (9, 4) =" 0xc3 "A (9, 5) = "0x66" A (9, 6) = "0x3c" A (9, 7) = "0x18" A (9, 8) = "0x0c"

转载请注明原文地址:https://www.9cbs.com/read-97328.html

New Post(0)