Пример #1
0
 def ProcessReadLogger(self):
     if path.exists('Logs/AccessPoint/injectionPage.log'):
         self.injectionThread = ThreadPopen(
             ['tail', '-f', 'Logs/AccessPoint/injectionPage.log'])
         self.connect(self.injectionThread,
                      SIGNAL('Activated ( QString ) '),
                      self.GetloggerInjection)
         self.injectionThread.setObjectName('Pump-Proxy::Capture')
         return self.injectionThread.start()
     QMessageBox.warning(self, 'error proxy logger',
                         'Pump-Proxy::capture is not found')
Пример #2
0
 def ProcessReadLogger(self):
     if path.exists('Logs/AccessPoint/injectionPage.log'):
         self.injectionThread = ThreadPopen(['tail','-f','Logs/AccessPoint/injectionPage.log'])
         self.connect(self.injectionThread,SIGNAL('Activated ( QString ) '), self.GetloggerInjection)
         self.injectionThread.setObjectName('Pump-Proxy::Capture')
         return self.injectionThread.start()
     QMessageBox.warning(self,'error proxy logger','Pump-Proxy::capture is not found')
Пример #3
0
 def Start_Get_creds(self):
     self.listDns.clear()
     # Thread Capture logs
     if path.exists('Logs/Phishing/Webclone.log'):
         dns = ThreadPopen(['tail','-f','Logs/Phishing/Webclone.log'])
         self.connect(dns,SIGNAL('Activated ( QString ) '), self.loggerdns)
         dns.setObjectName('Phishing::Capture')
         self.thread.append(dns)
         dns.start()
         return
     QMessageBox.warning(self,'error Phishing logger','Phishing::capture no logger found')
Пример #4
0
class PumpkinProxy(QVBoxLayout):
    ''' settings  Transparent Proxy '''
    sendError = pyqtSignal(str)
    _PluginsToLoader = {'Plugins': None, 'Content': ''}

    def __init__(self, popup, parent=None):
        super(PumpkinProxy, self).__init__(parent)
        self.popup = popup
        self.urlinjected = []
        self.FSettings = frm_Settings()
        self.Home = QFormLayout()
        self.statusbar = QStatusBar()
        self.lname = QLabel('Proxy::scripts::')
        self.lstatus = QLabel('')
        self.argsLabel = QLabel('')
        self.hBox = QHBoxLayout()
        self.hBoxargs = QHBoxLayout()
        self.btnLoader = QPushButton('Reload')
        self.btnEnable = QPushButton('Enable')
        self.btncancel = QPushButton('Cancel')
        self.btnbrownser = QPushButton('Browser')
        self.comboxBox = QComboBox()
        self.log_inject = QListWidget()
        self.docScripts = QTextEdit()
        self.argsScripts = QLineEdit()
        self.btncancel.setIcon(QIcon('Icons/cancel.png'))
        self.btnLoader.setIcon(QIcon('Icons/search.png'))
        self.btnEnable.setIcon(QIcon('Icons/accept.png'))
        self.btnbrownser.setIcon(QIcon("Icons/open.png"))
        self.statusbar.addWidget(self.lname)
        self.statusbar.addWidget(self.lstatus)
        self.docScripts.setFixedHeight(40)
        self.statusInjection(False)
        self.argsScripts.setEnabled(False)
        self.btnbrownser.setEnabled(False)

        # group settings
        self.GroupSettings = QGroupBox()
        self.GroupSettings.setTitle('Settings:')
        self.SettingsLayout = QFormLayout()
        self.hBox.addWidget(self.comboxBox)
        self.hBox.addWidget(self.btnLoader)
        self.hBox.addWidget(self.btnEnable)
        self.hBox.addWidget(self.btncancel)
        self.hBoxargs.addWidget(self.argsLabel)
        self.hBoxargs.addWidget(self.argsScripts)
        self.hBoxargs.addWidget(self.btnbrownser)
        self.SettingsLayout.addRow(self.hBox)
        self.SettingsLayout.addRow(self.hBoxargs)
        self.GroupSettings.setLayout(self.SettingsLayout)
        #group logger
        self.GroupLogger = QGroupBox()
        self.GroupLogger.setTitle('Logger Injection:')
        self.LoggerLayout = QFormLayout()
        self.LoggerLayout.addRow(self.log_inject)
        self.GroupLogger.setLayout(self.LoggerLayout)

        #group descriptions
        self.GroupDoc = QGroupBox()
        self.GroupDoc.setTitle('Description:')
        self.DocLayout = QFormLayout()
        self.DocLayout.addRow(self.docScripts)
        self.GroupDoc.setLayout(self.DocLayout)

        #connections
        self.SearchProxyPlugins()
        self.readDocScripts('html_injector')
        self.btnLoader.clicked.connect(self.SearchProxyPlugins)
        self.connect(self.comboxBox, SIGNAL('currentIndexChanged(QString)'),
                     self.readDocScripts)
        self.btnEnable.clicked.connect(self.setPluginsActivated)
        self.btncancel.clicked.connect(self.unsetPluginsConf)
        self.btnbrownser.clicked.connect(self.get_filenameToInjection)
        # add widgets
        self.Home.addRow(self.GroupSettings)
        self.Home.addRow(self.GroupDoc)
        self.Home.addRow(self.GroupLogger)
        self.Home.addRow(self.statusbar)
        self.addLayout(self.Home)

    def get_filenameToInjection(self):
        filename = QFileDialog.getOpenFileName(
            None, 'load File', '', 'HTML (*.html);;js (*.js);;css (*.css)')
        if len(filename) > 0:
            self.argsScripts.setText(filename)
            QMessageBox.information(None, 'Scripts Loaders',
                                    'file has been loaded with success.')

    def setPluginsActivated(self):
        if self.popup.check_sslstrip.isChecked():
            item = str(self.comboxBox.currentText())
            if self.plugins[str(item)]._requiresArgs:
                if len(self.argsScripts.text()) != 0:
                    self._PluginsToLoader['Plugins'] = item
                    self._PluginsToLoader['Content'] = str(
                        self.argsScripts.text())
                else:
                    return self.sendError.emit(
                        'this module proxy requires {} args'.format(
                            self.argsLabel.text()))
            else:
                self._PluginsToLoader['Plugins'] = item
            self.btnEnable.setEnabled(False)
            self.ProcessReadLogger()
            return self.statusInjection(True)
        self.sendError.emit('sslstrip is not enabled.'.format(
            self.argsLabel.text()))

    def ProcessReadLogger(self):
        if path.exists('Logs/AccessPoint/injectionPage.log'):
            self.injectionThread = ThreadPopen(
                ['tail', '-f', 'Logs/AccessPoint/injectionPage.log'])
            self.connect(self.injectionThread,
                         SIGNAL('Activated ( QString ) '),
                         self.GetloggerInjection)
            self.injectionThread.setObjectName('Pump-Proxy::Capture')
            return self.injectionThread.start()
        QMessageBox.warning(self, 'error proxy logger',
                            'Pump-Proxy::capture is not found')

    def GetloggerInjection(self, data):
        if data not in self.urlinjected:
            self.log_inject.addItem(data)
            self.urlinjected.append(data)
        self.log_inject.scrollToBottom()

    def statusInjection(self, server):
        if server:
            self.lstatus.setText('[ ON ]')
            self.lstatus.setStyleSheet('QLabel {  color : green; }')
        else:
            self.lstatus.setText('[ OFF ]')
            self.lstatus.setStyleSheet('QLabel {  color : red; }')

    def readDocScripts(self, item):
        try:
            self.docScripts.setText(self.plugins[str(item)].__doc__)
            if self.plugins[str(item)]._requiresArgs:
                if 'FilePath' in self.plugins[str(item)]._argsname:
                    self.btnbrownser.setEnabled(True)
                else:
                    self.btnbrownser.setEnabled(False)
                self.argsScripts.setEnabled(True)
                self.argsLabel.setText(self.plugins[str(item)]._argsname)
            else:
                self.argsScripts.setEnabled(False)
                self.btnbrownser.setEnabled(False)
                self.argsLabel.setText('')
        except Exception:
            pass

    def unsetPluginsConf(self):
        if hasattr(self, 'injectionThread'): self.injectionThread.stop()
        self._PluginsToLoader = {'Plugins': None, 'args': ''}
        self.btnEnable.setEnabled(True)
        self.statusInjection(False)
        self.argsScripts.clear()
        self.log_inject.clear()
        self.urlinjected = []

    def SearchProxyPlugins(self):
        self.comboxBox.clear()
        self.plugin_classes = Plugin.PluginProxy.__subclasses__()
        self.plugins = {}
        for p in self.plugin_classes:
            self.plugins[p._name] = p()
        self.comboxBox.addItems(self.plugins.keys())
