Advertisement
Guest User

MD5

a guest
Oct 17th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const m = require('md5');
  2.  
  3. app.get('/', (req, res) => {
  4.   const secret = process.env.SECRET;
  5.   const pwd = req.query.pass;
  6.  
  7.   if (pwd) {
  8.     if (parseInt(m(secret)) === parseInt(m(pwd))) {
  9.       res.send(`Here is the flag: ${process.env.FLAG}`);
  10.     } else {
  11.       res.send('Nope!');
  12.     }
  13.   } else {
  14.     res.send('Send me a password ("pass") query param!');
  15.   }
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement