当前位置: 首页>>代码示例>>Python>>正文


Python utils.Utils方法代码示例

本文整理汇总了Python中utils.Utils方法的典型用法代码示例。如果您正苦于以下问题:Python utils.Utils方法的具体用法?Python utils.Utils怎么用?Python utils.Utils使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在utils的用法示例。


在下文中一共展示了utils.Utils方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import utils [as 别名]
# 或者: from utils import Utils [as 别名]
def __init__(self):

        # Check the OS first
        if not str(sys.platform) == "darwin":
            self.u.head("Incompatible System")
            print(" ")
            print("This script can only be run from macOS/OS X.")
            print(" ")
            print("The current running system is \"{}\".".format(sys.platform))
            print(" ")
            self.grab("Press [enter] to quit...")
            print(" ")
            exit(1)

        self.dl = downloader.Downloader()
        self.r  = run.Run()
        self.u  = utils.Utils()
        self.web_drivers = None
        self.os_build_number = None
        self.os_number = None
        self.wd_loc = None
        self.sip_checked = False
        self.installed_version = "Not Installed!"
        self.get_manifest()
        self.get_system_info() 
开发者ID:corpnewt,项目名称:Web-Driver-Toolkit,代码行数:27,代码来源:WebDriver.py

示例2: __init__

# 需要导入模块: import utils [as 别名]
# 或者: from utils import Utils [as 别名]
def __init__(self):
        self.logs = Logger()
        self.utils = Utils()
        self.config = self.utils.readConfig()
        self.base_url = self.config['api_url']
        self.api_url = '%s/api/v1' % self.config['api_url']
        self.api_token = self.config['api_token']
        self.maxRetries = self.config['retries']

        try:
            if self.checkInitialPing() == 200:
                self.checkSites()
            else:
                exit()
        except Exception as e:
            self.logs.error(e)
            exit() 
开发者ID:Gaz492,项目名称:cachet-monitor,代码行数:19,代码来源:cachetMonitor.py

示例3: __init__

# 需要导入模块: import utils [as 别名]
# 或者: from utils import Utils [as 别名]
def __init__(self, parent):
        self.file_info = None
        self.victim_filename = ''
        self.crash_filename = ''
        self.parent = parent
        self.ae = parent.ae
        self.cfg = parent.cfg
        self.fo = self.parent.fileops
        self.utils = Utils(self) 
开发者ID:carlosgprado,项目名称:BrundleFuzz,代码行数:11,代码来源:crash_analysis.py

示例4: __init__

# 需要导入模块: import utils [as 别名]
# 或者: from utils import Utils [as 别名]
def __init__(self, **kwargs):
        self.dl = downloader.Downloader()
        self.r  = run.Run()
        self.u    = utils.Utils("SSDT Time")
        self.iasl_url_macOS = "https://bitbucket.org/RehabMan/acpica/downloads/iasl.zip"
        self.iasl_url_linux = "http://amdosx.kellynet.nl/iasl.zip"
        self.iasl_url_windows = "https://acpica.org/sites/acpica/files/iasl-win-20200528.zip"
        self.iasl = self.check_iasl()
        if not self.iasl:
            raise Exception("Could not locate or download iasl!")
        self.dsdt       = None
        self.dsdt_raw   = None
        self.dsdt_lines = None 
开发者ID:corpnewt,项目名称:SSDTTime,代码行数:15,代码来源:dsdt.py

示例5: myinfo

# 需要导入模块: import utils [as 别名]
# 或者: from utils import Utils [as 别名]
def myinfo(self):
        ut = Utils()
        temp = ut.requestString("user::::pass::::gcm::::uhash", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + "eW7lxzLY9bE:APA91bEO2sZd6aibQerL3Uy-wSp3gM7zLs93Xwoj4zIhnyNO8FLyfcODkIRC1dc7kkDymiWxy_dTQ-bXxUUPIhN6jCUBVvGqoNXkeHhRvEtqAtFuYJbknovB_0gItoXiTev7Lc5LJgP2" + "::::" + "userHash_not_needed", "vh_update.php")
        return temp 
开发者ID:OlympicCode,项目名称:vHackXTBot-Python,代码行数:6,代码来源:console_windows_source.py

示例6: requestPassword

# 需要导入模块: import utils [as 别名]
# 或者: from utils import Utils [as 别名]
def requestPassword(self, ip):
        ut = Utils()
        arr = ut.requestArray("user::::pass::::target", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + ip, "vh_vulnScan.php")
        imgs = Passwords(arr)
        return imgs 
开发者ID:OlympicCode,项目名称:vHackXTBot-Python,代码行数:7,代码来源:console_windows_source.py

示例7: enterPassword

# 需要导入模块: import utils [as 别名]
# 或者: from utils import Utils [as 别名]
def enterPassword(self, passwd, target, uhash):
        passwd = passwd.split("p")
        ut = Utils()
        temp = ut.requestString("user::::pass::::port::::target::::uhash", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + str(passwd[1].strip()) + "::::" + str(target) + "::::" + str(uhash), "vh_trTransfer.php")
        if temp == "10":
            return False
        else:
            return temp 
开发者ID:OlympicCode,项目名称:vHackXTBot-Python,代码行数:10,代码来源:console_windows_source.py

示例8: scanUser

# 需要导入模块: import utils [as 别名]
# 或者: from utils import Utils [as 别名]
def scanUser(self):
        ut = Utils()
        arr = ut.requestArray("user::::pass::::", self.api.getUsername() + "::::" + self.api.getPassword() + "::::", "vh_scanHost.php")
        return arr 
开发者ID:OlympicCode,项目名称:vHackXTBot-Python,代码行数:6,代码来源:console_windows_source.py

示例9: transferMoney

# 需要导入模块: import utils [as 别名]
# 或者: from utils import Utils [as 别名]
def transferMoney(self, ip):
        ut = Utils()
        arr = ut.requestArray("user::::pass::::target", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + ip, "vh_trTransfer.php")
        return arr 
开发者ID:OlympicCode,项目名称:vHackXTBot-Python,代码行数:6,代码来源:console_windows_source.py

示例10: uploadSpyware

# 需要导入模块: import utils [as 别名]
# 或者: from utils import Utils [as 别名]
def uploadSpyware(self, ip):
        ut = Utils()
        s = ut.requestString("user::::pass::::target", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + ip, "vh_spywareUpload.php")
        if s == "0":
            return True
        else:
            return False 
开发者ID:OlympicCode,项目名称:vHackXTBot-Python,代码行数:9,代码来源:console_windows_source.py

示例11: getTournament

# 需要导入模块: import utils [as 别名]
# 或者: from utils import Utils [as 别名]
def getTournament(self):
        ut = Utils()
        temp = ut.requestString("user::::pass::::uhash", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + "UserHash_not_needed", "vh_update.php")
        if "tournamentActive" in temp:
            if "2" not in temp.split('tournamentActive":"')[1].split('"')[0]:
                return True
            else:
                return False 
开发者ID:OlympicCode,项目名称:vHackXTBot-Python,代码行数:10,代码来源:console_windows_source.py

示例12: getIP

# 需要导入模块: import utils [as 别名]
# 或者: from utils import Utils [as 别名]
def getIP(self, blank):
        ut = Utils()
        try:
            info = self.myinfo()
            info = json.loads(info)
            uhash = info['uhash']
            temp = ut.requestString("user::::pass::::uhash::::global", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + str(uhash) + "::::" + str(random.randint(0, 1)), "vh_getImg.php")
            jsons = json.loads(temp)
        except TypeError:
            return 0, 0
        for i in range(0, len(jsons["data"])):
            hostname = str(jsons["data"][i]["hostname"])

            # Overlay on white background, see http://stackoverflow.com/a/7911663/1703216
            # bg = Image.new("RGB", image.size, (255,255,255))
            # bg.paste(image,image)

            imgdata = base64.b64decode(jsons["data"][i]['img'])
            filename = 'vhack.png'
            with open(filename, 'wb') as f:
                f.write(imgdata)
            image = self.get_main_color(filename)
            # print image[0], image[1], image[2], image[3]
            if image < 13200:
                time.sleep(5)
                return 1, hostname
            else:
                temp = ut.requestString("user::::pass::::uhash::::hostname", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + str(uhash) + "::::" + hostname, "vh_scanHost.php")
                try:
                    jsons = json.loads(temp)
                    return 0, str(jsons['ipaddress'])
                except TypeError:
                    return 0, 0
                # print str(jsons['ipaddress']) 
开发者ID:OlympicCode,项目名称:vHackXTBot-Python,代码行数:36,代码来源:console_windows_source.py

示例13: attackIP2

# 需要导入模块: import utils [as 别名]
# 或者: from utils import Utils [as 别名]
def attackIP2(self, ip, max):
        # ut = Utils()
        o = OCR(False)
        imgs = self.requestPassword(ip)
        selection = o.getPassword(imgs)
        print selection 
开发者ID:OlympicCode,项目名称:vHackXTBot-Python,代码行数:8,代码来源:console_windows_source.py

示例14: get_all_engins

# 需要导入模块: import utils [as 别名]
# 或者: from utils import Utils [as 别名]
def get_all_engins():
    utils = Utils()
    return '  '.join(utils.search_engin_dict.keys()) 
开发者ID:wowdd1,项目名称:xlinkBook,代码行数:5,代码来源:goto.py

示例15: search

# 需要导入模块: import utils [as 别名]
# 或者: from utils import Utils [as 别名]
def search(keyword, engin, search_keyword = False):
    url = ''
    if search_keyword == False:
        utils = Utils()
        record = utils.getRecord(keyword, use_subject)
        url = record.get_url().strip()
        keyword = record.get_title().strip()

    if search_video:
        engin_list = ['youtube', 'coursera', 'edx', 'googlevideo', 'chaoxing', 'youku', 'tudou', 'videolectures']
        for e in engin_list:
            openWeb(e, keyword, url)
    else:
        openWeb(engin, keyword, url) 
开发者ID:wowdd1,项目名称:xlinkBook,代码行数:16,代码来源:goto.py


注:本文中的utils.Utils方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。