leonjza / PHPNessusNG

PHP wrapper functions for interfacing with the Nessus V6.x API
MIT License
15 stars 9 forks source link

Allows empty response from Nessus + unit tests #15

Closed pdscopes closed 7 years ago

pdscopes commented 7 years ago

I've done three main things to improve what is a very helpful library:

  1. Allowed empty responses from Nessus by using json_last_error() to detect JSON parsing failures.
    • Some Nessus responses are legitely empty, e.g. DELETE /scans/{scan_id}
    • Having to add the $raw = true seems like a ugly way of resolving this
  2. Removed the upperbound restriction in composer.json for PHP
  3. Added units tests (this did result in some code refactoring)

Please consider approving this pull request.

Kind regards.

leonjza commented 7 years ago

This is great! 👍

I'll test and revert back soonest!