home *** CD-ROM | disk | FTP | other *** search
- ' HP Jet Direct password
- ' Updated 20-june-2002, without garbage
-
- Function main
-
- Dim oid As String
- Dim res As String ' Object ids, results
- Dim result As Boolean
- Dim snmp1 As Object
- oid = "1.3.6.1.4.1.11.2.3.9.1.1.13.0" ' JetDirect Password
-
- result = false
- ' perform snmpget
- ip = getparameter("ComputerIP")
- Set snmp1 = SNMP.Connect(IP,"Public")
- If snmp1 is Nothing Then
- ' echo("Unable to connect to snmp server")
- Else
- res = snmp1.get(oid)
- ' # display the information (If valid)
- res = Left(res,InStr(1,res,"=108"))
- If Len(res) > 0 Then
- If Asc(Left(res,1)) > 0 Then
- 'echo("JetDirect Password (between brackets): [" + res + "]")
- Else
- 'echo("JetDirect Password is not set.")
- End If
- result = true
- End If
- End If
- main = result
- End Function
-