Ejemplo n.º 1
0
    def __init__(self):
        """

        :param desktopEntry: Desktop entry this editor should modify.
        :type desktopEntry: desktop.WebDesktopEntry
        """
        super(SiteListWindow, self).__init__()
        self.setupUi(self)

        # self.siteEditor = SiteEditorWindow(None, isWidget=True)
        # self.siteEditor.setupUi(self.siteEditorWidget)
        self.desktopEntry = None
        self.allEntries = []

        self.addButton.clicked.connect(self._onAddSite)
        self.addButton.setIcon(QIcon.fromTheme('list-add'))
        self.removeButton.setIcon(QIcon.fromTheme('list-remove'))
        self.removeButton.clicked.connect(self._onRemoveSite)
        self.closeButton.clicked.connect(self.close)
        self.closeButton.setIcon(QIcon.fromTheme('window-close'))
        self.aboutButton.clicked.connect(lambda x: about.show(self))
        self.aboutButton.setIcon(QIcon.fromTheme('help-about'))

        self.setWindowIcon(QIcon(':appicon'))

        self.rescan()

        self.siteListWidget.currentItemChanged.connect(self._itemActivated)
Ejemplo n.º 2
0
def menu():
    os.system('clear')
    printlogo()
    print("""
    \033[94m         [ R00T MENU ]

            Make A Choice :\033[0m

        \033[93m1)  Information Gathering
        2)  Web Hacking
        3)  Exploitation
        4)  Reverse Engineering
        5)  Encryption/Decryption
        6)  Password Attacks
        7)  Shells
        8)  Privilege Escalation
        9)  Social Engineering
        10) Pentesting & Security Assessment Findings Report Templates
        11) Help with Walk Throughs & Pentest Processing\033[0m
        ------------------------
        \033[94ma)    About  Lockdoor
        u)    Update Lockdoor
        q)    Leave  Lockdoor\033[90m
        """)
    choice = input("\033[92mLockdoor~# \033[0m")
    os.system('clear')
    if choice == "1":
        infogathering.menu()
    elif choice == "2":
        webhack.menu()
    elif choice == "3":
        exploitation.menu()
    elif choice == "4":
        reverse.menu()
    elif choice == "5":
        encdyc.menu()
    elif choice == "6":
        passattack.menu()
    elif choice == "7":
        shells.menu()
    elif choice == "8":
        privesc.menu()
    elif choice == "9":
        soceng.menu()
    elif choice == "10":
        psafrt.psafrt()
    elif choice == "11":
        wtpp.wtpp()
    elif choice == "a":
        about.show()
    elif choice == "u":
        update.lockdoor()
    elif choice == "q":
        printlogo()
        print("")
        now = datetime.now()
        date = now.strftime("%d/%m/%Y %H:%M:%S")
        print(
            "                 \033[91m-[!]- LOCKDOOR IS EXITING -[!]-\033[0m")
        print("")
        print("                 \033[91m-[!]- EXITING AT " + date +
              " -[!]-\033[0m")
        sys.exit()
    elif choice == "":
        menu()
    else:
        menu()
