Skip to content

Instantly share code, notes, and snippets.

View Rtoax's full-sized avatar
💭
I may be slow to respond.

Rong Tao Rtoax

💭
I may be slow to respond.
View GitHub Profile
@Rtoax
Rtoax / pdlsym.c
Created January 30, 2024 01:11 — forked from resilar/pdlsym.c
dlsym() for remote processes
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ptrace.h>
#include <sys/types.h>
#include <unistd.h>
struct elf {

ELF

ELF Header

The first portion of any ELF file is the ELF header. This generally provides offsets to other headers (program headers and section headers) within an ELF.

typedef struct {
  unsigned char e_ident[EI_NIDENT];
 uint16_t e_type;

ELF

ELF Header

The first portion of any ELF file is the ELF header. This generally provides offsets to other headers (program headers and section headers) within an ELF.

typedef struct {
  unsigned char e_ident[EI_NIDENT];
 uint16_t e_type;
@Rtoax
Rtoax / create_rootfs.sh
Created July 8, 2022 03:48 — forked from fjkz/create_rootfs.sh
Create a rootfs environment for chroot building.
#!/bin/sh
#
# Create a rootfs environment for chroot building.
#
# Requires
# - OS installing CDROM at the current directory,
# - the root authority.
#
# mount install cd
@Rtoax
Rtoax / rpm-digital-signature.sh
Last active July 8, 2022 05:01 — forked from fernandoaleman/rpm-digital-signature.sh
How to sign your custom RPM package with GPG key
# How to sign your custom RPM package with GPG key
# Step: 1
# Generate gpg key pair (public key and private key)
#
# You will be prompted with a series of questions about encryption.
# Simply select the default values presented. You will also be asked
# to create a Real Name, Email Address and Comment (comment optional).
#
# If you get the following response: