Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


Pyzipcracker filter_list
Author
Message
Pyzipcracker #1
Python version : 2.7
Code:
from zipfile import *
from sys import stdout

def process(word_file,zip_file):
    passes=[]
    tries = 0
    word = 'h4r0015k'
    while word != '':
        word = word_file.readline().replace('\n','')
        if check_pass(word,zip_file):
            passes.append(word)
        else:
            tries+=1
            stdout.write("\rNumber of words tried : "+str(tries))
            stdout.flush()
    return passes
def check_pass(word,zip_file):
    try:
        zip_file.read(zip_file.namelist()[0],word)
        return True
    except:
        return False


word_file = open(raw_input("Enter word filename : "))
zip_file = ZipFile(raw_input("Enter zip filename : "),'r')
print "\n\nPasswords :"+str(process(word_file,zip_file))+"\n\n"

Screenshot :
[Image: flAVeIa.png]

Sometimes my code catch wrong word has a correct password hence it check's each word and print the words out of which only one word can be a correct password.
[Image: fow57.jpg]

Reply

Pyzipcracker #2
Python version : 2.7
Code:
from zipfile import *
from sys import stdout

def process(word_file,zip_file):
    passes=[]
    tries = 0
    word = 'h4r0015k'
    while word != '':
        word = word_file.readline().replace('\n','')
        if check_pass(word,zip_file):
            passes.append(word)
        else:
            tries+=1
            stdout.write("\rNumber of words tried : "+str(tries))
            stdout.flush()
    return passes
def check_pass(word,zip_file):
    try:
        zip_file.read(zip_file.namelist()[0],word)
        return True
    except:
        return False


word_file = open(raw_input("Enter word filename : "))
zip_file = ZipFile(raw_input("Enter zip filename : "),'r')
print "\n\nPasswords :"+str(process(word_file,zip_file))+"\n\n"

Screenshot :
[Image: flAVeIa.png]

Sometimes my code catch wrong word has a correct password hence it check's each word and print the words out of which only one word can be a correct password.
[Image: fow57.jpg]

Reply

RE: Pyzipcracker #3
Nice work. I'm gaining interest in Python. Smile
[Image: rytwG00.png]
Redcat Revolution!

Reply

RE: Pyzipcracker #4
Nice work. I'm gaining interest in Python. Smile
[Image: rytwG00.png]
Redcat Revolution!

Reply

RE: Pyzipcracker #5
It works like a bruteforce.

Reply

RE: Pyzipcracker #6
Nice code, but I made a zip with the password "asshole" and a list.txt file with

Code:
qwerty
asshole
password
test

I tried to crack it with a great wordlist first and said "24 words tried" and no passwords. Then I tried with this list.txt and said "5 words tried" but again "Passwords: []".

Edit: @GreyPhantom, nope, it works with wordlist-attacks.
My Bitcoin address: 1AtxVsSSG2Z8JfjNy9KNFDUN6haeKr7LiP
Give me money by visiting www.google.com here: http://coin-ads.com/6Ol83U

If you want a Bitcoin URL shortener/advertiser, please, use this referral: http://coin-ads.com/register.php?refid=noize

Reply

RE: Pyzipcracker #7
(05-19-2013, 11:00 AM)noize Wrote: Nice code, but I made a zip with the password "asshole" and a list.txt file with

Code:
qwerty
asshole
password
test

I tried to crack it with a great wordlist first and said "24 words tried" and no passwords. Then I tried with this list.txt and said "5 words tried" but again "Passwords: []".

Edit: @GreyPhantom, nope, it works with wordlist-attacks.

Upload your zip file and post it here.
[Image: fow57.jpg]

Reply

RE: Pyzipcracker #8
(05-19-2013, 05:17 PM)H4R0015K Wrote:
(05-19-2013, 11:00 AM)noize Wrote: Nice code, but I made a zip with the password "asshole" and a list.txt file with

Code:
qwerty
asshole
password
test

I tried to crack it with a great wordlist first and said "24 words tried" and no passwords. Then I tried with this list.txt and said "5 words tried" but again "Passwords: []".

Edit: @GreyPhantom, nope, it works with wordlist-attacks.

Upload your zip file and post it here.

Got it. I supposed this might be the problem but didn't still try out.

Here is the archive: http://trythis00011.altervista.org/zipcracker.zip

No password, it just contains the wordlist and two archives.

list.zip fails to be cracked as it is AES256 encrypted.
list2.zip gets to be cracked being it ZipCrypto encrypted.

Maybe you'd like to mention this in the OP.
My Bitcoin address: 1AtxVsSSG2Z8JfjNy9KNFDUN6haeKr7LiP
Give me money by visiting www.google.com here: http://coin-ads.com/6Ol83U

If you want a Bitcoin URL shortener/advertiser, please, use this referral: http://coin-ads.com/register.php?refid=noize

Reply

RE: Pyzipcracker #9
Not bad, but I think it needs some work, you should probably check if the input file is a valid zip file though for this module to be able to deal with it properly.

Use this function:
Code:
is_zipfile()
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: Pyzipcracker #10
(05-20-2013, 06:32 AM)ArkPhaze Wrote: Not bad, but I think it needs some work, you should probably check if the input file is a valid zip file though for this module to be able to deal with it properly.

Use this function:
Code:
is_zipfile()

Well, in the case, maybe you could add also an error in case given files do not exist and let the user enter them again, 'cause right now it just quits the file.
My Bitcoin address: 1AtxVsSSG2Z8JfjNy9KNFDUN6haeKr7LiP
Give me money by visiting www.google.com here: http://coin-ads.com/6Ol83U

If you want a Bitcoin URL shortener/advertiser, please, use this referral: http://coin-ads.com/register.php?refid=noize

Reply







Users browsing this thread: 1 Guest(s)