1.研究使用的工具及網站
https://obfuscator.io 主要研究對象,主要是研究此網站的各種混淆方法及破解辦法。
http://jsnice.org/ 用來格式化代碼,方便調試。
notepad++ 編輯代碼。
某瀏覽器 具有谷歌內核的瀏覽器,主要用來調試JS代碼。
2.網站功能選項翻譯
Compact Code 緊湊代碼 |
Removes line breaks from the output obfuscated code. 從輸出的混淆代碼中刪除換行符。 | ||||||||
Identifier Names Generator 標識符名稱生成器 |
Use this option to control how identifiers (variable names, functions names, etc) will be obfuscated. 使用此選項來控制如何混淆標識符(變量名,函數名等)。 dictionary 字典Generates identifier names using names from Generates random identifier names using a hexadecimal pattern (e.g: Uses short identifier names (e.g: |
||||||||
Identifiers Dictionary 標識符字典 |
This options sets identifiers list for 此選項設置identifierNamesGenerator的標識符列表:dictionary選項。簡單的說所有的標識符(常量,變量函數名等)都不可見了,只能通過查字典來獲取標識符。 |
||||||||
Identifiers Prefix 標識符前綴 |
This options makes all global identifiers have a specific prefix. 此選項使所有全局標識符具有特定的前綴。 Use this option when obfuscating multiple files that are loaded on the same page. This option helps to avoid conflicts between global identifiers of these files. Use a different prefix for each file.當混淆同一頁面上加載的多個文件時,請使用此選項。此選項有助於避免這些文件的全局標識符之間的衝突。爲每個文件使用不同的前綴。 |
||||||||
Rename Globals 全局變量重命名 |
This option can break your code. Only enable it if you know what it does. Enables the obfuscation of global variables and function names with declaration. 此選項可能會破壞您的代碼。僅在知道它的功能時啓用它。 |
||||||||
Self Defending 自我保護 |
This option makes the output code resilient against formating and variable renaming. 此選項使輸出代碼可抵抗格式設置和變量重命名。 If one tries to use a JavaScript beautifier on the obfuscated code, the code won't work anymore, making it harder to understand and modify it.如果嘗試在混淆後的代碼上使用JavaScript美化器,則該代碼將無法再使用,從而使其難以理解和修改。 requires the Compact Code setting. |
||||||||
Control Flow Flattening 平坦控制流 |
This option greatly affects the performance up to 1.5x slower runtime speed.此選項對性能的影響最大爲運行速度降低1.5倍。 Enables code control flow flattening. Control flow flattening is a structure transformation of the source code that hinders program comprehension. See the docs on JavaScript's obfuscator GH page for an example of how the transformation works. 啓用代碼控制流平坦。控制流扁平化是源代碼的結構轉換,它阻礙了程序的理解。有關轉換如何工作的示例,請參見JavaScript的混淆器GH頁面上的文檔。
|
||||||||
Dead Code Injection 加入花指令 |
This option increases the size of the obfuscated code greatly (up to 200%).此選項極大地增加了混淆代碼的大小(最多200%)。 This feature adds random blocks of dead code (i.e: code that won't be executed) to the obfuscated output, making it harder to be reverserd-engineered. See the docs on JavaScript Obfuscator's GH page for an example of how this feature works. 此功能將混淆代碼的隨機塊(即將不會執行的代碼)添加到混淆後的輸出中,從而更難進行反向工程。有關此功能如何工作的示例,請參見JavaScript Obfuscator的GH頁面上的文檔。
requires the String Array option.需要“字符串數組”選項。 |
||||||||
Split Strings 分割字符串 |
This option increases the size of the obfuscated code.此選項增加了混淆代碼的大小。 This feature splits literal strings into chunks with length of the 此功能將文字字符串拆分爲具有splitStringsChunkLength選項值長度的塊。
|
||||||||
String Array 字符串數組 |
Removes string literals and place them in a special array. For instance the string "Hello World" in 刪除字符串文字並將其放置在特殊數組中。例如,在var m =“ Hello World”中的字符串“ Hello World”;將替換爲對將在運行時檢索其值的函數的調用,例如:var m = _0xb0c3('0x1'); See the options below on how to configure this feature be more or less resilient. 請參閱以下有關如何配置此功能或多或少具有彈性的選項。
|
||||||||
Transform Object Keys 轉換對象鍵 |
Transforms (obfuscates) object keys.轉換(混淆)對象鍵。 For instance, this code See the official documentation of the JavaScript Obfuscator on GitHub for a full example.有關完整示例,請參見GitHub上的JavaScript Obfuscator的官方文檔。 ideally used with the String Array setting. 此最想通常跟字符數據選項一起使用。 |
||||||||
Escape Unicode Sequence 轉義Unicode序列 |
Converts all the strings to their unicode representation. For instance, the string 將所有字符串轉換爲它們的unicode表示形式。 例如,字符串“ Hello World!”。 將被轉換爲“'\ x48 \ x65 \ x6c \ x6c \ x6f \ x20 \ x57 \ x6f \ x72 \ x6c \ x64 \ x21”。 This convertion is pretty easy to revert, and will increase the obfuscated code size greatly. It's not recommended on larger code bases.此轉換非常容易還原,並且將大大增加混淆的代碼大小。 不建議在較大的代碼庫中使用。 |
||||||||
Disable Console Output 禁用控制檯輸出 |
Disables the use of 禁用控制檯輸出通過將它們替換爲空函數來禁用對console.log,console.info,console.error和console.warn的使用。 這使得調試器的使用更加困難。 |
||||||||
Debug Protection 反調試 |
Can freeze your browser if you open the Developer Tools.如果打開開發人員工具,則可以卡死瀏覽器。 This option makes it almost impossible to use the Console tab of the Developer Tools (both on Google Chrome and Mozilla Firefox). 使用此選項幾乎無法使用開發人員工具的控制檯選項卡(在Google Chrome和Mozilla Firefox上)。
|
||||||||
Domain Lock 域鎖 |
Locks the obfuscated source code so it only runs on specific domains and/or sub-domains. This makes really hard for someone just copy and paste your source code and run elsewhere.鎖定混淆的源代碼,使其僅在特定的域和/或子域上運行。對於僅複製並粘貼源代碼並在其他地方運行的人來說,這真的很難。 Multiple domains and sub-domains 多個域和子域It's possible to lock your code to more than one domain or sub-domain. For instance, to lock it so the code only runs on www.example.com add 可以將代碼鎖定到多個域或子域。例如,要對其進行鎖定以使代碼僅在www.example.com上運行,請添加www.example.com,以使其在example.com的任何子域中均可使用,請使用.example.com。 |
||||||||
Reserved Names 保留名稱 |
Disables obfuscation and generation of identifiers, which being matched by passed RegExp patterns. 禁用混淆和標識符的生成,這些標識符與通過的RegExp模式匹配。 For instance, if you add 例如,如果添加^ someName,混淆器將確保不會破壞以someName開頭的所有變量,函數名稱和函數參數。 |
||||||||
Reserved Strings 保留字串 |
Disables transformation of string literals, which being matched by passed RegExp patterns. 禁用字符串文字的轉換,該文字與通過的RegExp模式匹配。 For instance, if you add 例如,如果添加^ some * string,混淆器將確保所有以某個字符串開頭的字符串都不會移到`stringArray`中。 |
||||||||
Source Map 源圖 |
Be sure not to upload the obfuscated source code with the inline source map embedded on it, as it contains your original source code.確保不要上傳嵌入了嵌入式源代碼映射的混淆後的源代碼,因爲它包含原始源代碼。 Source maps can be useful to help you debug your obfuscated Java Script source code. If you want or need to debug in production, you can upload the separate source map file to a secret location and then point your browser there. Read more about source maps on the Google Chrome Developer Tools website. 源映射可以幫助您調試混淆的Java Script源代碼。如果要在生產中進行調試,可以將單獨的源映射文件上載到祕密位置,然後將瀏覽器指向該位置。在Google Chrome開發者工具網站上詳細瞭解源地圖。 Inline Source Map內聯源地圖This embeds the source map of your source in the result of the obfuscated code. Useful if you just want to debug locally on your machine.這會將源代碼的源映射嵌入到混淆代碼的結果中。如果只想在計算機上進行本地調試,則很有用。 Separate Source Map單獨的源地圖This generates a separate file with the source map. Useful to debug code in production, as this enables you to upload the source map to a secret location on your server and then point your browser to use it. 這將與源映射一起生成一個單獨的文件。這對於調試生產中的代碼很有用,因爲這使您可以將源映射上載到服務器上的祕密位置,然後指向瀏覽器使用它。 Use the Source Map Base URL and Source Map File Name to customize the 使用Source Map Base URL和Source Map File Name來定製sourceMappingURL屬性,該屬性將附加到混淆代碼的末尾。 For instance, if you set the Base URL to 例如,如果將基本URL設置爲“ http:// localhost:9000”,文件名設置爲“ example”,則將得到://#sourceMappingURL = http:// localhost:9000 / example.js.map 。附加到混淆代碼的末尾。 |
||||||||
Seed 種子 |
By default ( 默認情況下(seed = 0),每次混淆代碼時,您都會得到一個新結果(即:不同的變量名,插入stringArray中的變量不同,等等)。 如果要獲得可重複的結果,請將種子設置爲特定的整數。 |
||||||||
Target 目標 |
You can set the target environment of the obfuscated code to one of the following:您可以將混淆代碼的目標環境設置爲以下之一:
Currently the output of |
網站功能區截圖: