This repository has been archived by the owner on Jan 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chall * yaml * yaml fix * deploy stuff --------- Co-authored-by: mud-ali <[email protected]>
- Loading branch information
1 parent
c19f2c2
commit 36ac5c6
Showing
8 changed files
with
766 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
npm-debug.log | ||
chall.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM node:20 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY package*.json ./ | ||
|
||
RUN npm ci --omit=dev | ||
|
||
COPY . . | ||
|
||
EXPOSE 3000 | ||
|
||
CMD ["node", "app.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Hidden Values | ||
categories: | ||
- webex | ||
value: 50 | ||
flag: camp{YOu_WerENt_5Upp0sE_T0_se3_THI5_55d28b16d94c3} | ||
description: |- | ||
I have the right username and password, `bcaCTFAdmin2?` and `admin!?!?!?!`, but it's not letting me log in. | ||
Can you figure out why? | ||
hints: | ||
- How do forms send values? | ||
authors: | ||
- Jack Crowley | ||
visible: true | ||
deploy: | ||
web: | ||
build: ./src/ | ||
expose: 3000/tcp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const express = require('express'); | ||
const app = express(); | ||
const flag = "camp{YOu_WerENt_5Upp0sE_T0_se3_THI5_55d28b16d94c3}" | ||
|
||
app.use(express.static(__dirname + '/public')); | ||
app.use(express.urlencoded({ extended: false })); | ||
|
||
app.get('/', (req, res) => { | ||
res.sendFile(__dirname + '/index.html'); | ||
}); | ||
|
||
app.post('/', (req, res) => { | ||
if (req.body.username == "bcaCTFAdmin2?" && req.body.password == "admin!?!?!?!") { | ||
res.json({"flag":flag}) | ||
} | ||
else res.redirect("/") | ||
}) | ||
|
||
app.listen(3000, () => { | ||
console.log('http://localhost:3000'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
<link rel="stylesheet" href="/index.css"> | ||
</head> | ||
|
||
<body> | ||
<div class="screen"> | ||
<div class="login"> | ||
<h1>Login</h1> | ||
<form action="/" method="post"> | ||
<input type="text" class="username" name="notUsername" placeholder="Username..."> | ||
<input type="password" class="password" name="notPassword" placeholder="Password..."> | ||
<div class="css"> | ||
<div> | ||
<div> | ||
<div> | ||
<div> | ||
<div> | ||
<div> | ||
<span> | ||
<div> | ||
<div> | ||
<input type="text" name="username" class="notUsername"> | ||
</div> | ||
</div> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
<div> | ||
<input type="password" name="password" class="notPassword"> | ||
</div> | ||
</div> | ||
</div> | ||
<div> | ||
</div> | ||
</div> | ||
</div> | ||
<input type="submit" value="Submit" class="submit"> | ||
</form> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.