generated from SummerSec/template
-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathStrings.go
35 lines (27 loc) · 803 Bytes
/
Strings.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package main
import (
"fmt"
"github.com/SummerSec/SpringExploit/cmd/commons/utils"
"strings"
)
func main() {
hashmap := map[string]interface{}{
"foo": "bar",
}
v := hashmap["foo"].(string)
fmt.Println("%v", v)
mem := "asdasd%sqweqweqwe"
a := fmt.Sprintf(mem, "1231asdasd")
payload := "{\n \"id\": \"%s\",\n \"filters\": [{\n \"name\": \"AddResponseHeader\",\n \"args\": {\"name\": \"Result\",\"value\": \"%s\"}\n }],\n \"uri\": \"http://example.com\",\n \"order\": 0\n}"
fmt.Println(a)
t := fmt.Sprintf(payload, utils.GetCode(5), a)
fmt.Println(t)
b := "asd<%s>123->asd<%s>asda"
c := fmt.Sprintf(b, "qaz", "qwe")
fmt.Println(c)
d := ""
ds := strings.Split(d, ",")
fmt.Println(ds)
y := utils.EncodeString("asdasd")
fmt.Println(y)
}