Hello,
While run CLI.py , inserting data in Elasticsearch leads to the following error:
=================================
2022-01-24 14:42:19.110 | ERROR | Elastic:create_document:43 - Exception ocurred:
Traceback (most recent call last):
File "/home/xxxxxx/anaconda3/lib/python3.8/threading.py", line 890, in _bootstrap
self._bootstrap_inner()
│ └ <function Thread._bootstrap_inner at 0x7f0072ce8d30>
└ <Thread(Thread-52, started daemon 139638144382720)>
File "/home/xxxxxx/anaconda3/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
│ └ <function Thread.run at 0x7f0072ce8a60>
└ <Thread(Thread-52, started daemon 139638144382720)>
File "/home/xxxxx/anaconda3/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
│ │ │ │ │ └ {}
│ │ │ │ └ <Thread(Thread-52, started daemon 139638144382720)>
│ │ │ └ (<queue.Queue object at 0x7f0061375cd0>, <queue.Queue object at 0x7f0061375ee0>)
│ │ └ <Thread(Thread-52, started daemon 139638144382720)>
│ └ <bound method Scanner.job of <MainScanner.Scanner object at 0x7f0072ef3ca0>>
└ <Thread(Thread-52, started daemon 139638144382720)>
File "/home/xxxxx/Tools/pwndora-main/scanner/MainScanner.py", line 49, in job
create_document(ip,ports,banners,hostname,self.image,self.connection)
│ │ │ │ │ │ │ │ └ <Elasticsearch([{'host': 'localhost'}])>
│ │ │ │ │ │ │ └ <MainScanner.Scanner object at 0x7f0072ef3ca0>
│ │ │ │ │ │ └ None
│ │ │ │ │ └ <MainScanner.Scanner object at 0x7f0072ef3ca0>
│ │ │ │ └ 81.216.211.240.static-ip.oleane.fr'
│ │ │ └ ['HTTP/1.1 400 Bad Request\r\nContent-Type: text/html; charset=us-ascii\r\nServer: Microsoft-HTTPAPI/2.0\r\nDate: Mon, 24 Jan...
│ │ └ {'http': 80}
│ └ '81.216.211.240'
└ <function create_document at 0x7f0071ea8c10>
File "/home/xxxxx/Tools/pwndora-main/scanner/Elastic.py", line 41, in create_document
connection.index(index="devices", document=doc)
│ │ └ {'ip': '81.216.211.240', 'org': 'Orange', 'asn': 3215, 'banners': ['HTTP/1.1 400 Bad Request\r\nContent-Type: text/html; char...
│ └ <function Elasticsearch.index at 0x7f0061c4fd30>
└ <Elasticsearch([{'host': 'localhost'}])>
File "/home/xxxx/anaconda3/lib/python3.8/site-packages/elasticsearch/client/utils.py", line 153, in _wrapped
return func(*args, params=params, headers=headers, **kwargs)
│ │ │ │ └ {'index': 'devices', 'document': {'ip': '81.216.211.240', 'org': 'Orange', 'asn': 3215, 'banners': ['HTTP/1.1 400 Bad Request...
│ │ │ └ {}
│ │ └ {}
│ └ (<Elasticsearch([{'host': 'localhost'}])>,)
└ <function Elasticsearch.index at 0x7f0061c4fca0>
TypeError: index() got an unexpected keyword argument 'document'
=====================
Thanks for your help