Example #1
0
def bokken():

    import sys, os

    # Go with GTK, but first check the DISPLAY environment variable
    if sys.platform != "win32":
        display = os.getenv("DISPLAY").strip()
        if not display:
            print(
                "The DISPLAY environment variable is not set! You can not use any graphical program without it..."
            )
            sys.exit(1)

    try:
        import argparse
    except ImportError:
        print(
            'No argparse module found. Install it or use Python 2.7 or later')
        sys.exit(1)

    parser = argparse.ArgumentParser()
    parser.add_argument('file_to_load', nargs='?', help='File to load')
    parser.add_argument('-r',
                        '--radare',
                        action='store_true',
                        help='Select the radare2 core')
    parser.add_argument('-w',
                        '--web',
                        action='store_true',
                        help='Start up Mune, the internal web server.')
    parser.add_argument('-l',
                        '--port',
                        nargs='?',
                        default=4546,
                        help='Port for the web server (default: 4546)')
    parser.add_argument(
        '-b',
        '--bind_address',
        nargs='?',
        default='0.0.0.0',
        help='Local IP address to bind the web server to (default: all)')
    args = parser.parse_args()

    if args.radare:
        args.radare = False

    if args.web:
        glob.http_server = True
        glob.http_server_port = int(args.port)
        glob.http_server_bind_address = args.bind_address

    import ui.main as main
    main.main(
        args.file_to_load,
        'radare' if args.radare else '',
    )
Example #2
0
def bokken():

    import sys, os

    # Go with GTK, but first check the DISPLAY environment variable
    if sys.platform != "win32":
        display = os.getenv("DISPLAY").strip()
        if not display:
            print("The DISPLAY environment variable is not set! You can not use any graphical program without it...")
            sys.exit(1)

    try:
        import argparse
    except ImportError:
        print('No argparse module found. Install it or use Python 2.7 or later')
        sys.exit(1)

    parser = argparse.ArgumentParser()
    parser.add_argument('file_to_load', nargs='?',
                        help='File to load')
    parser.add_argument('-r', '--radare', action='store_true',
                        help='Select the radare2 core')
    parser.add_argument('-w', '--web', action='store_true',
                        help='Start up Mune, the internal web server.')
    parser.add_argument('-l', '--port', nargs='?', default=4546,
                        help='Port for the web server (default: 4546)')
    parser.add_argument('-b', '--bind_address', nargs='?', default='0.0.0.0',
                        help='Local IP address to bind the web server to (default: all)')
    args = parser.parse_args()

    if args.radare:
        args.radare = False

    if args.web:
        glob.http_server = True
        glob.http_server_port = int(args.port)
        glob.http_server_bind_address = args.bind_address

    import ui.main as main
    main.main(args.file_to_load,
              'radare' if args.radare else '',
              )
Example #3
0
from ui.main import main

if __name__ == '__main__':
    main()
Example #4
0
from ui import main

main.main()
Example #5
0
import wx
app = wx.PySimpleApp()
from ui.main import main
main()
Example #6
0
#       MA 02110-1301, USA.

import sys, os

# go with GTK, but first check about DISPLAY environment variable
if sys.platform != "win32":
    display = os.getenv("DISPLAY").strip()
    if not display:
        print "The DISPLAY environment variable is not set! You can not use any graphical program without it..."
        sys.exit(1)

import ui.main as main

if __name__ == "__main__":
    if len(sys.argv) == 1:
        main.main('', '')
    elif len(sys.argv) == 2:
        if '-r' in sys.argv:
            main.main('', 'radare')
        elif '-p' in sys.argv:
            main.main('', 'pyew')
        else:
            main.main(sys.argv[1], '')
    elif len(sys.argv) == 3:
        if '-r' in sys.argv:
            main.main(sys.argv[2], 'radare')
        elif '-p' in sys.argv:
            main.main(sys.argv[2], 'pyew')
        else:
            print "Incorrect arguments"
            main.main('', '')
Example #7
0
#       MA 02110-1301, USA.

import sys, os

# go with GTK, but first check about DISPLAY environment variable
if sys.platform != "win32":
    display = os.getenv("DISPLAY").strip()
    if not display:
        print "The DISPLAY environment variable is not set! You can not use any graphical program without it..."
        sys.exit(1)

import ui.main as main

if __name__ == "__main__":
    if len(sys.argv) == 1:
        main.main("", "")
    elif len(sys.argv) == 2:
        if "-r" in sys.argv:
            main.main("", "radare")
        elif "-p" in sys.argv:
            main.main("", "pyew")
        else:
            main.main(sys.argv[1], "")
    elif len(sys.argv) == 3:
        if "-r" in sys.argv:
            main.main(sys.argv[2], "radare")
        elif "-p" in sys.argv:
            main.main(sys.argv[2], "pyew")
        else:
            print "Incorrect arguments"
            main.main("", "")
Example #8
0
import wx; app = wx.PySimpleApp()
from ui.main import main; main()