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
| #!/bin/bash | |
| # fileless_eicar.sh | |
| # EICAR 測試字串 | |
| EICAR='X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*' | |
| # 用 /dev/shm 建立記憶體檔案 (tmpfs) | |
| MEMFILE=$(mktemp -u /dev/shm/eicar.XXXX) | |
| echo -n "$EICAR" > "$MEMFILE" |