Random number directly generates an ASP code of the picture

zhaozj2021-02-16  169

The random number directly generates the ASP code of the picture, you can do the authentication code. Xbm.asp <% response.buffer = truewith response.expires = -1.addheader "pragma", "no-cache" .addheader "cache-ctrol" , "no-cache" end with

DIM Numrandomizenum = INT (7999 * RND 2000) Session ("Validatecode") = NUM

DIM imagedim width, Heightdim Digtaldim lengthdim sortdim hclength = 4 hc = chr (13) & chr (10)

Redim Sort (Length)

Digital = "" for i = 1 to length - len (num) Digital = Digital & "0" nextfor i = 1 to len (num) Digital = Digital & Mid (Num, i, 1) Nextfor i = 1 to LEN Digital) = MID (Digital, i, 1) NextWidth = 8 * LEN (DIGITAL) HEIGHT = 10

Response.contentType = "image / x-xbitmap"

Image = "#define counter_width" & width & hcimage = image "&" #define counter_height "& height & hcimage = image &" static unsigned char counter_bits [] = {"& HC

For i = 1 to Heightfor J = 1 to LengthImage = Image & A (Sort (j), i) & "," NextNext

Image = Left (image, len (image) - 1) Image = image & "};" & HC

Response.write image%>

Numcode.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" 'Digital 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, 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 "a (9, 9) =" 0x06 "A (9, 10) =" 0x03 "%>

When the reference, it is the same as inserted images

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

New Post(0)