Advertisement
illpastethat

Batch File Count Files radio R2

Apr 23rd, 2011
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. color a
  3. Title Scanning Scripts For Malicious Code
  4. cls
  5. pushd "%C:%"
  6.  
  7. set scripts=%userprofile%\My Documents\RSBot\Scripts\Sources
  8. set precompiled=%userprofile%\My Documents\RSBot\Scripts\Precompiled
  9.  
  10. set I=1
  11. cd %scripts%
  12. FOR /f "tokens=*" %%P IN ('dir /A-d /b') do (set /a I+=1 "%%P")
  13. echo  %I% Scripts Loaded
  14. echo.
  15. echo A list of all open source scripts:
  16. echo.
  17. for %%i In ("%scripts%\*.java") DO echo %%i
  18. echo.
  19. echo A list of all pre-compiled scripts:
  20. echo.
  21. for %%i In ("%precompiled%\*.jar") DO echo %%i
  22. echo.
  23. echo A list of all URL's:
  24. echo.
  25. for /f "tokens=1-3* delims=:" %%a in (' findstr /n /I /R /C:"\<http\>" "%scripts%\*.java" ') do (
  26.     echo Line %%c in %%~nxb:%%d
  27. )
  28. echo.
  29. echo Opens a connection or reads a file:
  30. echo.
  31. for /f "tokens=1-3* delims=:" %%a in (' findstr /n /I /R /C:"\<.openConnection\>" /C:"\<.getInputStream\>" /C:"\<.out.print\>" /C:"\<.out.readLine\>" /C:"\<.out.print\>" /C:"\<BufferedReader\>" /C:"\<InputStreamReader\>" /C:"\<inputLine\>" "%scripts%\*.java" ') do (
  32.     echo Line %%c in %%~nxb:%%d
  33. )
  34. echo.
  35. echo Creates, deletes or renames a file:
  36. echo.
  37. for /f "tokens=1-3* delims=:" %%a in (' findstr /n /I /R /C:"\<.create\>" /C:"\<.delete\>" /C:"\<.renameTo\>" "%scripts%\*.java" ') do (
  38.     echo Line %%c in %%~nxb:%%d
  39. )
  40. echo.
  41. echo Contains a version checker:
  42. echo.
  43. for /f "tokens=1-3* delims=:" %%a in (' findstr /n /I /R /C:"\<.properties.version\>" /C:"\<Double.parseDouble\>" /C:"\<version.txt\>" /C:"\<version.php\>" /C:"\<updater.txt\>" /C:"\<updater.php\>" "%scripts%\*.java" ') do (
  44.     echo Line %%c in %%~nxb:%%d
  45. )
  46. echo.
  47. echo Steals your personal information:
  48. echo.
  49. for /f "tokens=1-3* delims=:" %%a in (' findstr /n /I /R /C:"\<RSBot_Accounts.ini\>" /C:"\<RSbot Accounts.ini\>" /C:"\<.getAccountsFile\>" /C:"\<AccountManager.getAccountNames\>" /C:"\<AccountManager.getPassword\>" /C:"\<AccountManager.getPin\>" /C:"\<AccountManager.getReward\>" /C:"\<AccountManager.isMember\>" /C:"\<System.getProperty\>" "%scripts%\*.java" ') do (
  50.     echo Line %%c in %%~nxb:%%d
  51. )
  52. popd
  53. echo.
  54. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement