Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Import-Module C:\Users\erik\Documents\WASP\WASP.dll
- $eicar = "$env:TEMP\eicar.txt"
- $download = Invoke-WebRequest https://secure.eicar.org/eicar.com.txt -OutFile $eicar
- # try to open the downloaded virus
- $ErrorActionPreference = "Stop"
- try
- {
- $virus = gc $eicar
- write-host -ForegroundColor Red "Virus scanner NOT active"
- }
- catch
- {
- write-host -ForegroundColor Green "Virus scanner active"
- Select-Window -Title "Virus*" | Set-WindowActive
- sleep 2
- Select-Window -Title "Virus*" | Set-WindowActive | Remove-Window
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement