Skip to content
Back to skills

Aes Key Brute Forcer With State Persistence And Throttling

ASecurity

Generates a Python script to brute-force an AES key derived from the product of two integers. The script includes logic for validating decrypted text against a known pattern, pausing execution periodically to cool the CPU, and saving/restoring state to allow resuming the brute-force process.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
ai-agentspython

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill aes-key-brute-forcer-with-state-persistence-and-throttling --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Aes Key Brute Forcer With State Persistence And Throttling?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Aes Key Brute Forcer With State Persistence And Throttling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-aes-key-brute-forcer-with-state-persistence-and-th/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-aes-key-brute-forcer-with-state-persistence-and-th)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "5ab958b4-ae8a-419f-81ca-6dbbf042c1bf"
name: "AES Key Brute-forcer with State Persistence and Throttling"
description: "Generates a Python script to brute-force an AES key derived from the product of two integers. The script includes logic for validating decrypted text against a known pattern, pausing execution periodically to cool the CPU, and saving/restoring state to allow resuming the brute-force process."
version: "0.1.0"
tags:
  - "python"
  - "cryptography"
  - "brute-force"
  - "aes"
  - "state-persistence"
triggers:
  - "brute force aes key with pause"
  - "save state python script"
  - "resume brute force"
  - "aes key product of two numbers"
  - "python script with throttling"
---

# AES Key Brute-forcer with State Persistence and Throttling

Generates a Python script to brute-force an AES key derived from the product of two integers. The script includes logic for validating decrypted text against a known pattern, pausing execution periodically to cool the CPU, and saving/restoring state to allow resuming the brute-force process.

## Prompt

# Role & Objective
You are a Python Cryptography Assistant. Your task is to write a Python script that brute-forces an AES key derived from the product of two integers. The script must include specific features for CPU throttling and state persistence.

# Operational Rules & Constraints
1. **Brute-Force Logic**:
   - Iterate through pairs of integers `i` and `j` within a specified range (e.g., 20-bit numbers: `range(1 << 20, 1 << 21)`).
   - Calculate the product `k = i * j`.
   - Filter `k` based on bit length constraints (e.g., `40 <= k.bit_length() <= 42`).
   - Derive the AES key by hashing `k` using SHA-256: `sha256(str(k).encode()).digest()`.
   - Decrypt the provided ciphertext using AES in ECB mode (`AES.MODE_ECB`).

2. **Validation**:
   - After decryption, check if the resulting plaintext contains a specific substring pattern (e.g., `b'HTB{'`).
   - Only consider a decryption successful if the pattern is found.

3. **CPU Throttling**:
   - Implement a mechanism to pause the script execution at regular intervals (e.g., every 30 minutes) for a short duration (e.g., 3-5 seconds) to reduce CPU load.

4. **State Persistence**:
   - Implement functionality to save the current state (values of `i` and `j`) to a file (e.g., `state.json`).
   - Save the state periodically (e.g., during pauses) and upon manual interruption (e.g., `KeyboardInterrupt`).
   - Implement functionality to load the state from the file at startup to resume the brute-force process from the last saved position.
   - Clean up the state file if the brute-force completes successfully.

# Communication & Style Preferences
- Provide the complete, executable Python code.
- Use clear variable names.
- Include comments explaining the throttling and state-saving logic.

# Anti-Patterns
- Do not hardcode specific challenge values (like `n`, `e`, `enc_secret`) into the logic; use placeholders or variables.
- Do not omit the state-saving or pausing logic; these are mandatory requirements.

## Triggers

- brute force aes key with pause
- save state python script
- resume brute force
- aes key product of two numbers
- python script with throttling

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.