enable - 編程用語(yǔ)及概念
enable英音:[in'eibl]美音:[in'ebl] vt. , 使能夠,使 - 成為可能,使可行,使容易,使有效,使實(shí)現(xiàn)。enable是cisco路由和交換設(shè)備的一個(gè)常用命令,用于將設(shè)備從當(dāng)前的用戶模式切換至特權(quán)模式 - 用戶模式只能查看設(shè)備初始化信息,特權(quán)模式查看所有信息、調(diào)試、保存配置信息。由于enable能夠進(jìn)入設(shè)備的特權(quán)模式,修改設(shè)備全部配置信息,為保證命令安全性,CISCO系統(tǒng)設(shè)置了enable密碼,只有經(jīng)過(guò)密碼驗(yàn)證才能成功進(jìn)入特權(quán)模式,否則退回用戶模式。
函數(shù)名
功 能: 開放硬件中斷
用 法: void enable - void;
程序例:
/* ** NOTE:
This is an interrupt service routine. You can NOT compile this program
with Test Stack Overflow turned on and get an executable file which will
operate correctly.
*/
#include
#include
#include
/* The clock tick interrupt */
#define INTR 0X1C
void interrupt - *oldhandler - void;
int count=0;
void interrupt handler - void
{
/*
disable interrupts during the handling of the interrupt
*/
disable - ;
/* increase the global counter */
count++;
/*
re enable interrupts at the end of the handler
*/
enable - ;
/* call the old routine */
oldhandler - ;
}
int main - void
{
/* save the old interrupt vector */
oldhandler = getvect - INTR;
/* install the new interrupt handler */
setvect - INTR, handler;
/* loop until the counter exceeds 20 */
while - count < 20
printf - "count is %d/",count;
/* reset the old interrupt handler */
setvect - INTR, oldhandler;
return 0;
}
系統(tǒng)命令
enable是cisco路由和交換設(shè)備的一個(gè)常用命令,用于將設(shè)備從當(dāng)前的用戶模式切換至特權(quán)模式 - 用戶模式只能查看設(shè)備初始化信息,特權(quán)模式查看所有信息、調(diào)試、保存配置信息。
用戶模式只能查看設(shè)備信息,使用PING命令。特權(quán)模式則進(jìn)入配置模式,可以修改設(shè)備配置信息。
命令用法
假如當(dāng)前設(shè)備名是Switch,進(jìn)入設(shè)備后首先處于用戶模式 - 符號(hào)為" > "。
輸入enable命令后,設(shè)備將從用戶模式 - 符號(hào)為">"升級(jí)至特權(quán)模式 - 符號(hào)為"#",
示例:
Switch > - 當(dāng)前為用戶模式
Switch > enable - 輸入enable命令
Switch # - 切換至特權(quán)模式
命令安全性
由于enable能夠進(jìn)入設(shè)備的特權(quán)模式,修改設(shè)備全部配置信息,為保證命令安全性,CISCO系統(tǒng)設(shè)置了enable密碼,只有經(jīng)過(guò)密碼驗(yàn)證才能成功進(jìn)入特權(quán)模式,否則退回用戶模式。
建議首次啟用 cisco 設(shè)備后,建立enable安全性配置,保證設(shè)備系統(tǒng)的訪問(wèn)安全。
設(shè)置enable密碼主要有 enable password **** 和 enable secret **** 兩個(gè)命令。****為設(shè)置的密碼。以上兩個(gè)命令均要在設(shè)備的全局模式 - conf下配置。
1、enable password **** ,設(shè)置普通密碼,以明文方式保存在配置文件中,可以在show running-configure看到,普通級(jí)別的加密。
示例:
switch > enable - 進(jìn)入特權(quán)模式
switch # configure terminal - 進(jìn)入全局配置模式
switch - conf # enable password aaaa - 設(shè)置普通密碼aaaa
通過(guò) show running-configure 可以查看設(shè)備配置的明文密碼,如下:
Switch#sh run
Building configuration…
Current configuration : 970 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
enable password aaaa - 明文密碼顯示
!
!
2、enable secret **** ,設(shè)置高級(jí)密碼,以密文方式保存在配置文件中,無(wú)法在show running-configure看到,使用的是MD5算法加密。
注:secret 的級(jí)別高于password,如果兩個(gè)密碼同時(shí)設(shè)置,則secret 的密碼生效,password的密碼不生效。
示例:
switch > enable - 進(jìn)入特權(quán)模式
switch # configure terminal - 進(jìn)入全局配置模式
switch - conf # enable secret aaaa - 設(shè)置高級(jí)密碼aaaa
通過(guò) show running-configure 無(wú)法查看設(shè)備配置的明文密碼,如下:
Switch#sh run
Building configuration…
Current configuration : 970 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
enable secret 5 $1$mERr$hy8E2yMknG1VFOpEO7zOL1 - 密碼以MD5加密后的亂碼顯示,無(wú)法查看到明文
!
!
編程語(yǔ)言
用途
獲取或設(shè)置一個(gè)值,該值指示是否啟用應(yīng)用程序域。
命名空間:System.Web.Configuration
程序集:System.Web - 在 system.web.dll 中
語(yǔ)法
Visual Basic - 聲明
Public Property Enable As Boolean
Visual Basic - 用法
Dim instance As HttpRuntimeSection
Dim value As Boolean
value = instance.Enable
instance.Enable = value
