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

Logging data to MySQL

Logging data does not only have to be done using commonly used files such as those we have used earlier. In fact, we can even log our data into MySQL databases using the Net::MySQL Perl module.

Keeping our logs in databases is efficient because of the fact that we have multiple, standardized ways of accessing the data. For instance, we can access it using interpreted web languages such as PHP, from the Linux command-line interface, or, as in our following lesson, using Perl. First, we need to start up a MySQL server. This is an incredibly easy task to do with Linux. The first step is to install the server and give it a root password. With a Debian-based Linux, this can be done using aptitude with the following command:

root@80211:~# ...

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