out-of-tree kernel {module, exploit} development tool
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

gen.go 760B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2018 Mikhail Klementev. All rights reserved.
  2. // Use of this source code is governed by a AGPLv3 license
  3. // (or later) that can be found in the LICENSE file.
  4. package main
  5. import (
  6. "fmt"
  7. "github.com/naoina/toml"
  8. "code.dumpstack.io/tools/out-of-tree/config"
  9. )
  10. func genConfig(at config.ArtifactType) (err error) {
  11. a := config.Artifact{
  12. Name: "Put name here",
  13. Type: at,
  14. }
  15. a.SupportedKernels = append(a.SupportedKernels, config.KernelMask{
  16. DistroType: config.Ubuntu,
  17. DistroRelease: "18.04",
  18. ReleaseMask: ".*",
  19. })
  20. a.Preload = append(a.Preload, config.PreloadModule{
  21. Repo: "Repo name (e.g. https://github.com/jollheef/lkrg)",
  22. })
  23. buf, err := toml.Marshal(&a)
  24. if err != nil {
  25. return
  26. }
  27. fmt.Print(string(buf))
  28. return
  29. }