Skip to content

Commit

Permalink
ready!
Browse files Browse the repository at this point in the history
  • Loading branch information
AswinAsok committed Sep 17, 2023
1 parent e498ae4 commit 6d81099
Show file tree
Hide file tree
Showing 6 changed files with 159 additions and 1 deletion.
Binary file added public/assets/captf/displaynun.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/captf/img1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ import CodeStorm from "./Pages/Events/GTA/CodeStorm/CodeStorm";
import KKEMLearningFest from "./Pages/KKEMLearningFest/KKEMLearningFest";

import MaveliPortfolio from "./Pages/Events/MaveliPortfolio/MaveliPortfolio";
import Level1 from "./Pages/CapTF/Level1";
import Spiderman from "./Pages/CapTF/Spiderman";
import Submission from "./Pages/CapTF/Submission";
function App() {
const [redirects, setRedirects] = useState([]);
const [isLoaded, setIsLoaded] = useState(false);
Expand Down Expand Up @@ -115,7 +118,7 @@ function App() {
<Route path="events/learningfest" element={<KKEMLearningFest />} />
<Route path="/keralatechfest" element={<KKEMLearningFest />} />
<Route path="/maveliportfolio" element={<MaveliPortfolio />} />

<Route path="/team">
<Route path="" element={<Teams />} />
</Route>
Expand All @@ -142,6 +145,10 @@ function App() {
<Route path="/yipredirect" element={<YipForm />} />
<Route path="/journey" element={<Journey />} />
</Route>

<Route path="/level1" element={<Level1 />} />
<Route path="/spiderman" element={<Spiderman />} />
<Route path="/submission" element={<Submission />} />
</Routes>
</Router>
</div>
Expand Down
20 changes: 20 additions & 0 deletions src/Pages/CapTF/Level1.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from "react";

const Level1 = () => {
return (
<div style={{ backgroundColor: "#1c1c1c", color: "#fff", textAlign: "center", fontFamily: "Arial, sans-serif", minHeight: "100vh", display: "flex", alignItems: "center", justifyContent: "center" }}>
<html>
<body>
<img src="/assets/captf/img1.png" alt="" srcset="" style={{ maxWidth: "100%", margin: "auto" }} />
<br/>
<p style={{ fontSize: "24px", fontWeight: "bold", marginTop: "20px" }}>pxohduq.ruj/vslghup + Muhammad Kutty Panaparambil Ismai's Son</p>
<a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ" target="_blank" rel="noopener noreferrer">
<button style={{ backgroundColor: "#e62429", color: "#fff", border: "none", borderRadius: "5px", padding: "10px 20px", fontSize: "18px", fontWeight: "bold", marginTop: "20px", cursor: "pointer" }}>Click Here</button>
</a>
</body>
</html>
</div>
);
};

export default Level1;
46 changes: 46 additions & 0 deletions src/Pages/CapTF/Spiderman.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import React from "react";

const Spiderman = () => {
return (
<div
style={{
backgroundColor: "black",
width: "100vw",
height: "100vh",
display: "flex",
justifyContent: "center",
flexDirection: "column",
alignItems: "center",
color: "white",
filter: "grayscale(100%)", // added this line to make the image monochrome
textShadow: "0px 0px 10px white", // added this line to add a horror effect to the text
}}
>
<img src="/assets/captf/displaynun.jpg" alt="" />
<p
style={{
fontSize: "3rem", // added this line to increase the font size
}}
>
Here is your flag{" "}
<span style={{ display: "none", color: "#000000", textShadow: "none" }}>CTFFlag123</span>
</p>
<button
style={{
backgroundColor: "white",
color: "black",
padding: "10px 20px",
border: "none",
borderRadius: "5px",
marginTop: "20px",
cursor: "pointer",
boxShadow: "0px 0px 10px white", // added this line to add a horror effect to the button
}}
>
Submit
</button>
</div>
);
};

export default Spiderman;
85 changes: 85 additions & 0 deletions src/Pages/CapTF/Submission.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import React, { useState, useEffect } from "react";

const Submission = () => {
const [name, setName] = useState("");
const [showParam, setShowParam] = useState("");

useEffect(() => {
const urlParams = new URLSearchParams(window.location.search);
const show = urlParams.get("show");
setShowParam(show);
}, []);

const handleSubmit = (e) => {
e.preventDefault();
console.log(name);
};

const handleChange = (e) => {
setName(e.target.value);
};

return (
<div
style={{
backgroundColor: "black",
height: "100vh",
display: "flex",
justifyContent: "center",
alignItems: "center",
}}
>
<form
onSubmit={handleSubmit}
style={{
display: "flex",
flexDirection: "column",
alignItems: "center",
}}
>
<label
htmlFor="input-field"
style={{ color: "white", marginBottom: "10px" }}
>
Enter Secret Key
</label>
<input
type="text"
id="input-field"
value={name}
onChange={handleChange}
style={{
padding: "10px",
borderRadius: "5px",
border: "none",
marginBottom: "10px",
}}
/>
<a
href={
showParam === "true" || name != "Secret Key"
? "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
: "https://airtable.com/apppADe83MpHBM05J/shr3Dn6gSjCbcp45r"
}
>
<button
type="submit"
style={{
padding: "10px",
borderRadius: "5px",
border: "none",
backgroundColor: "white",
color: "black",
}}
>
Submit
</button>
</a>

<p style={{ color: "white" }}>{showParam}</p>
</form>
</div>
);
};

export default Submission;

0 comments on commit 6d81099

Please sign in to comment.