asyncfunctiongetFlag(token) { // Generate the flag based on user's token let hash = CryptoJS.SHA256(`dEEper_@nd_d@rKer_${token}`).toString(); return`flag{T1t@n_${hash.slice(0, 32)}}`; }
with requests.Session() as session: session.cookies.set( "session", "<fill your cookie here>", ) messages = getMessages(session) deleteList = [] for i, m inenumerate(messages["messages"]): if"hack["in m["text"]: print(i, m["text"], m["delay"]) deleteList.append({"id": i, "delay": m["delay"]}) for i in deleteList: timer = threading.Timer(i["delay"], deleteMessage, args=(session, i["id"])) timer.start() timer.join() getFlag(session)
$ git reflog ea49f0c (HEAD -> main) HEAD@{0}: commit: Trim trailing spaces 15fd0a1 (origin/main, origin/HEAD) HEAD@{1}: reset: moving to HEAD~ 505e1a3 HEAD@{2}: commit: Trim trailing spaces 15fd0a1 (origin/main, origin/HEAD) HEAD@{3}: clone: from https://github.com/dair-ai/ML-Course-Notes.git $ git checkout --force 505e1a3 HEAD is now at 505e1a3 Trim trailing spaces $ grep -R flag . ./.git/hooks/fsmonitor-watchman.sample: # return the fast "everything is dirty" flag to git and do the ./README.md: <!-- flag{TheRe5_@lwAy5_a_R3GreT_pi1l_1n_G1t} -->
defsplit_string(s: str) -> list[str]: result = [] current = "" for c in s: if c.isalpha(): current += c else: if current: result.append(current) current = "" result.append(c) if current: result.append(current) return result
defexpand_consonants(s: str) -> list[str]: vowels = set("aeiou") result = [] for i, c inenumerate(s): if c notin vowels: new_s = s[: i + 1] + c + s[i + 1 :] result.append(new_s) ifnot s.endswith("e"): result.append(s + "e") return result
defis_alpha(s: str) -> bool: for c in s: ifnot c.isalpha(): returnFalse returnTrue
defexpand_code_dict(code_dict: str) -> list: splits = split_string(code_dict) expanded_code_dicts = [] for i, s inenumerate(splits): if is_alpha(s): for expanded in expand_consonants(s): expanded_code_dicts.append( "".join(splits[:i] + [expanded] + splits[i + 1:]) ) return expanded_code_dicts
all_expanded_code_dicts = [expand_code_dict(code_dict) for code_dict in code_dicts] iterated_code_dicts = itertools.product(*all_expanded_code_dicts)
defdecrypt_data(input_codes, code_dict): output_chars = [code_dict[c] for c in input_codes] return"".join(output_chars)
defiterate_code_dict(): for code_dicts in iterated_code_dicts: yield code_dicts
# Read the binary file as a numpy array buffer = np.fromfile(file, dtype=np.uint8)
# drop the last few bytes buffer = buffer[: (3 * frame_count * frame_width * frame_height)]
# Reshape the array to the original shape of the video frames buffer = buffer.reshape((frame_count, frame_height, frame_width, 3))
# Create a video writer object with the same properties as the original video vidwriter = cv2.VideoWriter( output, cv2.VideoWriter_fourcc(*codec), frame_rate, (frame_width, frame_height) )
# Write each frame to the output video file for i inrange(frame_count): vidwriter.write(buffer[i])
# Release the video writer object vidwriter.release()
sensor sw1 switch1 @enabled sensor sw2 switch2 @enabled sensor sw3 switch3 @enabled sensor sw4 switch4 @enabled sensor sw5 switch5 @enabled sensor sw6 switch6 @enabled sensor sw7 switch7 @enabled sensor sw8 switch8 @enabled op shl t sw1 7 set number t op shl t sw2 6 op add number number t op shl t sw3 5 op add number number t op shl t sw4 4 op add number number t op shl t sw5 3 op add number number t op shl t sw6 2 op add number number t op shl t sw7 1 op add number number t set t sw8 op add number number t set en 0 set i 0 jump 33 greaterThanEq i 16 op pow fl0 i 2 jump 31 notEqual fl0 number set en 1 jump 33 always x false op add i i 1 jump 26 always x false op equal fl1 0 sw1 op equal fl2 0 sw6 op or fl3 fl1 fl2 jump 38 equal fl3 0 set en 0 control enabled generator1 en 0 0 0 control enabled panel1 en 0 0 0 end