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.
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