Shitty-IP-grabber/index.js

15 lines
393 B
JavaScript
Raw Normal View History

2024-12-04 15:03:03 -06:00
const express = require("express")
const PORT = process.env.PORT || 8080
var app = express()
app.listen(PORT, () => {
console.log("Shit ass dumb ip grabber is on port " + PORT)
})
2024-12-04 15:07:00 -06:00
app.set('trust proxy', true)
2024-12-04 15:03:03 -06:00
app.get("*", (req, res) => {
2024-12-04 15:07:00 -06:00
console.log("This motherfucker's IP is " + req.ip || req.ips || req.headers['x-forwarded-for'] || req.socket.remoteAddress || req.hostname)
2024-12-04 15:03:03 -06:00
})