Esempio n. 1
0
def data(page=1):

    filter_field = request.args.get('filter-field')
    filter_regex = request.args.get('filter-regex')

    blur_level = get_blur_level()

    return render_template('data.html', hosts=None, which_collection="crawl-data",
                           filter_field = filter_field, filter_regex = filter_regex, use_cc_data=False, blur_level=blur_level, img_height=StaticSettings().host_img_height, img_width=StaticSettings().host_img_width)
Esempio n. 2
0
def known_urls(host=None):

    urls = list(urls_handler(host, which_collection="known-data"))
    if request_wants_json():
        return Response(json.dumps(urls), mimetype="application/json")

    blur_level = get_blur_level()

    # change this
    return render_template("urls.html", urls=urls, use_known_data=True, blur_level=blur_level, img_height=StaticSettings().url_img_height, img_width=StaticSettings().url_img_width)
Esempio n. 3
0
def known_data(page=1):

    blur_level = get_blur_level()

    return render_template('data.html',
                           hosts=None,
                           use_known_data=True,
                           blur_level=blur_level,
                           img_height=StaticSettings().host_img_height,
                           img_width=StaticSettings().host_img_width)
Esempio n. 4
0
def known_urls(host=None):

    urls = list(urls_handler(host, which_collection="known-data"))
    if request_wants_json():
        return Response(json.dumps(urls), mimetype="application/json")

    blur_level = get_blur_level()

    # change this
    return render_template("urls.html",
                           urls=urls,
                           use_known_data=True,
                           blur_level=blur_level,
                           img_height=StaticSettings().url_img_height,
                           img_width=StaticSettings().url_img_width)
Esempio n. 5
0
def urls(host=None):

    urls = urls_handler(host)
    if request_wants_json():
        return Response(json.dumps(urls), mimetype="application/json")

    # !super hacky
    for url_dic in urls:
        screenshot_path = url_dic.get("screenshot_path")
        if screenshot_path:
            url_dic["screenshot_path"] = get_screenshot_relative_path(screenshot_path)
        url_dic["url_hash"] = str(hashlib.md5(url_dic["url"]).hexdigest())

    blur_level = get_blur_level()

    return render_template("urls.html", urls=urls, blur_level=blur_level, img_height=StaticSettings().url_img_height, img_width=StaticSettings().url_img_width)
Esempio n. 6
0
def data(page=1):

    filter_field = request.args.get('filter-field')
    filter_regex = request.args.get('filter-regex')

    blur_level = get_blur_level()

    return render_template('data.html',
                           hosts=None,
                           which_collection="crawl-data",
                           filter_field=filter_field,
                           filter_regex=filter_regex,
                           use_cc_data=False,
                           blur_level=blur_level,
                           img_height=StaticSettings().host_img_height,
                           img_width=StaticSettings().host_img_width)
Esempio n. 7
0
def urls(host=None):

    urls = urls_handler(host)
    if request_wants_json():
        return Response(json.dumps(urls), mimetype="application/json")

    # !super hacky
    for url_dic in urls:
        screenshot_path = url_dic.get("screenshot_path")
        if screenshot_path:
            url_dic["screenshot_path"] = get_screenshot_relative_path(
                screenshot_path)
        url_dic["url_hash"] = str(hashlib.md5(url_dic["url"]).hexdigest())

    blur_level = get_blur_level()

    return render_template("urls.html",
                           urls=urls,
                           blur_level=blur_level,
                           img_height=StaticSettings().url_img_height,
                           img_width=StaticSettings().url_img_width)
Esempio n. 8
0
def get_blur_page():
    blur_level = get_blur_level()
    return render_template('blur.html', blur_level=blur_level)
Esempio n. 9
0
def known_data(page=1):

    blur_level = get_blur_level()

    return render_template('data.html', hosts=None, use_known_data=True, blur_level=blur_level, img_height=StaticSettings().host_img_height, img_width=StaticSettings().host_img_width)
Esempio n. 10
0
def get_blur_page():
    blur_level = get_blur_level()
    return render_template('blur.html', blur_level=blur_level)