Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[C#]WindowsDetection Class

Skilled Illusionist
Joined
Jan 7, 2007
Messages
347
Reaction score
78
Easy to use.

Code:
//Copyright © MetaStudios
public static class WindowsDetection 
    {
        [DllImport("user32.dll", SetLastError = true)]
        public static extern int FindWindow(string lpClassName, string lpWindowName);
        static string[] prog = { "Olly", "Dbg", "hack", "h4ck", "hax", "Hack", "HACK", "H4CK", "massive", "MASSIVE", "lawnmower", "LAWNMOWER", "god", "GOD", "G0D", "g0d", "God", "Ghost", "ghost", "gh0st", "speed", "Speed", "Sp33d", "sp33d", "dll", "DLL", "OneWhoSign", "OWS", "ThevingSix", "thevingsix", "t6", "theving6", "Anônimo", "anônimo", "Wizkid", "WizKid", "wizkid", "WIZKID", "Evilness", "evilness", "bytes4bread", "thesupermax", "bypass", "Bypass", "BYPASS", "Cipher", "Sulfin", "sulfin", "SULFIN", "Thanu21", "lone222", "WaffleByte", "hmhax", "Xeffar", "Mafiacoders", "mafiacoders", "Injec", "injec", "Hook", "hook", "Pserv", "pserv" };
        
        //WindowsName Protect
        public static readonly bool WNP
        {
            get
            {
               foreach (string x in prog)
                {
                    Thread.Sleep(300);
                    int hwnd = FindWindow(null, x);
                    if (hwnd >= 1) { return true; }
                }
                return false;
            }
        }

        //Secondary WindowsName Protect
        public static readonly bool SWNP
        {
            get
            {
                Process[] ProcList = Process.GetProcesses();
                foreach (Process xProcess in ProcList)
                {
                    foreach (string x in prog)
                    {
                        Thread.Sleep(300);
                        if (xProcess.ProcessName.Contains(x)) { return true; }
                    }
                }
                return false;
            }
        }

        //MainTitleName Protect
        public static readonly bool MTNP
        {
            get
            {
                Process[] ProcList = Process.GetProcesses();
                foreach (Process xProcess in ProcList)
                {
                    foreach (string x in prog)
                    {
                        Thread.Sleep(300);
                        if (xProcess.MainWindowTitle.Contains(x)) { return true; }
                    }
                }
                return false;
            }
        }
    }
Using it:
Code:
while (true)
    {
      Thread.Sleep(1000);
       if (WindowsDetection.WNP == true || WindowsDetection.SWNP == true || WindowsDetection.MTNP == true)
       { //Hack detected, do something. Exemple:
         //foreach(Process yProcess in Process.GetProcesses()){
         //if(yProcess.MainWindowTitle == "The duel"){yProcess.Close();
         //Process.GetCurrentProcess().Close();}}
       }
    }
It's simple but usefull :):

FindWindows methode can also be really usefull:
Code:
WindowsDetection.FindWindow(null, "windows title");

Dots.
 
Last edited:
Newbie Spellweaver
Joined
Aug 30, 2009
Messages
44
Reaction score
4
mmm... This is for create a DLL??? and this is for prevent search names of hack's and cheats ingame???.:?:
 
Skilled Illusionist
Joined
Jan 7, 2007
Messages
347
Reaction score
78
If you don't know what it is maybe you don't need it.
 
Newbie Spellweaver
Joined
Aug 30, 2009
Messages
44
Reaction score
4
If you don't know what it is maybe you don't need it.

so if I do not know is that I can help?, and why is your post, then as it costs less to explain at least some to see what it does, do not deserve "LIKE" at least not for me :thumbdown:
 
Junior Spellweaver
Joined
Aug 11, 2010
Messages
124
Reaction score
11
so if I do not know is that I can help?, and why is your post, then as it costs less to explain at least some to see what it does, do not deserve "LIKE" at least not for me :thumbdown:

:mellow: whats is this exactly and how to use? someone answer me please?
 
Skilled Illusionist
Joined
Jan 7, 2007
Messages
347
Reaction score
78
so if I do not know is that I can help?, and why is your post, then as it costs less to explain at least some to see what it does, do not deserve "LIKE" at least not for me :thumbdown:
Learn C# then you'll know why i don't need to explain anything. C# is similar to english read for fun it's pretty simple to understand if you know Algebra..

whats is this exactly and how to use? someone answer me please?
Microsoft Visual C# 2010 Express> New Project> Windows Application ...

Add this:
Code:
while (true)
    {
      Thread.Sleep(1000);
       if (WindowsDetection.WNP == true || WindowsDetection.SWNP == true)
       { //Hack detected, do something. Exemple:
         //foreach(Process yProcess in Process.GetProcesses()){
         //if(yProcess.MainWindowTitle == "The duel"){yProcess.Close();
         //Process.GetCurrentProcess().Close();}}
       }
    }
in main braces.{}
Add WindowsDetection Class under Program class (after his brace {})
done. ( remove the // if you want the ah to stop the game on hack detection )
Exept on that "//Hack detected, do something. Exemple:".
 
Last edited:
Skilled Illusionist
Joined
Jan 7, 2007
Messages
347
Reaction score
78
Thanks. There's finally a good release. All that's being released these days is just loading screens and website templates.

Good job.

iPowerOn, it's a good one too :thumbup:
 
Last edited:
Skilled Illusionist
Joined
Feb 14, 2008
Messages
304
Reaction score
41
i did something like that
Code:
Dim h As String() = {"msnmsgr", "firefox", "iexplorer", "chrome", "opera"}
        Dim d As Process() = Process.GetProcesses
        Dim b As Boolean = True
        For Each f As Process In d
            If LCase(f.MainWindowTitle.ToString) <> "theduel" Then
                For Each c As String In h
                    If LCase(f.ProcessName.ToString) = c Then
                        b = True
                        Exit For
                    Else
                        b = False
                    End If
                Next
                If b = False Then
                    f.Kill()
                    b = True
                End If
            End If
        Next
 
Skilled Illusionist
Joined
Jan 7, 2007
Messages
347
Reaction score
78
i did something like that
Code:
Dim h As String() = {"msnmsgr", "firefox", "iexplorer", "chrome", "opera"}
        Dim d As Process() = Process.GetProcesses
        Dim b As Boolean = True
        For Each f As Process In d
            If LCase(f.MainWindowTitle.ToString) <> "theduel" Then
                For Each c As String In h
                    If LCase(f.ProcessName.ToString) = c Then
                        b = True
                        Exit For
                    Else
                        b = False
                    End If
                Next
                If b = False Then
                    f.Kill()
                    b = True
                End If
            End If
        Next
This is not C# it's VB or VB.NET

BTW codes updated.
 
Last edited:
Back
Top