阅读课程报告
此仓库引用了一个示例。
simple-client.py 是一个 Python 脚本,用于向命令行参数传入的 URL 发起 HTTP 请求。
simple-server.py 使用 Flask 构建一个简单的 HTTP 服务器,用于打印所收到请求的标头。
pip install virtualenvvirtualenv 创建两个 Python 环境。例如:
virtualenv -p [path_to_one_Python_version] venv-one-versionvirtualenv -p [path_to_the_other_Python_version] venv-the-other-versionflask。激活相应环境,然后执行 pip install flasksource ./venv-one-version/bin/activate 激活python simple-server.py 即可python simple-client.py http://127.0.0.1:8000/test-urlpython simple-client.py http://127.0.0.1%0d%0aX-injected:%20header%0d%0ax-leftover:%20:8000/test-url