mirror of
https://gitgud.io/fatchan/haproxy-protection.git
synced 2025-05-09 02:05:37 +00:00
Ability to choose between sha256 or argon2 with env var close #21
This commit is contained in:
@ -32,7 +32,7 @@ _M.body = [[
|
||||
<script src="/.basedflare/js/argon2.js"></script>
|
||||
<script src="/.basedflare/js/challenge.js"></script>
|
||||
</head>
|
||||
<body data-pow="%s" data-diff="%s" data-time="%s" data-kb="%s">
|
||||
<body data-pow="%s" data-diff="%s" data-time="%s" data-kb="%s" data-mode="%s">
|
||||
%s
|
||||
%s
|
||||
%s
|
||||
@ -50,7 +50,7 @@ _M.body = [[
|
||||
</html>
|
||||
]]
|
||||
|
||||
_M.noscript_extra = [[
|
||||
_M.noscript_extra_argon2 = [[
|
||||
<details>
|
||||
<summary>No JavaScript?</summary>
|
||||
<ol>
|
||||
@ -68,6 +68,24 @@ _M.noscript_extra = [[
|
||||
</details>
|
||||
]]
|
||||
|
||||
_M.noscript_extra_sha256 = [[
|
||||
<details>
|
||||
<summary>No JavaScript?</summary>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Run this in a linux terminal (requires <code>perl</code>):</p>
|
||||
<code style="word-break: break-all;">
|
||||
echo "dXNlIHN0cmljdDt1c2UgRGlnZXN0OjpTSEEgcXcoc2hhMjU2X2hleCk7cHJpbnQgIldvcmtpbmcuLi4iO215JGM9IiRBUkdWWzBdIi4iJEFSR1ZbMV0iO215JGlkPSRBUkdWWzRdKzA7bXkkZD0iMCJ4JGlkO215JGk9MDt3aGlsZSgxKXtsYXN0IGlmICRkIGVxIHN1YnN0ciBzaGEyNTZfaGV4KCRjLCRpKSwwLCRpZDskaSsrfXByaW50IlxuT3V0cHV0OlxuJEFSR1ZbMF0jJEFSR1ZbMV0jJEFSR1ZbMl0jJEFSR1ZbM10jJGlcbiI=" | base64 -d | perl -w - %s %s %s %s %s %s %s
|
||||
</code>
|
||||
<li>Paste the script output into the box and submit:
|
||||
<form method="post">
|
||||
<textarea name="pow_response" placeholder="script output" required></textarea>
|
||||
<div><input type="submit" value="submit" /></div>
|
||||
</form>
|
||||
</ol>
|
||||
</details>
|
||||
]]
|
||||
|
||||
-- title with favicon and hostname
|
||||
_M.site_name_section = [[
|
||||
<h3 class="pt">
|
||||
|
Reference in New Issue
Block a user