Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions aws/instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,13 @@ func (m *InstancesModule) Instances(filter string, outputDirectory string, verbo
}

wg.Wait()
//time.Sleep(time.Second * 2)

// Perform role analysis
// Signal the receiver to stop and wait for it to finish draining the channel.
// This must happen BEFORE role analysis to ensure all MappedInstances are collected.
receiverDone <- true
<-receiverDone

// Perform role analysis (all instances are now in m.MappedInstances)
if m.pmapperError == nil {
for i := range m.MappedInstances {
m.MappedInstances[i].Admin, m.MappedInstances[i].CanPrivEsc = GetPmapperResults(m.SkipAdminCheck, m.pmapperMod, &m.MappedInstances[i].Role)
Expand All @@ -144,8 +148,6 @@ func (m *InstancesModule) Instances(filter string, outputDirectory string, verbo
// Send a message to the spinner goroutine to close the channel and stop
spinnerDone <- true
<-spinnerDone
receiverDone <- true
<-receiverDone

// This conditional block will either dump the userData attribute content or the general instances data, depending on what you select via command line.
//fmt.Printf("\n[*] Preparing output...\n\n")
Expand Down
13 changes: 7 additions & 6 deletions cli/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -2435,12 +2435,13 @@ func runAllChecksCommand(cmd *cobra.Command, args []string) {
roleTrusts.PrintRoleTrusts(AWSOutputDirectory, Verbosity)

pmapperCommand := aws.PmapperModule{
Caller: *caller,
AWSProfile: profile,
Goroutines: Goroutines,
WrapTable: AWSWrapTable,
AWSOutputType: AWSOutputType,
AWSTableCols: AWSTableCols,
Caller: *caller,
AWSProfile: profile,
Goroutines: Goroutines,
WrapTable: AWSWrapTable,
AWSOutputType: AWSOutputType,
AWSTableCols: AWSTableCols,
PmapperDataBasePath: PmapperDataBasePath,
}
pmapperCommand.PrintPmapperData(AWSOutputDirectory, Verbosity)

Expand Down
2 changes: 1 addition & 1 deletion globals/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ const CLOUDFOX_USER_AGENT = "cloudfox"
const CLOUDFOX_LOG_FILE_DIR_NAME = ".cloudfox"
const CLOUDFOX_BASE_DIRECTORY = "cloudfox-output"
const LOOT_DIRECTORY_NAME = "loot"
const CLOUDFOX_VERSION = "2.0.3"
const CLOUDFOX_VERSION = "2.0.4"
Loading