Search code examples
pythonhtmlpython-3.xserverrequest

How can I send a request to an HTML file on my PC as if it were a real server using Python/Requests?


I've been trying making websites recently and I am trying to make a python code to check some vulnerabilities and bugs that might occur on the website.

Issue is that I currently don't have a domain and can't test it with a real server so I was wondering, in the meantime, if I could send "requests" to the index.html file as if it were a real server somehow.

Here is an image of what my directory looks like

Anything would be greatly appreciated, thanks!


Solution

  • You could just make a real web server on your pc. Using Flask, docker, etc.

    Then just point your python tests at that new web server.