Skip to content

Instantly share code, notes, and snippets.

@ctfaddict

ctfaddict/figure25 Secret

Created Apr 24, 2014
Embed
What would you like to do?
scorebot_production=# select count (*) from flags where created_at = updated_at;
count
-------
12341
(1 row)
scorebot_production=# select created_at from rounds where id = 1;
created_at
----------------------------
2013-08-02 17:10:00.752457
(1 row)
scorebot_production=# select count(*) from flags where updated_at < '2013-08-02 17:10:00.752457';
count
-------
12341
(1 row)
scorebot_production=# select f2.id
from flags f2
where f2.id in (select id
from flags
where created_at = updated_at)
and f2.id in (select distinct flag_id from captures);
id
----
(0 rows)
scorebot_production=# select count(*) from (select distinct flag_id from captures) as f;
count
-------
25282
(1 row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment