Esempio n. 1
0
def runPasswordsModule(args):
	'''
	Run the Passwords module
	'''
	status = True
	if checkOptionsGivenByTheUser(args,["test-module","get-passwords","get-passwords-from-history"]) == False : return EXIT_MISS_ARGUMENT
	passwords = Passwords(args)
	status = passwords.connection(stopIfError=True)
	if args.has_key('info')==False:
		info = Info(args)
		info.loadInformationRemoteDatabase()
		args['info'] = info
	if args['test-module'] == True :
		args['print'].title("Test if hashed passwords can be got")
		status = passwords.testAll()
	if args['get-passwords'] == True :
		args['print'].title("Try to get Oracle hashed passwords")
		status = passwords.__tryToGetHashedPasswords__()
		if status == True :
			args['print'].goodNews("Here are Oracle hashed passwords:")
			passwords.printPasswords()
		else : 
			args['print'].badNews("Impossible to get hashed passwords: {0}".format(status))
	if args['get-passwords-from-history'] == True :
		args['print'].title("Try to get Oracle hashed passwords from history")
		status = passwords.__tryToGetHashedPasswordsfromHistory__()
		if status == True :
			args['print'].goodNews("Here are Oracle hashed passwords:")
			passwords.printPasswords()
		else : 
			args['print'].badNews("Impossible to get hashed passwords from history: {0}".format(status))
Esempio n. 2
0
def runPasswordsModule(args):
	'''
	Run the Passwords module
	'''
	status = True
	if checkOptionsGivenByTheUser(args,["test-module","info","get-passwords","get-passwords-from-history"]) == False : return EXIT_MISS_ARGUMENT
	passwords = Passwords(args)
	status = passwords.connection(stopIfError=True)
	if args.has_key('info')==False:
		info = Info(args)
		info.loadInformationRemoteDatabase()
		args['info'] = info
	if args['test-module'] == True :
		args['print'].title("Test if hashed passwords can be got")
		status = passwords.testAll()
	if args['get-passwords'] == True :
		args['print'].title("Try to get Oracle hashed passwords")
		status = passwords.__tryToGetHashedPasswords__()
		if status == True :
			args['print'].goodNews("Here are Oracle hashed passwords:")
			passwords.printPasswords()
		else : 
			args['print'].badNews("Impossible to get hashed passwords: {0}".format(status))
	if args['get-passwords-from-history'] == True :
		args['print'].title("Try to get Oracle hashed passwords from history")
		status = passwords.__tryToGetHashedPasswordsfromHistory__()
		if status == True :
			args['print'].goodNews("Here are Oracle hashed passwords:")
			passwords.printPasswords()
		else : 
			args['print'].badNews("Impossible to get hashed passwords from history: {0}".format(status))
Esempio n. 3
0
def CopyXlsx():
    info = Info()
    KEYWORD = info.get('KEYWORD')
    # DIR = info.get('DIR')

    items = os.listdir("./")
    # items = os.listdir(DIR)

    for item in items:
        if KEYWORD in item:
            file_name = item

    shutil.copy("./" + file_name, './excel/' + file_name[len(KEYWORD):])
    os.remove("./" + file_name)
Esempio n. 4
0
def info(bot, update):
    nomeCliente = "Banco de sangue HUCAM"
    numeroTags = 10
    nomeEmpresa = "Sensi telemetria"
    telefoneContato = "27 98983908"
    email = "*****@*****.**"
    contato = "@tallesvaliatti"
    site = "www.sensitelemetria.com"

    infom = Info(nomeCliente, numeroTags, nomeEmpresa, telefoneContato, email,
                 contato, site)

    bot.send_message(update.message.chat_id,
                     infom.get_info(),
                     parse_mode="markdown")
Esempio n. 5
0
 def __init__(self, stopword_path=None, user_dict_path=None):
     '''
         please set the path as absolute path
     '''
     self.stopword_path = stopword_path
     self.user_dict_path = user_dict_path
     information = Info()
Esempio n. 6
0
def main():
    fighter = Fighter()
    info = Info()
    enemy = Enemy()
    bullet = Bullet()
    game = Game(fighter, info, enemy, bullet)
    game.run()
Esempio n. 7
0
    def initInfo(self, **params):
        """Determine name of file and instantiate an Info structure"""
        if self.path == []:
            name = os.path.basename(self.loc)
        else:
            name = self.path[0]

        return Info(name, self.size, **params)
Esempio n. 8
0
def runPasswordsModule(args):
	'''
	Run the Passwords module
	'''
	status = True
	if checkOptionsGivenByTheUser(args,["test-module","get-passwords","get-passwords-from-history", "get-passwords-not-locked"]) == False : return EXIT_MISS_ARGUMENT
	passwords = Passwords(args)
	status = passwords.connection(stopIfError=True)
	passwords.__getLockedUsernames__()
	if args.has_key('info')==False:
		info = Info(args)
		info.loadInformationRemoteDatabase()
		args['info'] = info
	if args['test-module'] == True :
		args['print'].title("Test if hashed passwords can be got")
		status = passwords.testAll()
	if args['get-passwords'] == True :
		args['print'].title("Try to get Oracle hashed passwords")
		status = passwords.__tryToGetHashedPasswords__()
		if status == True :
			args['print'].goodNews("Here are Oracle hashed passwords (some accounts can be locked):")
			passwords.printPasswords()
			args['print'].goodNews("Here are 10g Oracle hashed passwords for oclHashcat (some accounts can be locked):")
			passwords.printPasswordsOclHashcat()
		else : 
			args['print'].badNews("Impossible to get hashed passwords: {0}".format(status))
	if args['get-passwords-not-locked'] == True :
		args['print'].title("Try to get Oracle hashed passwords when the account is not locked")
		blacklistOfUsernames = passwords.__getLockedUsernames__()
		status = passwords.__tryToGetHashedPasswords__(blacklistOfUsernames)
		if status == True :
			args['print'].goodNews("Here are Oracle hashed passwords (all accounts are opened, not locked):")
			passwords.printPasswords()
			args['print'].goodNews("Here are 10g Oracle hashed passwords for oclHashcat (all accounts are opened, not locked):")
			passwords.printPasswordsOclHashcat()
		else : 
			args['print'].badNews("Impossible to get hashed passwords: {0}".format(status))
	if args['get-passwords-from-history'] == True :
		args['print'].title("Try to get Oracle hashed passwords from history")
		status = passwords.__tryToGetHashedPasswordsfromHistory__()
		if status == True :
			args['print'].goodNews("Here are Oracle hashed passwords:")
			passwords.printPasswords()
		else : 
			args['print'].badNews("Impossible to get hashed passwords from history: {0}".format(status))
def ImportMyXlsx():
    path = GetExcelPath()
    info = Info()
    employee_id = str(info.get('MY_ID'))
    boss_id = str(info.get('BOSS_ID'))

    wb = openpyxl.load_workbook(path)
    ws = wb.worksheets[0]
    #シートの最終行を取得
    Sheet_Max_Row = ws.max_row
    #シートの最終列を取得
    Sheet_Max_Clm = ws.max_column
    my_list = []
    title_list = []
    boss_list = []

    myrow = GetRowNumber(ws, Sheet_Max_Row, employee_id)
    bossrow = GetRowNumber(ws, Sheet_Max_Row, boss_id)
    my_list = CreateBaseList(ws, Sheet_Max_Clm, myrow)
    title_list = CreateBaseList(ws, Sheet_Max_Clm, 2)
    boss_list = CreateBaseList(ws, Sheet_Max_Clm, bossrow)
    y_m = YearMonth(ws.cell(row=1, column=1).value)
    start, end = GetStartIndexEndIndex(title_list)
    list_day = title_list[start:end]
    list_status = my_list[start:end]
    list_boss_status = boss_list[start:end]
    result_list = []

    for index in range(len(list_day)):
        bossflag = BossStatus(list_boss_status[index])
        flag, result_dict = SetWorkingTime(list_status[index], bossflag)
        if flag == True:
            list_day[index] = math.floor(list_day[index])
            if list_day[index] < 10:
                list_day[index] = '0' + str(list_day[index])
            else:
                list_day[index] = str(list_day[index])
            result_list.append([
                list_day[index], result_dict["start"], result_dict["end"],
                result_dict["status"]
            ])

    return [y_m, result_list]
Esempio n. 10
0
 def __init__(self):
     self.__heap: Heap = Heap(7)
     self.__info: Info = Info()
     self.__board: Board = Board()
     self.__computer: Computer = Computer(self.__heap, self.__board)
     self.__user: User = User(self.__heap, self.__board, self.__info)
     self.__render: Render = Render(self.__heap, self.__board, self.__info,
                                    self.__computer, self.__user)
     self.__user.set_render(self.__render.render)
     self.__computer.set_render(self.__render.render)
     self.__player: Player = self.select_first()
Esempio n. 11
0
    def __init__(self):

        Gtk.Window.__init__(self)

        self.set_title("TimeControl")
        self.set_icon_from_file(
            os.path.join(BASE_PATH, "img", "timecontrol.png"))
        self.set_resizable(True)
        self.set_size_request(640, 480)
        self.set_border_width(2)
        self.set_position(Gtk.WindowPosition.CENTER)

        self.menuBar = MenuBar()
        self.info = Info()
        self.notebook = Notebook()

        panel = Gtk.Paned(orientation=Gtk.Orientation.HORIZONTAL)
        panel.pack1(self.notebook, resize=True, shrink=False)
        panel.pack2(self.info, resize=False, shrink=True)

        vbox = Gtk.VBox()
        vbox.pack_start(self.menuBar, False, False, 0)
        vbox.pack_start(panel, True, True, 0)

        self.add(vbox)

        self.show_all()

        self.connect("delete-event", self.__salir)
        self.menuBar.connect("adduser", self.__newUser)
        self.menuBar.connect("viewuser", self.__viewUser)

        self._current_user = ''
        self._current_dict = OrderedDict()

        self.notebook.hide()  # Se hace visible cuando se cargan los datos
        self.info.frame.hide()  # Se hace visible cuando se cargan los datos
        self.info.saldo.hide()  # Se hace visible cuando se cargan los datos

        self.notebook.connect('switch_page', self.__switch_page)
        self.notebook.connect('updateuser', self.__update)
Esempio n. 12
0
 def __start(self):
     self.__reset()
     self.__info = Info(self.__input_doors.get(), self.__input_gift.get(),
                        self.__input_repetitions.get(),
                        self.__input_time_simulation.get())
     self.__check_data()
     self.__initialize_game()
     self.__visible_menu1()
     self.__delta = 560 / getdouble(self.__info.repetitions)
     self.__lb_doors['text'] = 'Doors:\t\t' + str(self.__info.doors)
     self.__lb_gift['text'] = 'Gift:\t\t' + str(self.__info.gift)
     self.__lb_repetitions['text'] = 'Repetitions:\t' + str(
         self.__info.repetitions)
     self.__start_time = time.monotonic()
     self.__c.after_idle(self.__tick)
Esempio n. 13
0
def main(mail_list):
    info = Info()
    FROM_ADDRESS = info.get('MAIL', 'FROM_ADDRESS')
    TO_ADDRESS = info.get('MAIL', 'TO_ADDRESS')
    PASSWD = info.get('MAIL', 'PASSWD')
    URL = info.get('MAIL', 'URL')
    K = info.get('K', 'NAME')
    S = info.get('S', 'NAME')

    if mail_list[0] == True:
        body = str(mail_list[2]) + "月の予定を更新しました。\n\n" + K + "\n出勤日数 : " + str(mail_list[3]) + "日\n" + \
                S + "\n出勤日数 : " + str(mail_list[4]) + "日\n\n\n\n下記リンクから確認できます。\n" + URL
        subject = "Google Calendar " + str(mail_list[1]) + "年" + str(mail_list[2]) + "月"
    else:
        body = "パスワードが正しくありません。\n新しいパスワードを連絡して下さい。"
        subject = "Password Error"
    body_msg = CreateMsg(FROM_ADDRESS, TO_ADDRESS, subject, body)
    SendGmail(FROM_ADDRESS, PASSWD, body_msg)


# if __name__ == '__main__':
#     main()
Esempio n. 14
0
class TimeControl(Gtk.Window):
    def __init__(self):

        Gtk.Window.__init__(self)

        self.set_title("TimeControl")
        self.set_icon_from_file(
            os.path.join(BASE_PATH, "img", "timecontrol.png"))
        self.set_resizable(True)
        self.set_size_request(640, 480)
        self.set_border_width(2)
        self.set_position(Gtk.WindowPosition.CENTER)

        self.menuBar = MenuBar()
        self.info = Info()
        self.notebook = Notebook()

        panel = Gtk.Paned(orientation=Gtk.Orientation.HORIZONTAL)
        panel.pack1(self.notebook, resize=True, shrink=False)
        panel.pack2(self.info, resize=False, shrink=True)

        vbox = Gtk.VBox()
        vbox.pack_start(self.menuBar, False, False, 0)
        vbox.pack_start(panel, True, True, 0)

        self.add(vbox)

        self.show_all()

        self.connect("delete-event", self.__salir)
        self.menuBar.connect("adduser", self.__newUser)
        self.menuBar.connect("viewuser", self.__viewUser)

        self._current_user = ''
        self._current_dict = OrderedDict()

        self.notebook.hide()  # Se hace visible cuando se cargan los datos
        self.info.frame.hide()  # Se hace visible cuando se cargan los datos
        self.info.saldo.hide()  # Se hace visible cuando se cargan los datos

        self.notebook.connect('switch_page', self.__switch_page)
        self.notebook.connect('updateuser', self.__update)

    def __update(self, widget, _dict):
        self.info.update(_dict)

    def __switch_page(self, widget, widget_child, indice):
        self.info.switch_page_and_set_user(self._current_user, indice,
                                           self._current_dict)

    def __viewUser(self, widget, name):
        self._current_user = name
        self._current_dict = getDataUser(self._current_user)
        self.notebook.set_data(self._current_user, self._current_dict)
        self.info.switch_page_and_set_user(self._current_user, 0,
                                           self._current_dict)
        self.notebook.show_all()  # Se hace visible cuando se cargan los datos
        self.info.show_all()  # Se hace visible cuando se cargan los datos

    def __newUser(self, widget, name):
        if adduser(name):
            self.menuBar.adduser(name)
        else:
            dialog = Gtk.Dialog(parent=self.get_toplevel(),
                                flags=Gtk.DialogFlags.MODAL,
                                buttons=["OK", Gtk.ResponseType.OK])
            dialog.set_border_width(15)
            label = Gtk.Label("Este Funcionario ya Existe")
            dialog.vbox.pack_start(label, True, True, 5)
            dialog.vbox.show_all()
            dialog.run()
            dialog.destroy()
        self.__viewUser(None, name)

    def __salir(self, widget=None, senial=None):
        Gtk.main_quit()
        sys.exit(0)
Esempio n. 15
0
 def getInfo(self):
     from Info import Info
     return Info(self, [child.getInfo() for child in self._children])
Esempio n. 16
0
def runPasswordsModule(args):
    '''
	Run the Passwords module
	'''
    status = True
    if checkOptionsGivenByTheUser(args, [
            "test-module", "get-passwords", "get-passwords-from-history",
            "get-passwords-not-locked"
    ]) == False:
        return EXIT_MISS_ARGUMENT
    passwords = Passwords(args)
    status = passwords.connection(stopIfError=True)
    passwords.__getLockedUsernames__()
    if args.has_key('info') == False:
        info = Info(args)
        info.loadInformationRemoteDatabase()
        args['info'] = info
    if args['test-module'] == True:
        args['print'].title("Test if hashed passwords can be got")
        status = passwords.testAll()
    if args['get-passwords'] == True:
        args['print'].title("Try to get Oracle hashed passwords")
        status = passwords.__tryToGetHashedPasswords__()
        if status == True:
            args['print'].goodNews(
                "Here are Oracle hashed passwords (some accounts can be locked):"
            )
            passwords.printPasswords()
            args['print'].goodNews(
                "Here are 10g Oracle hashed passwords for oclHashcat (some accounts can be locked):"
            )
            passwords.printPasswordsOclHashcat()
            args['print'].goodNews(
                "Here are 10g Oracle hashed passwords for John the Ripper (some accounts can be locked):"
            )
            passwords.printPasswordsJohn()
        else:
            args['print'].badNews(
                "Impossible to get hashed passwords: {0}".format(status))
    if args['get-passwords-not-locked'] == True:
        args['print'].title(
            "Try to get Oracle hashed passwords when the account is not locked"
        )
        blacklistOfUsernames = passwords.__getLockedUsernames__()
        status = passwords.__tryToGetHashedPasswords__(blacklistOfUsernames)
        if status == True:
            args['print'].goodNews(
                "Here are Oracle hashed passwords (all accounts are opened, not locked):"
            )
            passwords.printPasswords()
            args['print'].goodNews(
                "Here are 10g Oracle hashed passwords for oclHashcat (all accounts are opened, not locked):"
            )
            passwords.printPasswordsOclHashcat()
            args['print'].goodNews(
                "Here are 10g Oracle hashed passwords for John the Ripper (all accounts are opened, not locked):"
            )
            passwords.printPasswordsJohn()
        else:
            args['print'].badNews(
                "Impossible to get hashed passwords: {0}".format(status))
    if args['get-passwords-from-history'] == True:
        args['print'].title("Try to get Oracle hashed passwords from history")
        status = passwords.__tryToGetHashedPasswordsfromHistory__()
        if status == True:
            args['print'].goodNews("Here are Oracle hashed passwords:")
            passwords.printPasswords()
        else:
            args['print'].badNews(
                "Impossible to get hashed passwords from history: {0}".format(
                    status))
Esempio n. 17
0
import datetime
import googleapiclient.discovery
import google.auth
from Info import Info

# 編集スコープの設定(今回は読み書き両方OKの設定)
SCOPES = ['https://www.googleapis.com/auth/calendar']
info = Info()
HOLIDAY_CALENDAR_ID = info.get('S', 'HOLIDAY_CALENDAR_ID')
SUMMARY = info.get('S', 'SUMMARY')
LOCATION = info.get('S', 'LOCATION')
DESCRIPTION = info.get('S', 'DESCRIPTION')
TIMEZONE = info.get('S', 'TIMEZONE')
    
# 認証ファイルを使用して認証用オブジェクトを作成
gapi_creds = google.auth.load_credentials_from_file('credentials.json', SCOPES)[0]
    
# 認証用オブジェクトを使用してAPIを呼び出すためのオブジェクト作成
service = googleapiclient.discovery.build('calendar', 'v3', credentials=gapi_creds)

day_list = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]



