本文整理汇总了C#中System.Diagnostics.ProcessModule类的典型用法代码示例。如果您正苦于以下问题:C# ProcessModule类的具体用法?C# ProcessModule怎么用?C# ProcessModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProcessModule类属于System.Diagnostics命名空间,在下文中一共展示了ProcessModule类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ScanOffsets
public static void ScanOffsets(MemUtils memUtils,ProcessModule client,ProcessModule engine)
{
clientDll = client;
engineDll = engine;
clientDllBase = clientDll.BaseAddress.ToInt32();
engineDllBase = engineDll.BaseAddress.ToInt32();
EntityOff(memUtils);
LocalPlayer(memUtils);
Jump(memUtils);
GameResources(memUtils);
ClientState(memUtils);
SetViewAngles(memUtils);
SignOnState(memUtils);
GlowManager(memUtils);
WeaponTable(memUtils);
EntityID(memUtils);
EntityHealth(memUtils);
EntityVecOrigin(memUtils);
PlayerTeamNum(memUtils);
PlayerBoneMatrix(memUtils);
PlayerWeaponHandle(memUtils);
vMatrix(memUtils);
clientDll = null;
engineDll = null;
clientDllBase = 0;
engineDllBase = 0;
}
开发者ID:BigMo,项目名称:Zat-s-External-CSGO-Multihack-v3,代码行数:27,代码来源:CSGOScanner.cs
示例2: ModuleDataObject
public ModuleDataObject(Process p, ProcessModule m, bool isDisabled)
: base(string.Format("{0}.{1}", p.Id, m.FileName))
{
ID = p.Id;
Refresh(p, m, isDisabled);
ConstructionIsFinished = true;
}
开发者ID:johnhk,项目名称:pserv4,代码行数:7,代码来源:ModuleDataObject.cs
示例3: CacheInfo
public CacheInfo(ProcessModule module)
{
FileDescription = module.FileVersionInfo.FileDescription;
FileVersion = module.FileVersionInfo.FileVersion;
ProductName = module.FileVersionInfo.ProductName;
ProductVersion = module.FileVersionInfo.ProductVersion;
}
开发者ID:nathansgreen,项目名称:pserv4,代码行数:7,代码来源:FileVersionInfoCache.cs
示例4: HEAP_INFO
public HEAP_INFO(ulong heapAddress, ulong heapLength, string heapProtection, string extra, ProcessModule associatedModule)
{
this.heapAddress = heapAddress;
this.heapLength = heapLength;
this.heapProtection = heapProtection;
this.extra = extra;
this.associatedModule = associatedModule;
}
开发者ID:obarhleam,项目名称:FunctionHacker,代码行数:8,代码来源:oMemoryFunctions.cs
示例5: RemoteModule
/// <summary>
/// Initializes a new instance of the <see cref="RemoteModule" /> class.
/// </summary>
/// <param name="memorySharp">The reference of the <see cref="MemorySharp" /> object.</param>
/// <param name="module">The native <see cref="ProcessModule" /> object corresponding to this module.</param>
internal RemoteModule(MemoryBase memorySharp, ProcessModule module) : base(memorySharp, module.BaseAddress)
{
// Save the parameter
Native = module;
LazyData =
new Lazy<byte[]>(
() => MemoryCore.ReadBytes(memorySharp.Handle, module.BaseAddress, module.ModuleMemorySize));
}
开发者ID:jasteph,项目名称:MemorySharp,代码行数:13,代码来源:RemoteModule.cs
示例6: Update
public virtual void Update(IntPtr value, ProcessModule targetModule)
{
IntPtr baseAddress = targetModule.BaseAddress;
FileVersionInfo info = targetModule.FileVersionInfo;
int offset = value.GetInt32OffsetFrom(targetModule.BaseAddress);
Build = info.FileVersion;
Value = offset;
}
开发者ID:sgraf812,项目名称:BananaPattern,代码行数:9,代码来源:CachedElement.cs
示例7: FindPattern
public uint FindPattern( ProcessModule pModule, string szPattern, string szMask, char Delimiter ) {
string[] saPattern = szPattern.Split( Delimiter );
byte[] bPattern = new byte[ saPattern.Length ];
for( int i = 0; i < bPattern.Length; i++ )
bPattern[ i ] = Convert.ToByte( saPattern[ i ], 0x10 );
return FindPattern( pModule, bPattern, szMask );
}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:9,代码来源:Pattern.cs
示例8: Memory
public Memory(ProcessModule engineDll, ProcessModule clientDll)
{
Scanner.ScanOffsets(clientDll, engineDll, Program.MemUtils);
ClientDllBase = (int) clientDll.BaseAddress;
var engineDllBase = (int) engineDll.BaseAddress;
_entityList = ClientDllBase + Offsets.Misc.EntityList;
_viewMatrix = ClientDllBase + Offsets.Misc.ViewMatrix;
ClientState = Program.MemUtils.Read<int>((IntPtr) (engineDllBase + Offsets.ClientState.Base));
ActiveWeapon = "Default";
}
开发者ID:quibsorg,项目名称:CsGoAimbot,代码行数:10,代码来源:Memory.cs
示例9: doWork
public static void doWork(object crap)
{
try
{
Process process = Process.GetCurrentProcess();
ProcessModule[] modules = new ProcessModule[process.Modules.Count];
process.Modules.CopyTo(modules, 0);
var niQuery =
from m in modules
where m.FileName.Contains(@"\" + process.ProcessName + ".ni")
select m.FileName;
bool ni = niQuery.Count() > 0 ? true : false;
if (!ni)
{
// FORNOW: for PoC debugging and sanity checking
Console.WriteLine("The app is not NGen'd.");
Console.WriteLine("NGen'ing the app...");
var assemblyPath = process.MainModule.FileName;
ProcessStartInfo startInfo = new ProcessStartInfo();
// TODO: Determine the path to (the appropriate version of)
// ngen.exe.
// FORNOW: Just use a hardcoded path to ngen.exe for PoC.
startInfo.FileName =
@"C:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe";
startInfo.Arguments = "install \"" + assemblyPath + "\"";
// TBD: process options that you think make sense
startInfo.CreateNoWindow = false;
startInfo.UseShellExecute = false;
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
try
{
using (Process exeProcess = Process.Start(startInfo))
{
exeProcess.WaitForExit();
}
}
catch
{
// TBD: error handling that you think makes sense - e.g.
// logging or displaying the error, moving on regardless
// etcetera.
}
}
}
catch
{
}
}
开发者ID:jackmaynard,项目名称:MissionPlanner,代码行数:55,代码来源:NGEN.cs
示例10: Get
public static CacheInfo Get(string key, ProcessModule module)
{
CacheInfo result;
if( CachedInfos.TryGetValue(key, out result))
{
return result;
}
result = new CacheInfo(module);
CachedInfos[key] = result;
return result;
}
开发者ID:nathansgreen,项目名称:pserv4,代码行数:11,代码来源:FileVersionInfoCache.cs
示例11: Framework
public Framework(ProcessModule clientDll, ProcessModule engineDll)
{
CSGOScanner.ScanOffsets(WithOverlay.MemUtils, clientDll, engineDll);
clientDllBase = (int)clientDll.BaseAddress;
engineDllBase = (int)engineDll.BaseAddress;
dwEntityList = clientDllBase + CSGOOffsets.Misc.EntityList;
dwViewMatrix = clientDllBase + CSGOOffsets.Misc.ViewMatrix;
dwClientState = WithOverlay.MemUtils.Read<int>((IntPtr)(engineDllBase + CSGOOffsets.ClientState.Base));
mouseEnabled = true;
AimbotActive = false;
}
开发者ID:Healios,项目名称:ExternalUtilsCSharp,代码行数:11,代码来源:Framework.cs
示例12: IsNetModule
static bool IsNetModule(ProcessModule m)
{
var s = m.ModuleName;
if (s.Equals("mscorwks.dll", StringComparison.OrdinalIgnoreCase))
return true;
if (s.Equals("mscorsvr.dll", StringComparison.OrdinalIgnoreCase))
return true;
if (s.Equals("clr.dll", StringComparison.OrdinalIgnoreCase))
return true;
return false;
}
开发者ID:BahNahNah,项目名称:dnSpy,代码行数:11,代码来源:AttachToProcessWindow.xaml.cs
示例13: BackgroundProcess
public void BackgroundProcess()
{
do
{
Thread.Sleep(500);
ffximain = (from ProcessModule m in pol.Modules where m.ModuleName.ToLower() == "ffximain.dll" select m).FirstOrDefault();
}
while (ffximain == null);
_FFACE = new FFACE(pol.Id);
while (_FFACE.Player.Name == "")
Thread.Sleep(500);
_FFACE.Windower.SendString("/vanatunes hold on");
sCharName = _FFACE.Player.Name;
profile = "(none)";
//TODO: Check player name and set default profile
byte[] mobPtrTmp = new byte[4];
IntPtr mobPtrArraySize = new IntPtr();
ReadProcessMemory(pol.Handle, new IntPtr(ffximain.BaseAddress.ToInt32() + 0x8020c), mobPtrTmp, 4, ref mobPtrArraySize);
IntPtr mobPtr = new IntPtr(BitConverter.ToInt32(mobPtrTmp, 0));
ReadProcessMemory(pol.Handle, mobPtr, mobFlags, 4096*4, ref mobPtrArraySize);
m_Zone = _FFACE.Player.Zone;
uVanaHour = _FFACE.Timer.GetVanaTime().Hour;
m_Status = _FFACE.Player.Status;
m_Buffs = _FFACE.Player.StatusEffects;
if (_FFACE.Party.Party0Count == 1 && _FFACE.Party.Party1Count == 0 && _FFACE.Party.Party2Count == 0)
bPartyMember = false;
else
bPartyMember = true;
bFighting = false;
bInBattlefield = false;
do{
if (CheckConditions())
{
UInt16 thisTrack = ExecScript();
if (thisTrack != currentTrack)
{
currentTrack = thisTrack;
_FFACE.Windower.SendString("/vanatunes playOverride " + currentTrack);
}
}
Thread.Sleep(500);
} while(Program.runCharThreads);
if(ffximain != null)
_FFACE.Windower.SendString("/vanatunes hold off");
}
开发者ID:bluekirby0,项目名称:Uematsu,代码行数:53,代码来源:ProcessChar.cs
示例14: ModuleObject
public ModuleObject(Process p, ProcessModule m, string username)
{
Objects[(int)ModuleItemTypes.Name] = Path.GetFileName(m.FileName);
Objects[(int)ModuleItemTypes.ID] = p.Id;
Objects[(int)ModuleItemTypes.Path] = Path.GetDirectoryName(m.FileName);
Objects[(int)ModuleItemTypes.ModuleMemorySize] = m.ModuleMemorySize; //
Objects[(int)ModuleItemTypes.FileDescription] = m.FileVersionInfo.FileDescription;
Objects[(int)ModuleItemTypes.FileVersion] = m.FileVersionInfo.FileVersion;
Objects[(int)ModuleItemTypes.Product] = m.FileVersionInfo.ProductName;
Objects[(int)ModuleItemTypes.ProductVersion] = m.FileVersionInfo.ProductVersion;
ForegroundColor = ProcessObject.GetColorFromName(p, username);
ToolTipText = m.FileVersionInfo.FileDescription;
}
开发者ID:k4gdw,项目名称:GSharpTools,代码行数:13,代码来源:ModuleObject.cs
示例15: TryGetCachedValue
public virtual bool TryGetCachedValue(ProcessModule targetModule, out IntPtr result)
{
result = IntPtr.Zero;
IntPtr baseAddress = targetModule.BaseAddress;
FileVersionInfo info = targetModule.FileVersionInfo;
if (IsSameVersion(info))
{
result = baseAddress + Value;
return true;
}
return false;
}
开发者ID:sgraf812,项目名称:BananaPattern,代码行数:14,代码来源:CachedElement.cs
示例16: EnumModule
private void EnumModule(ProcessModule m)
{
this.lvModDetail.ClearItems();
try
{
lvModDetail.AddItem(new object[] { "Base Address", m.BaseAddress.ToInt32().ToString("x").ToLower() });
lvModDetail.AddItem(new object[] { "Entry Point Address", m.EntryPointAddress.ToInt32().ToString("x").ToLower() });
lvModDetail.AddItem(new object[] { "File Name", m.FileName });
lvModDetail.AddItem(new object[] { "File Version", m.FileVersionInfo.FileVersion.ToString() });
lvModDetail.AddItem(new object[] { "File Description", m.FileVersionInfo.FileDescription.ToString() });
lvModDetail.AddItem(new object[] { "Memory Size", m.ModuleMemorySize.ToString("N0") });
}
catch (Exception exp)
{
MessageBox.Show(exp.Message, exp.Source, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:17,代码来源:frmModules.cs
示例17: Find
/// <summary>
/// Performs a pattern scan.
/// </summary>
/// <param name="processHandle">The process the <see cref="ProcessModule" /> containing the data resides in.</param>
/// <param name="processModule">The <see cref="ProcessModule" /> that contains the pattern data resides in.</param>
/// <param name="data">The array of bytes containing the data to search for matches in.</param>
/// <param name="mask">
/// The mask that defines the byte pattern we are searching for.
/// <example>
/// <code>
/// var bytes = new byte[]{55,45,00,00,55} ;
/// var mask = "xx??x";
/// </code>
/// </example>
/// </param>
/// <param name="offsetToAdd">The offset to add to the offset result found from the pattern.</param>
/// <param name="reBase">If the address should be rebased to this Instance's base address.</param>
/// <param name="wildCardChar">
/// [Optinal] The 'wild card' defines the <see cref="char" /> value that the mask uses to differentiate
/// between pattern data that is relevant, and pattern data that should be ignored. The default value is 'x'.
/// </param>
/// <param name="pattern">The byte array that contains the pattern of bytes we're looking for.</param>
/// <returns>A new <see cref="PatternScanResult" /> instance.</returns>
public static PatternScanResult Find(SafeMemoryHandle processHandle, ProcessModule processModule, byte[] data,
byte[] pattern,
string mask, int offsetToAdd, bool reBase, char wildCardChar = 'x')
{
for (var offset = 0; offset < data.Length; offset++)
{
if (mask.Where((m, b) => m == 'x' && pattern[b] != data[b + offset]).Any()) continue;
var found = MemoryCore.Read<IntPtr>(processHandle,
processModule.BaseAddress + offset + offsetToAdd);
var result = new PatternScanResult
{
OriginalAddress = found,
Address = reBase ? found : found.Subtract(processModule.BaseAddress),
Offset = (IntPtr) offset
};
return result;
}
// If this is reached, the pattern was not found.
throw new Exception("The pattern scan for the pattern mask: " + "[" + mask + "]" + " was not found.");
}
开发者ID:jasteph,项目名称:MemorySharp,代码行数:43,代码来源:PatternCore.cs
示例18: GetFileProcessName
public static string GetFileProcessName(string filePath)
{
Process[] procs = Process.GetProcesses();
string fileName = Path.GetFileName(filePath);
foreach (Process proc in procs)
{
if (proc.MainWindowHandle != new IntPtr(0) && !proc.HasExited)
{
ProcessModule[] arr = new ProcessModule[proc.Modules.Count];
foreach (ProcessModule pm in proc.Modules)
{
if (pm.ModuleName == fileName)
return proc.ProcessName;
}
}
}
return null;
}
开发者ID:O3-Gaspare,项目名称:OCTGN,代码行数:20,代码来源:ProcessHelpers.cs
示例19: MemoryReadLib
/// <summary>
/// Memory yi okumak için Process İsmi Giriniz..
/// </summary>
/// <param name="ProccessName">Process Name</param>
public MemoryReadLib(string ProccessName)
{
Process[] processes = Process.GetProcessesByName(ProccessName);
foreach (Process pr in processes)
{
if (pr.ProcessName == ProccessName)
{
this.War3 = pr;
}
}
if (War3 != null)
{
ProcessModuleCollection blabla = War3.Modules;
foreach (ProcessModule mdl in blabla)
{
if (mdl.ModuleName == "Storm.dll")
{
this.StormDll = mdl;
}
else if (mdl.ModuleName == "Game.dll")
{
this.GameDll = mdl;
}
}
if (GameDll == null || StormDll == null)
{
throw new NullReferenceException("There is no Game Process");
}
}
else
{
throw new NullReferenceException("There is no Game Process");
}
}
开发者ID:arikaya,项目名称:TReactor,代码行数:41,代码来源:MemoryReadLib.cs
示例20: OutputModuleMemory
static void OutputModuleMemory(Process process, ProcessModule processModule, Stream stream)
{
IntPtr processHandler = process.Handle;
IntPtr baseAddress = processModule.BaseAddress;
int moduleMemorySize = processModule.ModuleMemorySize;
Console.WriteLine("BaseAddress: {0}", baseAddress);
Console.WriteLine("ModuleMemorySize: {0}", moduleMemorySize);
int bufferSize = 4096;
byte[] buffer = new byte[bufferSize];
IntPtr pointer = baseAddress;
IntPtr endPointer = IntPtr.Add(baseAddress, moduleMemorySize);
while (pointer.ToInt64() < endPointer.ToInt64())
{
IntPtr readSizeResult = IntPtr.Zero;
IntPtr readSize = GetReadSize(pointer, endPointer, bufferSize);
if (NativeMethods.ReadProcessMemory(processHandler, pointer, buffer, readSize, ref readSizeResult))
{
stream.Write(buffer, 0, readSizeResult.ToInt32());
}
pointer = IntPtr.Add(pointer, bufferSize);
}
}
开发者ID:toydev,项目名称:ExampleCSharp,代码行数:24,代码来源:Program.cs
注:本文中的System.Diagnostics.ProcessModule类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论