Dim Argcomputer, IISObject, ArgPath
ArgComputer = "localHost"
ArgPath = "/W3SVC/1/Root"
Sub DisplayUsage
WScript.Echo "usage: cscript ShowPasswords.vbs"
WScript.Echo " [--help|-?]"
WScript.Echo ""
WScript.Quit(1)
End Sub
Sub checkCmdLine()
Dim OArgs, ArgNum
Set oArgs = WScript.Arguments
ArgNum = 0
While ArgNum < oArgs.Count
Select Case LCase(oArgs(ArgNum))
Case "--help","-?":
Call DisplayUsage
Case Else:
WScript.Echo "Unknown argument "& oArgs(ArgNum)
Call DisplayUsage
End Select
ArgNum = ArgNum + 1
Wend
If (Left(Argpath,1) <> "/") Then
ArgPath = "/" & ArgPath
End If
End Sub
Sub ShowDetails(ShowWAM, Header, OBJ)
on error resume next
WScript.Echo Header
WScript.Echo " Annonymous user name : " & OBJ.AnonymousUserName
WScript.Echo " Annonymous user account password : " & OBJ.AnonymousUserPass
If (ShowWAM= True) Then
WScript.Echo
WScript.Echo " WAM user name : " & OBJ.WAMUserName
WScript.Echo " WAM password : " & OBJ.WAMuserPass
End If
WScript.Echo
WScript.Echo " ODBC username : " & OBJ.LogOdbcUserName
WScript.Echo " ODBC password : " & OBJ.LogOdbcPassword
WScript.Echo
End Sub
Sub DoObject(ObjectName, Objectclass)
Dim FullPath, IISOBJ, IISOBJ1
on error resume next
FullPath = "IIS://" & ArgComputer & "/" & ObjectName
Set IISOBJ = getObject(FullPath)
If (err <> 0) Then
WScript.Echo "Unable to access object : " & ObjectName & " on computer: " & Argcomputer & vbcrlf
exit sub
Else
If (Objectname <> "W3SVC") Then
Showdetails False, ObjectName, IISOBJ
Else
Showdetails True, ObjectName, IISOBJ
End If
For Each Server In IISOBJ
If (Server.Class = Objectclass) Then
if (ObjectName = "W3SVC") then
FullPath = "IIS://" & ArgComputer & "/" & ObjectName & "/" & Server.Name& "/Root"
else
FullPath = "IIS://" & ArgComputer & "/" & ObjectName & "/" & Server.Name
end if
Set IISOBJ1 = getObject(FullPath)
ShowDetails False, ObjectName & "/" & Server.Name, IISOBJ1
Set IISOBJ1 = Nothing
End If
Next
End If
set IISOBJ = nothing
End Sub
Call CheckCmdLine()
Call DoObject("MSFTPSVC", "IIsFTPServer")
Call DoObject("NNTPSVC", "IIsNNTPServer")
Call DoObject("W3SVC", "IIsWebServer")
'*******************************************************************
'*******************************************************************
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2007
(117)
-
▼
November
(47)
- Install mod_python on cpanel server
- Identifying Process
- httpd segmenation Fault
- httpd issues , service started but sites not browsing
- View httpd , smtp other connections ( Unix )
- http and https site issues
- Set up VPN for UNix servers
- View Error Logs ( unix )
- View Server Info , Configs ( Unix )
- View IPs Causing attack
- How to open ports
- Install BIND or Named , wtih YUM
- Check mail logs for a particular Domain
- Block the IPs / for particular port
- full disk space issues ( Finding out the culprit )
- How to find out IPs trying to login to ssh
- ffmpeg installation error , partition remounted
- Exim load , finding email ID
- pure -ftpd , increase no . of dirctories viewable
- How to flush DNS in linux
- Disable ping on the server ( unix )
- Setting Index page ( Unix )
- Detect DDOS
- Exim Admin
- Direct Admin License Issues
- Cron Job
- Critical Namd Issue
- Mysql Admin
- Configure User Quota on a Plain server ( Unix )
- Command to change the Date ( Unix )
- checking error logs for a domain and httpd logs pl...
- Check and close your DNS servers ( unix )
- How To change the port ( SSH )
- CGI Issues not able to bowse the page
- Bind Configuration ERRor ( Named )
- Adding IPs on plain CentOS server ( Unix )
- High Traffic balance with this script ( Unix )
- IIS Tunning
- IIS Tweaking
- ERROR 2003: Can't connect to MySQL server on 'loc...
- Retrieve IUSER Password with this Script
- Reverse DNS lookup in Windows
- Server Application Error
- Server Performance Advisor ( Windows )
- Setting Up IPsecurity with ADSI ( Script )
- System Restore Windows
- Error while Removing Name serversfromWHM ICANN error
-
▼
November
(47)
No comments:
Post a Comment