Skip to main content

Unzip compressed files using python codes

 



Since my office blocked my admin privileges to install multiple software. By this Friday I did not get any support from the Desktop team to install the 7zip software and its urgent work. 


Suddenly I got an idea, "Why can't use my Python"?  he he he......... Installed on my PC!

So, immediately enter into StackOverflow, searched "how to unzip using python" and got the precious codes that I pasted below.

Yup ! finally unzipped the P1r@ted study document, and kept it inside my "STUDY MATERIAL" folder as a hidden file.



# importing the "compressed file" module

import tarfile


# open file

file = tarfile.open('studymaterial.tar')


# uncompress file

file.extractall('./folderpath')


file.close()


Comments

Popular posts from this blog

KARMA - Search for leaked Emails and Passwords

Hi Everyone, In this article we going to introduce the tool is KARMA.Its used to collect pwned Email address and passwords from pwndb. The tool is written in python3. So, you must need Python3 inside your machine . INSTALL sudo apt install tor python3 python3-pip git clone https :// github . com / decoxviii / karma . git ; cd karma sudo -H pip3 install -r requirements.txt python3 bin/karma.py --help TEST All the tests were done in  Debian/Ubuntu . Search emails with the password:  123456789 python3 bin/karma.py search '123456789' --password -o test1 Search emails with the local-part:  johndoe python3 bin/karma.py search 'johndoe' --local-part -o test2 Search emails with the domain:  hotmail . com python3 bin/karma.py search ' hotmail . com ' --domain -o test3 Search email password:  johndoe@unknown.com python3 bin/karma.py target 'johndoe@unknown.com' -o test4 DEMO VIDEO