diff --git a/rad-be-damned/chall.yaml b/rad-be-damned/chall.yaml index b06ae3a..38158b5 100644 --- a/rad-be-damned/chall.yaml +++ b/rad-be-damned/chall.yaml @@ -3,7 +3,7 @@ categories: - crypto value: 125 flag: - file: flag.txt + file: ./flag.txt description: | My friend seems to be communicating something but I can't make out anything. Why do we live so close to Chernobyl anyways? diff --git a/rad-be-damned/flag_gen.py b/rad-be-damned/flag_gen.py index 0adccb1..6e47c70 100644 --- a/rad-be-damned/flag_gen.py +++ b/rad-be-damned/flag_gen.py @@ -37,7 +37,7 @@ def crc_encrypt(letter: str): def expose_to_radiation(letcrc: str): #generates 1 random failure in a given bitstring length_crc = len(letcrc) - pos = random.randint(5, length_crc - 1) #Only mutates the actual data bits (not the CRC bits) + pos = random.randint(0, length_crc - 1) #Only mutates the actual data bits (not the CRC bits) bit_mask = 2**pos rad_let = int(letcrc, base=2) ^ bit_mask rad_bin = format(rad_let, "0" + f"{length_crc}" + "b") diff --git a/rad-be-damned/templates/index.html b/rad-be-damned/templates/index.html index b953144..7f5c4c8 100644 --- a/rad-be-damned/templates/index.html +++ b/rad-be-damned/templates/index.html @@ -7,7 +7,8 @@