The call method allows us to call API elements from within Metasploit that are surfaced through the msgrpc interface. For the first example, we will request the list of all exploits form the server. To do this, we call the module.exploits function:
# Get a list of the exploits from the server mod = client.call('module.exploits')
If we want to find all of the payloads that were compatible, we could call the module.compatible_payloads method to find the payloads compatible with our exploit:
# Get the list of compatible payloads for the first option ret = client.call('module.compatible_payloads',[mod['modules'][0]])
If this example, we are obtaining this information and getting the list of compatible payloads for the first ...