2017-07-23 19:56:51 +02:00
{% extends "main.html" %}
2022-01-14 15:58:06 +01:00
{% from 'bootstrap5/utils.html' import render_messages %}
2020-11-03 16:32:04 +01:00
{% block title %}Capture{% endblock %}
2017-07-23 19:56:51 +02:00
2021-01-18 13:03:10 +01:00
{% block card %}
< meta property = "og:title" content = "Lookyloo" / >
< meta property = "og:type" content = "website" / >
< meta
property="og:description"
content="Lookyloo captures websites and let you investigate them."
/>
< meta
property="og:image"
2021-01-18 16:57:27 +01:00
content="https://{{public_domain}}{{ url_for('static', filename='lookyloo.jpeg') }}"
2021-01-18 13:03:10 +01:00
/>
< meta
property="og:url"
2021-01-18 16:57:27 +01:00
content="https://{{public_domain}}"
2021-01-18 13:03:10 +01:00
/>
< meta name = "twitter:card" content = "summary_large_image" >
{% endblock %}
2017-07-23 19:56:51 +02:00
{% block content %}
< div class = "container" >
2019-06-28 11:59:34 +02:00
< center >
2020-11-03 17:16:37 +01:00
< a href = "{{ url_for('index') }}" title = "Go back to index" >
< img src = "{{ url_for('static', filename='lookyloo.jpeg') }}"
2022-03-31 16:21:00 +02:00
alt="Lookyloo" width="25%">
2020-11-03 17:16:37 +01:00
< / a >
2019-06-28 11:59:34 +02:00
< / center >
2021-04-08 19:15:53 +02:00
{{ render_messages(container=True, dismissible=True) }}
2020-11-03 16:32:04 +01:00
< form role = "form" action = "{{ url_for('capture_web') }}" method = post enctype = multipart/form-data >
2022-01-14 15:58:06 +01:00
< div class = "row mb-3" >
2020-05-22 17:36:22 +02:00
< div class = "col-sm-10" >
< div class = "form-check" >
2022-01-14 15:58:06 +01:00
< input class = "form-check-input" type = "checkbox" name = "listing" { % if default_public % } checked = "true" { % endif % } > < / input >
2020-05-22 17:36:22 +02:00
< label for = "listing" class = "form-check-label" > Display results on public page< / label >
< / div >
< / div >
< / div >
2022-03-31 00:48:58 +02:00
< div class = "row input-group mb-3" >
2022-03-30 12:32:20 +02:00
< label for = "url" class = "col-sm-1 col-form-label" > URL:< / label >
2022-03-31 00:48:58 +02:00
< input type = "text" class = "form-control col-auto" name = "url" id = singleCaptureField
placeholder="URL to capture" value="{{predefined_url_to_capture}}" required>
< textarea class = "form-control col-auto d-none" placeholder = "URLs to capture, one per line"
name="urls" id=multipleCapturesField>< / textarea >
< span class = "col-sm-2 input-group-text" >
< div class = "form-check" >
< input class = "form-check-input" name = "multipleCaptures" id = "multipleCaptures" type = "checkbox"
value="" aria-label="tick to enable multiple captures">
< label for = "multipleCaptures" class = "form-check-label" > Multiple captures< / label >
< / div >
< / span >
2021-10-26 19:31:42 +02:00
< / div >
2019-06-27 17:47:21 +02:00
2022-03-30 12:32:20 +02:00
< div >
< button class = "btn btn-link" type = "button" data-bs-toggle = "collapse" data-bs-target = "#collapseConfigBrowser"
aria-expanded="false" aria-controls="collapseConfigBrowser">
< p style = "margin-left: -12px; margin-top: 12px; font-size: x-large; color: black; text-decoration: underline; text-decoration-color: blue;" >
< b > Browser Configuration< / b >
< / p >
< / button >
< div class = "help-tip" title = "Lookyloo uses an emulated browser for all captures, click to configure the User-Agent" > < / div >
< / div >
< div id = "collapseConfigBrowser" class = "collapse d-xl-block" >
< div class = "card card-body" >
{% if personal_ua %}
< div class = "row mb-3" >
< div class = "col-sm-10" >
< div class = "form-check" >
< input class = "form-check-input" type = "checkbox" name = "personal_ua" > < / input >
< label for = "personal_ua" class = "form-check-label" > Use the current < a href = "https://en.wikipedia.org/wiki/User_agent" > user-agent< / a > of your own browser:< / br >
{{ personal_ua }}
< / label >
< / div >
2020-12-10 17:23:37 +01:00
< / div >
< / div >
2022-03-30 12:32:20 +02:00
< div class = "dropdown-divider" > < / div >
< div > < b > Or< / b > pick the user agent of your choice:< / div >
< / br >
{% endif %}
2020-12-10 17:23:37 +01:00
2022-03-30 12:32:20 +02:00
< div class = "row mb-3" >
< label for = "os" class = "col-sm-2 col-form-label" > Operating System:< / label >
< div class = "col-sm-10" >
< select class = "form-select" name = "os" id = "os" >
{% for os in user_agents.keys() %}
<!-- Select the default os -->
< option value = "{{ os }}" { % if os = =default['os'] % } selected { % endif % } > {{ os }}< / option >
{% endfor%}
< / select >
< / div >
2019-03-29 20:11:44 +01:00
< / div >
2019-06-28 11:59:34 +02:00
2022-03-30 12:32:20 +02:00
{% for os, browsers in user_agents.items() %}
<!-- Hide the browsers that aren't part of the default os -->
< div id = "{{os.replace(' ', '_')}}" class = "style-sub-1 row mb-3" { % if not os = =default['os'] % } style = "display: none;" { % endif % } >
< label for = "browser" class = "col-sm-2 col-form-label" > Browser Type:< / label >
< div class = "col-sm-10" >
<!-- Disable all the selects not related to the default os -->
< select class = "form-select" name = "browser" { % if not os = =default['os'] % } disabled { % endif % } >
{% for browser in browsers.keys()%}
<!-- Select the default browser -->
< option value = "{{ browser }}" { % if browser = =default['browser'] % } selected { % endif % } > {{ browser }}< / option >
2019-03-29 20:11:44 +01:00
{% endfor%}
2022-03-30 12:32:20 +02:00
< / select >
< / div >
2019-06-27 17:47:21 +02:00
< / div >
2022-03-30 12:32:20 +02:00
{% for browser, user_agents in browsers.items()%}
<!-- Hide the user agents that aren't part of the default OS and browsers that aren't part of the default os -->
< div id = "{{os.replace(' ', '_')}}_{{browser.replace(' ', '_')}}" class = "style-sub-2 row mb-3" { % if not os = =default['os'] or not browser = =default['browser']%} style = "display: none;" { % endif % } >
< label for = "user_agent" class = "col-sm-2 col-form-label" > User-Agent:< / label >
< div class = "col-sm-10" >
<!-- Disable all the selects, unless it is in default os and browser -->
< select class = "form-select" name = "user_agent" { % if not os = =default['os'] or not browser = =default['browser'] % } disabled { % endif % } >
{% for user_agent in user_agents %}
<!-- Select the default ua -->
< option value = "{{ user_agent }}" { % if user_agent = =default['useragent'] % } selected { % endif % } > {{ user_agent }}< / option >
{% endfor%}
< / select >
< / div >
< / div >
{% endfor%}
2019-06-28 11:59:34 +02:00
{% endfor%}
2022-03-30 12:32:20 +02:00
< div class = "dropdown-divider" > < / div >
< div > < b > Or< / b > type the user-agent of your choice:< / div >
< / br >
< div class = "row mb-3" >
< label for = "freetext_ua" class = "col-sm-2 col-form-label" > User-Agent:< / label >
< div class = "col-sm-10" >
< input type = "text" class = "form-control" name = "freetext_ua" id = "freetext_ua"
placeholder="String to use as a User-Agent for the capture">
< / div >
2021-11-26 01:36:01 +01:00
< / div >
< / div >
< / div >
2022-03-30 12:32:20 +02:00
< div class = "dropdown-divider" > < / div >
2021-11-26 01:36:01 +01:00
< div >
2022-01-14 15:58:06 +01:00
< button class = "btn btn-link" type = "button" data-bs-toggle = "collapse" data-bs-target = "#collapseConfigCapture" aria-expanded = "false" aria-controls = "collapseConfigCapture" >
2022-03-30 12:32:20 +02:00
< p style = "margin-left: -12px; margin-top: 12px; font-size: x-large; color: black; text-decoration: underline; text-decoration-color: blue;" >
< b > Capture Configuration< / b >
< / p >
2021-11-26 01:36:01 +01:00
< / button >
< div class = "help-tip" title = "Edit configuration options for the capture." > < / div >
< / div >
< div id = "collapseConfigCapture" class = "collapse" >
< div class = "card card-body" >
2022-01-14 15:58:06 +01:00
< div class = "row mb-3" >
2021-11-26 01:36:01 +01:00
< label for = "referer" class = "col-sm-2 col-form-label" > Referer:< / label >
< div class = "col-sm-10" >
< input type = "text" class = "form-control" name = "referer" id = referer placeholder = "Pass referer of the URL" >
< / div >
< / div >
2022-01-14 15:58:06 +01:00
< div class = "row mb-3" >
2021-11-26 01:36:01 +01:00
< label for = "headers" class = "col-sm-2 col-form-label" > Other HTTP headers:< / label >
< div class = "col-sm-10" >
< textarea class = "form-control" name = "headers" id = headers rows = 3 placeholder = "Accept-Language: en-US;q=0.5, fr-FR;q=0.4" > < / textarea >
< / div >
< / div >
2022-01-14 15:58:06 +01:00
< div class = "row mb-3" >
2021-11-26 01:36:01 +01:00
< label for = "proxy" class = "col-sm-2 col-form-label" > Proxy:< / label >
< div class = "col-sm-10" >
< input type = "text" class = "form-control" name = "proxy" id = "proxy" placeholder = "Expected format: [scheme]://[username]:[password]@[hostname]:[port]" >
< / div >
< / div >
2022-01-14 15:58:06 +01:00
< div class = "row mb-3" >
< label for = "cookies" class = "col-sm-6 col-form-label" > Cookies (JSON export from the Firefox plugin Cookie Quick Manager)< / label >
2021-11-26 01:36:01 +01:00
< div class = "col-sm-4" >
< input type = "file" class = "form-control-file" id = "cookies" name = "cookies" >
< / div >
< / div >
< / div >
2021-10-26 19:31:42 +02:00
< / div >
2021-11-26 01:36:01 +01:00
< div class = "dropdown-divider" > < / div >
2021-10-26 19:31:42 +02:00
< center >
< b >
{% if default_public %}
By default, the capture is public. If you do not want that, untick the box at the top of the form.
{% else %}
By default, the capture is private (not visible on the index page). If you want it to be public tick the box at the top of the form.
{% endif %}
< / b >
< / br >
< / br >
2022-03-18 10:48:09 +01:00
< button type = "submit" class = "new-capture-button btn-primary" id = "btn-looking" > Start looking!< / button >
2021-10-26 19:31:42 +02:00
< / center >
2019-06-28 11:59:34 +02:00
< / form >
2017-07-23 19:56:51 +02:00
< / div >
{% endblock %}
2019-03-29 20:11:44 +01:00
{% block scripts %}
2019-06-28 11:59:34 +02:00
{{ super() }}
2021-06-17 02:36:01 +02:00
< script src = '{{ url_for(' static ' , filename = 'capture.js' ) } } '
integrity="{{get_sri('static', 'capture.js')}}"
crossorigin="anonymous">< / script >
2022-03-31 00:48:58 +02:00
< script >
$('#multipleCaptures').on('click', function(e) {
if (document.getElementById('multipleCaptures').checked == true) {
document.getElementById('singleCaptureField').value = '';
$("#singleCaptureField").addClass("d-none");
$("#singleCaptureField").removeAttr("required");
$("#multipleCapturesField").removeClass("d-none");
$("#multipleCapturesField").attr("required", true);
}
else {
document.getElementById('multipleCapturesField').value = '';
$("#singleCaptureField").removeClass("d-none");
$("#singleCaptureField").attr("required", true);
$("#multipleCapturesField").addClass("d-none");
$("#multipleCapturesField").removeAttr("required");
}
})
< / script >
2019-03-29 20:11:44 +01:00
{% endblock %}