关于如何以编程方式与nmap集成的任何想法? [英] Any ideas on how to integrate with nmap programmatically?

查看:66
本文介绍了关于如何以编程方式与nmap集成的任何想法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始研究如何将nmap(一种开源安全产品)集成到某些c ++代码中.如果有人尝试过此方法,并且对最佳方法有一些想法,我当然会很感激.

I'm just starting to look into how to integrate nmap, an open source security product, into some c++ code. If anyone's tried this, and has some ideas on the best approach, I'd certainly appreciate it.

感谢您的回复.具体来说,我想运行端口扫描(ipv6).我绝对希望使用非gpl解决方案,例如命令行或套接字接口.但是,我也正在寻找最快的解决方案,因为我们遇到了一些严格的时间表,如果有必要,我们可以回载实现非gpl解决方案.

Thanks for the responses. Specifically, I'd like to run a port scan (ipv6). I would definitely prefer non-gpl solutions such as a command line or sockets interface. However, I'm also this point I'm looking for the fastest solution/s, as we're up against some stringent timelines, and we can backload implemententing the non-gpl solution if necessary.

推荐答案

(注意:我不是律师,这些都不应该作为法律建议)

(note: I am not a lawyer, and none of this should be taken as legal advice)

您可能应该注意到,根据手册中的许可"一章,因此属于GPL许可义务. GPLv2 并未定义派生作品是什么,而是让根据版权法的定义由法院决定.通常的解释是,除了链接到操作系统中包含的系统库之外,任何形式的链接都使链接的作品成为派生作品,而通过管道或网络进行对话的单独过程不一定是派生作品,尽管 GPL常见问题解答,如果通信的语义足够紧密,交换复杂的内部数据结构,这也可能是考虑将这两个部分组合成一个较大的程序的基础."这似乎是Nmap开发人员正在采用的解释.

You should probably note that Nmap considers a product that parses its output to be a derived work, according to the licensing chapter in the manual, and thus fall under the GPL licensing obligations. The GPLv2 does not define what a derived work is, instead letting that be up to the courts and according to definitions in copyright law. The usual interpretation is that any form of linking, other than linking to system libraries included in the operating system, makes the linked work a derived work, while separate process that talk over pipes or the network are not necessarily derived works, though as mentioned in the GPL FAQ, "if the semantics of the communication are intimate enough, exchanging complex internal data structures, that too could be a basis to consider the two parts as combined into a larger program." That seems to be the interpretation that the Nmap developers are taking.

无论如何,假设您不必担心GPL,则可能要查看 Nmap脚本引擎(一种Lua)Nmap中的脚本引擎可为您提供各种控制.

Anyhow, assuming that you don't need to worry about the GPL, you probably want to look at the output options for Nmap; in particular, -oX for XML output and -oG for "greppable" output. If you need more control over what Nmap does, you should look into the Nmap Scripting Engine, a Lua scripting engine in Nmap that gives you all kinds of control.

这篇关于关于如何以编程方式与nmap集成的任何想法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