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...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Viano on the 4th of Sep 2009 09:46:31 PM Download | Raw | Embed | Report
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. using System.Diagnostics;
  7. using System.Runtime.Remoting.Channels.Ipc;
  8. using System.Runtime.Remoting;
  9. using System.Threading;
  10. using EasyHook;
  11. using VolvicDLL;
  12. using Magic;
  13.  
  14. namespace Volvic
  15. {
  16.     class Hooker
  17.     {
  18.         private VolvicInterface RemoteObject;
  19.         private static String ChannelName;
  20.         int p;
  21.  
  22.         public Hooker() {
  23.            
  24.             hook();
  25.         }
  26.  
  27.         public void hook()
  28.         {
  29.             try
  30.             {
  31.                 Config.Register(
  32.                     "Volvic",
  33.                     "VolvicDLL.dll");
  34.                 //Thread.Sleep(3000);
  35.                 RunAs.StartProcess("administrator", "domain", "password", "C:\\Programme\\World of Warcraft\\Wow");
  36.  
  37.                 string ChannelName = null;
  38.                 IpcServerChannel ipcLogChannel =
  39.                     RemoteHooking.IpcCreateServer<Logger>(ref ChannelName, WellKnownObjectMode.Singleton);
  40.  
  41.                 var remoteLog = RemoteHooking.IpcConnectClient<Logger>(ChannelName);
  42.  
  43.                 //Thread.Sleep(3000);
  44.  
  45.                 p = GetWoWProcess();
  46.  
  47.                 RemoteHooking.Inject(
  48.                     p,
  49.                     "VolvicDLL.dll",
  50.                     "VolvicDLL.dll",
  51.                     ChannelName);
  52.                 RemoteObject = RemoteHooking.IpcConnectClient<VolvicInterface>(remoteLog.InjectedDLLChannelName);
  53.  
  54.                 //Thread.Sleep(3000);
  55.  
  56.             }
  57.             catch (Exception ExtInfo)
  58.             {
  59.                 Console.WriteLine("There was an error while connecting to target:\r\n{0}", ExtInfo.ToString());
  60.             }
  61.             ResumeMainWowThread();
  62.         }
  63.  
  64.         public int GetWoWProcess()
  65.         {
  66.             // get all processes, get first process, get id
  67.             List<int> procs = new List<int>();
  68.             int proc = 0;
  69.  
  70.             foreach (Process process in Process.GetProcessesByName("wow"))
  71.             {
  72.                 procs.Add(process.Id);
  73.             }
  74.  
  75.             if (procs.Count == 0)
  76.             {
  77.                 Console.WriteLine("No WoW process found.");
  78.             }
  79.             else
  80.             {
  81.                 proc = procs[0];
  82.             }
  83.             return proc;
  84.         }
  85.  
  86.         public void ResumeMainWowThread()
  87.         {
  88.             ProcessThread wowMainThread = SThread.GetMainThread(p);
  89.             IntPtr hThread = SThread.OpenThread(wowMainThread.Id);
  90.             SThread.ResumeThread(hThread);
  91.         }
  92.     }
  93. }
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: