Skip to content

Instantly share code, notes, and snippets.

PZ Read pzread

Block or report user

Report or block pzread

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

天衣無縫 ~ Fantastic Seamless Textile ~

When executing a ELF binary, Linux kernel will pass the memory address of PHDR(program header) to userspace by AT_PHDR entry of AUXV. interpreter will parse the PHDR structure at memory addressAT_PHDR and resolve more ELF structures, such as dynamic section.

But Linux kernel wrongly calculate the PHDR address in memory.

NEW_AUX_ENT(AT_PHDR, load_addr + exec->e_phoff);
View init.vim
set ai
set backspace=2
set cin
set et
set hidden
set mouse=
set nocompatible
set nu
set shiftwidth=2
set softtabstop=2
use std::collections::HashMap;
use std::mem;
struct Link {
pub value: String,
next: *const Link,
impl Link {
fn new(value: String, next: *const Self) -> Self {
View test2.js
var objs = [];
var bases = [];
let oris = [];
let payloads = [];
for (let i = 0; i < 2; i++) {
bases.push([0, 1]);
oris.push([100, 100, 100]);
pzread / userscript.js
Last active Apr 21, 2017
Mastodon Blocked Contents Loader
View userscript.js
// ==UserScript==
// @name Mastodon Blocked Contents Loader
// @namespace
// @version 0.1
// @description shows how to use babel compiler
// @author PZ Read
// @require
// @require
// @match https://*/*
// ==/UserScript==
View check.cpp
int main() {
char str[100];
char ans[100];
FILE *ansf = fdopen(2, "r");
while(fgets(str, sizeof(str), stdin) != NULL) {
if(fgets(ans, sizeof(ans), ansf) == NULL) {
import re
import requests
from bs4 import BeautifulSoup
def to_bom_utf8(name):
data = open(name, 'rb').read().decode('utf-8')
open(name, 'wb').write(data.encode('utf-8-sig'))
View upload.js
'url':'/judge/api/' + api_key + '/add_pkg',
var xhr = new XMLHttpRequest();
pzread /
Last active Aug 29, 2015
Judge Sketch


The package is compressed in tar.xz format without top directory.


  pkgid string      //Add by add_pkg API
  apiid string      //Add by add_pkg API, owner id
  when int64        //Add by add_pkg API
View somethingwrong.c
int loop(int x){
unsigned long a;
unsigned long *ptr;
ptr = &a;
if(x == 0){
return 0;
You can’t perform that action at this time.