-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathphantomfuzzer_cmd
More file actions
29 lines (25 loc) · 1.09 KB
/
phantomfuzzer_cmd
File metadata and controls
29 lines (25 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# PhantomFuzzer wrapper script
# This script forwards commands to the phantomfuzzer Docker container
# Suppress warnings
export PYTHONWARNINGS="ignore::DeprecationWarning,ignore::PendingDeprecationWarning"
export MPLCONFIGDIR="/tmp/matplotlib-config"
# Create temp directory for matplotlib if it doesn't exist
mkdir -p /tmp/matplotlib-config
# Handle volume mounts for current directory when needed
if [[ "$*" == *"--output"* ]] || [[ "$*" == *"--path"* ]] || [[ "$*" == *"--spec"* ]] || [[ "$*" == *"--target"* ]]; then
# Run with volume mounts
docker run --rm \
-v "$(pwd):/data/current" \
-v "$(pwd)/ascii.txt:/app/ascii.txt" \
-e PYTHONWARNINGS="ignore::DeprecationWarning,ignore::PendingDeprecationWarning" \
-e MPLCONFIGDIR="/tmp/matplotlib-config" \
phantomfuzzer "$@"
else
# Run without volume mounts
docker run --rm \
-v "$(pwd)/ascii.txt:/app/ascii.txt" \
-e PYTHONWARNINGS="ignore::DeprecationWarning,ignore::PendingDeprecationWarning" \
-e MPLCONFIGDIR="/tmp/matplotlib-config" \
phantomfuzzer "$@"
fi