最简单粗暴的http文件列表
废话不说 直接看代码
import sys
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
Handler = SimpleHTTPRequestHandler
Server = BaseHTTPServer.HTTPServer
Protocol = "HTTP/1.0"
if sys.argv[1:]:
port = int(sys.argv[1])
else:
port = 8000
server_address = ('127.0.0.1', port)
Handler.protocol_version = Protocol
httpd = Server(server_address, Handler)
print("Serving HTTP")
httpd.serve_forever()
@@用法说明
http_show.py 1111
在C盘执行该脚本,将可以最快捷的方式进行监控和暴露某个目录给外部
user:Felix
mail:wudonghang@wudonghang.com
If you have questions or suggestions, please contact the author.