How do it…

Perform the following steps:

  1. Open a text editor and define three sections, Head, Rule, and Action, as shown in the following screenshot:

  1. 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"categories = {"default", "safe"}-- Rule-- Action
  1. Now, let's define the libraries required for the script to function by using the following code:
local shortport = require "shortport"

Get Network Scanning Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.