mirror of https://github.com/daffainfo/nuclei.git
Merge branch 'master' of github.com:organiccrap/nuclei into organiccrap-master
commit
528793a9b7
|
@ -10,7 +10,7 @@ import (
|
|||
"net/url"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"log"
|
||||
"github.com/Knetic/govaluate"
|
||||
)
|
||||
|
||||
|
@ -73,9 +73,12 @@ func HelperFunctions() (functions map[string]govaluate.ExpressionFunction) {
|
|||
}
|
||||
|
||||
functions["base64_decode"] = func(args ...interface{}) (interface{}, error) {
|
||||
sEnc := base64.StdEncoding.EncodeToString([]byte(args[0].(string)))
|
||||
sDec, err := base64.StdEncoding.DecodeString(args[0].(string))
|
||||
if err != nil {
|
||||
log.Fatal("error:", err)
|
||||
}
|
||||
|
||||
return sEnc, nil
|
||||
return sDec, nil
|
||||
}
|
||||
|
||||
functions["url_encode"] = func(args ...interface{}) (interface{}, error) {
|
||||
|
|
Loading…
Reference in New Issue