Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

String bruteforcer

Project description


A rule based string bruteforcer. Similar to brute but more versatile.


Bruter provides a callback based bruteforce interface. Mainly a single function brute is exported:

brute(fmt, callback=None, symbols={})
  • fmt: The string to be plugged variables into
  • callback: This is the function which will be called for every terminal value
  • symbols: This is a dict which maps symbols (which are strings) to a list of values


from bruter import brute

def printer(x):

symbols = {
	'H': ['a', 'b', 'c'],
	'L': ['x', 'y'],
	'X': ['1', '2']

brute("hello <H> <L> <X>", printer, symbols)

This one gives you output --

hello a x 1
hello a x 2
hello a y 1
hello a y 2
hello b x 1
hello b x 2
hello b y 1
hello b y 2
hello c x 1
hello c x 2
hello c y 1
hello c y 2

You can also use the predefined strings inside the string module in Python 3 for defining symbols

from bruter import brute
import string

def printer(x):

symbols = {
	'H': string.ascii_lowercase

brute("hello <H>", printer, symbols)

which gives output --

hello a
hello b
hello c
hello d
hello e
hello f
hello g
hello h
hello i
hello j
hello k
hello l
hello m
hello n
hello o
hello p
hello q
hello r
hello s
hello t
hello u
hello v
hello w
hello x
hello y
hello z

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for bruter, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size bruter-0.0.2-py3-none-any.whl (3.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size bruter-0.0.2.tar.gz (2.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page