Closed friluk closed 5 years ago
What OS are you using? pyhashcat has only really been tested on Ubuntu and Debian. From a little searching this error seems to come up a lot on OSX.
Yes you are right, I'm working with Mac Os High Sierra 10.13.2. Do you have an idea how to solve this problem? I read something about that relative paths aren't allowed under Mac Os and that a symbolic link from the library (which couldn't be loaded) to the "/usr/local/lib/" directory would solve the problem, but I don't know where the library is located and so I couldn't solve the problem until now.
I tried to make an symbolic link from /usr/local/lib/libhashcat.so to /usr/lib/libhashcat.so, this was at first declined, because of the SIP protection of Mac Os. After I deactivated the SIP protection, I could create the symbolic link. With the symbolic link I don't get an error when I start the simple_mask.py, the output is the following:
$ python simple_mask.py
-------------------------------
---- Simple pyhashcat Test ----
-------------------------------
[!] Hashcat object init with id: 4512606808
[!] cb_id cracked: 1001
[!] cb_id finished: 1002
[!] cb_id any: 1003
[+] Writing to /Users/****/outfile.txt
[+] Running hashcat
ANY- 4512606808 Initializing
STATUS: Initializing
There still seem to be errors, do you have an idea?
It appears to have loaded correctly from what I can tell. I don't see any errors in the output you posted either. Did you let the script run a little while? It might take a some time to crack the test hash. I don't have a Mac to test this on so it's hard to troubleshoot. I'll see if I can get access to one next week some time and try it out
Sorry I made an mistake. It worked because of the deactivated SIP protection. After I activated it again, the error message is back.
Since SIP seems to be the problem you can try installing libhashcat in a non-protected location and then build the extension with that path instead.
cool thank you I will try that
I'm sorry, I'm clearly a noob :D , but do I have to just copy the libhashcat file to another location and after that edit the paths accordingly or do I have to completely rebuild / compile hashcat and pyhashcat?
You will definitely have to rebuild pyhashcat. I think you can just move libhashcat though. Not 100% but try moving it and then rebuilding the python extension with the new path.
Hi, when I wanted to tryout pyhashcat for the first time after the installation, i got this error message:
$ python simple_mask.py Traceback (most recent call last): File "simple_mask.py", line 6, in <module> from pyhashcat import Hashcat ImportError: dlopen(/Library/Python/2.7/site-packages/pyhashcat.so, 2): Library not loaded: libhashcat.so Referenced from: /Library/Python/2.7/site-packages/pyhashcat.so Reason: unsafe use of relative rpath libhashcat.so in /Library/Python/2.7/site-packages/pyhashcat.so with restricted binary
Can someone give me hint how to solve this?