password.pl
Copying Source is Forbidden
55 lines of code
1
#!/usr/local/bin/perl
2
3
# this is a sandbox of sorts for testing purposes.
4
# currently, the goal is to attempt to "encrypt" a string
5
# client-side. i've yet to figure out if javascript can
6
# even do this!
7
8
binmode(STDIN, ":utf8");
9
binmode(STDOUT, ":utf8");
10
11
# must have's!
12
use strict;
13
use warnings;
14
use CGI::Carp qw(fatalsToBrowser);
15
use DBI;
16
use URI::Escape;
17
18
use lib "/var/www/html/Pm";
19
20
use Html qw(pre_html_header header);
21
use Bc_chef qw(cookie_get);
22
use Bc_misc qw(get_param referrer);
23
use Bc_sql qw(
24
get_constant
25
sql_execute
26
user_exists
27
$QUERY_PAGE
28
$QUERY_UID
29
$LOGGEDIN
30
31
$DB
32
);
33
34
use Security qw(banned);
35
use Redir qw(error_redir notice_redir);
36
37
my $DEBUG = 0;
38
39
my $output = pre_html_header();
40
my $password = get_param("password");
41
42
############################################################
43
44
### YOUR CONTENT HERE
45
if (not $password) {
46
$output .= "<form>Type password here: <input name=password type=password placeholder='a password field'><br><button>then click here</button>";
47
} else {
48
$output .= $password;
49
}
50
51
############################################################
52
53
print $output;
54
55
exit 1;