-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
186 lines (157 loc) · 13.9 KB
/
index.html
File metadata and controls
186 lines (157 loc) · 13.9 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
174
175
176
177
178
179
180
181
182
183
184
185
186
<meta name='viewport' content='width=device-width, initial-scale=1'/><!DOCTYPE html>
<html lang="en" data-theme="light">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nothing Space - Domain Locked JS Obfuscator</title>
<meta name="description" content="Lock your JavaScript to a specific domain. Prevent code theft and unauthorized usage.">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script src="https://cdn.jsdelivr.net/npm/javascript-obfuscator/dist/index.browser.js"></script>
<script src="https://cdn.jsdelivr.net/npm/terser/dist/bundle.min.js"></script>
<style>
:root {
--bg-color: #ffffff;
--text-main: #111111;
--text-muted: #555555;
--accent: #000000;
--card-bg: #fdfdfd;
--border-color: #eaeaea;
--shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
--success: #10b981;
--danger: #ef4444;
--warning: #f59e0b;
--info: #3b82f6;
}
* { box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
background-color: var(--bg-color);
color: var(--text-main);
margin: 0;
padding: 0;
line-height: 1.6;
}
.container { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
header { text-align: center; margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid var(--border-color); }
header h1 { font-size: 2.8rem; color: var(--text-main); margin-bottom: 15px; }
header p { color: var(--text-muted); font-size: 1.1rem; max-width: 750px; margin: 0 auto; }
.tool-box {
background: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 30px;
box-shadow: var(--shadow);
margin-bottom: 40px;
}
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 25px; }
.option-card {
border: 2px solid var(--border-color);
border-radius: 8px;
padding: 15px;
cursor: pointer;
transition: all 0.2s;
position: relative;
}
.option-card:hover { background: #fafafa; }
.option-card input[type="radio"] { position: absolute; top: 15px; right: 15px; transform: scale(1.2); }
.option-card.selected-low { border-color: var(--success); background: #f0fdf4; }
.option-card.selected-high { border-color: var(--danger); background: #fef2f2; }
.option-card h4 { margin: 0 0 5px 0; font-size: 1.1rem; }
.option-card p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
/* Domain Input Style */
.domain-section {
background: #eff6ff;
border: 1px solid #bfdbfe;
padding: 20px;
border-radius: 8px;
margin-bottom: 25px;
}
.domain-section h3 { margin: 0 0 8px 0; font-size: 1.1rem; color: #1e3a8a; }
.domain-section p { margin: 0 0 12px 0; font-size: 0.9rem; color: #3b82f6; }
.domain-input {
width: 100%;
padding: 12px 15px;
border: 1px solid #93c5fd;
border-radius: 6px;
font-size: 1rem;
font-family: monospace;
outline: none;
}
.domain-input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .grid, .options-grid { grid-template-columns: 1fr; } }
textarea {
width: 100%; height: 250px; padding: 15px; background-color: #1a1a1a;
color: #4af626; border: 1px solid var(--border-color); border-radius: 8px;
font-family: 'Courier New', Courier, monospace; font-size: 13px; resize: vertical;
margin-bottom: 10px; word-break: break-all;
}
textarea:focus { outline: none; border-color: var(--text-main); }
.stats-bar {
background: #fafafa; padding: 15px; border-radius: 8px; margin: 20px 0;
display: flex; justify-content: space-around; text-align: center; border: 1px solid var(--border-color);
}
.stat-item h4 { margin: 0 0 5px 0; color: var(--text-muted); font-size: 0.9rem; }
.stat-item span { font-size: 1.2rem; font-weight: bold; color: var(--text-main); }
.btn-group { display: flex; gap: 15px; }
.btn-main {
flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: 10px;
background: var(--text-main); color: var(--bg-color); font-weight: 600; padding: 14px 28px;
border-radius: 8px; border: none; cursor: pointer; transition: all 0.2s ease; font-size: 1.05rem;
}
.btn-main:hover:not(:disabled) { background: var(--accent); color: white; transform: translateY(-2px); }
.btn-copy { background: var(--success); }
.btn-copy:hover:not(:disabled) { background: #059669; }
</style>
</head>
<body>
<div class="container">
<header>
<h1>🛡️ Anti-Theft JS Obfuscator</h1>
<p>Bind your JavaScript to your website. If anyone steals it, the code will destroy itself.</p>
</header>
<div class="tool-box">
<div class="domain-section">
<h3><i class="fa-solid fa-lock"></i> Domain Lock (Optional but Recommended)</h3>
<p>Enter the website where this code is allowed to run. If copied elsewhere, it will redirect to a blank page.</p>
<input type="text" id="domainInput" class="domain-input" placeholder= "(Leave blank for no lock)">
</div>
<h3 style="margin-top:0; font-size:1.1rem; margin-bottom: 10px;">⚙️ Optimization Level</h3>
<div class="options-grid">
<label class="option-card selected-low" id="card-low" onclick="selectOption('low')">
<input type="radio" name="obfLevel" value="low" checked>
<h4 style="color: var(--success)">Zero-Bloat Alien Mode</h4>
<p>Crushes file size. Best if you just want to combine this with Domain Lock without making the file heavy.</p>
</label>
<label class="option-card" id="card-high" onclick="selectOption('high')">
<input type="radio" name="obfLevel" value="high">
<h4 style="color: var(--danger)">Anti-AI Paranoia Mode</h4>
<p>Encrypts strings and injects traps. AI will fail to reverse it, but file size will increase significantly.</p>
</label>
</div>
<div class="grid">
<div>
<h3><i class="fa-solid fa-code"></i> Original Code</h3>
<textarea id="inputCode" placeholder="Paste your JavaScript code here..."></textarea>
</div>
<div>
<h3><i class="fa-solid fa-shield-halved"></i> Output <span id="copyStatus" style="color: var(--success); font-size: 14px;"></span></h3>
<textarea id="outputCode" placeholder="Locked code will appear here..." readonly></textarea>
</div>
</div>
<div class="stats-bar">
<div class="stat-item"><h4>Original Size</h4><span id="origSize">0 B</span></div>
<div class="stat-item"><h4>New Size</h4><span id="obfSize">0 B</span></div>
<div class="stat-item"><h4>Difference</h4><span id="sizeDiff">0 B</span></div>
</div>
<div class="btn-group">
<button id="processBtn" class="btn-main" onclick="processCode()"><i class="fa-solid fa-gears"></i> Process & Auto-Copy</button>
<button id="copyBtn" class="btn-main btn-copy" onclick="manualCopy()" disabled><i class="fa-regular fa-copy"></i> Copy Manually</button>
</div>
</div>
</div>
<script>
function e(a){document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x63\x61\x72\x64\x2d\x6c\x6f\x77')['\x63\x6c\x61\x73\x73\x4c\x69\x73\x74']['\x72\x65\x6d\x6f\x76\x65']('\x73\x65\x6c\x65\x63\x74\x65\x64\x2d\x6c\x6f\x77'),document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x63\x61\x72\x64\x2d\x68\x69\x67\x68')['\x63\x6c\x61\x73\x73\x4c\x69\x73\x74']['\x72\x65\x6d\x6f\x76\x65']('\x73\x65\x6c\x65\x63\x74\x65\x64\x2d\x68\x69\x67\x68'),'\x6c\x6f\x77'===a?(document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x63\x61\x72\x64\x2d\x6c\x6f\x77')['\x63\x6c\x61\x73\x73\x4c\x69\x73\x74']['\x61\x64\x64']('\x73\x65\x6c\x65\x63\x74\x65\x64\x2d\x6c\x6f\x77'),document['\x71\x75\x65\x72\x79\x53\x65\x6c\x65\x63\x74\x6f\x72']('\x69\x6e\x70\x75\x74\x5b\x76\x61\x6c\x75\x65\x3d\x22\x6c\x6f\x77\x22\x5d')['\x63\x68\x65\x63\x6b\x65\x64']=!0x0):(document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x63\x61\x72\x64\x2d\x68\x69\x67\x68')['\x63\x6c\x61\x73\x73\x4c\x69\x73\x74']['\x61\x64\x64']('\x73\x65\x6c\x65\x63\x74\x65\x64\x2d\x68\x69\x67\x68'),document['\x71\x75\x65\x72\x79\x53\x65\x6c\x65\x63\x74\x6f\x72']('\x69\x6e\x70\x75\x74\x5b\x76\x61\x6c\x75\x65\x3d\x22\x68\x69\x67\x68\x22\x5d')['\x63\x68\x65\x63\x6b\x65\x64']=!0x0);}function t(a){return new Blob([a])['\x73\x69\x7a\x65'];}function n(a){if(0x0===a)return'\x30\x20\x42';const b=Math['\x66\x6c\x6f\x6f\x72'](Math['\x6c\x6f\x67'](a)/Math['\x6c\x6f\x67'](0x400));return parseFloat((a/Math['\x70\x6f\x77'](0x400,b))['\x74\x6f\x46\x69\x78\x65\x64'](0x2))+'\x20'+['\x42','\x4b\x42','\x4d\x42'][b];}async function o(){const b=document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x69\x6e\x70\x75\x74\x43\x6f\x64\x65')['\x76\x61\x6c\x75\x65'],f=document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x6f\x75\x74\x70\x75\x74\x43\x6f\x64\x65'),h=document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x70\x72\x6f\x63\x65\x73\x73\x42\x74\x6e'),j=document['\x71\x75\x65\x72\x79\x53\x65\x6c\x65\x63\x74\x6f\x72']('\x69\x6e\x70\x75\x74\x5b\x6e\x61\x6d\x65\x3d\x22\x6f\x62\x66\x4c\x65\x76\x65\x6c\x22\x5d\x3a\x63\x68\x65\x63\x6b\x65\x64')['\x76\x61\x6c\x75\x65'],k=document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x64\x6f\x6d\x61\x69\x6e\x49\x6e\x70\x75\x74')['\x76\x61\x6c\x75\x65']['\x74\x72\x69\x6d']();if(b['\x74\x72\x69\x6d']()){h['\x69\x6e\x6e\x65\x72\x48\x54\x4d\x4c']='\x3c\x69\x20\x63\x6c\x61\x73\x73\x3d\x22\x66\x61\x2d\x73\x6f\x6c\x69\x64\x20\x66\x61\x2d\x73\x70\x69\x6e\x6e\x65\x72\x20\x66\x61\x2d\x73\x70\x69\x6e\x22\x3e\x3c\x2f\x69\x3e\x20\x50\x72\x6f\x63\x65\x73\x73\x69\x6e\x67\x2e\x2e\x2e',h['\x64\x69\x73\x61\x62\x6c\x65\x64']=!0x0;try{const p=t(b);let q='',v=(await Terser['\x6d\x69\x6e\x69\x66\x79'](b,{'\x6d\x61\x6e\x67\x6c\x65':{'\x74\x6f\x70\x6c\x65\x76\x65\x6c':!0x0},'\x63\x6f\x6d\x70\x72\x65\x73\x73':{'\x70\x61\x73\x73\x65\x73':0x2},'\x66\x6f\x72\x6d\x61\x74':{'\x63\x6f\x6d\x6d\x65\x6e\x74\x73':!0x1}}))['\x63\x6f\x64\x65'],w={};if(w='\x6c\x6f\x77'===j?{'\x63\x6f\x6d\x70\x61\x63\x74':!0x0,'\x63\x6f\x6e\x74\x72\x6f\x6c\x46\x6c\x6f\x77\x46\x6c\x61\x74\x74\x65\x6e\x69\x6e\x67':!0x1,'\x69\x64\x65\x6e\x74\x69\x66\x69\x65\x72\x4e\x61\x6d\x65\x73\x47\x65\x6e\x65\x72\x61\x74\x6f\x72':'\x6d\x61\x6e\x67\x6c\x65\x64','\x73\x74\x72\x69\x6e\x67\x41\x72\x72\x61\x79':!0x1,'\x75\x6e\x69\x63\x6f\x64\x65\x45\x73\x63\x61\x70\x65\x53\x65\x71\x75\x65\x6e\x63\x65':!0x0}:{'\x63\x6f\x6d\x70\x61\x63\x74':!0x0,'\x63\x6f\x6e\x74\x72\x6f\x6c\x46\x6c\x6f\x77\x46\x6c\x61\x74\x74\x65\x6e\x69\x6e\x67':!0x0,'\x63\x6f\x6e\x74\x72\x6f\x6c\x46\x6c\x6f\x77\x46\x6c\x61\x74\x74\x65\x6e\x69\x6e\x67\x54\x68\x72\x65\x73\x68\x6f\x6c\x64':0x1,'\x64\x65\x61\x64\x43\x6f\x64\x65\x49\x6e\x6a\x65\x63\x74\x69\x6f\x6e':!0x0,'\x69\x64\x65\x6e\x74\x69\x66\x69\x65\x72\x4e\x61\x6d\x65\x73\x47\x65\x6e\x65\x72\x61\x74\x6f\x72':'\x68\x65\x78\x61\x64\x65\x63\x69\x6d\x61\x6c','\x73\x74\x72\x69\x6e\x67\x41\x72\x72\x61\x79':!0x0,'\x73\x74\x72\x69\x6e\x67\x41\x72\x72\x61\x79\x45\x6e\x63\x6f\x64\x69\x6e\x67':['\x72\x63\x34'],'\x73\x74\x72\x69\x6e\x67\x41\x72\x72\x61\x79\x54\x68\x72\x65\x73\x68\x6f\x6c\x64':0x1},k){let A=k['\x72\x65\x70\x6c\x61\x63\x65'](/(^\w+:|^)\/\//,'')['\x73\x70\x6c\x69\x74']('\x2f')[0x0];w['\x64\x6f\x6d\x61\x69\x6e\x4c\x6f\x63\x6b']=[A],w['\x64\x6f\x6d\x61\x69\x6e\x4c\x6f\x63\x6b\x52\x65\x64\x69\x72\x65\x63\x74\x55\x72\x6c']='\x61\x62\x6f\x75\x74\x3a\x62\x6c\x61\x6e\x6b';}q=JavaScriptObfuscator['\x6f\x62\x66\x75\x73\x63\x61\x74\x65'](v,w)['\x67\x65\x74\x4f\x62\x66\x75\x73\x63\x61\x74\x65\x64\x43\x6f\x64\x65'](),f['\x76\x61\x6c\x75\x65']=q;const x=t(q),y=x-p;document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x6f\x72\x69\x67\x53\x69\x7a\x65')['\x69\x6e\x6e\x65\x72\x54\x65\x78\x74']=n(p),document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x6f\x62\x66\x53\x69\x7a\x65')['\x69\x6e\x6e\x65\x72\x54\x65\x78\x74']=n(x);const z=document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x73\x69\x7a\x65\x44\x69\x66\x66');y>0x0?(z['\x69\x6e\x6e\x65\x72\x54\x65\x78\x74']='\x2b'+n(y),z['\x73\x74\x79\x6c\x65']['\x63\x6f\x6c\x6f\x72']='\x76\x61\x72\x28\x2d\x2d\x64\x61\x6e\x67\x65\x72\x29'):(z['\x69\x6e\x6e\x65\x72\x54\x65\x78\x74']=n(y),z['\x73\x74\x79\x6c\x65']['\x63\x6f\x6c\x6f\x72']='\x76\x61\x72\x28\x2d\x2d\x73\x75\x63\x63\x65\x73\x73\x29'),document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x63\x6f\x70\x79\x42\x74\x6e')['\x64\x69\x73\x61\x62\x6c\x65\x64']=!0x1,c(q,!0x0);}catch(B){alert('\x53\x79\x6e\x74\x61\x78\x20\x65\x72\x72\x6f\x72\x3a\x0a'+B['\x6d\x65\x73\x73\x61\x67\x65']);}finally{h['\x69\x6e\x6e\x65\x72\x48\x54\x4d\x4c']='\x3c\x69\x20\x63\x6c\x61\x73\x73\x3d\x22\x66\x61\x2d\x73\x6f\x6c\x69\x64\x20\x66\x61\x2d\x67\x65\x61\x72\x73\x22\x3e\x3c\x2f\x69\x3e\x20\x50\x72\x6f\x63\x65\x73\x73\x20\x26\x20\x41\x75\x74\x6f\x2d\x43\x6f\x70\x79',h['\x64\x69\x73\x61\x62\x6c\x65\x64']=!0x1;}}else alert('\x43\x6f\x64\x65\x20\x74\x6f\x68\x20\x64\x61\x61\x6c\x6f\x20\x62\x68\x61\x69\x21');}function c(a=null,b=!0x1){const d=a||document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x6f\x75\x74\x70\x75\x74\x43\x6f\x64\x65')['\x76\x61\x6c\x75\x65'];d&&navigator['\x63\x6c\x69\x70\x62\x6f\x61\x72\x64']['\x77\x72\x69\x74\x65\x54\x65\x78\x74'](d)['\x74\x68\x65\x6e'](()=>{const f=document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x63\x6f\x70\x79\x53\x74\x61\x74\x75\x73');f['\x69\x6e\x6e\x65\x72\x54\x65\x78\x74']=b?'\x28\x41\x75\x74\x6f\x2d\x43\x6f\x70\x69\x65\x64\x21\x29':'\x28\x43\x6f\x70\x69\x65\x64\x21\x29',setTimeout(()=>f['\x69\x6e\x6e\x65\x72\x54\x65\x78\x74']='',0x9c4);});}
</script>
</body>
</html>