W. Spencer Smith

13 papers C 1Journal 8Unranked 4
YearRankTypeTitle / Venue / Authors
2025 J jnl
Comput. Phys. Commun.
Mohammadali Daeian, Punya Cheema, W. Spencer Smith, Zahra Keshavarz-Motamed
2025 conf
ITiCSE (2)
Sheida Emdadi, W. Spencer Smith, Christopher Kumar Anand
2024 J jnl
CoRR
W. Spencer Smith, Ao Dong, Jacques Carette, Michael D. Noseworthy
2024 J jnl
CoRR
W. Spencer Smith, Jingyi Lin
2023 conf
Eelco Visser Commemorative Symposium
Jacques Carette, W. Spencer Smith, Jason Balaci
2023 J jnl
CoRR
Jacques Carette, W. Spencer Smith, Jason Balaci
2021 J jnl
CoRR
W. Spencer Smith, Jacques Carette, Peter Michalski, Ao Dong, Olu Owojaiye
2019 J jnl
CoRR
Jacques Carette, Brooks MacLachlan, W. Spencer Smith
2018 J jnl
CoRR
W. Spencer Smith, D. Adam Lazzarato, Jacques Carette
2016 conf
SE4Science@ICSE
Dan Szymczak, W. Spencer Smith, Jacques Carette
2016 J jnl
Adv. Eng. Softw.
W. Spencer Smith, D. Adam Lazzarato, Jacques Carette
2011 C conf
PEPM
Jacques Carette, Mustafa Elsheikh, W. Spencer Smith
2008 conf
AISC/MKM/Calculemus
Jacques Carette, W. Spencer Smith, John McCutchan, Christopher Kumar Anand, Alexandre Korobkine
redb/extractors/decompiler/bninja/run.py
← Index redb/extractors/decompiler/bninja/run.py python
import argparse
import json

from decompiler import BinaryNinjaDecompiler
from utils.json_encoder import BinaryNinjaEncoder


def run_from_command_line():
    parser = argparse.ArgumentParser(description="Binary Ninja Decompiler")
    parser.add_argument("filepath", help="Path to the binary file to analyze")
    parser.add_argument(
        "--output", "-o", help="Output JSON file path (default: stdout)"
    )
    parser.add_argument(
        "--timeout",
        "-t",
        type=int,
        default=1200,
        help="Analysis timeout in seconds (default: 1200)",
    )
    args = parser.parse_args()

    with BinaryNinjaDecompiler(args.filepath, args.timeout) as decompiler:
        success = decompiler.extract()

        if not success:
            decompiler.log.error("Analysis failed")
            return 1

        # Output results
        if args.output:
            with open(args.output, "w") as f:
                json.dump(decompiler.analysis_results, f, cls=BinaryNinjaEncoder)
            decompiler.log.info(f"Results written to {args.output}")
        else:
            print(json.dumps(decompiler.analysis_results, cls=BinaryNinjaEncoder))

    return 0


if __name__ == "__main__":
    run_from_command_line()