-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgen_password.php
116 lines (114 loc) · 3.71 KB
/
gen_password.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
##############################################################################
# Password Hash Generator - 1.1 - 16.11.2020 © Alessandro Marinuzzi - G.P.L. #
# this script generates password for using with password_verify php function #
##############################################################################
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Alecos [Alessandro Marinuzzi]">
<meta name="generator" content="Notepad2">
<meta name="pragma" content="no-cache">
<meta name="robots" content="noindex, nofollow">
<title>Password Hash Generator</title>
<style type="text/css">
@import url('https://fonts.googleapis.com/css?family=Oswald');
@import url('https://fonts.googleapis.com/css?family=Roboto+Condensed');
html {
display: table;
}
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
body {
background-color: lightgray;
display: table-cell;
vertical-align: middle;
font-family: Oswald, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 18px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
}
.wrapper {
font-family: Oswald, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 18px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
border-radius: 7px;
border: 1px solid gray;
background-color: darkgray;
width: 800px;
height: auto;
margin-top: 50px;
margin-bottom: 50px;
vertical-align: middle;
text-align: center;
margin: 0 auto;
padding: 10px;
}
.title {
font-family: 'Roboto Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 26px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
}
.password {
border-right: #e6e6fa 1px solid;
border-top: #e6e6fa 1px solid;
border-left: #e6e6fa 1px solid;
border-bottom: #e6e6fa 1px solid;
color: #e6e6fa;
background-color: #32363c;
font-family: 'Roboto Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 14px;
font-weight: normal;
line-height: normal;
font-style: normal;
font-variant: normal;
margin-top: 3px;
margin-bottom: 3px;
border-radius: 3px;
vertical-align: middle;
}
.generate {
border-right: #e6e6fa 1px solid;
border-top: #e6e6fa 1px solid;
border-left: #e6e6fa 1px solid;
border-bottom: #e6e6fa 1px solid;
color: #e6e6fa;
background-color: #32363c;
font-family: 'Roboto Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 22px;
font-weight: normal;
line-height: normal;
font-style: normal;
font-variant: normal;
cursor: pointer;
margin-top: 3px;
margin-bottom: 3px;
border-radius: 5px;
vertical-align: middle;
}
</style>
</head>
<body>
<div class="wrapper">
<span class="title">Password Generator</span>
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES | ENT_HTML401, 'UTF-8'); ?>" method="post">
<label for="pass">Password:</label> <input class="password" type="password" name="pass" id="pass" value="<?php echo isset($_POST['pass']) && !empty($_POST['pass']) ? htmlspecialchars($_POST['pass'], ENT_NOQUOTES | ENT_HTML401, 'UTF-8') : ''; ?>"> <input class="password" readonly="readonly" type="text" style="width: 440px" name="pass_cripted" id="pass_cripted" value="<?php echo isset($_POST['pass']) && !empty($_POST['pass']) ? password_hash($_POST['pass'], PASSWORD_DEFAULT) : ''; ?>"> <input class="generate" type="submit" name="submit" value="Generate">
</form>
</div>
</body>
</html>