O'Reilly logo

Learning Metasploit Exploitation and Development by Aditya Balapure

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

Scripting with Metasploit

Now we move on to some concepts of custom Metasploit scripting using Ruby. Let us start off with a very simple program that will print Hello World on the screen. Demonstrated in the following screenshot is how we write our first simple program. We can even simply write down the same program in a text pad and save it in the destination folder.

Scripting with Metasploit

Since we already have a Meterpreter session, we can simply run our script by typing in run helloworld. We can see that our program has successfully executed and has printed Hello World on the screen. So we have successfully built our own custom script.

Earlier, we used a print_status ...

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