ASP Thief program source code

Source: Internet
Author: User

Class Cls_ajax
Private Oajax, Oajax_rs
Private Oajax_beta, Oajax_method, Oajax_url, Oajax_char, Oajax_err

Private Sub Class_Initialize
Oajax_beta = "MSXML2." XMLHTTP "
Oajax_method = "Get"
Oajax_char = 1
Oajax_err = ""
End Sub
' Get Ajax Object version
'============================================================================
Public Property Let Isbeta (ByVal Beta)
If beta <> "" Then Oajax_beta = Beta
End Property

' Get submit Mode
'============================================================================
Public Property Let Ismethod (ByVal method)
Method = Lcase (method)
If method = ' Get ' or method = ' Post ' Then Oajax_method = method
End Property

' Get the URL to crawl
'============================================================================
Public Property Let Isurl (ByVal Url)
Oajax_url = Url
End Property

' Get Char
'============================================================================
Public Property Let Ischar (ByVal Char)
If ToInt (char) <>-1 Then oajax_char = Char
End Property

' Return the captured code
'============================================================================
Public Property Get GetCode ()
On Error Resume Next
Set Oajax = Server.CreateObject (Oajax_beta)
If err.number <> 0 Then oajax_err = "Ajax object creation failed!" "
Oajax.open Oajax_method, Oajax_url, False
Oajax.setrequestheader "Content-type", "application/x-www-form-urlencoded"
Oajax.send ()

If oajax.readystate = 4 Then
If Oajax_char = 0 Then
GetCode = Oajax.responsetext
Else
GetCode = ToGB2312 (oajax.responsebody)
End If
Else
Oajax_err = 1
End If
End Property

' Return error message, do not do well, error handling more troublesome
'============================================================================
Public Property Get Geterr ()
Geterr = Oajax_err
End Property

' Coded conversions
'============================================================================
Private Function ToGB2312 (ByVal strhtml)
Set oajax_rs = Server.CreateObject ("ADODB. RecordSet ")
OAjax_Rs.Fields.Append "Wellfrog", 201,1
Oajax_rs.open ()
Oajax_rs.addnew ()
Oajax_rs (0). AppendChunk (strhtml)
Oajax_rs.update ()
ToGB2312 = oajax_rs (0). Value
Oajax_rs.close ()
Set oajax_rs = Nothing
End Function

' Dedicated to Ischar validation
Private Function ToInt (ByVal testnum)
If IsNumeric (testnum) Then
ToInt = Testnum
Else
ToInt =-1
End If
End Function
Private Sub Class_Terminate ()
Set Oajax = Nothing
End Sub
End Class
%>

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.