botMB to Hacker News · 14 days agoShow HN: SHAllenge – Compete to get the lowest hashshallenge.quirino.netexternal-linkmessage-square2fedilinkarrow-up13arrow-down10file-text
arrow-up13arrow-down1external-linkShow HN: SHAllenge – Compete to get the lowest hashshallenge.quirino.netbotMB to Hacker News · 14 days agomessage-square2fedilinkfile-text
minus-squareLvxferre@mander.xyzlinkfedilinkarrow-up1·13 days agoUpdate: so far my best string was lvxferre/Hello+Fediverse+2393194, yielding 0000006a 48... I also did some simple optimisations of the code. Basically “the least you do, the faster it’ll be”. i=7100000 while true; do o=$(echo "lvxferre/Hello+Fediverse+$i" | sha256sum) if [[ "$o" == 00000* ]]; then echo "$o $i"; fi if [[ "$i" == *00000 ]]; then echo "tried $i combinations..."; fi i=$[$i+1] done Now it’ll show results with more than five leading zeroes, and print a message every 100k tries (to resume later on). My machine is a potato, mind you. I don’t expect to get into the leaderboard. Still, I’m doing this as a bash exercise.
Update: so far my best string was
lvxferre/Hello+Fediverse+2393194
, yielding0000006a 48...
I also did some simple optimisations of the code. Basically “the least you do, the faster it’ll be”.
i=7100000 while true; do o=$(echo "lvxferre/Hello+Fediverse+$i" | sha256sum) if [[ "$o" == 00000* ]]; then echo "$o $i"; fi if [[ "$i" == *00000 ]]; then echo "tried $i combinations..."; fi i=$[$i+1] done
Now it’ll show results with more than five leading zeroes, and print a message every 100k tries (to resume later on).
My machine is a potato, mind you. I don’t expect to get into the leaderboard. Still, I’m doing this as a bash exercise.