Skip to Content
Python for Offensive PenTest
book

Python for Offensive PenTest

by Hussam Khrais
April 2018
Intermediate to advanced content levelIntermediate to advanced
176 pages
4h 16m
English
Packt Publishing
Content preview from Python for Offensive PenTest

Exporting to EXE

In this section, similar to what we have done in our TCP socket, we will export and test our HTTP reverse shell into an EXE, and test it after that.

Here, also you need to create a folder named Toexe on your desktop. As mentioned earlier, the py2exe binary file, the py2exe setup file, and the HTTP_Client.py script file should be in the folder. 

The setup file, setup.py, will be as shown here:

# py2exe download link: http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/# HTTP Exporting to EXE Client Setupfrom distutils.core import setupimport py2exe , sys, ossys.argv.append("py2exe")setup(    options = {'py2exe': {'bundle_files': 1}},     windows = [{'script': "HTTP_Client.py"}],     zipfile = None,    )

Perform the following steps ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python Penetration Testing Cookbook

Python Penetration Testing Cookbook

Rejah Rehim

Publisher Resources

ISBN: 9781788838979Supplemental Content