From 0c1a73e3dc8ce0f209cfc5dec09be0258cd93b73 Mon Sep 17 00:00:00 2001 From: TheEmeraldStarr <46467239+Epicloudygamer@users.noreply.github.com> Date: Sun, 4 Oct 2020 14:20:04 -0700 Subject: [PATCH] Testing --- app.js | 6 ------ auth.js | 20 ++++++++++++++++---- public/e.html | 21 +++++++++++---------- public/expr/pmbp.js | 4 ++-- 4 files changed, 29 insertions(+), 22 deletions(-) diff --git a/app.js b/app.js index 5fbdf017..ff87a67c 100644 --- a/app.js +++ b/app.js @@ -66,12 +66,6 @@ resave: true })); - app.use(session({ - secret: 'nu_auth', - cookie: { sameSite: 'none', secure: 'true' }, - saveUninitialized: true, - resave: true - })); // We made our own version of body-parser instead, due to issues. app.use((req, res, next) => { diff --git a/auth.js b/auth.js index 9ec37444..95d25bfe 100644 --- a/auth.js +++ b/auth.js @@ -1,6 +1,11 @@ #!/usr/bin/env node -var crypto = require('crypto'); +const express = require('express'), + app = express(), + session = require('express-session'), + + + var crypto = require('crypto'); var os = require('os'); var querystring = require('querystring'); var url = require('url'); @@ -19,12 +24,19 @@ module.exports = function(env) { return module.exports; }; +app.use(session({ + secret: 'nu_auth', + cookie: { sameSite: 'none', secure: 'true' }, + saveUninitialized: true, + resave: true +})); + module.exports.auth = function(req, res, next) { // Allow using with express as well as socket.io next = next || res; var cookies = new Cookies(req); - var hash = cookies.get('session') ? - module.exports.hash(cookies.get('session')) : ''; + var hash = cookies.get('nu_auth') ? + module.exports.hash(cookies.get('nu_auth')) : ''; if (settings.hashes.indexOf(hash) >= 0) { next(); } else { @@ -35,7 +47,7 @@ module.exports.auth = function(req, res, next) { module.exports.sign = function(req, res, next) { var cookies = new Cookies(req, res); var query = url.parse(req.url, true).query; - cookies.set('session', query.key ? module.exports.hash(query.key) : null); + cookies.set('nu_auth', query.key ? module.exports.hash(query.key) : null); res.writeHead(302, { location: query.path ? query.path : settings.redirect }); res.end(); }; diff --git a/public/e.html b/public/e.html index 2289a9c2..9b89e5e4 100644 --- a/public/e.html +++ b/public/e.html @@ -75,27 +75,28 @@
-
-

PyDodge B

-

An alternative proxy of a modified Via Proxy by OlyB.

+ +

No​de Unbloc​ker

+

A flexib​le seco​ndary pr​oxy compared to All​oy, P​M and P​D.

-
-

More Information:

-

Works on various sites.

Explore!

-

GitHub:  https://github.com/BinBashBa​nana/PyD​odge

Created by OlyB.

+

More Informat​ion:

+

Works on Di​scord (QR Code Only), Yout​ube (Might need to reload), etc.

Many sites work with this. Explore!

+

Gi​tHub:  https://git​hub.com/nfri​edly/no​de-unblo​cker

Created + by Nat​han Friedl​y.

@@ -144,7 +145,7 @@ - + \ No newline at end of file diff --git a/public/expr/pmbp.js b/public/expr/pmbp.js index c58a0ee2..db0bc092 100644 --- a/public/expr/pmbp.js +++ b/public/expr/pmbp.js @@ -3,7 +3,7 @@ function $(id) { }; $('pmprox').onclick = function() { - var url = $('pmurl').value; + var url = $('url').value; var det = document.domain; var domain = det.replace('www.', '').split(/[/?#]/)[0]; window.location.href = "https://p." + domain + "/" + url; @@ -26,5 +26,5 @@ Array.from(document.getElementsByTagName('button')).forEach(e => { }); window.onload = function() { - $('pmurl').focus(); + $('url').focus(); } \ No newline at end of file