Python for Security and Networking: Leverage Python modules and tools in securing your network and applications, 3rd Edition
€50
Price: $44.99 - $49.99
(as of Oct 02, 2025 11:00:00 UTC – Details)
Gain a firm, practical understanding of securing your network and utilize Python’s packages to detect vulnerabilities in your application
Key FeaturesDiscover security techniques to protect your network and systems using PythonCreate scripts in Python to automate security and pentesting tasksAnalyze traffic in a network and extract information using PythonBook Description
Python’s latest updates add numerous libraries that can be used to perform critical security-related missions, including detecting vulnerabilities in web applications, taking care of attacks, and helping to build secure and robust networks that are resilient to them. This fully updated third edition will show you how to make the most of them and improve your security posture.
The first part of this book will walk you through Python scripts and libraries that you’ll use throughout the book. Next, you’ll dive deep into the core networking tasks where you will learn how to check a network’s vulnerability using Python security scripting and understand how to check for vulnerabilities in your network – including tasks related to packet sniffing. You’ll also learn how to achieve endpoint protection by leveraging Python packages along with writing forensics scripts.
The next part of the book will show you a variety of modern techniques, libraries, and frameworks from the Python ecosystem that will help you extract data from servers and analyze the security in web applications. You’ll take your first steps in extracting data from a domain using OSINT tools and using Python tools to perform forensics tasks.
By the end of this book, you will be able to make the most of Python to test the security of your network and applications.
What you will learnProgram your own tools in Python that can be used in a Network Security processAutomate tasks of analysis and extraction of information from serversDetect server vulnerabilities and analyze security in web applicationsAutomate security and pentesting tasks by creating scripts with PythonUtilize the ssh-audit tool to check the security in SSH serversExplore WriteHat as a pentesting reports tool written in PythonAutomate the process of detecting vulnerabilities in applications with tools like FuxploiderWho this book is for
This Python book is for network engineers, system administrators, and other security professionals looking to overcome common networking and security issues using Python. You will also find this book useful if you’re an experienced programmer looking to explore Python’s full range of capabilities. A basic understanding of general programming structures as well as familiarity with the Python programming language is a prerequisite.
Table of ContentsWorking with Python ScriptingSystem Programming PackagesSocket ProgrammingHTTP Programming and Web AuthenticationAnalyzing Network Traffic and Packets SniffingGathering Information from Servers with OSINT ToolsInteracting with FTP, SFTP, and SSH ServersWorking with Nmap ScannerInteracting with Vulnerability ScannersInteracting with Server Vulnerabilities in Web ApplicationsObtain Information from Vulnerabilities DatabasesExtracting Geolocation and Metadata from Documents, Images, and BrowsersPython Tools for Brute-Force AttacksCryptography and Code ObfuscationAssessments – Answers to the End-of-Chapter Questions
From the brand


