react
This commit is contained in:
9
JavaScript/javascript safe/.vscode/settings.json
vendored
Normal file
9
JavaScript/javascript safe/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"spellright.language": "en",
|
||||
"spellright.documentTypes": [
|
||||
"markdown",
|
||||
"latex",
|
||||
"plaintext",
|
||||
"html"
|
||||
]
|
||||
}
|
||||
30
JavaScript/javascript safe/index.html
Normal file
30
JavaScript/javascript safe/index.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Professional data safe</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
x = () => {
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
check = (a) => {
|
||||
localStorage.content = "pwwd24ctf189HIhi"
|
||||
k = document.getElementById("keyhole");
|
||||
a = document.getElementById("access");
|
||||
if (!x(k.value)) return a.innerHTML = "access denied"
|
||||
a.innerHTML = "access granted"
|
||||
password = Array.from(k.value).map(c => c.charCodeAt());
|
||||
encrypted = localStorage.content || '';
|
||||
content = encrypted.map((c, x) => c ^ password[i % k.value.length]).map(String.fromCharCode).join('');
|
||||
}
|
||||
</script>
|
||||
password: <input id="keyhole" type="text" autofocus onchange="check()" placeholder="🔑">
|
||||
<div id="access"></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user