close to prerelase
This commit is contained in:
parent
e55fbb5b67
commit
31022358ed
181 changed files with 2118 additions and 141 deletions
35
werc/tpl/_tools/hash.tpl
Normal file
35
werc/tpl/_tools/hash.tpl
Normal file
|
@ -0,0 +1,35 @@
|
|||
<h1>Password Hash Generator</h1>
|
||||
<p>This tool is for generating password hashes to be used for your Third Culture user account.</p>
|
||||
<form method="POST" action="" style="text-align: right; float: left;">
|
||||
<fieldset class="log">
|
||||
<label>Enter password: <input type="password" name="password" value="%($"post_arg_password%)"/></label><br>
|
||||
<label>Verify password: <input type="password" name="verify_password" value="%($"post_arg_verify_password%)"/></label><br>
|
||||
<input name="s" type="submit" value="Generate Hashes">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<br style="clear:left">
|
||||
|
||||
% if(~ $REQUEST_METHOD POST) {
|
||||
% if(~ $#post_arg_password 0 || ~ $#post_arg_verify_password 0) {
|
||||
<div class="notify_errors">Error: Both password fields are required!</div>
|
||||
% }
|
||||
% if not if(! ~ $"post_arg_password $"post_arg_verify_password) {
|
||||
<div class="notify_errors">Error: Passwords do not match!</div>
|
||||
% }
|
||||
% if not {
|
||||
% fn sanitize_input { printf '%s' $1 | sed 's/[[:cntrl:]]//g' }
|
||||
% clean_password=`{sanitize_input $"post_arg_password}
|
||||
% mkpasswd_hash=`{printf '%s' $"clean_password | mkpasswd}
|
||||
% htpasswd_hash=`{printf '%s' $"clean_password | htpasswd -n -b dummy - | sed 's/^dummy://'}
|
||||
<h3>Generated Hashes:</h3>
|
||||
<div class="copybox">
|
||||
<code>
|
||||
mkpasswd hash: <b>%(`{echo $mkpasswd_hash | sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/''/\"/g'}%)</b><br>
|
||||
htpasswd hash: <b>%(`{echo $htpasswd_hash | sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/''/\"/g'}%)</b>
|
||||
</code>
|
||||
</div>
|
||||
<small>Copy the output in the box above and send them to q. DM or over email (moridori@disroot.org).</small>
|
||||
<br />
|
||||
% }
|
||||
% }
|
Loading…
Add table
Add a link
Reference in a new issue