Skip to content

Instantly share code, notes, and snippets.

View monkeym4ster's full-sized avatar
🎯
Focusing

M4ster monkeym4ster

🎯
Focusing
View GitHub Profile
<?php
//php gd-gif.php image.gif gd-image.gif
$gif = imagecreatefromgif($argv[1]);
imagegif($gif, $argv[2]);
imagedestroy($gif);
?>
@monkeym4ster
monkeym4ster / chai.json
Created January 23, 2019 07:14 — forked from ksco/chai.json
中文左右拆字字库
{
"卧": "臣卜",
"项": "工页",
"功": "工力",
"攻": "工攵",
"荆": "茾刂",
"邪": "牙阝",
"雅": "牙隹",
"期": "其月",
"欺": "其欠",
@monkeym4ster
monkeym4ster / download-file.js
Created June 20, 2018 06:51 — forked from javilobo8/download-file.js
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);
@monkeym4ster
monkeym4ster / index.js
Created January 10, 2018 14:30 — forked from jpenalbae/index.js
Quick PoC extending node.js dns module to add AXFR request support
var dns = require('dns');
var net = require('net');
var axfrReqProloge =
"\x00\x00" + /* Size */
"\x00\x00" + /* Transaction ID */
"\x00\x20" + /* Flags: Standard Query */
"\x00\x01" + /* Number of questions */
"\x00\x00" + /* Number of answers */
#!/usr/bin/env python2
# lrdcq
# usage python2 unwxapkg.py filename
import sys, os
import struct
class WxapkgFile(object):
nameLen = 0
@monkeym4ster
monkeym4ster / Install-nginx-with-http2-support.md
Created November 22, 2017 09:16 — forked from hollodotme/Install-nginx-with-http2-support.md
Install nginx with http2 support on ubuntu 14.04 LTS (Trusty)

How to install nginx (>= 1.9.5) with http2 support on Ubuntu 14.04 LTS (Trusty)

IMPORTANT: Backup your nginx site configs (usually under /etc/nginx/sites-available)!

Remove old nginx

Remove old nginx incl. nginx-common:

apt-get autoremove --purge nginx nginx-common
@monkeym4ster
monkeym4ster / nginx-non-transparent-ssl-proxy.md
Created September 10, 2017 14:22 — forked from dannvix/nginx-non-transparent-ssl-proxy.md
Guide to set up nginx as non-transparent SSL proxy, which subsitutes strings in the server responses

Use nginx as Non-Transparent SSL Proxy

Introduction

Many mobile apps have back-end API servers. They usually rely on the API replies to determine whether certain information is supposed to be shown. If the API responses could be manipulated on the fly, we may easily fool an unmodified app to expose some private data.

This manual guides you to set up nginx as non-transparent SSL proxy, which just subsitutes strings in the server responses (i.e. man-in-the-middle attack ourself). For both server-side (their API servers) and client-side (your device), the whole process is almost transparent.

/robots.txt
/index.php?a=1%3Cscript%3Ealert(abc)%3C/script%3E
/nevercouldexistfilenosec
/nevercouldexistfilewebsec
/nevercouldexistfilenosec.aspx
/nevercouldexistfilewebsec.aspx
/nevercouldexistfilenosec.shtml
/nevercouldexistfilewebsec.shtml
/nevercouldexistfilenosec/
/nevercouldexistfilewebsec/
@monkeym4ster
monkeym4ster / .MOVED.md
Created October 23, 2016 11:56 — forked from hwdsl2/.MOVED.md
IPsec VPN Server Auto Setup Script for Ubuntu and Debian
@monkeym4ster
monkeym4ster / openvpn-install.sh
Created May 26, 2016 16:29 — forked from cyriac/openvpn-install.sh
openVPN setup script
#!/bin/bash
# Slightly modified version from https://raw.githubusercontent.com/Nyr/openvpn-install/master/openvpn-install.sh
# Run with sudo ./openvpn-install.sh and not sudo sh ./openvpn-install.sh as read command has issues with external triggering of scripts
# OpenVPN road warrior installer for Debian, Ubuntu and CentOS
# This script will work on Debian, Ubuntu, CentOS and probably other distros
# of the same families, although no support is offered for them. It isn't
# bulletproof but it will probably work if you simply want to setup a VPN on
# your Debian/Ubuntu/CentOS box. It has been designed to be as unobtrusive and
# universal as possible.