Comments (8)
could you please gist your script and paste the link?
from python-libnmap.
- this nse script seems to require root privs and you are running NmapProcess.run()
- your code is not check NmapProcess.rc ==0
- you should also check if key exists in scripts_results (although, i must admit, a clear API should be implemented here
- scripts_results is accessible from NmapService object, not NmapHost
- 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.
this works for me. good luck.
https://gist.github.com/savon-noir/84c6165e8ce130135e0d
from python-libnmap.
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.
Here is the GIST Link: https://gist.github.com/xqxq/8ddae3bb9a82be5089ec
from python-libnmap.
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.
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.
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)
- Issue parsing NSE output from xml HOT 3
- parsing hostnames should return the type of the hostname detected i.e user or PTR HOT 2
- Project still alive? Wrong XML structure: cannot parse data HOT 7
- CC-BY Licence is not recommended for code - should move to an equivalent OSS licence HOT 2
- parser detect if xml is incomplete
- Install fails on windows 10 due to characer encoding issue in README.rst HOT 1
- Script results may contain "None" dict keys HOT 2
- handle the <hosthint> xml tag
- Running with sudo without passwordless setup hangs
- Release of 0.7.3 HOT 4
- Any plan to fix CVE-2022-30284 [Critical] - python-libnmap 0.7.2 ? HOT 3
- Does python-libnmap library require "nmap" binary to be installed? HOT 2
- Syntax for printing the vulnerblities
- Python 2 compatibility
- Future maintenance of this project HOT 1
- XML Injection DoS attack HOT 5
- Multiprocess nmap problem. HOT 2
- Basic indentation/syntax errors in 3.6? HOT 4
- Require overriding of nmap arguments
- process.py returns 'Object has no attribute Format' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-libnmap.