Skip to content
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

Nessus plugin - add search to relevant commands #6517

Merged
merged 5 commits into from Mar 14, 2016

Conversation

sempervictus
Copy link
Contributor

Utilize the SearchTerm param in Rex' Tables to filter scrolling
outputs.
Clean up argument parsing (implement one of the MSF standards).
Update help commands to reflect changes

Testing: basic functional tests only so far

Utilize the SearchTerm param in Rex' Tables to filter scrolling
outputs.
Clean up argument parsing (implement one of the MSF standards).
Update help commands to reflect changes

Testing: basic functional tests only so far
@void-in
Copy link
Contributor

void-in commented Feb 1, 2016

@sempervictus That is actually a great contribution. When I rewrote that plugin almost a year back, the Nessus API changed from XML to JSON and the focus was to make the plugin workable with the latest version. It is great you focused on an area which don't get the love of devs!

@sempervictus
Copy link
Contributor Author

Thanks, i try to please, figured you'd see this rather quickly (lurker).
You beat me to publishing the plugin by a short time, i actually wrote a whole API gem just for that ;).
#1621 was basically the same thing as this PR a few years ago.
For historical reference, getting the 'SearchTerm' bit adopted upstream took some work, and nobody really uses it - it originally came as a "workable alternative" to efforts by Kernelsmith when we were still entertaining dreams of bash-like pipes and such in console.
I use Nessus quite a bit, figured since i was doing some work on my PSH code (or rather bug-hunting framework module instantiation ghosts), i'd push another useful bit upstream.

case arg
when '-h', '--help'
print_status("nessus_server_feed")
print_status("Example:> nessus_server_feed -S searchterm")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was wrong before and it is wrong here as well. The command is nessus_server_properties but the example is nessus_server_feed. We need to change either the command or the example description.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed, thank you.

cmd_nessus_server_properties help text was incorrect and referred
to nessus_server_feed. Fix the help text to correctly reflect
command name.

Thanks @void-in
print_status("Use nessus_user_list to list all users")
return
end
end
if args[0] == "-h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Body is empty, delete this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the original author placed that there for formatting. Void-in: can
I nix the formatting line(s)?
On Feb 3, 2016 11:22 AM, "James Lee" notifications@github.com wrote:

In plugins/nessus.rb
#6517 (comment)
:

@@ -410,13 +479,19 @@ def cmd_nessus_server_status(*args)
end

   def cmd_nessus_admin(*args)
  •    while (arg = args.shift)
    
  •      case arg
    
  •      when '-h', '--help'
    
  •        print_status("nessus_admin")
    
  •        print_status("Example:> nessus_admin")
    
  •        print_status()
    
  •        print_status("Checks to see if the current user is an admin")
    
  •        print_status("Use nessus_user_list to list all users")
    
  •        return
    
  •      end
    
  •    end
     if args[0] == "-h"
    

Body is empty, delete this line.


Reply to this email directly or view it on GitHub
https://github.com/rapid7/metasploit-framework/pull/6517/files#r51744471
.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sempervictus Yes. It should be removed.

Per Egypt's request and with Void-in's blessing, empty calls to
print_status() are now removed.
@jlee-r7
Copy link
Contributor

jlee-r7 commented Feb 9, 2016

@sempervictus Ah, I see where the confusion was now. That's not what I meant. The if block on that line has no body so it is a pointless comparison.

@jlee-r7
Copy link
Contributor

jlee-r7 commented Feb 9, 2016

Sorry I wasn't more clear

@void-in
Copy link
Contributor

void-in commented Feb 9, 2016

@jlee-r7 Yeah. I can see a confusion now but I think the latest commit shouldn't be reverted. The call to print_status() was included just for an empty line which isn't needed. Only thing left is to remove https://github.com/sempervictus/metasploit-framework/blob/ae38403bc29ec20c32f2cefeea8d3bd6f2990c4e/plugins/nessus.rb#L490-L492

RageLtMan added 2 commits February 13, 2016 14:45
The list must be iterated from the families key, or it will raise
a type error.
@wvu
Copy link
Contributor

wvu commented Mar 2, 2016

@void-in: Are you taking this?

@void-in
Copy link
Contributor

void-in commented Mar 2, 2016

@wvu-r7 Please land this. I am away from my dev machine and will take another 10+ hours to get there. Sorry I didn't know it was assigned to me.

@void-in void-in assigned wvu and unassigned void-in Mar 2, 2016
@sempervictus
Copy link
Contributor Author

Thx guys. I've been using this a ton and its turned out extremely helpful
when trolling thru large reports in console. Actually easier than the GUI
or my pitiful api gem.
On Mar 2, 2016 12:41 PM, "Waqas Ali" notifications@github.com wrote:

@wvu-r7 https://github.com/wvu-r7 Please land this. I am away from my
dev machine and will take another 10+ hours to get there. Sorry I didn't
know it was assigned to me.


Reply to this email directly or view it on GitHub
#6517 (comment)
.

@wvu wvu merged commit 2b24e83 into rapid7:master Mar 14, 2016
wvu added a commit that referenced this pull request Mar 14, 2016
@void-in
Copy link
Contributor

void-in commented Mar 14, 2016

Thanks @wvu-r7 for landing. Great job @sempervictus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants