我正在尝试创建一个黑色背景的根窗口,以与我的按钮背景混合.
我有以下内容:
class Application(Frame):
def __init__(self, parent):
Frame.__init__(self, parent)
self.parent = parent
self.initUI()
...
def initUI(self):
self.outputBox = Text(bg='black', fg='green', relief=SUNKEN, yscrollcommand='TRUE')
self.outputBox.pack(fill='both', expand=True)
self.button1 = Button(self, text='button1', width=40, bg ='black', fg='green', activebackground='black', activeforeground='green')
self.button1.pack(side=RIGHT, padx=5, pady=5)
self.button2 = Button(self, text='button2', width=20, bg='black', fg='green', activebackground='black', activeforeground='green')
self.button2.pack(side=LEFT, padx=5, pady=5)
...
def main():
root = Tk()
root.geometry('1100x350+500+300')
root.configure(background = 'black')
app = Application(root)
root.mainloop()
Run Code Online (Sandbox Code Playgroud)
但是root.configure(background = 'black')没有改变根窗口的背景颜色......有什么建议吗?
无论我在哪里看通过CreateRemoteThread注入的方法都是一样的,但是抓取进程ID的方法不是......我的函数将返回正确的进程ID,我对此没有任何帮助,所以我将无效该部分只包括实际注射.
我只是学习DLL注入,我试图在notepad.exe上.如果注射工作,记事本的标题将从"无标题 - 记事本"变为"挂钩".
#define DLL_NAME "injectme.dll"
.....
BOOL InjectRemoteThread(DWORD ProcessID)
{
HANDLE RemoteProc;
char buf[50] = {0};
LPVOID MemAlloc;
LPVOID LoadLibAddress;
// Process ID does show correctly!
WCHAR id[100];
StringCbPrintf(id, 100, L"%d", ProcessID); // id contains the process ID... is confirmed in comparing ID shown in tasklist and the messagebox.
MessageBox(NULL, id, L"Process ID", MB_ICONINFORMATION);
// Process ID does show correctly!
if ( !ProcessID )
{
MessageBox(NULL, (LPCWSTR)GetLastError(), L"An error occured", NULL);
return 0;
}
RemoteProc = OpenProcess(PROCESS_VM_OPERATION | …Run Code Online (Sandbox Code Playgroud)