This challenge is really interesting
look at the challenge’s URL
Which is a github pages URL
It mean this is a static challenge
Examine the project
This website is build with react
and react-router
In develope enviroment
We can
1 |
|
to run a local server with react-router
However, once you build it,
it only output some image, index.html
, assets/assets-xxxxx.js
…
Question: how to get /flag
the official solution is
1 |
|
It mean push a state to browser’s history
then you can explore the route /flag
but I solve it in my way. (unintented solution)
I think if all the logic should process via index.html
So if let /flag
renders as index.html
It should be output the flag
First, I clone the repo from github
Then, I code a flask server
1 |
|
So we got flag
reference: https://medium.com/前端實力三明治/瀏覽器的時光機-pushstate-replacestate-api-fa1d909c82b0