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()
相关推荐
William数据分析4 小时前
JavaScript 语法零基础入门:从变量到异步(附 Python 语法对比)
开发语言·javascript·python
爱笑的眼睛114 小时前
SQLAlchemy 核心 API 深度解析:超越 ORM 的数据库工具包
java·人工智能·python·ai
测试19984 小时前
Selenium(Python web测试工具)基本用法详解
自动化测试·软件测试·python·selenium·测试工具·职场和发展·测试用例
资深设备全生命周期管理4 小时前
PLC监控系统+UI Alarm Show
python
范小多4 小时前
24小时学会Python Visual code +Python Playwright通过谷歌浏览器取控件元素(连载、十一)
服务器·前端·python
曹牧4 小时前
Java:Foreach语法糖
java·开发语言·python
盼哥PyAI实验室4 小时前
Python验证码处理实战:从12306项目看验证码识别的技术演进
开发语言·网络·python
qq_356196954 小时前
day37简单的神经网络@浙大疏锦行
python
Lululaurel4 小时前
AI编程提示词工程实战指南:从入门到精通
人工智能·python·机器学习·ai·ai编程