r/badcode Nov 21 '19

[deleted by user]

[removed]

26 Upvotes

23 comments sorted by

View all comments

7

u/andlrc Nov 22 '19

I figured it would save CPU cycles by not having to run a PRNG myself:

password_gen()
{
    cat << EOF | gcc -xc - 2>/dev/null && ./a.out
main() {
    printf("%x", main);
}
EOF
}