mirror of https://github.com/secdev/scapy.git
Select the Python interpreter using -2, -3 and yolo
This commit is contained in:
parent
6768e464d0
commit
fea00d59a3
19
run_scapy
19
run_scapy
|
@ -1,4 +1,17 @@
|
|||
#! /bin/sh
|
||||
DIR=$(dirname $0)
|
||||
PYTHON=${PYTHON:-python3}
|
||||
PYTHONPATH=$DIR exec $PYTHON -m scapy $@
|
||||
DIR=$(dirname "$0")
|
||||
if [ -z "$PYTHON" ]
|
||||
then
|
||||
ARGS=$(getopt 23 "$*")
|
||||
for arg in $ARGS
|
||||
do
|
||||
case $arg
|
||||
in
|
||||
-2) PYTHON=python2; shift;;
|
||||
-3) PYTHON=python3; shift;;
|
||||
--) shift; break;;
|
||||
esac
|
||||
done
|
||||
PYTHON=${PYTHON:-python3}
|
||||
fi
|
||||
PYTHONPATH=$DIR exec "$PYTHON" -m scapy "$@"
|
||||
|
|
Loading…
Reference in New Issue