Skip to content

Commit

Permalink
fix: let user choose to inject existing lib/sc
Browse files Browse the repository at this point in the history
  • Loading branch information
jm33-m0 committed Jun 29, 2023
1 parent 3db3ef1 commit 47fd9e6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core/lib/cc/modinjector.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ func moduleInjector() {
// shellcode.txt
pid := Options["pid"].Val
if method == "inject_shellcode" && !util.IsExist(WWWRoot+shellcode_file) {
CliPrintError("%s%s does not exist", WWWRoot, shellcode_file)
return
CliPrintWarning("%s%s does not exist, will inject guardian shellcode", WWWRoot, shellcode_file)
}

// to_inject.so
if method == "shared_library" && !util.IsExist(WWWRoot+so_file) {
CliPrintError("%s%s does not exist", WWWRoot, so_file)
return
CliPrintWarning("%s%s does not exist", WWWRoot, so_file)
if CliYesNo("Inject loader.so instead?") {
method = "inject_loader"
}
}

// injector cmd
Expand Down

0 comments on commit 47fd9e6

Please sign in to comment.