├── .gitmodules ├── LICENSE ├── lib └── __init__.py └── recon-scan.py /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/API-Yatedo"] 2 | path = lib/API-Yatedo 3 | url = git@github.com:PaulSec/API-Yatedo.git 4 | [submodule "lib/API-Email-Format"] 5 | path = lib/API-Email-Format 6 | url = git@github.com:PaulSec/API-Email-Format.git 7 | [submodule "lib/API-Pipl"] 8 | path = lib/API-Pipl 9 | url = git@github.com:PaulSec/API-Pipl.git 10 | [submodule "lib/API-HaveIBeenPwned"] 11 | path = lib/API-HaveIBeenPwned 12 | url = git@github.com:PaulSec/API-HaveIBeenPwned.git 13 | [submodule "lib/yatedo"] 14 | path = lib/yatedo 15 | url = git@github.com:PaulSec/API-Yatedo.git 16 | [submodule "lib/haveibeenpwnedAPI"] 17 | path = lib/haveibeenpwnedAPI 18 | url = git@github.com:PaulSec/API-HaveIBeenPwned.git 19 | [submodule "lib/piplAPI"] 20 | path = lib/piplAPI 21 | url = git@github.com:PaulSec/API-Pipl.git 22 | [submodule "lib/emailFormatAPI"] 23 | path = lib/emailFormatAPI 24 | url = git@github.com:PaulSec/API-Email-Format.git 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Paul 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulSec/recon-scan/cfb2a8dbf9b2384f5a62004ca7bff44802309fb3/lib/__init__.py -------------------------------------------------------------------------------- /recon-scan.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | # coding: utf-8 3 | 4 | import sys 5 | from optparse import OptionParser 6 | # external APIs 7 | from lib.yatedo.yatedoAPI import YatedoAPI 8 | from lib.piplAPI.piplAPI import PiplAPI 9 | from lib.emailFormatAPI.emailFormatAPI import EmailFormatAPI 10 | from lib.haveibeenpwnedAPI.haveibeenpwnedAPI import haveibeenpwnedAPI 11 | 12 | 13 | VERBOSE_MODE = False 14 | 15 | 16 | def display_message(s): 17 | global VERBOSE_MODE 18 | if VERBOSE_MODE: 19 | print '[verbose] %s' % s 20 | 21 | 22 | def main(): 23 | global VERBOSE_MODE 24 | parser = OptionParser() 25 | parser.add_option("-c", "--company", dest="company", help="Company you want to gather info", default=None) 26 | parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False, help="Verbose mode") 27 | 28 | (options, args) = parser.parse_args() 29 | 30 | if options.verbose: 31 | VERBOSE_MODE = True 32 | 33 | if options.company is None: 34 | parser.print_help() 35 | sys.exit(-1) 36 | 37 | # get employees 38 | display_message('Retrieving employees for the company "%s"' % (options.company)) 39 | company = YatedoAPI().get_employees(options.company) 40 | display_message('%s employees found' % (len(company['employees']))) 41 | 42 | # retrieve info for each employee 43 | for employee in company['employees']: 44 | display_message('Retrieving info for user "%s"' % (employee['name'])) 45 | employee['profiles'] = PiplAPI().get_info(employee['name']) 46 | # displaying all profiles we gathered 47 | for profile_url in employee['profiles']: 48 | print 'On: %s' % (profile_url) 49 | 50 | # retrieve emails 51 | mails = EmailFormatAPI().get(options.company) 52 | display_message('%s mails found' % (len(mails))) 53 | for mail in mails: 54 | display_message('"%s" pwned? %s' % (mail, haveibeenpwnedAPI().is_compromised(mail) != [])) 55 | 56 | if __name__ == '__main__': 57 | main() 58 | --------------------------------------------------------------------------------