kbandla / pydeep Goto Github PK
View Code? Open in Web Editor NEWPython bindings for ssdeep
License: Other
Python bindings for ssdeep
License: Other
Antivirus systems are scanning and detecting the zeus binaries packaged with this codebase as threats and removing them. It would be better to package non-malicious examples to test with that are guaranteed not to trigger detection systems.
Hello,
I have installed the latest version of pydeep according https://github.com/kbandla/pydeep/blob/master/INSTALL to Debian 8 x64. I installed ssdeep 2.13 accoding this http://ssdeep.sourceforge.net/usage.html#install. When I run python setup.py test in pydeep installation process I get this error:
running test
Traceback (most recent call last):
File "test.py", line 7, in <module>
import pydeep
ImportError: libfuzzy.so.2: cannot open shared object file: No such file or directory
Can you help me please?
Thanks.
Hi, I have some trouble with installation on linux mint 17.
Console output:
pydeep.c: In function ‘pydeep_hash_buf’:
pydeep.c:52:15: warning: variable ‘inputStringBuffer’ set but not used [-Wunused-but-set-variable]
PyObject *inputStringBuffer = NULL;
^
creating build/lib.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/pydeep.o -lfuzzy -o build/lib.linux-x86_64-2.7/pydeep.so
/usr/bin/ld: //usr/local/lib/libfuzzy.a(fuzzy.o): relocation R_X86_64_32S against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC`
//usr/local/lib/libfuzzy.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up... Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pydeep/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ip4C7r-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pydeep
And pydeep does not have a stable release, not a release and not on pypi. The latest release 0.2 is from 2013, 4 years ago.
Current master supports Python3, the pypi release does not.
We want to use this library in other software and requiring a software without current releases and no support for python 3 is a show stopper.
Passing a pathlib object under python 3.7 fails with this exception:
>>> import pathlib
>>> a = pathlib.Path('/path/to/file')
>>> pydeep.hash_file(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: argument 1 must be str, not PosixPath
I looked at the code, but I'm not sure how to fix this.
Ubuntu Server 14.04
OS - Ubuntu 14.04 Server
Install SSDeep from source
thehermit@viper:~/viper$ ssdeep -V
2.11
thehermit@viper:~/viper$ sudo pip install pydeep
Downloading/unpacking pydeep
Downloading pydeep-0.2.tar.gz
Running setup.py (path:/tmp/pip_build_root/pydeep/setup.py) egg_info for package pydeep
Installing collected packages: pydeep
Running setup.py install for pydeep
building 'pydeep' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c pydeep.c -o build/temp.linux-x86_64-2.7/pydeep.o
pydeep.c: In function ‘pydeep_hash_buf’:
pydeep.c:52:15: warning: variable ‘inputStringBuffer’ set but not used [-Wunused-but-set-variable]
PyObject *inputStringBuffer = NULL;
^
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/pydeep.o -lfuzzy -o build/lib.linux-x86_64-2.7/pydeep.so
/usr/bin/ld: //usr/local/lib/libfuzzy.a(fuzzy.o): relocation R_X86_64_32S against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
//usr/local/lib/libfuzzy.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pydeep/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-g9iFHO-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'pydeep' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c pydeep.c -o build/temp.linux-x86_64-2.7/pydeep.o
pydeep.c: In function ‘pydeep_hash_buf’:
pydeep.c:52:15: warning: variable ‘inputStringBuffer’ set but not used [-Wunused-but-set-variable]
PyObject *inputStringBuffer = NULL;
^
creating build/lib.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/pydeep.o -lfuzzy -o build/lib.linux-x86_64-2.7/pydeep.so
/usr/bin/ld: //usr/local/lib/libfuzzy.a(fuzzy.o): relocation R_X86_64_32S against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
//usr/local/lib/libfuzzy.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pydeep/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-g9iFHO-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pydeep
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 185, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 26: ordinal not in range(128)
thehermit@viper:~/viper$
Install from GitHub
thehermit@viper:~/tmp_build/pydeep$ sudo python setup.py install
running install
running build
running build_ext
building 'pydeep' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c pydeep.c -o build/temp.linux-x86_64-2.7/pydeep.o
pydeep.c: In function ‘pydeep_hash_buf’:
pydeep.c:52:15: warning: variable ‘inputStringBuffer’ set but not used [-Wunused-but-set-variable]
PyObject *inputStringBuffer = NULL;
^
creating build/lib.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/pydeep.o -lfuzzy -o build/lib.linux-x86_64-2.7/pydeep.so
/usr/bin/ld: //usr/local/lib/libfuzzy.a(fuzzy.o): relocation R_X86_64_32S against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
//usr/local/lib/libfuzzy.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
import pydeep
Traceback (most recent call last):
File "", line 1, in
ImportError: dlopen(/usr/local/lib/python3.5/site-packages/pydeep.cpython-35m-darwin.so, 2): Symbol not found: _PyString_FromString
Referenced from: /usr/local/lib/python3.5/site-packages/pydeep.cpython-35m-darwin.so
Expected in: flat namespace
in /usr/local/lib/python3.5/site-packages/pydeep.cpython-35m-darwin.so
I'm on MacOS, using homebrew python 3.5 and pip3 installed pydeep.
it seems that it can't locate <fuzzy.h> file:
running install
running build
running build_ext
building 'pydeep' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pydeep.c -o build/temp.macosx-10.9-intel-2.7/pydeep.o
pydeep.c:2:10: error: 'fuzzy.h' file not found with include; use
"quotes" instead
^~~~~~~~~
"fuzzy.h"
1 error generated.
error: command 'cc' failed with exit status 1
on macOS 10.15.5, Python v3.8.2, pydeep v0.4 (installed via pip
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.