Skip to content

Instantly share code, notes, and snippets.

@xavierskip
xavierskip / captcha.py
Created June 1, 2016 07:51
a simple captcha hacker tool for example
#!/usr/bin/env python
# coding: utf-8
import requests
import StringIO
from PIL import Image
import os
import time
YES = 'X'
NO = '-'
@luoyuhao0x58
luoyuhao0x58 / imgcode.py
Created March 31, 2015 10:04
Use to create a CAPTCHA image
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import string
import cStringIO
import random
from PIL import Image, ImageFont, ImageDraw, ImageFilter
@shunsukeaihara
shunsukeaihara / cc.py
Created January 23, 2013 08:45
some of color correction algorithm in python
# -*- coding: utf-8 -*-
import numpy as np
import Image
import sys
def from_pil(pimg):
pimg = pimg.convert(mode='RGB')
nimg = np.asarray(pimg)
nimg.flags.writeable = True
return nimg