mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-18 21:09:41 +02:00
fix satus error
This commit is contained in:
parent
c636c42961
commit
dd3d0596df
2 changed files with 24 additions and 6 deletions
13
install.sh
13
install.sh
|
@ -136,8 +136,17 @@ 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 Pandora workers
|
||||
cd /home/$SUDO_USER/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"
|
||||
su - $SUDO_USER -c "cd ~/pandora/pandora/workers; cp comodo.yml.sample comodo.yml"
|
||||
su - $SUDO_USER -c "cd ~/pandora/pandora/workers; cp base.yml.sample base.yml"
|
||||
su - $SUDO_USER -c "cd ~/pandora/pandora/workers; cp blocklists.yml.sample blocklists.yml"
|
||||
su - $SUDO_USER -c "cd ~/pandora/pandora/workers; cp hashlookup.yml.sample hashlookup.yml"
|
||||
su - $SUDO_USER -c "cd ~/pandora/pandora/workers; cp pdf.yml.sample pdf.yml"
|
||||
su - $SUDO_USER -c "cd ~/pandora/pandora/workers; cp xmldeobfuscator.yml.sample xmldeobfuscator.yml"
|
||||
su - $SUDO_USER -c "cd ~/pandora/pandora/workers; cp yara_signature_base.yml.sample yara_signature_base.yml"
|
||||
su - $SUDO_USER -c "cd ~/pandora/pandora/workers; cp yara_signature_base.yml.sample yara_signature_base.yml"
|
||||
su - $SUDO_USER -c "cd ~/pandora/pandora/workers; cp yarahq_full.yml.sample yarahq_full.yml"
|
||||
su - $SUDO_USER -c "cd ~/pandora/pandora/workers; cp yarahub.yml.sample yarahq_full.yml"
|
||||
|
||||
# remove some workers
|
||||
# rm pandora/workers/preview.yml
|
||||
|
|
|
@ -116,17 +116,26 @@ class scanThread(threading.Thread):
|
|||
status = "TOO BIG"
|
||||
else:
|
||||
res = self.pandora.submit_from_disk(file)
|
||||
if not 'taskId' in res :
|
||||
logging.error(f'task_status={res}')
|
||||
status = "ERROR"
|
||||
return
|
||||
|
||||
time.sleep(0.1)
|
||||
loop = 0
|
||||
|
||||
while loop < (1024 * 256):
|
||||
res = self.pandora.task_status(res["taskId"])
|
||||
logging.info(f'task_status={res}')
|
||||
|
||||
# Handle responde from Pandora
|
||||
status = res["status"]
|
||||
if status != "WAITING":
|
||||
break
|
||||
# Handle response from Pandora
|
||||
if 'status' in res :
|
||||
status = res['status']
|
||||
if status != "WAITING":
|
||||
break
|
||||
else :
|
||||
status = "ERROR"
|
||||
return
|
||||
|
||||
# wait a little
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue