This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: | |
# work with python 2.7 | |
import curses | |
import time | |
import sys | |
color = 2 | |
space = '\x1b[48;5;%dm \x1b[0m' % color |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: | |
# work with python 2.7 | |
# Author: Landon@CosHiM <[email protected]> | |
# Version: 0.1 Beta | |
import urllib2 | |
import re | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -x 127.0.0.1:5203 http://hot.vrs.sohu.com/ipad1406916_4619571893905_4617237.m3u8 | |
#EXTM3U | |
#EXT-X-TARGETDURATION:30 | |
#EXT-X-VERSION:3 | |
#EXTINF:7.759, | |
http://220.181.61.229/ipad?file=/60/81/YrQ60nrYyBtPFrCCSAcyj6.mp4&start=0&end=7.679&ch=tv&cateCode=101104;101106;101121&uid=null&plat=null&pt=-1&pg=null&vid=1406916&eye=0&sig=UL6geJYn4etegwZ1NduiB-6QfUuGpfNm | |
#EXTINF:25.161, | |
http://220.181.61.229/ipad?file=/60/81/YrQ60nrYyBtPFrCCSAcyj6.mp4&start=7.679&end=32.84&ch=tv&cateCode=101104;101106;101121&uid=null&plat=null&pt=-1&pg=null&vid=1406916&eye=0&sig=UL6geJYn4etegwZ1NduiB-6QfUuGpfNm | |
#EXTINF:26.159, | |
http://220.181.61.229/ipad?file=/60/81/YrQ60nrYyBtPFrCCSAcyj6.mp4&start=32.84&end=58.999&ch=tv&cateCode=101104;101106;101121&uid=null&plat=null&pt=-1&pg=null&vid=1406916&eye=0&sig=UL6geJYn4etegwZ1NduiB-6QfUuGpfNm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: | |
# work with python 2.7 | |
import subprocess | |
import select | |
import Queue | |
Task_Queue = Queue.Queue() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
seq 2 32 | xargs printf %02d\\n | while read line | |
do | |
echo ug$line | |
ssh -n ug$line "ps aux | grep gem5.opt | grep -v grep" | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import reduce | |
from math import log, ceil | |
def x(ip): | |
ip_set = ip.split(".") | |
int_ip = sum([int(ip_set[-i]) << (i - 1) * 8 for i in xrange(1, 5)]) | |
return int_ip | |
def r_x(int_ip): | |
return "%d.%d.%d.%d" % ((int_ip & 0xFF000000) >> 24, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Poker II Firmware disassembly help tool. | |
original = IO.read("./Poker II original firmware.bin") | |
extracted = "" | |
original.each_byte{|b| | |
m = (((b & 0x0f) << 4) | ((b & 0xf0) >> 4)) ^ 0xff | |
extracted << m.chr | |
} | |
puts extracted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import struct | |
import time | |
UDP_IP = "127.0.0.1" | |
UDP_PORT = 9880 | |
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{u'count': 1, | |
u'posts': [{u'author': {u'displayname': u'pmaidens', | |
u'github': u'github.com/pmaidens', | |
u'host': u'example.com', | |
u'id': u'e8d08d8e-c161-49e2-a60b-0e388f246a46', | |
u'url': u'example.com/author/e8d08d8e-c161-49e2-a60b-0e388f246a46'}, | |
u'categories': [], | |
u'comments': [], | |
u'content': u'lol', | |
u'contentType': u'plain', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#EXTM3U | |
#EXT-X-PLAYLIST-TYPE:VOD | |
#EXT-X-TARGETDURATION:10 | |
#EXT-X-VERSION:3 | |
#EXT-X-MEDIA-SEQUENCE:0 | |
#EXTINF:300.0, | |
http://70.39.188.1/sohu/v1/TmwBqAItfhcXe41VTSsGNeENPA0RoBA7P2b60A9Llm47fFoGRMNiNw.mp4?k=TBOG6K&p=XWPIWho70ScAZMoUoTWCr&r=TmI20LscWOo70Sc2ZDASqTPGRDbtWDoioMycY&q=OpC3hW7IWh1Soh24WhoGgT1cWB1HfBbHfhAXlGyOwmbcWJbXfGvsfJbSqD24fOoUZDJ&cip=70.74.199.72 | |
#EXTINF:300.0, | |
http://70.39.188.7/sohu/v1/TmPCoKItfDc6NewUy6EFD66UP2seqAvDzYWVqSNF5m47fFoGRMNiNw.mp4?k=owXmFK&p=XWPIWho70ScAZMoUoTWCr&r=TmI20LscWOo70Sc2ZDASqTPGRDbtWDoioMycY&q=OpC7hW7IWh1Soh24WhoGgT1cWB1HfBbHfhAXlGyOwmbcWJbXfGvsfJbSqD2ORhoUZDJ&cip=70.74.199.72 | |
#EXTINF:300.0, |
OlderNewer