O'Reilly logo

Network Scanning Cookbook by Sairam Jetty

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

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 http://nmap.org/book/man-legal.html"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"

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