vendredi 23 avril 2021

Adding github database to a Django project

from django.http import HttpResponse from django.shortcuts import render import hashlib, bcrypt from urllib.request import urlopen, hashlib import time def main(request): return render(request,'main.html') def HashBrut(request): sha1hash = request.POST.get('decoder','default') LIST_OF_COMMON_PASSWORDS =str(urlopen('https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/Common-Credentials/10-million-password-list-top-10000.txt').read(), 'utf-8') time.sleep(5)

I am trying to access this"LIST_OF_COMMON_PASSWORDS" from github inside my django project. The python functions works fine in terminal but when i use it inside my views.py file in Django project and try to execute it on the web file, it gives 'A server error occurred. Please contact the administrator.' error. I am new to Django and i don't know what is going wrong.




Aucun commentaire:

Enregistrer un commentaire