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
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def debug_app():
@app.before_request
def before_request():
db.connect()
g.redis = redis.StrictRedis(host=config.redis.host, port=config.redis.port, db=config.redis.db)
g.redis = redis.StrictRedis(host=config.redis.host, port=config.redis.port, db=config.redis.db, password=config.redis.password)
g.connected = True


Expand Down
1 change: 1 addition & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def competition_has_started():

_redis = {
'host': 'localhost',
'password' : None, # change this to 'stringOfYourRedisPassword'
'port': 6379,
'db': 0
}
Expand Down
2 changes: 1 addition & 1 deletion ctftool
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def clear_challenges(args):


def recache_solves(args):
r = redis.StrictRedis(host=config.redis.host, port=config.redis.port, db=config.redis.db)
r = redis.StrictRedis(host=config.redis.host, port=config.redis.port, db=config.redis.db, password=config.redis.password)
for chal in Challenge.select():
r.hset("solves", chal.id, chal.solves.count())
print(r.hvals("solves"))
Expand Down
2 changes: 1 addition & 1 deletion daemons/cache_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


def run():
r = redis.StrictRedis(host=config.redis.host, port=config.redis.port, db=config.redis.db)
r = redis.StrictRedis(host=config.redis.host, port=config.redis.port, db=config.redis.db, password=config.redis.password)
db.connect()

def set_complex(key, val):
Expand Down