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 / gist:0a7658d79ae8ea792c5c5825ed85d4b5
Last active September 19, 2018 14:58
WebStorm Reformat Code 和 Eslint indent 规则冲突的解决办法

File => Setting => Editor => Code Style => HTML 找到 Do not indent children of 增加 script 标签

@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 / verify-email.js
Created October 18, 2017 07:32
Email address verification
import Dns from 'dns'
import Net from 'net'
class VerifyMail {
constructor (email) {
this.email = email
}
fetchMx (domain) {
return new Promise((resolve, reject) => {
@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/