Skip to content
Extraits de code Groupes Projets
Valider 2e87e452 rédigé par François De Keersmaeker's avatar François De Keersmaeker
Parcourir les fichiers

Updated CI

parent a86d81ea
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
#!/bin/bash
apt update
apt install -y python3-pip
pip3 install -r $GITHUB_WORKSPACE/requirements.txt
#!/bin/python3
# Imports
import os
import glob
import pcap_fuzzer
### MAIN ###
if __name__ == "__main__":
# Get paths
workspace_path = os.environ["GITHUB_WORKSPACE"]
traces_dir = os.path.join(workspace_path, "traces")
# Get all PCAP files
all_pcaps = glob.glob(f"{traces_dir}/*.pcap")
# Run PCAP fuzzer on all PCAP files
pcap_fuzzer.fuzz_pcaps(all_pcaps)
#!/bin/bash
EXITCODE=0
for pcap in $GITHUB_WORKSPACE/traces/*.pcap
do
# Run pcap_fuzzer script on pcap file
python3 $GITHUB_WORKSPACE/pcap_fuzzer/pcap_fuzzer.py $pcap
# If the exit code is not 0, set EXITCODE to 1
if [[ $? -ne 0 ]]
then
EXITCODE=1
fi
done
exit $EXITCODE
......@@ -15,6 +15,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y python3-pip
pip3 install -r $GITHUB_WORKSPACE/requirements.txt
pip3 install .
- name: Run script on all captures
run: $GITHUB_WORKSPACE/.ci_scripts/run-all-pcaps.sh
- name: Run fuzzer on all PCAP files
run: python3 $GITHUB_WORKSPACE/.ci_scripts/run-all-pcaps.py
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter