Building our first BruteForcer
In this section, we're going to build a script that will help us to discover resources using a dictionary. We're going to create a basic BruteForcer. We'll start by defining the objective of the tool and then go over the code for the basic structure of the BruteForcer.
Finally, we'll run it against our test web application using the following steps:
- Go back to our editor and open the project folder for section 4 by selecting
File|Add Project Folder...|Desktop|Examples|Section-4|OK. - Then, open the file for
forzabruta.py. - In this script, we have the basic structure for our BruteForcer. We have our typical
import, and then we have thebannerfunction, which will print the name of the script. Theusagefunction opens to provide help on how to use the script. - Now, let's jump to the
startfunction, which is invoked when we run our program:
def start(argv):
banner()
if len(sys.argv) < 5:
usage()
sys.exit()
try :
opts...