Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- __description__ = 'Base64 string decoder for oledump.py'
- __author__ = 'James Habben'
- __version__ = '0.0.1'
- __date__ = '2015/01/30'
- import re
- import base64
- def Decode (input) :
- return base64.b64decode(input)
- class cBase64Decoder(cPluginParent):
- macroOnly = True
- name = 'Base64 decoder'
- def __init__(self, name, stream, options):
- self.streamname = name
- self.stream = stream
- self.options = options
- self.ran = False
- def Analyze(self):
- self.ran = True
- result = []
- oREString = re.compile(r'"(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?"')
- for foundString in oREString.findall(self.stream):
- try:
- result.append(Decode(foundString))
- except:
- pass
- return result
- AddPlugin(cBase64Decoder)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement