public override void DoWork(DetectionMethod m)
 {
     if (IsVirtualMachine())
     {
         Helpr.Die(m);
     }
 }
Exemple #2
0
        public static void Die(DetectionMethod m)
        {
            // TODO try catch maybe
            switch (m)
            {
            case DetectionMethod.FalseError:
            {
                MessageBox.Show("An unexpected error has occured and the application must quit. 0xF0010C0", "Fatal Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
                Environment.Exit(0);
                break;
            }

            case DetectionMethod.Kill:
            {
                Process.GetCurrentProcess().Kill();
                break;
            }

            case DetectionMethod.ConsumeResources:
            {
                int i = 0;

                while (i != 100000000)
                {
                    i++;
                    Marshal.AllocHGlobal(i ^ 10);
                }
                break;
            }
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="AppProfile"/> class.
 /// </summary>
 public AppProfile()
 {
     _name            = String.Empty;
     _matchType       = DetectionMethod.Executable;
     _matchParameters = String.Empty;
     _buttonMappings  = new List <ButtonMapping>();
 }
Exemple #4
0
        public override void DoWork(DetectionMethod m)
        {
            Stopwatch s = new Stopwatch();

            s.Start();
            bool cracked = false;

            // TODO: Improve random key and md5 methods
            // TODO: Improve calculation size based on computer specs (for more accurate timing)
            // Currently ~ 58 seconds
            try
            {
                string letters = "abcdefghijklmnopqrstuvwxyz";
                char[] a       = letters.ToCharArray();
                string shit    = Helpr.RandKey(4) + Helpr.RandKey(1, "abcd"); //TODO adjust time here.
                string md5     = Helpr.CalculateMD5Hash(shit);

                for (int i = 0; i < letters.Length; i++)
                {
                    for (int j = 0; j < letters.Length; j++)
                    {
                        for (int k = 0; k < letters.Length; k++)
                        {
                            for (int l = 0; l < letters.Length; l++)
                            {
                                for (int mm = 0; mm < letters.Length; mm++)
                                {
                                    // for (int n = 0; n < 6; n++)
                                    {
                                        string letterOne   = a[i].ToString();
                                        string letterTwo   = a[j].ToString();
                                        string letterThree = a[k].ToString();
                                        string letterFour  = a[l].ToString();
                                        string letterFive  = a[mm].ToString();
                                        //  string letterSix = a[n].ToString();

                                        string stry = Helpr.CalculateMD5Hash(letterOne + letterTwo + letterThree + letterFour + letterFive);
                                        if (stry == md5)
                                        {
                                            cracked = true;
                                            s.Stop();
                                            MessageBox.Show(s.ElapsedMilliseconds.ToString());
                                            break;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch
            {
                if (!cracked)
                {
                    Helpr.Die(m);
                }
            }
        }
 public override void DoWork(DetectionMethod m)
 {
     // Basic Method - check for loaded sandboxie library
     if (Helpr.GetModuleHandle("SbieDll.dll") != IntPtr.Zero)
     {
         Helpr.Die(m);
     }
 }
Exemple #6
0
 // Sets whether a character remains visible to their party through stealth.
 // hiding: The creature who is stealthed.
 // reveal: TRUE for visible.
 // detection: Can be specified to determine whether the hidden creature is seen or heard.
 public static void RevealToParty(uint hiding, int reveal, DetectionMethod detection = DetectionMethod.Heard)
 {
     Internal.NativeFunctions.nwnxSetFunction(PLUGIN_NAME, "SetRevealToParty");
     Internal.NativeFunctions.nwnxPushInt((int)detection);
     Internal.NativeFunctions.nwnxPushInt(reveal);
     Internal.NativeFunctions.nwnxPushObject(hiding);
     Internal.NativeFunctions.nwnxCallFunction();
 }
Exemple #7
0
 // Selectively reveals the character to an observer until the next time they stealth out of sight.
 // hiding The creature who is stealthed.
 // observer The creature to whom the hider is revealed.
 // detectionMethod Can be specified to determine whether the hidden creature is seen or heard.
 public static void RevealTo(uint hiding, uint observer,
                             DetectionMethod detection = DetectionMethod.Heard)
 {
     Internal.NativeFunctions.nwnxSetFunction(PLUGIN_NAME, "RevealTo");
     Internal.NativeFunctions.nwnxPushInt((int)detection);
     Internal.NativeFunctions.nwnxPushObject(observer);
     Internal.NativeFunctions.nwnxPushObject(hiding);
     Internal.NativeFunctions.nwnxCallFunction();
 }
Exemple #8
0
	void Awake ()
	{
		detectCol = GetComponentInChildren<Collider>();
		detectionMethod = GetComponent<DetectionMethod>();
		attackManager = GetComponent<AttackManager>();
		//deathSequence = GetComponent<DeathSequence>();
		//healthManager = GetComponent<HealthManager>();

	}
Exemple #9
0
 public abstract void DoWork(DetectionMethod m);