WingIDE破解代码-支持最新版本

WingIDE破解代码

目前支持WingIDE Pro 的5、6、7、8、9、10、11、12 版本。

目前官网最新是11.X.X版本,但是通过反编译,已经能知道12.X.X的魔数了)

代码如下,直接python keygen.py即可。(仅供学习研究)

python 复制代码
#!/usr/bin/env python3
"""
WingIDE Pro Activation Code Generator (Interactive CLI Version)
Generates activation codes for WingIDE Professional with an interactive interface.
"""

import hashlib
import platform
import random
import string
import sys

# Check Python version
py_version = platform.python_version()
if py_version[0] != "3":
    print(
        "Can't run under python2 env! Please run tool under python 3.2 or later version!"
    )
    sys.exit(1)

# Constants
BASE16 = "0123456789ABCDEF"
BASE30 = "123456789ABCDEFGHJKLMNPQRTVWXY"

# Supported WingIDE versions and their magic numbers
VERSION_MAGICS = {
    "5.X.X": [7, 123, 23, 87],
    "6.X.X": [23, 161, 47, 9],
    "7.X.X": [221, 13, 93, 27],
    "8.X.X": [179, 95, 45, 245],
    "9.X.X": [123, 17, 42, 7],
    "10.X.X": [102, 99, 107, 117],
    "11.X.X": [6, 24, 15, 22],
    "12.X.X": [198, 232, 214, 228],
}


def generate_random_string(size=20, chars=string.ascii_uppercase + string.digits):
    """Generate a random string of specified size."""
    return "".join(random.choice(chars) for _ in range(size))


def base_convert(number, from_digits, to_digits, ignore_negative=True):
    """
    Convert a number between different base systems.

    Args:
        number: The number to convert
        from_digits: Source base digits
        to_digits: Target base digits
        ignore_negative: Whether to ignore negative signs

    Returns:
        Converted number as string
    """
    if not ignore_negative and str(number)[0] == "-":
        number = str(number)[1:]
        neg = 1
    else:
        neg = 0

    # Convert to decimal first
    x = 0
    for digit in str(number):
        x = x * len(from_digits) + from_digits.index(digit)

    # Convert to target base
    res = ""
    while x > 0:
        digit = x % len(to_digits)
        res = to_digits[digit] + res
        x //= len(to_digits)

    if neg:
        res = "-" + res
    return res


def add_hyphens(code):
    """Add hyphens to format the code."""
    return f"{code[:5]}-{code[5:10]}-{code[10:15]}-{code[15:]}"


def sha_to_base30(digest):
    """
    Convert SHA digest to Base30 representation.

    Args:
        digest: SHA hash digest

    Returns:
        Base30 representation of the digest
    """
    # Take every other character
    filtered_digest = "".join([c for i, c in enumerate(digest) if i // 2 * 2 == i])
    result = base_convert(filtered_digest, BASE16, BASE30)

    # Pad with '1' if needed
    while len(result) < 17:
        result = "1" + result
    return result


def loop_algorithm(ecx, lichash):
    """
    Core algorithm for generating activation code parts.

    Args:
        ecx: Magic number
        lichash: License hash

    Returns:
        Processed value
    """
    part = 0
    for char in lichash:
        part = ecx * part + ord(char) & 1048575
    return part


def generate_license_id():
    """
    Generate a new license ID with guaranteed digits in each group.

    Returns:
        Formatted license ID with digits in each group (e.g., CNXB6-7R5CN-1RHY1-ATPE7)
    """
    # Characters to use (excluding 0 and O to avoid confusion)
    chars = "123456789ABCDEFGHJKLMNPQRTVWXY"
    digits = "123456789"

    # Generate each group ensuring at least one digit per group
    groups = []

    # First group (5 chars): "CN" + 3 chars with at least 1 digit
    # Start with "CN"
    group1_chars = ["C", "N"]
    # Add 3 random chars
    group1_chars.extend(random.choices(chars, k=3))
    # Replace one of the last 3 chars with a digit to ensure at least one digit
    digit_pos = random.randint(2, 4)
    group1_chars[digit_pos] = random.choice(digits)
    groups.append("".join(group1_chars))

    # Second, third, and fourth groups (5 chars each): at least 1 digit per group
    for _ in range(3):
        # Generate 5 random chars
        group_chars = random.choices(chars, k=5)
        # Replace one random char with a digit to ensure at least one digit
        digit_pos = random.randint(0, 4)
        group_chars[digit_pos] = random.choice(digits)
        groups.append("".join(group_chars))

    # Join all groups with hyphens
    return "-".join(groups)


def calculate_activation_code(version, license_id, request_code):
    """
    Calculate the activation code based on version, license ID, and request code.

    Args:
        version: WingIDE version string
        license_id: License ID
        request_code: Request code from WingIDE

    Returns:
        Activation code or None if invalid version
    """
    # Validate inputs
    if not request_code.strip():
        raise ValueError("Request code cannot be empty")

    if version not in VERSION_MAGICS:
        raise ValueError(f"Unsupported WingIDE version: {version}")

    print(f"\nLicense ID: {license_id}")
    print(f"WingIDE Version: {version}")

    # Generate hash
    sha_hasher = hashlib.sha1()
    sha_hasher.update(request_code.encode("utf-8"))
    sha_hasher.update(license_id.encode("utf-8"))
    hash_result = sha_hasher.hexdigest().upper()

    # Process hash
    lichash = add_hyphens(request_code[:3] + sha_to_base30(hash_result))

    # Get version magic numbers
    version_magic = VERSION_MAGICS[version]

    # Generate activation code parts
    activation_code = (
        format(loop_algorithm(version_magic[0], lichash), "05x")
        + format(loop_algorithm(version_magic[1], lichash), "05x")
        + format(loop_algorithm(version_magic[2], lichash), "05x")
        + format(loop_algorithm(version_magic[3], lichash), "05x")
    )

    # Convert to Base30 and pad if needed
    activation_code = base_convert(activation_code.upper(), BASE16, BASE30)
    while len(activation_code) < 17:
        activation_code = "1" + activation_code

    # Format final activation code
    return add_hyphens("AXX" + activation_code)


def select_version():
    """Let user select WingIDE version interactively."""
    print("WingIDE Pro Activation Code Generator")
    print("=" * 40)
    print("\nSelect WingIDE Version:")

    # Convert dict_keys to list to maintain consistent ordering
    version_list = list(VERSION_MAGICS.keys())

    # Display versions with indices
    for i, version in enumerate(version_list, 1):
        print(f"  {i}. {version}")

    print()

    while True:
        try:
            choice = input("Enter version number (1-{}): ".format(len(version_list)))
            choice_idx = int(choice) - 1

            if 0 <= choice_idx < len(version_list):
                return version_list[choice_idx]
            else:
                print(
                    "Invalid selection. Please enter a number between 1 and {}.".format(
                        len(version_list)
                    )
                )
        except ValueError:
            print("Invalid input. Please enter a number.")


def confirm_license_id(license_id):
    """Ask user to confirm or regenerate license ID."""
    while True:
        print(f"\nGenerated License ID: {license_id}")
        choice = (
            input("Is this license ID acceptable? (yes/no/generate again): ")
            .strip()
            .lower()
        )

        if choice in ["yes", "y"]:
            return license_id
        elif choice in ["no", "n"]:
            return None
        elif choice in ["generate again", "generate", "g"]:
            return generate_license_id()
        else:
            print("Please enter 'yes', 'no', or 'generate again'.")


def get_request_code():
    """Get request code from user."""
    print("\nNext Step:")
    print("Please open WingIDE and go to Help -> Register...")
    print("Enter the Request Code shown in the dialog.")

    while True:
        request_code = input("\nEnter Request Code: ").strip()
        if request_code:
            return request_code
        else:
            print("Request code cannot be empty. Please try again.")


def interactive_main():
    """Interactive main entry point."""
    try:
        # Step 1: Select version
        version = select_version()

        # Step 2: Generate and confirm license ID
        license_id = generate_license_id()
        while True:
            confirmed_id = confirm_license_id(license_id)
            if confirmed_id:
                license_id = confirmed_id
                break
            else:
                # User said "no", exit
                print("Exiting...")
                return

        # Step 3: Get request code
        request_code = get_request_code()

        # Step 4: Calculate and display activation code
        activation_code = calculate_activation_code(version, license_id, request_code)
        print(f"\nActivation Code: {activation_code}")
        print(
            "\nCopy this activation code and paste it in the WingIDE registration dialog."
        )

    except KeyboardInterrupt:
        print("\n\nOperation cancelled by user.")
    except Exception as e:
        print(f"\nError: {e}")
        sys.exit(1)


def display_help():
    """Display help information."""
    print("WingIDE Pro Activation Code Generator (Interactive CLI)")
    print("=" * 55)
    print("This script generates activation codes for WingIDE Professional.")
    print("\nUsage:")
    print("  python keygen_cli.py              # Interactive mode")
    print("  python keygen_cli.py --help       # Show this help")
    print("\nIn interactive mode, you will:")
    print("  1. Select a WingIDE version")
    print("  2. Review and confirm a generated license ID")
    print("  3. Enter a request code from WingIDE")
    print("  4. Receive an activation code to use in WingIDE")


def main():
    """Main entry point."""
    # Handle help argument
    if len(sys.argv) > 1 and sys.argv[1] in ["-h", "--help", "help"]:
        display_help()
        return

    # Run interactive mode
    interactive_main()


if __name__ == "__main__":
    main()
相关推荐
智搜广告29 分钟前
智搜广告:科技行业AI回答优化公司如何破局
大数据·python·elasticsearch·geo
IpdataCloud1 小时前
AI智能体调用工具怎么核验来源IP?归属地、网络类型与代理风险识别(含Python代码)
数据库·python·tcp/ip
2601_966949651 小时前
只拿到股票代码还不够:量化程序到底还需要哪些标的信息?——从数据建模开始理解股票元数据
开发语言·python·数据分析·pandas·量化交易·股票数据·quantdash
蒸鱼Yuzheng1 小时前
Python 游戏测试开发怎么准备:日志解析、接口校验、并发与可维护性
自动化测试·python·测试开发·面试题·游戏测试
Ivanqhz2 小时前
BM1688 双核架构
python·深度学习·神经网络·cnn·mlir
Java后端的Ai之路2 小时前
Python进阶探索17 - Python中的深拷贝与浅拷贝
人工智能·python·ai·浅拷贝·深拷贝
西柚研究生1234563 小时前
论文分析17:YOLOv11_UAVNet:无人机航拍图像专用目标检测算法
人工智能·python·深度学习·算法·目标检测
沧海一笑-dj3 小时前
【Python】Python学习笔记-初识 Python
python·python安装·python解释器
打工仔折腾 AI3 小时前
FastAPI 从本机到生产服务器:Nginx+Gunicorn+Uvicorn 完整部署实录
人工智能·后端·python·nginx·fastapi·gunicorn
hanchenxing4 小时前
AI 数据管道重构:从函数堆到链式管道的可读性实践
python