Earlier quoted context omitted.
what a great github repo. I enjoyed: # Strings that may occur on IRC clients that make security products freak out DCC SEND STARTKEYLOGGER 0 0 0 and everything under: # Innocuous strings which may be blocked by profanity filters (https://en.wikipedia.org/wiki/Scunthorpe_problem)
Found some GitHub issues [1] with something similar: an enterprise firewall blocking a repo because it contained the string "arglebargleglopglyf" [2] in some tests. The text was flagged as malicious because of its presence in the repo github.com/wireghoul/htshells [3]. However, the whole point of the word in the htshells repo is that it's an invalid command that breaks Apache, so it could have been almost any random…
"".__class__.__mro__[2].__subclasses__()[40]("/etc/passwd").read()
Looks to be a Python 2 specific way of trying to read a file in a sneaky way. I say Python 2 specific because Python 3 strings only have 2 supertypes now, so __mro__[2] is out of range, but __mro__[1] is 'object', and I'm guessing they were going for a file like class, but right now object.__subclasses__()[40] points at "mappingproxy".And the only subclasses of object I can find with a read classmethod are these:
109
110
Found with: for i, x in enumerate("".__class__.__mro__[1].__subclasses__()):
if "read" in dir(x):
print(str(i) + " " + str(x))