本文整理汇总了Python中core.module.Module类的典型用法代码示例。如果您正苦于以下问题:Python Module类的具体用法?Python Module怎么用?Python Module使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Module类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, modhandler, url, password):
self.cwd_vector = None
self.path = None
self.proxy = None
self.modhandler = modhandler
self.post_data = {}
self.current_mode = None
self.use_current_path = True
self.available_modes = self.params.get_parameter_choices('mode')
mode = self.params.get_parameter_value('mode')
if mode:
self.modes = [ mode ]
else:
self.modes = self.available_modes
proxy = self.params.get_parameter_value('proxy')
if proxy:
self.mprint('[!] Proxies can break weevely requests, if possibile use proxychains')
self.proxy = { 'http' : proxy }
Module.__init__(self, modhandler, url, password)
示例2: __init__
def __init__(self, modhandler, url, password):
self.rand_post_addr = ''.join([choice('abcdefghijklmnopqrstuvwxyz') for i in xrange(4)])
self.rand_post_port = ''.join([choice('abcdefghijklmnopqrstuvwxyz') for i in xrange(4)])
Module.__init__(self, modhandler, url, password)
示例3: __init__
def __init__( self, modhandler , url, password):
self.probe_filename = ''.join(choice(letters) for i in xrange(4)) + '.html'
self.found_url = None
self.found_dir = None
Module.__init__(self, modhandler, url, password)
示例4: print_result
def print_result(self, result):
if result == None:
log.warn('%s %s' % (messages.module_sql_console.no_data,
messages.module_sql_console.check_credentials)
)
elif not result:
log.warn(messages.module_sql_console.no_data)
else:
Module.print_result(self, result)
示例5: __init__
def __init__(self, modhandler, url, password):
self.encoder_callable = False
self.md5_callable = False
self.payload = None
self.vector = None
self.interpreter = None
self.transfer_dir = None
self.transfer_url_dir = None
self.lastreadfile = ''
Module.__init__(self, modhandler, url, password)
示例6: _stringify_result
def _stringify_result(self):
Module._stringify_result(self)
table_insecurities = PrettyTable([''] * (2))
table_insecurities.align = 'l'
table_insecurities.header = False
table_insecurities.hrules = ALL
for res in self._result_insecurities:
if isinstance(self._result_insecurities[res], ListType):
field_str = ''
for chunk in list(chunks(self._result_insecurities[res], 3)):
field_str += ', '.join(chunk) + '\n'
table_insecurities.add_row([res, field_str.rstrip()])
self._output += '\n%s' % (table_insecurities.get_string())
示例7: print_result
def print_result(self, result):
if result['error']:
log.info(result['error'])
if result['result']:
Module.print_result(self, result['result'])
elif not result['error']:
log.warn('%s %s' % (messages.module_sql_console.no_data,
messages.module_sql_console.check_credentials)
)
command_last_chars = utils.prettify.shorten(
self.args['query'].rstrip(),
keep_trailer = 10
)
if (command_last_chars and command_last_chars[-1] != ';'):
log.warn(messages.module_sql_console.missing_sql_trailer_s % command_last_chars)
示例8: print_result
def print_result(self, result):
if not result: return
result_verbose = {}
for path, perms in result.items():
if len(perms) == 1 and perms[0] == 'e':
result_verbose[path] = 'exists'
else:
verbose_string = ' '.join([
'writable' if 'w' in perms else '',
'readable' if 'r' in perms else '',
'executable' if 'x' in perms else ''
])
# Re split to delete multiple whitespaces
result_verbose[path] = ' '.join(
verbose_string.strip().split()
)
return Module.print_result(self, result_verbose)
示例9: _request_SPI
def _request_SPI(self,slot):
self._open_connection(slot)
self.spi.xfer2([Command.ENUMERATE.value,])
time.sleep(0.01)
request = self.spi.readbytes(1)
if LOOPBACK:
return request
time.sleep(0.01)
response = []
for i in range(0,request[0]):
response.append(self.spi.readbytes(1)[0])
print("Hexdump:",response)
response = str(bytes(response),'ascii')
try:
module = Module.create_from_string(slot,response)
except (TypeError,KeyError):
print("Error detecting device on slot {}".format(slot))
module = None
self._close_connection()
return module
示例10: P
P(arg='cmd', help='Shell command', required=True, pos=0),
P(arg='stderr', help='Print standard error', default=True, type=bool)
)
def __init__( self, modhandler , url, password):
self.payload = None
self.cwd_vector = None
try:
modhandler.load('shell.php')
except ModuleException, e:
raise
else:
Module.__init__(self, modhandler, url, password)
def __execute_probe(self, vector):
try:
rand = random.randint( 11111, 99999 )
response = self.run_module( "echo %d" % rand, True, vector.payloads[0] )
if response == str(rand):
self.params.set_and_check_parameters({'vector' : vector.name})
return True
except:
#pass
示例11: __init__
def __init__(self, modhandler, url, password):
Module.__init__(self, modhandler, url, password)
self.file_content = None
self.rand_post_name = ''.join([choice('abcdefghijklmnopqrstuvwxyz') for i in xrange(4)])
示例12: __init__
def __init__( self, modhandler , url, password):
self.structure = {}
Module.__init__(self, modhandler, url, password)
示例13: __init__
def __init__( self, modhandler , url, password):
self.chunksize = 5000
self.substitutive_wl = []
Module.__init__(self, modhandler, url, password)
示例14: __init__
def __init__(self, modhandler, url, password):
self.ifaces = {}
Module.__init__(self, modhandler, url, password)
示例15: __init__
def __init__( self, modhandler , url, password):
Module.__init__(self, modhandler, url, password)
self.usersfiles = {}