File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -387,8 +387,13 @@ def load_config(path=nil)
387
387
if ( conf . group? ( ConfigGroup ) )
388
388
conf [ ConfigGroup ] . each_pair { |k , v |
389
389
case k . downcase
390
- when " activemodule"
390
+ when ' activemodule'
391
391
run_single ( "use #{ v } " )
392
+ when 'activeworkspace'
393
+ if framework . db . active
394
+ workspace = framework . db . find_workspace ( v )
395
+ framework . db . workspace = workspace if workspace
396
+ end
392
397
end
393
398
}
394
399
end
@@ -405,6 +410,12 @@ def save_config
405
410
group [ 'ActiveModule' ] = active_module . fullname
406
411
end
407
412
413
+ if framework . db . active
414
+ unless framework . db . workspace . default?
415
+ group [ 'ActiveWorkspace' ] = framework . db . workspace . name
416
+ end
417
+ end
418
+
408
419
# Save it
409
420
begin
410
421
Msf ::Config . save ( ConfigGroup => group )
You can’t perform that action at this time.
0 commit comments