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

Explaining the Perl/Tk widgets

All the Perl/Tk examples in this chapter will follow the grid layout design. The grid design uses a matrix layout, which refers to the space within the window in rows and columns. Let's take a look at a simple program that uses the Nmap command-line program, and define the callback function for a simple Scan button to print the output of Nmap into a read-only textbox widget. This example must also take user input for a hostname.

In the following screenshot, we see the entire program window:

Explaining the Perl/Tk widgets

This window is an object created using the OOP syntax and the new()method, as follows:

my $mw = MainWindow->new( -title=>"Perl Pentest ...

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