Code: |
import os,sys,subprocess,time from subprocess import * from os import * from ctypes import * from ctypes.wintypes import * PROCESS_ALL_ACCESS = ( 0x000F0000 | 0x00100000 | 0xFFF ) kernel32 = windll.kernel32 pid = sys.argv[1] h_process = kernel32.OpenProcess( PROCESS_ALL_ACCESS, False, int(pid) ) if not h_process: print "[*] Couldn't acquire a handle to PID: %s" % pid sys.exit(0) user32 = windll.user32 windll.user32.SetDlgItemTextA("hwnd handle of textbox not sure how to get this??",1,"test") this is the line im stuck on |
Code: |
import os,sys,subprocess,time from subprocess import * from os import * from ctypes import * from ctypes.wintypes import * PROCESS_ALL_ACCESS = ( 0x000F0000 | 0x00100000 | 0xFFF ) kernel32 = windll.kernel32 pid = sys.argv[1] h_process = kernel32.OpenProcess( PROCESS_ALL_ACCESS, False, int(pid) ) if not h_process: print "[*] Couldn't acquire a handle to PID: %s" % pid sys.exit(0) user32 = windll.user32 # parent window window_handle = windll.user32.FindWindowA("WindowsApp", None) if not window_handle: print "[*] cant find window" # 1 is the control id of the child window windll.user32.SetDlgItemTextA(window_handle, 1, "bla") |
output generated using printer-friendly topic mod, All times are GMT + 2 Hours