hl2guide

Malware Scan using EEK 1.0B - PowerShell

Jan 6th, 2018
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Malware Scanning using EEK
  2. # Updates and then scans a computer with the portable malware scanner, EEK (Emsisoft Emergency Kit) - https://www.emsisoft.com/en/software/eek/
  3. # Version: 1.0B
  4.  
  5. # Edit this to where you have EEK, download EEK from https://www.emsisoft.com/en/software/eek/
  6. $eekEXE = 'D:\Portable Virus Scanners\EEK\BIN64\a2cmd.exe'
  7.  
  8. # End edits
  9.  
  10. $process = $eekEXE
  11.  
  12. $StartTime = $(get-date)
  13. Write-Host 'Start Time:'$StartTime -ForegroundColor Magenta
  14.  
  15. Write-Host 'Updating EEK, please wait..' -ForegroundColor Cyan
  16.  
  17. # Run update
  18. $arguments = '/update'
  19. $process = Start-Process $eekEXE -ArgumentList $arguments -PassThru
  20. $process.WaitForExit()
  21.  
  22. #/memory /traces /pup /rootkits
  23. Write-Host 'Scanning with EEK, please wait..' -ForegroundColor Cyan
  24.  
  25. # Run update
  26. $arguments = '/rootkits /traces /pup /malware'
  27. $process = Start-Process $eekEXE -ArgumentList $arguments -PassThru
  28. $process.WaitForExit()
  29.  
  30. $result = $process.ExitCode
  31.  
  32. if($result -eq 0)
  33. {
  34.     Write-Host 'No malware found :D' -ForegroundColor Green
  35. }
  36. else
  37. {
  38.     Write-Host 'Malware found, check again with GUI version of EEK or other malware scanner :S' -ForegroundColor Yellow
  39. }
  40.  
  41. $elapsedTime = $(get-date) - $StartTime
  42.  
  43. $totalTime = "{0:HH:mm:ss}" -f ([datetime]$elapsedTime.Ticks)
  44. Write-Host 'Time taken:'$totalTime -ForegroundColor Magenta
Advertisement
Add Comment
Please, Sign In to add comment