Skip to content

Instantly share code, notes, and snippets.

@phith0n
phith0n / fpm.py
Last active April 16, 2024 13:04
Fastcgi PHP-FPM Client && Code Execution
import socket
import random
import argparse
import sys
from io import BytesIO
# Referrer: https://github.com/wuyunfeng/Python-FastCGI-Client
PY2 = True if sys.version_info.major == 2 else False
@KrE80r
KrE80r / c0w.c
Created October 23, 2016 15:19
PTRACE_POKEDATA variant of CVE-2016-5195
/*
* A PTRACE_POKEDATA variant of CVE-2016-5195
* should work on RHEL 5 & 6
*
* (un)comment correct payload (x86 or x64)!
* $ gcc -pthread c0w.c -o c0w
* $ ./c0w
* DirtyCow root privilege escalation
* Backing up /usr/bin/passwd.. to /tmp/bak
* mmap fa65a000
@Q2h1Cg
Q2h1Cg / wifikey
Created June 13, 2015 13:54
WIFI 万能钥匙查询
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
import codecs
import hashlib
import random
import sys
import requests
from Crypto.Cipher import AES
@nicolashery
nicolashery / elasticsearch.md
Last active December 30, 2023 19:03
Elasticsearch: updating the mappings and settings of an existing index

Elasticsearch: updating the mappings and settings of an existing index

Note: This was written using elasticsearch 0.9.

Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:

$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
  "_id": 1,