cb_injector.py 文件源码

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

项目:tools 作者: Introspelliam 项目源码 文件源码
def injection_test_results(response, TAG, randvcalc):
  if response == False:
    return False
  else:

    # Check the execution results
    html_data = response.read()
    html_data = html_data.replace("\n"," ")
    # cleanup string / unescape html to string
    html_data = urllib2.unquote(html_data).decode(settings.DEFAULT_CHARSET)
    html_data = HTMLParser.HTMLParser().unescape(html_data).encode(sys.getfilesystemencoding())

    # Replace non-ASCII characters with a single space
    re.sub(r"[^\x00-\x7f]",r" ", html_data)

    if settings.SKIP_CALC:
      shell = re.findall(r"" + TAG + TAG + TAG, html_data)
    else:
      shell = re.findall(r"" + TAG + str(randvcalc) + TAG  + TAG, html_data)
    if len(shell) > 1:
      shell = shell[0]
    return shell
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号