-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
62 lines (47 loc) · 1.6 KB
/
index.html
File metadata and controls
62 lines (47 loc) · 1.6 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Simple Python3 Obfuscator</title>
</head>
<body>
<script>
function setObfuscatedCodeText(value){
document.getElementById('obfuscated_code').value = value
}
function obfuscate(){
var normal_code = document.getElementById('normal_code').value
var content = normal_code;
for (let i = 0; i < getSliderValue(); i++) {
content = formatText(btoa(content))
}
setObfuscatedCodeText(content)
}
function getSliderValue(){
return document.getElementById("slider").value
}
function updateSlider() {
var x = getSliderValue();
document.getElementById("sliderValue").innerHTML = x;
}
function formatText(text){
return "exec(__import__('base64').b64decode(__import__('codecs').getencoder('utf-8')('"+text+"')[0]))"
}
</script>
<center>
<h1 id="shadowtext">Python3 Code Obfuscator</h1>
<textarea id="normal_code" rows="15" cols="70"></textarea>
<br><br><br><br><br>
<label for="slider", id="shadowtext">Interactions: <span id="sliderValue">30</span></label><br>
<input oninput="updateSlider()" type="range" id="slider" name="slider" min="0" max="60" step="1" value="30">
<br>
<button onclick="obfuscate()">Obfuscate!</button>
<br><br><br><br><br>
<textarea id="obfuscated_code" rows="15" cols="70"></textarea>
</center>
<br><br><br>
<p id="shadowtext"><u>Made by github.com/n0nexist</u></p>
</body>
</html>