本文整理汇总了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()
示例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()
示例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)
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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'])
示例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
示例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())
示例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)