Ejemplo n.º 3
0
    def __init__(self, appid, base, name):
        super(BrowserWindow, self).__init__()

        self.appid = appid
        self.name = name
        self.original_name = name
        self.base = base

        # Main widgets
        self.centralwidget = QWidget(self)
        self.gridLayout_2 = QGridLayout(self.centralwidget)
        self.setCentralWidget(self.centralwidget)
        self.urlLineEdit = QLineEdit(self)
        self.progressBar = QProgressBar(self)

        # Custom webview
        self.page = LocalWebPage()
        self.page.setFeaturePermission(self.page.mainFrame(),
                                       LocalWebPage.Notifications,
                                       LocalWebPage.PermissionGrantedByUser)
        self.webkitNotifications = WebkitNotifications(self)

        self.webViewMain = LocalWebView(self.centralwidget)
        self.webViewMain.setPage(self.page)
        self.gridLayout_2.addWidget(self.webViewMain, 0, 0, 1, 1)

        self.webViewMain.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_2.setContentsMargins(0, 0, 0, 0)

        self.menubar = QMenuBar(self)
        self.menuFile = QMenu(self.menubar)
        self.menuView = QMenu(self.menubar)
        self.menuEdit = QMenu(self.menubar)
        self.menuHelp = QMenu(self.menubar)
        self.setMenuBar(self.menubar)
        self.statusbar = QStatusBar(self)
        self.setStatusBar(self.statusbar)
        self.toolBar = QToolBar(self)
        self.toolBar.setMovable(False)
        self.toolBar.setFloatable(False)
        self.addToolBar(Qt.TopToolBarArea, self.toolBar)

        # Create actions
        self.actionOpenLinkInNewWindow = self.page.action(
            self.page.OpenLinkInNewWindow)
        self.actionOpenLinkInNewWindow.setText(
            tr('BrowserWindow', 'Open in &Browser'))
        self.actionBack = self.page.action(self.page.Back)
        self.actionForward = self.page.action(self.page.Forward)
        self.actionStop = self.page.action(self.page.Stop)
        self.actionReload = self.page.action(self.page.Reload)
        self.actionHome = QAction(self)
        self.actionShowMenu = QAction(self)
        self.actionShowMenu.setCheckable(True)
        self.actionShowToolbar = QAction(self)
        self.actionShowToolbar.setCheckable(True)
        self.actionClose = QAction(self)
        self.actionModifyWebapp = QAction(self)
        self.actionEditPreferences = QAction(self)
        self.actionPrint = QAction(self)
        self.actionSaveLink = self.page.action(self.page.DownloadLinkToDisk)
        self.actionSaveLink.setEnabled(False)
        self.actionAbout = QAction(self)

        # Populate menu and toolbars
        self.menuFile.addAction(self.actionHome)
        self.menuFile.addAction(self.actionBack)
        self.menuFile.addAction(self.actionForward)
        self.menuFile.addAction(self.actionStop)
        self.menuFile.addAction(self.actionReload)
        self.menuFile.addSeparator()
        self.menuFile.addAction(self.actionPrint)
        self.menuFile.addSeparator()
        self.menuFile.addAction(self.actionClose)
        self.menuView.addAction(self.actionShowMenu)
        self.menuView.addAction(self.actionShowToolbar)
        self.menuView.addSeparator()
        self.menuEdit.addAction(self.actionModifyWebapp)
        #self.menuEdit.addAction(self.actionEditPreferences)
        self.menuHelp.addAction(self.actionAbout)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menuEdit.menuAction())
        self.menubar.addAction(self.menuView.menuAction())
        self.menubar.addAction(self.menuHelp.menuAction())
        self.toolBar.addAction(self.actionHome)
        self.toolBar.addAction(self.actionBack)
        self.toolBar.addAction(self.actionForward)
        self.toolBar.addWidget(self.urlLineEdit)

        self.toolBar.addAction(self.actionStop)
        self.toolBar.addAction(self.actionReload)

        self.retranslateUi()
        QMetaObject.connectSlotsByName(self)

        self.setWindowTitle(self.name)

        # Set up cookie jar that persists sessions
        self.cookieJar = PersistableCookieJar(self, identifier=self.appid)
        self.cookieJar.load()
        self.webViewMain.page().networkAccessManager().setCookieJar(
            self.cookieJar)

        # Set up link delegation so that external links open in web browser.
        self.webViewMain.page().setLinkDelegationPolicy(
            QWebPage.DelegateExternalLinks)

        self.desktopEntry = desktop.getEntry(self.appid)

        # Set icons for actions; this can't be done in the designer, AFAICT
        self.actionHome.setIcon(QIcon.fromTheme('go-home'))
        self.actionAbout.setIcon(QIcon.fromTheme('help-about'))

        # Set up shortcuts
        self.actionStop.setShortcut(Qt.Key_Escape)
        self.actionBack.setShortcut(QKeySequence.Back)
        self.actionForward.setShortcut(QKeySequence.Forward)
        self.actionReload.setShortcut(QKeySequence.Refresh)
        self.actionHome.setShortcut('Ctrl+Home')
        self.actionShowMenu.setShortcut('Ctrl+m')
        self.actionShowToolbar.setShortcut('Ctrl+t')
        self.actionPrint.setShortcut(QKeySequence.Print)

        self.backShortcut = QShortcut(self)
        self.backShortcut.setKey(Qt.Key_Back)
        self.backShortcut.activated.connect(self.webViewMain.back)

        self.forwardShortcut = QShortcut(self)
        self.forwardShortcut.setKey(Qt.Key_Forward)
        self.forwardShortcut.activated.connect(self.webViewMain.forward)

        # Set up context menu
        self.webViewMain.setContextMenuPolicy(Qt.CustomContextMenu)
        self.webViewMain.customContextMenuRequested.connect(self.showMenu)

        # Setup statusbar and toolbar
        for c in self.statusBar().children()[0].children():
            c.removeWidget(c)
        self.statusBar().addPermanentWidget(self.progressBar, 1)

        self.actionShowToolbar.setChecked(True)
        self.actionShowMenu.setChecked(True)

        # Icon
        if self.desktopEntry.hasKey('Icon'):
            self.icon = QIcon(self.desktopEntry.get('Icon'))
            self.setWindowIcon(self.icon)
        else:
            self.webViewMain.iconChanged.connect(self.setWindowIcon)

        # Set up events
        if self.desktopEntry.get('X-%s-menu-enabled' % APP_NAME) == '0':
            self.actionShowMenu.setChecked(False)
        else:
            self.actionShowMenu.setChecked(True)
        if self.desktopEntry.get('X-%s-toolbar-enabled' % APP_NAME) == '0':
            self.actionShowToolbar.setChecked(False)
        else:
            self.actionShowToolbar.setChecked(True)

        self.webViewMain.linkClicked.connect(self._onLinkClick)
        self.webViewMain.titleChanged.connect(self.setWindowTitle)
        self.webViewMain.loadProgress.connect(self._setLoadingStatus)
        self.webViewMain.urlChanged.connect(
            lambda x: self.urlLineEdit.setText(x.toString()))
        self.page.printRequested.connect(self._onPrint)
        self.page.loadFinished.connect(self._loadingFinished)
        self.actionHome.triggered.connect(
            lambda x: self.webViewMain.load(QUrl(self.base)))
        self.actionClose.triggered.connect(self.close)
        self.actionPrint.triggered.connect(self._onPrint)
        self.urlLineEdit.returnPressed.connect(self._onUrlEdit)
        self.actionShowToolbar.triggered.connect(self._onShowToolbar)
        self.actionShowMenu.triggered.connect(self._onShowMenu)
        self.actionAbout.triggered.connect(lambda x: about.show(self))
        self.actionModifyWebapp.triggered.connect(self._onModify)

        self._onShowMenu()
        self._onShowToolbar()

        try:
            self.resize(int(self.desktopEntry.getWindowWidth()),
                        int(self.desktopEntry.getWindowHeight()))
        except (ValueError, TypeError):
            self.resize(800, 600)

        # Load first page
        self.webViewMain.load(QUrl(base))

        self.editor = SiteEditorWindow(self.desktopEntry, isNew=False)
Ejemplo n.º 4
0
 def show_ueber(self, event):
     about.show(self.lang)
Ejemplo n.º 5
0
    def about(self):

        about = About(self)
        about.show()