This forum is in archive mode. You will not be able to post new content.

Author Topic: [Python] Brute Force List Creator  (Read 709 times)

0 Members and 1 Guest are viewing this topic.

Offline Traitor4000

  • Knight
  • **
  • Posts: 191
  • Cookies: 8
    • View Profile
[Python] Brute Force List Creator
« on: February 01, 2014, 03:24:30 PM »
Just a simple script i needed so i wrote it figured i would share...
Code: [Select]

def getList():
    chars =[]
    x = 'a'
    print 'Enter characters wanted to be used in bruteforce type exit to exit'
    while x != 'exit':
        x = raw_input('Enter a character to be added:')
        if x == 'exit':
            return chars
        chars.append(x)



def retLine(items, n):
    if n==0: yield []
    else:
        for i in xrange(len(items)):
            for ss in retLine(items, n-1):
                yield [items[i]]+ss
   



def main():
    f = open('wordlist', 'w')
    min = input('Enter min: ')
    max = input('Enter max: ')
    theList = getList()
    print theList
    for i in range(min, max+1):
        for s in retLine(theList,i):
            f.write(''.join(s) + '\n')
main()

The most vulnerable part of an impenetrable system is those who believe it to be so.

 



Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.