mirror of https://github.com/JohnHammond/CTFd.git
Python 3 or something
parent
4ae11cf7fe
commit
166e6a6588
10
populate.py
10
populate.py
|
@ -219,7 +219,7 @@ if __name__ == '__main__':
|
||||||
db = app.db
|
db = app.db
|
||||||
|
|
||||||
### Generating Challenges
|
### Generating Challenges
|
||||||
print "GENERATING CHALLENGES"
|
print("GENERATING CHALLENGES")
|
||||||
for x in range(CHAL_AMOUNT):
|
for x in range(CHAL_AMOUNT):
|
||||||
word = gen_word()
|
word = gen_word()
|
||||||
flags = [{'flag': word, 'type': 0}]
|
flags = [{'flag': word, 'type': 0}]
|
||||||
|
@ -229,7 +229,7 @@ if __name__ == '__main__':
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
### Generating Files
|
### Generating Files
|
||||||
print "GENERATING FILES"
|
print("GENERATING FILES")
|
||||||
AMT_CHALS_WITH_FILES = int(CHAL_AMOUNT * (3.0 / 4.0))
|
AMT_CHALS_WITH_FILES = int(CHAL_AMOUNT * (3.0 / 4.0))
|
||||||
for x in range(AMT_CHALS_WITH_FILES):
|
for x in range(AMT_CHALS_WITH_FILES):
|
||||||
chal = random.randint(1, CHAL_AMOUNT)
|
chal = random.randint(1, CHAL_AMOUNT)
|
||||||
|
@ -239,7 +239,7 @@ if __name__ == '__main__':
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
### Generating Users
|
### Generating Users
|
||||||
print "GENERATING USERS"
|
print("GENERATING USERS")
|
||||||
used = []
|
used = []
|
||||||
count = 0
|
count = 0
|
||||||
while count < USER_AMOUNT:
|
while count < USER_AMOUNT:
|
||||||
|
@ -253,7 +253,7 @@ if __name__ == '__main__':
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
### Generating Solves
|
### Generating Solves
|
||||||
print "GENERATING SOLVES"
|
print("GENERATING SOLVES")
|
||||||
for x in range(USER_AMOUNT):
|
for x in range(USER_AMOUNT):
|
||||||
used = []
|
used = []
|
||||||
base_time = datetime.datetime.utcnow() + datetime.timedelta(minutes=-10000)
|
base_time = datetime.datetime.utcnow() + datetime.timedelta(minutes=-10000)
|
||||||
|
@ -271,7 +271,7 @@ if __name__ == '__main__':
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
### Generating Wrong Keys
|
### Generating Wrong Keys
|
||||||
print "GENERATING WRONG KEYS"
|
print("GENERATING WRONG KEYS")
|
||||||
for x in range(USER_AMOUNT):
|
for x in range(USER_AMOUNT):
|
||||||
used = []
|
used = []
|
||||||
base_time = datetime.datetime.utcnow() + datetime.timedelta(minutes=-10000)
|
base_time = datetime.datetime.utcnow() + datetime.timedelta(minutes=-10000)
|
||||||
|
|
Loading…
Reference in New Issue