Last active
June 16, 2016 04:04
-
-
Save Au1st3in/11104784 to your computer and use it in GitHub Desktop.
Cleanup Infected LUA from Garry's Mod Client or Server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
cls | |
color 0f | |
title Garry's Mod LUA Infection Cleanup | |
if not exist garrysmod ( | |
echo -------------------------------------------------- | |
echo Wrong directory has been dectected | |
echo Move this .bat file to your Garry's Mod directory | |
echo -------------------------------------------------- | |
pause | |
exit | |
) | |
if exist "hl2.exe" ( | |
cd "garrysmod" | |
) else if exist "srcds.exe" ( | |
cd "garrysmod" | |
) | |
echo -------------------------------------------------- | |
echo Infected Files will be removed | |
echo from your Garry's Mod Directory | |
echo -------------------------------------------------- | |
pause | |
echo Cleaning Up Directory... | |
echo -------------------------------------------------- | |
taskkill /F /IM hl2.exe > nul | |
taskkill /F /IM srcds.exe > nul | |
echo -------------------------------------------------- | |
set i=0 | |
::Clientside | |
if exist "engine_win32.dll" ( | |
echo "engine_win32.dll" has been found. | |
set i=%i%+1 | |
attrib -h "engine_win32.dll" | |
del /F /Q "engine_win32.dll" | |
echo "engine_win32.dll" has been removed. | |
) else ( | |
echo "engine_win32.dll" has not been found. | |
) | |
if exist "materials\cooltexture.vtf" ( | |
echo "materials\cooltexture.vtf" has been found. | |
set i=%i%+1 | |
del /F /Q "materials\cooltexture.vtf" | |
echo "materials\cooltexture.vtf" has been removed. | |
) else ( | |
echo "materials\cooltexture.vtf" has not been found. | |
) | |
if exist "bin\game_shader_generic_engine.dll" ( | |
echo "bin\game_shader_generic_engine.dll" has been found. | |
set i=%i%+1 | |
attrib -h "bin\game_shader_generic_engine.dll" | |
del /F /Q "bin\game_shader_generic_engine.dll" | |
echo "bin\game_shader_generic_engine.dll" has been removed. | |
) else ( | |
echo "bin\game_shader_generic_engine.dll" has not been found. | |
) | |
if exist "download\engine_win32.dll" ( | |
echo "download\engine_win32.dll" has been found. | |
set i=%i%+1 | |
attrib -h "download\engine_win32.dll" | |
del /F /Q "download\engine_win32.dll" | |
echo "download\engine_win32.dll" has been removed. | |
) else ( | |
echo "download\engine_win32.dll" has not been found. | |
) | |
::Dir | |
if exist "download\cfg" ( | |
echo "download\cfg" has been found. | |
set i=%i%+1 | |
RD /S /Q "download\cfg" | |
echo "download\cfg" has been removed. | |
) else ( | |
echo "download\cfg" has not been found. | |
) | |
::Serverside | |
if exist "lua\autorun\server\default.lua" ( | |
echo "lua\autorun\server\default.lua" has been found. | |
set i=%i%+1 | |
attrib -h "lua\autorun\server\default.lua" | |
del /F /Q "lua\autorun\server\default.lua" | |
echo "lua\autorun\server\default.lua" has been removed. | |
) else ( | |
echo "lua\autorun\server\default.lua" has not been found. | |
) | |
echo -------------------------------------------------- | |
if %i% == 0 ( | |
call :ColorText 0a "%i%" | |
set /p ".= " <nul | |
echo Files have been removed. | |
) else ( | |
call :ColorText 0c "%i%" | |
set /p ".= " <nul | |
echo Files have been removed. | |
) | |
echo Cleanup is Complete. | |
echo -------------------------------------------------- | |
pause | |
exit | |
:ColorText [%1 = Color] [%2 = Text] | |
set /p ".=." > "%~2" <nul | |
findstr /v /a:%1 /R "^$" "%~2" nul 2>nul | |
set /p ".=" <nul | |
if "%3" == "end" set /p ".= " <nul | |
del "%~2" >nul 2>nul | |
exit /b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment