Book Image

CompTIA PenTest+ Study Guide

By : Mike Chapple, David Seidl
Book Image

CompTIA PenTest+ Study Guide

By: Mike Chapple, David Seidl

Overview of this book

The CompTIA PenTest+ Study Guide: Exam PT0-001 offers comprehensive preparation for the newest intermediate cybersecurity certification exam. With expert coverage of Exam PT0-001 objectives, this book is your ideal companion throughout all stages of study; whether you’re just embarking on your certification journey or finalizing preparations for the big day, this invaluable resource helps you solidify your understanding of essential skills and concepts. The book shows how to perform security assessments on desktops, mobile devices, cloud, IoT, as well as industrial and embedded systems. You'll learn how to identify security weaknesses and manage system vulnerabilities. As you progress, you'll learn methods to ensure that existing cybersecurity practices, configurations, and policies conform with current best practices. You'll assess your knowledge by simulating cyber attacks to pinpoint security weaknesses in operating systems, networks, and applications. By the end of the book, you'll have all the resources you need to prepare for the exam - identify what you already know, learn what you don’t know, and face the exam with full confidence.
Table of Contents (21 chapters)
Free Chapter
About the Authors
Assessment Test
Answers to Assessment Test
End User License Agreement

Flow Control

In any of our languages, we can write a basic script as a series of commands that execute sequentially. For example, the following Python script runs a port scan looking for systems on the network that are listening for connections on port 22:

import nmap
scanner = nmap.PortScanner()
scanner.scan('', '22')
print("Scan complete")

This script consists of four lines, and Python will execute them sequentially. It begins with the first line, which imports the Nmap module. Once that command completes, the second line creates a port scanner and the third line uses that port scanner to run the network scan. Finally, the fourth line prints a message to the user that the scan was complete.