def search(apks, dx): """ Search for implementations """ # Important methods for searching methods = {'parse': 'parseUri', 'load': 'loadUrl', 'js': 'addJavascriptInterface'} print(t.yellow("[{0}] Searching for parseUri implementation ...".format(datetime.datetime.now()))) parse_uri = dx.get_tainted_packages().search_methods("Landroid/content/Intent", methods["parse"], ".") # Check to see if the list is populated if parse_uri: print(t.yellow("[{0}] Found parseUri() implementation! ...".format(datetime.datetime.now()))) for location in parse_uri: analysis.show_Path(apks, location) print(t.yellow("[{0}] Searching for loadUrl...".format(datetime.datetime.now()))) load_url = dx.get_tainted_packages().search_methods("Landroid/webkit/WebView", methods["load"], ".") # Check to see if the list is populated if load_url: print(t.yellow("[{0}] Found loadUrl() implementation! ...".format(datetime.datetime.now()))) for location in load_url: analysis.show_Path(apks, location) print(t.yellow("[{0}] Searching for addJavascriptInterface() ...".format(datetime.datetime.now()))) add_js = dx.get_tainted_packages().search_methods(".", methods["js"], ".") # Check to see if the list is populated if add_js: print(t.yellow("[{0}] Found addJavascriptInterface() implementation! ...".format(datetime.datetime.now()))) for location in load_url: analysis.show_Path(apks, location)
def display_PACKAGES_IE(a, x, classes): # Internal Methods -> External Methods print "Internal --> External" for j in x.get_tainted_packages().get_external_packages(): analysis.show_Path( a, j )
def display_PACKAGES_IE(a, x, classes): # Internal Methods -> External Methods print("Internal --> External") for j in x.get_tainted_packages().get_external_packages(): analysis.show_Path( a, j )