SHARE
TWEET

MD5

a guest Oct 17th, 2019 90 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. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top