def Holiday(year, month):
    sdt = datetime.datetime(year, month, 1, tzinfo=datetime.timezone.utc).isoformat()
    edt = datetime.datetime(year, month, day_list[month], tzinfo=datetime.timezone.utc).isoformat()
    
    # calendarIdに「日本の祝日」のカレンダーIDを指定して、イベントを取得する
    eventsResult = service.events().list(
        calendarId=HOLIDAY_CALENDAR_ID, timeMin=sdt, timeMax=edt,
Esempio n. 18
0
#!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
#                                   Jiao Lin
#                      California Institute of Technology
#                        (C) 2007  All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#

from Info import Info
info = Info(lib='/lib',
            include='/include')  # for mm, config is already taken care of

# version
__id__ = "$Id$"

# End of file
Esempio n. 19
0
def DownloadXlsx():
    CHROME_DRIVER = './chromedriver'

    options = Options()
    options.add_argument('--headless')
    options.add_argument("--no-sandbox")
    options.add_argument("--disable-setuid-sandbox")
    options.add_argument('--disable-features=VizDisplayCompositor')

    driver = webdriver.Chrome(CHROME_DRIVER, options=options)
    # CHROME_BIN = "/usr/bin/chromium-browser"
    # options.binary_location = CHROME_BIN
    # driver = webdriver.Chrome(executable_path="./chromedriver")

    info = Info()
    URL = info.get('URL')
    ID = info.get('MY_ID')
    PASS = info.get('PASS')

    driver.get(URL)
    # 3秒待機
    time.sleep(3)
    # ログインIDを入力
    login_id = driver.find_element_by_name("p2")
    login_id.send_keys(ID)
    # 1秒待機
    time.sleep(1)
    # パスワードを入力
    password = driver.find_element_by_name("p3")
    password.send_keys(PASS)
    # 1秒待機
    time.sleep(1)
    # 次へボタンをクリック
    next_btn = driver.find_element_by_xpath("/html/body/div/form/div/button")
    next_btn.click()
    # 3秒待機
    time.sleep(3)
    try:
        close = driver.find_element_by_xpath(
            "/html/body/ngb-modal-window/div/div/lib-ngx-sibic-sp-dialog-info/div/button"
        )
    except NoSuchElementException:
        pass
        driver.quit()

        return False
    close.click()
    # 1秒待機
    time.sleep(1)
    dl_btn = driver.find_element_by_xpath(
        "/html/body/app-root/app-employee-view/app-footer/nav/nav/div/div[3]/button"
    )
    dl_btn.click()
    # 1秒待機
    time.sleep(1)
    download = driver.find_element_by_xpath(
        "/html/body/ngb-modal-window/div/div/lib-ngx-sibic-sp-dialog-download/div[2]/div/button"
    )
    download.click()
    # 10秒待機
    time.sleep(10)
    driver.quit()

    return True
Esempio n. 20
0
    def SH_getPageLink(self, url):
        stop_flag = False
        try:
            html = urlopen(url)
        except HTTPError as e:
            print("网络有故障!")
            return
        else:
            if html is None:
                print("请求链接服务端无法处理哦!")
            else:
                try:
                    bsObj = BeautifulSoup(html.read(), "html.parser")
                    o_li = bsObj.find("div", {
                        "class": {"lawbox"}
                    }).findAll("li")
                    for item in o_li:
                        span_item = item.find("span")
                        cmp_str_time = span_item.get_text()[1:-1]
                        if (self.timecompare(cmp_str_time, 10)):
                            item_url = "http://www.shfe.com.cn" + item.find(
                                "a").attrs["href"]
                            content = self.SH_getItemLink(item_url)
                            '''获取的内容进行对象保存'''
                            info_item = Info('SH')
                            info_item.setTitle(item.find("a").get_text())
                            info_item.setLink(item_url)
                            info_item.setPubtime(cmp_str_time)
                            info_item.setCatchTime(self.catchcount)
                            if content == None:
                                info_item.setContent("公告内容为空")
                            else:
                                info_item.setContent(content)

                            self.pipeline.saveInfo(info_item)

                        else:
                            stop_flag = True
                    if (stop_flag == True):
                        self.catchcount += 1
                        return
                    else:
                        page_item = bsObj.find("div", {
                            "class": {"page-no"}
                        }).findAll("a")[2]
                        next_page_url = "http://www.shfe.com.cn/news/notice/" + page_item.attrs[
                            "href"]
                        # print("next_page_url %s" % next_page_url)
                        self.SH_getPageLink(next_page_url)
                except AttributeError as e:
                    print("BS解析出错啦!")
        pass
Esempio n. 21
0
#!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
#                                   Jiao Lin
#                      California Institute of Technology
#                        (C) 2007  All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#

from Info import Info
info = Info(lib='/lib',
            include='/include')  # for mm, pythia is already taken care of

# version
__id__ = "$Id$"

# End of file
Esempio n. 22
0
import sys

if __name__ == '__main__':

    from Info import Info
    try:
        RawKey = Info.GetCurrentVersion()
        isCurVerUpdate = False
    except:
        if (len(sys.argv) > 1):
            RawKey = sys.argv[1] + ".1"
            isCurVerUpdate = True
        else:
            print(
                "Приложение не установленно. Укажите желаемую версию. Пример 6.0"
            )
            sys.exit(0)
    verArray = RawKey.split('.')
    version = verArray[0] + "." + verArray[1]
    curVersion = int(RawKey.replace(version + '.', ""))
    path = "\\\\192.168.1.206\\builds\\" + version
    import os
    Folder, NumberFolder = Info.GetNumberFolder(os.listdir(path), version)
    if (isCurVerUpdate):
        curVersion = int(NumberFolder) - 1
        RawKey = verArray[0] + "." + verArray[1] + "." + str(curVersion)

    if (int(curVersion) < int(NumberFolder)):

        import subprocess
        from NeedUpdate import *
Esempio n. 23
0
#!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
#                                   Jiao Lin
#                      California Institute of Technology
#                        (C) 2007  All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#

from Info import Info
from os import environ
libdir = environ['BOOSTPYTHON_LIBDIR']
incdir = environ['BOOSTPYTHON_INCDIR']

info = Info(include=incdir, lib=libdir)  # for mm, config is not necessary

# version
__id__ = "$Id$"

# End of file
Esempio n. 24
0
def runAllModules(args):
	'''
	Run all modules
	'''
	connectionInformation, validSIDsList = {}, []
	#0)TNS Poinsoning
	if args['no-tns-poisoning-check'] == False:
		tnspoison = Tnspoison(args)
		tnspoison.testAll()
	else:
		logging.info("Don't check if the target is vulnerable to TNS poisoning because the option --no-tns-poisoning-check is enabled in command line")
	#A)SID MANAGEMENT
	if args['sid'] == None :
		logging.debug("Searching valid SIDs")
		validSIDsList = runSIDGuesserModule(args)
		args['user'], args['password'] = None, None 
	else :
		validSIDsList = [args['sid']]
	if validSIDsList == []:
		exit(EXIT_NO_SIDS)
	#B)ACCOUNT MANAGEMENT
	if args['credentialsFile'] == True :
		logging.debug("Loading credentials stored in the {0} file".format(args['accounts-file']))
		#Load accounts from file
		passwordGuesser = PasswordGuesser(args, args['accounts-file'], loginFile=None ,passwordFile=None, loginAsPwd=args['login-as-pwd'])
		validAccountsList = passwordGuesser.getAccountsFromFile()
		for aSid in validSIDsList:
			for anAccount in validAccountsList:
				if connectionInformation.has_key(aSid) == False: connectionInformation[aSid] = [[anAccount[0], anAccount[1]]]
				else : connectionInformation[aSid].append([anAccount[0], anAccount[1]])
	elif args['user'] == None and args['password'] == None:
		for sid in validSIDsList:
			args['print'].title("Searching valid accounts on the {0} SID".format(sid))
			args['sid'] = sid
			if args['accounts-files'][0] != None and args['accounts-files'][1] != None : args['accounts-file'] = None
			passwordGuesser = PasswordGuesser(args, accountsFile=args['accounts-file'], loginFile=args['accounts-files'][0], passwordFile=args['accounts-files'][1], timeSleep=args['timeSleep'], loginAsPwd=args['login-as-pwd'])
			passwordGuesser.searchValideAccounts()
			validAccountsList = passwordGuesser.valideAccounts
			if validAccountsList == {}:
				args['print'].badNews("No found a valid account on {0}:{1}/{2}. You should try with the option '--accounts-file accounts/accounts_multiple.txt' or '--accounts-file accounts/logins.txt accounts/pwds.txt'".format(args['server'], args['port'], args['sid']))
				exit(EXIT_NO_ACCOUNTS)
			else :
				args['print'].goodNews("Accounts found on {0}:{1}/{2}: {3}".format(args['server'], args['port'], args['sid'],getCredentialsFormated(validAccountsList)))
				for aLogin, aPassword in validAccountsList.items(): 
					if connectionInformation.has_key(sid) == False: connectionInformation[sid] = [[aLogin,aPassword]]
					else : connectionInformation[sid].append([aLogin,aPassword])
	else:
		validAccountsList = {args['user']:args['password']}
		for aSid in validSIDsList:
			for aLogin, aPassword in validAccountsList.items():
				if connectionInformation.has_key(aSid) == False: connectionInformation[aSid] = [[aLogin,aPassword]]
				else : connectionInformation[aSid].append([aLogin,aPassword])
	#C)ALL OTHERS MODULES
	if sidHasBeenGiven(args) == False : return EXIT_MISS_ARGUMENT
	#elif anAccountIsGiven(args) == False : return EXIT_MISS_ARGUMENT
	for aSid in connectionInformation.keys():
		for loginAndPass in connectionInformation[aSid]:
			args['sid'] , args['user'], args['password'] = aSid, loginAndPass[0],loginAndPass[1]
			args['print'].title("Testing all modules on the {0} SID with the {1}/{2} account".format(args['sid'],args['user'],args['password']))
			#INFO ABOUT REMOTE SERVER
			info = Info(args)
			status = info.connection()
			if isinstance(status,Exception):
				args['print'].badNews("Impossible to connect to the remote database: {0}".format(str(status).replace('\n','')))
				break
			info.loadInformationRemoteDatabase()
			args['info'] = info
			#UTL_HTTP
			utlHttp = UtlHttp(args)
			status = utlHttp.connection()
			utlHttp.testAll()
			#HTTPURITYPE
			httpUriType = HttpUriType(args)
			httpUriType.testAll()
			#UTL_FILE
			utlFile = UtlFile(args)
			utlFile.testAll()
			#JAVA
			java = Java(args)
			java.testAll()
			#DBMS ADVISOR
			dbmsAdvisor = DbmsAdvisor(args)
			dbmsAdvisor.testAll()
			#DBMS Scheduler
			dbmsScheduler = DbmsScheduler(args)
			dbmsScheduler.testAll()
			#CTXSYS
			ctxsys = Ctxsys(args)
			ctxsys.testAll()
			#Passwords
			passwords = Passwords(args)
			passwords.testAll()
			#DbmsXmldom
			dbmsXslprocessor = DbmsXslprocessor(args)
			dbmsXslprocessor.testAll()
			#External Table
			externalTable = ExternalTable(args)
			externalTable.testAll()
			#Oradbg
			oradbg = Oradbg(args)
			oradbg.testAll()
			#DbmsLob
			dbmsLob = DbmsLob(args)
			dbmsLob.testAll()
			#SMB
			smb = SMB(args)
			smb.testAll()
			#Pribvilege escalation
			privilegeEscalation = PrivilegeEscalation(args)
			privilegeEscalation.testAll()
			#Test some CVE
			cve = CVE_XXXX_YYYY(args)
			cve.testAll()
			cve.close() #Close the socket to the remote database
			#CVE_2012_3137
			cve = CVE_2012_3137 (args)
			cve.testAll()
			
	#usernamelikepassword
	args['run'] = True
	runUsernameLikePassword(args)
Esempio n. 25
0
#!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
#                                   Jiao Lin
#                      California Institute of Technology
#                        (C) 2007  All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#

from Info import Info
info = Info(lib='/lib', include='/include')  # for mm, this is OK

# version
__id__ = "$Id$"

# End of file
Esempio n. 26
0
    def DL_getPageLink(self, url):
        stop_flag = False
        try:
            html = urlopen(url)
        except HTTPError as e:
            print("网络有故障!")
            return
        else:
            if html is None:
                print("请求链接服务端无法处理哦!")
            else:
                try:
                    # print("bsObj in DL_getPageLink")
                    bsObj = BeautifulSoup(html.read(), "html.parser")
                    o_li = bsObj.findAll(
                        "div", {"class": {"portlet"}})[1].findAll("li")
                    # print(o_li)
                    for item in o_li:
                        span_item = item.find("span")
                        # cmp_str_time = span_item.get_text()[1:-1]
                        cmp_str_time = span_item.get_text()
                        # print("cmp_str_time = %s" % cmp_str_time)
                        if (self.timecompare(cmp_str_time, 10)):
                            item_url = "http://www.dce.com.cn" + item.find(
                                "a").attrs["href"]
                            # print("item_url = %s" % item_url)
                            content = self.DL_getItemLink(item_url)
                            '''获取的内容进行对象保存'''
                            info_item = Info('DL')
                            info_item.setTitle(item.find("a").get_text())
                            info_item.setLink(item_url)
                            info_item.setPubtime(cmp_str_time)
                            info_item.setCatchTime(self.catchcount)
                            if content == None:
                                info_item.setContent("公告内容为空")
                            else:
                                info_item.setContent(content)

                            self.pipeline.saveInfo(info_item)

                        else:
                            stop_flag = True
                    if (stop_flag == True):
                        self.catchcount += 1
                        return
                    else:
                        page_item = bsObj.find("div", {
                            "class": {"pagination"}
                        }).findAll("a")[2]
                        next_page_url = "http://www.dce.com.cn" + page_item.attrs[
                            "tagname"]
                        print("next_page_url %s" % next_page_url)
                        self.DL_getPageLink(next_page_url)
                except AttributeError as e:
                    print("BS解析出错啦!")
        pass
Esempio n. 27
0
    def __init__(self, root):
        self.__info = Info(3, 1, 1000, 10)
        self.__width_left_change_choise = 280
        self.__width_right_change_choise = 280
        self.__x_right_change_choise = 300
        self.__width_left_const_choise = 280
        self.__width_right_const_choise = 280
        self.__x_right_const_choise = 300
        self.__delta = 0
        self.__pause = 0
        self.__timer = 0
        self.__start_time = 0
        self.__finish_time = 0
        self.__number_winnings_change_choise = 0
        self.__number_winnings_const_choise = 0
        self.__index_door_host = 0
        self.__counter_games = 0
        self.__fl_run = True
        self.__fl_start = False
        self.__fl_key = True
        self.__listDoors = []
        self.__root = root
        self.__lb_doors = Label(text="Doors")
        self.__lb_gift = Label(text="Gifts")
        self.__lb_repetitions = Label(text="Repetitions")
        self.__lb_time_simulation = Label(text="Time (s)")
        self.__lb_info_red = Label(text=" ", bg='orangered')
        self.__lb_info_red_text = Label(text="- not change choice",
                                        font='sans 10')
        self.__lb_info_green = Label(text=" ", bg='limegreen')
        self.__lb_info_green_text = Label(text="- change choice",
                                          font='sans 10')
        self.__lb_info_gray = Label(text=" ", bg='#8c8c8c')
        self.__lb_info_gray_text = Label(text="- losing", font='sans 10')
        self.__lb_delta = Label(font='sans 10')
        self.__lb_time_simulation.after_idle(self.__clock)

        self.__lb_counter = Label(text="Counter")
        self.__left = Label(font='sans 10',
                            text='50 %',
                            bg='limegreen',
                            height=1)
        self.__right = Label(font='sans 10',
                             text='50 %',
                             bg='#8c8c8c',
                             height=1)
        self.__left2 = Label(font='sans 10',
                             text='50 %',
                             bg='orangered',
                             height=1)
        self.__right2 = Label(font='sans 10',
                              text='50 %',
                              bg='#8c8c8c',
                              height=1)

        self.__c = Canvas(root, width=1, height=1, bg='white')

        self.__input_doors = Entry()
        self.__input_gift = Entry()
        self.__input_repetitions = Entry()
        self.__input_time_simulation = Entry()

        self.__but_start = Button(root,
                                  height=1,
                                  width=10,
                                  text='Start',
                                  command=self.__start)
        self.__but_exit = Button(root,
                                 height=1,
                                 width=10,
                                 text='Back',
                                 command=self.__back_to_menu)
Esempio n. 28
0
import google.auth
from Info import Info

# 編集スコープの設定(今回は読み書き両方OKの設定)
SCOPES = ['https://www.googleapis.com/auth/calendar']

# 認証ファイルを使用して認証用オブジェクトを作成
gapi_creds = google.auth.load_credentials_from_file('credentials.json',
                                                    SCOPES)[0]

# 認証用オブジェクトを使用してAPIを呼び出すためのオブジェクト作成
service = googleapiclient.discovery.build('calendar',
                                          'v3',
                                          credentials=gapi_creds)

info = Info()
DESCRIPTION = info.get('K', 'DESCRIPTION')
CALENDAR_ID_K = info.get('K', 'CALENDAR_ID')
CALENDAR_ID_S = info.get('S', 'CALENDAR_ID')


def SettingEvents(CALENDAR_ID, y, m):
    # Call the Calendar API
    timefrom, timeto = SetTimeInfo(y, m)
    timefrom = datetime.datetime.strptime(
        timefrom, '%Y/%m/%dT%H:%M:%S').isoformat() + 'Z'
    timeto = datetime.datetime.strptime(timeto,
                                        '%Y/%m/%dT%H:%M:%S').isoformat() + 'Z'
    events_result = service.events().list(calendarId=CALENDAR_ID,
                                          timeMin=timefrom,
                                          timeMax=timeto,
from Info import Info
from import_xlsx import ImportMyXlsx

# シフト表のExcelファイルから自分の予定をimport
return_list = ImportMyXlsx()
y_m = return_list[0]
working_list = return_list[1]

info = Info()
SUMMARY = info.get('K', 'SUMMARY')
LOCATION = info.get('K', 'LOCATION')
DESCRIPTION = info.get('K', 'DESCRIPTION')
TIMEZONE = info.get('K', 'TIMEZONE')


# 追加するスケジュールの情報を設定
def insert_event_K():
    event_list = []
    for i in range(len(working_list)):
        day = working_list[i][0]
        start = working_list[i][1]
        end = working_list[i][2]
        status = working_list[i][3]
        event = {
            'summary': SUMMARY + status,
            'location': LOCATION,
            'description': DESCRIPTION,
            'start': {
                'dateTime':
                y_m[0] + '-' + y_m[1] + '-' + day + 'T' + start + ':00',
                'timeZone': TIMEZONE,
Esempio n. 30
0
def runAllModules(args):
	'''
	Run all modules
	'''
	connectionInformation, validSIDsList = {}, []
	#0)TNS Poinsoning
	if args['no-tns-poisoning-check'] == False:
		tnspoison = Tnspoison(args)
		tnspoison.testAll()
	else:
		logging.info("Don't check if the target is vulnerable to TNS poisoning because the option --no-tns-poisoning-check is enabled in command line")
	#A)SID MANAGEMENT
	if args['sid'] == None :
		logging.debug("Searching valid SIDs")
		validSIDsList = runSIDGuesserModule(args)
		args['user'], args['password'] = None, None 
	else :
		validSIDsList = [args['sid']]
	if validSIDsList == []:
		exit(EXIT_NO_SIDS)
	#B)ACCOUNT MANAGEMENT
	if args['credentialsFile'] == True :
		logging.debug("Loading credentials stored in the {0} file".format(args['accounts-file']))
		#Load accounts from file
		passwordGuesser = PasswordGuesser(args, args['accounts-file'], loginFile=None ,passwordFile=None, loginAsPwd=args['login-as-pwd'])
		validAccountsList = passwordGuesser.getAccountsFromFile()
		for aSid in validSIDsList:
			for anAccount in validAccountsList:
				if connectionInformation.has_key(aSid) == False: connectionInformation[aSid] = [[anAccount[0], anAccount[1]]]
				else : connectionInformation[aSid].append([anAccount[0], anAccount[1]])
	elif args['user'] == None and args['password'] == None:
		for sid in validSIDsList:
			args['print'].title("Searching valid accounts on the {0} SID".format(sid))
			args['sid'] = sid
			if args['accounts-files'][0] != None and args['accounts-files'][1] != None : args['accounts-file'] = None
			passwordGuesser = PasswordGuesser(args, accountsFile=args['accounts-file'], loginFile=args['accounts-files'][0], passwordFile=args['accounts-files'][1], timeSleep=args['timeSleep'], loginAsPwd=args['login-as-pwd'])
			passwordGuesser.searchValideAccounts()
			validAccountsList = passwordGuesser.valideAccounts
			if validAccountsList == {}:
				args['print'].badNews("No found a valid account on {0}:{1}/{2}. You should try with the option '--accounts-file accounts/accounts_multiple.txt' or '--accounts-file accounts/logins.txt accounts/pwds.txt'".format(args['server'], args['port'], args['sid']))
				exit(EXIT_NO_ACCOUNTS)
			else :
				args['print'].goodNews("Accounts found on {0}:{1}/{2}: {3}".format(args['server'], args['port'], args['sid'],getCredentialsFormated(validAccountsList)))
				for aLogin, aPassword in validAccountsList.items(): 
					if connectionInformation.has_key(sid) == False: connectionInformation[sid] = [[aLogin,aPassword]]
					else : connectionInformation[sid].append([aLogin,aPassword])
	else:
		validAccountsList = {args['user']:args['password']}
		for aSid in validSIDsList:
			for aLogin, aPassword in validAccountsList.items():
				if connectionInformation.has_key(aSid) == False: connectionInformation[aSid] = [[aLogin,aPassword]]
				else : connectionInformation[aSid].append([aLogin,aPassword])
	#C)ALL OTHERS MODULES
	if sidHasBeenGiven(args) == False : return EXIT_MISS_ARGUMENT
	#elif anAccountIsGiven(args) == False : return EXIT_MISS_ARGUMENT
	for aSid in connectionInformation.keys():
		for loginAndPass in connectionInformation[aSid]:
			args['sid'] , args['user'], args['password'] = aSid, loginAndPass[0],loginAndPass[1]
			args['print'].title("Testing all modules on the {0} SID with the {1}/{2} account".format(args['sid'],args['user'],args['password']))
			#INFO ABOUT REMOTE SERVER
			info = Info(args)
			status = info.connection()
			if isinstance(status,Exception):
				args['print'].badNews("Impossible to connect to the remote database: {0}".format(str(status).replace('\n','')))
				break
			info.loadInformationRemoteDatabase()
			args['info'] = info
			#UTL_HTTP
			utlHttp = UtlHttp(args)
			status = utlHttp.connection()
			utlHttp.testAll()
			#HTTPURITYPE
			httpUriType = HttpUriType(args)
			httpUriType.testAll()
			#UTL_FILE
			utlFile = UtlFile(args)
			utlFile.testAll()
			#JAVA
			java = Java(args)
			java.testAll()
			#DBMS ADVISOR
			dbmsAdvisor = DbmsAdvisor(args)
			dbmsAdvisor.testAll()
			#DBMS Scheduler
			dbmsScheduler = DbmsScheduler(args)
			dbmsScheduler.testAll()
			#CTXSYS
			ctxsys = Ctxsys(args)
			ctxsys.testAll()
			#Passwords
			passwords = Passwords(args)
			passwords.testAll()
			#DbmsXmldom
			dbmsXslprocessor = DbmsXslprocessor(args)
			dbmsXslprocessor.testAll()
			#External Table
			externalTable = ExternalTable(args)
			externalTable.testAll()
			#Oradbg
			oradbg = Oradbg(args)
			oradbg.testAll()
			#DbmsLob
			dbmsLob = DbmsLob(args)
			dbmsLob.testAll()
			#SMB
			smb = SMB(args)
			smb.testAll()
			#Pribvilege escalation
			privilegeEscalation = PrivilegeEscalation(args)
			privilegeEscalation.testAll()
			#Test some CVE
			cve = CVE_XXXX_YYYY(args)
			cve.testAll()
			cve.close() #Close the socket to the remote database
			#CVE_2012_3137
			cve = CVE_2012_3137 (args)
			cve.testAll()
			
	#usernamelikepassword
	args['run'] = True
	runUsernameLikePassword(args)
Esempio n. 31
0
    def __init__(self):
        Gtk.Window.__init__(self, title="Magic Mirror")

        self.state_list = [
            "HOME", "WEATHER", "TIME", "QUOTE", "CALENDAR", "HELP", "INFO",
            "MIRROR"
        ]
        self.state = ""

        # Data classes which update from subscriber
        input_data = InputData()
        weather_data = WeatherData()
        quote_data = QuoteData()
        calendar_data = EventData()
        message_data = MessageData()
        home_data = HomeData()
        self.auth_data = AuthData()
        pin_data = PinData()

        # Screen objects that are cycled in the window
        self.home_screen = Home(weather_data, calendar_data, home_data,
                                self.auth_data)
        self.auth_screen = Auth(self.auth_data, pin_data)
        self.weather_screen = Weather(weather_data)
        self.time_screen = TimeDate()
        self.message_screen = Messages(message_data)
        self.quote_screen = Quote(quote_data)
        self.calendar_screen = Calendar(calendar_data)
        self.help_screen = Help()
        self.info_screen = Info()
        self.mirror_screen = Mirror()

        # Starts the MQTT subscriber
        self.data_thread = threading.Thread(target=subscriber.run,
                                            args=([
                                                input_data, weather_data,
                                                quote_data, calendar_data,
                                                home_data, self.auth_data,
                                                pin_data
                                            ], ))
        self.data_thread.daemon = True
        self.data_thread.start()

        # Updates the value on the screens in separate threads
        GObject.timeout_add(1000, self.auth_screen.update)
        GObject.timeout_add(1000, self.weather_screen.update_weather)
        GObject.timeout_add(1000, self.time_screen.update_clock)
        GObject.timeout_add(1000, self.quote_screen.update)
        GObject.timeout_add(1000, self.calendar_screen.update_events)
        GObject.timeout_add(1000, self.message_screen.update_screen)
        GObject.timeout_add(1000, self.home_screen.update_home)

        self.app_stack = Gtk.Stack()
        self.app_stack.set_transition_type(
            Gtk.StackTransitionType.SLIDE_LEFT_RIGHT)
        self.app_stack.set_transition_duration(500)

        self.app_stack.add_named(self.auth_screen, "Auth")
        self.app_stack.add_named(self.home_screen, "Home")
        self.app_stack.add_named(self.weather_screen, "Weather")
        self.app_stack.add_named(self.time_screen, "Time")
        self.app_stack.add_named(self.message_screen, "Message")
        self.app_stack.add_named(self.quote_screen, "Quote")
        self.app_stack.add_named(self.calendar_screen, "Calendar")
        self.app_stack.add_named(self.help_screen, "Help")
        self.app_stack.add_named(self.info_screen, "Info")
        self.app_stack.add_named(self.mirror_screen, "Mirror")

        # Meant to add the default screen
        self.add(self.app_stack)

        self.fullscreen()
        self.modify_bg(Gtk.StateType.NORMAL, Gdk.Color(255, 0, 255))
        self.set_icon(IMG.iconpix)
Esempio n. 32
0
def runAllModules(args):
	'''
	Run all modules
	'''
	connectionInformation, validSIDsList = {}, []
	#A)SID MANAGEMENT
	if args['sid'] == None :
		validSIDsList = runSIDGuesserModule(args)
		args['user'], args['password'] = None, None 
	else :
		validSIDsList = [args['sid']]
	#B)ACCOUNT MANAGEMENT
	if args['user'] == None and args['password'] == None:
		for sid in validSIDsList:
			args['print'].title("Searching valid accounts on the {0} SID".format(sid))
			args['sid'] = sid
			passwordGuesser = PasswordGuesser(args,args['accounts-file'])
			passwordGuesser.searchValideAccounts()
			validAccountsList = passwordGuesser.valideAccounts
			if validAccountsList == {}:
				args['print'].badNews("No found a valid account on {0}:{1}/{2}".format(args['server'], args['port'], args['sid']))
				exit(EXIT_NO_ACCOUNTS)
			else :
				args['print'].goodNews("Accounts found on {0}:{1}/{2}: {3}".format(args['server'], args['port'], args['sid'],validAccountsList))
				for aLogin, aPassword in validAccountsList.items(): 
					if connectionInformation.has_key(sid) == False: connectionInformation[sid] = [[aLogin,aPassword]]
					else : connectionInformation[sid].append([aLogin,aPassword])
	else :
		validAccountsList = {args['user']:args['password']}
		for aSid in validSIDsList:
			for aLogin, aPassword in validAccountsList.items():
				if connectionInformation.has_key(aSid) == False: connectionInformation[aSid] = [[aLogin,aPassword]]
				else : connectionInformation[aSid].append([aLogin,aPassword])
	#C)ALL OTHERS MODULES
	if sidHasBeenGiven(args) == False : return EXIT_MISS_ARGUMENT
	elif anAccountIsGiven(args) == False : return EXIT_MISS_ARGUMENT
	for aSid in connectionInformation.keys():
		for loginAndPass in connectionInformation[aSid]:
			args['sid'] , args['user'], args['password'] = aSid, loginAndPass[0],loginAndPass[1]
			args['print'].title("Testing all modules on the {0} SID with the {1}/{2} account".format(args['sid'],args['user'],args['password']))
			#INFO ABOUT REMOTE SERVER
			info = Info(args)
			status = info.connection()
			if isinstance(status,Exception):
				args['print'].badNews("Impossible to connect to the remote database: {0}".format(str(status).replace('\n','')))
				break
			info.loadInformationRemoteDatabase()
			args['info'] = info
			#UTL_HTTP
			utlHttp = UtlHttp(args)
			status = utlHttp.connection()
			utlHttp.testAll()
			#HTTPURITYPE
			httpUriType = HttpUriType(args)
			httpUriType.testAll()
			#UTL_FILE
			utlFile = UtlFile(args)
			utlFile.testAll()
			#JAVA
			java = Java(args)
			java.testAll()
			#DBMS ADVISOR
			dbmsAdvisor = DbmsAdvisor(args)
			dbmsAdvisor.testAll()
			#DBMS Scheduler
			dbmsScheduler = DbmsScheduler(args)
			dbmsScheduler.testAll()
			#CTXSYS
			ctxsys = Ctxsys(args)
			ctxsys.testAll()
			#Passwords
			passwords = Passwords(args)
			passwords.testAll()
			#DbmsXmldom
			dbmsXslprocessor = DbmsXslprocessor(args)
			dbmsXslprocessor.testAll()
			#External Table
			externalTable = ExternalTable(args)
			externalTable.testAll()
			#Oradbg
			oradbg = Oradbg(args)
			oradbg.testAll()
			oradbg.close() #Close the socket to the remote database
			#CVE_2012_3137
			cve = CVE_2012_3137 (args)
			cve.testAll()
	#usernamelikepassword
	args['run'] = True
	runUsernameLikePassword(args)
Esempio n. 33
0
 def __check_data(self):
     if getint(self.__info.doors) <= 0 or getint(self.__info.gift) <= 0:
         self.__info = Info(3, 1, 1000, 10)
     if getint(self.__info.doors) - getint(self.__info.gift) < 2:
         self.__info.gift = getint(self.__info.doors) - 2