gave write_to_file function ability to write list, tuple, set to files (issue #40)

This commit is contained in:
ekultek 2017-10-04 07:07:43 -05:00
parent 4a752ea87e
commit 1e71aaa5f5

View file

@ -22,7 +22,7 @@ except NameError:
# clone link
CLONE = "https://github.com/ekultek/zeus-scanner.git"
# current version <major.minor.commit.patch ID>
VERSION = "1.0.27.de68"
VERSION = "1.0.28.8fb0"
# colors to output depending on the version
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
# version string formatting
@ -395,6 +395,10 @@ def write_to_log_file(data_to_write, path, filename):
for item in data_to_write:
item = item.strip()
log.write(str(item) + "\n")
elif isinstance(data_to_write, (tuple, set)):
for item in list(data_to_write):
item = item.strip()
log.write(str(item) + "\n")
else:
log.write(data_to_write + "\n")
logger.info(set_color(