I used Python colleagues cracked the encryption archive!

Author | ZHU Xiao five

It is a cup of tea.

That's what happened:

But also tea, okay quickly started to fight to get back before Li Dawei

 

 

Dawei said the six-digit password

So we can use python to generate all of the six-digit password

 

#生成从000000到99999的密码表
f = open('passdict.txt','w')
for id in range(1000000):
    password = str(id).zfill(6)+'\n'
    f.write(password)
f.close()

Thus, we generated a password table from the 000000-99999.

Passdict.txt and stores them to a file.

6 password table is so big! ! !

What to do next?

Nature is traversed password password will be generated in the table,

Brute force it!

Science Time:

zipFile modular built-in Python module that provides for the creation of a zip file, read, write, append, extract files and list the action list

The method of using the decompression extractll extractall (path = None, members = None, pwd = None)

  • After specifying the location of the extracted files: path

  • members :( Optional) Specifies the Zip file you want to extract a file, the file name must be a method to return the list by namelist () subset

  • Extract the password specified Zip file: pwd

So we can use zipFile module to traverse the password table,

One by one by one password try, see if I can open the archive.

Until it succeeds.

Import zipFile

 

import zipfile

def extractFile(zipFile, password):
    try:
        zipFile.extractall(pwd= bytes(password, "utf8" ))
        print("李大伟的压缩包密码是" + password)  #破解成功
    except:
        pass  #失败,就跳过

def main():
    zipFile = zipfile.ZipFile('李大伟.zip')   
    PwdLists = open('passdict.txt')   #读入所有密码
    for line in PwdLists.readlines():   #挨个挨个的写入密码
        Pwd = line.strip('\n')
        guess = extractFile(zipFile, Pwd)

if __name__ == '__main__':
    main()

It took less than a minute

Successfully solved the password is:

√ call it a day

Taking advantage of Dawei not come back,

Say a few words.

Li Dawei set just six digit password,

The violence so long as a single thread traversing ok.

What if more bits,

Special character alphanumeric password complex mix it?

We can use a multithreaded process decompression, speed

There are some on the network brute force dictionary,

It can be used to traverse download

Interested friends may wish to try.

David is back.

I told him the password is today's date package compression.

Dawei said: 20,191,119 he had tried.

However, this time is compressed archive of the previous day 20,191,118 ah.

You kept saying that with today's date, take the test today, 1119 What test?

But tea is really delicious ~

  • The relevant source code and crack Dawei archive uploaded Github: https: //github.com/zpw1995/aotodata/tree/master/interest/zip

Author | ZHU Xiao five

It is a cup of tea.

The matter was over something like this:

But also tea, okay okay.

Hurry start, before Li Dawei to fight to get back.

Dawei said the six-digit password

So we can use python to generate all of the six-digit password

#生成从00000099999的密码表
f = open('passdict.txt','w')
for id in range(1000000):
    password = str(id).zfill(6)+'\n'
    f.write(password)
f.close()

Thus, we generated a password table from the 000000-99999.

Passdict.txt and stores them to a file.

6 password table is so big! ! !

What to do next?

Nature is traversed password password will be generated in the table,

Brute force it!

Science Time:

zipFile modular built-in Python module that provides for the creation of a zip file, read, write, append, extract files and list the action list

The method of using the decompression extractll extractall (path = None, members = None, pwd = None)

  • After specifying the location of the extracted files: path

  • members :( Optional) Specifies the Zip file you want to extract a file, the file name must be a method to return the list by namelist () subset

  • Extract the password specified Zip file: pwd

So we can use zipFile module to traverse the password table,

One by one by one password try, see if I can open the archive.

Until it succeeds.

Import zipFile

import zipfile

def extractFile(zipFile, password):
    try:
        zipFile.extractall(pwd= bytes(password, "utf8" ))
        print("李大伟的压缩包密码是" + password)  #破解成功
    except:
        pass  #失败,就跳过

def main():
    zipFile = zipfile.ZipFile('李大伟.zip')   
    PwdLists = open('passdict.txt')   #读入所有密码
    for line in PwdLists.readlines():   #挨个挨个的写入密码
        Pwd = line.strip('\n')
        guess = extractFile(zipFile, Pwd)

if __name__ == '__main__':
    main()

It took less than a minute

Successfully solved the password is:

√ call it a day

Taking advantage of Dawei not come back,

Say a few words.

Li Dawei set just six digit password,

The violence so long as a single thread traversing ok.

What if more bits,

Special character alphanumeric password complex mix it?

We can use a multithreaded process decompression, speed

There are some on the network brute force dictionary,

It can be used to traverse download

Interested friends may wish to try.

David is back.

I told him the password is today's date package compression.

Dawei said: 20,191,119 he had tried.

However, this time is compressed archive of the previous day 20,191,118 ah.

You kept saying that with today's date, take the test today, 1119 What test?

But tea is really delicious ~

  • The relevant source code and crack Dawei archive uploaded Github: https: //github.com/zpw1995/aotodata/tree/master/interest/zip

Guess you like

Origin www.cnblogs.com/7758520lzy/p/12054133.html