Nmap Development mailing list archives
[NSE] Script execution error message
From: Patrik Karlsson <patrik () cqure net>
Date: Thu, 29 Mar 2012 23:33:15 +0200
Hi all, I know we've discussed the lack of proper error messages when a script crashes in non debugging mode in the past. I had forgotten all about it until earlier this week when I stumbled over a bug in the mssql library preventing any mssql scripts from running. The bug had to do with changes in other parts of Nmap and would most likely have been detected earlier if a simple error message was displayed for everyone running the script, regardless of debug/verbose level. I'm attaching a first attempt on a patch for nse_main.lua which essentially detects if Nmap is being run in debug mode or not. If it's not, and the script crashes, it returns the following message (instead of the stack trace shown in debug mode) as the script result: 80/tcp open http | http-mirror: |_ ERROR: Script execution failed unexpectedly! Re-run the script in debug mode for additional details. The message might need re-wording into something more appropriate, and also I'm not sure whether the patch is in the right place or just completely wrong. So, any ideas or suggestions are most welcome! //Patrik -- Patrik Karlsson http://www.cqure.net http://twitter.com/nevdull77
Attachment:
script_execution_failed.patch
Description:
_______________________________________________ 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 execution error message Patrik Karlsson (Mar 29)
- Re: [NSE] Script execution error message Patrick Donnelly (Mar 29)
- Re: [NSE] Script execution error message Patrik Karlsson (Mar 29)
- Re: [NSE] Script execution error message Patrick Donnelly (Mar 29)
- Re: [NSE] Script execution error message Patrik Karlsson (Mar 29)
- Re: [NSE] Script execution error message Patrick Donnelly (Mar 29)