Skip to content

Instantly share code, notes, and snippets.

@7snovic
Created December 24, 2016 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 7snovic/99402ed205e373e28b14cd698a70260a to your computer and use it in GitHub Desktop.
Save 7snovic/99402ed205e373e28b14cd698a70260a to your computer and use it in GitHub Desktop.
install ssdeep package for php 7
#!/usr/bin/bash
# installing ssdeep
wget http://downloads.sourceforge.net/project/ssdeep/ssdeep-2.13/ssdeep-2.13.tar.gz
tar zxvf ssdeep-2.13.tar.gz
cd ssdeep-2.13
./configure
make
sudo make install
ssdeep -h # test
#installing ssdeep_php
wget https://pecl.php.net/get/ssdeep-1.0.4.tgz
tar -zxvpf ssdeep-1.0.4.tgz
cd ssdeep-1.0.4/
# the most important line , you may manualy edit that file
sed -i -e 's/RETURN_STRING(hash, 0);/RETURN_STRING(hash);/g' ssdeep.c
phpize
./configure
make
sudo make install
sudo echo "extension=ssdeep.so" > /etc/php/7.0/mods-available/ssdeep.ini
phpenmod ssdeep
service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment