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


Python module.Module类代码示例

本文整理汇总了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)
开发者ID:h3rucutu,项目名称:weevely-old,代码行数:30,代码来源:php.py

示例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)    
开发者ID:h3rucutu,项目名称:weevely-old,代码行数:7,代码来源:scan.py

示例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)
开发者ID:bluemutedwisdom,项目名称:Weevely,代码行数:8,代码来源:webdir.py

示例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)
开发者ID:BaldyBadgersRunningRoundMyBrain,项目名称:weevely3,代码行数:10,代码来源:console.py

示例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)
开发者ID:bluemutedwisdom,项目名称:Weevely,代码行数:16,代码来源:download.py

示例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())
开发者ID:Carbon3,项目名称:Weevely,代码行数:19,代码来源:phpconf.py

示例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)
开发者ID:riverans,项目名称:weevely3,代码行数:21,代码来源:console.py

示例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)
开发者ID:BaldyBadgersRunningRoundMyBrain,项目名称:weevely3,代码行数:23,代码来源:enum.py

示例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
开发者ID:sonopard,项目名称:DefuseMe,代码行数:24,代码来源:encoder.py

示例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
开发者ID:BaldyBadgersRunningRoundMyBrain,项目名称:weevils,代码行数:31,代码来源:sh.py

示例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)])
开发者ID:BaldyBadgersRunningRoundMyBrain,项目名称:weevils,代码行数:6,代码来源:upload.py

示例12: __init__

    def __init__( self, modhandler , url, password):
            
        self.structure = {}

        Module.__init__(self, modhandler, url, password)
开发者ID:h3rucutu,项目名称:weevely-old,代码行数:5,代码来源:summary.py

示例13: __init__

 def __init__( self, modhandler , url, password):
     
     self.chunksize = 5000
     self.substitutive_wl = []
     Module.__init__(self, modhandler, url, password)
开发者ID:BaldyBadgersRunningRoundMyBrain,项目名称:weevils,代码行数:5,代码来源:sql.py

示例14: __init__

    def __init__(self, modhandler, url, password):
        self.ifaces = {}

        Module.__init__(self, modhandler, url, password)
开发者ID:bluemutedwisdom,项目名称:Weevely,代码行数:4,代码来源:ifaces.py

示例15: __init__

    def __init__( self, modhandler , url, password):

        Module.__init__(self, modhandler, url, password)
        
        self.usersfiles = {}    
开发者ID:BaldyBadgersRunningRoundMyBrain,项目名称:weevils,代码行数:5,代码来源:user_files.py


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