Skip to content

Commit

Permalink
fix: run modules without specifying target
Browse files Browse the repository at this point in the history
  • Loading branch information
jm33-m0 committed Mar 30, 2023
1 parent 687230c commit 8630a24
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions core/lib/cc/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,19 +218,19 @@ func UpdateOptions(modName string) (exist bool) {

// ModuleRun run current module
func ModuleRun() {
if CurrentTarget == nil {
if CurrentMod == emp3r0r_data.ModCMD_EXEC {
if !CliYesNo("Run on all targets") {
CliPrintError("Target not specified")
return
}
ModuleHelpers[emp3r0r_data.ModCMD_EXEC]()
return
}
if CurrentMod == emp3r0r_data.ModStager {
ModuleHelpers[emp3r0r_data.ModStager]()
if CurrentMod == emp3r0r_data.ModCMD_EXEC {
if !CliYesNo("Run on all targets") {
CliPrintError("Target not specified")
return
}
ModuleHelpers[emp3r0r_data.ModCMD_EXEC]()
return
}
if CurrentMod == emp3r0r_data.ModStager {
ModuleHelpers[emp3r0r_data.ModStager]()
return
}
if CurrentTarget == nil {
CliPrintError("Target not specified")
return
}
Expand Down

0 comments on commit 8630a24

Please sign in to comment.