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()
相关推荐
李妍.1 小时前
02Numpy基础(上)
开发语言·python
TheBestRucy1 小时前
Python 九阳神功之贰:面向对象(下)
开发语言·python
2601_965958462 小时前
口腔黏膜脱皮超2周未愈建议及时就医
人工智能·python
微小冷3 小时前
在不同空间中展示数据(欧式、球面、庞加莱圆盘)
python·双曲空间·微分几何·geomstats·庞加莱圆盘·球面
weixin_431600443 小时前
Agent Workflow 学习向:Code 节点,比模板更强的变量加工
后端·python·学习·ai·
讲温控就好了3 小时前
从医疗影像到能源存储——芯片冷却温控技术的跨行业赋能
人工智能·python·能源
DeepVisionary4 小时前
从 Qwen3.8-27B 把原生多模态、原生 FP8、桌面级 Agent 三件事一次集齐,看开源大模型的“工业化拐点“
python·自动化
固定资产管理系统软件5 小时前
商务局RFID固定资产管理系统的应用价值与落地要点解析
大数据·python
TheBestRucy5 小时前
Python 九阳神功:从零筑基到线程飞升
服务器·开发语言·网络·人工智能·python
lancyu6 小时前
关于多轮对话机器人的上下文Token优化和解决方案
人工智能·python·深度学习·机器学习·chatgpt·机器人·prompt