rip_detect.nasl
来自「漏洞扫描源码,可以扫描linux,windows,交换机路由器」· NASL 代码 · 共 86 行
NASL
86 行
# This plugin was written from scratch by Michel Arboi <arboi@alussinan.org># It is released under the GNU Public Licence (GPLv2)## References:# RFC 1058 Routing Information Protocol# RFC 2453 RIP Version 2### 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+# | command (1) | version (1) | must be zero (2) |# +---------------+---------------+-------------------------------+# | address family identifier (2) | must be zero (2) |# +-------------------------------+-------------------------------+# | IP address (4) |# +---------------------------------------------------------------+# | must be zero (4) (netmask with RIP-2) |# +---------------------------------------------------------------+# | must be zero (4) (next hop in RIP-2) |# +---------------------------------------------------------------+# | metric (4) |# +---------------------------------------------------------------+## 1 - request A request for the responding system to send all or# part of its routing table.## 2 - response A message containing all or part of the sender's# routing table. This message may be sent in response# to a request or poll, or it may be an update message# generated by the sender.## 3 - traceon Obsolete. Messages containing this command are to be# ignored.## 4 - traceoff Obsolete. Messages containing this command are to be# ignored.## 5 - reserved This value is used by Sun Microsystems for its own# purposes. If new commands are added in any# succeeding version, they should begin with 6.# Messages containing this command may safely be# ignored by implementations that do not choose to# respond to it.#if(description){ script_id(11822); script_version ("$Revision: 116 $"); name["english"] = "RIP detection"; script_name(english:name["english"]); desc["english"] = "This plugin detects RIP-1 and RIP-2 agents and display their routing tables.Risk factor : Low"; script_description(english:desc["english"]); summary["english"] = "RIP server detection"; script_summary(english:summary["english"]); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2003 Michel Arboi"); script_family(english:"Service detection"); exit(0);}##include("dump.inc");include('global_settings.inc');include("network_func.inc");include("misc_func.inc");function rip_test(port, priv){ local_var soc, req, r, l, ver, report, i, n, ip_addr, mask, metric, next_hop, kbd, fam;if (priv) soc = open_priv_sock_udp(dport:port, sport:port);else soc = open_sock_udp(port);if (!soc) return(0);# Special request - See
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?