mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-05 12:36:51 -07:00
Captive Portal related changes
Made options exclusive Added OSX files to .gitignore Update README with plugin
This commit is contained in:
parent
681be498a9
commit
822b87e77c
3 changed files with 15 additions and 3 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -57,3 +57,7 @@ docs/_build/
|
|||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# OSX Stuff
|
||||
.DS_Store
|
||||
._.DS_Store
|
||||
|
|
|
@ -157,3 +157,4 @@ For a complete list of available options, just run ```python mitmf.py --help```
|
|||
- **Replace** : Replace arbitrary content in HTML content
|
||||
- **SMBAuth** : Evoke SMB challenge-response authentication attempts
|
||||
- **Upsidedownternet** : Flips images 180 degrees
|
||||
- **Captive** : Creates a captive portal, redirecting HTTP requests using 302
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2014-2016 Marcello Salvati
|
||||
# Copyright (c) 2014-2016 Oliver Nettinger, Marcello Salvati
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
|
@ -16,6 +16,9 @@
|
|||
# USA
|
||||
#
|
||||
|
||||
# note: portal.html has been adapted from
|
||||
# config/responder/AccessDenied.html for now
|
||||
|
||||
from plugins.plugin import Plugin
|
||||
from urlparse import urlparse
|
||||
|
||||
|
@ -58,8 +61,12 @@ class Captive(Plugin):
|
|||
return {'response': response, 'request':request, 'data': data}
|
||||
|
||||
def options(self, options):
|
||||
options.add_argument('--portalurl', dest='portalurl', metavar="URL", help='Specify the URL where the portal is located, e.g. http://example.com.')
|
||||
options.add_argument('--portaldir', dest='portaldir', metavar="LOCALDIR", help='Specify a local path containg the portal files served with a SimpleHTTPServer on a different port (see config).')
|
||||
''' captive can be either run redirecting to a specified url (--portalurl), serve the payload locally (no argument) or
|
||||
start an instance of SimpleHTTPServer to serve the LOCALDIR (--portaldir) '''
|
||||
group = options.add_mutually_exclusive_group(required=False)
|
||||
group.add_argument('--portalurl', dest='portalurl', metavar="URL", help='Specify the URL where the portal is located, e.g. http://example.com.')
|
||||
group.add_argument('--portaldir', dest='portaldir', metavar="LOCALDIR", help='Specify a local path containg the portal files served with a SimpleHTTPServer on a different port (see config).')
|
||||
|
||||
options.add_argument('--use-dns', dest='usedns', action='store_true', help='Whether we use dns spoofing to serve from a fancier portal URL captive.portal when used without options or portaldir. Requires DNS for "captive.portal" to resolve, e.g. via configured dns spoofing --dns.')
|
||||
|
||||
def on_shutdown(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue