From bc5fa4a4b99b02c22289e981050d70bf947a916f Mon Sep 17 00:00:00 2001 From: Frank Cass Date: Tue, 13 Mar 2018 18:33:58 -0400 Subject: [PATCH] Updated ikeclient.py 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' --- ikeclient.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ikeclient.py b/ikeclient.py index 2819a9d..b280e1c 100644 --- a/ikeclient.py +++ b/ikeclient.py @@ -6,6 +6,7 @@ #You should have received a copy of the GNU General Public License along with this program. If not, see . import socket,OpenSSL,sys,struct +import os try: import udp except: @@ -43,7 +44,7 @@ def __init__(self,debug): def secRandom(self, bytes): #Creates selected number of random bytes #Provide the number of bytes required as input, method will return raw bytes - randomBytes = OpenSSL.rand.bytes(bytes) + randomBytes = os.urandom(bytes) return randomBytes def payBuild(self, strPayload, lenLen, *arg):