feat: use artefact name as default build output filename
This commit is contained in:
parent
4a8f119b5d
commit
6f53a3f386
4
debug.go
4
debug.go
@ -185,9 +185,9 @@ func (cmd *DebugCmd) Run(g *Globals) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
remoteFile = "/tmp/exploit"
|
remoteFile = "/tmp/" + strings.Replace(ka.Name, " ", "_", -1)
|
||||||
if ka.Type == config.KernelModule {
|
if ka.Type == config.KernelModule {
|
||||||
remoteFile = "/tmp/module.ko"
|
remoteFile += ".ko"
|
||||||
}
|
}
|
||||||
|
|
||||||
err = q.CopyFile("user", outFile, remoteFile)
|
err = q.CopyFile("user", outFile, remoteFile)
|
||||||
|
5
pew.go
5
pew.go
@ -268,7 +268,10 @@ func build(flog zerolog.Logger, tmp string, ka config.Artifact,
|
|||||||
ki distro.KernelInfo, dockerTimeout time.Duration) (
|
ki distro.KernelInfo, dockerTimeout time.Duration) (
|
||||||
outdir, outpath, output string, err error) {
|
outdir, outpath, output string, err error) {
|
||||||
|
|
||||||
target := fmt.Sprintf("%d", rand.Int())
|
target := strings.Replace(ka.Name, " ", "_", -1)
|
||||||
|
if target == "" {
|
||||||
|
target = fmt.Sprintf("%d", rand.Int())
|
||||||
|
}
|
||||||
|
|
||||||
outdir = tmp + "/source"
|
outdir = tmp + "/source"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user