Comments (10)
Have you run ./ctftool database create-tables
?
from coldcore.
Added to the README : #23
from coldcore.
But now:
./ctftool challenges add problem.yml
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/peewee.py", line 3768, in execute_sql
cursor.execute(sql, params or ())
sqlite3.IntegrityError: NOT NULL constraint failed: challenge.flag
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./ctftool", line 248, in <module>
main()
File "./ctftool", line 244, in main
args.func(args)
File "./ctftool", line 140, in add_challenge
chal = Challenge.create(**yaml.load(f))
File "/usr/lib/python3.6/site-packages/peewee.py", line 4915, in create
inst.save(force_insert=True)
File "/usr/lib/python3.6/site-packages/peewee.py", line 5108, in save
pk_from_cursor = self.insert(**field_dict).execute()
File "/usr/lib/python3.6/site-packages/peewee.py", line 3526, in execute
cursor = self._execute()
File "/usr/lib/python3.6/site-packages/peewee.py", line 2912, in _execute
return self.database.execute_sql(sql, params, self.require_commit)
File "/usr/lib/python3.6/site-packages/peewee.py", line 3775, in execute_sql
self.commit()
File "/usr/lib/python3.6/site-packages/peewee.py", line 3598, in __exit__
reraise(new_type, new_type(*exc_args), traceback)
File "/usr/lib/python3.6/site-packages/peewee.py", line 135, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.6/site-packages/peewee.py", line 3768, in execute_sql
cursor.execute(sql, params or ())
peewee.IntegrityError: NOT NULL constraint failed: challenge.flag
from coldcore.
sounds like you made a problem with an empty flag :(
from coldcore.
Ah, the sample problem.yml should be flag: not flags:
from coldcore.
from coldcore.
I changed flags:
to flag:
and that doesn't seem enough
$ ./ctftool challenges add problem.yml shark@dev
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/peewee.py", line 3768, in execute_sql
cursor.execute(sql, params or ())
sqlite3.IntegrityError: NOT NULL constraint failed: challenge.stage_id
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./ctftool", line 248, in <module>
main()
File "./ctftool", line 244, in main
args.func(args)
File "./ctftool", line 140, in add_challenge
chal = Challenge.create(**yaml.load(f))
File "/usr/lib/python3.6/site-packages/peewee.py", line 4915, in create
inst.save(force_insert=True)
File "/usr/lib/python3.6/site-packages/peewee.py", line 5108, in save
pk_from_cursor = self.insert(**field_dict).execute()
File "/usr/lib/python3.6/site-packages/peewee.py", line 3526, in execute
cursor = self._execute()
File "/usr/lib/python3.6/site-packages/peewee.py", line 2912, in _execute
return self.database.execute_sql(sql, params, self.require_commit)
File "/usr/lib/python3.6/site-packages/peewee.py", line 3775, in execute_sql
self.commit()
File "/usr/lib/python3.6/site-packages/peewee.py", line 3598, in __exit__
reraise(new_type, new_type(*exc_args), traceback)
File "/usr/lib/python3.6/site-packages/peewee.py", line 135, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.6/site-packages/peewee.py", line 3768, in execute_sql
cursor.execute(sql, params or ())
peewee.IntegrityError: NOT NULL constraint failed: challenge.stage_id
from coldcore.
Ok yes, so the problem there is that we added stages to the platform, which allow you to group problems together in a group, for example for a beginner stage.
You need to create a stage.yml
like this:
name: Test stage
alias: test
description:
and then add at the end of problem.yml
stage: test
from coldcore.
stage.yml
can be in the same folder as the problem.yml
or in the above structure, for IceCTF 2016 we used the following structure:
stages/
stage1/
stage.yml
problem1/
problem.yml
....
problem2/
problem.yml
....
stage2/
stage.yml
....
Then run ./ctftool challenges scan stages
from coldcore.
I apologize for the bad docs, this was all done in a bit of a hurry.
from coldcore.
Related Issues (20)
- Improve admin system
- Improve staging
- Fix dates
- Improve caching
- Improve design
- AttributeError: 'module' object has no attribute 'set_complex' HOT 1
- AttributeError: 'module' object has no attribute 'delete_instance'
- add tags to the github repo HOT 1
- AttributeError : with pycountry HOT 3
- CSS problem without CDN HOT 1
- Test mode HOT 2
- No simple support for Redis password?
- Add SSH account creation
- Scoreboard should be ordered by total time, not just most recently solved problem
- Improve problems and add staging
- Attach a problem to a ticket
- System should update cache on startup
- Replace chat client
- Add a status/health check on problems and make an overview page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coldcore.