SpiderLabs / ikeforce

235 stars 72 forks source link

Updated ikeclient.py #11

Open routeback opened 6 years ago

routeback commented 6 years ago

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'

DidierA commented 5 years ago

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

digininja commented 5 years ago

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