100 lines
5.9 KiB
HTML
100 lines
5.9 KiB
HTML
<!doctype html>
|
|
<head>
|
|
<style>
|
|
body{margin:0;padding-bottom:40px}footer,header,main,nav{display:block}@media print{*{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}p{orphans:3;widows:3}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{font-family:monospace;font-size:1em;line-height:1.6;color:#a5a5a5;background-color:#121212}a{text-decoration:none;color:#fff}h1,h4{font-weight:500;line-height:1.1;color:#fff;font-family:monospace}h1{margin-top:20px;margin-bottom:20px;font-size:2em}h4{margin-top:15px;margin-bottom:10px;padding-left:15px;font-size:18px}p{margin:0 0 10px}.text-center{text-align:center}ul{margin-top:0;margin-bottom:10px}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-8,.col-sm-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}@media (min-width:768px){.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-8,.col-sm-9{float:left}.col-sm-9{width:75%}.col-sm-8{width:60%}.col-sm-5{width:50%}.col-sm-4{width:40%}.col-sm-3{width:25%}}.list-group{padding-left:0;padding-bottom:15px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#1e1e1e}.panel{margin-bottom:20px;background-color:#1e1e1e;border-radius:4px;border-top:2px solid {{ color }};box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.panel-heading{padding:10px 15px;border-top:2px solid {{ color }};box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}li.list-group-item{overflow:auto;padding-top:6px;padding-bottom:6px}header.page-header{text-align:center}@media(max-width:750px){div.col-sm-3{font-weight:700}}footer{position:fixed;height:40px;width:100%;text-align:center;left:0;right:0;bottom:0}
|
|
</style>
|
|
|
|
<title>{{ title }}</title>
|
|
</head>
|
|
<body>
|
|
<header class="page-header container">
|
|
<h1><a href="/">{{ title }}</a></h1>
|
|
</header>
|
|
<nav class="container"></nav>
|
|
<main class="container">
|
|
{% if head is defined %}
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h4>Connection</h4>
|
|
</div>
|
|
<ul class="list-group">
|
|
{% for key, value in head.items() %}
|
|
<li class="list-group-item">
|
|
<div class="col-sm-3">{{ key|replace("_", " ")|title() }}</div><div class="col-sm-9">{{ value }}</div>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
{% if not 'Error' in infos %}
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h4>Lookup</h4>
|
|
</div>
|
|
<ul class="list-group">
|
|
{% for key, value in infos.items() %}
|
|
<li class="list-group-item">
|
|
<div class="col-sm-3">{{ key|replace("_", " ")|title() }}</div><div class="col-sm-9">{{ value }}</div>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
<details>
|
|
<summary>Usage examples</summary>
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h4>API usage examples</h4>
|
|
</div>
|
|
{% if head is defined %}
|
|
<ul class="list-group">
|
|
<li class="list-group-item">
|
|
<div class="col-sm-4">curl {{ hostname }}</div><div class="col-sm-8">{{ ip }}</div>
|
|
</li>
|
|
{% for key, value in head.items() %}
|
|
<li class="list-group-item">
|
|
<div class="col-sm-4">curl {{ hostname }}/{{ key }}</div><div class="col-sm-8">{{ value }}</div>
|
|
</li>
|
|
{% endfor %}
|
|
<li class="list-group-item">
|
|
<div class="col-sm-4">curl {{ hostname }}/{{ head.port }}</div><div class="col-sm-8">Open/Closed</div>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<div class="col-sm-4">curl {{ hostname }}/json</div><div class="col-sm-8">{{ head }}{{ infos }}</div>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<div class="col-sm-4">curl {{ hostname }}/all</div><div class="col-sm-8">{{ head|to_yaml|safe }}{{ infos|to_yaml|safe }}</div>
|
|
</li>
|
|
</ul>
|
|
<div class="panel-heading">
|
|
<h4>API examples on IPs and hosts</h4>
|
|
</div>
|
|
{% endif %}
|
|
<ul class="list-group">
|
|
<li class="list-group-item">
|
|
<div class="col-sm-4">curl {{ hostname }}/{{ infos.domain if infos.domain is defined else infos.ip_address }}</div><div class="col-sm-8">{{ infos|to_yaml|safe }}</div>
|
|
</li>
|
|
{% for key, value in infos.items() %}
|
|
<li class="list-group-item">
|
|
<div class="col-sm-4">curl {{ hostname }}/{{ infos.domain if infos.domain is defined else infos.ip_address }}/{{ key }}</div><div class="col-sm-8">{{ value }}</div>
|
|
</li>
|
|
{% endfor %}
|
|
<li class="list-group-item">
|
|
<div class="col-sm-4">curl {{ hostname }}/443</div><div class="col-sm-8">Open/Closed</div>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<div class="col-sm-4">curl {{ hostname }}/json</div><div class="col-sm-8">{{ infos }}</div>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<div class="col-sm-4">curl {{ hostname }}/{{ infos.domain if infos.domain is defined else infos.hostname }}/ip</div><div class="col-sm-8">{{ infos.ip_address }}</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</details>
|
|
</main>
|
|
<footer class="container text-center">
|
|
<p><a target="_blank" href="https://git.rznet.fr/razian/geoipweb-py">{{ title }}</a> - code by <a target="_blank" href="https://tchv.fr/">Tom</a></p>
|
|
</footer>
|
|
|
|
</body>
|