Created
January 13, 2019 11:13
-
-
Save mustafakirimli/83735fab732b73693cc193c786dac204 to your computer and use it in GitHub Desktop.
Create recursive zip file to test email security solutions whether blocking recursively zipped files
This file contains 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 | |
REC_COUNT=40 | |
echo "This script gonna create a zip file and make it ${REC_COUNT} times zipped resursively" | |
sleep 2 | |
echo "test content" > test0.txt | |
zip -r test0.zip test0.txt | |
for i in $(seq 1 $REC_COUNT) | |
do | |
zip -r "test${i}.zip" "test$(($i-1)).zip" | |
echo "zipping $i times" | |
done | |
echo "Creating final zip file" | |
mv "test${REC_COUNT}.zip" final-test-file.zip | |
echo "Cleaning up temp files" | |
rm -f test* | |
echo "Your ${REC_COUNT} times zipped file created: final-test-file.zip" | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment