2008-09-12 12:02:13 +00:00
|
|
|
#! /bin/sh
|
2020-03-14 09:33:30 +00:00
|
|
|
DIR=$(dirname "$0")
|
|
|
|
if [ -z "$PYTHON" ]
|
|
|
|
then
|
2020-04-04 09:54:58 +00:00
|
|
|
ARGS=""
|
|
|
|
for arg in "$@"
|
2020-03-14 09:33:30 +00:00
|
|
|
do
|
|
|
|
case $arg
|
|
|
|
in
|
2020-04-04 09:54:58 +00:00
|
|
|
-2) PYTHON=python2;;
|
|
|
|
-3) PYTHON=python3;;
|
|
|
|
*) ARGS="$ARGS $arg";;
|
2020-03-14 09:33:30 +00:00
|
|
|
esac
|
|
|
|
done
|
2020-04-04 09:54:58 +00:00
|
|
|
PYTHON=${PYTHON:-python3}
|
2020-04-01 08:54:06 +00:00
|
|
|
fi
|
|
|
|
$PYTHON --version > /dev/null 2>&1
|
|
|
|
if [ ! $? -eq 0 ]
|
|
|
|
then
|
|
|
|
echo "WARNING: '$PYTHON' not found, using 'python' instead."
|
|
|
|
PYTHON=python
|
2020-03-14 09:33:30 +00:00
|
|
|
fi
|
2020-04-04 09:54:58 +00:00
|
|
|
PYTHONPATH=$DIR exec "$PYTHON" -m scapy $ARGS
|