Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 1.14 KB

README.md

File metadata and controls

51 lines (37 loc) · 1.14 KB

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")
	}
}