seemoo-lab / frankenstein

Broadcom and Cypress firmware emulation for fuzzing and further full-stack debugging
Apache License 2.0
437 stars 65 forks source link

Deprecated django.urls #13

Open Geobm opened 1 year ago

Geobm commented 1 year ago

Hi,

First of all thanks for the great project. I found some isues when runing with python3 so I had to modify the file /frankensteinWebUI/urls.py because url is deprecated (from django.conf.urls import url,include). I just modified as follows:

from django.urls import re_path,include
from django.conf.urls.static import static
from frankensteinWebUI import views
from django.conf import settings

urlpatterns = [
    re_path(r'^$', views.index, name='index'),
    re_path(r'^newProject$', views.newProject, name='newProject'),
    re_path(r'^project$', views.project, name='project'),
    re_path(r'^emulate$', views.emulate, name='emulate'),

    re_path(r'^getProjectCfg$', views.getProjectCfg, name='getProjectCfg'),
    re_path(r'^projectSanityCheck$', views.projectSanityCheck, name='getProjectCfg'),

    re_path(r'^editConfig$', views.editConfig, name='editConfig'),
    re_path(r'^editGroup$', views.editGroup, name='editGroup'),
    re_path(r'^editSegment$', views.editSegment, name='editSegment'),
    re_path(r'^editSymbol$', views.editSymbol, name='editSymbol'),

    re_path(r'^loadELF$', views.loadELF, name='loadELF'),
    re_path(r'^loadIdb$', views.loadIdb, name='loadIdb'),
    re_path(r'^loadSegment$', views.loadSegment, name='loadSegment'),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

Now with these modifications and after manually installing django and unicorn in python 3.8, any higher version should work correctly. Hope this helps if anyone found same issues like me when trying to use your repo :)