diff --git a/common/utils.py b/common/utils.py index 38a14400..35a3228d 100644 --- a/common/utils.py +++ b/common/utils.py @@ -330,6 +330,8 @@ def export_all_results(path, name, fmt, datas): row_list.append(Record(keys, values)) rows = RecordCollection(iter(row_list)) content = rows.export(fmt) + if fmt == 'csv': + content = '\ufeff' + content save_to_file(path, content) diff --git a/export.py b/export.py index 62c34918..4000b554 100644 --- a/export.py +++ b/export.py @@ -60,6 +60,8 @@ def do_export(fmt, path, rows, show, domain, target): if show: print(rows.dataset) data = rows.export(fmt) + if fmt == 'csv': + data = '\ufeff' + data utils.save_to_file(path, data) logger.log('ALERT', f'The subdomain result for {domain}: {path}') data = rows.as_dict()