We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb66fad commit b7e471cCopy full SHA for b7e471c
transform/encode.go
@@ -9,12 +9,21 @@ import (
9
"slices"
10
"strconv"
11
"strings"
12
+ "unicode/utf16"
13
14
"github.com/vulncheck-oss/go-exploit/output"
15
"golang.org/x/text/cases"
16
"golang.org/x/text/language"
17
)
18
19
+func StringToUnicodeByteArray(s string) []byte {
20
+ var byteArray []byte
21
+ for _, r := range utf16.Encode([]rune(s)) {
22
+ byteArray = append(byteArray, byte(r&0xFF), byte(r>>8&0xFF))
23
+ }
24
+ return byteArray
25
+}
26
+
27
// Given gzip encoded data, return the decompressed data.
28
func Inflate(compressed []byte) ([]byte, bool) {
29
reader, err := gzip.NewReader(bytes.NewBuffer(compressed))
0 commit comments