VBS gets the information in the Radmin registry _vbs

Source: Internet
Author: User

<%
' ========================================main======================================
Set wsh= 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 "The result of Radmin Hash"
Response.Write "<br><br>"
Response.Write parameter& ":"
' =========== Readpassword =========
If IsArray (Parameterarray) Then
For i = 0 to UBound (parameterarray)
If Len (Hex (Parameterarray (i)) =1 Then
Strobj = strobj & "0" & CStr (Hex (Parameterarray (i)))
Else
Strobj = strobj & Hex (Parameterarray (i))
End If
Next
Response.Write Lcase (Strobj)
Else
Response.Write "error! Can ' t read! '
End If
Response.Write "<br><br>"
' =========== Readport =========
Portarray=wsh. RegRead (Radminpath & Port)
If IsArray (Portarray) Then
Response.Write Port & ":"
Response.Write Hextointer (CStr (Hex (Portarray (1)) &cstr (Hex (Portarray (0)))
Else
Response.Write "error! Can ' t read! '
End If
' =============hex to int==========
Function Hextointer (Strin)
Dim I, J, K, result
result = 0
For i = 1 to Len (Strin)
If Mid (Strin, I, 1) = "F" Or Mid (Strin, I, 1) = "F" Then
j = 15
End If
If Mid (Strin, I, 1) = "E" Or Mid (Strin, I, 1) = "E" Then
j = 14
End If
If Mid (Strin, I, 1) = "D" Or mid (Strin, I, 1) = "D" Then
j = 13
End If
If Mid (Strin, I, 1) = "C" Or Mid (Strin, I, 1) = "C" Then
j = 12
End If
If Mid (Strin, I, 1) = "B" Or Mid (Strin, I, 1) = "B" Then
j = 11
End If
If Mid (Strin, I, 1) = "A" Or mid (Strin, I, 1) = "a" Then
j = 10
End If
If Mid (Strin, I, 1) <= "9" and mid (Strin, I, 1) >= "0" Then
j = CInt (Mid (Strin, I, 1))
End If
For k = 1 to Len (Strin)-I
j = J * 16
Next
result = result + J
Next
Hextointer = result
End Function
' ================ End ==========
%>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.