[TriLUG] Python syntax question

Brian Henning bhenning at pineinst.com
Tue Apr 8 14:29:25 EDT 2014


Hi Folks,

I know I could try a Python list, but I figured I'd start here, among friends.  Anyway, having heard of the heartbleed SSL vulnerability, I grabbed the PoC Python script (https://gist.github.com/takeshixx/10107280) to try to test my own servers.  Unfortunately, with Python 2.4, I'm getting a syntax error on this line:

pdat = ''.join((c if 32 <= ord(c) <= 126 else '.' )for c in lin)
                   ^

SyntaxError: invalid syntax

Unfortunately I don't know nearly enough about Python to understand the nature of this error or how to fix it.  Any help for this Python n00b would be greatly appreciated!

Thanks,
-Brian



More information about the TriLUG mailing list