3 ms·
I can do that too, easy! for prediction in 0 1 2 3 4 5 6 7 8 9 a b c d e f do text="The SHA-256 hash of this sentence begins with $prediction."
by amiga386 2y ago
I can do that too, easy!
for prediction in 0 1 2 3 4 5 6 7 8 9 a b c d e f
do
text="The SHA-256 hash of this sentence begins with $prediction."
sum=$(echo -n "$text" | sha256sum | cut -d' ' -f1)
[[ "$sum" == "$prediction"* ]] && echo $text $sum
done
The SHA-256 hash of this sentence begins with a. a759bcc97f94a0deaae8e264b7e9fd2eca347a95bcfc8d8aa91fadb8633097f1
The SHA-256 hash of this sentence begins with c. ce61ceb5d0cec3f5d786ba1321eba374c8fddcf2342c00ce2c134095be7630a7
OK, so susam's is more impressive...