Compare commits

..

2 Commits

View File

@ -2041,9 +2041,18 @@ class GUI(QtGui.QWidget):
inifile = ConfigParser()
inifile.read(path)
for section in inifile.sections():
name = ini.read_ini(inifile, section, "name").decode('utf-8').replace('\\n', '\n')
description = ini.read_ini(inifile, section, "description").decode('utf-8').replace('\\n', '\n')
name = ini.read_ini(inifile, section, "name").replace('\\n', '\n').replace('\\"', '"').rstrip()
description = ini.read_ini(inifile, section, "description").replace('\\n', '\n').replace('\\"', '"').rstrip()
image = ini.read_ini(inifile, section, "image", "empty.png")
# Remove opening and closing quotes
if description[0] == '"' and description[-1] == '"':
description = description[1:-1]
# Not all evidence files are plain unicode
name = name.decode("unicode_escape") if "\\x" in name else name.decode('utf-8')
description = description.decode("unicode_escape") if "\\x" in description else description.decode('utf-8')
evidence.append([name, description, image])
if self.privateinv or is_autoload:
@ -2080,6 +2089,8 @@ class GUI(QtGui.QWidget):
return QtGui.QMessageBox.information(self, "Can't transfer evidence", 'The evidence "%s" already exists in the %s inventory.' % (evi[0], target_str))
else:
if self.privateinv:
for i in range(len(evi)):
evi[i] = evi[i].replace('#', '<num>').replace('%', '<percent>').replace('&', '<and>').replace('$', '<dollar>').replace('\\n', '\n')
self.tcp.send('PE#' + evi[0] + '#' + evi[1] + '#' + evi[2] + '#%')
else:
self.privateevidence.append(evi)