shell bypass 403

Cubjrnet7 Shell

: /usr/src/file_protector-1.1-1569/ [ drwxr-xr-x ]

name : file_key_tools.h
/**
@file     file_key_tools.h
@brief    Tools for managing file keys
@details  Copyright (c) 2024 Acronis International GmbH
@author   Denis Kopyrin ([email protected])
@since    $Id: $
*/

#pragma once

#include "transport_protocol.h"

#include "compat.h"
#include <linux/fs.h>

static inline void make_key_from_inode(file_key_t* key, const struct inode *inode) {
	key->ptr = (uint64_t) inode;
	key->ino = (uint64_t) inode->i_ino;
	key->gen = (uint64_t) inode->i_generation;
	key->dev = (uint64_t) inode->i_sb->s_dev;
}

static inline void make_key(file_key_t* key, const struct path *path) {
	return make_key_from_inode(key, path->dentry->d_inode);
}

static inline int cmp_file_key(const file_key_t *k1, const file_key_t *k2)
{
  if (k1->ptr != k2->ptr || k1->ino != k2->ino || k1->gen != k2->gen || k1->dev != k2->dev)
  {
    return -1;
  }
  return 0;
}

© 2025 Cubjrnet7