cd $HOME # 创建目录 mkdir fuzzing_libexif && cd fuzzing_libexif/ sudo apt install build-essential
cd .. wget https://sourceforge.net/projects/libexif/files/libexif/0.6.18/libexif-0.6.18.tar.gz # 获取libexif tar -zxvf libexif-0.6.18.tar.gz
wget https://github.com/libexif/exif/archive/refs/tags/exif-0_6_15-release.tar.gz # 下载使用库接口的应用程序 tar -xzvf exif-0_6_15-release.tar.gz
cd libexif-0.6.18 # 编译libexif sudo apt-get install autopoint libtool gettext libpopt-dev autoreconf -fvi ./configure --enable-shared=no --prefix="/home/yhellow/fuzzing_libexif/install/" make make install
cd .. cd exif-exif-0_6_15-release/ autoreconf -fvi ./configure --enable-shared=no --prefix="/home/yhellow/fuzzing_libexif/tool/" PKG_CONFIG_PATH=$HOME/fuzzing_libexif/install/lib/pkgconfig make make install
➜ exif-exif-0_6_15-release $HOME/fuzzing_libexif/tool/bin/exif 用法: exif [OPTION...] file -v, --version Display software version -i, --ids Show IDs instead of tag names -t, --tag=tag Select tag --ifd=IFD Select IFD -l, --list-tags List all EXIF tags -|, --show-mnote Show contents of tag MakerNote --remove Remove tag or ifd -s, --show-description Show description of tag -e, --extract-thumbnail Extract thumbnail -r, --remove-thumbnail Remove thumbnail -n, --insert-thumbnail=FILE Insert FILE as thumbnail -o, --output=FILE Write data to FILE --set-value=STRING Value -m, --machine-readable Output in a machine-readable (tab delimited) format -x, --xml-output Output in a XML format -d, --debug Show debugging messages
EXIF tags in 'Nikon_D70.jpg' ('英特尔' byte order): --------------------+---------------------------------------------------------- Tag |Value --------------------+---------------------------------------------------------- Manufacturer |NIKON CORPORATION Model |NIKON D70 Orientation |top - left x-Resolution |240.00 y-Resolution |240.00 Resolution Unit |英寸 Software |GIMP 2.4.5 Date and Time |2008:07:3110:03:44 Compression |JPEG 压缩 x-Resolution |72.00 y-Resolution |72.00 Resolution Unit |英寸 Exposure Time |1/200 sec. FNumber |f/9.0 Exposure Program |手动 ISO Speed Ratings |200 Date andTime(origi|2008:03:1509:52:01 Shutter speed |7.64 EV (1/199 sec.) 光圈 |6.34 EV (f/9.0) 曝光偏差 |-1.00 EV Maximum Aperture Val|3.30 EV (f/3.1) 测距模式 |Center-Weighted Average 闪光灯 |未闪光 焦距 |100.0 mm 色彩空间 |sRGB PixelXDimension |100 PixelYDimension |66 Focal Length In 35mm|150 Exif Version |Exif版本2.1 FlashPixVersion |FlashPix版本 1.0 --------------------+---------------------------------------------------------- EXIF data contains a thumbnail (1700 bytes).
rm -r $HOME/fuzzing_libexif/install cd $HOME/libexif-0.6.18 # 使用afl-clang-lto编译器构建libexif make clean export LLVM_CONFIG="llvm-config-11" CC=afl-clang-lto ./configure --enable-shared=no --prefix="$HOME/fuzzing_libexif/install/" make make install
rm -r $HOME/fuzzing_libexif/tool cd $HOME/exif-exif-0_6_15-release # 使用afl-clang-lto编译器构建exif make clean export LLVM_CONFIG="llvm-config-11" CC=afl-clang-lto ./configure --enable-shared=no --prefix="$HOME/fuzzing_libexif/tool/" PKG_CONFIG_PATH=$HOME/fuzzing_libexif/install/lib/pkgconfig make make install
wget https://sourceforge.net/projects/libexif/files/libexif/0.6.14/libexif-0.6.14.tar.gz # 获取libexif tar -zxvf libexif-0.6.14.tar.gz
cd $HOME/libexif-0.6.14 # 使用afl-clang-lto编译器构建libexif export LLVM_CONFIG="llvm-config-11" CC=afl-clang-lto ./configure --enable-shared=no --prefix="$HOME/fuzzing_libexif/install2/" make make install
cd $HOME/exif-exif-0_6_15-release # 使用afl-clang-lto编译器构建exif make clean export LLVM_CONFIG="llvm-config-11" CC=afl-clang-lto ./configure --enable-shared=no --prefix="$HOME/fuzzing_libexif/tool2/" PKG_CONFIG_PATH=$HOME/fuzzing_libexif/install2/lib/pkgconfig make make install