# WebAssembly in Action WebAssembly 防盗链 > 数据加密,反爬虫,防盗链,版权保护,数据追踪,埋点



WebAssembly in Action

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

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

WebAssembly 防盗链



wasm online ide

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

WebAssembly module

int main() { 
return 36;
}


WebAssembly in Action_版权保护

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

var wasmModule = new WebAssembly.Module(wasmCode);

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

log(wasmInstance.exports.main() + 1);



​​



©xgqfrms 2012-2020



xgqfrms