1
0
Fork 0
mirror of https://github.com/dbarzin/pandora-box.git synced 2025-07-19 13:29:42 +02:00

fix some issues

This commit is contained in:
Didier Barzin 2023-02-19 14:21:54 +00:00
parent 65cd1313f4
commit 2346f4b2fa
3 changed files with 41 additions and 3 deletions

View file

@ -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). 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

View file

@ -93,6 +93,9 @@ chown $SUDO_USER .env
su - $SUDO_USER -c "cd ~/pandora; poetry install" su - $SUDO_USER -c "cd ~/pandora; poetry install"
su - $SUDO_USER -c "cd ~/pandora; cp config/generic.json.sample config/generic.json" 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 # install yara-python
su - $SUDO_USER -c "pip 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 wget http://cdn.download.comodo.com/av/updates58/sigs/bases/bases.cav -O /opt/COMODO/scanners/bases.cav
# Configure workers # 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' su - $SUDO_USER -c 'cd pandora; for file in pandora/workers/*.sample; do cp -i ${file} ${file%%.sample}; done'
# Update Pandora # Update Pandora

View file

@ -394,7 +394,7 @@ class PandoraBox:
if file_size > (1024*1024*1024): if file_size > (1024*1024*1024):
status = "TOO BIG" status = "TOO BIG"
else: else:
self._log(f'scan="{full_path}]"') self._log(f'scan=[{full_path}]')
res = pandora.submit_from_disk(full_path) res = pandora.submit_from_disk(full_path)
time.sleep(0.1) time.sleep(0.1)
loop = 0 loop = 0
@ -422,8 +422,8 @@ class PandoraBox:
os.mkdir(qfolder) os.mkdir(qfolder)
shutil.copyfile(full_path, os.path.join(qfolder,file)) shutil.copyfile(full_path, os.path.join(qfolder,file))
except Exception as ex : except Exception as ex :
self._log(f"Unexpected error: {ex}") self._log(f"Unexpected error: {str(ex)}")
self._log("Scan failed !") logging.info("An exception was thrown!", exc_info=True)
return "ERROR" return "ERROR"
self._update_bar(100) self._update_bar(100)
self._log( self._log(