@@ -119,10 +119,10 @@ def install_plugin():
119119 #
120120 # even if the plugin is not in use, the Keystone DLL / lib will be
121121 # loaded into memory by nature of Python imports. we are going to
122- # try and AGGRESSIVELY unload it such that we can ovewrite it
122+ # try and AGGRESSIVELY unload it such that we can overwrite it
123123 #
124124 # because this is pretty dangerous, we set this flag to ensure the
125- # patching plugin is completeley neutured and cannot be used in any
125+ # patching plugin is completeley neutered and cannot be used in any
126126 # form until IDA is restarted
127127 #
128128
@@ -134,7 +134,7 @@ def install_plugin():
134134 print ("[!] Please ensure no other instance of IDA are running and try again..." )
135135 return False
136136
137- # remove the rest of the plugin only IF removing Keystone succedded
137+ # remove the rest of the plugin only IF removing Keystone succeeded
138138 shutil .rmtree (patching_directory )
139139
140140 #
@@ -165,6 +165,11 @@ def install_plugin():
165165 # load the plugin if this was a fresh install
166166 plugin_path = os .path .join (plugins_directory , 'patching.py' )
167167 ida_loader .load_plugin (plugin_path )
168+
169+ # if a database appears open, force plugin core to load immediately
170+ if ida_loader .get_path (ida_loader .PATH_TYPE_IDB ):
171+ IDA_GLOBAL_SCOPE .patching .core .load ()
172+
168173 return True
169174
170175def remove_keystone (keystone_directory ):
0 commit comments