jsarmor 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli/index.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  import fs from "fs";
4
4
  import path from "path";
@@ -20,6 +20,8 @@ import { injectAntiDebug } from "../core/antidebug.js";
20
20
  import { antiBeautify } from "../core/beautifyGuard.js";
21
21
  import { selfDefend } from "../core/selfdefend.js";
22
22
 
23
+ import { watermark } from "../utils/watermark.js";
24
+
23
25
  const neon = gradient(["#00ffff","#ff00ff","#00ff9f"]);
24
26
 
25
27
  try{
@@ -37,6 +39,14 @@ if(outIndex !== -1 && args[outIndex+1]){
37
39
  outputName = args[outIndex+1];
38
40
  }
39
41
 
42
+ let user = "";
43
+
44
+ const userIndex = args.indexOf("--user");
45
+
46
+ if(userIndex !== -1 && args[userIndex+1]){
47
+ user = args[userIndex+1];
48
+ }
49
+
40
50
  if(!command || command === "help"){
41
51
 
42
52
  console.log(neon(`
@@ -88,10 +98,9 @@ code = code.slice(end);
88
98
 
89
99
  console.log(
90
100
  neon(`┌──────────────────────────────┐
91
- NodeJS Obfuscator v3
101
+ JSArmor Version1.7
92
102
  └──────────────────────────────┘`)
93
103
  );
94
-
95
104
  const bar = new cliProgress.SingleBar({
96
105
  format:"progress [{bar}] {percentage}% | {value}/{total}",
97
106
  barCompleteChar:"█",
@@ -131,6 +140,7 @@ const runtimeJunk = generateDeadRuntime();
131
140
 
132
141
  const final =
133
142
  (shebang ? shebang + "\n" : "") +
143
+ watermark(user) +
134
144
  injectAntiDebug() +
135
145
  antiBeautify() +
136
146
  selfDefend() +
@@ -145,7 +155,7 @@ if(!fs.existsSync(distDir)){
145
155
  fs.mkdirSync(distDir,{recursive:true});
146
156
  }
147
157
 
148
- const outFile = path.join(distDir,"obf.js");
158
+ const outFile = path.join(distDir, outputName);
149
159
 
150
160
  fs.writeFileSync(outFile,final);
151
161
 
@@ -147,4 +147,4 @@ Function(path){
147
147
  }
148
148
  });
149
149
 
150
- }
150
+ }
package/core/parser.js CHANGED
@@ -18,4 +18,4 @@ plugins:[
18
18
  ]
19
19
  });
20
20
 
21
- }
21
+ }
package/core/renamer.js CHANGED
@@ -61,4 +61,4 @@ Program(path){
61
61
  }
62
62
  });
63
63
 
64
- }
64
+ }
@@ -77,4 +77,4 @@ StringLiteral(path){
77
77
 
78
78
  return pool;
79
79
 
80
- }
80
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsarmor",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Advanced JavaScript Obfuscator",
5
5
  "type": "module",
6
6
  "main": "cli/index.js",
@@ -34,12 +34,13 @@
34
34
  "author": "_kingktn",
35
35
  "license": "SEE LICENSE IN LICENSE",
36
36
  "dependencies": {
37
+ "@babel/generator": "^7.26.0",
37
38
  "@babel/parser": "^7.26.0",
38
39
  "@babel/traverse": "^7.26.0",
39
40
  "@babel/types": "^7.26.0",
40
- "@babel/generator": "^7.26.0",
41
41
  "chalk": "^5.3.0",
42
+ "cli-progress": "^3.12.0",
42
43
  "gradient-string": "^2.0.2",
43
- "cli-progress": "^3.12.0"
44
+ "os": "^0.1.2"
44
45
  }
45
46
  }
@@ -0,0 +1,21 @@
1
+ export function watermark(user=""){
2
+
3
+ const date = new Date().toISOString();
4
+
5
+ return `
6
+
7
+ /*
8
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
9
+
10
+ __OWN__ = "_kingktn - Trương Nhật Bảo Nam"
11
+ __OBF__ = "JSarmor"
12
+ __USR__ = "${user}"
13
+ __VER__ = "1.7.0"
14
+ __DATE__ = "${date}"
15
+
16
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
17
+ */
18
+
19
+ `;
20
+
21
+ }