Book Image

Hands-On Enterprise Automation with Python

By : Bassem Aly
Book Image

Hands-On Enterprise Automation with Python

By: Bassem Aly

Overview of this book

Hands-On Enterprise Automation with Python starts by covering the set up of a Python environment to perform automation tasks, as well as the modules, libraries, and tools you will be using. We’ll explore examples of network automation tasks using simple Python programs and Ansible. Next, we will walk you through automating administration tasks with Python Fabric, where you will learn to perform server configuration and administration, along with system administration tasks such as user management, database management, and process management. As you progress through this book, you’ll automate several testing services with Python scripts and perform automation tasks on virtual machines and cloud infrastructure with Python. In the concluding chapters, you will cover Python-based offensive security tools and learn how to automate your security tasks. By the end of this book, you will have mastered the skills of automating several system administration tasks with Python.
Table of Contents (20 chapters)

Installing Scapy

Scapy supports both Python 2.7.x and 3.4+, starting from Scapy version 2.x. However, for versions lower than 2.3.3, Scapy needs Python 2.5 and 2.7, or 3.4+ for versions after that. Since we already installed that latest Python version, it should be fine to run the latest version of Scapy without a problem.

Also, Scapy has an older version (1.x), which is deprecated and doesn't provide support for Python 3 and works only on Python 2.4.

Unix-based systems

To get the latest and greatest version, you need to use python pip:

pip install scapy
The output should look something like the following screenshot:

To verify that Scapy is installed successfully, access the Python console and try to import the scapy...