O'Reilly logo

Penetration Testing with Perl by Swizec Teller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Perl string functions and operators

So how do we really take advantage of these regular expressions in Perl? Well, we will be learning about four different operators and functions that use them, m//, s///, grep(), and split(). These will allow us to focus directly on the returned text that we desire from any scan during a penetration test. Let's first take a look at the Perl m// matching operator in action.

The Perl m// matching operator

Let's design a simple script that uses the curl Linux program to get a web page and filter its output. curl is a Linux program that transfers a lot of different protocol syntax from the Web via our queries back to our command line's standard output (the screen in most cases, STDOUT). This Perl script relies on an ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required