helpers.py 文件源码

python
阅读 57 收藏 0 点赞 0 评论 0

项目:featherduster 作者: nccgroup 项目源码 文件源码
def is_base64_encoded(sample):
   '''
   Check if a sample is likely base64-encoded

   sample - (string) The sample to evaluate
   '''
   base64chars = string.letters + string.digits + string.whitespace
   base64chars += '/+='
   # Turns out a lot of crazy things will b64-decode happily with
   # sample.decode('base64'). This is the fix.
   if any([char not in base64chars for char in sample]):
      return False
   try:
      sample.decode('base64')
      return True
   except:
      return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号