❗ CA Hook[C#]

Posts 16–20 of 20 · Page 2 of 2
Alright. What does he know that I dont? I know the Definition of a hook? I built the trainer that he bases all his hacking programs on?

And FMLoon, fuck off. Your an insolent noob who just Copies and paste. Fuckin moron. I bet FindWindow and Postmessage is all you know how to do. I even bet you use timers.


And him know more than me? Thats the biggest compliment he'll ever get.
Quote Originally Posted by Sneaks View Post
Alright. What does he know that I dont? I know the Definition of a hook? I built the trainer that he bases all his hacking programs on?

And FMLoon, fuck off. Your an insolent noob who just Copies and paste. Fuckin moron. I bet FindWindow and Postmessage is all you know how to do. I even bet you use timers.


And him know more than me? Thats the biggest compliment he'll ever get.

FUCK OUT, that code I coded myself thank you very fucking much. I may only code c# but i know enough and can do tons of fucking things with it. This is technically a hook as it "hooks" the process to a window. Sorry i wasnt fucking politically correct. NOW BACK THE FUCK OFF and go back to waitbaby with all the other fucking cunts that u assosiate your fucking self with.
So banned, FMLoon is awesome and helps people. Enough said
A hook is Intercepting the API and make it follow your own line of code.

NOT ATTACH TO A FUCKIN PROCESS. Your nothing compared to me.
Code:
IntPtr hWnd = FindWindow(null,"*name*");
That shouldn't compile because you can't use any functions in that space. But since it's unmanaged, it'll probably work. And it's a bad idea to search for window handles using FindWindow, period. use
Code:
Process. ... .MainWindowHandle
Code:
FindWindow(null, "*name*");
That won't do anything since the function only does read operations.

You might want to consider this. It's an example of posting a keydown message:
Code:
//MapVirtualKey
[DllImport("user32.dll")]
public static extern int MapVirtualKey(int uCode, uint uMapType);
private void Form1_Load(object sender, EventArgs e)
{
    PostMessage(hWnd, (uint)WM_KEYDOWN, (int)Keys.W, MapVirtualKey((int)Keys.W, 0) << 16);
}
Obviously, it sends the W key to the window with the specified handle.

The entire thing (revised):
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using System.Diagnostics;

namespace NAMESPACE
{
    public partial class Form1 : Form
    {
        //PostMessage
        [return: MarshalAs(UnmanagedType.Bool)]
        [DllImport("user32.dll", SetLastError = true)]
        static extern bool PostMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);

        //MapVirtualKey
        [DllImport("user32.dll")]
        public static extern int MapVirtualKey(int uCode, uint uMapType);

        IntPtr hWnd = Process.GetProcessesByName("Firefox")[0].MainWindowHandle;

        const int WM_KEYDOWN = 0x100;

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            PostMessage(hWnd, (uint)WM_KEYDOWN, (int)Keys.W, MapVirtualKey((int)Keys.W, 0) << 16);
        }

    }
}
Posts 16–20 of 20 · Page 2 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us