C# Class Oxide.Native.ManagedShell.ManagedShell

Responsible for process and injection life-cycle
Exibir arquivo Open project: OxideMod/OxideNative Class Usage Examples

Public Methods

Method Description
Initialize ( ) : void

Initializes the singleton

Run ( ) : void

Runs the managed shell logic

WriteLog ( LogType logType, string message, bool piped = false ) : void

Logs the specified message

Private Methods

Method Description
CloseHandle ( IntPtr hObject ) : bool
ConsoleCtrlCheck ( CtrlTypes ctrlType ) : bool
CreateProcess ( string lpApplicationName, string lpCommandLine, System.IO.Pipes.SecurityAttributes &lpProcessAttributes, System.IO.Pipes.SecurityAttributes &lpThreadAttributes, bool bInheritHandles, CreationFlags dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory, [ lpStartupInfo, ProcessInformation &lpProcessInformation ) : bool
CreateProcessWithLogonW ( string userName, string domain, IntPtr password, LogonFlags logonFlags, string applicationName, string commandLine, CreationFlags creationFlags, uint environment, string currentDirectory, StartupInfo &startupInfo, ProcessInformation &processInformation ) : bool
CreateRemoteThread ( IntPtr hProcess, IntPtr lpThreadAttributes, uint dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, uint dwCreationFlags, IntPtr &lpThreadId ) : IntPtr
FindManifest ( ) : TargetManifest

Finds the manifest to use

GetLastError ( ) : uint
GetModuleHandle ( string lpModuleName ) : IntPtr
GetProcAddress ( IntPtr hModule, string procName ) : IntPtr
HandlePacket ( byte data, int len ) : void
LoadManifests ( ) : void

Loads all manifests in

ManagedShell ( ) : System

Initializes a new instance of the ManagedShell class

OpenProcess ( Process proc, ProcessAccessFlags flags ) : IntPtr
OpenProcess ( ProcessAccessFlags processAccess, bool bInheritHandle, int processId ) : IntPtr
OpenThread ( ThreadAccess dwDesiredAccess, bool bInheritHandle, uint dwThreadId ) : IntPtr
PerformInjection ( string dllPath ) : void

Performs the injection process

Pipe_OnConnection ( IAsyncResult result ) : void

Called when the pipe received a connection

Pipe_OnData ( IAsyncResult result ) : void

Called when the pipe received data

ResumeThread ( IntPtr hThread ) : int
ResumeThreads ( ) : void

Resumes all threads in the child process

RunInternal ( ) : void

Runs the actual managed shell logic

SendMessage ( IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam ) : IntPtr
SetConsoleCtrlHandler ( HandlerRoutine Handler, bool Add ) : bool
SetupPipe ( ) : void

Sets up the pipe server

SuspendThread ( IntPtr hThread ) : int
SuspendThreads ( ) : int

Suspends all threads in the child process

Terminate ( ) : void

Terminates the managed shell cleanly

VirtualAllocEx ( IntPtr hProcess, IntPtr lpAddress, uint dwSize, AllocationType flAllocationType, MemoryProtection flProtect ) : IntPtr
WaitForSingleObject ( IntPtr hHandle, uint dwMilliseconds ) : uint
WriteProcessMemory ( IntPtr hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, int nSize, IntPtr &lpNumberOfBytesWritten ) : bool
WriteProcessMemory ( IntPtr hProcess, IntPtr lpBaseAddress, byte lpBuffer, int nSize, IntPtr &lpNumberOfBytesWritten ) : bool

Method Details

Initialize() public static method

Initializes the singleton
public static Initialize ( ) : void
return void

Run() public method

Runs the managed shell logic
public Run ( ) : void
return void

WriteLog() public method

Logs the specified message
public WriteLog ( LogType logType, string message, bool piped = false ) : void
logType LogType
message string
piped bool
return void