1
0

Do not show warning if test.sh is not exists

This commit is contained in:
dump_stack() 2019-08-17 12:42:14 +00:00
parent 6ee5530554
commit faf9f9fd8f
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC
3 changed files with 5 additions and 2 deletions

View File

@ -90,6 +90,8 @@ The main purpose of the release is to simplify installation.
- New command: **debug**. Creates interactive environment for kernel - New command: **debug**. Creates interactive environment for kernel
module/exploit development. Still work-in-progress. module/exploit development. Still work-in-progress.
- No warning anymore if test.sh is not exists.
## [0.1.0] - 2019-11-20 ## [0.1.0] - 2019-11-20
Initial release that was never tagged. Initial release that was never tagged.

View File

@ -94,6 +94,9 @@ Overview
- Path to exploit - Path to exploit
- Path to file that must be created with root privileges. - Path to file that must be created with root privileges.
- If there's no test.sh script then default
(``echo touch FILE | exploit``) one is used.
Security Security
-------- --------

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) err = q.CopyFile("user", testPath, remoteTest)
if err != nil { if err != nil {
if ka.Type == config.KernelExploit { if ka.Type == config.KernelExploit {
log.Println("Use `echo touch FILE | exploit` for test")
q.Command("user", q.Command("user",
"echo -e '#!/bin/sh\necho touch $2 | $1' "+ "echo -e '#!/bin/sh\necho touch $2 | $1' "+
"> "+remoteTest+ "> "+remoteTest+
" && chmod +x "+remoteTest) " && chmod +x "+remoteTest)
} else { } else {
log.Println("No test, use dummy")
q.Command("user", "echo '#!/bin/sh' "+ q.Command("user", "echo '#!/bin/sh' "+
"> "+remoteTest+" && chmod +x "+remoteTest) "> "+remoteTest+" && chmod +x "+remoteTest)
} }