diff --git a/README.md b/README.md index a26e866..0c7ec47 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,11 @@ With SafeUrl, you can get the following information: * [IpInfo](https://ipinfo.io/) free API is limited to 50,000 calls/moneh. ## Usage +In order to start working with SafeUrl, you need to register for free [VirusTotal)] (https://www.virustotal.com/gui/home/url) account and get a valid Free API Key. +[![SafeUrl Index Page](https://raw.githubusercontent.com/t0mer/SafeUrl/main/Images/SafeUrl%20-%20VirusTotal%20API.PNG?raw=true)](https://raw.githubusercontent.com/t0mer/SafeUrl/main/Images/SafeUrl%20-%20VirusTotal%20API.PNG?raw=true) + +Now, add the VirusTotal API key to the docker environment and you are ready to go. + ### Run from hub #### docker-compose from hub diff --git a/app/VERSION b/app/VERSION index 50aea0e..e3a4f19 100644 --- a/app/VERSION +++ b/app/VERSION @@ -1 +1 @@ -2.1.0 \ No newline at end of file +2.2.0 \ No newline at end of file diff --git a/app/app.py b/app/app.py index 6960356..3b281ed 100644 --- a/app/app.py +++ b/app/app.py @@ -137,8 +137,9 @@ def ipinfo(request: Request, url : str =""): @app.get("/") def home(request: Request): - logger.info("Loadin default page") - return templates.TemplateResponse('index.html', context={'request': request,'version':GetVersionFromFle()}) + vtotal_enabled = VT_API_KEY != "" + logger.info("Loading default page") + return templates.TemplateResponse('index.html', context={'request': request,'version':GetVersionFromFle(), 'vtotal_enabled':vtotal_enabled }) if __name__ == '__main__': diff --git a/app/dist/css/all.css b/app/dist/css/all.css index ea23712..c1b799c 100644 --- a/app/dist/css/all.css +++ b/app/dist/css/all.css @@ -6591,4 +6591,12 @@ h1 { Ok so you have made it this far, that means you are very keen to on my code. Anyway I don't really mind it. This is a great way to learn so you actually doing the right thing:) Follow me @ihatetomatoes -*/ \ No newline at end of file +*/ + + +#vtwarning +{ + width:80%; + margin: 0 auto 10px; + display: none; +} \ No newline at end of file diff --git a/app/dist/js/utils.js b/app/dist/js/utils.js index 8eebdfb..54f5ffe 100644 --- a/app/dist/js/utils.js +++ b/app/dist/js/utils.js @@ -1,9 +1,6 @@ $(document).ready(function() { - - - $("ul.nav-tabs a").click(function(e) { e.preventDefault(); $(this).tab('show'); diff --git a/app/templates/index.html b/app/templates/index.html index 5cc1737..1f08a26 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -9,12 +9,14 @@ + +
@@ -33,14 +35,19 @@
- + + VirusTotal API key is missing from environment, please supply a valid one. + + + + @@ -50,5 +57,16 @@ + +