diff --git a/README.md b/README.md index 6579d4c..61f38e8 100644 --- a/README.md +++ b/README.md @@ -37,3 +37,30 @@ The [installation and configuration procedure](INSTALL.md) is documented. Pandora-box is an open source software distributed under [GPL](https://www.gnu.org/licenses/licenses.html). +# Troubleshooting + +Update Pandora + + poetry run update --yes + + +Check Pandora listening on port 6100 + + sudo lsof -i -P -n | grep LISTEN + +Result should contains + + ... + gunicorn: 1034 pandora 5u IPv4 27043 0t0 TCP *:6100 (LISTEN) + ... + +Test submit a file to Panra with command line + + poetry run pandora --url http://127.0.0.1:6100 -f + +Look a logs + + tail -500f /var/log/pandora_message.log + tail -500f /var/log/pandora_error.log + + diff --git a/install.sh b/install.sh index 34ee112..cc9a24a 100755 --- a/install.sh +++ b/install.sh @@ -93,6 +93,9 @@ chown $SUDO_USER .env su - $SUDO_USER -c "cd ~/pandora; poetry install" su - $SUDO_USER -c "cd ~/pandora; cp config/generic.json.sample config/generic.json" +# Copy default config file +cp ~/pandora/config/logging.json.sample ~/pandora/config/logging.json + # install yara-python su - $SUDO_USER -c "pip install yara-python" @@ -115,6 +118,14 @@ dpkg --ignore-depends=libssl0.9.8 -i cav-linux_x64.deb wget http://cdn.download.comodo.com/av/updates58/sigs/bases/bases.cav -O /opt/COMODO/scanners/bases.cav # Configure workers +# su - $SUDO_USER -c 'cd pandora; for file in pandora/workers/*.sample; do cp -i ${file} ${file%%.sample}; done' +# disable all workers +su - $SUDO_USER -c 'cd pandora; mkdir pandora/workers/disabled; mv pandora/workers/* disabled' + +# disable all workers +su - $SUDO_USER -c 'cd pandora; cp pandora/workers/disable/base.* pandora/worker/clamav.* pandora/workers' + +# enabe selected workders su - $SUDO_USER -c 'cd pandora; for file in pandora/workers/*.sample; do cp -i ${file} ${file%%.sample}; done' # Update Pandora diff --git a/pandora-box.py b/pandora-box.py index 0856ff1..8767f98 100755 --- a/pandora-box.py +++ b/pandora-box.py @@ -394,7 +394,7 @@ class PandoraBox: if file_size > (1024*1024*1024): status = "TOO BIG" else: - self._log(f'scan="{full_path}]"') + self._log(f'scan=[{full_path}]') res = pandora.submit_from_disk(full_path) time.sleep(0.1) loop = 0 @@ -422,8 +422,8 @@ class PandoraBox: os.mkdir(qfolder) shutil.copyfile(full_path, os.path.join(qfolder,file)) except Exception as ex : - self._log(f"Unexpected error: {ex}") - self._log("Scan failed !") + self._log(f"Unexpected error: {str(ex)}") + logging.info("An exception was thrown!", exc_info=True) return "ERROR" self._update_bar(100) self._log(