Skip to content
  • Categories
  • Recent
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Slate)
  • No Skin
Collapse
Brand Logo

hashpwn

Home | Donate | GitHub | Matrix Chat | PrivateBin | Rules

  1. Home
  2. Tools
  3. Scripts
  4. rulest - GPU Rules Extractor

rulest - GPU Rules Extractor

Scheduled Pinned Locked Moved Scripts
17 Posts 2 Posters 1.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A1131A Offline
    A1131A Offline
    A1131
    Trusted
    wrote last edited by
    #7

    Key improvements

    • Extended maximum rule chain depth from 3 to 6, allowing exploration of more complex transformations.
    • Adaptive batch sizing based on actual GPU VRAM – now dynamically scales word batches, chain batches, and output buffer sizes according to available memory (tested on RTX 3060 Ti and 1050 Ti without errors).
    • Dynamic time budgeting – distributes remaining processing time among depths proportionally, adjusting the number of chains generated for each depth based on actual phase‑1 runtime.
    • VRAM‑aware bloom filter sizing – reduces bloom filter size on GPUs with less than 4 GB VRAM to prevent out‑of‑memory errors.
    • Per‑depth chain limit overrides – new command‑line options (--depth2-chains, …, --depth6-chains) to manually control the number of chains generated for each depth.

    Examples of found_chains.txt

    Amateur of mycology and hashcracking | 1x3060Ti | 1x1050Ti
    PGP:4B0A386530D789157435DC7489138FB52FDD7FC1

    1 Reply Last reply
    0
    • WaffleW Offline
      WaffleW Offline
      Waffle
      wrote last edited by
      #8

      This is good work! This approaches the problem from what I think is a new direction, and I'm really liking what I see here. Very much appreciate you releasing it.

      1 Reply Last reply
      0
      • A1131A Offline
        A1131A Offline
        A1131
        Trusted
        wrote last edited by
        #9

        Thank you. It's a bit of reinventing the wheel, but I once encountered a problem extracting rules from available programs (ULM still rules in my opinion), and that's how rulest was created.

        Amateur of mycology and hashcracking | 1x3060Ti | 1x1050Ti
        PGP:4B0A386530D789157435DC7489138FB52FDD7FC1

        1 Reply Last reply
        0
        • A1131A Offline
          A1131A Offline
          A1131
          Trusted
          wrote last edited by
          #10

          Test done on 1050Ti with a target depth of 6 and a target runtime of 8 hours (the job was completed in about 2 hours with 1,311,335 generated chains and 724,887 valid unique chains found - you can think of the --target-hours flag as a multiplier of generated rules for the appropriate depths - on different GPUs these values ​​will be different from each other in automatic mode).

          https://gist.github.com/A113L/9c0ecf6d9888ec1680ac98d533583e22/raw/c9f4f0d10206ed3ac2cc03f6c71d5d0b004b4d29/gistfile1.txt

          Minor improvements:

          • The extracted rules are now sorted by frequency (most hits first) for better prioritization, with the empty rule : placed at the top.
          • A short header with metadata (total unique rules and total hits) is added to the output file for clarity.
          • Removed global cap limit of generated chains (can be limited with flags).
          # Generated by rulest_v2.0.py
          # Total unique rules: 878446
          # Total hits (sum of frequencies): 377080316
          :
          z6 x05
          z8 '5
          x33 z8
          x23 y4
          '0 y4
          z8 x44 Z3
          i4% z7 i8E x74
          i60 x22 y4
          z5 x30
          R0 z7
          z9 x26
          x55 Z9
          i0+ x77 Z5
          x44 p4
          z9 x73
          z7 x16
          x44 y5
          o0[ x55 p9
          x23 y6
          x66 Z3
          D2 i5m o4. i4v z8 x51
          ...
          

          Amateur of mycology and hashcracking | 1x3060Ti | 1x1050Ti
          PGP:4B0A386530D789157435DC7489138FB52FDD7FC1

          1 Reply Last reply
          0
          • A1131A Offline
            A1131A Offline
            A1131
            Trusted
            wrote last edited by
            #11
            • Removed hardcoded depth limit; --max-depth now accepts any value, kernel constant set dynamically, enabling arbitrary chain depths via recursive rules expansion.

            • The new optional --seed-rules parameter allows loading a file with previously successful rules. These seeds are grouped by depth and used at every stage of chain generation. For each target depth, the algorithm first adds existing seeds of that depth, then extends seeds from the previous depth by appending a random rule, and finally fills any remaining budget with random (hot‑biased) chains. Newly generated chains become seeds for deeper levels, enabling a recursive expansion that builds upon proven patterns. This focused approach makes it feasible to efficiently generate and test rule chains well beyond depth 6, leveraging prior knowledge to explore the most promising combinations.

            Amateur of mycology and hashcracking | 1x3060Ti | 1x1050Ti
            PGP:4B0A386530D789157435DC7489138FB52FDD7FC1

            1 Reply Last reply
            0
            • WaffleW Offline
              WaffleW Offline
              Waffle
              wrote last edited by
              #12

              Thanks - I'm working with a very large set, and looking at multiple ways to deal with the scope... none of this is easy work, and you are absolutely going down a beneficial path.

              1 Reply Last reply
              0
              • A1131A Offline
                A1131A Offline
                A1131
                Trusted
                wrote last edited by A1131
                #13

                Not right, not left - straight ahead.🙂 If you are working on sets of rules, I also have a concentrator tool, there is a link here on the forum and on discord. It can process very large sets of rules and debugged data, created mainly for optimizing, but I don't know what problem you are dealing with and whether it will be useful for anything.

                Amateur of mycology and hashcracking | 1x3060Ti | 1x1050Ti
                PGP:4B0A386530D789157435DC7489138FB52FDD7FC1

                1 Reply Last reply
                0
                • A1131A Offline
                  A1131A Offline
                  A1131
                  Trusted
                  wrote last edited by
                  #14

                  Fixes

                  • Rule Validator – Added $ and ^ to the branch that expects exactly one following character. Without this, those rules were filtered out and never made it to the GPU kernel.

                  • Seed Loading – The same validator now accepts $ and ^ rules, so seed files containing them are fully loaded and used.

                  # Generated by rulest_v2.0.py (seeded)
                  # Total unique rules: 145287
                  # Total hits (sum of frequencies): 52455891
                  :
                  ]
                  l
                  c
                  ^s ^o ^l ^l ^o ^p '2
                  x65
                  '0
                  x54
                  x00
                  x01
                  o1@ x00
                  ^e ^k ^i ^r ^t ^s R2
                  x11 i0d x06
                  x11
                  x32
                  R3
                  *64 o0q '0
                  R0
                  x33
                  D1 $8 $5 $0 $0 x87
                  o48 '0
                  o28 R0
                  o1E x33
                  x34 p2
                  ^F x22
                  E
                  ...
                  

                  https://gist.github.com/A113L/5ef467ced57f40bc7dadedce775cda6a

                  found_chains.txt

                  Amateur of mycology and hashcracking | 1x3060Ti | 1x1050Ti
                  PGP:4B0A386530D789157435DC7489138FB52FDD7FC1

                  1 Reply Last reply
                  0
                  • A1131A Offline
                    A1131A Offline
                    A1131
                    Trusted
                    wrote last edited by A1131
                    #15

                    Added missing GPU-compatible Hashcat rules: bitwise shifts (L, R), +1/-1 substitution (. and ,), range skip (O), and switch after Nth delimiter (3). Updated rule generation to add O for all digit pairs and 3NX for all digits and delimiters. Improved the kernel to support these operations, ensuring full GPU compatibility. No memory or discard rules were added.
                    Note: BTW, after extraction, since all rules are Hashcat-compatible, it is still recommended running the resulting ruleset by concentrator functional minimizing function.

                    Amateur of mycology and hashcracking | 1x3060Ti | 1x1050Ti
                    PGP:4B0A386530D789157435DC7489138FB52FDD7FC1

                    1 Reply Last reply
                    0
                    • A1131A Offline
                      A1131A Offline
                      A1131
                      Trusted
                      wrote last edited by
                      #16
                      • The signature-based minimizer eliminates functional redundancy: it builds a deterministic probe set of base words (≥ min‑word‑len) and computes each rule’s output signature. Rules that produce identical outputs on all probe words are considered equivalent; only the one with the highest GPU hit‑count survives. This reduces the final rule set dramatically while preserving all unique transformations.

                      • The numeric‑seed extraction pass tests three built‑in families (pure prepend, pure append, and mixed prepend/append) up to depth 4 as direct GPU chain candidates—independent of random chain generation. It captures common numeric mutations (e.g., ^1 ^2, $9 $8, ^1 $2) efficiently, ensuring these high‑value patterns are never missed, even if the random chain budget is small.

                      Amateur of mycology and hashcracking | 1x3060Ti | 1x1050Ti
                      PGP:4B0A386530D789157435DC7489138FB52FDD7FC1

                      1 Reply Last reply
                      0
                      • A1131A Offline
                        A1131A Offline
                        A1131
                        Trusted
                        wrote last edited by
                        #17
                        # rulest — GPU-Compatible Hashcat Rules Engine
                        # Generated      : 2026-03-28 04:14:53
                        # Base           : hashmob.mini.txt
                        # Target         : hashmob.small.found
                        # Depth          : 1–10
                        # Bloom          : 512 MB
                        #
                        # GPU raw candidates      : 268,674  (bloom hits, includes false positives)
                        # Post-processing         : signature-based minimization
                        #   Probe words           : 21  (min length 10)
                        #   Equiv. rules removed  : 106,848
                        #
                        # Rules kept     : 161,825  (d1:1,856  d2:42,820  d3:34,157  d4:42,742  d5:10,555  d6:9,387  d7:7,435  d8:5,792  d9:3,892  d10:3,189)
                        # Sorted by      : GPU frequency (descending, UTF-8)
                        :
                        $1 $2 $3
                        $1 $2 $3 $4
                        x45 i5b 31n
                        $2 $3 $4
                        $4 $5 $6
                        $1 $0 $1
                        $2 $0 $0 $0
                        $2 $0 $1 $0
                        $2 $0 $0 $2
                        x03 36e
                        $2 $0 $1 $2
                        $3 $2 $1
                        $2 $0 $0 $1
                        $2 $0 $0 $3
                        $0 $0 $7
                        $2 $0 $0 $4
                        $2 $0 $0 $5
                        $1 $0 $0
                        

                        Amateur of mycology and hashcracking | 1x3060Ti | 1x1050Ti
                        PGP:4B0A386530D789157435DC7489138FB52FDD7FC1

                        1 Reply Last reply
                        0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        homogenous-expeditionary
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent