Skip to content

Commit

Permalink
Modified WebServer port to 9797.
Browse files Browse the repository at this point in the history
Some users reported an same used port error, so i decided to change it to a lest used port.
  • Loading branch information
p1ngul1n0 committed Jul 25, 2022
1 parent 647dcca commit 764a700
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions webserver.py
@@ -1,9 +1,9 @@
import asyncio
from flask import Flask, render_template, request, jsonify
from flask import Flask, Response, render_template, request, jsonify, send_file
from flask_cors import CORS
from blackbird import findUsername
import logging
import os
import requests

app = Flask(__name__, static_folder='templates/static')
app.config['CORS_HEADERS'] = 'Content-Type'
Expand All @@ -25,4 +25,14 @@ def searchUsername():
return jsonify(results)


app.run('0.0.0.0')
@app.route('/image' ,methods=["GET"])
def getImage():
url = request.args.get('url')
try:
imageBinary = requests.get(url).content
return Response(imageBinary, mimetype='image/gif')
except:
return Response(status=500)


app.run(host='0.0.0.0', port=9797)

0 comments on commit 764a700

Please sign in to comment.