Unconfigured Ad Widget

Collapse

Anúncio

Collapse
No announcement yet.

Gerador de wordlist por Keywords

Collapse
X
 
  • Filter
  • Tempo
  • Show
Clear All
new posts

  • Font Size
    #1

    Python Gerador de wordlist por Keywords

    O propósito do programa é gerar um 'early attack', antes de iniciar com wordlists randômicas. Este método pode reduzir o tempo de brute force attacks pela vasta quantidade de senhas que são relacionadas a informações pessoais.
    Para fazer isso, utilizei a permutação de palavras chave, que normalmente, são relacionadas ao alvo.

    Além da permutação, existe a retirada de elementos, e a seguir, novas permutações. Isso resulta em uma vasta lista de possibilidades sem muito esforço.


    Ainda planejo fazer alterações neste projeto:

    - Implementar multithreading;
    - Adicionar função de restrição para quantidade de caracteres;
    - Adicionar função de mesclagem de wordlist;
    - Converter código para uso em outro SO;
    - Adicionar variação de Uppercase;

    Ultima atualização: 18 de Fevereiro de 2016

    Links: Apenas usuários registrados e ativados podem ver os links., Clique aqui para se cadastrar... / Apenas usuários registrados e ativados podem ver os links., Clique aqui para se cadastrar...

    Código PHP:
    '''
    Code by Cougar - Do not copy without credits
    www.guiadohacker.com.br
    Written using Python 3.4.4 - For Windows
    Release 1.8.1 (March 7, 2016)

    Wordlist generator based on keywords
    Copyright (C) 2016  Cougar

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    '''
        
    # Imports

    import ossysmathtimeit

    # Functions

    def cls():
        
    os.system('cls' if os.name=='nt' else 'clear')

    def space(n):
        return 
    '\n' n

    def toBin
    (num):
        if 
    num == 0:
            return 
    ""
        
    return toBin(num//2) + str(num%2)

    def res(nstrings):
        
    pos 1
        
    for i in range(nstrings):
            
    pos pos 2
        
    return pos

    def wordcount
    (nstrings):
        
    words 0
        total 
    0
        
    for i in range(1nstrings 1):
            
    words = (math.factorial(nstrings) / math.factorial(nstrings i))
            
    total total words
        
    return int(total)

    def convertBytes(size):
        if (
    size == 0):
            return 
    '0b'
        
    notation = ('b''KB''MB''GB''TB''PB''EB''ZB''YB')
        
    int(math.floor(math.log(size1024)))
        
    math.pow(1024i)
        
    round(size/p2)
        return 
    '%s %s' % (snotation[i])

    def convertTime(time):
        
    floor 0
        
    for i in range(2):
            if 
    time >= 60:
                
    time time 60
                floor 
    floor 1
        notation 
    = ('seconds''minutes''hours')
        return 
    '%.2f %s' % (timenotation[floor])

    def filesize(stringsnstringswcount):
        
    nchar 0
        
    for i in range(nstrings):
            
    nchar nchar len(strings[i])
        
    nchar nchar wcount
        
    return convertBytes(nchar)

    def zeros(valnstrings):
        while 
    len(val) < nstrings:
            
    val "0" val
        
    return val

    def swap
    (resultlr):
        
    result[l]
        
    result[l] = result[r]
        
    result[r] = t
        
    return result

    def toString
    (List):
        return 
    ''.join(List)

    def permute(resultlr):
        if 
    l==r:
            
    wordlist.write(toString(result) + "\n")
        else:
            for 
    i in range(l1):
                
    result swap(resultli)
                
    permute(result1r)
                
    result swap(resultli)

    def checkint():
        while 
    True:
            
    nkeywords input('Number of keywords: ')
            try:
                
    nkeywords int(nkeywords)
            
    except ValueError:
                print (
    'Invalid value!')
            if 
    type(nkeywords) == int:
                return 
    nkeywords

    def parameters
    (wcount):
        print (
    space(1))
        print (
    'Building early structure, %s results.' % (pos))
        print (
    space(1))
        print (
    'Parameters\nNumber of keywords: %s \nKeywords: %s \nTotal number of words: %s \nApproximate file size: at least %s' % (nkeywordsstrings"{:,}".format(wcount), filesize(stringsnstringswcount)))
        print (
    space(1))

    # Code start and reload point

    while True:

    # Call clear

        
    cls()            

    # Global Variables

        
    error_handler 0
        strings 
    = []
        
    parlist = []
        
    result = []
        
    storewords set()
        
    wordlist open('wordlist.txt'"w")

    # For user input only

        
    nkeywords checkint()
        print (
    space(1))
        for 
    i in range(nkeywords):
            
    strings.append(input('Keyword %s: ' % (1)))

    # Resume Global Variables

        
    nstrings len(strings)
        
    pos res(nstrings)
        
    # Wordlist

        
    wcount wordcount(nstrings)
        
    parameters(wcount)
        
        while 
    True:
            
    response input('Are you sure you want to continue? [y/n]: ')
            
    answers = ['y''Y''n''N']
            if 
    not(response in answers):
                print (
    'Invalid answer!')
            else:
                break
        
        if 
    response in ('y''Y'):
            break

    print (
    space(1))
    print (
    'Writing wordlist...')
    print (
    space(1))

    start timeit.default_timer()

    for 
    i in range(pos):
        
    par zeros((toBin(i)), nstrings)

        for 
    letter in par:
            
    parlist.append(letter)    

        for 
    i in range(len(parlist)):
            if 
    parlist[i] != "0":
                
    result.append(strings[i])

        if (
    len(result) - 1) != -1:
            
    permute(result0len(result) - 1)
            
        
    parlist = []
        
    result = []

    wordlist.close()

    stop timeit.default_timer()

    print (
    'Finished with %s results in %s.\nTotal file size: %s \n' % ("{:,}".format(wcount), convertTime(stop start), convertBytes(os.path.getsize('wordlist.txt')))) 

    Imagem:

    Last edited by Cougar; 07-03-2016, 17:26. Motivo: ap-catcher-1.8.1-x32/64
    Similar Threads

  • Font Size
    #2
    Muito bacana Cougar.



    SEMPRE PENSE O QUE IRAR DIZER PARA NÃO LEVAR UM BRUTALITY.
    "Quem fala de MIM na minha ausência respeita MINHA presença"

    Comment


    • Font Size
      #3
      Eitaaa! Que foda mano, parabéns!
      .

      - PHP & VB C0d3r.

      Nickguitar.dll@hotmail.com

      http://www.youtube.com/user/superskate56 <~ Hacking tuts =)

      Quando aprendemos a ouvir, também aprendemos a falar..
      Quando aprendemos a ler, também aprendemos a escrever.
      Então, quando aprendemos a usar um computador, por que não aprender a programa-lo ?


      I'm C0ding for $$$

      #~: Just $this :~#

      Comment

      X
      Working...
      X