From 72329866b80cb867b8f4f6b4f87d99aaa501eddf Mon Sep 17 00:00:00 2001 From: Peter Potrowl Date: Wed, 8 Feb 2023 07:55:44 -0500 Subject: [PATCH] Update README.md for scripts How to use scripts was not documented and a little hard to find. --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index e6d8059..f8be603 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,18 @@ $nmap ->scan([ 'example.com' ]); ``` +You can run specific scripts with `setScripts()` and get the result with `getScripts()`: + +``` php +$hosts = $nmap + ->setTimeout(120) + ->scan([ 'example.com' ], [ 443 ]); + +$hosts[0]->setScripts(['ssl-heartbleed']); +$ports = $hosts[0]->getOpenPorts(); + +$ports[0]->getScripts(); +``` Nmap XML output -------------------------------