obf-js-wm
v2.5.1
Published
An epic javascript amogus-themed obfuscator
Downloads
89
Maintainers
Readme
An epic amogus themed javascript obfuscator. Written in typescript. And now rewritten to be actually good!
Why use sus
?
Sus provides better obfuscation than other obfuscators. It might require trying the obfuscation with different configs, but its worth it. It uses lots of different obfuscation methods and is much harder to read then obfuscators like obfuscator.io. It is also much harder to deobfuscate then other obfuscators:
JsNice
dcode.fr
deog.sigr.io
codeamaze
Magages to eversoslightly prettify it, but code is still overall unreadable because of all the obfuscation methods used.
Dependencies
npm >= 8.19
node >= 17
It will probably work with lower versions too, but it is being developed and tested on these versions.
Installing
npm install -g sus-obfuscator
Usage
The CLI usage is sus <args>
Arguments:
-i --input [file] Input file
-o --output [file] Output file
-c --config [file] Specify a YAML config file (more about that later)
--version Prints version
-h --help Shows help
YAML Config
The default configuration goes as follows:
# This is a development version
# yaml-language-server: $schema=config_schema.json
transforms:
obfuscateNames: true
obfuscateBooleans: true
keyObfuscationLevel: 2
stringObfLevel: 3
numberObfLevel: 3
stringArrObfLevel: 2
checkNumbers: true
extractStringsToArray: Random
addFakeStringsToArray: true
ignore: []
webMode: false
noES2021Syntax: false
format:
amogus:
start: true
end: false
epicEndArt: true
lineStart: true
lineEnd: false
removeEmptyLines: true
shrink: false
commentFrequency: 2
input:
esVersion: 2023
seed: '...' # This is generated randomly each run if you do not set it manually
comments: [ 'uhh...' ] # By default the original comments I wrote back in 2020
Transforms
obfuscateNames
:boolean
- If names (variable names, function names, class names) should get renamed
obfuscateBooleans
:boolean
- If booleans should get obfuscated
keyObfuscationLevel
:0~3
- How heavily to obfuscate keys of objects
stringObfLevel
:0~3
- How heavily to obfuscate strings
numberObfLevel
:0~3
- How heavily to obfuscate numbers
stringArrObfLevel
:0~3
- How heavily to obfuscate the strings extracted to an array
checkNumbers
:boolean
- Verify if number obfuscation didn't malform the number (as higher levels of obfuscation can cause problems with big numbers) using eval
and use lower obfuscation level for that number if it did
extractStringsToArray
:boolean|"Random"
- Obfuscate strings by extracting them to an array
addFakeStringsToArray
:boolean
- (If extractStringsToArray is enabled) add fake strings to the array
ignore
:string[]
- Which identifiers to ignore when obfuscating names
removeEmptyLines
:boolean
- Remove any potential empty lines from the result
shrink
:boolean
- Make the result be one line only
commentFrequency
:0~3
- How frequent should random distractive comments be
webMode
:boolean
- Set this to true if you are obfuscating for the web
noES2021Syntax
:boolean
- Do not use syntax features new in ECMAScript 2021. Note that these are implemented in all modern browsers and runtimes, but break a ton of deobfuscators.
Format
amogus.start
:boolean
- Add amogus ascii art to the start of the code
amogus.end
:boolean
- Add amogus ascii art to the end of the code
epicEndArt
:boolean
- Add epic jerma sus ascii art to the end of the code
lineStart
:boolean | string[]
- Add sus or your string to the start of each line
lineEnd
:boolean | string[]
- Add sus or your string to the end of each line
Input
esVersion
:number
- The ECMAscript version of your JS source code
seed
:string
- Seed for the random number generator
comments
:string[]
- Comments to randomly insert into the obfuscated code (Note that the default comments feature the u+202E
character, you might want to add that to your comments as well just because funny)
Contributing
If you know how to fix any issue or improve anything, please contribute.
Issues
There are some issues. If you find any, plese put them to the issues tab. I may or may not be working on fixing them. It is recomended to test your obfuscated code before releasing it.
Contact
If you have any questions, or need support, you can contact me here (sorted from most to least preffered):
-
danik#4985
-
@danik4985:matrix.org
-
susdanik
License
sus obfuscator - sussify your javascript!
Copyright (C) 2023 danik
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.