removed trailing whitespaces

pull/302/head
Sascha Rommelfangen 3 years ago
parent 722ec88b45
commit fc339c888d
  1. 2
      misp_modules/modules/expansion/docx-enrich.py
  2. 4
      misp_modules/modules/expansion/ods-enrich.py
  3. 2
      misp_modules/modules/expansion/odt-enrich.py
  4. 2
      misp_modules/modules/expansion/pdf-enrich.py
  5. 2
      misp_modules/modules/expansion/pptx-enrich.py
  6. 6
      misp_modules/modules/expansion/xlsx-enrich.py

@ -28,7 +28,7 @@ def handler(q=False):
print(err)
return misperrors
doc_content = ""
doc_content = ""
doc_file = io.BytesIO(docx_array)
try:
doc = docx.Document(doc_file)

@ -29,14 +29,14 @@ def handler(q=False):
print(err)
return misperrors
ods_content = ""
ods_content = ""
ods_file = io.BytesIO(ods_array)
doc = ezodf.opendoc(ods_file)
num_sheets = len(doc.sheets)
try:
for i in range(0, num_sheets):
ods = pandas_ods_reader.read_ods(ods_file, i, headers=False)
ods_content = ods_content + "\n" + ods.to_string(max_rows=None)
ods_content = ods_content + "\n" + ods.to_string(max_rows=None)
print(ods_content)
return {'results': [{'types': ['freetext'], 'values': ods_content, 'comment': ".ods-to-text from file " + filename},
{'types': ['text'], 'values': ods_content, 'comment': ".ods-to-text from file " + filename}]}

@ -28,7 +28,7 @@ def handler(q=False):
print(err)
return misperrors
odt_content = ""
odt_content = ""
odt_file = io.BytesIO(odt_array)
try:
odt_content = odtToText(odt_file)

@ -2,7 +2,7 @@ import json
import binascii
import np
import pytesseract
import pdftotext
import pdftotext
import io
import collections

@ -28,7 +28,7 @@ def handler(q=False):
print(err)
return misperrors
ppt_content = ""
ppt_content = ""
ppt_file = io.BytesIO(pptx_array)
try:
ppt = Presentation(ppt_file)

@ -1,7 +1,7 @@
import json
import binascii
import np
import pandas
import pandas
import io
misperrors = {'error': 'Error'}
@ -28,12 +28,12 @@ def handler(q=False):
print(err)
return misperrors
xls_content = ""
xls_content = ""
xls_file = io.BytesIO(xlsx_array)
pandas.set_option('display.max_colwidth', -1)
try:
xls = pandas.read_excel(xls_file)
xls_content = xls.to_string(max_rows=None)
xls_content = xls.to_string(max_rows=None)
print(xls_content)
return {'results': [{'types': ['freetext'], 'values': xls_content, 'comment': ".xlsx-to-text from file " + filename},
{'types': ['text'], 'values': xls_content, 'comment': ".xlsx-to-text from file " + filename}]}

Loading…
Cancel
Save