Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified cryptoversectf2023/lsfr/flagCheck
Binary file not shown.
9 changes: 5 additions & 4 deletions cryptoversectf2023/lsfr/lfsr
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@

from Crypto.Util.number import *
# from secret import flag
prefix = "pwn.college{"

with open('/flag', 'r') as file:
flag = file.read().strip()

# assert flag.startswith("cvctf{")
# assert flag.endswith("}")
assert flag.startswith(prefix)
assert flag.endswith("}")

flag = flag[6:-1].encode()
# assert len(flag) == 8
flag = flag[len(prefix):len(prefix)+8].encode()
assert len(flag) == 8

def explore(state, mask):
curr = (state << 1) & 0xffffffff
Expand Down