def find_wv_settings_dec(wv_list, results): """ Deprecated code """ for e in wv_list: if len(e)>0: settings_list=common.read_files(e[1],r'WebSettings\s*\w+\s*[;=]\s*\w+\.getSettings\(') settings_list+=common.read_files(e[1],r'WebSettings\s*\w+\s*[;=]\s*getSettings\(') wv_set_rex=r''+str(e[0])+r'\.getSettings\(' settings_list+=common.read_files(e[1],wv_set_rex) show_wv_vulns(settings_list,e, results) return
def find_wv_settings_dec(wv_list, results): """ Deprecated code """ for e in wv_list: if len(e) > 0: settings_list = common.read_files( e[1], r'WebSettings\s*\w+\s*[;=]\s*\w+\.getSettings\(') settings_list += common.read_files( e[1], r'WebSettings\s*\w+\s*[;=]\s*getSettings\(') wv_set_rex = r'' + str(e[0]) + r'\.getSettings\(' settings_list += common.read_files(e[1], wv_set_rex) show_wv_vulns(settings_list, e, results) return
def wv_config(file, rex_n): """ Finds if webviews are defined in a file """ found = False result = common.read_files(file, rex_n) if len(result) > 0: found = True return found
def wv_config(file, rex_n): """ Finds if webviews are defined in a file """ found=False result=common.read_files(file,rex_n) if len(result)>0: found=True return found
def text_scan(file_list,rex_n): """ Given a list of files, search content of each file by the regular expression and return a list of matches """ result_list=[] result_list.append([]) count = 0 for x in file_list: count = count + 1 pub.sendMessage('progress', bar='Webview checks', percent=round(count*100/common.java_files.__len__())) result=common.read_files(x,rex_n) if len(result)>0: result_list.append([result,x]) return result_list
def text_scan(file_list,rex_n): """ Given a list of files, search content of each file by the regular expression and return a list of matches """ count = 0 result_list=[] result_list.append([]) for x in file_list: count = count + 1 #pbar.update(round(count*100/common.java_files.__len__())) pub.sendMessage('progress', bar='File Permissions', percent=round(count*100/common.java_files.__len__())) result=common.read_files(x,rex_n) if len(result)>0: result_list.append([result,x]) return result_list