Do not show warning if test.sh is not exists
This commit is contained in:
parent
6ee5530554
commit
faf9f9fd8f
@ -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.
|
||||||
|
@ -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
2
pew.go
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user