Skip to content
This repository was archived by the owner on Aug 7, 2020. It is now read-only.

Conversation

@routeback
Copy link

Proposed fix for error: AttributeError: 'module' object has no attribute 'rand'

./ikeforce.py -e -w wordlists/groupnames.dic -s 1
[+]Program started in Enumeration Mode
[+]Checking for possible enumeration techniques
Traceback (most recent call last):
File "./ikeforce.py", line 379, in
iCookie = ikeneg.secRandom(8).encode('hex')
File "/root/scripts/ikeforce/ikeclient.py", line 46, in secRandom
randomBytes = OpenSSL.rand.bytes(bytes)
AttributeError: 'module' object has no attribute 'rand'

Proposed fix for error: AttributeError: 'module' object has no attribute 'rand'

./ikeforce.py <IP> -e -w wordlists/groupnames.dic -s 1
[+]Program started in Enumeration Mode
[+]Checking for possible enumeration techniques
Traceback (most recent call last):
  File "./ikeforce.py", line 379, in <module>
    iCookie = ikeneg.secRandom(8).encode('hex')
  File "/root/scripts/ikeforce/ikeclient.py", line 46, in secRandom
    randomBytes = OpenSSL.rand.bytes(bytes)
AttributeError: 'module' object has no attribute 'rand'
@DidierA
Copy link

DidierA commented Dec 19, 2018

as stated here, OpenSSL.rand() is obsolete and should be replaced by os.urandom(). This should be merged

@digininja
Copy link

Just came across this problem and implemented the same fix independently so can confirm that it is the right one and works.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants