コード例 #1
0
def index():
    if request.method == 'HEAD':
        # Just returns ack if the webserver is running
        return 'Ack'
    if use_own_ua:
        lookyloo.build_ua_file()
    else:
        update_user_agents()
    return index_generic()
コード例 #2
0
ファイル: __init__.py プロジェクト: CrackerCat/lookyloo
def index():
    if request.method == 'HEAD':
        # Just returns ack if the webserver is running
        return 'Ack'
    lookyloo.cleanup_old_tmpfiles()
    update_user_agents()
    session.clear()
    titles = []
    for report_dir in lookyloo.report_dirs:
        cached = lookyloo.report_cache(report_dir)
        if not cached or 'no_index' in cached:
            continue
        titles.append((cached['uuid'], cached['title']))
    return render_template('index.html', titles=titles)
コード例 #3
0
def index():
    if request.method == 'HEAD':
        # Just returns ack if the webserver is running
        return 'Ack'
    lookyloo.cleanup_old_tmpfiles()
    update_user_agents()
    titles = []
    for capture_dir in lookyloo.capture_dirs:
        cached = lookyloo.capture_cache(capture_dir)
        if not cached or 'no_index' in cached or 'error' in cached:
            continue
        date, time = cached['timestamp'].split('T')
        time, _ = time.split('.', 1)
        titles.append(
            (cached['uuid'], cached['title'], date, time, cached['url'],
             cached['redirects'],
             True if cached['incomplete_redirects'] == '1' else False))
    titles = sorted(titles, key=lambda x: (x[2], x[3]), reverse=True)
    return render_template('index.html', titles=titles)
コード例 #4
0
ファイル: __init__.py プロジェクト: raulsoledispa/lookyloo
def index():
    if request.method == 'HEAD':
        # Just returns ack if the webserver is running
        return 'Ack'
    update_user_agents()
    return index_generic()