コード例 #1
0
ファイル: StalkPhish.py プロジェクト: securycore/StalkPhish
def main():
    global SQL
    try:
        # Config
        ConfAnalysis(ConfFile)

        # Output options
        P = VerifyPath()
        LOG.info("Configuration file to use: " + ConfFile)
        LOG.info("Database: " + DBfile)
        SQL = SqliteCmd(DBfile)
        LOG.info("Main table: " + TABLEname)
        SQL.SQLiteCreateTable(TABLEname)
        LOG.info("Investigation table: " + InvTABLEname)
        SQL.SQLiteInvestigCreateTable(InvTABLEname)
        LOG.info("Files directory: " + SrcDir)
        LOG.info("Download directory: " + DLDir)
        LOG.info("Declared Proxy: " + str(PROXY) + "\n")

        # Modules launch
        if OSINTsources is "YES":
            LaunchModules()
        else:
            pass

        # Phishing Kit download launch if activated
        if DLPhishingKit is "YES":
            TryDLPK(TABLEname, InvTABLEname, DLDir, SQL, PROXY, LOG, UAFILE)
        else:
            pass

    except:
        err = sys.exc_info()
        LOG.error("Main error " + str(err))
コード例 #2
0
ファイル: StalkPhish.py プロジェクト: u53r55/StalkPhish
def main():
    global SQL
    try:
        # Config
        ConfAnalysis(ConfFile)

        # Output options
        P = VerifyPath()
        LOG.info("Configuration file to use: " + ConfFile)
        LOG.info("Database: " + DBfile)
        SQL = SqliteCmd(DBfile)
        LOG.info("Main table: " + TABLEname)
        SQL.SQLiteCreateTable(TABLEname)
        LOG.info("Investigation table: " + InvTABLEname)
        SQL.SQLiteInvestigCreateTable(InvTABLEname)
        LOG.info("Files directory: " + SrcDir)
        LOG.info("Download directory: " + DLDir)
        LOG.info("Declared Proxy: " + str(PROXY) + "\n")

        # Test proxy connection
        if PROXY:
            proxystring = PROXY.split('//')[1]
            proxyipadd = proxystring.split(':')[0]
            proxyport = proxystring.split(':')[1]
            s = socket.socket()
            try:
                s.connect((proxyipadd, int(proxyport)))
            except:
                LOG.error("Proxy connection error, exiting!")
                sys.exit(10)
        else:
            pass

        # Only add URL into Database
        if UniqueURL is "YES":
            LOG.info("Add URL into database: {}".format(URLadd))
            AddUniqueURL(URLadd, LOG, SQL, TABLEname, PROXY, UAFILE)
            sys.stdout.flush()
            os._exit(0)
        else:
            pass

        # Modules launch
        if OSINTsources is "YES":
            LaunchModules()
        else:
            pass

        # Phishing Kit download launch if activated
        if DLPhishingKit is "YES":
            LOG.info("Starting trying to download phishing kits sources...")
            TryDLPK(TABLEname, InvTABLEname, DLDir, SQL, PROXY, LOG, UAFILE)
        else:
            pass

    except:
        err = sys.exc_info()
        LOG.error("Main error " + str(err))