如何开发Nmap?

发布于 2024-09-30 21:37:58 字数 1436 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

月依秋水 2024-10-07 21:37:58

Nmap 是一个古老且“成熟”的软件包。最好先阅读优秀的文档,然后再阅读源代码,而不是相反。

我建议 Phrack 51 - 端口扫描的艺术略有更新的版本作为仍然相关的入门读物。

只是为了让您了解 mish mash nmaps 的内部结构,请参阅上面 Phrack Articke 中的这段引用:

在编写 nmap 之前,我花了很多时间与其他扫描仪一起探索
互联网和各种专用网络(注意避免“内部网”
流行语)。我使用过许多当今可用的顶级扫描仪,包括
strobe 由 Julian Assange 设计,netcat 由 Hobbit 设计,stcp 由 Uriel Maimon 设计,pscan 由
Pluvius、Dave Goldsmith 的 ident-scan 以及 SATAN tcp/udp 扫描仪
维采·维尼玛.这些都是优秀的扫描仪!事实上,我最终还是黑客了
他们中的大多数都支持其他人的最佳功能。最后我决定
编写一个全新的扫描仪,而不是依赖十几个的破解版本
我的 /usr/local/sbin 中有不同的扫描仪。当我编写所​​有代码时,nmap
使用了前辈的很多好主意。我还加入了一些新的
像碎片扫描和我的“愿望清单”上的选项之类的东西
其他扫描仪。

(免责声明:已经有几年没有检查过 nmap 的内部结构了。有人可能清理了中间的代码,但我认为这不太可能。

Nmap is an old and "grown" software package. It's better to start to read the excellent documentation and then the source instead the other way around.

I suggest Phrack 51 - The Art of Port Scanning and the slightly updated version as a still relevant primer.

Just to give you an glimpse on the mish mash nmaps internals are see this quote from the Phrack Articke above:

Prior to writing nmap, I spent a lot of time with other scanners exploring the
Internet and various private networks (note the avoidance of the "intranet"
buzzword). I have used many of the top scanners available today, including
strobe by Julian Assange, netcat by Hobbit, stcp by Uriel Maimon, pscan by
Pluvius, ident-scan by Dave Goldsmith, and the SATAN tcp/udp scanners by
Wietse Venema. These are all excellent scanners! In fact, I ended up hacking
most of them to support the best features of the others. Finally I decided
to write a whole new scanner, rather than rely on hacked versions of a dozen
different scanners in my /usr/local/sbin. While I wrote all the code, nmap
uses a lot of good ideas from its predecessors. I also incorporated some new
stuff like fragmentation scanning and options that were on my "wish list" for
other scanners.

(Disclaimer: haven't checked nmap's internals for a few years. Somebody might have cleaned up the code in between, but i consider it unlikely.

高速公鹿 2024-10-07 21:37:58

现在最好的选择是使用 python nmap 库。它可以最好地了解底层内容,并且您还可以学习 Python。

如果您愿意,更好的选择是 用 ruby​​ 构建您自己的。这确实并不难做到,而且您可以更好地控制正在发生的事情。 Scapy 也很好学。如果您在扫描时使用其中任何一个启动wireshark,您将更好地了解一切是如何进行的作品。

Your best bet now is to use the python nmap library. It gives the best look at what's under the hood and you get to learn python as well.

An even better option if you are willing is to build your own in ruby. It really isn't that hard to do and you have more control on what is going on. Scapy is pretty good to learn as well. If you pull up wireshark with any of these while you are doing your scanning you will gain a much better understand on how everything works.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文