vbs 获取radmin注册表中的信息

时间:2021-05-23


<%
'========================================Main======================================
SetWSH=Server.CreateObject("Wscript.shell")
RadminPath="HKEY_LOCAL_MACHINE\SYSTEM\RAdmin\v2.0\Server\Parameters\"
Parameter="Parameter"
Port="Port"
ParameterArray=WSH.Regread(RadminPath&Parameter)
Response.write"TheResultofRadminHash"
Response.write"<br><br>"
Response.writeParameter&":"
'===========ReadPassWord=========
IfIsArray(ParameterArray)Then
Fori=0ToUBound(ParameterArray)
IfLen(hex(ParameterArray(i)))=1Then
strObj=strObj&"0"&CStr(Hex(ParameterArray(i)))
Else
strObj=strObj&Hex(ParameterArray(i))
EndIf
Next
response.writeLcase(strobj)
Else
response.write"Error!Can'tRead!"
EndIf
Response.write"<br><br>"
'===========ReadPort=========
PortArray=WSH.REGREAD(RadminPath&Port)
IfIsArray(PortArray)Then
Response.writePort&":"
Response.writehextointer(CStr(Hex(PortArray(1)))&CStr(Hex(PortArray(0))))
Else
Response.write"Error!Can'tRead!"
EndIf
'=============hexTOint==========
Functionhextointer(strin)
Dimi,j,k,result
result=0
Fori=1ToLen(strin)
IfMid(strin,i,1)="f"OrMid(strin,i,1)="F"Then
j=15
EndIf
IfMid(strin,i,1)="e"OrMid(strin,i,1)="E"Then
j=14
EndIf
IfMid(strin,i,1)="d"OrMid(strin,i,1)="D"Then
j=13
EndIf
IfMid(strin,i,1)="c"OrMid(strin,i,1)="C"Then
j=12
EndIf
IfMid(strin,i,1)="b"OrMid(strin,i,1)="B"Then
j=11
EndIf
IfMid(strin,i,1)="a"OrMid(strin,i,1)="A"Then
j=10
EndIf
IfMid(strin,i,1)<="9"AndMid(strin,i,1)>="0"Then
j=CInt(Mid(strin,i,1))
EndIf
Fork=1ToLen(strin)-i
j=j*16
Next
result=result+j
Next
hextointer=result
EndFunction
'================End==========
%>

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章