(self, code)
return code
Bruteforce approach of regex-based deobfuscation.
Bruteforce approach of regex-based deobfuscation.
Bruteforce approach of regex - based deobfuscation .
def deobfuscate(self, code):
        """Bruteforce approach of regex-based deobfuscation."""
        changes = 1
        while changes:
            changes = 0

            for pattern, repl, flags in self.deobf:
                count = 1
                while count:
                    code, count = re.subn(pattern, repl, code, flags=flags)
                    changes += count

        return code
def deobfuscate ( self , code ) : changes = 1 while changes : changes = 0 for pattern , repl , flags in self . deobf : count = 1 while count : code , count = re . subn ( pattern , repl , code , flags = flags ) changes += count return code