Recently I found that many colleagues favor my website. When my colleagues helped me analyze the website logs, I was surprised to find that nearly 1M of the 2M logs were used to test the security of my website, of which at least 0.5M of the logs came from WVS. Acunetix Web Vulnerability Scanner is a foreign-made and excellent scanning tool that can help discover many vulnerabilities in the website, including common SQLinjection and XSS (many people who think they are awesome like to use WVS to scan the website and announce it when they find XSS) He discovered...). Since WVS is so awesome, let's not give it the opportunity to access the website and block it like SQL injection.
After analyzing the header files during WVS scanning, they basically contain the English name of its website: acunetix, so we started with this name. Here are three versions of the code:
1.ASP (JScript) version, for LBS users, you can use this (add or include it in the _common.asp file):
Copy the code code as follows:
<%
var StopScan=== WVS PLS GO AWAY! BY oldjun! ==;
var requestServer=String(Request.ServerVariables(All_Raw)).toLowerCase();
if(Session(stopscan)==1){
Response.Write(StopScan);
Response.End;
}
if(requestServer.indexOf(acunetix)>0){
Response.Write(StopScan);
Session(stopscan)=1;
Response.End;
}
%>
2.ASP (VBscript) version, general asp users can use this, just include it in conn.asp:
Copy the code code as follows:
<%
Dim StopScan,RequestServer
StopScan==== WVS PLS GO AWAY! BY oldjun! ==
RequestServer=Lcase(Request.ServerVariables(All_Raw))
If Session(stopscan)=1 Then
Response.Write(StopScan)
Response.End
End If
If instr(RequestServer,acunetix) Then
Response.Write(StopScan)
Session(stopscan)=1
Response.End
End If
%>
3.PHP version:
Copy the code code as follows:
<?php
$http=$_SERVER[ALL_HTTP];
If(isset($_COOKIE[StopScan]) && $_COOKIE[StopScan]){
die(== WVS PLS GO AWAY! BY oldjun! ==);
}
If(strpos(strtolower($http),acunetix)){
setcookie(StopScan, 1);
die(== WVS PLS GO AWAY! BY oldjun! ==);
}
?>
The code is very simple. This article just provides an idea. It can intercept general WVS scans. If the header information can be defined by yourself or if you encounter zwell's JSKY, you can find the best match~~~From oldjun