Server IP : 92.204.138.22 / Your IP : 18.117.73.87 Web Server : Apache System : Linux ns1009439.ip-92-204-138.us 4.18.0-553.8.1.el8_10.x86_64 #1 SMP Tue Jul 2 07:26:33 EDT 2024 x86_64 User : internationaljou ( 1019) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/opt/nydus/ops/customer_local_ops/control_panel/powershell/ |
Upload File : |
$pleskDir=$args[0] $listOfVals=@{'FTP Login'='ftp_login'; 'IP Address'='ip_address'; 'Disk space used by httpdocs'='diskused'; 'Hosting type'='webspace'}; if(test-path "$($pleskDir)\admin\bin\subscription.exe"){ $allSubscriptions=&"$($pleskDir)\admin\bin\subscription.exe" --list; $allSites=&"$($pleskDir)\admin\bin\site.exe" --list; $dataToList=@() $dataToSend=@{} $allSites | %{ $siteName=$_; $dataObj = New-Object -TypeName PSObject $dataObj | Add-Member -MemberType NoteProperty -Name 'name' -Value $($siteName) $siteInfo=&"$($pleskDir)\admin\bin\site.exe" --info $siteName; $siteInfo | %{ $dataArr=[regex]::split($_,'\s\s+'); if($dataArr.length -eq 2){ $key=($dataArr[0]).trim(':'); if($listOfVals.ContainsKey($key)){ $val=$dataArr[1]; $dataObj | Add-Member -MemberType NoteProperty -Name $($listOfVals.Get_Item($key)) -Value $($val) } } } $dataToList+=$dataObj } $dataToSend['sites']=$dataToList $dataToSend['subscriptions']=@($allSubscriptions) $dataToSend | convertTo-json -Compress }