1

我找到了一个 .VBS 脚本来保护我的服务器,但我不是程序员。 此脚本阻止欺诈国家、匿名代理和受 Semalt 感染的服务器。 我们的服务器仅适用于欧洲市场。 有人可以告诉我这个脚本是否正常工作(通过测试它)或建议什么可以更好并告诉我如何检查被阻止的连接? 我已将所有源文件添加到 .rar 文件中。我的系统是带有 Wamp Apache 服务器的 Windows 8.1 x64。感谢您的支持...

> @echo off
> cls
> echo If you using a x32 system you need a x32 version, please download: http://www.maxmind.com/GeoIP-COM-1.3.zip
> echo and rename in this script SysWoW64 into system32
> echo.
> echo First we need to add GeoIpComEx.dll to the Windows register
> echo For more documentation please read: http://www.maxmind.com/GeoIP_MSCOM_64bit.pdf
> echo Copy GeoIpComEx.dll to your %systemroot%\SysWoW64\ directory
> pause
> %systemroot%\SysWoW64\regsvr32 /s /c "c:\windows\syswow64\GeoIpComEx.dll"
> echo GeoIpComEx.dll added to the Windows register
> pause
> cls
> echo Create a directory c:\wamp\geoip
> echo Copy all the *.dat files from: http://dev.maxmind.com/geoip/legacy/geolite/#Downloads
> echo and ftp://ftp.mrunix.net/pub/webalizer/geodb/ to the directory c:\Wamp\geoip
> echo.
> pause
> cls
> echo So you have downloaded all the *.dat files into the dir c:\wamp\geoip
> echo geodb.dat
> echo geoip.dat
> echo geoip.inc
> echo geoipasnum.dat
> echo geoipasnumv6.dat
> echo geoipcity.inc
> echo geoipv6.dat
> echo geolitecity.dat
> echo geolitecityv6.dat
> pause
> cls
> echo Because Win7 and Win8 has a problem to execute .VBS files we have to rename the script.exe files
> echo Rename cscript.exe into csadmin.exe
> rename "%systemroot%\SysWoW64\cscript.exe" "%systemroot%\SysWoW64\csadmin.exe"
> echo Rename wscript.exe into wsadmin.exe
> rename "%systemroot%\SysWoW64\wscript.exe" "%systemroot%\SysWoW64\wsadmin.exe"
> echo With Windows explorer give the files %systemroot%\SysWoW64\wscript.exe and %systemroot%\SysWoW64\wsadmin.exe > "admin rights"
> pause
> cls
> echo Now we execute the .vbs script %systemroot%\SysWoW64\csadmin.exe with geoip_block_countries1.vbs
> %systemroot%\SysWoW64\csadmin.exe //Nologo //B c:\wamp\vbs_firewall\geoip_block_countries1.vbs
> pause
> cls
> echo Please look in your log to see which countries were blocked.
> echo Add %systemroot%\SysWoW64\csadmin.exe //Nologo //B c:\wamp\vbs_firewall\geoip_block_countries1.vbs into your taskmanager when startup
> echo or start test_geoip_vbs2.cmd manuel after startup
> echo Reboot your PC/server
> pause

包含所有需要文件的完整脚本

4

0 回答 0