PaloAltoNetworks / WireLurkerDetector

Script for detecting the WireLurker malware family
http://researchcenter.paloaltonetworks.com/2014/11/wirelurker-new-era-os-x-ios-malware/
ISC License
414 stars 73 forks source link

syntax error line 75 except Exception as e #17

Closed joncas closed 9 years ago

joncas commented 9 years ago

With Python 2.5.2 on OS-X 10.9.5 I had to change line 75 from except Exception as e: to except Exception, e:

otherwise it gives a syntax error.

secmobi commented 9 years ago

@joncas Got it and thanks. Could you try to "print str(e)" to take a look at what exception did you meet? I'm not sure whether the subprocess works well on 2.5.2.

joncas commented 9 years ago

Hello,

if I add the print statement, it doesn’t show anything:

$ python WireLurkerDetectorOSX.py WireLurker Detector (version 1.1.0) Copyright (c) 2014, Palo Alto Networks, Inc.

[+] Scanning for known malicious files ... [-] Nothing is found. [+] Scanning for known suspicious files ... [-] Nothing is found. [+] Scanning for infected applications ... (may take minutes) [-] Nothing is found. [+] Your OS X system isn't infected by the WireLurker. Thank you!

So I guess it doesn’t detect an exception but still complains about a syntax error when line 75 reads " except Exception, e:”

(I’m not familiar with Python, but I guess it checks the syntax even if the block isn’t called).

On Nov 7, 2014, at 8:22 , Claud Xiao notifications@github.com wrote:

@joncas Got it and thanks. Could you try to "print str(e)" to take a look at what exception did you meet? I'm not sure whether the subprocess works well on 2.5.2.

— Reply to this email directly or view it on GitHub.

secmobi commented 9 years ago

Got it. Fixed now. And thanks again!!!