-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After a successful authentication, session_id is nil since gem version 0.1.3 #45
Comments
I cannot reproduce the behavior you describe using 0.6.1 of the gem. After successful login, I get a value value for nsc.session_id Do you have some minimal reproducing code to demonstrate the problem? |
@mdaines-r7 I edited the issue... the problem is not that session_id is nil but all other API calls failed. You can try with this app: https://github.com/thesp0nge/nexty |
Do you have a usage example showing the failure? |
Install the nexty gem or clone the repo, change config.yaml accordingly and then issue the command: bundle exec ruby -I lib bin/nexty --host ip With latest gem the ip is not found, with version older then 0.1.3 the code works. |
Given that your Nexty gem seems to duplicate some of the Nexpose gem's functionality from 0.1.3, it might be easier to create a new script (or gem) that just uses the Nexpose gem features instead. To achieve the functionality you're having trouble with currently, you could do this for example with the Nexpose gem: require "nexpose"
nsc = Nexpose::Connection.new("127.0.0.1", "username", "password")
nsc.login
host = nsc.find_device_by_address("10.0.0.1")
puts "#{host.address} #{host.site_id} #{host.risk_score} #{host.risk_factor}" |
Well bur why on older gem my code works and with newer not?
|
There were breaking changes to some of the calls between 0.1.3 and 0.1.4, thus leading the problem described. This is part of the reason I've started trying to put in the release notes and be more vigilant that a patch release does not introduce breaking API changes. |
It sounds like "ooops, your code doesn't work but we don't know why and we don't care that much". Thank you after all. |
Sorry you took it that way. If you look at the methods being called, there was a swap in method names between the versions you are concerned about. I don't have the changes in front of me, but it's commits to the repo between 6 Feb and 14 Feb 2013. @gschneider-r7 showed them to me, but I don't have that good a memory. It was something like changing device_list to list_devices or site_listing to list_sites. |
That's fine to me. Nexty is just an internal tool for my daily usage since On 31 January 2014 15:58, Michael Daines notifications@github.com wrote:
$ cd /pub The Application Security blog you really want to read: |
Hi there, I have a small ruby utility I daily use in my job to fetch data from my Nexpose server (https://github.com/thesp0nge/nexty).
When moving form nexpose gem from version 0.1.4 (included) and later, after being successfully authenticated, all further requests fails. Session ID is not nil as stated before, however my code searching for an IP is not working, instead using gem version 0.1.3 works like a sharm.
Paolo
The text was updated successfully, but these errors were encountered: