diff options
| author | serpilliere <devnull@localhost> | 2011-10-03 09:22:24 +0200 |
|---|---|---|
| committer | serpilliere <devnull@localhost> | 2011-10-03 09:22:24 +0200 |
| commit | 0f8d9874345d4ceae672e6c794a1071d880b5f69 (patch) | |
| tree | 49fd4564d647c6821f4a116ed4ae4df4c6c8a830 /example/disas_and_graph.py | |
| parent | 18902bb5f758e9c6a1b183f0b4a4f08c3d825f5f (diff) | |
| download | miasm-0f8d9874345d4ceae672e6c794a1071d880b5f69.tar.gz miasm-0f8d9874345d4ceae672e6c794a1071d880b5f69.zip | |
rem EQ token
Diffstat (limited to 'example/disas_and_graph.py')
| -rwxr-xr-x | example/disas_and_graph.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/example/disas_and_graph.py b/example/disas_and_graph.py index 6f505df3..268af176 100755 --- a/example/disas_and_graph.py +++ b/example/disas_and_graph.py @@ -20,13 +20,7 @@ except ImportError: import pickle import sys - - - -print sys.argv - - -parser = OptionParser() +parser = OptionParser(usage = "usage: %prog [options] file") parser.add_option('-a', "--address", dest="address", metavar="ADDRESS", help="address to disasemble") parser.add_option('-m', "--architecture", dest="machine",metavar="MACHINE", @@ -39,8 +33,9 @@ parser.add_option('-r', "--rawfile", dest="rawfile", action="store_true", help="dont use PE/ELF/CLASS autodetect, disasm raw file") (options, args) = parser.parse_args(sys.argv[1:]) -print options, args - +if not args: + parser.print_help() + sys.exit(0) fname = args[0] ad_to_dis = options.address |