-
Notifications
You must be signed in to change notification settings - Fork 14.1k
How to zip files with Msf Util EXE.to_zip
Caitlin Condon edited this page Dec 11, 2018
·
2 revisions
Compressing files into zip format is very easy with Metasploit. For most purposes, you can use Msf::Util::EXE.to_zip()
to compress data into a zip file.
Note that the former Rex::Zip::Archive()
should no longer be used.
files =
[
{data: 'AAAA', fname: 'test1.txt', comment: 'my comment'},
{data: 'BBBB', fname: 'test2.txt'}
]
zip = Msf::Util::EXE.to_zip(files)
If saved as a file, the above example will extract to the following:
$ unzip test.zip
Archive: test.zip
extracting: test1.txt
extracting: test2.txt
- Home Welcome to Metasploit!
- Using Metasploit A collection of useful links for penetration testers.
-
Setting Up a Metasploit Development Environment From
apt-get install
togit push
. - CONTRIBUTING.md What should your contributions look like?
- Landing Pull Requests Working with other people's contributions.
- Using Git All about Git and GitHub.
- Contributing to Metasploit Be a part of our open source community.
- Meterpreter All about the Meterpreter payload.