public void Initialize(LaunchStage stage) { foreach (var plugin in Plugins) { plugin.Initialize(stage); } }
public void Launch() { currentStage = stages.Count - 1; LaunchStage stageInst = stages[currentStage]; stageInst.BeginStage(); }
public bool Initialize(LaunchStage stage) { return(true); if (stage == LaunchStage.Startup) { const int size = 0x180c5f; _mappingHandle = Native.CreateFileMapping(-1, IntPtr.Zero, 0x04, 0, size, "EVE"); _logBase = Native.MapViewOfFile(_mappingHandle, 0x06, 0, 0, size); _eventC = Native.CreateEvent(IntPtr.Zero, true, false, "cEVE"); _eventD = Native.CreateEvent(IntPtr.Zero, true, false, "dEVE"); _mutexA = Native.CreateMutex(IntPtr.Zero, false, "aEVE"); _mutexB = Native.CreateMutex(IntPtr.Zero, false, "bEVE"); Charge(); _rawLog = new BinaryWriter(File.Create("messages.raw")); _readerThread = new Thread(Reader); _readerThread.IsBackground = true; _readerThread.Start(); Core.Log(LogSeverity.Minor, "Initialized Log Server Hook"); } return(true); }
public bool Initialize(LaunchStage stage) { return true; if (stage == LaunchStage.Startup) { const int size = 0x180c5f; _mappingHandle = Native.CreateFileMapping(-1, IntPtr.Zero, 0x04, 0, size, "EVE"); _logBase = Native.MapViewOfFile(_mappingHandle, 0x06, 0, 0, size); _eventC = Native.CreateEvent(IntPtr.Zero, true, false, "cEVE"); _eventD = Native.CreateEvent(IntPtr.Zero, true, false, "dEVE"); _mutexA = Native.CreateMutex(IntPtr.Zero, false, "aEVE"); _mutexB = Native.CreateMutex(IntPtr.Zero, false, "bEVE"); Charge(); _rawLog = new BinaryWriter(File.Create("messages.raw")); _readerThread = new Thread(Reader); _readerThread.IsBackground = true; _readerThread.Start(); Core.Log(LogSeverity.Minor, "Initialized Log Server Hook"); } return true; }
public bool Initialize(LaunchStage stage) { if (stage == LaunchStage.PostBlue) { Module = new DestinyToolModule(); Core.Log(LogSeverity.Minor, "initialized Destiny plugin module"); } return true; }
public bool Initialize(LaunchStage stage) { if (stage == LaunchStage.PostBlue) { Module = new DestinyToolModule(); Core.Log(LogSeverity.Minor, "initialized Destiny plugin module"); } return(true); }
public bool Initialize(LaunchStage stage) { if (stage == LaunchStage.PostBlue) { Marshal = Python.Import("blue").Get("marshal"); LoadFunc = Marshal.Get("Load"); Marshal.IncRef(); LoadFunc.IncRef(); if (Marshal.IsValid && LoadFunc.IsValid) { Core.Log(LogSeverity.Minor, "initialized blue marshal functions"); } } return(true); }
public bool Initialize(LaunchStage stage) { if (stage == LaunchStage.PostBlue) { { var addr = Utility.FindPattern("python27", "55 8b ec 81 ec 04 01 00 00 53 ff 75 0c 8b 5d 08 e8 ? ? ? ? 59 8d 8d fc fe ff ff 51 50 ff ? 0c e8 ? ? ? ? 59 50 e8 ? ? ? ? 83 c4 ?"); if (addr == 0) { Core.Log(LogSeverity.Warning, "Can't find get_module_info function; pattern outdated? Zip Importer hook disabling."); return true; } _getModuleInfoOrig = Utility.Magic.RegisterDelegate<GetModuleInfoDel>(addr); _getModuleInfoFake = HandleGetModuleInfo; _getModuleInfoDetour = Utility.Magic.Detours.CreateAndApply(_getModuleInfoOrig, _getModuleInfoFake, "get_module_info"); } { var addr = Utility.FindPattern("python27", "55 8b ec 81 ec 10 01 00 00 56 ff 75 0c e8 ? ? ? ? 8b ? 08 59 8d ? ? ? ? ? 51 50 ff 76 ? e8 ? ? ? ? 59 50 e8 ? ? ? ? 83 c4 0c 85 c0 79 ? 33 c0"); if (addr == 0) { Core.Log(LogSeverity.Warning, "Can't find get_module_code function; pattern outdated? Zip Importer hook disabling."); return true; } _getModuleCodeOrig = Utility.Magic.RegisterDelegate<GetModuleCodeDel>(addr); _getModuleCodeFake = HandleGetModuleCode; _getModuleCodeDetour = Utility.Magic.Detours.CreateAndApply(_getModuleCodeOrig, _getModuleCodeFake, "get_module_code"); } Core.Log(LogSeverity.Minor, "initialized zip importer hooks"); } return true; }
public bool Initialize(LaunchStage stage) { if (stage == LaunchStage.PostBlue) { { var addr = Utility.FindPattern("python27", "55 8b ec 81 ec 04 01 00 00 53 ff 75 0c 8b 5d 08 e8 ? ? ? ? 59 8d 8d fc fe ff ff 51 50 ff ? 0c e8 ? ? ? ? 59 50 e8 ? ? ? ? 83 c4 ?"); if (addr == 0) { Core.Log(LogSeverity.Warning, "Can't find get_module_info function; pattern outdated? Zip Importer hook disabling."); return(true); } _getModuleInfoOrig = Utility.Magic.RegisterDelegate <GetModuleInfoDel>(addr); _getModuleInfoFake = HandleGetModuleInfo; _getModuleInfoDetour = Utility.Magic.Detours.CreateAndApply(_getModuleInfoOrig, _getModuleInfoFake, "get_module_info"); } { var addr = Utility.FindPattern("python27", "55 8b ec 81 ec 10 01 00 00 56 ff 75 0c e8 ? ? ? ? 8b ? 08 59 8d ? ? ? ? ? 51 50 ff 76 ? e8 ? ? ? ? 59 50 e8 ? ? ? ? 83 c4 0c 85 c0 79 ? 33 c0"); if (addr == 0) { Core.Log(LogSeverity.Warning, "Can't find get_module_code function; pattern outdated? Zip Importer hook disabling."); return(true); } _getModuleCodeOrig = Utility.Magic.RegisterDelegate <GetModuleCodeDel>(addr); _getModuleCodeFake = HandleGetModuleCode; _getModuleCodeDetour = Utility.Magic.Detours.CreateAndApply(_getModuleCodeOrig, _getModuleCodeFake, "get_module_code"); } Core.Log(LogSeverity.Minor, "initialized zip importer hooks"); } return(true); }
public override int GetHashCode() { int hash = 1; if (LaunchStage != global::Google.Api.LaunchStage.Unspecified) { hash ^= LaunchStage.GetHashCode(); } if (samplePeriod_ != null) { hash ^= SamplePeriod.GetHashCode(); } if (ingestDelay_ != null) { hash ^= IngestDelay.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public bool Initialize(LaunchStage stage) { if (stage == LaunchStage.PreBlue) { _cryptVerifyDetour = DetourAPI <CryptVerifySignature>("advapi32.dll", "CryptVerifySignatureA", HandleVerify); if (_cryptVerifyDetour != null) { Core.Log(LogSeverity.Minor, "disabled all crypto verification"); } } if (stage == LaunchStage.PostBlue) { // Encryption & Decryption _cryptEncryptDetour = DetourAPI <CryptEncryptDelegate>("advapi32.dll", "CryptEncrypt", HandleCryptEncrypt); _cryptDecryptDetour = DetourAPI <CryptDecryptDelegate>("advapi32.dll", "CryptDecrypt", HandleCryptDecrypt); Core.Log(LogSeverity.Minor, "CryptoHook active"); } return(true); }
public override int GetHashCode() { int hash = 1; if (LaunchStage != 0) { hash ^= LaunchStage.GetHashCode(); } if (samplePeriod_ != null) { hash ^= SamplePeriod.GetHashCode(); } if (ingestDelay_ != null) { hash ^= IngestDelay.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
// Use this for initialization public override void Start() { base.Start(); GameObject planetPre = Resources.Load("PlanetPrefab") as GameObject; for (int i = 0; i < 1; ++i) { GameObject newObj = GameObject.Instantiate(planetPre); float radius = Random.Range(100.0f, 1000.0f); newObj.transform.localScale = new Vector3(radius * 2.0f, radius * 2.0f, 1.0f); newObj.transform.position = new Vector3( Random.Range(-100000.0f, 100000.0f), Random.Range(-100000.0f, 100000.0f), -41.0f); float density = 200.0f; newObj.GetComponent <Rigidbody2D>().mass = density * Mathf.PI * radius * radius; planets.Add(newObj); } int startingPlanet = Random.Range(0, planets.Count - 1); Vector2 startDir = new Vector2(Random.Range(-1.0f, 1.0f), Random.Range(-1.0f, 1.0f)); startDir.Normalize(); startPos = (startDir * (planets[startingPlanet].transform.localScale.x + 4.0f)) + (Vector2)planets[startingPlanet].transform.position; GameObject player = GameObject.Find("Player"); player.transform.localPosition = new Vector3(startPos.x, startPos.y, player.transform.position.z); player.transform.localRotation = Quaternion.Euler(0.0f, 0.0f, Vector2.SignedAngle(new Vector2(0.0f, 1.0f), startDir)); GameObject farCam = GameObject.Find("Main Camera"); farCam.transform.position = new Vector3(player.transform.position.x, player.transform.position.y, farCam.transform.position.z); GameObject ship = GameObject.Find("Player"); ShipClass shipComp = ship.GetComponent <ShipClass>(); LaunchStage newStage = new LaunchStage(); List <ShipPart> partList = newStage.parts; ShipPart part = (ShipPart)ship.GetComponent <CabinPart>(); if (part) { partList.Add(part); } GameObject engineObj = GameObject.Find("Engine"); part = engineObj.GetComponent <ShipPart>(); if (part) { partList.Add(part); } GameObject fuelObj = GameObject.Find("FuelTank"); part = fuelObj.GetComponent <ShipPart>(); if (part) { partList.Add(part); } shipComp.stages.Add(newStage); Debug.Log("sim"); planetPosition.x = Random.Range(-10000.0f, 10000.0f); planetPosition.y = Random.Range(-10000.0f, 10000.0f); }