Пример #5
0
 def Start_Get_creds(self):
     self.listDns.clear()
     self.list_creds.clear()
     # Thread Capture logs
     creds = ThreadPopen(['tail','-f','Logs/AccessPoint/credentials.log'])
     self.connect(creds,SIGNAL('Activated ( QString ) '), self.loggercreds)
     creds.setObjectName('Netcreds::Credentials')
     urls = ThreadPopen(['tail','-f','Logs/AccessPoint/urls.log'])
     self.connect(urls,SIGNAL('Activated ( QString ) '), self.loggerurls)
     urls.setObjectName('Netcreds::Urls')
     if path.exists('Logs/AccessPoint/credentials.log'):
         self.thread.append(creds)
         creds.start()
     if path.exists('Logs/AccessPoint/urls.log'):
         self.thread.append(urls)
         urls.start()
     if not urls.isRunning():
         QMessageBox.warning(self,'error logger read','netcreds no logger found.')
Пример #6
0
class PumpkinProxy(QVBoxLayout):
    ''' settings  Transparent Proxy '''
    sendError = pyqtSignal(str)
    _PluginsToLoader = {'Plugins': None,'Content':''}
    def __init__(self,popup,parent = None):
        super(PumpkinProxy, self).__init__(parent)
        self.popup      = popup
        self.urlinjected= []
        self.FSettings  = frm_Settings()
        self.Home       = QFormLayout()
        self.statusbar  = QStatusBar()
        self.lname      = QLabel('Proxy::scripts::')
        self.lstatus    = QLabel('')
        self.argsLabel  = QLabel('')
        self.hBox       = QHBoxLayout()
        self.hBoxargs   = QHBoxLayout()
        self.btnLoader  = QPushButton('Reload')
        self.btnEnable  = QPushButton('Enable')
        self.btncancel  = QPushButton('Cancel')
        self.btnbrownser= QPushButton('Browser')
        self.comboxBox  = QComboBox()
        self.log_inject = QListWidget()
        self.docScripts = QTextEdit()
        self.argsScripts= QLineEdit()
        self.btncancel.setIcon(QIcon('Icons/cancel.png'))
        self.btnLoader.setIcon(QIcon('Icons/search.png'))
        self.btnEnable.setIcon(QIcon('Icons/accept.png'))
        self.btnbrownser.setIcon(QIcon("Icons/open.png"))
        self.statusbar.addWidget(self.lname)
        self.statusbar.addWidget(self.lstatus)
        self.docScripts.setFixedHeight(40)
        self.statusInjection(False)
        self.argsScripts.setEnabled(False)
        self.btnbrownser.setEnabled(False)

        # group settings
        self.GroupSettings  = QGroupBox()
        self.GroupSettings.setTitle('Settings:')
        self.SettingsLayout = QFormLayout()
        self.hBox.addWidget(self.comboxBox)
        self.hBox.addWidget(self.btnLoader)
        self.hBox.addWidget(self.btnEnable)
        self.hBox.addWidget(self.btncancel)
        self.hBoxargs.addWidget(self.argsLabel)
        self.hBoxargs.addWidget(self.argsScripts)
        self.hBoxargs.addWidget(self.btnbrownser)
        self.SettingsLayout.addRow(self.hBox)
        self.SettingsLayout.addRow(self.hBoxargs)
        self.GroupSettings.setLayout(self.SettingsLayout)
        #group logger
        self.GroupLogger  = QGroupBox()
        self.GroupLogger.setTitle('Logger Injection:')
        self.LoggerLayout = QFormLayout()
        self.LoggerLayout.addRow(self.log_inject)
        self.GroupLogger.setLayout(self.LoggerLayout)

        #group descriptions
        self.GroupDoc  = QGroupBox()
        self.GroupDoc.setTitle('Description:')
        self.DocLayout = QFormLayout()
        self.DocLayout.addRow(self.docScripts)
        self.GroupDoc.setLayout(self.DocLayout)

        #connections
        self.SearchProxyPlugins()
        self.readDocScripts('html_injector')
        self.btnLoader.clicked.connect(self.SearchProxyPlugins)
        self.connect(self.comboxBox,SIGNAL('currentIndexChanged(QString)'),self.readDocScripts)
        self.btnEnable.clicked.connect(self.setPluginsActivated)
        self.btncancel.clicked.connect(self.unsetPluginsConf)
        self.btnbrownser.clicked.connect(self.get_filenameToInjection)
        # add widgets
        self.Home.addRow(self.GroupSettings)
        self.Home.addRow(self.GroupDoc)
        self.Home.addRow(self.GroupLogger)
        self.Home.addRow(self.statusbar)
        self.addLayout(self.Home)

    def get_filenameToInjection(self):
        filename = QFileDialog.getOpenFileName(None,
        'load File','','HTML (*.html);;js (*.js);;css (*.css)')
        if len(filename) > 0:
            self.argsScripts.setText(filename)
            QMessageBox.information(None, 'Scripts Loaders', 'file has been loaded with success.')

    def setPluginsActivated(self):
        if self.popup.check_sslstrip.isChecked():
            item = str(self.comboxBox.currentText())
            if self.plugins[str(item)]._requiresArgs:
                if len(self.argsScripts.text()) != 0:
                    self._PluginsToLoader['Plugins'] = item
                    self._PluginsToLoader['Content'] = str(self.argsScripts.text())
                else:
                    return self.sendError.emit('this module proxy requires {} args'.format(self.argsLabel.text()))
            else:
                self._PluginsToLoader['Plugins'] = item
            self.btnEnable.setEnabled(False)
            self.ProcessReadLogger()
            return self.statusInjection(True)
        self.sendError.emit('sslstrip is not enabled.'.format(self.argsLabel.text()))

    def ProcessReadLogger(self):
        if path.exists('Logs/AccessPoint/injectionPage.log'):
            self.injectionThread = ThreadPopen(['tail','-f','Logs/AccessPoint/injectionPage.log'])
            self.connect(self.injectionThread,SIGNAL('Activated ( QString ) '), self.GetloggerInjection)
            self.injectionThread.setObjectName('Pump-Proxy::Capture')
            return self.injectionThread.start()
        QMessageBox.warning(self,'error proxy logger','Pump-Proxy::capture is not found')

    def GetloggerInjection(self,data):
        if data not in self.urlinjected:
            self.log_inject.addItem(data)
            self.urlinjected.append(data)
        self.log_inject.scrollToBottom()

    def statusInjection(self,server):
        if server:
            self.lstatus.setText('[ ON ]')
            self.lstatus.setStyleSheet('QLabel {  color : green; }')
        else:
            self.lstatus.setText('[ OFF ]')
            self.lstatus.setStyleSheet('QLabel {  color : red; }')

    def readDocScripts(self,item):
        try:
            self.docScripts.setText(self.plugins[str(item)].__doc__)
            if self.plugins[str(item)]._requiresArgs:
                if 'FilePath' in self.plugins[str(item)]._argsname:
                    self.btnbrownser.setEnabled(True)
                else:
                    self.btnbrownser.setEnabled(False)
                self.argsScripts.setEnabled(True)
                self.argsLabel.setText(self.plugins[str(item)]._argsname)
            else:
                self.argsScripts.setEnabled(False)
                self.btnbrownser.setEnabled(False)
                self.argsLabel.setText('')
        except Exception:
            pass

    def unsetPluginsConf(self):
        if hasattr(self,'injectionThread'): self.injectionThread.stop()
        self._PluginsToLoader = {'Plugins': None,'args':''}
        self.btnEnable.setEnabled(True)
        self.statusInjection(False)
        self.argsScripts.clear()
        self.log_inject.clear()
        self.urlinjected = []

    def SearchProxyPlugins(self):
        self.comboxBox.clear()
        self.plugin_classes = Plugin.PluginProxy.__subclasses__()
        self.plugins = {}
        for p in self.plugin_classes:
            self.plugins[p._name] = p()
        self.comboxBox.addItems(self.plugins.keys())