From 911c932ec426ee45c9380bd26714c4bb505a3a88 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 23 Mar 2025 12:47:10 +0800 Subject: Use a global struct with version and source info --- tmpl.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'tmpl.go') diff --git a/tmpl.go b/tmpl.go index 81659ea..a2e2c5b 100644 --- a/tmpl.go +++ b/tmpl.go @@ -46,13 +46,15 @@ for the JavaScript code in this page. +

Proof of Work Challenge

-

This site is protected by Powxy.

+
+

This site is protected by Powxy{{ if .Global.Version }} {{ .Global.Version }}{{ end }}.

You must complete this proof of work challenge before you could access this site.

{{- if .Message }}

{{ .Message }}

{{- end }} -

Select an nonce shorter than or equal to 32 bytes, such that when it is appended to the decoded form of the following base64 string, and a SHA-256 hash is taken as a whole, the first {{ .NeedBits }} bits of the SHA-256 hash are zeros. Within one octet, higher bits are considered to be in front of lower bits.

+

Select an nonce shorter than or equal to 32 bytes, such that when it is appended to the decoded form of the following base64 string, and a SHA-256 hash is taken as a whole, the first {{ .Global.NeedBits }} bits of the SHA-256 hash are zeros. Within one octet, higher bits are considered to be in front of lower bits.

{{ .UnsignedTokenBase64 }}

@@ -69,11 +71,14 @@ Please note that if your submission is successful, you will be given a cookie th

Offline solver program
` + html.EscapeString(solverProgram) + `
+

+Powxy is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License, version 3, as published by the Free Software Foundation. Powxy is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU Affero General Public License for more details. The source code is available at {{ .Global.SourceURL }} +