Esempio n. 1
0
File: abc.py Progetto: WoLpH/tribler
class ABCApp(wx.App):
    def __init__(self, x, params, single_instance_checker, abcpath):
        self.params = params
        self.single_instance_checker = single_instance_checker

        self.utility = Utility(abcpath)
        # Set locale to determine localisation
        locale.setlocale(locale.LC_ALL, '')

        sys.stdout.write('Client Starting Up.\n')
        sys.stdout.write('Build: ' + self.utility.lang.get('build') + '\n')
        
        wx.App.__init__(self, x)

    def OnInit(self):
        self.utility.postAppInit()
        self.frame = ABCFrame(-1, self.params, self.utility)

        self.Bind(wx.EVT_QUERY_END_SESSION, self.frame.OnCloseWindow)
        self.Bind(wx.EVT_END_SESSION, self.frame.OnCloseWindow)
        
        return True

    def OnExit(self):
        del self.single_instance_checker
        ClientPassParam("Close Connection")
        
        return 0
Esempio n. 2
0
class ABCApp(wx.App):
    def __init__(self, x, params, single_instance_checker, abcpath):
        self.params = params
        self.single_instance_checker = single_instance_checker

        self.utility = Utility(abcpath)
        # Set locale to determine localisation
        locale.setlocale(locale.LC_ALL, '')

        sys.stdout.write('Client Starting Up.\n')
        sys.stdout.write('Build: ' + self.utility.lang.get('build') + '\n')

        wx.App.__init__(self, x)

    def OnInit(self):
        self.utility.postAppInit()
        self.frame = ABCFrame(-1, self.params, self.utility)

        self.Bind(wx.EVT_QUERY_END_SESSION, self.frame.OnCloseWindow)
        self.Bind(wx.EVT_END_SESSION, self.frame.OnCloseWindow)

        return True

    def OnExit(self):
        del self.single_instance_checker
        ClientPassParam("Close Connection")

        return 0
Esempio n. 3
0
    def __init__(self, x, params, single_instance_checker, abcpath):
        self.params = params
        self.single_instance_checker = single_instance_checker

        self.utility = Utility(abcpath)
        # Set locale to determine localisation
        locale.setlocale(locale.LC_ALL, '')

        sys.stdout.write('Client Starting Up.\n')
        sys.stdout.write('Build: ' + self.utility.lang.get('build') + '\n')

        wx.App.__init__(self, x)
Esempio n. 4
0
File: abc.py Progetto: WoLpH/tribler
    def __init__(self, x, params, single_instance_checker, abcpath):
        self.params = params
        self.single_instance_checker = single_instance_checker

        self.utility = Utility(abcpath)
        # Set locale to determine localisation
        locale.setlocale(locale.LC_ALL, '')

        sys.stdout.write('Client Starting Up.\n')
        sys.stdout.write('Build: ' + self.utility.lang.get('build') + '\n')
        
        wx.App.__init__(self, x)
Esempio n. 5
0
# Logging
logging.getLogger('scrapy').setLevel(logging.CRITICAL)
logging.getLogger('scrapy').propagate = False

# IMPORT OUR CUSTOM CLASSES/LIBS
##############################################################################################

import config
from Utility.utility import Utility
from Db.db import Db
from Exploits import Exploits

# INITIALISE OUR CLASSES/LIBS/GLOBALS
##############################################################################################

U = Utility()
Db = Db()
JOB_URL = config.host['JOB_URL']
JOB_LOGIN_URL = config.host['JOB_LOGIN_URL']
DOMAIN = U.host_from_url(JOB_URL)
SECONDS_BETWEEN_REQUESTS = config.host['SECONDS_BETWEEN_REQUESTS']
USERNAME = config.host['USERNAME']
PASSWORD = config.host['PASSWORD']
# Lits of exploits available for this program
EXPLOITS_LIST = Exploits.load_exploits()
# Pages fetched from the database, after they have been verified to have contained exploits are marked as exploitable
PAGES_ATTACKED_SUCCESSFULLY = []
# List if pages from the database
DB_FETECHED_PAGES_ATTACK_FOR_EXPLOITS = []
CREATED_URL_PAYLOADS = []
EXCLUDE_PAGES = ['logout.php', 'signout']
Esempio n. 6
0
# IMPORT OUR CUSTOM CLASSES/LIBS
##############################################################################################

import config
from Utility.utility import Utility
from Db.db import Db
from Exploits import Exploits

# INITIALISE OUR CLASSES/LIBS/VARS
##############################################################################################

U = Utility()
Db = Db()
JOB_URL = config.host['JOB_URL']

#Lits of exploits available for this program
EXPLOITS_LIST = Exploits.load_exploits()

# Pages fetched from the database, after they have been verified to have contained exploits are marked as exploitable
PAGES_FOUND_WITH_EXPLOITS = []

# List if pages from the database
DB_FETECHED_PAGES_CHECK_FOR_EXPLOITS = []

# START SCRIPT
##############################################################################################
# U.cls()
# U.show_crawling_screen()
JOB = Db.job_get(JOB_URL)
if (JOB):
    JOB_ID = str(JOB['_id'])
# Logging
logging.getLogger('scrapy').setLevel(logging.CRITICAL)
logging.getLogger('scrapy').propagate = False

# IMPORT OUR CUSTOM CLASSES/LIBS
##############################################################################################

import config
from Utility.utility import Utility
from Db.db import Db

# INITIALISE OUR CLASSES/LIBS/GLOBALS
##############################################################################################

U = Utility()
Db = Db()
JOB_URL = config.host['JOB_URL']
JOB_LOGIN_URL = config.host['JOB_LOGIN_URL']
DOMAIN = U.host_from_url(JOB_URL)
SECONDS_BETWEEN_REQUESTS = config.host['SECONDS_BETWEEN_REQUESTS']
USERNAME = config.host['USERNAME']
PASSWORD = config.host['PASSWORD']
GLOBAL_PAGES_ALREADY_SCRAPPED = {}
GLOBAL_UNIQUE_INTERNAL_LINKS = []
GLOBAL_UNIQUE_EXTERNAL_LINKS = []
GLOBAL_INTERNAL_404_PAGES = []
EXCLUDE_PAGES = ['logout.php', 'signout']


#############################################################################################
# SET PATH for our libs/classes
dir_path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(dir_path + '/')
sys.path.append(dir_path + '/test')

# IMPORT OUR CUSTOM CLASSES/LIBS
##############################################################################################
from Db.db import Db
import config
from Utility.utility import Utility
#from Stats.stats import Stats

# INITIALISE OUR CLASSES/LIBS/GLOBALS
##############################################################################################

U = Utility()
Db = Db()
#stats = Stats()
JOB_URL = config.host['JOB_URL']
JOB_LOGIN_URL = config.host['JOB_LOGIN_URL']

#START OUR PROGRAM
##############################################################################################

U.cls()
U.show_splash_screen()
U.show_select_menu()


#Automate the whole process
def automate():