wargio / naxsi

NAXSI is an open-source, high performance, low rules maintenance WAF for NGINX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nxtool doesn't work correctly on Centos 7.9.2009

Bit-Warrior-X opened this issue · comments

Hi @wargio

Naxsi works correctly on my machine and I want to follow the next step for the use of nxtool.
I have successfully installed elasticsearch and kibana on my machine.

I was trying to run command
./nxtool.py -x --colors -c nxapi.json

But I have below error

Traceback (most recent call last):
  File "./nxtool.py", line 20, in <module>
    import elasticsearch
ImportError: No module named elasticsearch

So I installed elasticsearch module using below command.
pip3 install elasticsearch

It seems to install the module successfully, but the same error still occurs.
So I refer the link resolve python module elastic

Then use the below command:
export PYTHONPATH=/usr/local/lib/python3.6/site-packages

But below error occurs and I stopped working.

[root@nxapi]# ./nxtool.py -c nxapi.json --files=/var/log/nxtool.log
Traceback (most recent call last):
  File "./nxtool.py", line 20, in <module>
    import elasticsearch
  File "/usr/local/lib/python3.6/site-packages/elasticsearch/__init__.py", line 24, in <module>
    from elastic_transport import __version__ as _elastic_transport_version
  File "/usr/local/lib/python3.6/site-packages/elastic_transport/__init__.py", line 106
    def debug_logging() -> None:
                        ^
SyntaxError: invalid syntax

Can you please help me?

nxtool is under rewrite. the version you are using requires py2 and a very old version of elasticsearch. i don't have a timeline for when it will be available again.
I strongly suggest to not use it and instead just enable the json output and feed it to your own dashboard. you can parse this by just using logstack etc..

ok. thanks.