brutex
v1.0.0
Published
[](https://pypi.python.org/pypi/brute) [](https://pypi.python.org/pypi/brute) [
Installation
Installing brute is easy with pip.
Just go to the terminal and run:
$ pip install bruteYou can also upgrade your existing installation by running:
$ pip install -U bruteUsage
Using brute is super easy -- seriously.
Let's say you want to iterate through every possible permutation of strings that contain:
- All letters (upper and lowercase),
- All numbers (01234...),
- All symbols (!#$...),
All you have to do is:
from brute import brute
for s in brute():
print sBam!
Let's say you want to also include space characters in your string (' ',
'\t', etc...) -- you can do this too!
from brute import brute
for s in brute(spaces=True):
print sYou can customize the max length of the strings generated as well. By
default, brute will only run through 3 characters:
from brute import brute
for s in brute(length=10)
print sAnd, lastly, if for some reason you only want to iterate through letters, numbers, or whatever, you can do that as well!
from brute import brute
# Iterate over *only* numbers (0 - 9).
for s in brute(length=5, letters=False, numbers=True, symbols=False):
print sChanges
0.0.3: 2-12-2016
- Supporting start length when ramping up. Thanks @petermuller!0.0.2: 1-18-2015
- Fixed typo in docstring. Thanks @zhao-ji!0.0.1: 3-20-2014
- First release!