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 ...

Get Python for Offensive PenTest now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.