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

Server side

So, let's start with the updated server side script:

# Python For Offensive PenTest: A Complete Practical Course - All rights reserved # Follow me on LinkedIn https://jo.linkedin.com/in/python2# TCP Data Exfiltration Serverimport socket import os # Needed for file operation# In the transfer function, we first create a trivial file called "test.png" as a file holder just to hold the # received bytes , then we go into infinite loop and store the received data into our file holder "test.png", however# If the requested file doesn't exist or if we reached the end of the file then we will break the loop# note that we could know the end of the file, if we received the "DONE" tag from the target side# Keep in mind that you can enhance ...
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