Perform the following steps:
- Open a text editor and define three sections, Head, Rule, and Action, as shown in the following screenshot:
- Let's start with the Head section. The following are the parameters which are to be mentioned in the Head section with the following code:
-- Headdescription = [[Sample script to check whether default apache files are present]]author = "Jetty"license = "Same as Nmap--See http://nmap.org/book/man-legal.html"categories = {"default", "safe"}-- Rule-- Action
- Now, let's define the libraries required for the script to function by using the following code:
local shortport = require "shortport"