1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
| if status: if ctftime() or current_user.is_admin(): chal_class.solve( user=user, team=team, challenge=challenge, request=request ) clear_standings()
log( "submissions", "[{date}] {name} submitted {submission} on {challenge_id} with kpm {kpm} [CORRECT]", submission=request_data["submission"].encode("utf-8"), challenge_id=challenge_id, kpm=kpm, )
solve_count = Solves.query.filter_by(challenge_id=challenge_id).count() blood_number = "" if solve_count == 1: blood_number = "一血" elif solve_count == 2: blood_number = "二血" elif solve_count == 3: blood_number = "三血" else: pass if blood_number: print("是三血") print(challenge_category) print(challenge_name) print(user_name) print(blood_number) import requests url = "http://127.0.0.1:5700/send_group_msg?group_id=xxxxx&message=" msg="恭喜<{}>获得[{}]类型题目《{}》 {}! Tql".format(user_name,challenge_category, challenge_name,blood_number) url=url+msg try: requests.get(url=url) except: pass else: print("不是三血") import requests url = "http://127.0.0.1:5700/send_group_msg?group_id=xxxxx&message=" msg="恭喜<{}>解出[{}]类型题目《{}》Tql".format(user_name,challenge_category, challenge_name) url=url+msg try: print('不是三血开始推送') requests.get(url=url) print('不是三血推送成功') except: print('不是三血推送失败') pass return { "success": True, "data": {"status": "correct", "message": message}, } else:
|