MCPcopy Create free account
hub / github.com/Moopinger/smugglefuzz / WritePayloadsToFile

Function WritePayloadsToFile

lib/payload.go:33–48  ·  view source on GitHub ↗
(payloads []Payload, hostname string, fileName string)

Source from the content-addressed store, hash-verified

31}
32
33func WritePayloadsToFile(payloads []Payload, hostname string, fileName string) error {
34 file, err := os.OpenFile(fileName, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
35 if err != nil {
36 return err
37 }
38 defer file.Close()
39
40 for _, payload := range payloads {
41 _, err := file.WriteString("Payload: " + payload.Name + "\nHost: " + hostname + "\n\n")
42 if err != nil {
43 return err
44 }
45 }
46
47 return nil
48}
49
50func ImportSinglePayloads(payloadString string) (Payload, error) {
51 parts := strings.Split(payloadString, "; ")

Callers 1

scan.goFile · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected