���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
.trash
/
node_modules
/
unstorage
/
drivers
/
Viewing: http.mjs
import { defineDriver } from "./utils/index.mjs"; import { $fetch as _fetch } from "ofetch"; import { joinURL } from "ufo"; const DRIVER_NAME = "http"; export default defineDriver((opts) => { const r = (key = "") => joinURL(opts.base, key.replace(/:/g, "/")); const rBase = (key = "") => joinURL(opts.base, (key || "/").replace(/:/g, "/"), ":"); const catchFetchError = (error, fallbackVal = null) => { if (error?.response?.status === 404) { return fallbackVal; } throw error; }; return { name: DRIVER_NAME, options: opts, hasItem(key, topts) { return _fetch(r(key), { method: "HEAD", headers: { ...opts.headers, ...topts.headers } }).then(() => true).catch((err) => catchFetchError(err, false)); }, async getItem(key, tops = {}) { const value = await _fetch(r(key), { headers: { ...opts.headers, ...tops.headers } }).catch(catchFetchError); return value; }, async getItemRaw(key, topts) { const value = await _fetch(r(key), { headers: { accept: "application/octet-stream", ...opts.headers, ...topts.headers } }).catch(catchFetchError); return value; }, async getMeta(key, topts) { const res = await _fetch.raw(r(key), { method: "HEAD", headers: { ...opts.headers, ...topts.headers } }); let mtime = void 0; const _lastModified = res.headers.get("last-modified"); if (_lastModified) { mtime = new Date(_lastModified); } return { status: res.status, mtime }; }, async setItem(key, value, topts) { await _fetch(r(key), { method: "PUT", body: value, headers: { ...opts.headers, ...topts?.headers } }); }, async setItemRaw(key, value, topts) { await _fetch(r(key), { method: "PUT", body: value, headers: { "content-type": "application/octet-stream", ...opts.headers, ...topts.headers } }); }, async removeItem(key, topts) { await _fetch(r(key), { method: "DELETE", headers: { ...opts.headers, ...topts.headers } }); }, async getKeys(base, topts) { const value = await _fetch(rBase(base), { headers: { ...opts.headers, ...topts.headers } }); return Array.isArray(value) ? value : []; }, async clear(base, topts) { await _fetch(rBase(base), { method: "DELETE", headers: { ...opts.headers, ...topts.headers } }); } }; });
Coded With 💗 by
0x6ick Mod By V1rus_Alfa