html upload sitem var mesela 10 gunluk dosya silme limiti koydum diyelim o dosyalarin silmek icin admin panelinden hackertrojan.php?act=delete yoluna girmem gerekiyor o adrese girdigimde dosyalar siliniyor benim yapmak istedigim benim yapmak istedigim o sayfaya girmeden 10 gun indirilmeyen dosyalarin otomatik silinmesi yardim edermisiniz admin.php kodlari burda


session_start();


include("./config.php");
if(isset($_GET['act'])){$act = $_GET['act'];}else{$act = "null";}
$contents = file("password.txt");
$pass = md5(implode($contents));

if(isset($_GET['act']) && ($act=="login")) {
$entered = md5($_POST['passwordx']);
$contents = file("password.txt");
$adminpass = implode($contents);

if($entered == $adminpass){
$cookiepass = md5($adminpass);
setcookie('logged', $cookiepass, 0, "/", $SERVER['SERVER_NAME'], 0);
echo "<script>window.location=\"hackertrojan.php\";</script>";
}
else {
include ("./header.php");
echo "Invalid password
";
echo "

Try again";
include ("./footer.php");
die();
}
}

if(isset($_GET['act']) && $act=="nopass" && (filesize("password.txt") == 0)) {

$password = md5($_POST['pass']);
$fp = fopen("password.txt", 'w');
fputs ($fp,$password);
fclose ($fp);
@chmod("password.txt", 0666);
echo "<script>window.location=\"hackertrojan.php\"</script>";
break;
}

