1
0
Fork 0
mirror of https://github.com/dbarzin/pandora-box.git synced 2025-07-19 05:19:40 +02:00
This commit is contained in:
dbarzin 2023-02-13 22:10:34 +01:00
parent 4dc6ebd14f
commit 239d1e2199
2 changed files with 117 additions and 11 deletions

View file

@ -16,18 +16,25 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Pandora
- name: Install Pandora-box
run: |
echo "ip_address=$(curl -s ifconfig.me)" >> $GITHUB_ENV
sudo ./install.sh
- name: test
- name: Start Pandora-box
run: |
echo IP Adress is: ${{ env.ip_address }}
cd pandora-box && ./pandora-box.py
- name: Restart and wait on server
run: shutdown -r now
- name: Upload Screenshots
if: failure()
uses: actions/upload-artifact@v2
with:
name: screenshots
path: tests/Browser/screenshots
- name: Done
run: |
uptime && ls && echo "Done."
- name: Upload Console Logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: console
path: tests/Browser/console

View file

@ -19,10 +19,110 @@
set -e # stop on error
set -x # echo on
#================================
# Install script for Pandora-Box
#================================
cd /home/$SUDO_USER
# remove need restart
apt remove -y needrestart
#---------------------
# Python
#---------------------
apt update && apt upgrade -y
apt install -y python-is-python3 python3-pip
apt install -y libssl-dev
#---------------------
# Peotry
#---------------------
su - $SUDO_USER -c "curl -sSL https://install.python-poetry.org | python3 -"
su - $SUDO_USER -c "poetry --version"
#---------------------
# REDIS
#---------------------
apt install -y build-essential tcl
git clone https://github.com/redis/redis.git
cd redis
git checkout 6.2
make
# Optionally, you can run the tests:
# make test
cd ..
chown -R $SUDO_USER redis
#---------------------
# Kvrocks
#---------------------
apt-get update
apt install -y gcc g++ make libsnappy-dev autoconf automake libtool googletest libgtest-dev
git clone --recursive https://github.com/apache/incubator-kvrocks.git kvrocks
cd kvrocks
git checkout 2.0
make -j4
# Optionally, you can run the tests:
# make test
cd ..
chown -R $SUDO_USER kvrocks
#---------------------
# Pandora
#---------------------
su - $SUDO_USER -c "git clone https://github.com/pandora-analysis/pandora.git"
# install packages
apt install -y python3-dev # for compiling things
apt install -y libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0 # For HTML -> PDF
apt install -y libreoffice-base-nogui libreoffice-calc-nogui libreoffice-draw-nogui libreoffice-impress-nogui libreoffice-math-nogui libreoffice-writer-nogui # For Office -> PDF
apt install -y exiftool # for extracting exif information
apt install -y unrar # for extracting rar files
apt install -y libxml2-dev libxslt1-dev antiword unrtf poppler-utils pstotext tesseract-ocr flac ffmpeg lame libmad0 libsox-fmt-mp3 sox libjpeg-dev swig # for textract
# set .env
cd /home/$SUDO_USER/pandora
echo PANDORA_HOME="`pwd`" >> .env
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"
# install yara-python
su - $SUDO_USER -c "pip install yara-python"
# ClamAV
apt-get install -y clamav-daemon
# In order for the module to work, you need the signatures.
# Running the command "freshclam" will do it but if the script is already running
# (it is started by the systemd service clamav-freshclam)
# You might want to run the commands below:
systemctl stop clamav-freshclam.service # Stop the service
freshclam # Run the signatures update
systemctl start clamav-freshclam.service # Start the service so we keep getting the updates
service clamav-daemon start
# Comodo
wget https://download.comodo.com/cis/download/installs/linux/cav-linux_x64.deb
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'
# Update Pandora
su - $SUDO_USER -c 'cd pandora; poetry run update --yes'
#---------------------
# Pandora-box
#---------------------
pwd
# Python libraries
su - $SUDO_USER -c "pip install pypandora psutil pyudev"
@ -67,7 +167,6 @@ echo "StandardInput=tty" >> /etc/systemd/system/getty@tty1.service.d/override.co
echo "StandardOutput=tty" >> /etc/systemd/system/getty@tty1.service.d/override.conf
echo "Type=idle" >> /etc/systemd/system/getty@tty1.service.d/override.conf
# Copy ini file
cp pandora-box.ini.curses pandora-dox.ini