libinjection is a Go porting of the libinjection(http://www.client9.com/projects/libinjection/) and it's thread safe.
package main
import (
"fmt"
"github.com/bxlxx/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))
}
package main
import (
"fmt"
"github.com/bxlxx/libinjection-go"
)
func main() {
fmt.Println("result: ", libinjection.IsXSS("<script>alert('1')</script>"))
}
libinjection-go is distributed under the same license as the libinjection.