예제 #1
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from modules import logger
log = logger.logger_class()

FOOTER_MSG = ""


class message_viewer():
    def HEAD_MESSAGE(self, ID, SITES_IN_DB, SITES_LEFT):

        message = "🔰<b> SYSTEM INFO:</b>\n" \
                  "\n" \
                  "▪️ <b>USER_ID:</b> <code>" + str(ID) + "</code> | ⚛ <b>SITES:</b> " \
                  "<code>" + str(SITES_IN_DB) +  "</code> <b>/</b> ⭐ <b>LEFT:</b> <code>" + str(SITES_LEFT) + "</code>" \
                  "\n" \

        return message

    def BODY_MESSAGE(self):

        message = "▫\n" \
                  "▫️<b>          ⚔ Welcome to Arachni Scanner System 0.8</b> \n" \
                  "▫\n" \
                  "▫️  Katusha🕵️‍♀️ is hight Perfomance SQL vulnerability️ scanner,\n" \
                  "▫️  it is based on Arachni Scanner and can help you to find \n" \
                  "▫️  SQL injection on your target list! It is very   \n" \
                  "▫️  FAST and include ERROR-BASED, TIME BASED & \n" \
                  "▫  BLIND BASED sql injection tests. \n"
예제 #2
0
from threading import Thread
from time import sleep, process_time
import datetime, psutil, os, json, webbrowser, asyncio, logging
import discord
from fuzzywuzzy import fuzz

trys = 0
token = ""
reset_time = 2  #hours
process_list = {}
ptime = 0
was_online = False
id = None
logger = logger_class("logs/bot.log",
                      level=log_level,
                      log_to_console=True,
                      use_caller_name=True,
                      use_file_names=True)
dc_time = None
bar_size = 18
connections = []
channels = ["commands"]
is_running = True
errors = {}
threads = {}
admins = []
loop: asyncio.AbstractEventLoop = None
_watchdog: watchdog = None
_server = None
admin_key = None
예제 #3
0

from modules.logger import logger_class, LEVEL

interpreter = 'python' if system() == 'Windows' else 'python3'
dnull = "NUL" if system() == 'Windows' else "/dev/null"
restart_counter = 0


def is_debugger():
    return gettrace() is not None


logger = logger_class("logs/bot_runner.log",
                      level=LEVEL.DEBUG if is_debugger() else LEVEL.INFO,
                      log_to_console=True,
                      use_caller_name=True,
                      use_file_names=True)


def install_dependencies():
    pre = "sudo " if system() == 'Linux' else ""
    post = " --user" if system() == 'Windows' else ""
    resp = run(f"{pre}{interpreter} -m pip install{post} -r dependencies.txt")
    return resp


def main():
    """
    Main loop that handdles starting the server, and deciding what to do after an update.
    """
예제 #4
0
                               "channel", [], "called")
        self.assertEqual("000000000000000000", msg.get_contained_user_id())

    def test_3_message_has_attachment(self):
        msg = smdb_api.Message("sender", "the message content", "channel", [],
                               "called")
        self.assertFalse(msg.has_attachments())
        msg = smdb_api.Message("sender", "the message content", "channel",
                               [smdb_api.Attachment("name", "url", 12)],
                               "called")
        self.assertTrue(msg.has_attachments())


if __name__ == "__main__":
    print("Creating dummy server...")
    services.logger = logger_class("test", storage_life_extender_mode=True)
    server = services.server(linking_editor, get_status, send_message,
                             get_user, is_admin)
    server._start_for_test()
    th = threading.Thread(target=server.loop)
    th.name = "Dummy server"
    th.start()
    print("Dummy server started")
    print("Setting up unit test data")
    name = "Test"
    key = server.get_api_key_for("Test")
    api = smdb_api.API(name,
                       key,
                       update_function=lambda: print("Update called"))
    print("Unit test started")
    unittest.main(exit=False)