Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Plugin Name: WpPluginShell
* Plugin URI: http://example.org
* Description: This plugin allows arbitrary command execution, lol. Useful if you have a crazy hosting company which randomly disables shell access. There is no authentication, so don't leave this plugin active/installed any longer than necessary.
* Version: 1.33.7
* Author: Philip
* Author URI: http://example.org
* License: WTFPL
* License URI: http://www.wtfpl.net/
@Phaeilo
Phaeilo / svnlog2sqlite.py
Created February 7, 2013 15:56
Load a svn xml logfile into a sqlite database for easier analysis.
import xml.etree.ElementTree as ET
import datetime
import sqlite3
import sys
def convert(logfile_filename, database_filename):
cnt = 0
# open file handles
with open(logfile_filename, "rb") as logfile:
@Phaeilo
Phaeilo / captcha.py
Last active December 11, 2015 08:28
Yet another solver for the MintEye captcha.
import Image
import ImageChops
def diff_images(img_a, img_b):
# return sumOfAllPixelValues(abs(img_a - img_b))
return sum(map(sum, ImageChops.difference(img_a, img_b).getdata()))
def solve_captcha(filenames):
filenames = sorted(filenames)
images = map(lambda x: Image.open(x), filenames)