In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how VBS forges HTTP-REFERER, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Write a simple referer.php in the test directory with the following code
The copy code is as follows:
If you click on the link above, the page will display a link to the referer page.
The copy code is as follows:
Set http = CreateObject ("msxml2.xmlhttp")
Http.open "GET", "http://jb51.net/test/referer.php",False"
Http.setRequestHeader "Referer", "http://jb51.net""
Http.send
WScript.Echo http.responseText
But if I use VBS to call the msxml2.xmlhttp component to access the page, I return No Referer. It's really unthinkable. Is my code wrong?
So Google "VBS forged HTTP REFERER", found that most of the content found is the same as this article, do not need to read and copy paste, you copy mine, I copy yours, copy back and forth do not know whose it is, and it is wrong!
The first example of that article is from ASP.
The copy code is as follows:
Dim http
Set http=server.createobject ("MSXML2.XMLHTTP")
Http.open "GET", url,false
Http.setRequestHeader "Referer", "http://www.fromdomain.cn/""
Http.send ()
At first I thought that the VBS under ASP is different from the VBS that I run directly by double clicking. The one under ASP is more powerful and can be changed to Referer. To this end, I also installed a special IIS test, and found that the return is still No Referer. Later, I saw the following message, "forgive me for not familiar with asp, can not give you any help, check other materials for reference", "this I do not play asp, the code is just a reference, asp has not been tested."
I really do not want to scold people, even if you are not familiar with it, at least test it, how can you post the code that has not been tested? Later, I saw a more reliable answer in Qianyi Network (which seems to be a good network). Referer cannot be changed by setting Header in ASP and Ajax.
Angry, since the xmlhttp component is not working, I will use socket to write it! (note: not all computers have Winsock components registered)
The copy code is as follows:
Set socket = WScript.CreateObject ("MSWinsock.Winsock", "Winsock_")
Socket.RemoteHost = "jb51.net"
Socket.RemotePort = 80
Socket.Connect
Do
WScript.Sleep 100
Loop
Sub Winsock_Connect ()
Data = "GET / test/referer.php HTTP/1.1" & vbCrLf & _
"Referer: http://jb51.net" & vbCrLf & _
"Host: jb51.net" & vbCrLf & vbCrLf
Socket.SendData data
End Sub
Sub Winsock_DataArrival (bytesTotal)
Socket.GetData str
WScript.Echo Utf8ToUnicode (str)
WScript.Quit
End Sub
Utf8ToUnicode function is relatively long will not be posted, the previous article has written. The test results are as follows:
The copy code is as follows:
HTTP/1.1 200 OK
Date: Thu, 04 Nov 2010 14:05:20 GMT
Server: Apache
Transfer-Encoding: chunked
Content-Type: text/html
F
Http://jb51.net
0
You can be sure that the forgery of Referer was successful, but the result returned seems a little strange. What are the f and zeros on the front and back lines of jb51.net? (its practical browser access is also returned, except that the browser doesn't show it to us.) I guess f is the length of the Referer string, but I can't find an explanation after searching for a long time. Anyway, as long as the forgery is successful, the result will be ugly.
Thank you for reading this article carefully. I hope the article "how to fake VBS HTTP-REFERER" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.