Skip to content

Encode/Decode JSFuck (0.5.0) obfuscated Javascript

License

Notifications You must be signed in to change notification settings

karust/unjsfuck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnJSFuck

Go Report Card codecov

Encode/Decode JSFuck (0.5.0) obfuscated Javascript.

Helpful resources:

Usage

Use latest release binary or install the tool with:

go install github.com/karust/unjsfuck

Encode

unjsfuck encode ./test/test_plain.js

Decode

unjsfuck decode ./test/test_enc.js

Test

go test . -v

Package usage

Install

go get github.com/karust/unjsfuck

Decode

yourEncodedJS := "..."

jsFuck := New()
jsFuck.Init()
fmt.Println(jsFuck.Decode(yourEncodedJS))

Encode

yourPlainJS := "alert(123);"

jsFuck := New()
jsFuck.Init()

encoded := jsFuck.Encode(yourEncodedJS)

// Wrap in eval and parent scope execution
wrapped := jsFuck.Wrap(true, true) 
fmt.Println(wrapped)