home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 May / PCpro_2006_05.ISO / files / free_security / languard / languardnss7.exe / jetdirect.vbs17 < prev    next >
Encoding:
Text File  |  2003-10-09  |  844 b   |  33 lines

  1. ' HP Jet Direct password
  2. ' Updated 20-june-2002, without garbage
  3.  
  4. Function main
  5.  
  6. Dim  oid As String
  7. Dim  res As String                         ' Object ids, results
  8. Dim result As Boolean
  9. Dim snmp1 As Object
  10. oid = "1.3.6.1.4.1.11.2.3.9.1.1.13.0"                 ' JetDirect Password
  11.  
  12. result = false
  13.                                 ' perform snmpget
  14. ip = getparameter("ComputerIP")
  15. Set snmp1 = SNMP.Connect(IP,"Public")
  16. If snmp1 is Nothing Then
  17. '       echo("Unable to connect to snmp server")
  18. Else
  19.     res = snmp1.get(oid) 
  20.                                 '   # display the information (If valid)
  21.        res = Left(res,InStr(1,res,"=108"))
  22.        If Len(res) > 0 Then
  23.               If Asc(Left(res,1)) > 0 Then              
  24.                      'echo("JetDirect Password (between brackets): [" + res + "]")
  25.               Else
  26.                      'echo("JetDirect Password is not set.")
  27.               End If
  28.               result = true
  29.        End If
  30. End If 
  31. main = result
  32. End Function
  33.