some corrections, restyling, etc.
This commit is contained in:
parent
444f5664bb
commit
9d082e4264
@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import pickle
|
||||||
from flask import Flask, redirect, url_for, render_template, request, flash
|
from flask import Flask, redirect, url_for, render_template, request, flash
|
||||||
from .src import host_lookup
|
from .src import host_lookup
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
@ -38,7 +39,6 @@ def create_app(test_config=None):
|
|||||||
if request.method == "GET":
|
if request.method == "GET":
|
||||||
return render_template("lookup.html")
|
return render_template("lookup.html")
|
||||||
elif request.method == "POST" and any(request.form.get("host")):
|
elif request.method == "POST" and any(request.form.get("host")):
|
||||||
print(f'REQUEST.FORM.GET("HOST") IS {request.form.get("host")}')
|
|
||||||
user_input = escape(request.form.get("host").strip())
|
user_input = escape(request.form.get("host").strip())
|
||||||
hosts, errors = host_lookup.process_input(user_input)
|
hosts, errors = host_lookup.process_input(user_input)
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
@ -56,6 +56,7 @@ def create_app(test_config=None):
|
|||||||
errors_present=errors_present,
|
errors_present=errors_present,
|
||||||
results_present=results_present,
|
results_present=results_present,
|
||||||
)
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
flash("Nothing entered! Try again?", "error")
|
flash("Nothing entered! Try again?", "error")
|
||||||
return render_template("lookup.html")
|
return render_template("lookup.html")
|
||||||
|
@ -96,7 +96,7 @@ def determine(host):
|
|||||||
|
|
||||||
|
|
||||||
def online(host):
|
def online(host):
|
||||||
if host.startswith("http://", "https://"):
|
if host.startswith(("http://", "https://")):
|
||||||
try:
|
try:
|
||||||
requests.get(host)
|
requests.get(host)
|
||||||
return True
|
return True
|
||||||
|
@ -9,60 +9,34 @@ body {
|
|||||||
font-family: 'DM Mono', monospace;
|
font-family: 'DM Mono', monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no_bullets {
|
/* Already tried: https://dev.to/roccosangellino/how-to-build-a-simple-navbar-with-html-and-css-945 */
|
||||||
|
.navbar {}
|
||||||
|
|
||||||
|
.navbar ul {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #ffc100;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
.navbar li {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar li a {
|
||||||
|
display: block;
|
||||||
|
color: black;
|
||||||
|
text-align: center;
|
||||||
|
padding: 14px 16px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar {
|
.navbar li a:hover {
|
||||||
|
background-color: #eed519;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
background-color: #333333;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.navbar a {
|
|
||||||
color: #e7e7e7;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar ul {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
list-style-type: 0;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar .brand {
|
|
||||||
display: block;
|
|
||||||
color: #e7e7e7;
|
|
||||||
padding: 0 24px;
|
|
||||||
font-size: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar ul li a {
|
|
||||||
color: #e7e7e7;
|
|
||||||
padding: 24px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar ul a:hover,
|
|
||||||
.navbar ul a:focus {
|
|
||||||
background-color: #272727;
|
|
||||||
}
|
|
||||||
|
|
||||||
.headings {
|
|
||||||
color: #fdc105;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lookup_container {
|
.lookup_container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -196,9 +170,7 @@ a {
|
|||||||
display: grid;
|
display: grid;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
/* background-image: url(/static/background/cool-background-trianglify.png);*/
|
background-image: url(/static/background/cool-background-trianglify.png);*/
|
||||||
*/
|
|
||||||
/*
|
|
||||||
background-color: #ffc100;
|
background-color: #ffc100;
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
@ -350,7 +322,6 @@ a {
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#myTable {
|
#myTable {
|
||||||
/* background-color: #fad253; */
|
/* background-color: #fad253; */
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
|
@ -2,15 +2,13 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include "navbar.html" %}
|
|
||||||
|
|
||||||
<!-- {% include "forms.html" %} -->
|
|
||||||
|
|
||||||
{% include "test.html" %}
|
{% include "test.html" %}
|
||||||
|
|
||||||
<!-- {% include "howto.html" %} -->
|
|
||||||
|
|
||||||
{% include "empty_form.html" %}
|
{% include "empty_form.html" %}
|
||||||
|
|
||||||
|
{% include "results.html" %}
|
||||||
|
|
||||||
|
{% include "temp.html" %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
155
requirements.txt
155
requirements.txt
@ -1,32 +1,127 @@
|
|||||||
attrs==24.2.0
|
aiodns==3.3.0
|
||||||
blinker==1.8.2
|
aiohappyeyeballs==2.4.4
|
||||||
cattrs==24.1.0
|
aiohttp==3.10.11
|
||||||
certifi==2024.7.4
|
aiosignal==1.3.2
|
||||||
cffi==1.17.0
|
appdirs==1.4.4
|
||||||
charset-normalizer==3.3.2
|
attrs==25.1.0
|
||||||
checkdmarc==5.5.0
|
beautifulsoup4==4.13.4
|
||||||
click==8.1.7
|
blosc2==2.7.1
|
||||||
cryptography==43.0.0
|
Bottleneck==1.4.2
|
||||||
dnspython==2.0.0
|
Brotli==1.1.0
|
||||||
expiringdict==1.2.2
|
cached-property==2.0.1
|
||||||
Flask==3.0.3
|
cachetools==5.5.1
|
||||||
idna==3.8
|
cffi==1.17.1
|
||||||
ipwhois==1.2.0
|
chardet==5.2.0
|
||||||
itsdangerous==2.2.0
|
charset-normalizer==3.4.1
|
||||||
Jinja2==3.1.4
|
colorama==0.4.6
|
||||||
MarkupSafe==2.1.5
|
contourpy==1.3.2
|
||||||
|
cryptography==44.0.0
|
||||||
|
cycler==0.11.0
|
||||||
|
dbus-python==1.3.2
|
||||||
|
decorator==5.1.1
|
||||||
|
defusedxml==0.7.1
|
||||||
|
distlib==0.3.9
|
||||||
|
distro==1.9.0
|
||||||
|
dnf==4.23.0
|
||||||
|
dnslib==0.9.21
|
||||||
|
dpkt==1.9.8
|
||||||
|
et_xmlfile==1.1.0
|
||||||
|
filelock==3.15.4
|
||||||
|
fonttools==4.56.0
|
||||||
|
frozenlist==1.5.0
|
||||||
|
fs==2.4.16
|
||||||
|
fsspec==2025.3.2
|
||||||
|
gcsfs==2024.9.0
|
||||||
|
git-filter-repo==2.47.0
|
||||||
|
google-api-core==2.11.1
|
||||||
|
google-auth==2.38.0
|
||||||
|
google-auth-oauthlib==1.2.1
|
||||||
|
google-cloud-core==2.3.3
|
||||||
|
google-cloud-storage==2.14.0
|
||||||
|
google-crc32c==1.7.1
|
||||||
|
google-resumable-media==2.7.2
|
||||||
|
googleapis-common-protos==1.63.0
|
||||||
|
greenlet==3.1.1
|
||||||
|
grpcio==1.48.4
|
||||||
|
grpcio-status==1.48.4
|
||||||
|
h5py==3.12.1
|
||||||
|
html5lib==1.1
|
||||||
|
idna==3.10
|
||||||
|
importlib_metadata==8.6.1
|
||||||
|
jdcal==1.4.1
|
||||||
|
Jinja2==3.1.6
|
||||||
|
kiwisolver==1.4.8
|
||||||
|
libcomps==0.1.21
|
||||||
|
libdnf==0.74.0
|
||||||
|
lxml==5.3.2
|
||||||
|
MarkupSafe==3.0.2
|
||||||
|
matplotlib==3.10.3
|
||||||
|
msgpack==1.1.0
|
||||||
|
multidict==6.1.0
|
||||||
|
ndindex==1.9.2
|
||||||
|
neovim==0.3.1
|
||||||
|
numexpr==2.10.2
|
||||||
|
numpy==2.2.5
|
||||||
|
oauthlib==3.2.2
|
||||||
|
odfpy==1.4.1
|
||||||
|
olefile==0.47
|
||||||
|
openpyxl==3.1.2
|
||||||
|
packaging==24.2
|
||||||
|
pandas==2.2.3
|
||||||
|
pdfminer.six==20240706
|
||||||
|
pillow==11.1.0
|
||||||
platformdirs==4.2.2
|
platformdirs==4.2.2
|
||||||
publicsuffixlist==1.0.2.20240827
|
pluggy==1.5.0
|
||||||
pycparser==2.22
|
ply==3.11
|
||||||
pyleri==1.4.3
|
pooch==1.8.2
|
||||||
python-dateutil==2.9.0.post0
|
protobuf==3.19.6
|
||||||
python-dotenv==1.0.1
|
psycopg2==2.9.9
|
||||||
python-whois==0.9.4
|
py-cpuinfo==9.0.0
|
||||||
|
pyarrow==18.0.0
|
||||||
|
pyasn1==0.6.1
|
||||||
|
pyasn1_modules==0.4.1
|
||||||
|
pycairo==1.25.1
|
||||||
|
pycares==4.8.0
|
||||||
|
pycparser==2.20
|
||||||
|
PyGObject==3.50.0
|
||||||
|
PyMySQL==1.1.1
|
||||||
|
pynvim==0.5.2
|
||||||
|
pyparsing==3.1.2
|
||||||
|
pypng==0.0.21
|
||||||
|
pyproject-api==1.9.0
|
||||||
|
PyQt5==5.15.11
|
||||||
|
PyQt5_sip==12.16.1
|
||||||
|
pyshp==2.3.1
|
||||||
|
PySocks==1.7.1
|
||||||
|
python-dateutil==2.8.2
|
||||||
|
pytz==2025.2
|
||||||
|
QtPy==2.4.2
|
||||||
requests==2.32.3
|
requests==2.32.3
|
||||||
requests-cache==1.2.1
|
requests-oauthlib==1.3.1
|
||||||
six==1.16.0
|
rpm==4.20.1
|
||||||
timeout-decorator==0.5.0
|
rsa==4.9
|
||||||
url-normalize==1.4.3
|
scipy==1.14.1
|
||||||
urllib3==2.2.2
|
setuptools==74.1.3
|
||||||
validators==0.33.0
|
six==1.17.0
|
||||||
Werkzeug==3.0.4
|
soupsieve==2.7
|
||||||
|
SQLAlchemy==2.0.40
|
||||||
|
systemd-python==235
|
||||||
|
tables==3.10.1
|
||||||
|
tabulate==0.9.0
|
||||||
|
tasklib==2.5.1
|
||||||
|
tox==4.25.0
|
||||||
|
typing_extensions==4.12.2
|
||||||
|
urllib3==2.3.0
|
||||||
|
urwid==2.6.16
|
||||||
|
virtualenv==20.29.1
|
||||||
|
visidata==3.1.1
|
||||||
|
vit==2.3.3
|
||||||
|
vobject==0.9.8
|
||||||
|
wcwidth==0.2.13
|
||||||
|
webencodings==0.5.1
|
||||||
|
xarray==2025.1.1
|
||||||
|
xlrd==2.0.1
|
||||||
|
XlsxWriter==3.2.3
|
||||||
|
yarl==1.13.1
|
||||||
|
zipp==3.21.0
|
||||||
|
zstandard==0.23.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user