Results 1 to 6 of 6

Thread: Nessus XMLRPC & Python

  1. #1
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default Nessus XMLRPC & Python

    Yes I know this isn't directly BT related and this isn't a Nessus or Python support forum, but I'm going to ask anyway

    I'm looking into leveraging this Nessus XMLRPC Python implementation:
    http://code.google.com/p/nessusxmlrpc/

    I've got it working for launching scans etc but I need a way to hook it so that ctrl-c will actually stop the scan(s).

    I've tried wrapping a try/except around the code within the main "while True" block and then calling to x.stop() or setting scans=x.stop() but it doesn't seem to work. I'm pretty sure I'm missing something trivial or doing something stupid. Maybe I've been staring at it too long.

    I'm hoping that someone with some more Python knowledge/experience might get me pointed in the right direction.

    Thanks in advance!
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  2. #2
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default Re: Nessus XMLRPC & Python

    So after some more poking and prodding I discovered that the stop function within nessus.py wasn't well thought out (and doesn't actually do anything useful).

    I've added a stop function to the XMLRPC interface and extended nessus.py to leverage it. I'll be contributing these changes back to the project. (Hopefully they'll actually publish the updates, though there appear to be some un-addressed issues in their bug tracker )

    http://code.google.com/p/nessusxmlrp...es/detail?id=6

    This thread can be closed or ignored.
    Last edited by thorin; 04-02-2012 at 07:34 AM.
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  3. #3
    Just burned his ISO
    Join Date
    Jun 2012
    Posts
    1

    Default Re: Nessus XMLRPC & Python

    Quote Originally Posted by thorin View Post
    So after some more poking and prodding I discovered that the stop function within nessus.py wasn't well thought out (and doesn't actually do anything useful).

    I've added a stop function to the XMLRPC interface and extended nessus.py to leverage it. I'll be contributing these changes back to the project. (Hopefully they'll actually publish the updates, though there appear to be some un-addressed issues in their bug tracker )

    http://code.google.com/p/nessusxmlrp...es/detail?id=6

    This thread can be closed or ignored.
    Hey, would you share the new script?
    I am also looking for this, and if you already have, no need for me to create the same.

    BTW, do you know if it is possible to specify which ports are open via the script?
    My idea was to run NMAP first and then "feed" the result into Nessus and automagically start a scan without the need for Nessus to do a port scan also.

  4. #4
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default Re: Nessus XMLRPC & Python

    Hey Cyberninja I'm away from work for a few days and so don't have access to the code.

    Next Mon or Tues I'll see if I can attach the modified files and some diffs to the google code ticket linked earlier in this thread.

    As for nmap/nessus integration you could check out:
    http://blog.tenablesecurity.com/2009...-scanning.html
    http://www.tenable.com/products/ness.../miscellaneous
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  5. #5
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default Re: Nessus XMLRPC & Python

    The google code ticket now contains a summary of my change/additions:

    http://code.google.com/p/nessusxmlrp...es/detail?id=6

    Scans are stopped based on KeyboardInterrupt (ctrl-c) or SystemExit (which it shouldn't really hit, I was just being overly cautious in-case someone does a sys.exit() upstream).
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  6. #6
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default Re: Nessus XMLRPC & Python

    @CyberNinja have you been able to use the code? Any questions or problems?
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

Similar Threads

  1. metasploit | xmlrpc gone?
    By mikem562 in forum BackTrack 5 General Topics
    Replies: 1
    Last Post: 02-09-2012, 07:22 AM
  2. python-pip?
    By thorin in forum Tool Requests
    Replies: 0
    Last Post: 11-24-2010, 04:07 PM
  3. Python Help
    By hinoshori in forum Beginners Forum
    Replies: 2
    Last Post: 03-18-2010, 08:32 PM
  4. Python
    By freemymind in forum OLD Programming
    Replies: 3
    Last Post: 08-19-2009, 05:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •