Final (hopefully working) version!
This commit is contained in:
parent
d60171f6f7
commit
e0e9c15c6e
|
@ -1,4 +1,4 @@
|
|||
FROM python:3.7
|
||||
FROM python:3.7 as build
|
||||
|
||||
|
||||
RUN pip install pipenv
|
||||
|
@ -7,3 +7,9 @@ WORKDIR /app
|
|||
COPY . /app
|
||||
|
||||
RUN pipenv install --system --deploy --ignore-pipfile
|
||||
|
||||
RUN mkdocs build
|
||||
|
||||
FROM nginx:alpine
|
||||
COPY --from=build /app/site /usr/share/nginx/html
|
||||
EXPOSE 80
|
1
Pipfile
1
Pipfile
|
@ -9,6 +9,7 @@ pylint = "*"
|
|||
|
||||
[packages]
|
||||
mkdocs = "*"
|
||||
mkdocs-bootswatch = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.7"
|
||||
|
|
10
Pipfile.lock
generated
10
Pipfile.lock
generated
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "d94cad0dc30488627958d67d89ddc51fed636a03f30aa583585e6ee8247086f5"
|
||||
"sha256": "875711ee7e44ef60b24f4cfb89e0c6894741eededcd39192bdc2fd3d32134063"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
|
@ -85,6 +85,14 @@
|
|||
"index": "pypi",
|
||||
"version": "==1.0.4"
|
||||
},
|
||||
"mkdocs-bootswatch": {
|
||||
"hashes": [
|
||||
"sha256:1abe0b2ba0af643092202ec33e709d6cd06881bade66e2447c6c10fdb4bcccfa",
|
||||
"sha256:6be56764675814036a507d32828710e93dbe3e7aced2cdd820b946a3ebf2308e"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==1.0"
|
||||
},
|
||||
"pyyaml": {
|
||||
"hashes": [
|
||||
"sha256:57acc1d8533cbe51f6662a55434f0dbecfa2b9eaf115bede8f6fd00115a0c0d3",
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
|
||||
## Finally
|
||||
You are not a master yet, but you can get closer [here](/medium)
|
||||
<script src="/js/verify.js"></script>
|
|
@ -3,3 +3,4 @@
|
|||
|
||||
## Finally
|
||||
Yeah, you are a master now, and I hope you had fun! - J
|
||||
<script src="/js/verify.js"></script>
|
28
docs/js/verify.js
Normal file
28
docs/js/verify.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
function httpGet(theUrl, elem) {
|
||||
function reqListener() {
|
||||
let res = this.responseText
|
||||
if(res === "wrong"){
|
||||
alert("Nope, sorry. This is the wrong key!")
|
||||
}else if(res === "nope" || res === "missing"){
|
||||
alert(`Could you send a message to J00LZ##9386 on Discord with the challenge name, he apparently misconfigured this... (${res})`)
|
||||
}else if(res === "ok"){
|
||||
alert("Good job! You solved the challenge!")
|
||||
}
|
||||
}
|
||||
|
||||
var oReq = new XMLHttpRequest();
|
||||
oReq.addEventListener("load", reqListener);
|
||||
oReq.open("GET", theUrl);
|
||||
oReq.send();
|
||||
}
|
||||
|
||||
function check(challenge, elem) {
|
||||
flag = document.querySelector(`input#${elem}`).value
|
||||
flagExp = flag.match(/(?:flag)\{([\w]+)\}/i)
|
||||
if(flagExp == null || flagExp == undefined){
|
||||
alert("That isn't even a flag?")
|
||||
return
|
||||
}
|
||||
console.log(flagExp)
|
||||
httpGet(`https://challengeverify.voidcorp.nl/${challenge}/${flagExp[1]}`, elem)
|
||||
}
|
|
@ -3,17 +3,22 @@
|
|||
|
||||
## Socks to be you
|
||||
### The story so far
|
||||
Our friendly IT guy John has set up a hidden service to control his VM's.
|
||||
The only problem is that his rival in the company, Dave, kind of wants to screw John over.
|
||||
This is not an issue for John, he is quite capable with coding and knows exactly which commands to use. This is quite useful when he wants to hide the commands from Dave.
|
||||
Dave did however figure out where the server is hosted: [wsecho.voidcorp.nl](https://wsecho.voidcorp.nl)!
|
||||
Now dave wants to find John's password to really screw him over. He knows dave so it probably isn't hidden too well...
|
||||
|
||||
#### Your mission
|
||||
> Our friendly IT guy John has set up a hidden service to control his VM's.
|
||||
> The only problem is that his rival in the company, Dave, kind of wants to screw John over.
|
||||
> This is not an issue for John, he is quite capable with coding and knows exactly which commands to use.
|
||||
> This is quite useful when he wants to hide the commands from Dave.
|
||||
> Dave did however figure out where the server is hosted: [johndoor.voidcorp.nl](https://johndoor.voidcorp.nl)!
|
||||
> Now Dave wants to find John's password to really screw him over.
|
||||
> He knows John so it probably isn't hidden too well...
|
||||
|
||||
|
||||
### Your mission
|
||||
1. Hack into the server
|
||||
2. Read the hidden password (format=`flag{xxx}`)
|
||||
3. Report back to Dave (aka the sender of this mission) with the password!
|
||||
3. <input id="johnFlag"><button onClick="check('johndoor', 'johnFlag')">Check!</button>
|
||||
|
||||
|
||||
## Finally
|
||||
Getting closer to being considered a master, but you'll have to get the rank [here](/hard)!
|
||||
<script src="/js/verify.js"></script>
|
|
@ -6,7 +6,7 @@ nav:
|
|||
- Hard: hard.md
|
||||
- About: about.md
|
||||
theme:
|
||||
name: mkdocs
|
||||
name: slate
|
||||
shortcuts:
|
||||
help: 191 # ?
|
||||
next: 78 # n
|
||||
|
|
Loading…
Reference in a new issue