Simple Anti-Virus Test

Started by spl, August 15, 2024, 03:33:19 AM

Previous topic - Next topic

spl

this one liner works in PS [Immediately sent to quarantine by Avast when I tested]
set-content "X5O!P%@AP[4`\PZX54(P^)7CC)7}`$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!`$H+H*" -path "c:\temp\eicar.com"

Tried to duplicate in WB. but appeared to be an issue as % in text needed to be %% - file was created with correct format but AV not alerted.
;Simple test for your Anti-Virus
;see https://en.wikipedia.org/wiki/EICAR_test_file
testvirus = "X5O!P%%@AP[4`\PZX54(P^)7CC)7}`$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!`$H+H*"
COMfile = "c:\temp\eicar.com"
FilePut(COMfile,testvirus)
Exit
;should alert your AV, but didn't work in WB

Maybe FileWrite(), ADO Stream , or Binary write would work.
Stan - formerly stanl [ex-Pundit]

spl

Would have expected at least one test with this.
Stan - formerly stanl [ex-Pundit]