<?php
session_start();

// 设置一个简单的密码变量。在实际应用中，你应该使用更安全的方法来存储和验证密码。
$correct_password = 'inskin520';

// 检查是否提交了表单
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    if (isset($_POST['password'])) {
        if ($_POST['password'] === $correct_password) {
            $_SESSION['authenticated'] = true;
        } else {
            $error_message = '密码错误！';
        }
    }
}

// 检查用户是否已通过身份验证
if (!isset($_SESSION['authenticated'])) {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Protected Download Page</title>
<style>
    body {
        font-family: Arial, sans-serif;
        background-color: #f0f8ff;
        color: #333;
        text-align: center;
        margin-top: 50px;
    }
    .container {
        width: 300px;
        margin: auto;
    }
    .error {
        color: #ff0000;
    }
    input[type=password], button {
        margin-top: 10px;
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }
    button {
        background-color: #007bff;
        color: white;
        border: none;
        cursor: pointer;
    }
    button:hover {
        opacity: 0.8;
    }
</style>
</head>
<body>
    <div class="container">
        <h1>你又来啦~</h1>
        <?php if (!empty($error_message)): ?>
            <div class="error"><?php echo $error_message; ?></div>
        <?php endif; ?>
        <form method="POST">
            <input type="password" name="password" placeholder="请输入密码">
            <button type="submit">提交</button>
        </form>
    </div>
</body>
</html>
<?php
    exit;
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Protected Download Page</title>
<style>
    body {
        font-family: Arial, sans-serif;
        background-color: #f0f8ff;
        color: #333;
    }
    h1 {
        color: #0056b3;
        text-align: center;
    }
    .download-button {
        display: block;
        width: 200px;
        padding: 10px;
        margin: 20px auto;
        background-color: #007bff;
        color: white;
        text-align: center;
        text-decoration: none;
        border-radius: 5px;
        transition: background-color 0.3s ease;
    }
    .download-button:hover {
        background-color: #0056b3;
    }
</style>
</head>
<body>
    <h1>搜道启量小红书工具下载页面</h1>
    <div>
        <a class="download-button" href="https://api.jailbreaks.app/troll" download>iPhone 6S ~ X （15.0~15.4.1）下载</a>
    </div>
    <div>
        <a class="download-button" href="itms-services://?action=download-manifest&url=https://jailbreaks.app/cdn/plists/TrollHelper.plist" download>iPhone XR ~ 13 ProMax （14.0~15.4.1）下载</a>
    </div>
    <div>
        <a class="download-button" href="https://esign.yyyue.xyz" download>轻松签下载</a>
    </div>
    <div>
        <a class="download-button" href="https://soft.16idea.com/redbook/小红书8.17.ipa" download>砸壳小红书ipa下载</a>
    </div>
    <div>
        <a class="download-button" href="​itms-services://?action=download-manifest&url=https://jailbreaks.app/cdn/plists/TrollHelper.plist" download>在线砸壳小红书ipa下载</a>
    </div>
    <div>
        <a class="download-button" href="https://soft.16idea.com/redbook/zs.zip" download>下载证书</a>
    </div>
    <div>
        <a class="download-button" href="https://wwt.lanzn.com/TrollStore233" download>TrollInstallerX企业在线安装</a>
    </div>

    <div>
        <a class="download-button" href="http://emby.sodao.la:8880/xhs/" download>小红书下载目录</a>
    </div>   
    <div>
        <a class="download-button" href="https://m.ip138.com" download>显示本机IP</a>
    </div>
</body>
</html>
