Linux websever 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
: 192.168.3.70 | : 192.168.1.99
Cant Read [ /etc/named.conf ]
8.1.2-1ubuntu2.23
urlab
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
ihub-website /
ihub_backend /
routes /
[ HOME SHELL ]
Name
Size
Permission
Action
Entre.js
1.42
KB
-rw-r--r--
auth.js
1.73
KB
-rw-r--r--
blogs
1.2
KB
-rw-r--r--
careers.js
1.59
KB
-rw-r--r--
collabration.js
1.32
KB
-rw-r--r--
fellowship.js
1.29
KB
-rw-r--r--
home.js
1.23
KB
-rw-r--r--
members.js
1.21
KB
-rw-r--r--
mevent.js
1.33
KB
-rw-r--r--
news.js
1.19
KB
-rw-r--r--
newsletter.js
1.29
KB
-rw-r--r--
rgrants.js
1.35
KB
-rw-r--r--
startup.js
1.95
KB
-rw-r--r--
tendors.js
1.29
KB
-rw-r--r--
webinar.js
1.36
KB
-rw-r--r--
workshop.js
1.28
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : auth.js
const express = require('express'); const jwt = require('jsonwebtoken'); const bcrypt = require('bcrypt'); const User = require('../models/User'); const router = express.Router(); // Register a new user router.post('/register', async (req, res) => { const {name, username, email, password } = req.query; try { if (!password) { return res.status(400).json({ message: `Password is required ${password}` }); } const salt = await bcrypt.genSalt(10); if (!salt) { return res.status(500).json({ message: 'Failed to generate salt' }); } const hashedPassword = await bcrypt.hash(password, salt); if (!hashedPassword) { return res.status(500).json({ message: 'Failed to hash password' }); } const user = new User({name, username, email, password: hashedPassword }); await user.save(); res.json({ message: 'Registration successful' }); } catch (error) { res.status(500).json({ message: error.message }); } }); // Login with an existing user router.post('/login', async (req, res) => { const { username, password } = req.body; try { const user = await User.findOne({ username }); if (!user) { return res.status(404).json({ message: 'User not found' }); } const passwordMatch = await user.comparePassword(password); if (!passwordMatch) { return res.status(401).json({ message: 'Incorrect password' }); } const token = jwt.sign({ userId: user._id }, process.env.SECRET_KEY, { expiresIn: '1 hour' }); res.status(200).json({ token }); } catch (error) { res.status(500).json({ message: 'Error logging in' }); } }); module.exports = router;
Close