-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
89 lines (74 loc) · 3.86 KB
/
index.html
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
<!--
Password Generator
Made by Ridz97
23/10/2019
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<style>
body{
background-color: black;
}
.container{
text-align: center;
color: #00FF00;
margin-top: 5%;
}
</style>
<title>PassGen</title>
<!-- https://electronjs.org/docs/tutorial/security#csp-meta-tag -->
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
</head>
<body>
<div class="container">
<h1 class="align" id="align">Password Generator</h1>
<p class="align">Generate Your Strong Password With <b>PassGen</b></p>
<p class="align">Your password: </p>
<input class="align" type="text" id="pass">
<br><br>
<button class="align" type="button" onclick="reset()" style="border-radius: 5px;border: 1px #00FF00 solid;background-color: black;color: #00FF00;">Generate Password</button>
<br><br>
<button class="align" type="button" onclick="down()" style="border-radius: 5px;border: 1px #00FF00 solid;background-color: black;color: #00FF00;">Download Password</button>
<br><br>
<a href="white.html"><button type="button" class="align" style="font-size: small;border-radius: 5px;border: 1px #00FF00 solid;background-color: black;color: #00FF00;">Change Theme</button></a>
<p class="align"><a href="https://paypal.me/ridz97"><strong>Make donation</strong></a></p>
<p class="align"><i>version 2.3.2</i></p>
</div>
<!-- Some javascript for password generator -->
<script type="text/javascript">
// password generate here
function genr(lenght) {
var x = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&'()*+,-/:;<=>?@[]^_`{|}~";
var y = x.length;
var pass = "";
for(let i = 0; i < lenght; i++){
pass += x[Math.floor(Math.random()*y)];
}
return pass;
}
function reset() {
// get password lenght
var lenght = 20;
// fill password in the input
document.getElementById('pass').value = genr(lenght);
}
// generate text file
function down() {
var text = document.getElementById("pass").value;
var fileText = "Your password is " + text;
var blob = new Blob([fileText], {type: "text/plain;charset=utf-8"});
var fileName = "password" + ".txt";
FileSaver.saveAs(blob, fileName);
}
</script>
<script src="FileSaver.js"></script>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>
</html>