How can I get input from user with IdaPython?
When I tried str = input()
,I got error RuntimeError: input(): lost.sys.stdin
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.
Sign up to join this communityYou can use the ask_*
functions from the ida_kernwin
module.
For example:
ask_long
: Display a dialog box and wait for the user to input an numberask_str
: Display a dialog box and wait for the user to input a text stringask_file
: Display a dialog box and wait for the user to input a file nameask_form
: Display a dialog box and wait for the userThere are also the choose_*
functions if you want the user to choose something from the database (function, segment, structure). And fully customisable forms (see this example).
ida_kernwin
? is there a build in option to get string without install module?
Mar 25, 2020 at 9:30
ida_kernwin
module is part of IDAPython. Try pasting the following code into the interpreter in the Output window: ida_kernwin.ask_str("Default value", 0, "Please enter string")
import ida_kerwin
and I get ` No moudle named 'ida_kerwin'`
Mar 25, 2020 at 10:52