Giter Club home page Giter Club logo

Comments (8)

savon-noir avatar savon-noir commented on September 24, 2024

could you please gist your script and paste the link?

from python-libnmap.

savon-noir avatar savon-noir commented on September 24, 2024
  1. this nse script seems to require root privs and you are running NmapProcess.run()
  2. your code is not check NmapProcess.rc ==0
  3. you should also check if key exists in scripts_results (although, i must admit, a clear API should be implemented here
  4. scripts_results is accessible from NmapService object, not NmapHost
  5. as documented, NmapService.scripts_results returns an array of dict (again I should implement proper API, but still, documentation is there)

... i think the issue is related to the way you use the lib. I'll make you a quick sample.

from python-libnmap.

savon-noir avatar savon-noir commented on September 24, 2024

this works for me. good luck.

https://gist.github.com/savon-noir/84c6165e8ce130135e0d

from python-libnmap.

xqxq avatar xqxq commented on September 24, 2024

I am quite new to object oriented programming so I apologize in advance if I seem dense.

I looked at your example and I am wondering if you pasted the wrong script as the output shows the script name ntp-monlist and the script posted is ntpmon.py.

Your example is reading the results from a file.

I was trying to get the result directly from NMAP output without writing to a file first, is that possible or do I have to write the results out and then go back and read the file?

Thanx in advance for your assistance!

from python-libnmap.

xqxq avatar xqxq commented on September 24, 2024

Here is the GIST Link: https://gist.github.com/xqxq/8ddae3bb9a82be5089ec

from python-libnmap.

savon-noir avatar savon-noir commented on September 24, 2024

https://gist.github.com/savon-noir/63969d0a4001cba60fcf

try this kind of things... should work but i haven't tested...no time. Your problems are not related to this lib. If you need python guidance, I would suggest you to go on #python on irc.freenode.net there is an awesome community of ppl there willing to help.

Also, I suggest you to read the doc: https://libnmap.readthedocs.org/en/latest/ and understand how to use the lib (and check other code examples).

from python-libnmap.

xqxq avatar xqxq commented on September 24, 2024

The issue I had was with referencing the objects - your example clarified the correct syntax.

Thanx so much for your time - I am on the road now.

from python-libnmap.

xqxq avatar xqxq commented on September 24, 2024

Have a working script now - thanks so much for your time!! Still getting the hang of object oriented referencing.

Have a great week!

from python-libnmap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.