<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Hurricane Labs Add-on for Nessus: Getting connection error using API keys in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265428#M73860</link>
    <description>&lt;P&gt;Thank you for quick reply.&lt;BR /&gt;
We use Nessus 6.5.6&lt;/P&gt;</description>
    <pubDate>Thu, 31 Mar 2016 08:14:40 GMT</pubDate>
    <dc:creator>vceclava</dc:creator>
    <dc:date>2016-03-31T08:14:40Z</dc:date>
    <item>
      <title>Hurricane Labs Add-on for Nessus: Getting connection error using API keys</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265426#M73858</link>
      <description>&lt;P&gt;Dear Hurricane Labs Team,&lt;/P&gt;

&lt;P&gt;We have faced a problem with the Hurricane Labs Add-on for Nessus when we try to connect via api access and secret key.&lt;/P&gt;

&lt;P&gt;The script returns next error:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1184iD0B08F46E2E81B33/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
and there is some logical problems with this part of &lt;STRONG&gt;init&lt;/STRONG&gt;.py:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1185iAF91F4D38760EAF7/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Please FIX it. Or explain how to connect in any other way.&lt;BR /&gt;
Thank you in advance,&lt;BR /&gt;
Vlada&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 15:53:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265426#M73858</guid>
      <dc:creator>vceclava</dc:creator>
      <dc:date>2016-03-30T15:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Hurricane Labs Add-on for Nessus: Getting connection error using API keys</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265427#M73859</link>
      <description>&lt;P&gt;Thank you so much for the detailed error report! Can you confirm what version of Nessus you're running?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 16:49:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265427#M73859</guid>
      <dc:creator>mcmaster</dc:creator>
      <dc:date>2016-03-30T16:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Hurricane Labs Add-on for Nessus: Getting connection error using API keys</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265428#M73860</link>
      <description>&lt;P&gt;Thank you for quick reply.&lt;BR /&gt;
We use Nessus 6.5.6&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 08:14:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265428#M73860</guid>
      <dc:creator>vceclava</dc:creator>
      <dc:date>2016-03-31T08:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Hurricane Labs Add-on for Nessus: Getting connection error using API keys</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265429#M73861</link>
      <description>&lt;P&gt;Hi! any updates?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 11:31:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265429#M73861</guid>
      <dc:creator>vceclava</dc:creator>
      <dc:date>2016-04-08T11:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Hurricane Labs Add-on for Nessus: Getting connection error using API keys</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265430#M73862</link>
      <description>&lt;P&gt;What happens if you remove everything past the number 6 on line 87 in init.py?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 01:19:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265430#M73862</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-04-12T01:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Hurricane Labs Add-on for Nessus: Getting connection error using API keys</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265431#M73863</link>
      <description>&lt;P&gt;When everything after 6 is commented, I have next error :&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;&lt;BR /&gt;
File "scans.py", line 60, in &lt;BR /&gt;
    nessus = NessusApi(cfg["username"],&lt;BR /&gt;
cfg["password"],&lt;BR /&gt;
endpoint=cfg["endpoint"],&lt;BR /&gt;
accessKey=cfg["accesskey"],&lt;BR /&gt;
secretKey=cfg["secretkey"])   File&lt;BR /&gt;
&lt;CODE&gt;/opt/splunk/etc/apps/TA-nessus/bin/nessus/__init__.py&lt;/CODE&gt;,&lt;BR /&gt;
line 31, in &lt;CODE&gt;__init__&lt;/CODE&gt;&lt;BR /&gt;
    self.login(username, password)   File&lt;BR /&gt;
&lt;CODE&gt;/opt/splunk/etc/apps/TA-nessus/bin/nessus/__init__.py&lt;/CODE&gt;,&lt;BR /&gt;
line 95, in login&lt;BR /&gt;
    self.API_TOKEN = r.json()["token"] KeyError: 'token'&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;As far as I understand, the flow reaches line &lt;STRONG&gt;71&lt;/STRONG&gt; and then, goes strait to &lt;STRONG&gt;76&lt;/STRONG&gt;, as url is &lt;STRONG&gt;"session"&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;When I comment everything after 6 in line &lt;STRONG&gt;71&lt;/STRONG&gt;, the same error occurs&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 10:52:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265431#M73863</guid>
      <dc:creator>vceclava</dc:creator>
      <dc:date>2016-04-12T10:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Hurricane Labs Add-on for Nessus: Getting connection error using API keys</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265432#M73864</link>
      <description>&lt;P&gt;Ok so from what I see you're getting 401 unauthorized which means you've configured the wrong user/pass/etc.&lt;/P&gt;

&lt;P&gt;In your error message it looks you're using defaults in the config file.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 11:12:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265432#M73864</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-04-12T11:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Hurricane Labs Add-on for Nessus: Getting connection error using API keys</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265433#M73865</link>
      <description>&lt;P&gt;When I modified login function it worked with the same parameters:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;def login(self, username, password):&lt;BR /&gt;
        if self.major_version == 5:&lt;BR /&gt;
            r = self._post("login", data={"login": username, "password": password})&lt;BR /&gt;
            xml = ET.fromstring(r.text)&lt;BR /&gt;
            self.API_TOKEN = xml.find("./contents/token").text&lt;BR /&gt;
        elif self.major_version == 6 and (self.minor_version &amp;lt; 4 or not self.accessKey):&lt;BR /&gt;
            r = self._post("session", data = {'username': username, 'password': password})&lt;BR /&gt;
        &lt;STRONG&gt;elif self.major_version == 6 and self.minor_version &amp;gt;4:&lt;BR /&gt;
          r = self._get("session", data = {'username': username, 'password': password})&lt;/STRONG&gt;&lt;BR /&gt;
        elif r.status_code != 401 and (self.major_version == 6 and self.minor_version &amp;lt;4):&lt;BR /&gt;
            self.API_TOKEN = r.json()["token"]&lt;BR /&gt;
        **elif r.status_code != 401 and (self.major_version == 6 and self.minor_version &amp;gt;4):&lt;BR /&gt;
          self.API_TOKEN = None**&lt;BR /&gt;
        else:&lt;BR /&gt;
            raise Exception("ERROR: Invalid credentials")&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:23:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265433#M73865</guid>
      <dc:creator>vceclava</dc:creator>
      <dc:date>2020-09-29T09:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hurricane Labs Add-on for Nessus: Getting connection error using API keys</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265434#M73866</link>
      <description>&lt;P&gt;I looked at the code and errors from my computer vs my phone and have a different opinion now.  &lt;/P&gt;

&lt;P&gt;It seems they are missing a conditional statement on the login function which would match major version 6 and minor version &amp;gt;= 4 which would get a token from the nessus api.  &lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 12:14:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265434#M73866</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-04-13T12:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Hurricane Labs Add-on for Nessus: Getting connection error using API keys</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265435#M73867</link>
      <description>&lt;P&gt;I completely agree with you&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 12:23:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265435#M73867</guid>
      <dc:creator>vceclava</dc:creator>
      <dc:date>2016-04-13T12:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Hurricane Labs Add-on for Nessus: Getting connection error using API keys</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265436#M73868</link>
      <description>&lt;P&gt;It appears you can probably circumvent this issue by "hardcoding" your api token on line 23 of &lt;CODE&gt;nessus/__init__.py&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;self.API_TOKEN = '14632bb35282171c7b18472287c253668423eb16c1187803'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;instead of &lt;STRONG&gt;None&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1183iF3D0487D6E596BD7/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;You should be able to get your token using the following curl command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; curl -k -X POST -H 'Content-Type: application/json' -d '{"username":"yourUsername","password":"yourPassword"}' https://[yournessusaddress]:8834/session
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which is effectively what the code should be doing... but for some reason it isnt.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 12:31:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265436#M73868</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-04-13T12:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Hurricane Labs Add-on for Nessus: Getting connection error using API keys</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265437#M73869</link>
      <description>&lt;P&gt;Hey guys sorry for the delay in getting back to you. We'll be releasing a new version of the app to correct this issue. Thanks for the patience and persistence in getting this figured out. &lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 12:34:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hurricane-Labs-Add-on-for-Nessus-Getting-connection-error-using/m-p/265437#M73869</guid>
      <dc:creator>mcmaster</dc:creator>
      <dc:date>2016-04-13T12:34:34Z</dc:date>
    </item>
  </channel>
</rss>

