8000 Merge pull request #2466 from e-kwsm/python2 · AFLplusplus/AFLplusplus@af0d023 · GitHub
[go: up one dir, main page]

Skip to content

Commit af0d023

Browse files
Merge pull request #2466 from e-kwsm/python2
refactor!: drop python2
2 parents f9afbc8 + 0975c8d commit af0d023

File tree

12 files changed

+17
-29
lines changed

12 files changed

+17
-29
lines changed

GNUmakefile

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -255,17 +255,6 @@ ifeq "$(PYTHON_INCLUDE)" ""
255255
endif
256256
endif
257257

258-
# Old Ubuntu and others dont have python/python2-config so we hardcode 2.7
259-
ifeq "$(PYTHON_INCLUDE)" ""
260-
ifneq "$(shell command -v python2.7 2>/dev/null)" ""
261-
ifneq "$(shell command -v python2.7-config 2>/dev/null)" ""
262-
PYTHON_INCLUDE := $(shell python2.7-config --includes)
263-
PYTHON_LIB := $(shell python2.7-config --ldflags)
264-
PYTHON_VERSION := $(strip $(shell python2.7 --version 2>&1))
265-
endif
266-
endif
267-
endif
268-
269258
ifdef SOURCE_DATE_EPOCH
270259
BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d" 2>/dev/null || date -u "+%Y-%m-%d")
271260
else

custom_mutators/examples/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
These are example and helper files for the custom mutator feature.
44
See [docs/custom_mutators.md](../../docs/custom_mutators.md) for more information
55

6-
Note that if you compile with python3.7 you must use python3 scripts, and if
7-
you use python2.7 to compile python2 scripts!
6+
Note that if you compile with python3.7 you must use python3 scripts.
87

98
simple_example.c - most simplest example. generates a random sized buffer
109
filled with 'A'

custom_mutators/gramatron/build_gramatron_mutator.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if [ ! -f "../../src/afl-performance.o" ]; then
5656

5757
fi
5858

59-
PYTHONBIN=`command -v python3 || command -v python || command -v python2 || echo python3`
59+
PYTHONBIN=`command -v python3 || command -v python || echo python3`
6060
MAKECMD=make
6161
TARCMD=tar
6262

custom_mutators/grammar_mutator/build_grammar_mutator.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ if [ ! -f "../../config.h" ]; then
5252

5353
fi
5454

55-
PYTHONBIN=`command -v python3 || command -v python || command -v python2 || echo python3`
55+
PYTHONBIN=`command -v python3 || command -v python || echo python3`
5656
MAKECMD=make
5757
TARCMD=tar
5858

test/test-unicorn-mode.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ test -s ../unicorn_mode/unicornafl/build/libunicornafl.a && {
1010
export AFL_DEBUG_CHILD=1
1111

1212
# some python version should be available now
13-
PYTHONS="`command -v python3` `command -v python` `command -v python2`"
13+
PYTHONS="`command -v python3` `command -v python`"
1414
EASY_INSTALL_FOUND=0
1515
for PYTHON in $PYTHONS ; do
1616

unicorn_mode/build_unicorn_support.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ if [ ! -f "../afl-showmap" ]; then
6565

6666
fi
6767

68-
PYTHONBIN=`command -v python3 || command -v python || command -v python2 || echo python3`
68+
PYTHONBIN=`command -v python3 || command -v python || echo python3`
6969
MAKECMD=make
7070
TARCMD=tar
7171

@@ -116,7 +116,7 @@ for i in $PYTHONBIN automake autoconf git $MAKECMD $TARCMD; do
116116
done
117117

118118
# some python version should be available now
119-
PYTHONS="`command -v python3` `command -v python` `command -v python2`"
119+
PYTHONS="`command -v python3` `command -v python`"
120120
PIP_FOUND=0
121121
for PYTHON in $PYTHONS ; do
122122

utils/autodict_ql/autodict-ql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def ensure_dir(dir):
3333
def parse_args():
3434
parser = argparse.ArgumentParser(
3535
description=(
36-
"Helper - Specify input file analysis and output folder to save corpus for strings in the overall project --------------------------------------------------------------------------- Example usage : python2 thisfile.py outdir str.txt"
36+
"Helper - Specify input file analysis and output folder to save corpus for strings in the overall project --------------------------------------------------------------------------- Example usage : python3 thisfile.py outdir str.txt"
3737
)
3838
)
3939

utils/autodict_ql/litan.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
def parse_args():
1818
parser = argparse.ArgumentParser(
1919
description=(
20-
"Helper - Specify input file to analysis and output folder to save corpdirus for constants in the overall project ------- Example usage : python2 thisfile.py outdir o.txt"
20+
"Helper - Specify input file to analysis and output folder to save corpdirus for constants in the overall project ------- Example usage : python3 thisfile.py outdir o.txt"
2121
)
2222
)
2323
parser.add_argument(
2424
"corpdir", help="The path to the corpus directory to generate files."
2525
)
2626
parser.add_argument(
2727
"infile",
28-
help="Specify file output of codeql analysis - ex. ooo-hex.txt, analysis take place on this file, example : python2 thisfile.py outdir out.txt",
28+
help="Specify file output of codeql analysis - ex. ooo-hex.txt, analysis take place on this file, example : python3 thisfile.py outdir out.txt",
2929
)
3030
return parser.parse_args()
3131

utils/autodict_ql/memcmp-strings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ def ensure_dir(dir):
2525
def parse_args():
2626
parser = argparse.ArgumentParser(
2727
description=(
28-
"Helper - Specify input file analysis and output folder to save corpus for strings in the overall project --------------------------------------------------------------------------- Example usage : python2 thisfile.py outdir str.txt"
28+
"Helper - Specify input file analysis and output folder to save corpus for strings in the overall project --------------------------------------------------------------------------- Example usage : python3 thisfile.py outdir str.txt"
2929
)
3030
)
3131
parser.add_argument(
3232
"corpdir", help="The path to the corpus directory to generate strings."
3333
)
3434
parser.add_argument(
3535
"infile",
36-
help="Specify file output of codeql analysis - ex. ooo-atr.txt, analysis take place on this file, example : python2 thisfile.py outdir strings.txt",
36+
help="Specify file output of codeql analysis - ex. ooo-atr.txt, analysis take place on this file, example : python3 thisfile.py outdir strings.txt",
3737
)
3838

3939
return parser.parse_args()

utils/autodict_ql/stan-strings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ def ensure_dir(dir):
2525
def parse_args():
2626
parser = argparse.ArgumentParser(
2727
description=(
28-
"Helper - Specify input file analysis and output folder to save corpus for strings in the overall project --------------------------------------------------------------------------- Example usage : python2 thisfile.py outdir str.txt"
28+
"Helper - Specify input file analysis and output folder to save corpus for strings in the overall project --------------------------------------------------------------------------- Example usage : python3 thisfile.py outdir str.txt"
2929
)
3030
)
3131
parser.add_argument(
3232
"corpdir", help="The path to the corpus directory to generate strings."
3333
)
3434
parser.add_argument(
3535
"infile",
36-
help="Specify file output of codeql analysis - ex. ooo-atr.txt, analysis take place on this file, example : python2 thisfile.py outdir strings.txt",
36+
help="Specify file output of codeql analysis - ex. ooo-atr.txt, analysis take place on this file, example : python3 thisfile.py outdir strings.txt",
3737
)
3838

3939
return parser.parse_args()

0 commit comments

Comments
 (0)
0