/* ©AngelaMos | 2026 RuleAttack.hpp Dictionary attack augmented with password mutation rules Wraps a DictionaryAttack and applies RuleSet mutations to each word. When chain_rules is enabled, mutations of mutations are also generated, greatly expanding the candidate space. Connects to: attack/RuleAttack.cpp - implementation of create(), next(), load_next_word() attack/DictionaryAttack.hpp - DictionaryAttack used internally for word iteration core/Concepts.hpp - satisfies AttackStrategy concept core/Engine.hpp - instantiated when cfg.use_rules is true */ #pragma once #include "src/attack/DictionaryAttack.hpp" #include "src/core/Concepts.hpp" #include #include #include #include #include class RuleAttack { public: static std::expected create(std::string_view path, bool chain_rules, unsigned thread_index, unsigned total_threads); std::expected next(); std::size_t total() const; std::size_t progress() const; private: RuleAttack(DictionaryAttack dict, bool chain_rules); DictionaryAttack dict_; bool chain_rules_; std::vector mutations_; std::size_t mutation_index_ = 0; std::size_t candidates_yielded_ = 0; bool load_next_word(); };