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

Comparison Operations

Once we have values stored in variables, we’ll often want to perform comparisons on those values to determine whether two variables have the same or different values. For example, we might want to check if one student is older than another student. Similarly, we might want to compare a variable to a constant value to check, for example, whether a student is over the age of 18.

We perform these comparisons using specialized comparison operators, as shown in the following table.

  Bash PowerShell Ruby Python
Equality –eq –eq == ==
Less than –lt –lt < <
Less than or equal to –le –le <= <=
Greater than –gt –gt > >
Greater than or equal to –ge –ge >= >=
Not equal –ne –ne != !=

The examples in the table perform the specified comparison on two variables, x and y, in that order. For example, x &lt...