-
Notifications
You must be signed in to change notification settings - Fork 0
/
2FA-Solver.html
198 lines (177 loc) · 6.58 KB
/
2FA-Solver.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
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2FA Solver</title>
<link rel="stylesheet" type="text/css" href="configs/default.css" />
<link rel="shortcut icon" type="image/x-icon" href="configs/favicon.ico" />
<script type="text/javascript" src="configs/sha.js"></script>
<link rel="stylesheet" type="text/css" href="configs/bootstrap.min.css">
<style>
body {
display: block; /* Change this from 'none' to 'block' */
}
body {
background-color: #f0f2f5;
padding: 20px;
}
.main {
background-color: white;
border-radius: 8px;
padding: 20px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.hd-1 {
background-color: #343a40;
color: white;
padding: 10px;
margin: -20px -20px 20px -20px;
border-radius: 8px 8px 0 0;
}
.otp-box {
width: 120px;
height: 40px;
font-size: 24px;
text-align: center;
padding: 5px;
resize: none;
overflow: hidden;
border: none;
background-color: #00ff00;
color: #000;
font-weight: bold;
}
.btn-order {
background-color: #28a745;
color: white;
border: none;
padding: 10px 15px;
border-radius: 4px;
cursor: pointer;
width: 100%;
margin-top: 15px;
}
.contact-info {
margin-top: 15px;
font-size: 14px;
}
</style>
</head>
<body>
<div class="main container">
<h1 class="hd-1">2FA Solver</h1>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="secret">2FA Secret (Pastikan sesuai dengan secret 2FA akun)</label>
<textarea id="secret" class="form-control" style="background:#e6f3ff" rows="1">4CMGD6DHKGLORNS5</textarea>
</div>
<div class="form-group">
<label>Updating in</label>
<div id="updatingIn"></div>
</div>
<div class="form-group">
<label>One-time Password</label>
<textarea readonly id="otp" class="otp-box"></textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Secret (hex)</label>
<div><span id="secretHex"></span> <span id="secretHexLength"></span></div>
</div>
<div class="form-group">
<label>Unix epoch div 30 (padded hex)</label>
<div id="epoch"></div>
</div>
<div class="form-group">
<div id="hmac"></div>
</div>
</div>
</div>
<button class="btn-order" onclick="window.open('https://shopee.co.id/daywalkerz', '_blank')">
Klik disini untuk order akun INSTAGRAM atau TWITTER lama
</button>
<div class="contact-info">
<p><strong>Author:</strong> Daywalkerz</p>
<p><strong>Nomor Whatsapp:</strong> <a href="tel:087822820054">087822820054</a></p>
<p><a href="https://shopee.co.id/daywalkerz" target="_blank">Shopee</a> | <a href="https://shopee.co.id/daywalkerz" target="_blank">shopee.co.id/daywalkerz</a></p>
</div>
</div>
<script src="configs/jquery.slim.min.js"></script>
<script type="text/javascript">
function dec2hex(s) { return (s < 15.5 ? '0' : '') + Math.round(s).toString(16); }
function hex2dec(s) { return parseInt(s, 16); }
function base32tohex(base32) {
var base32chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
var bits = "";
var hex = "";
// Remove any whitespace characters from the base32 string
base32 = base32.replace(/\s/g, '');
for (var i = 0; i < base32.length; i++) {
var val = base32chars.indexOf(base32.charAt(i).toUpperCase());
bits += leftpad(val.toString(2), 5, '0');
}
for (var i = 0; i+4 <= bits.length; i+=4) {
var chunk = bits.substr(i, 4);
hex = hex + parseInt(chunk, 2).toString(16);
}
return hex;
}
function leftpad(str, len, pad) {
if (len + 1 >= str.length) {
str = Array(len + 1 - str.length).join(pad) + str;
}
return str;
}
function updateOtp() {
var key = base32tohex($('#secret').val());
var epoch = Math.round(new Date().getTime() / 1000.0);
var time = leftpad(dec2hex(Math.floor(epoch / 30)), 16, '0');
// updated for jsSHA v2.0.0 - http://caligatio.github.io/jsSHA/
var shaObj = new jsSHA("SHA-1", "HEX");
shaObj.setHMACKey(key, "HEX");
shaObj.update(time);
var hmac = shaObj.getHMAC("HEX");
$('#secretHex').text(key);
$('#secretHexLength').text((key.length * 4) + ' bits');
$('#epoch').text(time);
$('#hmac').empty();
if (hmac == 'KEY MUST BE IN BYTE INCREMENTS') {
$('#hmac').append($('<span/>').addClass('label important').append(hmac));
} else {
var offset = hex2dec(hmac.substring(hmac.length - 1));
var part1 = hmac.substr(0, offset * 2);
var part2 = hmac.substr(offset * 2, 8);
var part3 = hmac.substr(offset * 2 + 8, hmac.length - offset);
if (part1.length > 0 ) $('#hmac').append($('<span/>').addClass('label label-default').append(part1));
$('#hmac').append($('<span/>').addClass('label label-primary').append(part2));
if (part3.length > 0) $('#hmac').append($('<span/>').addClass('label label-default').append(part3));
}
var otp = (hex2dec(hmac.substr(offset * 2, 8)) & hex2dec('7fffffff')) + '';
otp = (otp).substr(otp.length - 6, 6);
$('#otp').text(otp);
}
function timer()
{
var epoch = Math.round(new Date().getTime() / 1000.0);
var sect = " secs";
var countDown = 30 - (epoch % 30);
if (epoch % 30 == 0) updateOtp();
$('#updatingIn').text(countDown + sect);
}
$(function () {
updateOtp();
$('#update').click(function (event) {
updateOtp();
event.preventDefault();
});
$('#secret').keyup(function () {
updateOtp();
});
setInterval(timer, 1000);
});
</script>
</body>
</html>