jsarmor 1.0.0 → 1.0.2
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/package.json +6 -12
- package/readme.md +163 -0
package/package.json
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsarmor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Advanced JavaScript Obfuscator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "cli/index.js",
|
|
7
|
-
|
|
8
7
|
"bin": {
|
|
9
8
|
"jsarmor": "./cli/index.js"
|
|
10
9
|
},
|
|
11
|
-
|
|
12
10
|
"scripts": {
|
|
13
11
|
"start": "node cli/index.js"
|
|
14
12
|
},
|
|
15
|
-
|
|
16
13
|
"dependencies": {
|
|
17
14
|
"@babel/parser": "^7.26.0",
|
|
18
15
|
"@babel/traverse": "^7.26.0",
|
|
@@ -22,20 +19,17 @@
|
|
|
22
19
|
"gradient-string": "^2.0.2",
|
|
23
20
|
"cli-progress": "^3.12.0"
|
|
24
21
|
},
|
|
25
|
-
|
|
26
22
|
"keywords": [
|
|
27
23
|
"obfuscator",
|
|
28
24
|
"javascript",
|
|
29
25
|
"security",
|
|
30
26
|
"jsarmor"
|
|
31
27
|
],
|
|
32
|
-
|
|
33
28
|
"files": [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
],
|
|
38
|
-
|
|
29
|
+
"cli",
|
|
30
|
+
"core",
|
|
31
|
+
"utils"
|
|
32
|
+
],
|
|
39
33
|
"author": "_kingktn",
|
|
40
34
|
"license": "MIT"
|
|
41
|
-
}
|
|
35
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/banner.jpg" width="300">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">JSArmor</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
A lightweight JavaScript obfuscator for protecting source code from reverse engineering.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+

|
|
15
|
+

|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Overview
|
|
23
|
+
|
|
24
|
+
JSArmor transforms readable JavaScript into a more complex form while preserving runtime behavior.
|
|
25
|
+
|
|
26
|
+
It is designed for developers who want a **simple CLI tool to protect their code** from reverse engineering.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
# Installation
|
|
31
|
+
|
|
32
|
+
Install globally using npm
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install -g jsarmor
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or use it inside a project:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm install jsarmor
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
# Quick Start
|
|
47
|
+
|
|
48
|
+
Obfuscate a JavaScript file:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
jsarmor gen input.js
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Output will be generated in:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
dist/obf.js
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Run it normally:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
node dist/obf.js
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
# Example
|
|
69
|
+
|
|
70
|
+
## Input
|
|
71
|
+
|
|
72
|
+
```javascript
|
|
73
|
+
function greet(name) {
|
|
74
|
+
const message = "Hello " + name
|
|
75
|
+
console.log(message)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
greet("world")
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Output (obfuscated)
|
|
84
|
+
|
|
85
|
+
```javascript
|
|
86
|
+
(function(_0x1a2b){
|
|
87
|
+
const _0x3f21=['log','Hello','world'];
|
|
88
|
+
console[_0x3f21[0]](_0x3f21[1]+' '+_0x3f21[2]);
|
|
89
|
+
})();
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The output code becomes significantly harder to understand and analyze.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
# Features
|
|
97
|
+
|
|
98
|
+
* String encryption
|
|
99
|
+
* Variable renaming
|
|
100
|
+
* Control flow obfuscation
|
|
101
|
+
* Dead code injection
|
|
102
|
+
* Unicode encoding
|
|
103
|
+
* Anti-debug protection
|
|
104
|
+
* Self defending runtime
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
# CLI
|
|
109
|
+
|
|
110
|
+
Basic command:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
jsarmor gen <input.js>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Example:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
jsarmor gen app.js
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Result:
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
dist/obf.js
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
# Use Cases
|
|
131
|
+
|
|
132
|
+
JSArmor can be used for:
|
|
133
|
+
|
|
134
|
+
* protecting commercial JavaScript code
|
|
135
|
+
* distributing protected CLI tools
|
|
136
|
+
* hiding business logic
|
|
137
|
+
* making reverse engineering harder
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
# Support
|
|
142
|
+
|
|
143
|
+
If you encounter problems or have questions:
|
|
144
|
+
|
|
145
|
+
GitHub Issues
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
https://github.com/Swp-dev/JavascriptArmor
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Contact
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
https://eboy.asia/p.n
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
# License
|
|
160
|
+
|
|
161
|
+
MIT License
|
|
162
|
+
|
|
163
|
+
This project is licensed under the MIT License – you are free to use, modify and distribute it.
|