This repository provides a script to generate EICAR test files of exactly 68 KB in various formats:
- TXT
- XLS/XLSX
- ZIP
- Antivirus detection testing
- Security research & malware simulations
- Network monitoring validation
- CSP & file restriction testing
Before running the script, install the required dependencies:
pip install fpdf pandas openpyxl xlwt- Run the script:
python3 generate_eicar_file.py
- Choose the format in which the 68 KB EICAR test file should be generated:
1. txt 2. pdf 3. xls 4. xlsx 5. zip - Enter the number (1-5) for format selection.
To verify the file size in Linux:
ls -lh eicar_test_68kb.*Or use stat:
stat eicar_test_68kb.*Any antivirus product supporting the EICAR test file should detect it in any file that starts with the first 68 characters and has a total length of exactly 68 bytes:
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
The first 68 characters form the known string. It may be optionally appended by any combination of whitespace characters, with the total file length not exceeding 128 characters.
Reference: EICAR Official Website{:target="_blank"}
This project is released under the MIT License.