Skip to content

Instantly share code, notes, and snippets.

#!/data/data/com.termux/files/usr/bin/python3
import ipaddress
import os
import socket
import socketserver
import struct
# version, type, key_len
request_header = struct.Struct("<III")
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#define NAME1 "testfile"
#define NAME2 "TESTFILE"
#define _DEFAULT_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/ptrace.h>
#include <linux/elf.h> /* NT_PRSTATUS */
from elftools.elf.elffile import ELFFile
# Expected architecture for ELFs
EXPECTED_MACHINE = "EM_ARM"
# Paths
LOADER_FILE = "loader" # point to "~/termux/proot/src/src/loader/loader"
LINKER_FILE = "linker" # copy from "/system/bin/linker" possibly check with multiple devices
# TODO: glob + try-except NotInterestingElfException
@michalbednarski
michalbednarski / gist:3742720
Created September 18, 2012 11:41 — forked from madrobby/gist:3733875
Fade out elements on WebKit, Firefox and IE (no overlays, can use non-solid background)
<style>
.fade-right {
-webkit-mask-image: -webkit-gradient(linear, left top, right top, from(rgba(0,0,0,1)), color-stop(0.75, rgba(0,0,0,1)), to(rgba(0,0,0,0)));
mask: url(#fade_right_svg_mask);
filter: alpha(style=1 startX=75 finishX=100);
}
#mask_demo {
background: #d0d0d0;
height: 100px;
width: 500px;