mirror of
https://github.com/QuiteAFancyEmerald/Holy-Unblocker.git
synced 2025-05-13 12:00:02 -04:00
Testing
This commit is contained in:
parent
be87160768
commit
0c1a73e3dc
4 changed files with 29 additions and 22 deletions
6
app.js
6
app.js
|
@ -66,12 +66,6 @@
|
||||||
resave: true
|
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.
|
// We made our own version of body-parser instead, due to issues.
|
||||||
app.use((req, res, next) => {
|
app.use((req, res, next) => {
|
||||||
|
|
20
auth.js
20
auth.js
|
@ -1,6 +1,11 @@
|
||||||
#!/usr/bin/env node
|
#!/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 os = require('os');
|
||||||
var querystring = require('querystring');
|
var querystring = require('querystring');
|
||||||
var url = require('url');
|
var url = require('url');
|
||||||
|
@ -19,12 +24,19 @@ module.exports = function(env) {
|
||||||
return module.exports;
|
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) {
|
module.exports.auth = function(req, res, next) {
|
||||||
// Allow using with express as well as socket.io
|
// Allow using with express as well as socket.io
|
||||||
next = next || res;
|
next = next || res;
|
||||||
var cookies = new Cookies(req);
|
var cookies = new Cookies(req);
|
||||||
var hash = cookies.get('session') ?
|
var hash = cookies.get('nu_auth') ?
|
||||||
module.exports.hash(cookies.get('session')) : '';
|
module.exports.hash(cookies.get('nu_auth')) : '';
|
||||||
if (settings.hashes.indexOf(hash) >= 0) {
|
if (settings.hashes.indexOf(hash) >= 0) {
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
|
@ -35,7 +47,7 @@ module.exports.auth = function(req, res, next) {
|
||||||
module.exports.sign = function(req, res, next) {
|
module.exports.sign = function(req, res, next) {
|
||||||
var cookies = new Cookies(req, res);
|
var cookies = new Cookies(req, res);
|
||||||
var query = url.parse(req.url, true).query;
|
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.writeHead(302, { location: query.path ? query.path : settings.redirect });
|
||||||
res.end();
|
res.end();
|
||||||
};
|
};
|
||||||
|
|
|
@ -75,27 +75,28 @@
|
||||||
</script>
|
</script>
|
||||||
<div class="d-flex align-items-center order-12" style="height:200px;">
|
<div class="d-flex align-items-center order-12" style="height:200px;">
|
||||||
<div class="container border rounded text-center justify-content-center align-items-center button" style="color: rgb(255,255,255);filter: blur(0px); opacity: 0.95;">
|
<div class="container border rounded text-center justify-content-center align-items-center button" style="color: rgb(255,255,255);filter: blur(0px); opacity: 0.95;">
|
||||||
<form id="pd" onkeydown="pd()">
|
<form id="pc" onkeydown="nu()">
|
||||||
<p style=" font-size: 46px; ">P<wbr>yDo<wbr>dge B</p>
|
<p style=" font-size: 46px; ">No​de Unbloc​ker</p>
|
||||||
<p style="font-family: 'Montserrat Alternates', sans-serif; ">An alterna<wbr>tive pr<wbr>oxy of a modi<wbr>fied Via Pro<wbr>xy by O<wbr>lyB.</p>
|
<p style="font-family: 'Montserrat Alternates', sans-serif; ">A flexib​le seco​ndary pr​oxy compared to All​oy, P​M and P​D.</p>
|
||||||
<div class="input-group ">
|
<div class="input-group ">
|
||||||
<div class="input-group-prepend"></div><input id="url" class="bg-dark border rounded-0 border-info shadow-sm form-control form-control-lg " type="text" name="url" style="width: 194px;font-family:
|
<div class="input-group-prepend"></div><input id="url" class="bg-dark border rounded-0 border-info shadow-sm form-control form-control-lg " type="text" name="url" style="width: 194px;font-family:
|
||||||
'Montserrat Alternates', sans-serif;opacity: 0.80; color:rgb(255,255,255); " placeholder="Insert URL ">
|
'Montserrat Alternates', sans-serif;opacity: 0.80; color:rgb(255,255,255); " placeholder="Insert URL ">
|
||||||
<div class="input-group-append "><button id="pdprox" class="btn btn-dark btn-lg bg-dark border rounded-0 border-info shadow-lg select " data-bs-hover-animate="pulse " name="button" type="submit" style="width: 78px;padding: 8px;margin:
|
<div class="input-group-append "><button id="nprox" class="btn btn-dark btn-lg bg-dark border rounded-0 border-info shadow-lg select " data-bs-hover-animate="pulse " name="button" type="submit " style="width: 78px;padding: 8px;margin:
|
||||||
0px;height: 46.126px;font-family: 'Montserrat Alternates', sans-serif;font-size: 16px; ">Go</button></div>
|
0px;height: 46.126px;font-family: 'Montserrat Alternates', sans-serif;font-size: 16px; ">Go</button></div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<script>
|
<script>
|
||||||
var header = document.getElementById("pd");
|
var header = document.getElementById("pc");
|
||||||
var btns = header.getElementsByClassName("pdprox");
|
var btns = header.getElementsByClassName("nprox");
|
||||||
for (var i = 0; i < btns.length; i++) {
|
for (var i = 0; i < btns.length; i++) {
|
||||||
btns[i].addEventListener("click", function() {});
|
btns[i].addEventListener("click", function() {});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
<p class="text-primary " style="font-size: 20px;font-family: 'Montserrat Alternates', sans-serif; ">More Information:<br></p>
|
<p class="text-primary " style="font-size: 20px;font-family: 'Montserrat Alternates', sans-serif; ">More Informat​ion:<br></p>
|
||||||
<p class="text-light " style="font-family: Lato, sans-serif; ">Works on vari<wbr>ous sites.<br><br>Explore!</p>
|
<p class="text-light " style="font-family: Lato, sans-serif; ">Works on Di​scord (QR Code Only), Yout​ube (Might need to reload), etc.<br><br>Many sites work with this. Explore!</p>
|
||||||
<p class="text-primary " style="font-family: Lato, sans-serif; ">GitH<wbr>ub: <a class="text-primary " href="https://github.com/BinBashB​anana/Py​Dodge "><strong> https://github.com/BinBashBa​nana/PyD​odge</strong></a><br><br>Crea<wbr>ted by Ol<wbr>yB.</p>
|
<p class="text-primary " style="font-family: Lato, sans-serif; ">Gi​tHub: <a class="text-primary " href="https://github.com/nf​riedly/n​ode-unblo​cker "><strong> https://git​hub.com/nfri​edly/no​de-unblo​cker</strong></a><br><br>Created
|
||||||
|
by Nat​han Friedl​y.</p>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -144,7 +145,7 @@
|
||||||
<script src="assets/js/jquery.min.js "></script>
|
<script src="assets/js/jquery.min.js "></script>
|
||||||
<script src="assets/bootstrap/js/bootstrap.min.js "></script>
|
<script src="assets/bootstrap/js/bootstrap.min.js "></script>
|
||||||
<script src="assets/js/bs-init.js "></script>
|
<script src="assets/js/bs-init.js "></script>
|
||||||
<script src="expr/pdbp.js "></script>
|
<script src="expr/pd.js "></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
|
@ -3,7 +3,7 @@ function $(id) {
|
||||||
};
|
};
|
||||||
|
|
||||||
$('pmprox').onclick = function() {
|
$('pmprox').onclick = function() {
|
||||||
var url = $('pmurl').value;
|
var url = $('url').value;
|
||||||
var det = document.domain;
|
var det = document.domain;
|
||||||
var domain = det.replace('www.', '').split(/[/?#]/)[0];
|
var domain = det.replace('www.', '').split(/[/?#]/)[0];
|
||||||
window.location.href = "https://p." + domain + "/" + url;
|
window.location.href = "https://p." + domain + "/" + url;
|
||||||
|
@ -26,5 +26,5 @@ Array.from(document.getElementsByTagName('button')).forEach(e => {
|
||||||
});
|
});
|
||||||
|
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
$('pmurl').focus();
|
$('url').focus();
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue