Created
October 18, 2019 19:13
-
-
Save lastcoolnameleft/dd83f454fc4c988786acb40e411e0cc0 to your computer and use it in GitHub Desktop.
random-code-generator
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/sh | |
a=0 | |
while [ $a -lt 1000 ] | |
do | |
# echo $a | |
a=`expr $a + 1` | |
#dd if=/dev/urandom of=main.c bs=100 count=1 >> random.log 2>&1 | |
</dev/urandom tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~ \n\t' | head -c 100 > main.c | |
gcc main.c >> compile.log 2>&1 | |
if [ $? ]; then | |
echo 'error compiling' $a | |
else | |
echo 'SUCCESSFULLY COMPILED!' | |
exit 0 | |
VAR='./a.out' | |
if [$VAR == 'Hello World']; then | |
echo FOUND IT!!!! | |
exit 0 | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment