Beispiel #1
0
def API(request):
    # if post request came
    if request.method == 'POST':
        # getting values from post
        url = request.POST.get('url')
        print("URL = " + url)
        response = phishing_detection.resolve(url)
        return HttpResponse(response, status=200)
Beispiel #2
0
def getResult(request):
    if request.method == 'GET':
        return render(request, 'index.html')
    # if post request came
    if request.method == 'POST':
        # getting values from post
        url = request.POST.get('url')
        response = phishing_detection.resolve(url)
        print(response)
        return render(request, 'response.html', {"r": response})