Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test.py SystemError #23

Closed
sr67 opened this issue Oct 9, 2017 · 5 comments
Closed

test.py SystemError #23

sr67 opened this issue Oct 9, 2017 · 5 comments

Comments

@sr67
Copy link

sr67 commented Oct 9, 2017

Running test.py with hc.benchmark = False results in error output below.
Running with hc.benchmark = True never exits. Stuck with several lines of incoming seqnr wraps around. Full output below.

Thanks.

pyhashcat version: VERSION: 2.0b2

$ python --version
Python 2.7.12
$ python ./test.py 
-------------------------------
---- Simple pyhashcat Test ----
-------------------------------
[!] Hashcat object init with id:  140282505598432
[!] cb_id cracked:  1001
[!] cb_id finished:  1002
[!] cb_id benchmark_status:  1003
[+] Running hashcat
140282505598432 EVENT_CRACKER_HASH_CRACKED
140282505598432 EVENT_CRACKER_FINISHED
HashType:  MD5
Device  0 :	4958708.71482
Device  1 :	4737036.60512
Device  2 :	5293956.73817
Device  3 :	4849355.66241
Traceback (most recent call last):
  File "./test.py", line 74, in <module>
    sleep(2)
SystemError: ../Python/getargs.c:1444: bad argument to internal function
$ python ./test.py 
-------------------------------
---- Simple pyhashcat Test ----
-------------------------------
[!] Hashcat object init with id:  139913512453600
[!] cb_id cracked:  1001
[!] cb_id finished:  1002
[!] cb_id benchmark_status:  1003
[!] Starting Benchmark Mode
[+] Running hashcat
 EVENT_CRACKER_FINISHED
HashType:  MD4
:evice  46791844.931
1 :ice  46414015.0428
46772277.6694	-
Device  3 :	45973634.76
139913512453600 EVENT_CRACKER_FINISHED
HashType:  MD5
Device  0 :	25868310.3016
Device  1 :	25510858.3593
Device  2 :	25720091.9822
Device  3 :	25299277.6898

<...snip...>

139913512453600 EVENT_CRACKER_FINISHED
HashType:  JKS Java Key Store Private Keys (SHA1)
Device  0 :	8209537.46407
Device  1 :	8139933.04546
Device  2 :	8213657.10369
Device  3 :	8077036.32381
EVENT_CRACKER_FINISHED
HashType:  Ethereum Wallet, PBKDF2-HMAC-SHA256
0 :ice  4.76240316915
Device  1 :	4.73325260293
 :vice  4.77918779341
Device  3 :	4.6979248746
-39913512453600 EVENT_CRACKER_FINISHED/
HashType:  ArubaOS
Device  0 :	6951549.02733
1 :ice  6865637.87776
Device  2 :	6919010.22765
Device  3 :	6796247.26566
139913512453600 EVENT_CRACKER_FINISHED
HashType:  ChaCha20
Device  0 :	4643312.29935
Device  1 :	4630241.20991
Device  2 :	4662345.1764
Device  3 :	4549198.33512
incoming seqnr wraps around
incoming seqnr wraps around
incoming seqnr wraps around
incoming seqnr wraps around
incoming seqnr wraps around
incoming seqnr wraps around
incoming seqnr wraps around
incoming seqnr wraps around
incoming seqnr wraps around
incoming seqnr wraps around
^CTraceback (most recent call last):
  File "./test.py", line 70, in <module>
    sys.stdout.flush()
KeyboardInterrupt


@Rich5
Copy link
Owner

Rich5 commented Oct 10, 2017

That error is interesting. I wonder if it's coming from python or hashcat or somewhere else?

Thanks for testing! I'll see if I can reproduce. Might take be next week before I can really dig into it though.

@Rich5
Copy link
Owner

Rich5 commented Oct 10, 2017

After a quick look I think the benchmark never ends because of this line

ChaCh20 is the last hash tested in benchmark mode so the benchmark is actually completing. My guess is in benchmark mode the status never reaches "Cracked" though. So I'll just have to figure out what signal gets sent when hashcat is finished and then exit the infinite loop. Triggering exit on signals is the correct way of cleanly exiting anyway.

@sr67
Copy link
Author

sr67 commented Oct 12, 2017

Thanks for having a look. Looking forward to integrating this into a project I'm working on.

Cheers

@tautology0
Copy link

It totally files to work on hashcat 3.6.0:

root@titan:~/pyhashcat/pyHashcat/pyhashcat# python ./test.py
-------------------------------
---- Simple pyhashcat Test ----
-------------------------------
[!] Hashcat object init with id:  139813775803872
[!] cb_id cracked:  1001
[!] cb_id finished:  1002
[!] cb_id benchmark_status:  1003
[+] Running hashcat
STATUS:  Initializing
Traceback (most recent call last):
  File "./test.py", line 94, in <module>
    sleep(5)
RuntimeError: ?l?l?l?l?l?l?l: No such file or directory

If I change the attack mode to 0, I get an even weirder error:

root@titan:~/pyhashcat/pyHashcat/pyhashcat# python
Python 2.7.13 (default, Jan 19 2017, 14:48:08)
[GCC 6.3.0 20170118] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyhashcat import Hashcat
>>> hc=Hashcat()
>>> hc.hash="8743b52063cd84097a65d1633f5c74f5"
>>> hc.attack_mode=0
>>> hc.dict1 = "/root/testme"
>>> hc.hash_mode=0
>>> hc.potfile_disable=True
>>> hc.outfile="/tmp/out"
>>> def cracked(result):
...     print result
...
>>> hc.event_connect(callback=cracked, signal="EVENT_CRACKER_HASH_CRACKED")
1001
>>> hc.hashcat_session_execute()
>>> hc.status_get_status_string()
RuntimeError: Invalid OpenCL platform 0 specified.

@Rich5
Copy link
Owner

Rich5 commented Dec 18, 2017

Invalid OpenCL is usually a platform issue not pyhashcat. Make sure you init the dependencies as specified in the hashcat build.md instructions first, then run hashcat normally. If hashcat works as usual then it's a pyhashcat issue.

Closing. Tracking OP issues in #25

@Rich5 Rich5 closed this as completed Dec 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants