Nmap Development mailing list archives
Re: [NSE] Script Pre-scanning and Post-scanning example
From: Kris Katterjohn <katterjohn () gmail com>
Date: Tue, 10 Aug 2010 20:19:16 -0500
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/10/2010 07:28 PM, Patrick Donnelly wrote:
If you dislike the if statements and would prefer something like a "postaction" function to help separate the logic, may I suggest this: function preaction (...) end function scanaction (...) end function postaction (...) end local actions = { prerule = preaction, hostrule = scanaction, portrule = scanaction, postrule = postaction, } function action (...) return actions[SCRIPT_TYPE](...) end
Yep, that'll do it :) I fail at Lua. Thanks, Kris Katterjohn -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJMYfqTAAoJEEQxgFs5kUfuGAsP/3wwDoHE6fQ919/xMnUujRrn BWHvYK/rAlg5hIjr5jKumzftQDqfO18vQQU0UcD3Lc22ylDrjefJIVH+H5zauqkb B6h33ZpgTZYXgTuiKzcQOHrKqgsd3UGCsfgUe5kgCor0zSJmP29wF7JuOtCZOkEl 1iqRbwOjnpoBg2qJvdT8+hEariXx4WDGX45Voy/mrZch9tiFZFyK/66NRTYngz1m iNcpsRo5TNfos+QKW7X1tq4+GmrGj9o3KhK8Vq9dk3EDvpiBUu0MYXScFRE6L7BH j5dvt0BvqryoHEbBDmxN2HoC1Xn1d5VKn61nsei9PeCGDWnZzHJO180wvpNlxrTr OfeVBI4k8ACyTljYIIVJbQ0FOJCrHNaqhcU8hLAQC6xUnXmhmNjm/MEdAKjJ5lQ8 Cc+QiYLDxloRA9BBr6Gptcm1SP0I7BuCPbPqm1wl8ZewBt8L5MKOJg8Fnnq/Cuk3 ycGcjvufWQ2QSc2yw/AE1e5Sgy7qF9djQQJgbgFkrYSnTxhlptP+1mYnl/OxlEd8 qSVkUDtBzFxWCh5fwwsrNR7urVXavSLpOXF9zNUkl7EIoDeraIhXJQ8m4Nhw3ZLd 6fkEKeZvgGKLqTbNwCAfiB4QIWrDh8UBiMZfW+WnIpVvolfz8fXIF7ibbuiNkA8N o03iK/Gj+J82sx0oqHXL =7CHe -----END PGP SIGNATURE----- _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- [NSE] Script Pre-scanning and Post-scanning example Djalal Harouni (Aug 06)
- Re: [NSE] Script Pre-scanning and Post-scanning example Kris Katterjohn (Aug 10)
- Re: [NSE] Script Pre-scanning and Post-scanning example Patrick Donnelly (Aug 10)
- Re: [NSE] Script Pre-scanning and Post-scanning example Kris Katterjohn (Aug 10)
- Re: [NSE] Script Pre-scanning and Post-scanning example Djalal Harouni (Aug 11)
- Re: [NSE] Script Pre-scanning and Post-scanning example Kris Katterjohn (Aug 11)
- Re: [NSE] Script Pre-scanning and Post-scanning example Kris Katterjohn (Sep 09)
- Re: [NSE] Script Pre-scanning and Post-scanning example David Fifield (Sep 27)
- Re: [NSE] Script Pre-scanning and Post-scanning example Kris Katterjohn (Sep 27)
- Re: [NSE] Script Pre-scanning and Post-scanning example Patrick Donnelly (Aug 10)
- Re: [NSE] Script Pre-scanning and Post-scanning example Kris Katterjohn (Aug 10)
- Re: [NSE] resolveall prerule, nmap.resolve(), nmap.address_family() Djalal Harouni (Aug 11)
- Re: [NSE] resolveall prerule, nmap.resolve(), nmap.address_family() Patrik Karlsson (Aug 12)
- Re: [NSE] resolveall prerule, nmap.resolve(), nmap.address_family() Patrick Donnelly (Aug 12)
- Re: [NSE] resolveall prerule, nmap.resolve(), nmap.address_family() Fyodor (Aug 15)