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()
相关推荐
至乐活着7 分钟前
Python异步编程asyncio完全指南:从入门到高性能实战
python·并发·协程·asyncio·异步编程
functionflux22 分钟前
kafka-python:Python 生态中最成熟的 Kafka 客户端
分布式·python·其他·kafka
帅小伙―苏30 分钟前
239. 滑动窗口最大值
python·力扣
爱吃苹果的梨叔41 分钟前
2026年KVM over IP采购指南:BIOS级接管、并发和审计怎么验收
ide·python·tcp/ip·github
Cloud_Shy6181 小时前
解读《Effective Python 3rd Edition》:从练气到老魔(第六章 Item 40 - 43)
android·开发语言·人工智能·笔记·python·学习方法
装不满的克莱因瓶1 小时前
掌握生成对抗网络(GAN)的优化目标与评估指标——从博弈函数到生成质量衡量体系
人工智能·python·深度学习·算法·机器学习
半只小闲鱼1 小时前
配置计划模块通用办公设备家具批复数合计计算
开发语言·python
是阿千呀!1 小时前
A股市场风格切换研究:基于 Barra 风险模型的量化框架
python·量化
大蚂蚁2号1 小时前
短视频批量生成技术深度解析与实战方案
python·aigc·音视频
努力写A题的小菜鸡1 小时前
PyTorch 两种卷积写法彻底对比:F.conv2d 函数式 vs nn.Conv2d 类实战(超详细入门笔记)
python