log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
import glob def readfile(path): return glob.glob(path + '*-*-*-*')
import linecache def readline(path): return linecache.getlines(path)
ip = r"?P<ip>[\d.]*"
date = r"?P<date>\d+"
month = r"?P<month>\w+"
year = r"?P<year>\d+"
log_time = r"?P<time>\S+"
method = r"?P<method>\S+"
request = r"?P<request>\S+"
status = r"?P<status>\d+"
bodyBytesSent = r"?P<bodyBytesSent>\d+"
refer = r"""?P<refer>
[^\"]*
"""
userAgent=r"""?P<userAgent>
.*
"""
import time def parsetime(date, month, year, log_time): time_str = '%s%s%s %s' %(year, month, date, log_time) return time.strptime(time_str, '%Y%b%d %H:%M:%S')
import re def parserequest(rqst): param = r"?P<param>.*" p = re.compile(r"/report\?(%s)" %param, re.VERBOSE) return re.findall(p, rqst)
import struct
import base64
def parseparam(param):
decodeinfo = base64.b64decode(param)
s = struct.Struct('!x' + bytes(len(decodeinfo) - (1 + 4 + 4 + 12)) + 'xii12x')
return s.unpack(decodeinfo)
import re def parseuseragent(useragent): agent = r"?P<agent>.*" p = re.compile(r".*;.*;.*;(%s)" %agent, re.VERBOSE) return re.findall(p, useragent)
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有