@@ -193,8 +193,9 @@ func runEnumCommand(clArgs []string) {
193
193
// Expand data source category names into the associated source names
194
194
initializeSourceTags (sys .DataSources ())
195
195
cfg .SourceFilter .Sources = expandCategoryNames (cfg .SourceFilter .Sources , generateCategoryMap (sys ))
196
-
197
- graph := sys .GraphDatabases ()[0 ]
196
+ // Create the in-memory graph database used to store enumeration findings
197
+ graph := netmap .NewGraph (netmap .NewCayleyGraphMemory ())
198
+ defer graph .Close ()
198
199
// Setup the new enumeration
199
200
e := enum .NewEnumeration (cfg , sys , graph )
200
201
if e == nil {
@@ -261,7 +262,7 @@ func runEnumCommand(clArgs []string) {
261
262
wg .Wait ()
262
263
fmt .Fprintf (color .Error , "\n %s\n " , green ("The enumeration has finished" ))
263
264
// If necessary, handle graph database migration
264
- if len (e .Sys .GraphDatabases ()) > 1 {
265
+ if len (e .Sys .GraphDatabases ()) > 0 {
265
266
ctx , cancel := context .WithTimeout (context .Background (), 10 * time .Minute )
266
267
defer cancel ()
267
268
// Monitor for cancellation by the user
@@ -274,7 +275,7 @@ func runEnumCommand(clArgs []string) {
274
275
c ()
275
276
}(cancel )
276
277
// Copy the graph of findings into the system graph databases
277
- for _ , g := range e .Sys .GraphDatabases ()[ 1 :] {
278
+ for _ , g := range e .Sys .GraphDatabases () {
278
279
fmt .Fprintf (color .Error , "%s%s%s\n " ,
279
280
yellow ("Discoveries are being migrated into the " ), yellow (g .String ()), yellow (" database" ))
280
281
0 commit comments