Skip to content

Commit

Permalink
set a fake default_flag in all cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacopo committed Aug 10, 2021
1 parent 5fb0c61 commit 0ce868b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ctfoood/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
import hmac
import logging
import os
import random
import re
import shlex
import shutil
import string
import subprocess
import tarfile
import tempfile
Expand Down Expand Up @@ -364,6 +366,9 @@ def do_autopull(chal: Chal, user: User, run_tester:bool=False,
chal.full_clean()
chal.save()

if flag is None:
# XXX: should actually change the model to allow NULL and reject spawning later?
flag = "SPECIAL_this_service_has_no_default_flag___" + ''.join(random.choices(string.ascii_lowercase, k=16))

logger.debug("Creating ChalCheckout...")
checkout = ChalCheckout(chal=chal, cache=destdir,
Expand Down

0 comments on commit 0ce868b

Please sign in to comment.