Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python Penetration Testing Essentials

You're reading from   Python Penetration Testing Essentials Techniques for ethical hacking with Python

Arrow left icon
Product type Paperback
Published in May 2018
Publisher
ISBN-13 9781789138962
Length 230 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Mohit Raj Mohit Raj
Author Profile Icon Mohit Raj
Mohit Raj
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Python with Penetration Testing and Networking FREE CHAPTER 2. Scanning Pentesting 3. Sniffing and Penetration Testing 4. Network Attacks and Prevention 5. Wireless Pentesting 6. Honeypot – Building Traps for Attackers 7. Foot Printing a Web Server and a Web Application 8. Client-Side and DDoS Attacks 9. Pentesting SQL and XSS 10. Other Books You May Enjoy

Summary

From reading this chapter, you have got an understanding of networking in Python. The aim of this chapter was to complete the prerequisites of the upcoming chapters. From the start, you have learned the need for pentesting. Pentesting is conducted to identify threats and vulnerabilities in an organization. What should be tested? This is specified in the agreement; don't try to test anything that is not mentioned in the agreement. The agreement is your get out of jail free card. A pentester should have knowledge of the latest technology, and you should have some knowledge of Python before you start reading this book. In order to run Python scripts, you should have a lab setup, a network of computers to test a live system, and dummy websites running on the Apache server.

This chapter also discussed the socket and its methods. The server socket method defines how to make a simple server. The server binds its own address and port to listen to the connections. A client that knows the server address and port number connects to the server to get a service. Some socket methods such as socket.recv(bufsize), socket.recvfrom(bufsize), socket.recv_into(buffer), socket.send(bytes), and so on are useful for the server as well as the client. You learned how to handle different types of exceptions. In the Useful socket methods section, you got an idea of how to get the IP address and hostname of a machine, how to glean the IP address from the domain name, and vice versa.

In the next chapter, we will be looking at scanning pentesting, which includes IP address scanning to detect live hosts. To carry out IP scanning, ping sweep and TCP scanning are used. You will learn how to detect services running on a remote host using a port scanner.

You have been reading a chapter from
Python Penetration Testing Essentials - Second Edition
Published in: May 2018
Publisher:
ISBN-13: 9781789138962
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image