import pickle import base64 from flask import Flask, request from flask import render_template,redirect,send_from_directory import os import requests import random from flask import send_file
app = Flask(__name__)
class User(): def __init__(self,name,age): self.name = name self.age = age
def check(s): if b'R' in s: return 0 return 1
@app.route("/") def index(): try: user = base64.b64decode(request.cookies.get('user')) if check(user): user = pickle.loads(user) username = user["username"] else: username = "bad,bad,hacker" except: username = "CTFer" pic = '{0}.jpg'.format(random.randint(1,7)) try: pic=request.args.get('pic') with open(pic, 'rb') as f: base64_data = base64.b64encode(f.read()) p = base64_data.decode() except: pic='{0}.jpg'.format(random.randint(1,7)) with open(pic, 'rb') as f: base64_data = base64.b64encode(f.read()) p = base64_data.decode()
if($ip!=‘127.0.0.1‘) echo "Sorry,you don‘t have permission! Your ip is :".$ip; if($ip === ‘127.0.0.1‘ && file_get_contents($_GET[‘2333‘]) === ‘todat is a happy day‘ ){ echo "Your REQUEST is:".change($_GET[‘file‘]); echo file_get_contents(change($_GET[‘file‘])); } ?>
for i in range(1,520): str1="D:/比赛临时文档/羊城杯/temp/" str1=str1+str(520-i)+".zip" f = ZipFile(str1,'r') for file in f.namelist(): f.extract(file,"D:/比赛临时文档/羊城杯/temp/") with open("D:/比赛临时文档/羊城杯/temp/story",'r',encoding='UTF-8') as f: str2=f.read() if 'png' in str2: pass else: print(str2)
f = open('xy.txt','w') DataFileName = "2.txt" def main(): # get argv pcapFilePath = sys.argv[1]
# get data of pcap os.system("tshark -r %s -T fields -e usb.capdata > %s" % (pcapFilePath, DataFileName))
with open('2.txt','r') as keys: posx = 0 posy = 0 for line in keys: if len(line) != 12 : continue x = int(line[3:5],16) y = int(line[6:8],16) if x > 127 : x -= 256 if y > 127 : y -= 256 posx += x posy += y btn_flag = int(line[0:2],16) if btn_flag == 2 : #2为右键,1为左键 f.write(str(posx)+",") f.write(str(posy)+'\n') f.close() keys.close()