diff --git a/lib/nessus/nessus-xmlrpc.rb b/lib/nessus/nessus-xmlrpc.rb index 40148f2c63..58e48e15c0 100644 --- a/lib/nessus/nessus-xmlrpc.rb +++ b/lib/nessus/nessus-xmlrpc.rb @@ -28,8 +28,12 @@ module Nessus :json => 1 } res = http_post(:uri=>"/session", :data=>payload) - @token = "token=#{res['token']}" - true + if res['token'] + @token = "token=#{res['token']}" + return true + else + false + end end def x_cookie