MCPcopy Index your code
hub / github.com/corazawaf/libinjection-go

github.com/corazawaf/libinjection-go @v0.3.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.2 ↗ · + Follow
117 symbols 288 edges 15 files 32 documented · 27% 5 cross-repo links updated 3d agov0.3.2 · 2026-02-23★ 524 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

libinjection

License codecov CodeQL

libinjection is a Go porting of the libinjection(http://www.client9.com/projects/libinjection/) and it's thread safe.

How to use

SQLi Example

package main

import (
    "fmt"
    "github.com/corazawaf/libinjection-go"
)

func main() {
    result, fingerprint := libinjection.IsSQLi("-1' and 1=1 union/* foo */select load_file('/etc/passwd')--")
    fmt.Println("=========result==========: ", result)
    fmt.Println("=======fingerprint=======: ", string(fingerprint))
}

XSS Example

package main

import (
    "fmt"
    "github.com/corazawaf/libinjection-go"
)

func main() {
    fmt.Println("result: ", libinjection.IsXSS("<script>alert('1')</script>"))
}

License

libinjection-go is distributed under the same license as the libinjection.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

assign
called by 38
sqli_token.go
toUpperCmp
called by 18
sqli_helpers.go
lookupWord
called by 10
sqli.go
parseWord
called by 9
sqli_parse.go
isUnaryOp
called by 7
sqli_token.go
isXSS
called by 5
xss.go
sqliFingerprint
called by 5
sqli.go
strLenSpn
called by 5
sqli_helpers.go

Shape

Function 68
Method 41
Struct 6
FuncType 2

Languages

Go100%

Modules by API surface

html5.go26 symbols
sqli_parse.go24 symbols
sqli.go14 symbols
sqli_test.go9 symbols
sqli_helpers.go9 symbols
xss_test.go8 symbols
xss_helpers.go8 symbols
sqli_token.go5 symbols
xss_helpers_test.go4 symbols
sqli_data.go4 symbols
xss.go2 symbols
html5_decls.go2 symbols

For agents

$ claude mcp add libinjection-go \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact