Skip to content
Permalink
Browse files

Added an 'accessible' option to improve output accessibility.

  • Loading branch information...
catatonicprime authored and lanmaster53 committed Oct 16, 2019
1 parent de6c411 commit 585153fba590919cfad06b4623d6c93c225e4ac3
Showing with 16 additions and 3 deletions.
  1. +2 −0 recon-ng
  2. +7 −3 recon/core/base.py
  3. +7 −0 recon/core/constants.py
@@ -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)
@@ -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)
@@ -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())
@@ -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 = '{}[{}] > '
@@ -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')
@@ -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]
@@ -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.
You can’t perform that action at this time.