My web site is a hacked-together thing that's been gradually accumulating since the late 90s, so it's kind of ugly. The hashcash code is not very modular, either.
If you'd like to see it anyway, I pulled out the relevant parts here:
The comment-inline.js file is directly embedded in the HTML for the comments area, and is the glue code between the actual UI and the hashcash computation code. The hashcash.js file is where all the client-side work happens, and it handles the actual hashing, making multiple attempts, checking to see if an attempt produced a good result, and such. Then commentsubmit.py handles the server side by returning hashcash parameters when requested, and checking the provided hashcash for validity when submitting.
I have a brief blog post about it here, which you can also use to see the system in action:
If you'd like to see it anyway, I pulled out the relevant parts here:
https://gist.github.com/mikeash/daf02b6cc3017560f930515c3c17...
The comment-inline.js file is directly embedded in the HTML for the comments area, and is the glue code between the actual UI and the hashcash computation code. The hashcash.js file is where all the client-side work happens, and it handles the actual hashing, making multiple attempts, checking to see if an attempt produced a good result, and such. Then commentsubmit.py handles the server side by returning hashcash parameters when requested, and checking the provided hashcash for validity when submitting.
I have a brief blog post about it here, which you can also use to see the system in action:
https://www.mikeash.com/pyblog/testing-hashcash-based-anti-s...
If you have any questions, comments, or criticisms, please feel free to get in touch.