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-03-23 11:30:36 +00:00
|
|
|
ARGS=$(getopt 23 "$*" 2> /dev/null)
|
2020-03-14 09:33:30 +00:00
|
|
|
for arg in $ARGS
|
|
|
|
do
|
|
|
|
case $arg
|
|
|
|
in
|
|
|
|
-2) PYTHON=python2; shift;;
|
|
|
|
-3) PYTHON=python3; shift;;
|
2020-04-01 08:54:06 +00:00
|
|
|
--) PYTHON=python3; break;;
|
2020-03-14 09:33:30 +00:00
|
|
|
esac
|
|
|
|
done
|
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
|
|
|
|
PYTHONPATH=$DIR exec "$PYTHON" -m scapy "$@"
|