def file_dialog_OnButtonClick(self): input_file = filedialog.askopenfile(title='Input file') if input_file: self.input_file_string.set(input_file.name) report_content = get_report_content(self.input_file_string.get()) line_list = report_content.split("\n") self.file_type = get_file_type(line_list[0]) self.md5s_dict = find_md5_in_file(report_content, self.file_type) self.console.insert(tk.END, get_string(VariousCodes.file_opening, self.language).format(file=input_file.name)) self.console.insert(tk.END, get_string(VariousCodes.file_type, self.language).format(type=self.file_type)) self.console.insert(tk.END, get_string(VariousCodes.file_md5s_nb, self.language).format(nb_md5s=len(self.md5s_dict.keys()))) self.console.see(tk.END)
def file_dialog_OnButtonClick(self): input_file = filedialog.askopenfile(title='Input file') if input_file: self.input_file_string.set(input_file.name) report_content = get_report_content(self.input_file_string.get()) line_list = report_content.split("\n") self.file_type = get_file_type(line_list[0]) self.md5s_dict = find_md5_in_file(report_content, self.file_type) self.console.insert( tk.END, get_string(VariousCodes.file_opening, self.language).format(file=input_file.name)) self.console.insert( tk.END, get_string(VariousCodes.file_type, self.language).format(type=self.file_type)) self.console.insert( tk.END, get_string( VariousCodes.file_md5s_nb, self.language).format(nb_md5s=len(self.md5s_dict.keys()))) self.console.see(tk.END)
def test_raw(self): file_type = get_file_type('RAW') self.assertEqual(file_type, "RAW")
def test_systemlook(self): file_type = get_file_type("SystemLook 30.07.11 by jpshortstuff") self.assertEqual(file_type, "SystemLook")
def test_seaf(self): file_type = get_file_type( "1. ========================= SEAF 1.0.1.0 - C_XX") self.assertEqual(file_type, "SEAF")
def test_frst_additional(self): file_type = get_file_type( "Farbar Recovery Scan Tool (x64) Version: 27.01.2018") self.assertEqual(file_type, "FRST - additional")
def test_frst(self): file_type = get_file_type( "Résultats d'analyse de Farbar Recovery Scan Tool (FRST) (x64) Version: 27-07-2016" ) self.assertEqual(file_type, "FRST")
def test_otl(self): file_type = get_file_type( 'OTL logfile created on: 2/26/2011 10:49:12 AM - Run') self.assertEqual(file_type, "OTL")
def test_zhpdiag(self): file_type = get_file_type( "~ ZHPDiag v2016.7.29.119 Par Nicolas Coolman (2016/07/29)") self.assertEqual(file_type, "ZHPDiag")