How can I get input from user with IdaPython?
When I tried str = input() ,I got error RuntimeError: input(): lost.sys.stdin
You 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?
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'`
ida_kernwin, not ida_kerwin, and it should already be imported