forked from TheGreyDiamond/PyNetgearSwitchController
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpasswordGen.html
More file actions
173 lines (164 loc) · 7.13 KB
/
passwordGen.html
File metadata and controls
173 lines (164 loc) · 7.13 KB
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Password Hashgenerator</title>
<meta name="description" content="A password hashgenerator for NetGear-Switches">
<meta name="author" content="TheGreydiamond">
<style type="text/css">
.form-style-5{
max-width: 500px;
padding: 10px 20px;
background: #f4f7f8;
margin: 10px auto;
padding: 20px;
background: #f4f7f8;
border-radius: 8px;
font-family: Georgia, "Times New Roman", Times, serif;
}
.form-style-5 fieldset{
border: none;
}
.form-style-5 legend {
font-size: 1.4em;
margin-bottom: 10px;
}
.form-style-5 label {
display: block;
margin-bottom: 8px;
}
.form-style-5 input[type="text"],
.form-style-5 input[type="date"],
.form-style-5 input[type="datetime"],
.form-style-5 input[type="email"],
.form-style-5 input[type="number"],
.form-style-5 input[type="search"],
.form-style-5 input[type="time"],
.form-style-5 input[type="url"],
.form-style-5 textarea,
.form-style-5 select {
font-family: Georgia, "Times New Roman", Times, serif;
background: rgba(255,255,255,.1);
border: none;
border-radius: 4px;
font-size: 15px;
margin: 0;
outline: 0;
padding: 10px;
width: 100%;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
background-color: #e8eeef;
color:#8a97a0;
-webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.03) inset;
box-shadow: 0 1px 0 rgba(0,0,0,0.03) inset;
margin-bottom: 30px;
}
.form-style-5 input[type="text"]:focus,
.form-style-5 input[type="date"]:focus,
.form-style-5 input[type="datetime"]:focus,
.form-style-5 input[type="email"]:focus,
.form-style-5 input[type="number"]:focus,
.form-style-5 input[type="search"]:focus,
.form-style-5 input[type="time"]:focus,
.form-style-5 input[type="url"]:focus,
.form-style-5 textarea:focus,
.form-style-5 select:focus{
background: #d2d9dd;
}
.form-style-5 select{
-webkit-appearance: menulist-button;
height:35px;
}
.form-style-5 .number {
background: #1abc9c;
color: #fff;
height: 30px;
width: 30px;
display: inline-block;
font-size: 0.8em;
margin-right: 4px;
line-height: 30px;
text-align: center;
text-shadow: 0 1px 0 rgba(255,255,255,0.2);
border-radius: 15px 15px 15px 0px;
}
.form-style-5 input[type="submit"],
.form-style-5 input[type="button"]
{
position: relative;
display: block;
padding: 19px 39px 18px 39px;
color: #FFF;
margin: 0 auto;
background: #1abc9c;
font-size: 18px;
text-align: center;
font-style: normal;
width: 100%;
border: 1px solid #16a085;
border-width: 1px 1px 3px;
margin-bottom: 10px;
}
.form-style-5 input[type="submit"]:hover,
.form-style-5 input[type="button"]:hover
{
background: #109177;
}
</style>
</head>
<body>
<div class="form-style-5" id="replace">
<form>
<fieldset>
<legend> Password hashgenerator</legend>
<input type="text" name="field1" placeholder="Your Password">
<input type="text" name="field2" placeholder="Your Randomcode" value="123500541">
<input type="submit" value="Apply" />
</form>
</div>
<script type="text/javascript">
function merge(str1, str2){
var arr1 = str1.split("");
var arr2 = str2.split("");
var result = "";
var index1 = 0;
var index2 = 0;
while((index1 < arr1.length) || (index2 < arr2.length)){
if(index1 < arr1.length){
result += arr1[index1];
index1++;
}
if(index2 < arr2.length){
result += arr2[index2];
index2++;
}
}
return result;
}
eval((function(x){var d="";var p=0;while(p<x.length){if(x.charAt(p)!="`")d+=x.charAt(p++);else{var l=x.charCodeAt(p+3)-28;if(l>4)d+=d.substr(d.length-x.charCodeAt(p+1)*96-x.charCodeAt(p+2)+3104-l,l);else d+="`";p+=4}}return d})("(function ($) {` %%safe_add(x, y) {var lsw = (x & 65535) + (y` %%, m` 9$>> 16` 8#` \"&lsw` '#;return` L!<< 16 |` y!` d#;}`!?%bit_rol(num, cnt) {` U#num << cnt |` (!>>> 32 - cnt` W'md5_cmn(q, a, b, x, s, ` _'`\"C%`!%$` (%` 1%a, q),`\"i)t)), s), b)` +ff(`!$\"c, d` }/`!J$b & c | ~b & d`!O,` f+gg` KFd | c & ~` U<hh` MD^ c ^`!D=ii` JBc ^ (b | ~d)` X7binl_md5(x, len) {x[len >> 5] |= 128 << len % 32;x[(len + 64`%J!9 << 4) + 14] = len;var i, olda, oldb` '!c` '!d, a = 1732584193, b = -271733879, c = -` 8%4, d = ` 8$8;for (i = 0; i < x.length; i +=`(%!{olda = a;oldb = b;oldc = c;oldd = d;a =`%w1[i], 7, -680876936);d` B&`$8%c` G! + 1], 12, -389564586);c` G&` q\"`#{#` L!2], 17, 606105819);b` F&`!A%a` H$3], 22, -1044525330)`!d7 + 4`!|#176418897`!d;5`!|#120008042`!c<6`!|#-1473231341`!f;7`!}$45705983`!d;8`!}\"177003541`#f<9`#~$1958414417`!e;10`!}$42063`!a;11`#}%990404162`!d;12`!}#804603682`%j<3`!}$40341101`!c<4`#%502002290`!h<5`\"!#1236535329`!}&`-3,`'W%5, -165796510`!|&gg`!s/6], 9`')!69501632`!|&gg`!r0`(]!4, 64371771`$!'gg`!t,], 20, -37389730`#{'`!j15`!x#701558691`!`;`%R!9, 38016083`!]<`(W!4, -660478335`!b8`)V#`!}!405537848`!c;9`!|\"568446438`!a<4`#x%19803690`!e;`&R!4, -18736396`*\"'`!n18`!|#1163531501`%d<3`%}$44468146`,('`!q12`!~#51403784`!d;7`!|#173532847`%g9`)U$`$\"!1926607734`!{&`4G,`&!%4`&U!855`#{'hh`!m/8], 11, -202257446`%'hh`'n56, 1839030562`!z&hh`!p0`&&!3, -35309556`!c;1`!{#153099206`*!'`!q1`+[!1, 127289335`!e<`$#!6` ~!5497`*X!`!f:0`!|$109473064`23'`!p23`\"!\"681279174`!i8`#$35853722`,\"'`!l1`('!6, -72252197`43'`!l16`!y#7602918`.#'`!h19`#|#64036448`'}'`#m1`'#!`!}!421815835`%h<`,-!6, 53074252`0('`!m1`(%!3, -99533865`*#'ii`!t,], `${!9863084`#r'ii`!m/`%L!`+&!2689141`!t'ii`1{5`+&\"1635490`.''ii`!n/`2.!1, -57434055`!d8`#L$6, 170048557`0)'`!p1`%P!`+'!894986606`!f<0`!}%05152`,$'`!n11`!{$205492279`%~'`!p18`!}#873313359`!e;`%Q\"`35!061174`.('`!n16`!y%56019838`%~'`!o23`!#130915164`!e<4`&&$4552307`,%'`!o2`-_!`$%!120210379`!h;`([!5, 71878725`*%'`!p19`$\"$3434855`(&$safe_add(a, olda` a\"` -%b` 1!b`!G\"` -%c` 1!c`\"0\"` -%d` 1!d);}return [`\"p&];}function binl2rstr(input) {var i, output = \"\";for (i = 0; i < ` F!.length * 32; i += 8) {` Q#+= String.fromCharCode` \"[i >> 5] >>> i % 32 & 255`!d&` `\"`!]'rstr2binl`!O5[];` &\"[` =\"`!X$>> 2) - 1] = undefined`\"#-` V\"` N#`\")#1`\"'%[i]` F!}`\"L;8`\"Y-`\"D%|= `!R#c`\"g#At(i / 8)`\"W# <<`\"h#`\"J:_md5(s) {` >#`$Z&binl` 9!`#%&s), s`!V'))` ^,hmac` P!key, data`#T&bkey =`#s'key), ipad`#n!, op` \"%hash;ipad[15] =` 6!` $#`#n&if (bkey`$6% 16) {`!\"#`!x%b`!H!` ='* 8)`#m.16`$@'`!6!`$D!bkey[i] ^ 909522486;`!I!` /+1549556828;}hash`!6(ipad.concat`#D'`\"z!), 512 +`#(!`!T)`#x6o` d'hash), 640`#}-2hex`'V)hex_tab = \"0123456789abcdef\"`)Y), x, i`)O9`#!'x =` 4#`&b()`(\\# +=`!1$` ;!At(x`)i!4 & 15) +` -.` 4!`&6str`\"m!_utf8`\"9%` G#unescape(encodeURIComponent` D#`\"{)aw`'s,`(-&` z)s` K)hex` D0`#n!` j&` z,`(5&, d`!#+` 3%`!)*k),`\"A+d`!8-` \\7`!H%` 6*);}$.md5 = ` a%(s`.@!`(E!, raw) {if (!key` #$` 0\"` y#`\"[%` S!);} else`!5&`\"_$` 7$}` M2`+&*` R7` 23};})(typeof jQuery === \"`\"1$\" ?` 0$: this);"))
href = location.href;
sp = href.split("?")[1].split("&")
var i;
var randn = "";
var pass = "";
for (i = 0; i < sp.length; i++) {
if(sp[i].split("=")[0] == "field1"){
pass = sp[i].split("=")[1]
}
if(sp[i].split("=")[0] == "field2"){
randn = sp[i].split("=")[1]
}
}
function encryptPwd(){
var password = pass
var randNum = randn;
var resultStr = merge(password,randNum);
return(md5(resultStr));
}
console.log(sp)
document.getElementById('replace').innerHTML = encryptPwd();
</script>
</body>
</html>