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:11:47 -06:00
|
|
|
app.use
|
2024-12-04 15:07:00 -06:00
|
|
|
|
2024-12-04 15:03:03 -06:00
|
|
|
app.get("*", (req, res) => {
|
2024-12-04 15:11:47 -06:00
|
|
|
var IP = req.headers['x-forwarded-for'] || req.connection.remoteAddress
|
|
|
|
var IPtext = "This motherfucker's IP is " + IP
|
|
|
|
console.log(IPtext)
|
|
|
|
res.send(IPtext + ", probably!")
|
2024-12-04 15:03:03 -06:00
|
|
|
})
|