Hack the Database
The authors of this problem want to play a game with you.
The game has levels.
Each level consists of one database and several š secret codes š hidden inside it.
Your task is really simple: find as many secret codes as you can!
Description of Databases
There are levels, and each one contains a database. Each database (except the last one) contains a connection string š to the next database.
Here is the connection string š to the database of Level 1:
postgresql://neondb_owner:npg_ADSP8qiRzo4T@ep-shrill-grass-a4ia8jj8-pooler.us-east-1.aws.neon.tech/neondb?sslmode=require
.
Description of Secret Codes
The secret codes are places in a database using the following pattern: secret_code:{{10_random_alphanumeric_chars}}
.
Some of them may have some noise in the part before :
. More precisely, secret_code
should be present just as a subsequence.
Here are a few examples:
- ā
Valid code without noise:
secret_code:0123456789
- ā
Valid code with noise:
sQenNcPrwe0t1_co0dLe:aBcD3FgHiJ
- ā Invalid code:
sQnNcPrwe0t1_co0dLe:aBcD3FgHiJ
The code itself is represented by 10 alphanumeric characters after :
. Only these characters should be submitted.
š Codes can be hidden anywhere! š
How Many Codes?
The following table provides information on how many codes are hidden in each level:
Level | Codes |
---|---|
1 | 1 |
2 | 2 |
3 | 5 |
4 | 10 |
5 | 10 |
6 | 10 |
7 | 11 |
8 | 11 |
Total | 60 |
Submission and Scoring
You need to submit codes through the text area to the right of the statement, one per line.
Once a code is submitted and accepted, you do not have to submit it again.
The information about how many codes in each database you have found is shown in the Status
tab.
If at least one code in a submission is incorrect, the whole submission would be rejected.
Each correct code gives you 60 points.
Small Suggestion
We suggest starting with this problem by connecting to the first level using DataGrip provided by JetBrains!
Note that links in the problem are formatted for the console client. DataGrip expects them to be in slightly different format.
Instead of postgresql://user:password@host/database
, it expects jbcd:postgresql://host/database?user=username&password=password
.
So for the first database you can use
jdbc:postgresql://ep-shrill-grass-a4ia8jj8-pooler.us-east-1.aws.neon.tech/neondb?user=neondb_owner&password=npg_ADSP8qiRzo4T
to connect, or just fill connection properties separately in connection settings interface.
Problem by Neon
