Warning: Constant SEO_LINKS_API_ENDPOINT already defined in /www/wwwroot/fni.gov.mz/wp-content/plugins/wordpress-plugin/wordpress-plugin.php on line 10
HEX
HEX
Server: Apache
System: Linux paginas.localdomain 4.15.0-200-generic #211-Ubuntu SMP Thu Nov 24 18:16:04 UTC 2022 x86_64
User: www (1002)
PHP: 8.0.11
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/fni.gov.mz/wp-content/plugins/count-per-day/download.php
<?php
/*
 * Download backup files
 * f = filename in tempdir
 * n = download filename
 */

if (!defined('ABSPATH'))
	exit;

// check user
$o = get_option('count_per_day');
$can_see = str_replace(
		// administrator, editor, author, contributor, subscriber
		array(10, 7, 2, 1, 0),
		array('manage_options', 'moderate_comments', 'edit_published_posts', 'edit_posts', 'read'),
		$o['show_in_lists']);
if ( !current_user_can($can_see) )
	die('no way');
	
if ( empty($_GET['f']) || empty($_GET['n']) )
	die('no way');
$file = sys_get_temp_dir().'/'.strip_tags($_GET['f']);
if ( strpos($file, '..') !== false )
	die('no way');
if ( strpos(basename($file), 'cpdexport') !== 0
	&& strpos(basename($file), 'cpdbackup') !== 0 )
	die('no way');
if (!file_exists($file))
	die('file not found');
$name = stripslashes(strip_tags($_GET['n']));
if (substr($name, -2) == 'gz')
	header('Content-Type: application/x-gzip');
else if (substr($name, -3) == 'csv')
	header('Content-Type: text/csv');
else
	header('Content-Type: text/plain');
header("Content-Disposition: attachment; filename=\"$name\"");
readfile($file);