废话不说 直接看代码
import sysimport BaseHTTPServerfrom SimpleHTTPServer import SimpleHTTPRequestHandlerHandler = SimpleHTTPRequestHandlerServer = BaseHTTPServer.HTTPServerProtocol = "HTTP/1.0"if sys.argv[1:]: port = int(sys.argv[1])else: port = 8000server_address = (‘127.0.0.1‘, port)Handler.protocol_version = Protocolhttpd = Server(server_address, Handler)print("Serving HTTP")httpd.serve_forever()
@@用法说明 http_show.py 1111 在C盘执行该脚本,将可以最快捷的方式进行监控和暴露某个目录给外部
时间: 2024-10-24 00:24:21