Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Pankaj0038 authored Jul 4, 2024
1 parent b731625 commit 581cb8c
Show file tree
Hide file tree
Showing 9 changed files with 435 additions and 0 deletions.
19 changes: 19 additions & 0 deletions IDOR/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "idor",
"version": "1.0.0",
"description": "IDOR vulnerable website",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "nodemon src/index.js -e js,hbs"
},
"author": "Gumn4m1",
"license": "ISC",
"dependencies": {
"express": "^4.19.2",
"express-handlebars": "^7.1.3",
"hbs": "^4.2.0",
"mongoose": "^8.4.4",
"uuid": "^10.0.0"
}
}
59 changes: 59 additions & 0 deletions IDOR/public/css/reg.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
body {
font-family: Arial, sans-serif;
background-color: #fafafa;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
input {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
}
.container {
width: 100%;
max-width: 300px;
background-color: #fff;
padding: 20px;
border: 1px solid #dbdbdb;
text-align: center;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
margin-bottom: 10px;
}

.logo {
width: 175px;
margin-bottom: 20px;
}

.login-container form input {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #dbdbdb;
border-radius: 3px;
font-size: 14px;
}

.login-container form button {
width: 100%;
padding: 10px;
background-color: #3897f0;
color: white;
border: none;
border-radius: 3px;
cursor: pointer;
font-size: 14px;
margin-top: 10px;
}

.separator {
margin: 10px 0;
border-bottom: 1px solid #dbdbdb;
text-align: center;
}


59 changes: 59 additions & 0 deletions IDOR/public/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
body {
font-family: Arial, sans-serif;
background-color: #fafafa;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
input {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
}
.container {
width: 100%;
max-width: 300px;
background-color: #fff;
padding: 20px;
border: 1px solid #dbdbdb;
text-align: center;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
margin-bottom: 10px;
}

.logo {
width: 175px;
margin-bottom: 20px;
}

.login-container form input {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #dbdbdb;
border-radius: 3px;
font-size: 14px;
}

.login-container form button {
width: 100%;
padding: 10px;
background-color: #3897f0;
color: white;
border: none;
border-radius: 3px;
cursor: pointer;
font-size: 14px;
margin-top: 10px;
}

.separator {
margin: 10px 0;
border-bottom: 1px solid #dbdbdb;
text-align: center;
}


52 changes: 52 additions & 0 deletions IDOR/public/css/user.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
body {
font-family: Arial, sans-serif;
background-color: #fafafa;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}

.container {
width: 100%;
height: 100%;
max-height: 40vh;
max-width: 70vh;
background-color: #fff;
padding: 20px;
border: 1px solid #dbdbdb;
text-align: center;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
margin-bottom: 10px;
}
button{
border: none;
cursor: pointer;
appearance: none;
background-color: inherit;
}

.profile{
height: 50px;
width: 50px;
}

nav {
width: 100%;height: 80px;
display: flex;
align-items: center;
justify-content: space-around;
}

main{
display: block;
justify-content: center;
align-items: center;
margin-top: 20%;
}

h2{
font-size: 2rem;
font-family: "Space Mono",monospace;
}
Binary file added IDOR/public/images/prf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions IDOR/templates/views/login.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
<link rel="stylesheet" href="./css/style.css">
</head>
<body>
<div>
<div class="container">
<h1 data-value="GUMN4M1">GUMN4M1</h1>
<div class="login-container">
<form action="#" method="POST">
<input type="text" name="username" placeholder="Username" required>
<input type="password" name="password" placeholder="Password" required>
<button type="submit">Log In</button>
</form>
</div>
</div>
<div class="container">
<p>Don't have an account? <a href="./reg">Sign up</a></p>
</div>
</div>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const mytext = document.querySelector('h1');
let interval;
mytext.addEventListener('mouseenter', function() {
clearInterval(interval); // Clear any existing interval
// Reset text to original value
mytext.innerText = mytext.dataset.value;
let iteration = 0;
interval = setInterval(() => {
mytext.innerText = mytext.innerText.split("")
.map((letter, index) => {
if (index < iteration) {
return mytext.dataset.value[index];
}
return letters[Math.floor(Math.random() * 26)];
})
.join("");
if (iteration >= mytext.dataset.value.length) {
clearInterval(interval);
}
iteration += 1 / 3;
}, 30);
});
});
</script>
</body>
</html>
57 changes: 57 additions & 0 deletions IDOR/templates/views/reg.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Instagram Clone - Login</title>
<link rel="stylesheet" href="./css/reg.css">
</head>
<body>
<div>
<div class="container">
<h1 data-value="GUMN4M1">GUMN4M1</h1>
<div class="login-container">
<form action="#" method="POST">
<input type="text" name="username" placeholder="Username" required>
<input type="password" name="password" placeholder="Password" required>
<input type="password" name="password2" placeholder="Confirm Password" required>
<button type="submit">Sign up</button>
</form>
</div>
</div>
<div class="container">
<p>Already have an account? <a href="./login">Log in</a></p>
</div>
</div>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const mytext = document.querySelector('h1');
let interval;
mytext.addEventListener('mouseenter', function() {
clearInterval(interval); // Clear any existing interval
// Reset text to original value
mytext.innerText = mytext.dataset.value;
let iteration = 0;
interval = setInterval(() => {
mytext.innerText = mytext.innerText.split("")
.map((letter, index) => {
if (index < iteration) {
return mytext.dataset.value[index];
}
return letters[Math.floor(Math.random() * 26)];
})
.join("");
if (iteration >= mytext.dataset.value.length) {
clearInterval(interval);
}
iteration += 1 / 3;
}, 30);
});
});
</script>
</body>
</html>
61 changes: 61 additions & 0 deletions IDOR/templates/views/user.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!--user.hbs-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>UserCreds</title>
<link rel="stylesheet" href="./css/user.css">
</head>
<body>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const mytext = document.querySelector('h1');
let interval;
mytext.addEventListener('mouseenter', function() {
clearInterval(interval); // Clear any existing interval
// Reset text to original value
mytext.innerText = mytext.dataset.value;
let iteration = 0;
interval = setInterval(() => {
mytext.innerText = mytext.innerText.split("")
.map((letter, index) => {
if (index < iteration) {
return mytext.dataset.value[index];
}
return letters[Math.floor(Math.random() * 26)];
})
.join("");
if (iteration >= mytext.dataset.value.length) {
clearInterval(interval);
}
iteration += 1 / 3;
}, 30);
});
});
</script>


<div class="container">
<nav>
<h1 data-value="Gumn4m1">Gumn4m1</h1>
<img class="profile" src="./images/prf.png">
</nav>
<main>
<h2 id="title">Hello {{uname.username}},</h2>
<p class="inform">Welcome to your home page.</p>
User Details: <br>
Username: {{uname.username}},
Password: {{uname.password}},
User ID: {{uname.uid}},
</main>
</div>


</body>
</html>
Loading

0 comments on commit 581cb8c

Please sign in to comment.