Python一行命令开启http server ipv4 & ipv6

python3 

  • python -m http.server

python2

  • python -m SimpleHTTPServer

python2 ipv6

  • python -c "import socket,SocketServer,CGIHTTPServer;SocketServer.TCPServer.address_family=socket.AF_INET6;CGIHTTPServer.test()" 8080
  • 使用方法:curl  'http://[ipv6-addr]:8080'

参考:https://www.jianshu.com/p/4d5af0615624

猜你喜欢

转载自blog.csdn.net/think_ycx/article/details/86601929