File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change 2525
2626# Initialize the simplified framework instance.
2727framework = Msf ::Simple ::Framework . create ( 'DisableDatabase' => true )
28-
28+ exceptions = [ ]
2929framework . payloads . each_module do |name , mod |
30- next if name =~ /generic/
31- mod_inst = framework . payloads . create ( name )
32- #mod_inst.datastore.merge!(framework.datastore)
33- next if Msf ::Util ::PayloadCachedSize . is_cached_size_accurate? ( mod_inst )
34- $stdout. puts "[*] Updating the CacheSize for #{ mod . file_path } ..."
35- Msf ::Util ::PayloadCachedSize . update_module_cached_size ( mod_inst )
30+ begin
31+ next if name =~ /generic/
32+ mod_inst = framework . payloads . create ( name )
33+ #mod_inst.datastore.merge!(framework.datastore)
34+ next if Msf ::Util ::PayloadCachedSize . is_cached_size_accurate? ( mod_inst )
35+ $stdout. puts "[*] Updating the CacheSize for #{ mod . file_path } ..."
36+ Msf ::Util ::PayloadCachedSize . update_module_cached_size ( mod_inst )
37+ rescue => e
38+ exceptions << [ e , name ]
39+ next
40+ end
41+ end
42+
43+ exceptions . each do |e , name |
44+ print_error ( "Caught Error while updating #{ name } :\n #{ e } " )
45+ elog ( e )
3646end
47+ exit ( 1 ) unless exceptions . empty?
You can’t perform that action at this time.
0 commit comments