Advertisement
makispaiktis

Lua 2 - A simple HTTP scan

Nov 9th, 2024
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | Cybersecurity | 0 0
  1. -- HEAD
  2. local stdnse = require "stdnse"
  3. local shortport = require "shortport"
  4. description = [[
  5.    A simple HTTP scan
  6. ]]
  7. author = "boufik"
  8. license = "Same as Nmap--See https://nmap.org/book/man-legal.html"
  9. categories = {"safe"}
  10.  
  11.  
  12. -- RULES
  13. portrule = shortport.port_or_service(8000, "http-alt")
  14.  
  15.  
  16. -- ACTION
  17. action = function(host, port)
  18.     return port.version.name .. " is " .. port.state .. " and running on port number " .. port.number .. "."
  19. end
  20.  
  21.  
  22. -- Bash Run: nmap --script my-script-name localhost
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement