public abstract class AbstractLoader<T extends NewFileIO> extends Object implements Memory, Loader
| 限定符和类型 | 字段和说明 |
|---|---|
protected Backend |
backend |
protected boolean |
callInitFunction |
protected Emulator<T> |
emulator |
protected List<HookListener> |
hookListeners |
protected LibraryResolver |
libraryResolver |
protected Map<Long,MemoryMap> |
memoryMap |
protected long |
mmapBaseAddress |
protected MMapListener |
mMapListener |
protected List<ModuleListener> |
moduleListeners |
protected long |
sp |
protected int |
stackSize |
protected UnixSyscallHandler<T> |
syscallHandler |
MMAP_BASE, STACK_BASE, STACK_SIZE_OF_PAGE| 构造器和说明 |
|---|
AbstractLoader(Emulator<T> emulator,
UnixSyscallHandler<T> syscallHandler) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addHookListener(HookListener listener) |
void |
addModuleListener(ModuleListener listener) |
protected long |
allocateMapAddress(long mask,
long length) |
UnidbgPointer |
allocateStack(int size) |
protected abstract LibraryFile |
createLibraryFile(File file) |
void |
disableCallInitFunction() |
protected void |
dump(com.sun.jna.Pointer pointer,
long size,
File outFile) |
Module |
findModule(String name) |
Module |
findModuleByAddress(long address) |
Collection<MemoryMap> |
getMemoryMap() |
protected long |
getModuleBase(Module module) |
long |
getStackBase() |
long |
getStackPoint() |
int |
getStackSize() |
Module |
load(File elfFile) |
Module |
load(File elfFile,
boolean forceCallInit) |
Module |
load(LibraryFile libraryFile) |
Module |
load(LibraryFile libraryFile,
boolean forceCallInit) |
protected abstract Module |
loadInternal(LibraryFile libraryFile,
boolean forceCallInit) |
Module |
loadVirtualModule(String name,
Map<String,UnidbgPointer> symbols)
加载虚拟模块
|
protected Alignment |
mem_map(long address,
long size,
int prot,
String libraryName,
long align) |
UnidbgPointer |
mmap(int length,
int prot) |
int |
mprotect(long address,
int length,
int prot) |
int |
munmap(long start,
int length) |
protected void |
notifyModuleLoaded(Module module) |
UnidbgPointer |
pointer(long address) |
void |
serialize(DataOutput out) |
void |
setCallInitFunction(boolean callInit) |
void |
setLibraryResolver(LibraryResolver libraryResolver) |
protected void |
setMMapBaseAddress(long address) |
void |
setMMapListener(MMapListener listener) |
void |
setStackPoint(long sp) |
UnidbgPointer |
writeStackBytes(byte[] data) |
UnidbgPointer |
writeStackString(String str) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdlclose, dlopen, dlopen, dlsym, getLoadedModules, getMaxLengthLibraryName, getMaxSizeOfLibraryprotected final Backend backend
protected final UnixSyscallHandler<T extends NewFileIO> syscallHandler
protected long sp
protected long mmapBaseAddress
protected MMapListener mMapListener
protected boolean callInitFunction
protected final List<HookListener> hookListeners
protected LibraryResolver libraryResolver
protected int stackSize
protected final List<ModuleListener> moduleListeners
public AbstractLoader(Emulator<T> emulator, UnixSyscallHandler<T> syscallHandler)
public void setMMapListener(MMapListener listener)
setMMapListener 在接口中 Memoryprotected void setMMapBaseAddress(long address)
public Collection<MemoryMap> getMemoryMap()
getMemoryMap 在接口中 Memorypublic final UnidbgPointer mmap(int length, int prot)
protected final long allocateMapAddress(long mask,
long length)
public final Module load(LibraryFile libraryFile)
protected abstract LibraryFile createLibraryFile(File file)
public final Module load(LibraryFile libraryFile, boolean forceCallInit)
protected abstract Module loadInternal(LibraryFile libraryFile, boolean forceCallInit)
public final void disableCallInitFunction()
disableCallInitFunction 在接口中 Loaderpublic void setCallInitFunction(boolean callInit)
setCallInitFunction 在接口中 Loaderpublic final void addHookListener(HookListener listener)
addHookListener 在接口中 Loaderpublic void setLibraryResolver(LibraryResolver libraryResolver)
setLibraryResolver 在接口中 Loaderpublic final UnidbgPointer allocateStack(int size)
allocateStack 在接口中 Memorypublic final UnidbgPointer writeStackString(String str)
writeStackString 在接口中 StackMemorypublic final UnidbgPointer writeStackBytes(byte[] data)
writeStackBytes 在接口中 StackMemorypublic final UnidbgPointer pointer(long address)
public long getStackBase()
getStackBase 在接口中 Memorypublic int getStackSize()
getStackSize 在接口中 Memorypublic final void setStackPoint(long sp)
setStackPoint 在接口中 Memorypublic long getStackPoint()
getStackPoint 在接口中 Memorypublic final void addModuleListener(ModuleListener listener)
addModuleListener 在接口中 Loaderprotected final void notifyModuleLoaded(Module module)
protected final void dump(com.sun.jna.Pointer pointer,
long size,
File outFile)
throws IOException
IOExceptionprotected final Alignment mem_map(long address, long size, int prot, String libraryName, long align)
public final Module findModuleByAddress(long address)
findModuleByAddress 在接口中 Loaderprotected long getModuleBase(Module module)
public final Module findModule(String name)
findModule 在接口中 Loaderpublic Module loadVirtualModule(String name, Map<String,UnidbgPointer> symbols)
LoaderloadVirtualModule 在接口中 Loaderpublic void serialize(DataOutput out) throws IOException
serialize 在接口中 SerializableIOExceptionCopyright © 2022. All rights reserved.