xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

WebAssembly in Action

WebAssembly in Action

数据加密,反爬虫,防盗链,版权保护,数据追踪,埋点

  1. blogs 加密,js 禁用检测,权限控制

WebAssembly 防盗链

PPT

wasm online ide

https://wasdk.github.io/WasmFiddle/

WebAssembly module

int main() { 
  return 36;
}

text

program.wat

(module
 (table 0 anyfunc)
 (memory $0 1)
 (export "memory" (memory $0))
 (export "main" (func $main))
 (func $main (; 0 ;) (result i32)
  (i32.const 36)
 )
)

binary

program.wasm

(module
  (type $t0 (func (result i32)))
  (func $main (type $t0) (result i32)
    i32.const 36)
  (table $T0 0 funcref)
  (memory $memory 1)
  (export "memory" (memory 0))
  (export "main" (func $main)))

js

let wasmModule = new WebAssembly.Module(wasmCode);

let wasmInstance = new WebAssembly.Instance(wasmModule, wasmImports);

const {main} = wasmInstance.exports;

log(main() + 1);

refs



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2020-05-21 13:13  xgqfrms  阅读(367)  评论(6编辑  收藏  举报