當前位置:法律諮詢服務網 - 企業資訊 - ASP小偷程序的編寫

ASP小偷程序的編寫

我最近也正在研究這個東西,樓主看看這段程序,我用這段程序成功獲取了不少網站的信息。具體到不同的網站可能會有壹些小的修改,我們可以壹起討論。

<%

Dim Url,Content,awbno

Url = "網址"

awbno = Request.Form("awbno")

If awbno="" Or IsNull(awbno) Then

Content = GetData(Url,1)

Else

Content = PostData(Url&"return.asp","awbno=" & awbno,1)

End If

Content = Replace(Content,"images/",Url & "images/")

Content = Replace(Content,"return.asp","")

Response.Write Content

Function GetData(GetUrl,GetMode)

Dim Http

Set Http = Server.CreateObject("msxml2.XMLHTTP")

With Http

.Open "GET",GetUrl,False

.SetRequestHeader "Referer",GetUrl

.Send

If GetMode = 0 Then

GetData = .ResponseBody

Else

GetData = BytesToBstr(.ResponseBody,"GB2312")

End If

End With

Set Http = Nothing

End Function

Function PostData(PostUrl,PostStr,PostMode)

Dim Http

Set Http = Server.CreateObject("msxml2.XMLHTTP")

With Http

.Open "POST",PostUrl,False

.SetRequestHeader "Content-Length",Len(PostStr)

.SetRequestHeader "Content-Type","application/x-www-form-urlencoded"

.SetRequestHeader "Referer",PostUrl

.Send PostStr

If PostMode=0 Then

PostData = .ResponseBody

Else

PostData = BytesToBstr(.ResponseBody,"GB2312")

End If

End With

Set Http = Nothing

End Function

Function BytesToBstr(Body,Cset)

Dim ADOS

Set ADOS = Server.CreateObject("Adodb.Stream")

With ADOS

.Type = 1

.Mode =3

.Open

.Write Body

.Position = 0

.Type = 2

.Charset = Cset

BytesToBstr = .ReadText

.Close

End With

Set ADOS = Nothing

End Function

%>

  • 上一篇:經濟型酒店特點商務型酒店特點
  • 下一篇:眉山哪裏可以股票開戶
  • copyright 2024法律諮詢服務網