Recent Posts
None | 14 sec ago
None | 18 sec ago
XML | 39 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By Viano on the 4th of Sep 2009 09:46:31 PM
Download |
Raw |
Embed |
Report
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Remoting.Channels.Ipc;
using System.Runtime.Remoting;
using System.Threading;
using EasyHook;
using VolvicDLL;
using Magic;
namespace Volvic
{
class Hooker
{
private VolvicInterface RemoteObject;
private static String ChannelName;
int p;
public Hooker() {
hook();
}
public void hook()
{
try
{
Config.Register(
"Volvic",
"VolvicDLL.dll");
//Thread.Sleep(3000);
RunAs.StartProcess("administrator", "domain", "password", "C:\\Programme\\World of Warcraft\\Wow");
string ChannelName = null;
IpcServerChannel ipcLogChannel =
RemoteHooking.IpcCreateServer<Logger>(ref ChannelName, WellKnownObjectMode.Singleton);
var remoteLog = RemoteHooking.IpcConnectClient<Logger>(ChannelName);
//Thread.Sleep(3000);
p = GetWoWProcess();
RemoteHooking.Inject(
p,
"VolvicDLL.dll",
"VolvicDLL.dll",
ChannelName);
RemoteObject = RemoteHooking.IpcConnectClient<VolvicInterface>(remoteLog.InjectedDLLChannelName);
//Thread.Sleep(3000);
}
catch (Exception ExtInfo)
{
Console.WriteLine("There was an error while connecting to target:\r\n{0}", ExtInfo.ToString());
}
ResumeMainWowThread();
}
public int GetWoWProcess()
{
// get all processes, get first process, get id
List
<int> procs
= new List
<int>();
int proc = 0;
foreach (Process process in Process.GetProcessesByName("wow"))
{
procs.Add(process.Id);
}
if (procs.Count == 0)
{
Console.WriteLine("No WoW process found.");
}
else
{
proc = procs[0];
}
return proc;
}
public void ResumeMainWowThread()
{
ProcessThread wowMainThread = SThread.GetMainThread(p);
IntPtr hThread = SThread.OpenThread(wowMainThread.Id);
SThread.ResumeThread(hThread);
}
}
}
Submit a correction or amendment below.
Make A New Post