Few fixes

 * netcat on debian was not working, added a detection routine to use the proper syntax
 * when no open port was found, json was incorrect (' ]') instead of ('[ ]')