當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。