pull/15/head
Laurence Luo 2024-06-14 18:12:49 +08:00
parent e542cd987f
commit ae2925b3d1
No known key found for this signature in database
GPG Key ID: 76D108A29460F5F9
3 changed files with 140 additions and 72 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
**/.idea/**

18
app.py
View File

@ -1,4 +1,4 @@
#/usr/bin/env python3
# /usr/bin/env python3
import os
import os.path
@ -101,7 +101,7 @@ def GenerateLicense(Type: int, Count: int, UserName: str, MajorVersion: int, Min
MajorVersion, MinorVersion, MinorVersion,
0, # Unknown
0, # No Games flag. 0 means "NoGames = false". But it does not work.
0 # No Plugins flag. 0 means "NoPlugins = false". But it does not work.
0 # No Plugins flag. 0 means "NoPlugins = false". But it does not work.
)
EncodedLicenseString = VariantBase64Encode(EncryptBytes(0x787, LicenseString.encode())).decode()
FileName = EncodedLicenseString.replace('/', '').replace('\\', '')
@ -110,7 +110,7 @@ def GenerateLicense(Type: int, Count: int, UserName: str, MajorVersion: int, Min
return FileName
#@app.route('/gen')
# @app.route('/gen')
def get_lc():
name = request.args.get('name', '')
version = request.args.get('ver', '')
@ -125,14 +125,16 @@ def get_lc():
return lc
#@app.route('/download/<lc>')
# @app.route('/download/<lc>')
def download_lc(lc):
if lc and len(lc) > 5 and os.path.exists('./' + lc):
return send_file(lc,
as_attachment=True,
attachment_filename='Custom.mxtpro')
return send_file(
lc,
as_attachment=True,
attachment_filename='Custom.mxtpro'
)
else:
return "请检查用户名版本号是否正确!"
return "请检查用户名版本号是否正确!"
@app.route('/gen')

View File

@ -1,73 +1,138 @@
<!DOCTYPE html>
<html>
<head>
<html lang="en">
<head>
<title>MobaXterm Keygen</title>
<link href="https://fonts.googleapis.cnpmjs.org/css?family=Roboto:300,400,500,700" rel="stylesheet">
<style>
html, body {
display: flex;
justify-content: center;
font-family: Roboto, Arial, sans-serif;
font-size: 15px;
}
form {
border: 5px solid #f1f1f1;
}
input[type=text], input[type=text] {
width: 100%;
padding: 16px 8px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
}
button {
background-color: #8ebf42;
color: white;
padding: 14px 0;
margin: 10px 0;
border: none;
cursor: grabbing;
width: 100%;
}
h1 {
text-align:center;
font-size:18;
}
button:hover {
opacity: 0.8;
}
.formcontainer {
text-align: left;
margin: 24px 50px 12px;
}
.container {
padding: 16px 0;
text-align: left;
}
.github {
padding: 16px 0;
text-align: center;
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
form {
width: 300px; /* Set the width of the form */
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
background: #f5f5f5;
}
.container {
margin-bottom: 10px;
}
h1 {
color: #0056b3;
text-justify: newspaper;
}
button {
display: block;
width: 100%;
padding: 13px;
background-color: #0056b3;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
margin: 5px 0 20px;
font-size: 15px;
}
button:hover {
background-color: #007bff;
}
.github {
text-align: center;
}
html, body {
display: flex;
justify-content: center;
font-family: Roboto, Arial, sans-serif;
font-size: 15px;
background-color: #242424;
}
form {
border: 5px solid #f1f1f1;
}
input[type=text], input[type=text] {
width: 100%;
padding: 16px 8px;
margin: 10px 0 10px;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
}
#space {
height: 15px;
}
h1 {
text-align: center;
}
button:hover {
opacity: 0.8;
}
.formcontainer {
text-align: left;
margin: 24px 50px 12px;
}
.container {
padding: 16px 0;
text-align: left;
}
.github {
padding: 20px 0 0;
text-align: right;
}
.github span a {
color: #242424;
font-size: smaller;
}
.github span a img {
height: 18px;
padding-bottom: 3px;
vertical-align: middle;
}
</style>
</head>
<body>
<form action="./gen" mothod="get">
<h1>MobaXterm Keygen</h1>
<div class="formcontainer"></div>
<hr/>
<div class="container">
</head>
<body>
<form action="./gen" mothod="get">
<h1>MobaXterm Keygen</h1>
<div class="formcontainer"></div>
<hr/>
<div class="container">
<label for="name"><strong>Name</strong></label>
<input type="text" placeholder="Enter name" name="name" required>
<input name="name" placeholder="Enter name: " required type="text">
<div id="space"></div>
<label for="ver"><strong>Version</strong></label>
<input type="text" placeholder="Enter version: (21.1)" name="ver" required>
</div>
<button type="submit">Gen!</button>
<div class="github">
<label style="padding-left: 15px">
<input name="ver" placeholder="Enter version: (21.1)" required type="text">
</div>
<button type="submit">Generate !</button>
<div class="github">
<label>
</label>
<span><a style="text-decoration: none;" href="https://github.com/malaohu/MobaXterm-GenKey">View on GitHub</a><img src="https://github.githubassets.com/favicons/favicon.svg" height="16px"></span>
</div>
</form>
</body>
<span>
<a href="https://github.com/malaohu/MobaXterm-GenKey" style="text-decoration: none;">
<img src="https://github.githubassets.com/favicons/favicon.svg">
malaohu/MobaXterm-GenKey
</a>
</span>
</div>
</form>
</body>
</html>