MobaXterm 密钥生成器

news/2024/9/19 7:43:29/文章来源:https://www.cnblogs.com/dawnlz/p/18416590

1、MobaXterm 密钥生成器,代码仓库地址:

https://gitcode.com/gh_mirrors/mo/MobaXterm-keygen/blob/master/MobaXterm-Keygen.py

2、也可以用我打包好的exe程序,不用安装python环境:

https://pan.baidu.com/s/1jo85pQc_kfWhcYmZcc49CQ 提取码:ws10

 

3、源码:

#/usr/bin/env python3
'''
Author: Double Sine
License: GPLv3
'''
import os, sys, zipfileVariantBase64Table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
VariantBase64Dict = { i : VariantBase64Table[i] for i in range(len(VariantBase64Table)) }
VariantBase64ReverseDict = { VariantBase64Table[i] : i for i in range(len(VariantBase64Table)) }def VariantBase64Encode(bs : bytes):result = b''blocks_count, left_bytes = divmod(len(bs), 3)for i in range(blocks_count):coding_int = int.from_bytes(bs[3 * i:3 * i + 3], 'little')block = VariantBase64Dict[coding_int & 0x3f]block += VariantBase64Dict[(coding_int >> 6) & 0x3f]block += VariantBase64Dict[(coding_int >> 12) & 0x3f]block += VariantBase64Dict[(coding_int >> 18) & 0x3f]result += block.encode()if left_bytes == 0:return resultelif left_bytes == 1:coding_int = int.from_bytes(bs[3 * blocks_count:], 'little')block = VariantBase64Dict[coding_int & 0x3f]block += VariantBase64Dict[(coding_int >> 6) & 0x3f]result += block.encode()return resultelse:coding_int = int.from_bytes(bs[3 * blocks_count:], 'little')block = VariantBase64Dict[coding_int & 0x3f]block += VariantBase64Dict[(coding_int >> 6) & 0x3f]block += VariantBase64Dict[(coding_int >> 12) & 0x3f]result += block.encode()return resultdef VariantBase64Decode(s : str):result = b''blocks_count, left_bytes = divmod(len(s), 4)for i in range(blocks_count):block = VariantBase64ReverseDict[s[4 * i]]block += VariantBase64ReverseDict[s[4 * i + 1]] << 6block += VariantBase64ReverseDict[s[4 * i + 2]] << 12block += VariantBase64ReverseDict[s[4 * i + 3]] << 18result += block.to_bytes(3, 'little')if left_bytes == 0:return resultelif left_bytes == 2:block = VariantBase64ReverseDict[s[4 * blocks_count]]block += VariantBase64ReverseDict[s[4 * blocks_count + 1]] << 6result += block.to_bytes(1, 'little')return resultelif left_bytes == 3:block = VariantBase64ReverseDict[s[4 * blocks_count]]block += VariantBase64ReverseDict[s[4 * blocks_count + 1]] << 6block += VariantBase64ReverseDict[s[4 * blocks_count + 2]] << 12result += block.to_bytes(2, 'little')return resultelse:raise ValueError('Invalid encoding.')def EncryptBytes(key : int, bs : bytes):result = bytearray()for i in range(len(bs)):result.append(bs[i] ^ ((key >> 8) & 0xff))key = result[-1] & key | 0x482Dreturn bytes(result)def DecryptBytes(key : int, bs : bytes):result = bytearray()for i in range(len(bs)):result.append(bs[i] ^ ((key >> 8) & 0xff))key = bs[i] & key | 0x482Dreturn bytes(result)class LicenseType:Professional = 1Educational = 3Persional = 4def GenerateLicense(Type : LicenseType, Count : int, UserName : str, MajorVersion : int, MinorVersion):assert(Count >= 0)LicenseString = '%d#%s|%d%d#%d#%d3%d6%d#%d#%d#%d#' % (Type, UserName, MajorVersion, MinorVersion, Count, MajorVersion, MinorVersion, MinorVersion,0,    # Unknown0,    # 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.EncodedLicenseString = VariantBase64Encode(EncryptBytes(0x787, LicenseString.encode())).decode()with zipfile.ZipFile('Custom.mxtpro', 'w') as f:f.writestr('Pro.key', data = EncodedLicenseString)def help():print('Usage:')print('    MobaXterm-Keygen.py <UserName> <Version>')print()print('    <UserName>:      The Name licensed to')print('    <Version>:       The Version of MobaXterm')print('                     Example:    10.9')print()if __name__ == '__main__':if len(sys.argv) != 3:help()exit(0)else:MajorVersion, MinorVersion = sys.argv[2].split('.')[0:2]MajorVersion = int(MajorVersion)MinorVersion = int(MinorVersion)GenerateLicense(LicenseType.Professional, 1,sys.argv[1], MajorVersion, MinorVersion)print('[*] Success!')print('[*] File generated: %s' % os.path.join(os.getcwd(), 'Custom.mxtpro'))print('[*] Please move or copy the newly-generated file to MobaXterm\'s installation path.')print()
else:print('[*] ERROR: Please run this script directly')
View Code

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/798201.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Linux引导启动程序(boot)

概述 本章主要描述boot/目录中的三个汇编代码文件,见列表6-1所示。正如在前一章中提到的,这三个文件虽然都是汇编程序,但却使用了两种语法格式。bootsect.s和setup.s是实模式下运行的16位代码程序,采用近似于Intel的汇编语言语法并且需要使用Intel 8086汇编编译器和连接器as86和…

9、const修饰指针

*代表指针,这样有助于记忆和区别这三种

day1闯关作业小结[linux基础知识]

完成SSH连接与端口映射并运行hello_world.py 1.进入InternStudio https://studio.intern-ai.org.cn/, 创建个人开发机2.使用密码进行SSH远程连接并进行端口映射3.运行hello_world.py

白云龙期货投资-第三讲

反转形态**头肩底(顶) 双底(顶) 三重底(顶) 圆弧底(顶)**持续形态**三角形 旗形 楔行 扩散三角形 收缩三角形**K线形态(反转形态,持续形态) 反转形态 头肩底(顶) 双底(顶) 三重底(顶) 圆弧底(顶) 持续形态 三角形 旗形 楔行 扩散三角形 收缩三角形 头肩顶头肩底双底(双顶)下…

java的方法和数组

什么是方法呢? 就类似c语言的函数 返回类型 方法名 形式参数列表 方法名最好使用小驼峰的形式,在java中方法不可以嵌套使用, 方法的调用: 就是在main方法里面写上调用的方法名加上需要传输的值,创建一个和方…

mongo集群同步数据异常,手动同步节点副本数据

转载请注明出处: 数据同步方案当副本集节点的复制进程落后太多,以至于主节点覆盖了该节点尚未复制的 oplog 条目时,副本集节点就会变为“陈旧”。节点跟不上,就会变得“陈旧”。出现这种情况时,必须删除副本集节点的数据,然后执行初始同步,从而完全重新同步该节点。 Mon…

7、函数分文件编写

1、swap.h2、swap.cpp3、使用

三、redis之strings类型

strings是redis中使用最多的类型。 redis官网中是这么描述strings的: Redis strings store sequences of bytes, including text, serialized objects, and binary arrays. 可以看到Redis strings保存的是sequences of bytes,也就是字节序列。不仅可以保存字符串,而且还可以…

排队论——数学模型和绩效指标精解

排队论最早由丹麦工程师Agner Krarup Erlang于1910年提出,旨在解决自动电话系统的问题,成为话务理论的奠基石。Erlang通过研究电话呼叫的随机到达和服务时间,推导出著名的埃尔朗电话损失率公式,用于计算电话系统的呼叫阻塞率,揭示了排队现象的本质。Erlang之后,排队论得到…

本地文件包含漏洞详解与CTF实战

1. 本地文件包含简介 1.1 本地文件包含定义 本地文件包含是一种Web应用程序漏洞,攻击者通过操控文件路径参数,使得服务器端包含了非预期的文件,从而可能导致敏感信息泄露。 常见的攻击方式包括:包含配置文件、日志文件等敏感信息文件,导致信息泄露。 包含某些可执行文件或…

代码随想录算法 - 二叉树6

题目1235. 二叉搜索树的最近公共祖先 给定一个二叉搜索树, 找到该树中两个指定节点的最近公共祖先。 百度百科中最近公共祖先的定义为:“对于有根树 T 的两个结点 p、q,最近公共祖先表示为一个结点 x,满足 x 是 p、q 的祖先且 x 的深度尽可能大(一个节点也可以是它自己的祖…

6、函数的声明

程序是一行行执行,我们可以在前面进行函数声明,然后将函数的定义放在程序末尾。 声明可以写多次,但是定义只能写一次。