summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Pipfile1
-rw-r--r--Pipfile.lock9
-rw-r--r--app.py25
3 files changed, 23 insertions, 12 deletions
diff --git a/Pipfile b/Pipfile
index 2944088..e4a5585 100644
--- a/Pipfile
+++ b/Pipfile
@@ -6,6 +6,7 @@ name = "pypi"
[packages]
flask = "*"
gunicorn = "*"
+termcolor = "*"
[dev-packages]
diff --git a/Pipfile.lock b/Pipfile.lock
index d7b735c..73c01d9 100644
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
- "sha256": "3399a1597190800988b814e49044a8eecf1df99db757596de1226c83d3e78d47"
+ "sha256": "49cf0d26d782b02727b340f36e22f90698a311150b11394bd8ac3efd74afd72a"
},
"pipfile-spec": 6,
"requires": {
@@ -59,6 +59,13 @@
],
"version": "==1.0"
},
+ "termcolor": {
+ "hashes": [
+ "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"
+ ],
+ "index": "pypi",
+ "version": "==1.1.0"
+ },
"werkzeug": {
"hashes": [
"sha256:c3fd7a7d41976d9f44db327260e263132466836cef6f91512889ed60ad26557c",
diff --git a/app.py b/app.py
index 6b406ea..e39ab24 100644
--- a/app.py
+++ b/app.py
@@ -1,5 +1,7 @@
from flask import Flask, request
from os import environ
+from termcolor import colored
+
from whois import whois
app = Flask(__name__)
@@ -7,17 +9,18 @@ app = Flask(__name__)
env = 'PROD' if 'PROD' in environ else 'DEV'
TEMPLATE = '''
-/----------------------------------------\\
-| {ip:39}|
-| |
-| {route:39}|
-| {origin:39}|
-| {descr:39}|
-| |
-| Created by Yuval Adam |
-| https://github.com/yuvadm/ipcli.app |
-| Comments welcome at hello@ipcli.app |
-\\----------------------------------------/
+/---------------------------------------------\\
+| {ip:44}|
+| |
+| {route:44}|
+| {origin:44}|
+| {descr:44}|
+| |
+|---------------------------------------------|
+| Created by Yuval Adam |
+| https://github.com/yuvadm/ipcli.app |
+| Comments welcome at hello@ipcli.app |
+\\---------------------------------------------/
'''
def get_ip(request):