1
0
Fork 0

WIP: option to disable ASLR

This commit is contained in:
Duncan Ogilvie 2021-11-14 21:25:29 +01:00
parent b27bd5c410
commit d052aff40b
6 changed files with 22 additions and 8 deletions

View File

@ -58,6 +58,7 @@
#define UE_ENGINE_SET_DEBUG_PRIVILEGE 9
#define UE_ENGINE_SAFE_ATTACH 10
#define UE_ENGINE_MEMBP_ALT 11
#define UE_ENGINE_DISABLE_ASLR 12
#define UE_OPTION_REMOVEALL 1
#define UE_OPTION_DISABLEALL 2

View File

@ -1017,6 +1017,7 @@ extern "C" DLL_EXPORT duint _dbg_sendmessage(DBGMSG type, void* param1, void* pa
SetEngineVariable(UE_ENGINE_SET_DEBUG_PRIVILEGE, settingboolget("Engine", "EnableDebugPrivilege"));
SetEngineVariable(UE_ENGINE_SAFE_ATTACH, settingboolget("Engine", "SafeAttach"));
SetEngineVariable(UE_ENGINE_MEMBP_ALT, settingboolget("Engine", "MembpAlt"));
SetEngineVariable(UE_ENGINE_DISABLE_ASLR, settingboolget("Engine", "DisableAslr"));
bOnlyCipAutoComments = settingboolget("Disassembler", "OnlyCipAutoComments");
bNoSourceLineAutoComments = settingboolget("Disassembler", "NoSourceLineAutoComments");
bListAllPages = settingboolget("Engine", "ListAllPages");

View File

@ -578,10 +578,16 @@ bool BpEnumAll(BPENUMCALLBACK EnumCallback, const char* Module, duint base)
BREAKPOINT bpInfo = j->second;
if(bpInfo.type != BPDLL && bpInfo.type != BPEXCEPTION)
{
if(base) //workaround for some Windows bullshit with compatibility mode
if(base) //workaround for some Windows bullshit with compatibility mode
bpInfo.addr += base;
else
bpInfo.addr += ModBaseFromName(bpInfo.mod);
{
char arg[deflen];
sprintf_s(arg, "%s:$%X", bpInfo.mod, bpInfo.addr);
BREAKPOINT found;
if(BpGet(0, bpInfo.type, arg, &found)) //found a breakpoint with name
bpInfo = found;
}
}
setBpActive(bpInfo);

View File

@ -188,6 +188,13 @@ void AbstractTableView::setupColumnConfigDefaultValue(QMap<QString, duint> & map
}
}
void AbstractTableView::editColumnDialog()
{
ColumnReorderDialog reorderDialog(this);
reorderDialog.setWindowTitle(tr("Edit columns"));
reorderDialog.exec();
}
/************************************************************************************
Painting Stuff
************************************************************************************/
@ -489,9 +496,7 @@ void AbstractTableView::mousePressEvent(QMouseEvent* event)
{
if(event->y() < getHeaderHeight())
{
ColumnReorderDialog reorderDialog(this);
reorderDialog.setWindowTitle(tr("Edit columns"));
reorderDialog.exec();
editColumnDialog();
event->accept();
}
}
@ -554,9 +559,7 @@ void AbstractTableView::mouseDoubleClickEvent(QMouseEvent* event)
{
if(event->y() < getHeaderHeight())
{
ColumnReorderDialog reorderDialog(this);
reorderDialog.setWindowTitle(tr("Edit columns"));
reorderDialog.exec();
editColumnDialog();
event->accept();
}
}

View File

@ -143,6 +143,8 @@ public slots:
// ScrollBar Management
void vertSliderActionSlot(int action);
void editColumnDialog();
protected slots:
void ShowDisassemblyPopup(duint addr, int x, int y); // this should probably be a slot, but doesn't need emit fixes (it's already used correctly)
void timerEvent(QTimerEvent* event);

View File

@ -362,6 +362,7 @@ void CPUDisassembly::setupRightClickContextMenu()
});
mMenuBuilder->addAction(makeShortcutAction(DIcon("highlight.png"), tr("&Highlighting mode"), SLOT(enableHighlightingModeSlot()), "ActionHighlightingMode"));
mMenuBuilder->addAction(makeAction("Edit columns...", SLOT(editColumnDialog())));
MenuBuilder* labelMenu = new MenuBuilder(this);
labelMenu->addAction(makeShortcutAction(tr("Label Current Address"), SLOT(setLabelSlot()), "ActionSetLabel"));