-
-
Notifications
You must be signed in to change notification settings - Fork 344
Expand file tree
/
Copy pathindex.html
More file actions
506 lines (482 loc) · 24.3 KB
/
Copy pathindex.html
File metadata and controls
506 lines (482 loc) · 24.3 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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MobaXterm Keygen</title>
<meta name="description" content="Website created with love by Zarfala" />
<link rel="icon" href="https://i.imgur.com/FtcF9ZP.png" />
<link href="./css/pure-min.css?=2" rel="stylesheet" />
<link href="./css/style.css" rel="stylesheet" />
<link href="./css/fire.css" rel="stylesheet" />
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
darkMode: "class",
theme: {
extend: {
screens: {
'xs': '475px',
},
colors: {
primary: {
50: '#eef2ff',
100: '#e0e7ff',
500: '#6366f1',
600: '#4f46e5',
700: '#4338ca',
}
},
animation: {
'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite',
}
}
}
}
</script>
<!-- Preloader style -->
<style>
#preloader {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #111;
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}
#preloader.fade-out {
opacity: 0;
visibility: hidden;
}
.spinner {
width: 60px;
height: 60px;
border: 5px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top-color: #6366f1;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.content-hidden {
visibility: hidden;
opacity: 0;
transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}
.content-visible {
visibility: visible;
opacity: 1;
}
</style>
<!-- Meta tags for better SEO and sharing -->
<meta property="og:title" content="MobaXterm Keygen" />
<meta property="og:type" content="website" />
<meta property="og:description" content="Website created with love by Zarfala" />
<meta property="og:image" content="https://i.imgur.com/FtcF9ZP.png" />
<meta property="og:site_name" content="MobaXterm Keygen" />
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="MobaXterm Keygen">
<meta name="twitter:description" content="Website created with love by Zarfala">
<meta name="twitter:image" content="https://i.imgur.com/FtcF9ZP.png">
</head>
<body class="transition-colors duration-300">
<!-- Preloader -->
<div id="preloader">
<div class="spinner"></div>
</div>
<main id="main-content" class="content-hidden">
<div class="relative flex min-h-screen flex-col items-center justify-center bg-white dark:bg-black transition-colors duration-300 overflow-hidden px-4">
<!-- Background effect -->
<div class="flex inset-0 overflow-hidden">
<div class="jumbo absolute opacity-60"></div>
</div>
<div class="box-main w-full max-w-xl mx-auto">
<div id="app" class="relative z-10 p-6 sm:p-10 w-full text-left shadow-lg rounded-xl bg-white dark:bg-slate-900/80 dark:backdrop-blur dark:ring-1 dark:ring-inset dark:ring-white/10 transition-all duration-300">
<!-- Header Section -->
<header class="mb-8 text-center">
<h1 class="relative flex flex-col xs:flex-row items-center justify-center text-4xl sm:text-5xl font-bold text-gray-800 dark:text-white dark:opacity-95 transition-colors">
<span>MobaXterm</span>
<span class="mt-2 xs:mt-0 xs:ml-2 rounded-xl bg-current p-2 text-[0.7em] leading-none">
<span class="text-white dark:text-black">Keygen</span>
</span>
</h1>
<!-- Version Badge -->
<div class="mt-4 inline-flex items-center px-3 py-1 rounded-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-sm font-medium text-white"> Compatible with versions 20.X, 25.3 and 25.4 </div>
<!-- Theme Toggle -->
<div class="mt-4">
<button onclick="toggleTheme()" class="px-3 py-1 border border-stone-200 rounded-full drop-shadow-sm text-sm text-stone-800 dark:text-white bg-white/40 dark:bg-black/40 backdrop-blur-lg hover:border-stone-300 transition-colors dark:border-stone-500 dark:hover:border-stone-400"> Toggle Theme </button>
</div>
<!-- Tab Navigation -->
<div class="mt-6 border-b border-gray-200 dark:border-gray-700">
<nav class="flex space-x-4" aria-label="Tabs">
<button @click="activeTab = 'keyGenerator'"
:class="[activeTab === 'keyGenerator' ? 'border-primary-500 text-primary-600 dark:text-primary-400' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 dark:text-gray-400 dark:hover:text-gray-300', 'px-1 pb-4 text-sm font-medium border-b-2']">
Key Generator
</button>
<button @click="activeTab = 'customMerger'"
:class="[activeTab === 'customMerger' ? 'border-primary-500 text-primary-600 dark:text-primary-400' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 dark:text-gray-400 dark:hover:text-gray-300', 'px-1 pb-4 text-sm font-medium border-b-2']">
Custom Settings Merger
</button>
</nav>
</div>
</header>
<!-- Key Generator Tab -->
<div v-if="activeTab === 'keyGenerator'">
<form @submit.prevent="validateAndGenerate">
<div class="space-y-6">
<div>
<label for="licenseType" class="block text-lg text-gray-700 dark:text-gray-300">Edition:</label>
<div class="relative">
<select name="licenseType" id="licenseType" v-model="licenseType" class="w-full mt-1 p-2 pr-8 rounded-lg border border-gray-300 dark:border-gray-600 dark:bg-slate-800 dark:text-white focus:ring-2 focus:ring-primary-500 focus:border-transparent outline-none transition-colors appearance-none">
<option value="" disabled>Select an option</option>
<option v-for="(val, key) in LICENSE_TYPES" :value="val">{{key}}</option>
</select>
<div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 mt-1 text-gray-700 dark:text-gray-300">
<svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"></path>
</svg>
</div>
</div>
<p v-if="errors.licenseType" class="mt-1 text-red-500 text-sm">{{ errors.licenseType }}</p>
</div>
<div>
<label for="userName" class="block text-lg text-gray-700 dark:text-gray-300">Username:</label>
<div class="relative">
<input type="text" id="userName" v-model="userName" @input="validateUserName" placeholder="Example defaultUser" class="w-full mt-1 p-2 rounded-lg border border-gray-300 dark:border-gray-600 dark:bg-slate-800 dark:text-white focus:ring-2 focus:ring-primary-500 focus:border-transparent outline-none transition-colors" />
<p v-if="errors.userName" class="mt-1 text-red-500 text-sm">{{ errors.userName }}</p>
</div>
</div>
<div>
<label for="versionName" class="block text-lg text-gray-700 dark:text-gray-300">Version:</label>
<div class="relative">
<input type="text" id="versionName" v-model="versionName" @input="validateVersion" placeholder="Example 25.4" class="w-full mt-1 p-2 rounded-lg border border-gray-300 dark:border-gray-600 dark:bg-slate-800 dark:text-white focus:ring-2 focus:ring-primary-500 focus:border-transparent outline-none transition-colors" />
<p v-if="errors.versionName" class="mt-1 text-red-500 text-sm">{{ errors.versionName }}</p>
</div>
</div>
<div>
<label for="userNum" class="block text-lg text-gray-700 dark:text-gray-300">Number of users:</label>
<div class="relative">
<input type="number" id="userNum" v-model="userNum" @input="validateUserNum" placeholder="Example 1" min="1" class="w-full mt-1 p-2 rounded-lg border border-gray-300 dark:border-gray-600 dark:bg-slate-800 dark:text-white focus:ring-2 focus:ring-primary-500 focus:border-transparent outline-none transition-colors" />
<p v-if="errors.userNum" class="mt-1 text-red-500 text-sm">{{ errors.userNum }}</p>
</div>
</div>
<!-- Download Button -->
<div class="text-center pt-4">
<button type="submit" class="w-full sm:w-auto px-6 py-3 bg-primary-600 text-white rounded-lg shadow-md hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors duration-200"> Download Key </button>
</div>
</div>
</form>
</div>
<!-- Custom Settings Merger Tab -->
<div v-if="activeTab === 'customMerger'" class="space-y-6">
<div class="bg-slate-100 dark:bg-slate-800 p-4 rounded-lg mb-4">
<h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-2">How to Use Custom Settings Merger</h3>
<ol class="list-decimal list-inside space-y-2 text-sm text-gray-700 dark:text-gray-300">
<li>Generate a license key file using the Key Generator tab</li>
<li>Run MobaXterm with the <code class="bg-slate-200 dark:bg-slate-700 px-1 py-0.5 rounded">-customizer</code> parameter: <br>
<code class="bg-slate-200 dark:bg-slate-700 px-2 py-1 rounded block mt-1">.\MobaXterm.exe -customizer</code>
</li>
<li>Export your custom settings to a file named <code class="bg-slate-200 dark:bg-slate-700 px-1 py-0.5 rounded">MobaXterm customization.custom</code></li>
<li>Upload both your license key file and custom settings file below</li>
<li>Click "Merge Files" to create a combined activation file</li>
</ol>
</div>
<div>
<label for="licenseFileInput" class="block text-lg font-medium text-gray-700 dark:text-gray-300 mb-2">
License Key File (Custom.mxtpro):
</label>
<div class="relative">
<input
type="file"
id="licenseFileInput"
@change="handleLicenseFileUpload"
accept=".mxtpro"
class="block w-full text-sm text-gray-700 dark:text-gray-300
file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0
file:text-sm file:font-semibold
file:bg-primary-50 file:text-primary-700
hover:file:bg-primary-100 hover:file:text-primary-800
focus:outline-none focus:border-primary-500 focus:ring-2 focus:ring-primary-200
transition-colors duration-200
dark:file:bg-slate-700 dark:file:text-slate-100
dark:hover:file:bg-slate-600 dark:hover:file:text-white"
/>
<p v-if="errors.licenseFile" class="mt-1 text-red-500 text-sm">{{ errors.licenseFile }}</p>
</div>
</div>
<div>
<label for="customSettingsFileInput" class="block text-lg text-gray-700 dark:text-gray-300">Custom Settings File (.custom):</label>
<input type="file" id="customSettingsFileInput" @change="handleCustomSettingsFileUpload" accept=".custom" class="block w-full text-sm text-gray-700 dark:text-gray-300
file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0
file:text-sm file:font-semibold
file:bg-primary-50 file:text-primary-700
hover:file:bg-primary-100 hover:file:text-primary-800
focus:outline-none focus:border-primary-500 focus:ring-2 focus:ring-primary-200
transition-colors duration-200
dark:file:bg-slate-700 dark:file:text-slate-100
dark:hover:file:bg-slate-600 dark:hover:file:text-white" />
<p v-if="errors.customSettingsFile" class="mt-1 text-red-500 text-sm">{{ errors.customSettingsFile }}</p>
</div>
<div class="text-center pt-4">
<button @click="mergeFiles" :disabled="!licenseFile || !customSettingsFile" class="w-full sm:w-auto px-6 py-3 bg-primary-600 text-white rounded-lg shadow-md hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors duration-200 disabled:bg-gray-400 disabled:cursor-not-allowed"> Merge Files </button>
</div>
</div>
<!-- Footer -->
<footer class="mt-8 pt-6 border-t border-slate-200 dark:border-slate-700">
<div class="flex flex-col items-center space-y-4">
<div class="flex items-center space-x-2">
<span class="text-sm text-slate-600 dark:text-slate-400">Created with</span>
<span class="animate-pulse text-red-500">❤</span>
<span class="text-sm text-slate-600 dark:text-slate-400">by</span>
<span class="text-sm font-semibold bg-clip-text text-transparent bg-gradient-to-r from-purple-500 to-pink-500"> Zarfala </span>
</div>
<p class="text-sm text-slate-600 dark:text-slate-400" style="margin-top: 0;"> UI/UX Design optimized for <span class="inline-block">
<span class="text-blue-500 font-semibold">Computer</span>
<span class="text-green-500 font-semibold">& Mobile</span>
</span>
</p>
<div class="text-xs text-slate-500 dark:text-slate-500" style="margin-top: 5px;"> v2.5 © 2025 All rights reserved </div>
</div>
</footer>
</div>
</div>
</div>
<!-- Toast notification -->
<div id="toast" class="fixed bottom-4 right-4 px-4 py-2 rounded-lg bg-green-500 text-white transform translate-y-16 opacity-0 transition-all duration-300 z-50 hidden">
License generated successfully!
</div>
<!-- Scripts -->
<script src="./js/vue.min-2.6.12.js"></script>
<script src="./js/FileSaver.js"></script>
<script src="./js/jszip.js"></script>
<script src="./js/fire.js"></script>
<script src="./js/alert.js"></script>
<script>
// Preloader functionality
window.addEventListener('load', function() {
// Hide preloader
setTimeout(function() {
const preloader = document.getElementById('preloader');
const mainContent = document.getElementById('main-content');
preloader.classList.add('fade-out');
mainContent.classList.remove('content-hidden');
mainContent.classList.add('content-visible');
// Remove preloader from DOM after transition completes
setTimeout(function() {
preloader.style.display = 'none';
}, 500);
}, 300);
});
// Theme toggle functionality
function toggleTheme() {
if (document.documentElement.classList.contains('dark')) {
document.documentElement.classList.remove('dark');
localStorage.theme = 'light';
} else {
document.documentElement.classList.add('dark');
localStorage.theme = 'dark';
}
}
// Check for saved theme preference or prefer-color-scheme
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark');
}
// Toast notification function
function showToast(message, type = 'success') {
const toast = document.getElementById('toast');
toast.textContent = message;
toast.classList.remove('hidden');
if (type === 'success') {
toast.classList.add('bg-green-500');
toast.classList.remove('bg-red-500');
} else {
toast.classList.add('bg-red-500');
toast.classList.remove('bg-green-500');
}
setTimeout(() => {
toast.classList.remove('translate-y-16', 'opacity-0');
}, 100);
setTimeout(() => {
toast.classList.add('translate-y-16', 'opacity-0');
setTimeout(() => {
toast.classList.add('hidden');
}, 300);
}, 3000);
}
</script>
<script type="module">
import {
LicenseType,
generateLicense
} from './js/mobaXtermGenerater.js'
import {
mergeZipFiles
} from './js/mergeZipFiles.js'
new Vue({
el: '#app',
data() {
return {
LICENSE_TYPES: LicenseType,
licenseType: '',
userName: '',
versionName: '',
userNum: '',
activeTab: 'keyGenerator',
licenseFile: null,
customSettingsFile: null,
errors: {
licenseType: '',
userName: '',
versionName: '',
userNum: '',
licenseFile: '',
customSettingsFile: ''
}
}
},
methods: {
validateLicenseType() {
if (!this.licenseType) {
this.errors.licenseType = 'Please select an edition';
return false;
}
this.errors.licenseType = '';
return true;
},
validateUserName() {
if (!this.userName) {
this.errors.userName = 'Username is required';
return false;
}
const regex = /^[a-zA-Z]+$/;
if (!regex.test(this.userName)) {
this.errors.userName = 'Only letters are allowed (no spaces, numbers or special characters)';
return false;
}
this.errors.userName = '';
return true;
},
validateVersion() {
if (!this.versionName) {
this.errors.versionName = 'Version is required';
return false;
}
const regex = /^[1-9][0-9]*\.?\d{0,1}$/;
if (!regex.test(this.versionName)) {
this.errors.versionName = 'Enter a valid version format (e.g., 25.4)';
return false;
}
// Check if version is supported
const majorVersion = parseInt(this.versionName.split('.')[0]);
if (majorVersion !== 20 && majorVersion !== 25) {
this.errors.versionName = 'Currently only versions 20.X and 25.X are supported';
return false;
}
this.errors.versionName = '';
return true;
},
validateUserNum() {
if (!this.userNum) {
this.errors.userNum = 'Number of users is required';
return false;
}
const regex = /^[1-9]+\d*$/;
if (!regex.test(this.userNum)) {
this.errors.userNum = 'Enter a valid number greater than 0';
return false;
}
this.errors.userNum = '';
return true;
},
validateAndGenerate() {
// Validate all fields
const isLicenseTypeValid = this.validateLicenseType();
const isUserNameValid = this.validateUserName();
const isVersionValid = this.validateVersion();
const isUserNumValid = this.validateUserNum();
// Only generate if all validations pass
if (isLicenseTypeValid && isUserNameValid && isVersionValid && isUserNumValid) {
try {
let versionNameArr = this.versionName.split('.');
const majorVersion = parseInt(versionNameArr[0]);
const minorVersion = versionNameArr.length === 2 ? (parseInt(versionNameArr[1]) || 0) : 0;
let licenseStr = generateLicense(this.licenseType, this.userName, this.userNum, majorVersion, minorVersion);
this.generateLicenseFile(licenseStr);
showToast('License generated successfully!', 'success');
} catch (error) {
console.error('Error generating license:', error);
showToast('Error generating license. Please try again.', 'error');
}
}
},
generateLicenseFile(licenseStr) {
let zip = new JSZip();
zip.file("Pro.key", licenseStr);
zip.generateAsync({
type: "blob"
}).then(function(content) {
saveAs(content, "Custom.mxtpro");
}).catch(function(error) {
console.error('Error creating zip file:', error);
showToast('Error creating license file. Please try again.', 'error');
});
},
handleLicenseFileUpload(event) {
const file = event.target.files[0];
if (file) {
if (file.name.toLowerCase().endsWith('.mxtpro')) {
this.licenseFile = file;
this.errors.licenseFile = '';
} else {
this.licenseFile = null;
this.errors.licenseFile = 'Please select a valid .mxtpro file';
}
}
},
handleCustomSettingsFileUpload(event) {
const file = event.target.files[0];
if (file) {
if (file.name.toLowerCase().endsWith('.custom')) {
this.customSettingsFile = file;
this.errors.customSettingsFile = '';
} else {
this.customSettingsFile = null;
this.errors.customSettingsFile = 'Please select a valid .custom file';
}
}
},
mergeFiles() {
if (!this.licenseFile || !this.customSettingsFile) {
showToast('Please upload both required files', 'error');
return;
}
mergeZipFiles(this.licenseFile, this.customSettingsFile)
.then((mergedContent) => {
saveAs(mergedContent, "Custom.mxtpro");
showToast('Files merged successfully!', 'success');
})
.catch((error) => {
console.error('Error merging files:', error);
showToast('Error merging files. Please try again.', 'error');
});
}
},
mounted() {
// Set default version to 25.4
this.versionName = '25.4';
}
});
</script>
</body>
</html>