J. W. Cohen

18 papers Misc 1Journal 14Unranked 3
YearRankTypeTitle / Venue / Authors
2002 J jnl
Queueing Syst. Theory Appl.
J. W. Cohen
1999 J jnl
Queueing Syst. Theory Appl.
Onno J. Boxma, J. W. Cohen
1998 J jnl
Queueing Syst. Theory Appl.
J. W. Cohen
1998 J jnl
IEEE J. Sel. Areas Commun.
Onno J. Boxma, J. W. Cohen
1996 J jnl
Queueing Syst. Theory Appl.
J. W. Cohen, Douglas G. Down
1991 J jnl
IEEE J. Sel. Areas Commun.
Onno J. Boxma, J. W. Cohen
1988 J jnl
Queueing Syst. Theory Appl.
J. W. Cohen
1987 Misc conf
Performance
J. W. Cohen
1987 J jnl
Queueing Syst. Theory Appl.
J. W. Cohen
1987 conf
Computer Performance and Reliability
J. W. Cohen
1983 conf
MMB
J. W. Cohen
1983 conf
Computer Performance and Reliability
J. W. Cohen
1981 J jnl
Math. Oper. Res.
J. W. Cohen, G. Hooghiemstra
1979 J jnl
Oper. Res.
Onno J. Boxma, J. W. Cohen, N. Huffels
1979 J jnl
Acta Informatica
J. W. Cohen
1978 J jnl
Math. Oper. Res.
J. W. Cohen
1977 J jnl
Math. Oper. Res.
J. W. Cohen, Michael Rubinovitch
1971 J jnl
Oper. Res.
J. W. Cohen
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()