[Share] Python Wordlist Generator
#1
Sedikit share mengenai pembuatan complete wordlist dengan Python2.7
Dengan menggunakan min_length dan max_length sehingga dapat disetting sesuai kegunaan.

Code:
"""
Name            : Python Wordlist Generator
Created By      : Agus Makmun (Summon Agus)
Blog            : bloggersmart.net - python.web.id
Documentation   : https://github.com/agusmakmun/Python-Wordlist-Generator/
License         : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
Thanks to       : falsetru - http://stackoverflow.com/a/21559115
"""

import time
import itertools, string
print "Creating ..."
print "Start Time: ", time.strftime('%H:%M:%S')
chrs = string.printable.replace(' \t\n\r\x0b\x0c', '')      #use module string method for all chars
min_length, max_length = 1, 2                               #minimum and maximum created

create = open('wordlist.txt', 'w')
for n in range(min_length, max_length+1):                   #creating looping with 'for'
    for xs in itertools.product(chrs, repeat=n):            #itertools method
        #print ''.join(xs)                                  #you can test with it
        saved = ''.join(xs)                                 #create new variable
        create.write("%s\n" % saved)                        #create output for wordlist.txt

create.close()                                              #close create after looping 'for'
print "End Time: ", time.strftime('%H:%M:%S')

Dokumentasi lengkap, bisa check disini: https://github.com/agusmakmun/Python-Wordlist-Generator
"Looping is Mother of Successss" - https://python.web.id

#2
Wink 
(06-01-2015, 10:27 PM)agaust Wrote: Sedikit share mengenai pembuatan complete wordlist dengan Python2.7
Dengan menggunakan min_length dan max_length sehingga dapat disetting sesuai kegunaan.



Code:
"""
Name            : Python Wordlist Generator
Created By      : Agus Makmun (Summon Agus)
Blog            : bloggersmart.net - python.web.id
Documentation   : https://github.com/agusmakmun/Python-Wordlist-Generator/
License         : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
Thanks to       : falsetru - http://stackoverflow.com/a/21559115
"""

import time
import itertools, string
print "Creating ..."
print "Start Time: ", time.strftime('%H:%M:%S')
chrs = string.printable.replace(' \t\n\r\x0b\x0c', '')      #use module string method for all chars
min_length, max_length = 1, 2                               #minimum and maximum created

create = open('wordlist.txt', 'w')
for n in range(min_length, max_length+1):                   #creating looping with 'for'
   for xs in itertools.product(chrs, repeat=n):            #itertools method
       #print ''.join(xs)                                  #you can test with it
       saved = ''.join(xs)                                 #create new variable
       create.write("%s\n" % saved)                        #create output for wordlist.txt

create.close()                                              #close create after looping 'for'
print "End Time: ", time.strftime('%H:%M:%S')

Dokumentasi lengkap, bisa check disini: https://github.com/agusmakmun/Python-Wordlist-Generator

Sudah saya coba om. Ditambah multithreading tambah keren kayaknya om, hehe

#3
(06-01-2015, 10:27 PM)agaust Wrote: Sedikit share mengenai pembuatan complete wordlist dengan Python2.7
Dengan menggunakan min_length dan max_length sehingga dapat disetting sesuai kegunaan.


Code:
"""
Name            : Python Wordlist Generator
Created By      : Agus Makmun (Summon Agus)
Blog            : bloggersmart.net - python.web.id
Documentation   : https://github.com/agusmakmun/Python-Wordlist-Generator/
License         : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
Thanks to       : falsetru - http://stackoverflow.com/a/21559115
"""

import time
import itertools, string
print "Creating ..."
print "Start Time: ", time.strftime('%H:%M:%S')
chrs = string.printable.replace(' \t\n\r\x0b\x0c', '')      #use module string method for all chars
min_length, max_length = 1, 2                               #minimum and maximum created

create = open('wordlist.txt', 'w')
for n in range(min_length, max_length+1):                   #creating looping with 'for'
   for xs in itertools.product(chrs, repeat=n):            #itertools method
       #print ''.join(xs)                                  #you can test with it
       saved = ''.join(xs)                                 #create new variable
       create.write("%s\n" % saved)                        #create output for wordlist.txt

create.close()                                              #close create after looping 'for'
print "End Time: ", time.strftime('%H:%M:%S')

Dokumentasi lengkap, bisa check disini: https://github.com/agusmakmun/Python-Wordlist-Generator

mantap om, kapan kapan ajarin python dong :d hehe
Twitter : Orang Sederhana
FB : Orang Sederhana
OrangSederhana@IBTeam:~#


#4
tahun ini sya keluarin call paper om bahas python juga.. Big Grin
"Looping is Mother of Successss" - https://python.web.id

#5
@agaust : mantaps om keren Big Grin jd penasaran nunggu rilis :v

#6
tanya mas import itertool itu buat apa ya fungsinya ?
<olivia>I just Loved with opensource , how's about you ?</olivia>
note * olivia is my framework , i just created it for my self

#7
(10-17-2015, 03:42 AM)iblizmuda Wrote: tanya mas import itertool itu buat apa ya fungsinya ?

Salah satunya buat iterasi, coba searching2 di mbah guugle.. Big Grin
"Looping is Mother of Successss" - https://python.web.id






Users browsing this thread: 1 Guest(s)