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