Exemple #1
0
 def _on_dir_select_clicked(self):
     dirpath = get_directory_name_input("Select Git Root Directory")
     if isinstance(dirpath, bytes):
         dirpath = dirpath.decode(
             "utf-8")  # TODO: Use the native encoding on Windows
     if dirpath:
         self._repo_edit.setText(dirpath)
Exemple #2
0
def get_workspace():
    choice = get_choice_input("Select Trace Type", "Input",
                              ["Trace File", "Manticore Workspace"])
    if choice == 0:
        workspace = get_open_filename_input("Trace File")
    else:
        workspace = get_directory_name_input("Workspace Directory")
    return workspace
Exemple #3
0
Fichier : ief.py Projet : etke/ief
def ief_find_export(binview, func):
    """ run `ief <path> -e <symbol>` """
    directory = get_directory_name_input(
        "Directory to search", dirname(binview.file.filename))
    # Assumes `~/.cargo/bin` already exists in PATH
    result = run(["ief", directory.decode('utf-8'), "-e",
                  func.name], capture_output=True)
    directory = directory.decode('utf-8')
    markdown = f"# Results - binaries in '[{directory}]({directory})'" \
               f" with exported symbol '_{func.name}_'`\n\n"
    for line in result.stdout.split(b"\n")[1: -1]:
        npath = normpath(line.decode('utf-8'))
        markdown += f"* [{npath}]({npath})\n"
    show_markdown_report(f"I[E]F - {func.name}",
                         markdown, result.stdout.decode('utf-8'))