View dm123bot.py
#coding=utf-8
__version__=1.4
#1.2 修正补全图片url时出现的bug
#1.3 htmlescape
#1.4 flash的BBCOD优化,调整大小;字体调整为雅黑,标题放大
import urllib2,re,win32clipboard as clipboard,time,win32con,os,sys
import random
import httplib2
import datetime
baseurl='http://www.dm123.cn'
View ma_calc.py
import math
class calc():
WAKE_FAIRY,NORMAL_FAIRY=True,False
NORMAL_FAIRY_1,NORMAL_FAIRY_2,WAKE_FAIRY=0,1,2
@classmethod
def item_get(cls,fairy_lv,is_wake=False,damage_hp=0):
'''
收集品获得量计算器
'''
View eclipse_package_cleaner.py
import os
import re
from distutils.version import LooseVersion, StrictVersion
#def versiontuple(v):
# return tuple(map(int, (v.split("."))))
dir='D:\\Dev\\Java\\eclipse.x86\\plugins'
del_dir=os.path.join(dir,'_delete')
plugin=os.listdir(dir)
plugin_dict={}
for p in plugin:
View duowan_gift.py
#coding:utf-8
import httplib2
import hashlib
import random
import json
alphanum='0123456789abcdef'
verify=lambda x:hashlib.md5("J]KcRe(dxmk5cMS-%sJ]KcRe(dxmk5cMS-"%x).hexdigest()
mac_gen=lambda :':'.join([random.choice(alphanum)+random.choice(alphanum)*(j/j) for j in range(1,6) ])
mac=mac_gen()
uri='mac=%sverify=%s'%(mac,verify(mac))
View DEC2BIN&HEX.asm
data segment
OBUF DB '$'
OBUF1 DB 0AH,0DH,'Please input N(0-255):$'
IBUF DB 3 DUP(?),'=$'
OUT_D DB 0AH,0DH,'N=$'
OUT_H DB 'H=$'
OUT_B DB 'B',0AH,0DH,'$'
data ends
code segment
View decode_cdp.py
#!/usr/bin/env python2
# coding:utf-8
# Tool for decoding ComidDown site files (.cdp)
# Contributor:
# fffonion <fffonion@gmail.com>
import json
import struct
import zlib
f=open(r'178.cdp','rb')
cnt,sign=struct.unpack('<Ix3s',f.read(8))
View Apache Config
#Redirect 301 ^/$ /search.htm
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
<FilesMatch ".(gif|jpg|jpeg|png|ico|css|js)$">
Header unset Pragma
View query_4px.py
#coding:utf-8
from httplib2 import Http
import re
import time
today = time.strftime('%Y-%m-%d 00:00:00',time.localtime(time.time()))
ticket = "xxxxxxxxxxxxxxxxxx"
a,b = Http("Z:\TEMP").request("http://www.transrush.com/Transport/LogisticsTransferTrace.aspx?code=%s" % ticket,
headers = {"Referer":"http://tr.4px.com/Transport/TransportInfo.aspx",
"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Encoding":"gzip,deflate",
View .htaccess
#Redirect 301 ^/$ /search.htm
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} !^/index\.htm
#RewriteCond %{REQUEST_URI} !^/image\.htm
#RewriteCond %{REQUEST_URI} !^/m\.htm
#RewriteCond %{REQUEST_URI} !^/mi\.htm
View KHimekuri.py
from __future__ import print_function
from Crypto.Cipher import AES
import os, os.path as opath
import binascii
import time
from datetime import datetime, timedelta
from httplib2 import Http
pad = lambda s: s + (16 - len(s) % 16) * chr(16 - len(s) % 16)
unpad = lambda s : s[0:-ord(s[-1])]