Created
September 25, 2020 10:41
-
-
Save seeya/9b71235c08b5664f86a53736931ec9d7 to your computer and use it in GitHub Desktop.
Reverse HTTP Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require("http"); | |
const token = "ACCESSTOKEN"; | |
const deviceMAC = "00:00:00:00:00" | |
const remoteServer = "139.59.236.228:4445" | |
http.createServer((req, res) => { | |
if(!req.headers.authorization || req.headers.authorization !== "Bearer " + token) | |
return res.end("Unauthorized"); | |
res.end(decodeURIComponent(`${deviceMAC}${remoteServer}`)); | |
}).listen(8080); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment