IDAPython 1.4.1:

- added AUTHORS.txt and changed the banner
- IDAPython_ExecFile() will print script execution errors to the log window too
- added 'ph' into idaapi. It is a replacement for idaapi.cvar.ph
- added runscript to init.py for backward compatibility
- added cli_t support
This commit is contained in:
elias.bachaalany
2010-07-16 12:07:49 +00:00
parent 8495e5205b
commit 6b0dfd84c0
10 changed files with 966 additions and 32 deletions
+17 -6
View File
@@ -39,16 +39,27 @@ class IDAPythonStdOut:
def isatty(self):
return False
# -----------------------------------------------------------------------
def runscript(script):
"""
Executes a script.
This function is present for backward compatiblity. Please use idaapi.IDAPython_ExecScript() instead
@param script: script path
@return: Error string or None on success
"""
import idaapi
return idaapi.IDAPython_ExecScript(script, globals())
# -----------------------------------------------------------------------
def print_banner():
banner = [
"Python interpreter version %d.%d.%d %s (serial %d)" % sys.version_info,
"Copyright (c) 1990-2010 Python Software Foundation - http://www.python.org/",
"",
"IDAPython" + (" 64-bit" if __EA64__ else "") + " version %d.%d.%d %s (serial %d)" % IDAPYTHON_VERSION,
"Copyright (c) 2004-2010 Gergely Erdelyi - http://code.google.com/p/idapython/"
"Python %d.%d.%d %s (serial %d) (c) 1990-2010 Python Software Foundation" % sys.version_info,
"IDAPython" + (" 64-bit" if __EA64__ else "") + " v%d.%d.%d %s (serial %d) (c) The IDAPython Team <idapython@googlegroups.com>" % IDAPYTHON_VERSION
]
sepline = '-' * max([len(s) for s in banner])
sepline = '-' * (max([len(s) for s in banner])+1)
print sepline
print "\n".join(banner)