Skip to content

Instantly share code, notes, and snippets.

@lastcoolnameleft
Created October 18, 2019 19:13
Show Gist options
  • Save lastcoolnameleft/dd83f454fc4c988786acb40e411e0cc0 to your computer and use it in GitHub Desktop.
Save lastcoolnameleft/dd83f454fc4c988786acb40e411e0cc0 to your computer and use it in GitHub Desktop.
random-code-generator
#!/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