1
0

Do not show warning if test.sh is not exists

This commit is contained in:
2019-08-17 12:42:14 +00:00
parent 6ee5530554
commit faf9f9fd8f
3 changed files with 5 additions and 2 deletions

2
pew.go
View File

@@ -292,13 +292,11 @@ func copyTest(q *qemu.System, testPath string, ka config.Artifact) (
err = q.CopyFile("user", testPath, remoteTest)
if err != nil {
if ka.Type == config.KernelExploit {
log.Println("Use `echo touch FILE | exploit` for test")
q.Command("user",
"echo -e '#!/bin/sh\necho touch $2 | $1' "+
"> "+remoteTest+
" && chmod +x "+remoteTest)
} else {
log.Println("No test, use dummy")
q.Command("user", "echo '#!/bin/sh' "+
"> "+remoteTest+" && chmod +x "+remoteTest)
}