Using Python to quickly build a local directory as a Http server
- Quick way to open CMD command in any folder in Windows system:
Method 1:
Press shift in the margin of the folder and right-click the mouse button.
Select 'Open Command Window Here'.
Win10: Select 'powershell',can also enter "start cmd"
Method 2:
Enter CMD to return in the path box on this folder
- Steps:
1.Install python, add installation directory to system environment variable PATH
2.Get the local IP address through the'ipconfig'command
3.Open CMD command in the HttpServer folder
4.Run the following command
python -m http.server 8010
# python 3.0
python -m SimpleHTTPServer 8010
# python 2.0
--> Serving HTTP on 0.0.0.0 port 8010 ...
5.Usage:
local:
http://localhost:8010/
webs:
http://192.168.8.112:8010/
# '192.168.8.112' is your IP,
# '8010':Customizable port number
相关文章
- 03-05WAF——针对Web应用发起的攻击,包括但不限于以下攻击类型:SQL注入、XSS跨站、Webshell上传、命令注入、非法HTTP协议请求、非授权文件访问等
- 03-05F5 Http profile 的 insert x-forward-for
- 03-05libcurl http post文件同时接收服务器响应文件
- 03-05http 下载类封装
- 03-05qt通过http请求下载文件(支持断点续传)
- 03-05spring cloud微服务启动报Cannot execute request on any known server 的解决办法
- 03-05Sourcetree 集成 Azure DevOps Server(Git)
- 03-05找不到方法:'System.Net.Http.HttpRequestMessage System.Web.Http.Controllers.HttpActionContext.get_Request()'
- 03-05Delphi 完全时尚手册之 Visual Style 篇 (界面不错) 转自http://blog.csdn.net/iseekcode/article/details/4733229
- 03-05HTTP响应状态码 含义