Closed noneymous closed 4 years ago
Good idea, I introduced named return values and it's already commited.
Just the warning unit test outstanding. Maybe tomorrow.
Sorry, I'm in the wrong environment to get the tests running. I feel this would take me too much time but might be a simple thing for you...
Awaiting Unit Tests
I'll test it this weekend :) It's on my calendar now:
Thank you guys
What's the plan, when do you intend to merge?
@noneymous we will merge once tests have been completed. We thank you for your patience. Both myself and @Ullaakut have busy schedules at times.
I'll wait for @TheSecEng to test it as well and once it's fine for him, we can merge the PR :)
Cleared.
Here comes the implementation of my suggestion to fix https://github.com/Ullaakut/nmap/issues/38. Please have a look and see how this works for you. I tested it against some scan targets and am still running it against even more. You are probably using different Nmap arguments than me, so I'm curious about your experiences.
Result processing would be like: 1) Check if error is returned (includes package errors and nmap errors). If error is returned, something went most probably wrong and you can abort. Warning's might give you more details/flexibility. Most returned errors are defined as error constants in errors.go. Have a look there to see what issues might come back to handle them individually 2) OptionA: Check warnings for things that might be an issue for you and abort or proceed OptionB: Ignore warnings at all and just work with the returned XML. It already contains a lot of details
Here is sample usage code: