Skip to content
/ pow Public

A non-parallelizable proof of work challenge system

License

Notifications You must be signed in to change notification settings

redpwn/pow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redpwnpow

A non-parallelizable proof of work challenge system

Install

To download, cache, and execute a binary to solve a PoW challenge in a single command, use:

curl -sSfL https://pwn.red/pow | sh -s challenge

Static binaries for Linux, Windows, and macOS are also available in GitHub releases.

If Go and libgmp are available, you can compile, install, and run with:

go install github.com/redpwn/pow/cmd/redpwnpow@latest
redpwnpow challenge

kCTF

redpwnpow can be used as a drop-in replacement for kCTF's proof of work solver.

Go module

Go Reference

Challenge example

package main

import (
	"bufio"
	"fmt"
	"os"

	"github.com/redpwn/pow"
)

func main() {
	c := pow.GenerateChallenge(5000)
	fmt.Printf("proof of work: curl -sSfL https://pwn.red/pow | sh -s %s\nsolution: ", c)
	s, _ := bufio.NewReader(os.Stdin).ReadString('\n')
	if good, err := c.Check(s); err == nil && good {
		fmt.Println("good")
	} else {
		fmt.Println("bad")
	}
}