Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

anbu

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anbu

javascript encrypt&confusion

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

javascript encrypt&confusion

NPM version Build Status Coverage Status Dependency Status

使js代码极为难读,增加被破解的成本。
由于浏览器宿主运行环境的关系,所有js都是公开的,无法加密,唯一的办法就是混淆使其不易阅读。
结合压缩器使用会有更好的效果。
建议先压缩,因为uglify自身问题会解析错误,而closure-compiler会优化代码使其更易读。

anbu取名自火影忍者中的火之国忍者暗部组织,意指秘密行动。

INSTALL

npm install anbu

API

  • anbu.encrypt(code:String, original:Boolean = false):String
    将js代码code混淆难度并返回,这并不会修改代码的任何逻辑
    作为代价它会一定程度上增加js体积以及消耗更多的性能,体积gzip后大概会增加3倍,性能未知
    original默认false会在代码前置入一段脚本,扩展原生对象,一般也是安全的,除非和代码本身的扩展冲突
    original设置true时不会有上述扩展,但会减小混淆力度

FAQs

Package last updated on 02 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc