Linux v69820.1blu.de 4.15.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Apache/2.4.58
Server IP : 195.90.215.149 & Your IP : 216.73.217.80
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
nodejs /
istanbul /
lib /
util /
Delete
Unzip
Name
Size
Permission
Date
Action
factory.js
2.76
KB
-rw-r--r--
2023-08-21 05:40
file-matcher.js
2.26
KB
-rw-r--r--
2023-08-21 05:40
file-writer.js
4.06
KB
-rw-r--r--
2023-08-21 05:40
help-formatter.js
798
B
-rw-r--r--
2023-08-21 05:40
input-error.js
283
B
-rw-r--r--
2023-08-21 05:40
insertion-text.js
3.04
KB
-rw-r--r--
2023-08-21 05:40
meta.js
376
B
-rw-r--r--
2023-08-21 05:40
tree-summarizer.js
6.32
KB
-rw-r--r--
2023-08-21 05:40
writer.js
2.68
KB
-rw-r--r--
2023-08-21 05:40
yui-load-hook.js
1.78
KB
-rw-r--r--
2023-08-21 05:40
Save
Rename
/* Copyright (c) 2012, Yahoo! Inc. All rights reserved. Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var util = require('util'), path = require('path'), fs = require('fs'), abbrev = require('abbrev'); function Factory(kind, dir, allowAbbreviations) { this.kind = kind; this.dir = dir; this.allowAbbreviations = allowAbbreviations; this.classMap = {}; this.abbreviations = null; } Factory.prototype = { knownTypes: function () { var keys = Object.keys(this.classMap); keys.sort(); return keys; }, resolve: function (abbreviatedType) { if (!this.abbreviations) { this.abbreviations = abbrev(this.knownTypes()); } return this.abbreviations[abbreviatedType]; }, register: function (constructor) { var type = constructor.TYPE; if (!type) { throw new Error('Could not register ' + this.kind + ' constructor [no TYPE property]: ' + util.inspect(constructor)); } this.classMap[type] = constructor; this.abbreviations = null; }, create: function (type, opts) { var allowAbbrev = this.allowAbbreviations, realType = allowAbbrev ? this.resolve(type) : type, Cons; Cons = realType ? this.classMap[realType] : null; if (!Cons) { throw new Error('Invalid ' + this.kind + ' [' + type + '], allowed values are ' + this.knownTypes().join(', ')); } return new Cons(opts); }, loadStandard: function (dir) { var that = this; fs.readdirSync(dir).forEach(function (file) { if (file !== 'index.js' && file.indexOf('.js') === file.length - 3) { try { that.register(require(path.resolve(dir, file))); } catch (ex) { console.error(ex.message); console.error(ex.stack); throw new Error('Could not register ' + that.kind + ' from file ' + file); } } }); }, bindClassMethods: function (Cons) { var tmpKind = this.kind.charAt(0).toUpperCase() + this.kind.substring(1), //ucfirst allowAbbrev = this.allowAbbreviations; Cons.mix = Factory.mix; Cons.register = this.register.bind(this); Cons.create = this.create.bind(this); Cons.loadAll = this.loadStandard.bind(this, this.dir); Cons['get' + tmpKind + 'List'] = this.knownTypes.bind(this); if (allowAbbrev) { Cons['resolve' + tmpKind + 'Name'] = this.resolve.bind(this); } } }; Factory.mix = function (cons, proto) { Object.keys(proto).forEach(function (key) { cons.prototype[key] = proto[key]; }); }; module.exports = Factory;