1
0

Make variable names more toml-friendly

This commit is contained in:
dump_stack() 2019-08-19 19:03:59 +00:00
parent 857f398f6b
commit d425f455bb
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC
2 changed files with 9 additions and 9 deletions

View File

@ -110,15 +110,15 @@ type Artifact struct {
SupportedKernels []KernelMask SupportedKernels []KernelMask
Qemu struct { Qemu struct {
CPUs int Cpus int
Memory int Memory int
Timeout Duration Timeout Duration
} }
Mitigations struct { Mitigations struct {
DisableSMEP bool DisableSmep bool
DisableSMAP bool DisableSmap bool
DisableKASLR bool DisableKaslr bool
} }
} }

10
pew.go
View File

@ -307,16 +307,16 @@ func whatever(swg *sizedwaitgroup.SizedWaitGroup, ka config.Artifact,
if ka.Qemu.Timeout.Duration != 0 { if ka.Qemu.Timeout.Duration != 0 {
q.Timeout = ka.Qemu.Timeout.Duration q.Timeout = ka.Qemu.Timeout.Duration
} }
if ka.Qemu.CPUs != 0 { if ka.Qemu.Cpus != 0 {
q.Cpus = ka.Qemu.CPUs q.Cpus = ka.Qemu.Cpus
} }
if ka.Qemu.Memory != 0 { if ka.Qemu.Memory != 0 {
q.Memory = ka.Qemu.Memory q.Memory = ka.Qemu.Memory
} }
q.SetKASLR(!ka.Mitigations.DisableKASLR) q.SetKASLR(!ka.Mitigations.DisableKaslr)
q.SetSMEP(!ka.Mitigations.DisableSMEP) q.SetSMEP(!ka.Mitigations.DisableSmep)
q.SetSMAP(!ka.Mitigations.DisableSMAP) q.SetSMAP(!ka.Mitigations.DisableSmap)
err = q.Start() err = q.Start()
if err != nil { if err != nil {