Documentation
¶
Index ¶
- Variables
- func AWSConfigFileLoader(AWSProfile string, version string) aws.Config
- func AWSWhoami(awsProfile string, version string) (*sts.GetCallerIdentityOutput, error)
- func BuildAWSPath(Caller sts.GetCallerIdentityOutput) string
- func CheckErr(e error, msg string)
- func ConfirmSelectedProfiles(AWSProfiles []string) bool
- func Contains(element string, array []string) bool
- func GetAADUsersClient(tenantID string) graphrbac.UsersClient
- func GetARMresourcesClient(tenantID, subscriptionID string) *armresources.Client
- func GetAllAWSProfiles(AWSConfirm bool) []string
- func GetEnabledRegions(awsProfile string, version string) []string
- func GetLogDirPath() *string
- func GetNICClient(subscriptionID string) network.InterfacesClient
- func GetPublicIPClient(subscriptionID string) network.PublicIPAddressesClient
- func GetResourceGroupsClient(subscriptionID string) resources.GroupsClient
- func GetRoleAssignmentsClient(subscriptionID string) authorization.RoleAssignmentsClient
- func GetRoleDefinitionsClient(subscriptionName string) authorization.RoleDefinitionsClient
- func GetSelectedAWSProfiles(AWSProfilesListPath string) []string
- func GetStorageAccountBlobClient(tenantID, storageAccountName string) (*azblob.Client, error)
- func GetStorageClient(subscriptionID string) storage.AccountsClient
- func GetSubscriptionsClient() subscriptions.Client
- func GetTenantsClient() subscriptions.TenantsClient
- func GetVirtualMachinesClient(subscriptionID string) compute.VirtualMachinesClient
- func LoadCacheFromFiles(directory string) error
- func LoadCacheFromGobFiles(directory string) error
- func LoadFileLinesIntoArray(input string) []string
- func MockFileSystem(switcher bool) afero.Fs
- func OutputSelector(verbosity int, outputType string, header []string, body [][]string, ...)
- func PrintTableToScreen(header []string, body [][]string, wrapLines bool)
- func ReorganizeAWSProfiles(allProfiles []string, mgmtProfile string) []string
- func SaveCacheToFiles(directory string, accountID string) error
- func SaveCacheToGobFiles(directory string, accountID string) error
- func SpinUntil(callingModuleName string, counter *CommandCounter, done chan bool, ...)
- func TxtLogger() *logrus.Logger
- type CommandCounter
- type LootClient
- type LootFile
- type OutputClient
- type OutputData2
- type TableClient
- type TableFile
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TxtLoggerName = "root" TxtLog = TxtLogger() UtilsFs = afero.NewOsFs() )
View Source
var Cache = cache.New(120*time.Minute, 0)
View Source
var ErrDirectoryDoesNotExist = errors.New("directory does not exist")
Functions ¶
func AWSWhoami ¶
func AWSWhoami(awsProfile string, version string) (*sts.GetCallerIdentityOutput, error)
func BuildAWSPath ¶
func BuildAWSPath(Caller sts.GetCallerIdentityOutput) string
func ConfirmSelectedProfiles ¶
func GetAADUsersClient ¶
func GetAADUsersClient(tenantID string) graphrbac.UsersClient
func GetARMresourcesClient ¶ added in v1.10.0
func GetARMresourcesClient(tenantID, subscriptionID string) *armresources.Client
func GetAllAWSProfiles ¶
func GetEnabledRegions ¶
func GetLogDirPath ¶
func GetLogDirPath() *string
This function returns ~/.cloudfox. If the folder does not exist the function creates it.
func GetNICClient ¶
func GetNICClient(subscriptionID string) network.InterfacesClient
func GetPublicIPClient ¶
func GetPublicIPClient(subscriptionID string) network.PublicIPAddressesClient
func GetResourceGroupsClient ¶
func GetResourceGroupsClient(subscriptionID string) resources.GroupsClient
func GetRoleAssignmentsClient ¶
func GetRoleAssignmentsClient(subscriptionID string) authorization.RoleAssignmentsClient
func GetRoleDefinitionsClient ¶
func GetRoleDefinitionsClient(subscriptionName string) authorization.RoleDefinitionsClient
func GetSelectedAWSProfiles ¶
func GetStorageAccountBlobClient ¶ added in v1.10.0
func GetStorageClient ¶
func GetStorageClient(subscriptionID string) storage.AccountsClient
func GetSubscriptionsClient ¶
func GetSubscriptionsClient() subscriptions.Client
func GetTenantsClient ¶
func GetTenantsClient() subscriptions.TenantsClient
func GetVirtualMachinesClient ¶
func GetVirtualMachinesClient(subscriptionID string) compute.VirtualMachinesClient
func LoadCacheFromFiles ¶ added in v1.11.0
func LoadCacheFromGobFiles ¶ added in v1.11.0
func LoadFileLinesIntoArray ¶
func MockFileSystem ¶
func OutputSelector ¶
func OutputSelector(verbosity int, outputType string, header []string, body [][]string, outputDirectory string, fileName string, callingModule string, wrapTable bool, prefixIdentifier string)
verbosity = 1 (Output and loot printed to file). verbosity = 2 (Output and loot printed to file, output printed screen). verbosity = 3 (Output and loot printed to file and screen). outputType = "table", "csv" prefixIdentifier = this string gets printed with control message calling module (e.g. aws profile, azure resource group, gcp project, etc)
func PrintTableToScreen ¶
func ReorganizeAWSProfiles ¶ added in v1.11.0
func SaveCacheToFiles ¶ added in v1.11.0
func SaveCacheToGobFiles ¶ added in v1.11.0
Types ¶
type CommandCounter ¶
type LootClient ¶ added in v1.10.0
type OutputClient ¶ added in v1.10.0
type OutputClient struct { Verbosity int CallingModule string PrefixIdentifier string Table TableClient Loot LootClient }
func (*OutputClient) WriteFullOutput ¶ added in v1.10.0
func (o *OutputClient) WriteFullOutput(tables []TableFile, lootFiles []LootFile)
type OutputData2 ¶
type OutputData2 struct { Headers []string Body [][]string FilePath string FullFilename string CallingModule string Verbosity int Directory string }
This struct is here to mantain compatibility with legacy cloudfox code
type TableClient ¶ added in v1.10.0
Click to show internal directories.
Click to hide internal directories.