⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ssh_authorization.nasl

📁 漏洞扫描源码,可以扫描linux,windows,交换机路由器
💻 NASL
字号:
# OpenVAS# $Id$# Description: Set information for ssh key-based authorization in KB.## Authors:# Jan-Oliver Wagner <jan-oliver.wagner@intevation.de>## Copyright:# Copyright (C) 2007 Intevation GmbH## This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License version 2,# or, at your option, any later version as published by the# Free Software Foundation## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.if (!defined_func("bn_random")) exit(0);if(description){ script_id(90022); script_version ("1.1"); name["english"] = "SSH Authorization"; script_name(english:name["english"]); desc["english"] = "This script allows users to enter the informationrequired to authorize and login via a ssh key.These data are stored in the knowledge baseand used by other tests.Risk factor: None"; script_description(english:desc["english"]); summary["english"] = "Sets SSH key-based authorization"; script_summary(english:summary["english"]); script_category(ACT_INIT); script_copyright(english:"Copyright 2007 Intevation GmbH, License: GNU GPLv2+"); family["english"] = "Credentials"; script_family(english:family["english"]); script_add_preference(name:"SSH login name:", type:"entry", value:"sshovas"); script_add_preference(name:"SSH password (unsafe!):", type:"password", value:""); script_add_preference(name:"SSH public key:", type:"file", value:""); script_add_preference(name:"SSH private key:", type:"file", value:""); script_add_preference(name:"SSH key passphrase:", type:"password", value:""); exit(0);}ssh_login_name = script_get_preference("SSH login name:");ssh_password = script_get_preference("SSH password (unsafe!):");ssh_public_key = script_get_preference_file_content("SSH public key:");ssh_private_key = script_get_preference_file_content("SSH private key:");ssh_key_passphrase = script_get_preference("SSH key passphrase:");if (ssh_login_name) set_kb_item(name: "Secret/SSH/login", value: ssh_login_name);if (ssh_password) set_kb_item(name:"Secret/SSH/password", value:ssh_password);if (ssh_public_key) set_kb_item(name: "Secret/SSH/publickey", value: ssh_public_key);if (ssh_private_key) set_kb_item(name: "Secret/SSH/privatekey", value: ssh_private_key);if (ssh_key_passphrase) set_kb_item(name: "Secret/SSH/passphrase", value: ssh_key_passphrase);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -