Skip to content

Commit

Permalink
Added an 'accessible' option to improve output accessibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
catatonicprime authored and lanmaster53 committed Oct 16, 2019
1 parent de6c411 commit 585153f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions recon-ng
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def recon_ui(args):
'check': args.check if not args.stealth else False,
'analytics': args.analytics if not args.stealth else False,
'marketplace': args.marketplace if not args.stealth else False,
'accessible' : args.accessible
}
# instantiate framework
x = base.Recon(**flags)
Expand All @@ -51,6 +52,7 @@ parser.add_argument('--no-version', help='disable version check', dest='check',
parser.add_argument('--no-analytics', help='disable analytics reporting', dest='analytics', default=True, action='store_false')
parser.add_argument('--no-marketplace', help='disable remote module management', dest='marketplace', default=True, action='store_false')
parser.add_argument('--stealth', help='disable all passive requests (--no-*)', dest='stealth', default=False, action='store_true')
parser.add_argument('--accessible', help='Use accessible outputs when available', dest='accessible', default=False, action='store_true')
parser.add_argument('--version', help='displays the current version', action='version', version=base.__version__)
args = parser.parse_args()
recon_ui(args)
10 changes: 7 additions & 3 deletions recon/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# import framework libs
from recon.core import framework
from recon.core.constants import BANNER
from recon.core.constants import BANNER, BANNER_SMALL

# set the __version__ variable based on the VERSION file
exec(open(os.path.join(sys.path[0], 'VERSION')).read())
Expand Down Expand Up @@ -48,7 +48,7 @@ class Recon(framework.Framework):

repo_url = 'https://raw.githubusercontent.com/lanmaster53/recon-ng-modules/master/'

def __init__(self, check=True, analytics=True, marketplace=True):
def __init__(self, check=True, analytics=True, marketplace=True, accessible=False):
framework.Framework.__init__(self, 'base')
self._name = 'recon-ng'
self._prompt_template = '{}[{}] > '
Expand All @@ -57,6 +57,7 @@ def __init__(self, check=True, analytics=True, marketplace=True):
self._check = check
self._analytics = analytics
self._marketplace = marketplace
self._accessible = accessible
# set path variables
self.app_path = framework.Framework.app_path = sys.path[0]
self.core_path = framework.Framework.core_path = os.path.join(self.app_path, 'core')
Expand Down Expand Up @@ -118,8 +119,11 @@ def _check_version(self):
self.alert('Version check disabled.')

def _print_banner(self):
banner = BANNER
if self._accessible:
banner = BANNER_SMALL
banner_len = len(max(BANNER.split(os.linesep), key=len))
print(BANNER)
print(banner)
print('{0:^{1}}'.format(f"{framework.Colors.O}[{self._name} v{__version__}, {__author__}]{framework.Colors.N}", banner_len + 8))
print('')
counts = [(len(self._loaded_category[x]), x) for x in self._loaded_category]
Expand Down
7 changes: 7 additions & 0 deletions recon/core/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@
| | \_ | | |____ | | ____| |____ |____
www.practisec.com
'''

BANNER_SMALL = r'''
RECON-NG
Sponsored by...
- BLACK HILLS INFORMATION SECURITY at www.blackhillsinfosec.com
- PRACTISEC at www.practisec.com
'''

0 comments on commit 585153f

Please sign in to comment.