mirror of https://github.com/MISP/misp-modules
Merge pull request #672 from ostefano/pandas2
Update pandas and pandas_ods_reader and patch ods_enrichpull/673/head v2.4.195
commit
4711dcb660
6
Pipfile
6
Pipfile
|
@ -54,8 +54,8 @@ ODTReader = { git = "https://github.com/cartertemm/ODTReader.git/" }
|
|||
python-pptx = "*"
|
||||
python-docx = "*"
|
||||
ezodf = "*"
|
||||
pandas = "==1.3.5"
|
||||
pandas_ods_reader = "==0.1.2"
|
||||
pandas = "*"
|
||||
pandas_ods_reader = "*"
|
||||
pdftotext = "*"
|
||||
lxml = "*"
|
||||
xlrd = "*"
|
||||
|
@ -77,7 +77,7 @@ crowdstrike-falconpy = "0.9.0"
|
|||
censys = "2.0.9"
|
||||
mwdblib = "3.4.1"
|
||||
ndjson = "0.3.1"
|
||||
Jinja2 = "3.1.2"
|
||||
Jinja2 = ">=3.1.2"
|
||||
mattermostdriver = "7.3.2"
|
||||
openpyxl = "*"
|
||||
slack-sdk = "3.27.1"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "e65233ce0d492bf51f1e90b5415bb5152f50b5f5c4e722a7a6d607afa71daa38"
|
||||
"sha256": "984b67b921f554bdb98d0d7470dd5888c8e951bb414030712996ffa26fcea10d"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
|
@ -205,7 +205,7 @@
|
|||
"sha256:ffda72c7b3172bf781660838d5f65a8babd9b083afd0aff862a7e335c90fb79a"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_full_version >= '3.6.2' and python_version < '4.0'",
|
||||
"markers": "python_version < '4.0' and python_full_version >= '3.6.2'",
|
||||
"version": "==2.0.9"
|
||||
},
|
||||
"certifi": {
|
||||
|
@ -762,7 +762,7 @@
|
|||
"sha256:929292d34f5872e70396626ef385ec22355a1fae8ad29e1a734c3e43f9fbc216",
|
||||
"sha256:bd2968309307861edae1458a4f8a4f3598c03be43b97521076aebf5d94c07b05"
|
||||
],
|
||||
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'",
|
||||
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
||||
"version": "==1.0.0"
|
||||
},
|
||||
"geoip2": {
|
||||
|
@ -832,12 +832,12 @@
|
|||
},
|
||||
"jinja2": {
|
||||
"hashes": [
|
||||
"sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852",
|
||||
"sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"
|
||||
"sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369",
|
||||
"sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==3.1.2"
|
||||
"version": "==3.1.4"
|
||||
},
|
||||
"json-log-formatter": {
|
||||
"hashes": [
|
||||
|
@ -1385,7 +1385,7 @@
|
|||
"sha256:08e06ca49ab00eabf0510bb52a7477c5000ae3000150d2dbe63555d770e39969",
|
||||
"sha256:ae16c4979eb30ea02c8d9f0a20eae2a80652f426937be5776e31063c821e3439"
|
||||
],
|
||||
"markers": "platform_python_implementation != 'PyPy' or (python_version >= '3' and platform_system != 'Windows' and platform_system != 'Darwin')",
|
||||
"markers": "python_version >= '3' and platform_python_implementation != 'PyPy' or (platform_system != 'Windows' and platform_system != 'Darwin')",
|
||||
"version": "==5.4.1"
|
||||
},
|
||||
"multidict": {
|
||||
|
@ -1609,43 +1609,48 @@
|
|||
},
|
||||
"pandas": {
|
||||
"hashes": [
|
||||
"sha256:1e4285f5de1012de20ca46b188ccf33521bff61ba5c5ebd78b4fb28e5416a9f1",
|
||||
"sha256:2651d75b9a167cc8cc572cf787ab512d16e316ae00ba81874b560586fa1325e0",
|
||||
"sha256:2c21778a688d3712d35710501f8001cdbf96eb70a7c587a3d5613573299fdca6",
|
||||
"sha256:32e1a26d5ade11b547721a72f9bfc4bd113396947606e00d5b4a5b79b3dcb006",
|
||||
"sha256:3345343206546545bc26a05b4602b6a24385b5ec7c75cb6059599e3d56831da2",
|
||||
"sha256:344295811e67f8200de2390093aeb3c8309f5648951b684d8db7eee7d1c81fb7",
|
||||
"sha256:37f06b59e5bc05711a518aa10beaec10942188dccb48918bb5ae602ccbc9f1a0",
|
||||
"sha256:552020bf83b7f9033b57cbae65589c01e7ef1544416122da0c79140c93288f56",
|
||||
"sha256:5cce0c6bbeb266b0e39e35176ee615ce3585233092f685b6a82362523e59e5b4",
|
||||
"sha256:5f261553a1e9c65b7a310302b9dbac31cf0049a51695c14ebe04e4bfd4a96f02",
|
||||
"sha256:60a8c055d58873ad81cae290d974d13dd479b82cbb975c3e1fa2cf1920715296",
|
||||
"sha256:62d5b5ce965bae78f12c1c0df0d387899dd4211ec0bdc52822373f13a3a022b9",
|
||||
"sha256:7d28a3c65463fd0d0ba8bbb7696b23073efee0510783340a44b08f5e96ffce0c",
|
||||
"sha256:8025750767e138320b15ca16d70d5cdc1886e8f9cc56652d89735c016cd8aea6",
|
||||
"sha256:8b6dbec5f3e6d5dc80dcfee250e0a2a652b3f28663492f7dab9a24416a48ac39",
|
||||
"sha256:a395692046fd8ce1edb4c6295c35184ae0c2bbe787ecbe384251da609e27edcb",
|
||||
"sha256:a62949c626dd0ef7de11de34b44c6475db76995c2064e2d99c6498c3dba7fe58",
|
||||
"sha256:aaf183a615ad790801fa3cf2fa450e5b6d23a54684fe386f7e3208f8b9bfbef6",
|
||||
"sha256:adfeb11be2d54f275142c8ba9bf67acee771b7186a5745249c7d5a06c670136b",
|
||||
"sha256:b6b87b2fb39e6383ca28e2829cddef1d9fc9e27e55ad91ca9c435572cdba51bf",
|
||||
"sha256:bd971a3f08b745a75a86c00b97f3007c2ea175951286cdda6abe543e687e5f2f",
|
||||
"sha256:c69406a2808ba6cf580c2255bcf260b3f214d2664a3a4197d0e640f573b46fd3",
|
||||
"sha256:d3bc49af96cd6285030a64779de5b3688633a07eb75c124b0747134a63f4c05f",
|
||||
"sha256:fd541ab09e1f80a2a1760032d665f6e032d8e44055d602d65eeea6e6e85498cb",
|
||||
"sha256:fe95bae4e2d579812865db2212bb733144e34d0c6785c0685329e5b60fcb85dd"
|
||||
"sha256:001910ad31abc7bf06f49dcc903755d2f7f3a9186c0c040b827e522e9cef0863",
|
||||
"sha256:0ca6377b8fca51815f382bd0b697a0814c8bda55115678cbc94c30aacbb6eff2",
|
||||
"sha256:0cace394b6ea70c01ca1595f839cf193df35d1575986e484ad35c4aeae7266c1",
|
||||
"sha256:1cb51fe389360f3b5a4d57dbd2848a5f033350336ca3b340d1c53a1fad33bcad",
|
||||
"sha256:2925720037f06e89af896c70bca73459d7e6a4be96f9de79e2d440bd499fe0db",
|
||||
"sha256:3e374f59e440d4ab45ca2fffde54b81ac3834cf5ae2cdfa69c90bc03bde04d76",
|
||||
"sha256:40ae1dffb3967a52203105a077415a86044a2bea011b5f321c6aa64b379a3f51",
|
||||
"sha256:43498c0bdb43d55cb162cdc8c06fac328ccb5d2eabe3cadeb3529ae6f0517c32",
|
||||
"sha256:4abfe0be0d7221be4f12552995e58723c7422c80a659da13ca382697de830c08",
|
||||
"sha256:58b84b91b0b9f4bafac2a0ac55002280c094dfc6402402332c0913a59654ab2b",
|
||||
"sha256:640cef9aa381b60e296db324337a554aeeb883ead99dc8f6c18e81a93942f5f4",
|
||||
"sha256:66b479b0bd07204e37583c191535505410daa8df638fd8e75ae1b383851fe921",
|
||||
"sha256:696039430f7a562b74fa45f540aca068ea85fa34c244d0deee539cb6d70aa288",
|
||||
"sha256:6d2123dc9ad6a814bcdea0f099885276b31b24f7edf40f6cdbc0912672e22eee",
|
||||
"sha256:8635c16bf3d99040fdf3ca3db669a7250ddf49c55dc4aa8fe0ae0fa8d6dcc1f0",
|
||||
"sha256:873d13d177501a28b2756375d59816c365e42ed8417b41665f346289adc68d24",
|
||||
"sha256:8e5a0b00e1e56a842f922e7fae8ae4077aee4af0acb5ae3622bd4b4c30aedf99",
|
||||
"sha256:8e90497254aacacbc4ea6ae5e7a8cd75629d6ad2b30025a4a8b09aa4faf55151",
|
||||
"sha256:9057e6aa78a584bc93a13f0a9bf7e753a5e9770a30b4d758b8d5f2a62a9433cd",
|
||||
"sha256:90c6fca2acf139569e74e8781709dccb6fe25940488755716d1d354d6bc58bce",
|
||||
"sha256:92fd6b027924a7e178ac202cfbe25e53368db90d56872d20ffae94b96c7acc57",
|
||||
"sha256:9dfde2a0ddef507a631dc9dc4af6a9489d5e2e740e226ad426a05cabfbd7c8ef",
|
||||
"sha256:9e79019aba43cb4fda9e4d983f8e88ca0373adbb697ae9c6c43093218de28b54",
|
||||
"sha256:a77e9d1c386196879aa5eb712e77461aaee433e54c68cf253053a73b7e49c33a",
|
||||
"sha256:c7adfc142dac335d8c1e0dcbd37eb8617eac386596eb9e1a1b77791cf2498238",
|
||||
"sha256:d187d355ecec3629624fccb01d104da7d7f391db0311145817525281e2804d23",
|
||||
"sha256:ddf818e4e6c7c6f4f7c8a12709696d193976b591cc7dc50588d3d1a6b5dc8772",
|
||||
"sha256:e9b79011ff7a0f4b1d6da6a61aa1aa604fb312d6647de5bad20013682d1429ce",
|
||||
"sha256:eee3a87076c0756de40b05c5e9a6069c035ba43e8dd71c379e68cab2c20f16ad"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_full_version >= '3.7.1'",
|
||||
"version": "==1.3.5"
|
||||
"markers": "python_version >= '3.9'",
|
||||
"version": "==2.2.2"
|
||||
},
|
||||
"pandas-ods-reader": {
|
||||
"hashes": [
|
||||
"sha256:9a1fc9fb1a9e719d9acb0c460a09fdb3b42a332b7c59ccdeac3237d58f04358f",
|
||||
"sha256:bea2dd630416cd73cbf6e3e8a6d5b291ae7780f3fa2989e5583df12620c3963f"
|
||||
"sha256:35a254ec95665fb654b573d7131787bf177e9126b06746ea3c17b1b972abc79b",
|
||||
"sha256:e87806d72bba31845de9f0dfa6c5621a5aa9b120cb84049544fee0e8baad8f9c"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.1.2"
|
||||
"markers": "python_version < '3.13' and python_version >= '3.9'",
|
||||
"version": "==1.0.1"
|
||||
},
|
||||
"passivetotal": {
|
||||
"hashes": [
|
||||
|
@ -1797,11 +1802,11 @@
|
|||
},
|
||||
"publicsuffixlist": {
|
||||
"hashes": [
|
||||
"sha256:79ab5c0f4a2a89556a717eaf0b7a5cfdf39e105cf718aed64ae7118be18e506c",
|
||||
"sha256:c31bd0cb7bc9f50d500c812b0aead6cb8fa53f7dfc66bdad5da730170d5b9c8e"
|
||||
"sha256:72ba8f60d8f750adfbbeebe4e330a233d96893dc7f369f04915d617339b41f3d",
|
||||
"sha256:77d2136231fabad93ad0db9761a9b215cb3fc43bac3d71d9d706c4a89e2cfceb"
|
||||
],
|
||||
"markers": "python_version >= '3.5'",
|
||||
"version": "==1.0.1.20240702"
|
||||
"version": "==1.0.2.20240719"
|
||||
},
|
||||
"pybgpranking": {
|
||||
"git": "https://github.com/D4-project/BGP-Ranking.git/",
|
||||
|
@ -1986,7 +1991,7 @@
|
|||
"sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1",
|
||||
"sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"
|
||||
],
|
||||
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'",
|
||||
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
||||
"version": "==2.4.7"
|
||||
},
|
||||
"pypdns": {
|
||||
|
@ -2035,7 +2040,7 @@
|
|||
"sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3",
|
||||
"sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'",
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
||||
"version": "==2.9.0.post0"
|
||||
},
|
||||
"python-docx": {
|
||||
|
@ -2415,16 +2420,16 @@
|
|||
"sha256:f481f16baec5290e45aebdc2a5168ebc6d35189ae6fea7a58787613a25f6e875",
|
||||
"sha256:fff3573c2db359f091e1589c3d7c5fc2f86f5bdb6f24252c2d8e539d4e45f412"
|
||||
],
|
||||
"markers": "platform_python_implementation == 'CPython' and python_version < '3.13'",
|
||||
"markers": "python_version < '3.13' and platform_python_implementation == 'CPython'",
|
||||
"version": "==0.2.8"
|
||||
},
|
||||
"setuptools": {
|
||||
"hashes": [
|
||||
"sha256:f171bab1dfbc86b132997f26a119f6056a57950d058587841a0082e8830f9dc5",
|
||||
"sha256:fe384da74336c398e0d956d1cae0669bc02eed936cdb1d49b57de1990dc11ffc"
|
||||
"sha256:3d8531791a27056f4a38cd3e54084d8b1c4228ff9cf3f2d7dd075ec99f9fd70d",
|
||||
"sha256:f501b6e6db709818dc76882582d9c516bf3b67b948864c5fa1d1624c09a49207"
|
||||
],
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==70.3.0"
|
||||
"version": "==71.0.3"
|
||||
},
|
||||
"shellingham": {
|
||||
"hashes": [
|
||||
|
@ -2568,7 +2573,7 @@
|
|||
"sha256:febffa5b1eda6622d44b245b0685aff6fb555ce0ed734e2d7b1c3acd018a2cff",
|
||||
"sha256:ff836cd4041e16003549449cc0a5e372f6b6f871eb89007ab0ee18fb2800fded"
|
||||
],
|
||||
"markers": "python_version >= '2.5' and python_version not in '3.0, 3.1, 3.2'",
|
||||
"markers": "python_version >= '2.5' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
||||
"version": "==3.19.2"
|
||||
},
|
||||
"six": {
|
||||
|
@ -2576,7 +2581,7 @@
|
|||
"sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926",
|
||||
"sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'",
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
||||
"version": "==1.16.0"
|
||||
},
|
||||
"slack-sdk": {
|
||||
|
@ -2732,6 +2737,14 @@
|
|||
"markers": "python_version >= '3.8'",
|
||||
"version": "==4.12.2"
|
||||
},
|
||||
"tzdata": {
|
||||
"hashes": [
|
||||
"sha256:2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd",
|
||||
"sha256:9068bc196136463f5245e51efda838afa15aaeca9903f49050dfa2679db4d252"
|
||||
],
|
||||
"markers": "python_version >= '2'",
|
||||
"version": "==2024.1"
|
||||
},
|
||||
"tzlocal": {
|
||||
"hashes": [
|
||||
"sha256:49816ef2fe65ea8ac19d19aa7a1ae0551c834303d5014c6d5a62e4cbda8047b8",
|
||||
|
@ -2788,12 +2801,12 @@
|
|||
},
|
||||
"vulners": {
|
||||
"hashes": [
|
||||
"sha256:094dbf340942fb5853a42cbf242c4e7bafd166492eaf8ad90bcdbd7c5f44de5c",
|
||||
"sha256:d7c2760f4ca136824c607780000953f7be39639b6416f52a2888e8686f91c759"
|
||||
"sha256:8b444eba2174dc7ce643fc1d52d9fc5583f97ac86785e15e7f1bfa3117c28e5c",
|
||||
"sha256:ffe8b79402ad4aeb64762fc3eeabfc82c0563ec8e2b79870c0e440618e1fe0e6"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==2.1.7"
|
||||
"version": "==2.2.0"
|
||||
},
|
||||
"wand": {
|
||||
"hashes": [
|
||||
|
|
|
@ -36,7 +36,9 @@ def handler(q=False):
|
|||
num_sheets = len(doc.sheets)
|
||||
try:
|
||||
for i in range(0, num_sheets):
|
||||
ods = pandas_ods_reader.algo.read_data(pandas_ods_reader.parsers.ods, ods_file, i, headers=False)
|
||||
rows = pandas_ods_reader.parsers.ods.get_rows(doc, i)
|
||||
ods = pandas_ods_reader.algo.parse_data(pandas_ods_reader.parsers.ods, rows, headers=False, columns=[], skiprows=0)
|
||||
ods = pandas_ods_reader.utils.sanitize_df(ods)
|
||||
ods_content = ods_content + "\n" + ods.to_string(max_rows=None)
|
||||
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}]}
|
||||
|
|
Loading…
Reference in New Issue