-
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
Blackout always shows enabled = true #264
Comments
@peterjmcg first off, thanks for reporting this. Darren was able to get a fix up, and it's pushed into master. Do you have the ability to the master version of our gem, and verify our update fixes your issue? I can give you a step by step if you have never done it before. I would just like to verify the fix works for you before releasing it publicly in a new gem version. If it's an inconvenience for you, that's fine just let us know either way and we'll go from there. Thank you again for reporting, and for the example code! |
If you send me the steps to download I think I can test it.
Regards,
Peter.
…________________________________
From: sgreen-r7 <notifications@github.com>
Sent: Tuesday, March 28, 2017 2:03 PM
To: rapid7/nexpose-client
Cc: peterjmcg; Mention
Subject: Re: [rapid7/nexpose-client] Blackout always shows enabled = true (#264)
@peterjmcg<https://github.com/peterjmcg> first off, thanks for reporting this. Darren was able to get a fix up, and it's pushed into master.
Do you have the ability to the master version of our gem, and verify our update fixes your issue? I can give you a step by step if you have never done it before. I would just like to verify the fix works for you before releasing it publicly in a new gem version. If it's an inconvenience for you, that's fine just let us know either way and we'll go from there.
Thank you again for reporting, and for the example code!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#264 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AYT3YEqBqouIdRZ00qUnvcRbNyB-XHolks5rqUtWgaJpZM4MrsBy>.
|
@peterjmcg sounds good, are you using a |
standard gem install nexpose <version>
…________________________________
From: sgreen-r7 <notifications@github.com>
Sent: Tuesday, March 28, 2017 2:09 PM
To: rapid7/nexpose-client
Cc: peterjmcg; Mention
Subject: Re: [rapid7/nexpose-client] Blackout always shows enabled = true (#264)
@peterjmcg<https://github.com/peterjmcg> sounds good, are you using a Gemfile per chance, or just a standard gem install nexpose from the command line?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#264 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AYT3YM0e0mSSDzhS_ThCFFz0y_a_HIDjks5rqUzZgaJpZM4MrsBy>.
|
@peterjmcg Okay, what you'll want to do, are the following steps.
Then go ahead and run your tests, and let us know if that fixes the issue for you. We can push the gem live very quickly after you can confirm that it's fixed; so feel free to uninstall the gem you just built locally with the following:
Thanks again, and let us know if you have any issues (my only unknown is if building a gem locally on windows works exactly the same and linux/osx). If you get stuck don't worry about it, just let us know and we'll go from there. |
Tested site and global blackouts with new gem version 5.3.2. Added puts to make sure that the updated version was being used. Also ran some additional scripts (to query exceptions, credential status, excluded assets, reports, etc). Tested ok. I'll keep the new gem until there is a new version.
Thanks for the fast response.
Regards,
Peter.
…________________________________
From: sgreen-r7 <notifications@github.com>
Sent: Tuesday, March 28, 2017 3:29 PM
To: rapid7/nexpose-client
Cc: peterjmcg; Mention
Subject: Re: [rapid7/nexpose-client] Blackout always shows enabled = true (#264)
@peterjmcg<https://github.com/peterjmcg> Okay, what you'll want to do is the following steps.
* clone the gem source.
* cd into the directory the clone created
* build the gem locally
* install the gem you just built.
* also after you verify this works, you'll want to uninstall this version of the gem
git clone git@github.com:rapid7/nexpose-client.git
cd nexpose-client
gem build nexpose.gemspec
gem install nexpose-5.3.2.gem
Then go ahead and run your tests, and let us know if that fixes the issue for you. We can push the gem live very quickly after you can confirm that it's fixed; so feel free to uninstall the gem you just built locally with the following:
gem uninstall nexpose-5.3.2
Thanks again, and let us know if you have any issues (my only unknown is if building a gem locally on windows works exactly the same and linux/osx). If you get stuck don't worry about it, just let us know and we'll go from there.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#264 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AYT3YGtfSX-VgzORtWBJHov0Ts42A1eLks5rqV-OgaJpZM4MrsBy>.
|
Sounds good @peterjmcg thanks for quick responses. I'll go ahead and make this public, and i'll update this thread and close it out once we're live. |
Thanks again @peterjmcg -- it's live! Let us know if you run into any other issues in the future, or feel free to ask questions. |
When reading the 'enabled' field from Blackout it always returns 'true'. Possible solution is to add hash[:enabled] to new(hash... in blackout.rb / self.from_hash
new(hash[:start_date], hash[:enabled], hash[:blackout_duration], type, interval)
Code was tested with client version 5.3.0 on Windows 10, ruby 2.2.6p396 (2016-11-15 revision 56800) [x64-mingw32], Nexpose release 6.4.27, using :
CSV.open("Blackouts.csv", "wb") do |csv|
csv << ["Site", "Blackout_start", "Duration", "Type", "Interval", "Enabled"]
end
Get blackouts
sites = @nsc.list_sites || []
@BlackoutExists = FALSE
sites.each do |site|
end
if !@BlackoutExists
puts("No site blackouts created")
end
The text was updated successfully, but these errors were encountered: