4 ms·
Calculate `h=SHA256(original_page)` and `n=len(original_page)`. do page = gen_random_bytes(n) while (h != SHA256(page)) print page It can be
by viraptor 16y ago
Calculate `h=SHA256(original_page)` and `n=len(original_page)`.
do
page = gen_random_bytes(n)
while (h != SHA256(page))
print page
It can be even generated client-side!
- wwortiz 16y agoCan't the same hash mean different data?
- viraptor 16y agoWell, sure. But if you add another check for likelihood that `page` is fairly-correct html in utf8, there should be around one correct result really :) If you get 2, the other one is probably a <form> you can use to sell your soul to satan - do not hit submit if you get it.
- stcredzero 16y agoThe problem with this, is that the random bytes in one iteration of the loop might be closer to the page than the next iteration, so there would be reverse progress in that instance. This entry would be disqualified.
- meric 16y agopage_bytes = bytes(size_of(bytes_of(page))) do page_bytes += 1 while (page_bytes != bytes_of(page)) print page