Packt is a leading publisher of technical learning content with the ability to publish books on emerging tech faster than any other.
Our mission is to increase the shared value of deep tech knowledge by helping tech pros put software to work.
We help the most interesting minds and ground-breaking creators on the planet distill and share the working knowledge of their peers.
See Our Full Range
Cybersecurity and Pentesting
Linux and Networking
See Our Full Range
Publisher : Packt Publishing
Publication date : June 7, 2023
Edition : 3rd
Language : English
Print length : 586 pages
ISBN-10 : 1837637555
ISBN-13 : 978-1837637553
Item Weight : 2.19 pounds
Dimensions : 7.5 x 1.32 x 9.25 inches
Best Sellers Rank: #539,079 in Books (See Top 100 in Books) #283 in Computer Hacking #397 in Computer Network Security #457 in Python Programming
Customer Reviews: 4.4 4.4 out of 5 stars 42 ratings var dpAcrHasRegisteredArcLinkClickAction; P.when(‘A’, ‘ready’).execute(function(A) { if (dpAcrHasRegisteredArcLinkClickAction !== true) { dpAcrHasRegisteredArcLinkClickAction = true; A.declarative( ‘acrLink-click-metrics’, ‘click’, { “allowLinkDefault”: true }, function (event) { if (window.ue) { ue.count(“acrLinkClickCount”, (ue.count(“acrLinkClickCount”) || 0) + 1); } } ); } }); P.when(‘A’, ‘cf’).execute(function(A) { A.declarative(‘acrStarsLink-click-metrics’, ‘click’, { “allowLinkDefault” : true }, function(event){ if(window.ue) { ue.count(“acrStarsLinkWithPopoverClickCount”, (ue.count(“acrStarsLinkWithPopoverClickCount”) || 0) + 1); } }); });
2 reviews for Python for Security and Networking: Leverage Python modules and tools in securing your network and applications, 3rd Edition
Add a review
€50
DJ Joachim –
Absolute must for rising cybersecurity professionals and programmers alike.
In chapter 1 you’ll start learning about Python fundamentals, gaining a basic understanding of functions, built-ins, data types, methods, and Python’s core features. This will help set the stage to the more complicated security programming concepts arriving in the later chapters. I specifically liked the beginning examples of how to interact with the filesystem, as this is something that I hadn’t learned in depth before diving into this book.Everyone wants to make their programs faster; Chapter 2 does a great job at diving into methodologies to increase filesystem and process interaction with the host operating system. Threading and Multiprocessing are a must-have comprehension when creating cybersecurity tools for use in production environments.Chapter 3 dives deeply into socket programming. The tools I create at my day job must often interact with other devices over the network. I have already implemented some of the features discussed in this chapter in projects that I’ve been working on. One of the things I like most about this book are the code examples. I’m the type that learns faster from code blocks than I do from text. The author did a great job at dishing out small and easy to understand snippets for each new concept discussed per chapter. The author also did a great job at explaining enough of what you need to know to use the functions and methods without overloading you with technical jargon.Another _really_ good nugget from the sockets chapter was sending files over a network connection. That is something that I haven’t yet played with. I have definitely walked away knowing more than I did when I started reading the book.Later chapters go into HTTP programming and interacting with Web Proxies (which anyone working in a corporation is going to run into), later followed by an in-depth dive of creating, interacting with, and packet capture data. All great chapters for upcoming cyber professionals wanting to extract, parse, or manipulate raw network traffic.Chapter 9 had a great walk through on how to interact with cybersecurity tools like OWASP Zap programmatically. This chapter alone could be the precursor to building plugin integrations for cybersecurity tools!Chapter 14 has a great working example of DES encryption and decryption. At some point in our careers, we’re going to handle sensitive data that needs to be adequately protected. This chapter did a terrific job at showcasing how to implement cryptographic algorithms to increase the overall security of your code.My final review: Absolutely a must have for cybersecurity professionals across the board. If you are new to programming and cybersecurity–this is the best of both worlds. If you are a seasoned cybersecurity development professional–you will still walk away with useful nuggets of information that can be applied to current or deployed projects. This is a great book with many valuable resources that are directly applicable to a career in cybersecurity.PS: Don’t forget to download the GitHub repo! All the code examples are nicely arranged so you can hop right in and start practicing with the exercises.
Dave Dukinfield –
Wonderfully covers the fundamentals of Python programming and its application to cybersecurity.
“Python for Security and Networking” by Jose Manuel Ortega is an excellent resource for anyone interested in leveraging the power of Python for network security purposes. This book provides a comprehensive guide that covers both the fundamentals of Python programming and its practical application in the field of cybersecurity.It is a great refresher on Python (data structures, functions, etc.). Then, leveraging this understanding, delivers the knowledge you need to deploy powerful security tools to understand your security posture and the traffic in your network. It delves into various security-related topics, including packet manipulation, network scanning, web scraping, and even ethical hacking techniques.One of the standout features of this book is the author’s ability to explain complex concepts in a clear and accessible manner. Even if you have little to no prior experience with Python or network security, Ortega’s explanations will help you grasp the material with ease. The book takes a step-by-step approach, gradually building upon the foundational concepts and introducing more advanced topics as you progress through the chapters.Another aspect that sets this book apart from others is its hands-on approach. Each chapter includes practical examples, exercises, and projects that allow you to apply the knowledge gained.Furthermore, the author emphasizes the importance of best practices and security considerations throughout the book. Whether it’s discussing secure coding techniques, network vulnerability assessments, or protecting against common attacks, Ortega ensures that readers are equipped with the knowledge to develop secure and robust applications.While the focus of the book is on Python, it also provides valuable insights into networking protocols and concepts. This makes it a valuable resource for individuals interested in both programming and network security, as it bridges the gap between these two domains seamlessly.Whether you are a beginner or an experienced professional, this book will undoubtedly help you gain the knowledge and confidence to tackle security challenges using Python.