Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -217,17 +217,35 @@ def check_blacklist(url):
|
|
| 217 |
return 0
|
| 218 |
|
| 219 |
# ==========================================
|
| 220 |
-
# ๐ฃ๏ธ ROUTES
|
| 221 |
# ==========================================
|
| 222 |
@app.route('/')
|
| 223 |
-
def index():
|
|
|
|
| 224 |
|
| 225 |
@app.route('/url-checker')
|
| 226 |
-
def url_page():
|
|
|
|
| 227 |
|
| 228 |
@app.route('/phishing')
|
| 229 |
-
def phishing_page():
|
|
|
|
| 230 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 231 |
@app.route('/check_url', methods=['POST'])
|
| 232 |
def check_url():
|
| 233 |
if not url_legitimacy_model:
|
|
@@ -298,6 +316,5 @@ def route_score():
|
|
| 298 |
# ๐ ENVIRONMENT ENFORCED PORT BINDING
|
| 299 |
# ==========================================
|
| 300 |
if __name__ == '__main__':
|
| 301 |
-
# Free tiers pass an environment variable 'PORT'. If it doesn't exist, fall back to 5000.
|
| 302 |
port = int(os.environ.get("PORT", 5000))
|
| 303 |
app.run(host='0.0.0.0', port=port)
|
|
|
|
| 217 |
return 0
|
| 218 |
|
| 219 |
# ==========================================
|
| 220 |
+
# ๐ฃ๏ธ ROUTES (ALL NAVIGATION CORRECTIONS APPLIED)
|
| 221 |
# ==========================================
|
| 222 |
@app.route('/')
|
| 223 |
+
def index():
|
| 224 |
+
return render_template('Index.html')
|
| 225 |
|
| 226 |
@app.route('/url-checker')
|
| 227 |
+
def url_page():
|
| 228 |
+
return render_template('url-checker.html')
|
| 229 |
|
| 230 |
@app.route('/phishing')
|
| 231 |
+
def phishing_page():
|
| 232 |
+
return render_template('phishing.html')
|
| 233 |
|
| 234 |
+
@app.route('/password-checker')
|
| 235 |
+
def password_checker_page():
|
| 236 |
+
return render_template('password-checker.html')
|
| 237 |
+
|
| 238 |
+
@app.route('/hash')
|
| 239 |
+
def hash_page():
|
| 240 |
+
return render_template('hash.html')
|
| 241 |
+
|
| 242 |
+
@app.route('/analysis')
|
| 243 |
+
def analysis_page():
|
| 244 |
+
return render_template('Analysis.html')
|
| 245 |
+
|
| 246 |
+
# ==========================================
|
| 247 |
+
# ๐ API ENDPOINTS
|
| 248 |
+
# ==========================================
|
| 249 |
@app.route('/check_url', methods=['POST'])
|
| 250 |
def check_url():
|
| 251 |
if not url_legitimacy_model:
|
|
|
|
| 316 |
# ๐ ENVIRONMENT ENFORCED PORT BINDING
|
| 317 |
# ==========================================
|
| 318 |
if __name__ == '__main__':
|
|
|
|
| 319 |
port = int(os.environ.get("PORT", 5000))
|
| 320 |
app.run(host='0.0.0.0', port=port)
|