Open sandeepshetty opened 10 years ago
Looks like @oshepherd though of this as well: http://owenshepherd.net/content/posts
Some example code I wrote to mint a hashcash. $counter could be sent as an additional Webmention POST var hashcash_counter
.
$source="http://bob.host/post-by-bob";
$target="http://alice.host/post-by-alice";
$zeros = 5;
$counter = 0;
do { $counter++; } while (substr(hash('sha1', "$source|$target|$counter"), 0, $zeros) !== str_repeat('0', $zeros));
echo "$source|$target|$counter: ".substr(hash('sha1', "$source|$target|$counter"), 0, $zeros)."\n";
$ echo -n "http://bob.host/post-by-bob|http://alice.host/post-by-alice|618275" | sha1sum | awk '{print $1}'
00000b8d455a229e04caf57175415e6e3846fd2e -
Pingback DDOS references:
Hashcash references: