In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to crack the encryption of compressed package". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to crack the encryption of a compressed package.
When compressing the album, a password was added. LIke This ↓
When you open it, you are prompted to enter a password.
1. Basic ideas
First of all, if you want the python command line to open the little sister photo album, then first find the command line you are trying to open, that is, the command line used when unzipping. Then we use the python script to write a nested loop, constantly trying to extract the zip file, and then retrieve the real password.
2. Decompression command
First of all, the compressed file is in zip format, and we use the omnipotent 7z command to extract it.
Why not use unzip commands? (because I've tried, unzip can't loop)
3. Analysis of decompression command parameters.
For # 7Z detailed parameters, only a few key parameters PS C:\ Users\ lex > 7z7-Zip 21.01 alpha (x64): Copyright (c) 1999-2021 Igor Pavlov: 2021-03-09Usage: 7z [.] [...] [@ listfile] a: Add files to archive # add compression d: Delete files from archive e: Extract files from archive (without using directory names) t: Test integrity of archive # attempt password Do not extract.-o {Directory}: set Output directory-p {Password}: set Password # set password parameters
4. Arrange the 7z decompression command
The command is so simple that it feels a little unworthy of my talents and ideas.
7z-p 123456 t Sanya photo album .zip # t: try to open it, similar to running in the background #-p: try the password # finally is the file to be extracted
5. Close the door! Python script
According to the needs of the little sister, the password is 6-digit pure numbers, which saves me a lot of time. Just try 6-digit pure numbers. The script came out in three minutes.
#-*-coding:utf-8-*-import osimport subprocessimport zipfiledef brutecrack (): for an in range (1m 10): for b in range (1m 10): for c in range (1m 10): for din range (1m 10): for e in range (1m 10): for f in range (1m 10): Passwd=str (a) + str (b) + str (c) + str (d) + str (e) + str (f) command='7z-paired passwd / Sanya album. Zip'# t represents test No actual decompression Only test the password print (passwd) child=subprocess.call (command) # os.popen (command) # this can also be used But it is difficult to monitor the decompression status print (child) if child==0: print ("album password is:" + passwd) returnif _ _ name__ ='_ _ main__': brutecrack ()
In the face of the helpless goddess, I ran the script, and in less than 5 seconds, the album successfully opened. Effect gif ↓
At this point, I believe you have a deeper understanding of "how to crack the encryption of compressed packets". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.