Skip to content

Commit f415f99

Browse files
authored
Merge pull request #74 from enzowritescode/feature/aws-neptune
Amazon Neptune Support
2 parents 1ca5dbf + 15e0507 commit f415f99

16 files changed

Lines changed: 486 additions & 112 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# Dependency directories (remove the comment below to include it)
1616
# vendor/
1717
.vscode
18+
.idea
1819
launch.json
1920

2021
######################################################

aws/api-gws.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package aws
22

33
import (
44
"fmt"
5-
"os"
65
"path/filepath"
76
"sort"
87
"strconv"
@@ -144,7 +143,7 @@ func (m *ApiGwModule) PrintApiGws(outputDirectory string, verbosity int) {
144143
Name: m.output.CallingModule,
145144
})
146145
o.PrefixIdentifier = m.AWSProfile
147-
loot := m.writeLoot(o.Table.DirectoryName, verbosity)
146+
loot := m.writeLoot(filepath, verbosity)
148147
o.Loot.LootFiles = append(o.Loot.LootFiles, internal.LootFile{
149148
Name: m.output.CallingModule,
150149
Contents: loot,
@@ -207,12 +206,6 @@ func (m *ApiGwModule) executeChecks(r string, wg *sync.WaitGroup, semaphore chan
207206

208207
func (m *ApiGwModule) writeLoot(outputDirectory string, verbosity int) string {
209208
path := filepath.Join(outputDirectory, "loot")
210-
err := os.MkdirAll(path, os.ModePerm)
211-
if err != nil {
212-
m.modLog.Error(err.Error())
213-
m.CommandCounter.Error++
214-
panic(err.Error())
215-
}
216209
f := filepath.Join(path, "api-gws.txt")
217210

218211
var out string

aws/api-gws_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"github.com/BishopFox/cloudfox/internal"
1010
"github.com/aws/aws-sdk-go-v2/aws"
1111
"github.com/aws/aws-sdk-go-v2/service/sts"
12+
"github.com/aws/smithy-go/ptr"
1213
"github.com/spf13/afero"
1314
)
1415

@@ -29,7 +30,8 @@ func TestApiGw(t *testing.T) {
2930

3031
fs := internal.MockFileSystem(true)
3132
defer internal.MockFileSystem(false)
32-
tmpDir := "~/.cloudfox/"
33+
//tmpDir := "~/.cloudfox/"
34+
tmpDir := ptr.ToString(internal.GetLogDirPath())
3335

3436
m.PrintApiGws(tmpDir, 2)
3537

0 commit comments

Comments
 (0)