Shitty-IP-grabber/index.js

13 lines
342 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)
})
app.get("*", (req, res) => {
console.log("This motherfucker's IP is " + req.headers['x-forwarded-for'] || req.socket.remoteAddress || req.hostname)
})