imperva / incapsula-logs-downloader

A Python script for downloading log files from Incapsula
MIT License
30 stars 35 forks source link

Improvement Suggestions #39

Closed delli007 closed 6 months ago

delli007 commented 2 years ago

I'm using this script on a prod system where I don't have root access so I can't install the crypto packages. I still got it to work, but during the process I would suggest the following updates are made to the script and documentation. Crypto can't be used without installing it as root, but this isn't needed for all configurations.

  1. Add 'configparser' to requirements.txt
  2. Update readme.md to use the python3 recommended way to install packages: python3 -m pip install -r requirements.txt
  3. Update readme.md to include pip user installation when root cannot be used: python3 -m pip install --user -r requirements.txt
  4. Don't quit the script when the crypto packages aren't found. This can be accomplished with the sample code below:

try: import M2Crypto except ModuleNotFoundError: print("WARNING: M2Crypto package is not available")

try: from Crypto.Cipher import AES except ModuleNotFoundError: print("WARNING: pycrypto package is not available")