2026年2月

参考

破解代码

  • python

    import base64
    import zlib
    import json
    import argparse
    import sys
    import os
    import datetime
    import re
    import shutil
    
    # --- 核心工具函数 ---
    
    def bit_reverse_byte(n):
      """字节位反转"""
      return int('{:08b}'.format(n)[::-1], 2)
    
    # --- 解密逻辑 ---
    
    def sm_decode(encoded_txt):
      if not encoded_txt:
          return None
      try:
          if isinstance(encoded_txt, str):
              encoded_txt = encoded_txt.encode('utf-8')
          
          step1_data = base64.b64decode(encoded_txt)
    
          step2_buffer = bytearray()
          for byte in step1_data:
              step2_buffer.append(bit_reverse_byte(byte))
    
          step3_data = zlib.decompress(step2_buffer)
    
          text_str = step3_data.decode('utf-8')
          trans_table = str.maketrans("!@#$%^&*()", "abcdefghij")
          step4_text = text_str.translate(trans_table)
    
          final_data = base64.b64decode(step4_text)
          return final_data.decode('utf-8')
    
      except Exception as e:
          sys.stderr.write(f"[!] 解密失败: {e}\n")
          return None
    
    # --- 加密逻辑 ---
    
    def sm_encode(json_str):
      if not json_str:
          return None
      try:
          step1_b64 = base64.b64encode(json_str.encode('utf-8')).decode('utf-8')
    
          trans_table = str.maketrans("abcdefghij", "!@#$%^&*()")
          step2_replaced = step1_b64.translate(trans_table)
    
          step3_compressed = zlib.compress(step2_replaced.encode('utf-8'))
    
          step4_buffer = bytearray()
          for byte in step3_compressed:
              step4_buffer.append(bit_reverse_byte(byte))
    
          final_encoded = base64.b64encode(step4_buffer).decode('utf-8')
          return final_encoded
      except Exception as e:
          sys.stderr.write(f"[!] 加密失败: {e}\n")
          return None
    
    # --- 修改逻辑 ---
    
    def modify_license_data(json_data):
      """修改过期时间为明天"""
      # 获取当前时间 + 1天
      now = datetime.datetime.now()
      tomorrow = now + datetime.timedelta(days=1)
      
      print(f"[*] 设置新的过期时间为: {tomorrow.strftime('%Y-%m-%d %H:%M:%S')}")
    
      # 修改字段
      json_data['active'] = 1
      json_data['active_txt'] = '<font color="green">Active</font>'
      # 格式: YYYYMMDD
      json_data['licexpires'] = tomorrow.strftime("%Y%m%d")
      # 格式: DD/MM/YYYY GMT
      json_data['licexpires_txt'] = tomorrow.strftime("%d/%m/%Y GMT")
      json_data['download_time'] = int(now.timestamp())
      
      return json_data
    
    # --- JSON 特殊处理 ---
    
    def precise_json_escape(json_str):
      """只转义 fast_mirrors 和 licexpires_txt 中的斜杠"""
      def escape_slash_in_match(match):
          return match.group(0).replace('/', '\\/')
    
      pattern_txt = r'"licexpires_txt":".*?"'
      json_str = re.sub(pattern_txt, escape_slash_in_match, json_str)
    
      pattern_mirrors = r'"fast_mirrors":\[.*?\]'
      json_str = re.sub(pattern_mirrors, escape_slash_in_match, json_str)
    
      return json_str
    
    # --- 主程序 ---
    
    def main():
      parser = argparse.ArgumentParser(description="License 自动续期工具")
      parser.add_argument("file_path", help="原始 License 文件路径")
      # 新增 --replace 选项
      parser.add_argument("--replace", action="store_true", help="生成临时文件后直接覆盖原文件")
      
      args = parser.parse_args()
      
      # 1. 读取文件
      if not os.path.exists(args.file_path):
          sys.stderr.write(f"[!] 错误: 文件不存在 -> {args.file_path}\n")
          sys.exit(1)
    
      print(f"[*] 正在读取文件: {args.file_path}")
      with open(args.file_path, 'r', encoding='utf-8') as f:
          original_content = f.read().strip()
    
      # 2. 解密
      decoded_json_str = sm_decode(original_content)
      if not decoded_json_str:
          sys.exit(1)
    
      try:
          json_data = json.loads(decoded_json_str)
          
          # --- [需求] 打印刚读取出来的原始 JSON ---
          print("\n" + "="*20 + " 原始 JSON 数据 " + "="*20)
          print(json.dumps(json_data, indent=4, ensure_ascii=False))
          print("="*56 + "\n")
          
      except json.JSONDecodeError:
          sys.stderr.write("[!] 解密成功但不是有效的 JSON\n")
          sys.exit(1)
    
      # 3. 修改数据 (日期改为明天)
      modified_data = modify_license_data(json_data)
    
      # 4. 生成 & 精准转义
      compact_json_str = json.dumps(modified_data, separators=(',', ':'))
      final_json_str = precise_json_escape(compact_json_str)
    
      print("=============修改后的json=============")
      print(final_json_str)
      # 5. 加密
      new_license_str = sm_encode(final_json_str)
    
    
      # 6. 生成临时文件
      tmp_file_path = "/tmp/license2.php"
      try:
          with open(tmp_file_path, 'w', encoding='utf-8') as f:
              f.write(new_license_str)
          print(f"[*] 临时文件已生成: {tmp_file_path}")
      except IOError as e:
          print(f"[!] 无法写入临时文件 {tmp_file_path}: {e}")
          sys.exit(1)
    
      # 7. 处理 --replace 逻辑
      if args.replace:
          print(f"[*] 检测到 --replace 参数,正在覆盖原文件...")
          try:
              shutil.copyfile(tmp_file_path, args.file_path)
              print(f"[SUCCESS] 文件已更新: {args.file_path}")
          except Exception as e:
              print(f"[!] 覆盖文件失败: {e}")
      else:
          print("-" * 60)
          print(f"[*] 未使用 --replace。新 License 内容如下 (也保存在 {tmp_file_path}):")
          print(new_license_str)
          print("-" * 60)
    
    if __name__ == "__main__":
      main()
  • cron脚本

    */10 * * * * /usr/bin/python3 /root/crack.py /usr/local/virtualizor/license2.php --replace

注册后领取100刀

image.png

注册步骤

中途记得选这个,最后在账户里面 换绑信用卡
image.png

需要注意的是, Free Plan 帐户无法使用 lightsail(光帆)。并且当免费额度用尽,或注册满6个月后将被 AWS 自动关闭帐户。

AWS 会在免费期结束后保留你的数据 90 天。在这段时间内,你可以选择升级为付费计划,重新开通账户并恢复对资源的访问。如果在 90 天内你没有升级账户,AWS 将永久删除你的账户及里面的所有内容。

要下载数据,必须升级到付费套餐,随后,可以选择关闭您的 AWS 账户,以免未来产生账单。
也就是说,即便免费额度的有效期为 AWS 文档所称的 1 年,假如你注册的是免费帐户,最多也只能使用6个月。

选择客服支持服务

image.png

通过任务,领取额外的 $100 免费信用额度

收到激活成功的邮件(图2)后,点击 Go to the AWS Management Console 进入控制台。

下滑页面,在控制台接近底部的右侧找到 Explore AWS , 在筛选一栏选择 Earn AWS credits ,完成指定任务即可获得相应的免费信用额度。

image.png

image.png

沪ICP备2024084999号-1