Beispiel #1
0
    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(MainWindow)

    try:
        qss_file = open('./ui/sparta.qss').read()
    except IOError as e:
        print(
            "[-] The sparta.qss file is missing. Your installation seems to be corrupted. Try downloading the latest version."
        )
        exit(0)

    MainWindow.setStyleSheet(qss_file)
    logic = Logic()  # Model prep (logic, db and models)
    view = View(ui, MainWindow)  # View prep (gui)
    controller = Controller(
        view, logic)  # Controller prep (communication between model and view)

    MainWindow.show()

    if args.target:
        print("[+] Target was specified.")
        controller.addHosts(args.target, True, True)

    if args.file:
        print("[+] Nmap XML file was provided.")
        controller.importNmap(args.file)

    sys.exit(app.exec_())