So I have been trying to create a simple bruteforce script for a php form (on my own local webserver of course), It essentially works by inputting data into the from an list through a for loop. Here is the problem; if my list is: list = ['a','b','c','d','e','f','g']
and my for loop looks something like this:
for i in list:
r = request.post(url, values) #posts the values
if 'id=correct' in open('output.txt').read(): #check if it works
print("logged in")
#if it works, it would print this, if not,
#it will retry with the next element in the list
The problem is, this will work for only one letter passwords (as it only cycles through the list once). My question is; how would I get it so that once it cycles through the list once, it will start the for loop again except with two elements from list(ie, aa,ab,ac,ad,ae,ef etc.)
Thanks!