if(isset($_COOKIE['logged']) && $_COOKIE['logged'] == $pass) {

if(isset($_GET['act']) && ($act=="logout")) {
setcookie('logged', "", time()-60, "/", $SERVER['SERVER_NAME'], 0);
session_unset();
include ("./header.php");
echo "You have been logged out.";
echo "

Login again";
include ("./footer.php");
die();
}

include("./hackertrojansayfaninustu.php");
if(isset($_GET['act']) && ($act=="newpass")) {

if(isset($_POST['newpassword'])){
$fb = fopen( "password.txt", 'w');
$changedpass = md5($_POST['newpassword']);
fputs ($fb, $changedpass);
fclose ($fb);
@chmod("password.txt", 0666);
echo "<script>window.location=\"hackertrojan.php?act=logout\"</script>";
}
?>

Change Password



After changing the password you will be logged out and will have to log in again with the new password.



Enter a new password:




include ("./footer.php");
die();
}

if(isset($_GET['download'])){
$filecrc = $_GET['download'];
$filecrctxt = $filecrc . ".txt";
if (file_exists("./storagedata/" . $filecrctxt)) {
$fh = fopen("./storagedata/" . $filecrctxt, r);
$filedata= explode('|', fgets($fh));
}
echo "<script>window.location='".$scripturl."download2.php?a=".$filecrc."&b=".md5($filedata[1].$_SERVER['REMOTE_ADDR'])."';</script>";
fclose ($fh);
}

if(isset($_GET['delete'])) {
unlink("./storagedata/".$_GET['delete'].".txt");
unlink("./storage/".$_GET['delete']);
}

if(isset($_GET['banreport'])) {
$bannedfile = $_GET['banreport'];
if (file_exists("./storagedata/$bannedfile".".txt")) {
unlink("./storagedata/".$bannedfile.".txt");
unlink("./storage/".$bannedfile);
$deleted=$bannedfile;
}

$fc=file("./reports.txt");
$f=fopen("./reports.txt","w+");
foreach($fc as $line)
{
$thisline = explode('|', $line);
if ($thisline[0] != $_GET['banreport'])
fputs($f,$line);
}
fclose($f);
$f=fopen("./bans.txt","a+");
fputs($f,$deleted[3]."\n".$deleted[0]."\n");
unlink("./storage/".$_GET['banreport']);

}

if(isset($_GET['ignore'])) {

$fc=file("./reports.txt");
$f=fopen("./reports.txt","w+");
foreach($fc as $line)
{
$thisline = explode('|', $line);
if ($thisline[0] != $_GET['ignore'])
fputs($f,$line);
}
fclose($f);
}

if(isset($_GET['act']) && $_GET['act']=="bans") {
if(isset($_GET['unban'])) {
$fc=file("./bans.txt");
$f=fopen("./bans.txt","w+");
foreach($fc as $line)
{
if (md5($line) != $_GET['unban'])
fputs($f,$line);
}
fclose($f);
}

if(isset($_POST['banthis'])) {
$f=fopen("./bans.txt","a+");
fputs($f,$_POST['banthis']."\n");
}


?>

Bans

Enter an IP or file hash to ban:






$fc=file("./bans.txt");
foreach($fc as $line)
{
echo $line . " - Un-ban
";
}

include("./footer.php");
die();
}

if(isset($_GET['act']) && $_GET['act']=="delete") {
//delete old files
echo "

Delete Old Files

";
echo "Deleting files not downloaded for " . $deleteafter . " days:

";
$deleteseconds = time() - ($deleteafter * 24 * 60 * 60);
$dirname = "./storagedata";
$dh = opendir( $dirname ) or die("couldn't open directory");
while ( $file = readdir( $dh ) ) {
if ($file != '.' && $file != '..' && $file != ".htaccess") {
$fh=fopen("./storagedata/" . $file ,r);
$filedata= explode('|', fgets($fh));
if ($filedata[3] < $deleteseconds) {
$deletedfiles="yes";
echo "Deleting - " . $filedata[0] . ":
";
unlink("./storagedata/".$file);
echo "Deleted /storagedata/" . $file . "
";
unlink("./storage/".str_replace(".txt","",$file));
echo "Deleted /storage/" . str_replace(".txt","",$file) . "

";
}
fclose($fh);
}
}
closedir( $dh );
if (!$deletedfiles) echo "No old files to delete!

";
//done deleting old files
include("./footer.php");
die();
}


if(isset($_GET['act']) && $_GET['act']=="check") {
//check files
echo "

Check Files

";
echo "
";
echo "Note: This section checks and makes sure that for each file in the 'storage' folder, there is a matching datafile in the 'storagedata' folder (and vice versa). Normally, there should be no problems. It is possible for one of the files to be missing -- this is rare and would only occur in unusual circumstances such as a server crash etc. In such a case you may just want to delete the mismatched files as they will be useless!";
echo "

Comparing storage to storagedata folder...

";
$mismatch1=0;
$mismatch2=0;

echo "Reading storagedata directory...

";

$dirname = "./storagedata";
$dh = opendir( $dirname ) or die("couldn't open directory");
while ( $file = readdir( $dh ) ) {
if ($file != '.' && $file != '..') {
$filecrc = str_replace(".txt","",$file);
if ((!file_exists("./storage/". $filecrc)) && ($file != ".htaccess") ){
echo "Mismatch for " . $file . " in storagedata -- storage file (".$filecrc.") does not exist!
";
echo "Recommend manual deletion of /storagedata/" . $file . ".
";
$mismatch1=1;
}
}
}
closedir( $dh );

echo "

Reading storage directory...

";

$dirname = "./storage";
$dh2 = opendir( $dirname ) or die("couldn't open directory");
while ( $filecrc = readdir( $dh2 ) ) {
if ($filecrc != '.' && $filecrc != '..') {
$file = $filecrc . ".txt";
if ((!file_exists("./storagedata/". $file)) && ($filecrc != ".htaccess") ){
echo "Mismatch for " . $filecrc . " in storage -- storagedata (".$file.") file does not exist!
";
echo "Recommend manual deletion of /storage/" . $filecrc . ".
";
$mismatch2=1;
}
}
}
closedir( $dh2 );

echo "Finished checking files.
";
if (($mismatch1) || ($mismatch2)) {
echo "Errors were found!";
} else {
echo "

Everything looks good! No mismatches were found.";
}
echo "

";
//done checking files
include("./footer.php");
die();
}

if(isset($_GET['act']) && $_GET['act']=="reports") {
echo "

Reported Files

";
echo "";
echo "";
$checkreports=file("./reports.txt");
foreach($checkreports as $line) {
$thisreport = explode('|', $line);
$filecrc = $thisreport[0];
if (file_exists("./storagedata/$filecrc".".txt")) {
$fr=fopen("./storagedata/".$filecrc.".txt",r);
$foundfile= explode('|', fgets($fr));
fclose($fr);
}
echo "";
echo "";
echo "";
echo "";
}

echo "
FilenameUploader IPDelete & BanIgnore Report
".$foundfile[0]."".$foundfile[2]."delete & banignore
";
include ("footer.php");
die;
}

?>

Uploaded Files





$admindata="";
$counter = 1;
$dirname = "./storagedata";
$dh = opendir( $dirname ) or die("couldn't open directory");
while ( $file = readdir( $dh ) ) {
if ($file != '.' && $file != '..' && $file != '.htaccess') {
$filecrc = str_replace(".txt","",$file);
$filesize = filesize("./storage/". $filecrc);
$filesize = ($filesize / 1048576);
$fh = fopen ("./storagedata/".$file, r);
$filedata= explode('|', fgets($fh));
$admindata .= "\n";
$counter += 1;
fclose ($fh);
}
}
closedir( $dh );

$adminfiles=fopen("./adminfiles.txt","w");
fwrite ($adminfiles,$admindata);
fclose ($adminfiles);

// output files list and paginate:
require_once('pager.php');
$page=$_GET['page'];
echo paginateRecords('./adminfiles.txt',$page,100);
// finished output files list

echo "
No.FilenameSize (MB)Uploader IPDownloadsB/W(MB)Delete
$counter. ".$filedata[0]."".round($filesize,2)."".$filedata[2]."".$filedata[4]." ".round($filesize*$filedata[4],2)."[x]
";

} else {

if (filesize("password.txt") != 0){
include("./header.php");?>

Admin Login



Password:






} else {
include("./header.php");
?>

Set Admin Password




Enter your admin password:



}
}
include("./footer.php");
?>