├── .gitignore ├── .travis.yml ├── Common ├── SimplyEmail.ini ├── TaskController.py └── __init__.py ├── Helpers ├── HtmlBootStrapTheme.py ├── Parser.py ├── __init__.py └── helpers.py ├── License ├── LICENSE-BootStrap-Twitter ├── LICENSE-SimplyEmail ├── LICENSE-Veil └── LICENSE-theHarvester ├── Modules ├── AskSearch.py ├── CanaryBinSearch.py ├── EmailHunter.py ├── FlickrSearch.py ├── GitHubCodeSearch.py ├── GitHubGistSearch.py ├── GoogleSearch.py ├── HtmlScrape.py ├── OnionStagram.py ├── SearchPGP.py ├── WhoisAPISearch.py ├── Whoisolgy.py ├── YahooSearch.py └── __init__.py ├── README.md ├── Setup.sh ├── SimplyEmail.py └── bootstrap-3.3.5 ├── LICENSE └── SimplyEmailTemplate.html /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # C extensions 6 | *.so 7 | 8 | # Distribution / packaging 9 | .Python 10 | env/ 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | *.egg-info/ 23 | .installed.cfg 24 | *.egg 25 | 26 | # PyInstaller 27 | # Usually these files are written by a python script from a template 28 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 29 | *.manifest 30 | *.spec 31 | 32 | # Installer logs 33 | pip-log.txt 34 | pip-delete-this-directory.txt 35 | 36 | # Unit test / coverage reports 37 | htmlcov/ 38 | .tox/ 39 | .coverage 40 | .coverage.* 41 | .cache 42 | nosetests.xml 43 | coverage.xml 44 | *,cover 45 | 46 | # Translations 47 | *.mo 48 | *.pot 49 | 50 | # Django stuff: 51 | *.log 52 | 53 | # Sphinx documentation 54 | docs/_build/ 55 | 56 | # PyBuilder 57 | target/ -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "2.7" 4 | script: 5 | - "sudo sh Setup.sh" 6 | - "sudo ./SimplyEmail.py -l" 7 | -------------------------------------------------------------------------------- /Common/SimplyEmail.ini: -------------------------------------------------------------------------------- 1 | [GlobalSettings] 2 | UserAgent: (Mozilla/5.0 (Windows; U; Windows NT 6.0;en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 3 | SaveFile: Email_List.txt 4 | HtmlFile: Email_List.html 5 | 6 | [ProcessConfig] 7 | TottalProcs: 8 8 | 9 | [APIKeys] 10 | Funcoming=Green 11 | 12 | # Settings for HTML Scrapping module 13 | # Save can add in a path - default is the SimpleEmail folder with domain name 14 | [HtmlScrape] 15 | Depth: 2 16 | Wait: 0 17 | LimitRate: 10000k 18 | Timeout: 2 19 | Save: 20 | RemoveHTML: Yes 21 | 22 | # You can use a few diffrent Key Servers so a config may be a good idea for this 23 | [SearchPGP] 24 | KeyServer: pgp.rediris.es:11371 25 | Hostname: pgp.rediris.es 26 | 27 | # Settings for Google Search 28 | [GoogleSearch] 29 | StartQuantity: 100 30 | QueryLimit: 500 31 | QueryStart: 0 32 | 33 | #Flickr Settings 34 | [FlickrSearch] 35 | Hostname: flickr.com 36 | 37 | #GitHub Code Scraping settigns 38 | #Page Depth: WARNING every page can contain upto 30 users and multiple links to scrape, this can slow down the results obtain very fast 39 | [GitHubSearch] 40 | PageDepth: 3 41 | QueryStart: 1 42 | 43 | #StartPAge Search engine settings 44 | [StartPageSearch] 45 | StartQuantity: 100 46 | QueryLimit: 1000 47 | QueryStart: 0 48 | 49 | #YahooSearch engine settings 50 | [YahooSearch] 51 | StartQuantity: 100 52 | QueryLimit: 600 53 | QueryStart: 0 54 | 55 | #Canary PasteBin Search NON-API 56 | [CanaryPasteBin] 57 | PageDepth: 2 58 | QueryStart: 1 59 | MaxPastesToSearch: 50 60 | 61 | # Search Git Hub Gist code 62 | # Page Depth: WARNING every page can contain upto 30 users and multiple links to scrape, this can slow down the results obtain very fast 63 | [GitHubGistSearch] 64 | PageDepth: 3 65 | QueryStart: 1 66 | 67 | # Ask Search Engine Search 68 | [AskSearch] 69 | StartQuantity: 10 70 | QueryPAgeLimit: 10 71 | QueryStart: 0 72 | -------------------------------------------------------------------------------- /Common/TaskController.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import imp 3 | import glob 4 | import multiprocessing 5 | import Queue 6 | import threading 7 | import configparser 8 | import os 9 | import sys 10 | import warnings 11 | import time 12 | import subprocess 13 | from Helpers import helpers 14 | from Helpers import HtmlBootStrapTheme 15 | 16 | 17 | class Conducter: 18 | 19 | # We are going to do the following in this order: 20 | # 1) Load Modules 21 | # 2) Add them to an array 22 | # 3) Task selector will take all those module names and place them into a queue 23 | # 4) The Threading function will call and pop from the queue and will instanciate that module 24 | # 5) The module will than can be dynamic in nature and we can add to the framework easily and effectily 25 | # 6) The module will place the results (emails) into a results queue in 26 | # memmory so we can output to Sqlite or WebPage or Console 27 | 28 | def __init__(self): 29 | # Create dictionaries of supported modules 30 | # empty until stuff loaded into them 31 | # stolen from Veil :) 32 | self.modules = {} 33 | self.dmodules = {} 34 | # create required array 35 | self.Emails = [] 36 | self.ConsumerList = [] 37 | self.Tasks = [] 38 | self.version = "0.3" 39 | self.ResultsList = [] 40 | 41 | def ConfigSectionMap(section): 42 | dict1 = {} 43 | options = Config.options(section) 44 | for option in options: 45 | try: 46 | dict1[option] = Config.get(section, option) 47 | if dict1[option] == -1: 48 | DebugPrint("skip: %s" % option) 49 | except: 50 | print("exception on %s!" % option) 51 | dict1[option] = None 52 | return dict1 53 | 54 | def TestModule(self, module, domain): 55 | ModuleName = module 56 | module = self.modules[module] 57 | module = module.ClassName(domain) 58 | name = "[*]" + module.name 59 | print name 60 | module.execute() 61 | 62 | # Handler for each Process that will call all the modules in the Queue 63 | def ExecuteModule(self, Task_queue, Results_queue, domain): 64 | while True: 65 | Task = Task_queue.get() 66 | # If the queue is emepty exit this proc 67 | if Task is None: 68 | break 69 | # Inst the class 70 | try: 71 | ModuleName = Task 72 | Task = self.modules[Task] 73 | Module = Task.ClassName(domain) 74 | name = "[*] Starting: " + Module.name 75 | print helpers.color(name, status=True) 76 | # Try to start the module 77 | try: 78 | # Emails will be returned as a list 79 | Emails = Module.execute() 80 | if Emails: 81 | count = len(Emails) 82 | Length = "[*] " + Module.name + \ 83 | ": Gathered " + str(count) + " Email(s)!" 84 | print helpers.color(Length, status=True) 85 | for Email in Emails: 86 | Results_queue.put(Email) 87 | #Task_queue.task_done() 88 | else: 89 | Message = "[*] " + Module.name + \ 90 | " has completed with no Email(s)" 91 | print helpers.color(Message, status=True) 92 | except Exception as e: 93 | error = "[!] Error During Runtime in Module " + \ 94 | Module.name + ": " + str(e) 95 | print helpers.color(error, warning=True) 96 | except Exception as e: 97 | error = "[!] Error Loading Module: " + str(e) 98 | print helpers.color(error, warning=True) 99 | 100 | def printer(self, FinalEmailList): 101 | # Building out the Text file that will be outputted 102 | Date = time.strftime("%d/%m/%Y") 103 | Time = time.strftime("%I:%M:%S") 104 | PrintTitle = "\t----------------------------------\n" 105 | PrintTitle += "\tEmail Recon: " + Date + " " + Time + "\n" 106 | PrintTitle += "\t----------------------------------\n" 107 | x = 0 108 | for item in FinalEmailList: 109 | item = item + "\n" 110 | if x == 0: 111 | try: 112 | with open('Email_List.txt', "a") as myfile: 113 | myfile.write(PrintTitle) 114 | except Exception as e: 115 | print e 116 | try: 117 | with open('Email_List.txt', "a") as myfile: 118 | myfile.write(item) 119 | x += 1 120 | except Exception as e: 121 | print e 122 | print helpers.color("[*] Completed output!", status=True) 123 | return x 124 | 125 | def HtmlPrinter(self, FinalEmailList, Domain): 126 | # Builds the HTML file 127 | # try: 128 | Html = HtmlBootStrapTheme.HtmlBuilder(FinalEmailList, Domain) 129 | Html.BuildHtml() 130 | Html.OutPutHTML() 131 | # except Exception as e: 132 | #error = "[!] Error building HTML file:" + e 133 | # print helpers.color(error, warning=True) 134 | 135 | def CleanResults(self, domain): 136 | # Clean Up results, remove dupplicates and enforce strict Domain reuslts (future) 137 | # Set Timeout or you wont leave the While loop 138 | SecondList = [] 139 | # Validate the domain.. this can mess up but i dont want to miss 140 | # anything 141 | for item in self.ConsumerList: 142 | if domain in item: 143 | SecondList.append(item) 144 | FinalList = [] 145 | # Itt over all items in the list 146 | for item in SecondList: 147 | # Check if the value is in the new list 148 | if item not in FinalList: 149 | # Add item to list and put back in the Queue 150 | FinalList.append(item) 151 | # results_queue.put(item) 152 | print helpers.color("[*] Completed Cleaning Results", status=True) 153 | return FinalList 154 | 155 | def Consumer(self, Results_queue): 156 | while True: 157 | try: 158 | item = Results_queue.get() 159 | if item is None: 160 | break 161 | self.ConsumerList.append(item) 162 | except: 163 | pass 164 | 165 | def TaskSelector(self, domain): 166 | # Here it will check the Que for the next task to be completed 167 | # Using the Dynamic loaded modules we can easly select which module is up 168 | # Rather than using If statment on every task that needs to be done 169 | 170 | # Build our Queue of work for emails that we will gather 171 | Task_queue = multiprocessing.Queue() 172 | Results_queue = multiprocessing.Queue() 173 | 174 | # How many proc will we have, pull from config file, setting up the 175 | # config file handler 176 | Config = configparser.ConfigParser() 177 | Config.read("Common/SimplyEmail.ini") 178 | total_proc = int(Config['ProcessConfig']['TottalProcs']) 179 | # Place our email tasks in a queue 180 | for Task in self.modules: 181 | Task_queue.put(Task) 182 | # Make sure we arnt starting up Procs that arnt needed. 183 | if total_proc > len(self.modules): 184 | total_proc = len(self.modules) 185 | for i in xrange(total_proc): 186 | Task_queue.put(None) 187 | procs = [] 188 | for thread in range(total_proc): 189 | procs.append(multiprocessing.Process( 190 | target=self.ExecuteModule, args=(Task_queue, Results_queue, domain))) 191 | for p in procs: 192 | p.daemon = True 193 | p.start() 194 | # This SAVED my life! 195 | # really important to understand that if the results queue was still full 196 | # the .join() method would not join even though a Consumer recived 197 | # a posin pill! This allows us to easily: 198 | # 1) start up all procs 199 | # 2) wait till all procs are posined 200 | # 3) than start up the cleaner and parser 201 | # 4) once finshed, than release by a break 202 | # 5) finally the Results_queue would be empty 203 | # 6) All procs can finally join! 204 | t = threading.Thread(target=self.Consumer, args=(Results_queue,)) 205 | t.daemon = True 206 | t.start() 207 | # Enter this loop so we know when to terminate the Consumer thread 208 | # This multiprocessing.active_children() is also Joining! 209 | while True: 210 | LeftOver = multiprocessing.active_children() 211 | time.sleep(1) 212 | # We want to wait till we have no procs left, before we join 213 | if len(LeftOver) == 0: 214 | # Block untill all results are consumed 215 | time.sleep(2) 216 | Results_queue.put(None) 217 | # t.join() 218 | try: 219 | FinalEmailList = self.CleanResults(domain) 220 | except Exception as e: 221 | error = "[!] Something went wrong with parsing results:" + \ 222 | str(e) 223 | print helpers.color(error, warning=True) 224 | try: 225 | FinalCount = self.printer(FinalEmailList) 226 | except Exception as e: 227 | error = "[!] Something went wrong with outputixng results:" + \ 228 | str(e) 229 | print helpers.color(error, warning=True) 230 | Results_queue.close() 231 | try: 232 | self.HtmlPrinter(FinalEmailList, domain) 233 | except Exception as e: 234 | error = "[!] Something went wrong with HTML results:" + \ 235 | str(e) 236 | print helpers.color(error, warning=True) 237 | break 238 | for p in procs: 239 | p.join() 240 | Task_queue.close() 241 | # Launches a single thread to output results 242 | self.CompletedScreen(FinalCount, domain) 243 | 244 | # This is the Test version of the multi proc above, this function 245 | # Helps with testing only one module at a time. Helping with proper 246 | # Module Dev and testing before intergration 247 | def TestModule(self, domain, module): 248 | Config = configparser.ConfigParser() 249 | Config.read("Common/SimplyEmail.ini") 250 | total_proc = int(1) 251 | Task_queue = multiprocessing.JoinableQueue() 252 | Results_queue = multiprocessing.Queue() 253 | for Task in self.modules: 254 | if module in Task: 255 | Task_queue.put(Task) 256 | # Only use one proc since this is a test module 257 | for i in xrange(total_proc): 258 | Task_queue.put(None) 259 | procs = [] 260 | for thread in range(total_proc): 261 | procs.append(multiprocessing.Process( 262 | target=self.ExecuteModule, args=(Task_queue, Results_queue, domain))) 263 | for p in procs: 264 | p.daemon = True 265 | p.start() 266 | # This SAVED my life! 267 | # really important to understand that if the results queue was still full 268 | # the .join() method would not join even though a Consumer recived 269 | # a posin pill! This allows us to easily: 270 | # 1) start up all procs 271 | # 2) wait till all procs are posined 272 | # 3) than start up the cleaner and parser 273 | # 4) once finshed, than release by a break 274 | # 5) finally the Results_queue would be empty 275 | # 6) All procs can finally join! 276 | t = threading.Thread(target=self.Consumer, args=(Results_queue,)) 277 | t.daemon = True 278 | t.start() 279 | # Enter this loop so we know when to terminate the Consumer thread 280 | # This multiprocessing.active_children() is also Joining! 281 | while True: 282 | LeftOver = multiprocessing.active_children() 283 | time.sleep(1) 284 | # We want to wait till we have no procs left, before we join 285 | if len(LeftOver) == 0: 286 | # Block untill all results are consumed 287 | time.sleep(2) 288 | Results_queue.put(None) 289 | # t.join() 290 | try: 291 | FinalEmailList = self.CleanResults(domain) 292 | except Exception as e: 293 | error = "[!] Something went wrong with parsing results:" + \ 294 | str(e) 295 | print helpers.color(error, warning=True) 296 | try: 297 | FinalCount = self.printer(FinalEmailList) 298 | except Exception as e: 299 | error = "[!] Something went wrong with outputixng results:" + \ 300 | str(e) 301 | print helpers.color(error, warning=True) 302 | Results_queue.close() 303 | try: 304 | self.HtmlPrinter(FinalEmailList, domain) 305 | except Exception as e: 306 | error = "[!] Something went wrong with HTML results:" + \ 307 | str(e) 308 | print helpers.color(error, warning=True) 309 | break 310 | for p in procs: 311 | p.join() 312 | Task_queue.close() 313 | # Launches a single thread to output results 314 | self.CompletedScreen(FinalCount, domain) 315 | 316 | def load_modules(self): 317 | # loop and assign key and name 318 | warnings.filterwarnings('ignore', '.*Parent module*',) 319 | x = 1 320 | for name in glob.glob('Modules/*.py'): 321 | if name.endswith(".py") and ("__init__" not in name): 322 | loaded_modules = imp.load_source( 323 | name.replace("/", ".").rstrip('.py'), name) 324 | self.modules[name] = loaded_modules 325 | self.dmodules[x] = loaded_modules 326 | x += 1 327 | return self.dmodules 328 | return self.modules 329 | 330 | def ListModules(self): 331 | print helpers.color(" [*] Available Modules are:\n", blue=True) 332 | lastBase = None 333 | x = 1 334 | for name in self.modules: 335 | parts = name.split("/") 336 | if lastBase and parts[0] != lastBase: 337 | print "" 338 | lastBase = parts[0] 339 | print "\t%s)\t%s" % (x, '{0: <24}'.format(name)) 340 | x += 1 341 | print "" 342 | 343 | def title(self): 344 | os.system('clear') 345 | # stolen from Veil :) 346 | print " ============================================================" 347 | print " Curent Version: " + self.version + " | Website: CyberSyndicates.com" 348 | print " ============================================================" 349 | print " Twitter: @real_slacker007 | Twitter: @Killswitch_gui" 350 | print " ============================================================" 351 | 352 | def title_screen(self): 353 | offtext = """------------------------------------------------------------ 354 | ______ ________ __ __ 355 | / \/ | / / | 356 | /$$$$$$ $$$$$$$$/ _____ ____ ______ $$/$$ | 357 | $$ \__$$/$$ |__ / \/ \ / \/ $$ | 358 | $$ \$$ | $$$$$$ $$$$ |$$$$$$ $$ $$ | 359 | $$$$$$ $$$$$/ $$ | $$ | $$ |/ $$ $$ $$ | 360 | / \__$$ $$ |_____$$ | $$ | $$ /$$$$$$$ $$ $$ | 361 | $$ $$/$$ $$ | $$ | $$ $$ $$ $$ $$ | 362 | $$$$$$/ $$$$$$$$/$$/ $$/ $$/ $$$$$$$/$$/$$/ 363 | 364 | ------------------------------------------------------------""" 365 | print helpers.color(offtext, bold=False) 366 | 367 | def CompletedScreen(self, FinalCount, domain): 368 | Config = configparser.ConfigParser() 369 | Config.read("Common/SimplyEmail.ini") 370 | TextSaveFile = str(Config['GlobalSettings']['SaveFile']) 371 | HtmlSaveFile = str(Config['GlobalSettings']['HtmlFile']) 372 | 373 | Line = " [*] Email reconnaissance has been completed:\n\n" 374 | Line += " File Location: \t\t" + os.getcwd() + "\n" 375 | Line += " Unique Emails Found:\t\t" + str(FinalCount) + "\n" 376 | Line += " Raw Email File:\t\t" + str(TextSaveFile) + "\n" 377 | Line += " HTML Email File:\t\t" + str(HtmlSaveFile) + "\n" 378 | Line += " Domain Performed:\t\t" + str(domain) + "\n" 379 | self.title() 380 | print Line 381 | 382 | # Ask user to open report on CLI 383 | Question = "[>] Would you like to launch the HTML report?: " 384 | Answer = raw_input(helpers.color(Question, bold=False)) 385 | Answer = Answer.upper() 386 | if Answer in "NO": 387 | sys.exit(0) 388 | if Answer in "YES": 389 | # gnome-open cisco.doc 390 | subprocess.Popen(("gnome-open",HtmlSaveFile), stdout=subprocess.PIPE) 391 | -------------------------------------------------------------------------------- /Common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/SimplyEmail/0666c57f64d642d8b2c8bb477d0696f9e0d30f23/Common/__init__.py -------------------------------------------------------------------------------- /Helpers/HtmlBootStrapTheme.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding=utf8 3 | import sys 4 | from Helpers import helpers 5 | 6 | # This Classes main goal is to build the HTML output file using all self 7 | # contained CSS and JS 8 | 9 | 10 | class HtmlBuilder: 11 | 12 | def __init__(self, Emails, Domain): 13 | self.Emails = Emails 14 | self.Domain = Domain 15 | self.HTML = "" 16 | reload(sys) 17 | sys.setdefaultencoding('utf8') 18 | 19 | def BuildHtml(self): 20 | BottomHtml = """ 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | 41 | 74 | 75 | 76 | """ 77 | # Build out Tables using simple pre-formated Divs 78 | 79 | EmailTables = "" 80 | x = 1 81 | 82 | for Email in self.Emails: 83 | line = "\t\t\n" 84 | line += "\t\t\t" + str(x) + "\n" 85 | line += "\t\t\t" + str(self.Domain) + "\n" 86 | line += "\t\t\t" + str(Email) + "\n" 87 | line += "\t\t\n" 88 | x += 1 89 | EmailTables += str(line) 90 | self.HTML = EmailTables 91 | self.HTML += BottomHtml 92 | 93 | def OutPutHTML(self): 94 | try: 95 | with open('bootstrap-3.3.5/SimplyEmailTemplate.html', "r") as myfile: 96 | SourceHtml = unicode(myfile.read()) 97 | except Exception as e: 98 | print e 99 | # Add my tables to the bottom of the HTML and CSS 100 | SourceHtml += unicode(self.HTML) 101 | try: 102 | with open('Email_List.html', "w") as myfile: 103 | myfile.write(SourceHtml) 104 | except Exception as e: 105 | print e 106 | -------------------------------------------------------------------------------- /Helpers/Parser.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import os 4 | import re 5 | import string 6 | import subprocess 7 | from random import randint 8 | 9 | # Simple Parser Options for email enumeration. 10 | 11 | # Taken from theHarvester 12 | 13 | 14 | class Parser: 15 | 16 | def __init__(self, InputData): 17 | self.InputData = InputData 18 | #self.domain = domain 19 | 20 | # A really good url clean by theHarvester at : 21 | # https://raw.githubusercontent.com/killswitch-GUI/theHarvester/master/myparser.py 22 | def genericClean(self): 23 | self.InputData = re.sub('', '', self.InputData) 24 | self.InputData = re.sub('', '', self.InputData) 25 | self.InputData = re.sub('', '', self.InputData) 26 | self.InputData = re.sub('', '', self.InputData) 27 | self.InputData = re.sub('%2f', ' ', self.InputData) 28 | self.InputData = re.sub('%3a', ' ', self.InputData) 29 | self.InputData = re.sub('', '', self.InputData) 30 | self.InputData = re.sub('', '', self.InputData) 31 | self.InputData = re.sub('', ' ', self.InputData) 32 | self.InputData = re.sub('', ' ', self.InputData) 33 | 34 | for e in ('>', ':', '=', '<', '/', '\\', ';', '&', '%3A', '%3D', '%3C', '"'): 35 | self.InputData = string.replace(self.InputData, e, ' ') 36 | 37 | # A really good url clean by theHarvester at : 38 | # https://raw.githubusercontent.com/killswitch-GUI/theHarvester/master/myparser.py 39 | def urlClean(self): 40 | self.InputData = re.sub('', '', self.InputData) 41 | self.InputData = re.sub('', '', self.InputData) 42 | self.InputData = re.sub('%2f', ' ', self.InputData) 43 | self.InputData = re.sub('%3a', ' ', self.InputData) 44 | for e in ('<', '>', ':', '=', ';', '&', '%3A', '%3D', '%3C'): 45 | self.InputData = string.replace(self.InputData, e, ' ') 46 | 47 | def FindEmails(self): 48 | Result = [] 49 | match = re.findall('[\w\.-]+@[\w\.-]+', self.InputData) 50 | for item in match: 51 | Result.append(item) 52 | #emails = self.unique() 53 | return Result 54 | 55 | def GrepFindEmails(self): 56 | # Major hack during testing; 57 | # I found grep is was better at Regex than re in python 58 | FinalOutput = [] 59 | StartFileName = randint(1000,999999) 60 | EndFileName = randint(1000,999999) 61 | val = "" 62 | with open(str(StartFileName), "wr") as myfile: 63 | myfile.write(self.InputData) 64 | ps = subprocess.Popen( 65 | ('grep', "@", str(StartFileName)), stdout=subprocess.PIPE) 66 | try: 67 | val = subprocess.check_output(("grep", "-i", "-o", '[A-Z0-9._%+-]\+@[A-Z0-9.-]\+\.[A-Z]\{2,4\}'), 68 | stdin=ps.stdout) 69 | except Exception as e: 70 | pass 71 | os.remove(str(StartFileName)) 72 | if len(val) > 0: 73 | with open(str(EndFileName), "w") as myfile: 74 | myfile.write(str(val)) 75 | with open(str(EndFileName), "r") as myfile: 76 | output = myfile.readlines() 77 | os.remove(str(EndFileName)) 78 | for item in output: 79 | FinalOutput.append(item.rstrip("\n")) 80 | return FinalOutput 81 | 82 | def CleanListOutput(self): 83 | FinalOutput = [] 84 | for item in self.InputData: 85 | FinalOutput.append(item.rstrip("\n")) 86 | return FinalOutput 87 | -------------------------------------------------------------------------------- /Helpers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/SimplyEmail/0666c57f64d642d8b2c8bb477d0696f9e0d30f23/Helpers/__init__.py -------------------------------------------------------------------------------- /Helpers/helpers.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import os, sys, types, string, textwrap 4 | 5 | def color(string, status=True, warning=False, bold=True, blue=False): 6 | """ 7 | Change text color for the linux terminal, defaults to green. 8 | Set "warning=True" for red. 9 | stolen from Veil :) 10 | """ 11 | attr = [] 12 | if status: 13 | # green 14 | attr.append('32') 15 | if warning: 16 | # red 17 | attr.append('31') 18 | if bold: 19 | attr.append('1') 20 | if blue: 21 | #blue 22 | attr.append('34') 23 | return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string) 24 | 25 | def formatLong(title, message, frontTab=True, spacing=16): 26 | """ 27 | Print a long title:message with our standardized formatting. 28 | Wraps multiple lines into a nice paragraph format. 29 | """ 30 | 31 | lines = textwrap.wrap(textwrap.dedent(message).strip(), width=50) 32 | returnString = "" 33 | 34 | i = 1 35 | if len(lines) > 0: 36 | if frontTab: 37 | returnString += "\t%s%s" % (('{0: <%s}'%spacing).format(title), lines[0]) 38 | else: 39 | returnString += " %s%s" % (('{0: <%s}'%(spacing-1)).format(title), lines[0]) 40 | while i < len(lines): 41 | if frontTab: 42 | returnString += "\n\t"+' '*spacing+lines[i] 43 | else: 44 | returnString += "\n"+' '*spacing+lines[i] 45 | i += 1 46 | return returnString 47 | 48 | def DirectoryListing(directory): 49 | # Returns a list of dir's of results 50 | dirs = [] 51 | for (dir, _, files) in os.walk(directory): 52 | for f in files: 53 | path = os.path.join(dir, f) 54 | if os.path.exists(path): 55 | dirs.append(path) 56 | return dirs 57 | -------------------------------------------------------------------------------- /License/LICENSE-BootStrap-Twitter: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2015 Twitter, Inc 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /License/LICENSE-SimplyEmail: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /License/LICENSE-Veil: -------------------------------------------------------------------------------- 1 | Copyright (C) 2013 Christopher Truncer 2 | 3 | This program is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program. If not, see . 15 | 16 | ************************************************************************ 17 | 18 | GNU GENERAL PUBLIC LICENSE 19 | Version 3, 29 June 2007 20 | 21 | Copyright (C) 2007 Free Software Foundation, Inc. 22 | Everyone is permitted to copy and distribute verbatim copies 23 | of this license document, but changing it is not allowed. 24 | 25 | Preamble 26 | 27 | The GNU General Public License is a free, copyleft license for 28 | software and other kinds of works. 29 | 30 | The licenses for most software and other practical works are designed 31 | to take away your freedom to share and change the works. By contrast, 32 | the GNU General Public License is intended to guarantee your freedom to 33 | share and change all versions of a program--to make sure it remains free 34 | software for all its users. We, the Free Software Foundation, use the 35 | GNU General Public License for most of our software; it applies also to 36 | any other work released this way by its authors. You can apply it to 37 | your programs, too. 38 | 39 | When we speak of free software, we are referring to freedom, not 40 | price. Our General Public Licenses are designed to make sure that you 41 | have the freedom to distribute copies of free software (and charge for 42 | them if you wish), that you receive source code or can get it if you 43 | want it, that you can change the software or use pieces of it in new 44 | free programs, and that you know you can do these things. 45 | 46 | To protect your rights, we need to prevent others from denying you 47 | these rights or asking you to surrender the rights. Therefore, you have 48 | certain responsibilities if you distribute copies of the software, or if 49 | you modify it: responsibilities to respect the freedom of others. 50 | 51 | For example, if you distribute copies of such a program, whether 52 | gratis or for a fee, you must pass on to the recipients the same 53 | freedoms that you received. You must make sure that they, too, receive 54 | or can get the source code. And you must show them these terms so they 55 | know their rights. 56 | 57 | Developers that use the GNU GPL protect your rights with two steps: 58 | (1) assert copyright on the software, and (2) offer you this License 59 | giving you legal permission to copy, distribute and/or modify it. 60 | 61 | For the developers' and authors' protection, the GPL clearly explains 62 | that there is no warranty for this free software. For both users' and 63 | authors' sake, the GPL requires that modified versions be marked as 64 | changed, so that their problems will not be attributed erroneously to 65 | authors of previous versions. 66 | 67 | Some devices are designed to deny users access to install or run 68 | modified versions of the software inside them, although the manufacturer 69 | can do so. This is fundamentally incompatible with the aim of 70 | protecting users' freedom to change the software. The systematic 71 | pattern of such abuse occurs in the area of products for individuals to 72 | use, which is precisely where it is most unacceptable. Therefore, we 73 | have designed this version of the GPL to prohibit the practice for those 74 | products. If such problems arise substantially in other domains, we 75 | stand ready to extend this provision to those domains in future versions 76 | of the GPL, as needed to protect the freedom of users. 77 | 78 | Finally, every program is threatened constantly by software patents. 79 | States should not allow patents to restrict development and use of 80 | software on general-purpose computers, but in those that do, we wish to 81 | avoid the special danger that patents applied to a free program could 82 | make it effectively proprietary. To prevent this, the GPL assures that 83 | patents cannot be used to render the program non-free. 84 | 85 | The precise terms and conditions for copying, distribution and 86 | modification follow. 87 | 88 | TERMS AND CONDITIONS 89 | 90 | 0. Definitions. 91 | 92 | "This License" refers to version 3 of the GNU General Public License. 93 | 94 | "Copyright" also means copyright-like laws that apply to other kinds of 95 | works, such as semiconductor masks. 96 | 97 | "The Program" refers to any copyrightable work licensed under this 98 | License. Each licensee is addressed as "you". "Licensees" and 99 | "recipients" may be individuals or organizations. 100 | 101 | To "modify" a work means to copy from or adapt all or part of the work 102 | in a fashion requiring copyright permission, other than the making of an 103 | exact copy. The resulting work is called a "modified version" of the 104 | earlier work or a work "based on" the earlier work. 105 | 106 | A "covered work" means either the unmodified Program or a work based 107 | on the Program. 108 | 109 | To "propagate" a work means to do anything with it that, without 110 | permission, would make you directly or secondarily liable for 111 | infringement under applicable copyright law, except executing it on a 112 | computer or modifying a private copy. Propagation includes copying, 113 | distribution (with or without modification), making available to the 114 | public, and in some countries other activities as well. 115 | 116 | To "convey" a work means any kind of propagation that enables other 117 | parties to make or receive copies. Mere interaction with a user through 118 | a computer network, with no transfer of a copy, is not conveying. 119 | 120 | An interactive user interface displays "Appropriate Legal Notices" 121 | to the extent that it includes a convenient and prominently visible 122 | feature that (1) displays an appropriate copyright notice, and (2) 123 | tells the user that there is no warranty for the work (except to the 124 | extent that warranties are provided), that licensees may convey the 125 | work under this License, and how to view a copy of this License. If 126 | the interface presents a list of user commands or options, such as a 127 | menu, a prominent item in the list meets this criterion. 128 | 129 | 1. Source Code. 130 | 131 | The "source code" for a work means the preferred form of the work 132 | for making modifications to it. "Object code" means any non-source 133 | form of a work. 134 | 135 | A "Standard Interface" means an interface that either is an official 136 | standard defined by a recognized standards body, or, in the case of 137 | interfaces specified for a particular programming language, one that 138 | is widely used among developers working in that language. 139 | 140 | The "System Libraries" of an executable work include anything, other 141 | than the work as a whole, that (a) is included in the normal form of 142 | packaging a Major Component, but which is not part of that Major 143 | Component, and (b) serves only to enable use of the work with that 144 | Major Component, or to implement a Standard Interface for which an 145 | implementation is available to the public in source code form. A 146 | "Major Component", in this context, means a major essential component 147 | (kernel, window system, and so on) of the specific operating system 148 | (if any) on which the executable work runs, or a compiler used to 149 | produce the work, or an object code interpreter used to run it. 150 | 151 | The "Corresponding Source" for a work in object code form means all 152 | the source code needed to generate, install, and (for an executable 153 | work) run the object code and to modify the work, including scripts to 154 | control those activities. However, it does not include the work's 155 | System Libraries, or general-purpose tools or generally available free 156 | programs which are used unmodified in performing those activities but 157 | which are not part of the work. For example, Corresponding Source 158 | includes interface definition files associated with source files for 159 | the work, and the source code for shared libraries and dynamically 160 | linked subprograms that the work is specifically designed to require, 161 | such as by intimate data communication or control flow between those 162 | subprograms and other parts of the work. 163 | 164 | The Corresponding Source need not include anything that users 165 | can regenerate automatically from other parts of the Corresponding 166 | Source. 167 | 168 | The Corresponding Source for a work in source code form is that 169 | same work. 170 | 171 | 2. Basic Permissions. 172 | 173 | All rights granted under this License are granted for the term of 174 | copyright on the Program, and are irrevocable provided the stated 175 | conditions are met. This License explicitly affirms your unlimited 176 | permission to run the unmodified Program. The output from running a 177 | covered work is covered by this License only if the output, given its 178 | content, constitutes a covered work. This License acknowledges your 179 | rights of fair use or other equivalent, as provided by copyright law. 180 | 181 | You may make, run and propagate covered works that you do not 182 | convey, without conditions so long as your license otherwise remains 183 | in force. You may convey covered works to others for the sole purpose 184 | of having them make modifications exclusively for you, or provide you 185 | with facilities for running those works, provided that you comply with 186 | the terms of this License in conveying all material for which you do 187 | not control copyright. Those thus making or running the covered works 188 | for you must do so exclusively on your behalf, under your direction 189 | and control, on terms that prohibit them from making any copies of 190 | your copyrighted material outside their relationship with you. 191 | 192 | Conveying under any other circumstances is permitted solely under 193 | the conditions stated below. Sublicensing is not allowed; section 10 194 | makes it unnecessary. 195 | 196 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 197 | 198 | No covered work shall be deemed part of an effective technological 199 | measure under any applicable law fulfilling obligations under article 200 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 201 | similar laws prohibiting or restricting circumvention of such 202 | measures. 203 | 204 | When you convey a covered work, you waive any legal power to forbid 205 | circumvention of technological measures to the extent such circumvention 206 | is effected by exercising rights under this License with respect to 207 | the covered work, and you disclaim any intention to limit operation or 208 | modification of the work as a means of enforcing, against the work's 209 | users, your or third parties' legal rights to forbid circumvention of 210 | technological measures. 211 | 212 | 4. Conveying Verbatim Copies. 213 | 214 | You may convey verbatim copies of the Program's source code as you 215 | receive it, in any medium, provided that you conspicuously and 216 | appropriately publish on each copy an appropriate copyright notice; 217 | keep intact all notices stating that this License and any 218 | non-permissive terms added in accord with section 7 apply to the code; 219 | keep intact all notices of the absence of any warranty; and give all 220 | recipients a copy of this License along with the Program. 221 | 222 | You may charge any price or no price for each copy that you convey, 223 | and you may offer support or warranty protection for a fee. 224 | 225 | 5. Conveying Modified Source Versions. 226 | 227 | You may convey a work based on the Program, or the modifications to 228 | produce it from the Program, in the form of source code under the 229 | terms of section 4, provided that you also meet all of these conditions: 230 | 231 | a) The work must carry prominent notices stating that you modified 232 | it, and giving a relevant date. 233 | 234 | b) The work must carry prominent notices stating that it is 235 | released under this License and any conditions added under section 236 | 7. This requirement modifies the requirement in section 4 to 237 | "keep intact all notices". 238 | 239 | c) You must license the entire work, as a whole, under this 240 | License to anyone who comes into possession of a copy. This 241 | License will therefore apply, along with any applicable section 7 242 | additional terms, to the whole of the work, and all its parts, 243 | regardless of how they are packaged. This License gives no 244 | permission to license the work in any other way, but it does not 245 | invalidate such permission if you have separately received it. 246 | 247 | d) If the work has interactive user interfaces, each must display 248 | Appropriate Legal Notices; however, if the Program has interactive 249 | interfaces that do not display Appropriate Legal Notices, your 250 | work need not make them do so. 251 | 252 | A compilation of a covered work with other separate and independent 253 | works, which are not by their nature extensions of the covered work, 254 | and which are not combined with it such as to form a larger program, 255 | in or on a volume of a storage or distribution medium, is called an 256 | "aggregate" if the compilation and its resulting copyright are not 257 | used to limit the access or legal rights of the compilation's users 258 | beyond what the individual works permit. Inclusion of a covered work 259 | in an aggregate does not cause this License to apply to the other 260 | parts of the aggregate. 261 | 262 | 6. Conveying Non-Source Forms. 263 | 264 | You may convey a covered work in object code form under the terms 265 | of sections 4 and 5, provided that you also convey the 266 | machine-readable Corresponding Source under the terms of this License, 267 | in one of these ways: 268 | 269 | a) Convey the object code in, or embodied in, a physical product 270 | (including a physical distribution medium), accompanied by the 271 | Corresponding Source fixed on a durable physical medium 272 | customarily used for software interchange. 273 | 274 | b) Convey the object code in, or embodied in, a physical product 275 | (including a physical distribution medium), accompanied by a 276 | written offer, valid for at least three years and valid for as 277 | long as you offer spare parts or customer support for that product 278 | model, to give anyone who possesses the object code either (1) a 279 | copy of the Corresponding Source for all the software in the 280 | product that is covered by this License, on a durable physical 281 | medium customarily used for software interchange, for a price no 282 | more than your reasonable cost of physically performing this 283 | conveying of source, or (2) access to copy the 284 | Corresponding Source from a network server at no charge. 285 | 286 | c) Convey individual copies of the object code with a copy of the 287 | written offer to provide the Corresponding Source. This 288 | alternative is allowed only occasionally and noncommercially, and 289 | only if you received the object code with such an offer, in accord 290 | with subsection 6b. 291 | 292 | d) Convey the object code by offering access from a designated 293 | place (gratis or for a charge), and offer equivalent access to the 294 | Corresponding Source in the same way through the same place at no 295 | further charge. You need not require recipients to copy the 296 | Corresponding Source along with the object code. If the place to 297 | copy the object code is a network server, the Corresponding Source 298 | may be on a different server (operated by you or a third party) 299 | that supports equivalent copying facilities, provided you maintain 300 | clear directions next to the object code saying where to find the 301 | Corresponding Source. Regardless of what server hosts the 302 | Corresponding Source, you remain obligated to ensure that it is 303 | available for as long as needed to satisfy these requirements. 304 | 305 | e) Convey the object code using peer-to-peer transmission, provided 306 | you inform other peers where the object code and Corresponding 307 | Source of the work are being offered to the general public at no 308 | charge under subsection 6d. 309 | 310 | A separable portion of the object code, whose source code is excluded 311 | from the Corresponding Source as a System Library, need not be 312 | included in conveying the object code work. 313 | 314 | A "User Product" is either (1) a "consumer product", which means any 315 | tangible personal property which is normally used for personal, family, 316 | or household purposes, or (2) anything designed or sold for incorporation 317 | into a dwelling. In determining whether a product is a consumer product, 318 | doubtful cases shall be resolved in favor of coverage. For a particular 319 | product received by a particular user, "normally used" refers to a 320 | typical or common use of that class of product, regardless of the status 321 | of the particular user or of the way in which the particular user 322 | actually uses, or expects or is expected to use, the product. A product 323 | is a consumer product regardless of whether the product has substantial 324 | commercial, industrial or non-consumer uses, unless such uses represent 325 | the only significant mode of use of the product. 326 | 327 | "Installation Information" for a User Product means any methods, 328 | procedures, authorization keys, or other information required to install 329 | and execute modified versions of a covered work in that User Product from 330 | a modified version of its Corresponding Source. The information must 331 | suffice to ensure that the continued functioning of the modified object 332 | code is in no case prevented or interfered with solely because 333 | modification has been made. 334 | 335 | If you convey an object code work under this section in, or with, or 336 | specifically for use in, a User Product, and the conveying occurs as 337 | part of a transaction in which the right of possession and use of the 338 | User Product is transferred to the recipient in perpetuity or for a 339 | fixed term (regardless of how the transaction is characterized), the 340 | Corresponding Source conveyed under this section must be accompanied 341 | by the Installation Information. But this requirement does not apply 342 | if neither you nor any third party retains the ability to install 343 | modified object code on the User Product (for example, the work has 344 | been installed in ROM). 345 | 346 | The requirement to provide Installation Information does not include a 347 | requirement to continue to provide support service, warranty, or updates 348 | for a work that has been modified or installed by the recipient, or for 349 | the User Product in which it has been modified or installed. Access to a 350 | network may be denied when the modification itself materially and 351 | adversely affects the operation of the network or violates the rules and 352 | protocols for communication across the network. 353 | 354 | Corresponding Source conveyed, and Installation Information provided, 355 | in accord with this section must be in a format that is publicly 356 | documented (and with an implementation available to the public in 357 | source code form), and must require no special password or key for 358 | unpacking, reading or copying. 359 | 360 | 7. Additional Terms. 361 | 362 | "Additional permissions" are terms that supplement the terms of this 363 | License by making exceptions from one or more of its conditions. 364 | Additional permissions that are applicable to the entire Program shall 365 | be treated as though they were included in this License, to the extent 366 | that they are valid under applicable law. If additional permissions 367 | apply only to part of the Program, that part may be used separately 368 | under those permissions, but the entire Program remains governed by 369 | this License without regard to the additional permissions. 370 | 371 | When you convey a copy of a covered work, you may at your option 372 | remove any additional permissions from that copy, or from any part of 373 | it. (Additional permissions may be written to require their own 374 | removal in certain cases when you modify the work.) You may place 375 | additional permissions on material, added by you to a covered work, 376 | for which you have or can give appropriate copyright permission. 377 | 378 | Notwithstanding any other provision of this License, for material you 379 | add to a covered work, you may (if authorized by the copyright holders of 380 | that material) supplement the terms of this License with terms: 381 | 382 | a) Disclaiming warranty or limiting liability differently from the 383 | terms of sections 15 and 16 of this License; or 384 | 385 | b) Requiring preservation of specified reasonable legal notices or 386 | author attributions in that material or in the Appropriate Legal 387 | Notices displayed by works containing it; or 388 | 389 | c) Prohibiting misrepresentation of the origin of that material, or 390 | requiring that modified versions of such material be marked in 391 | reasonable ways as different from the original version; or 392 | 393 | d) Limiting the use for publicity purposes of names of licensors or 394 | authors of the material; or 395 | 396 | e) Declining to grant rights under trademark law for use of some 397 | trade names, trademarks, or service marks; or 398 | 399 | f) Requiring indemnification of licensors and authors of that 400 | material by anyone who conveys the material (or modified versions of 401 | it) with contractual assumptions of liability to the recipient, for 402 | any liability that these contractual assumptions directly impose on 403 | those licensors and authors. 404 | 405 | All other non-permissive additional terms are considered "further 406 | restrictions" within the meaning of section 10. If the Program as you 407 | received it, or any part of it, contains a notice stating that it is 408 | governed by this License along with a term that is a further 409 | restriction, you may remove that term. If a license document contains 410 | a further restriction but permits relicensing or conveying under this 411 | License, you may add to a covered work material governed by the terms 412 | of that license document, provided that the further restriction does 413 | not survive such relicensing or conveying. 414 | 415 | If you add terms to a covered work in accord with this section, you 416 | must place, in the relevant source files, a statement of the 417 | additional terms that apply to those files, or a notice indicating 418 | where to find the applicable terms. 419 | 420 | Additional terms, permissive or non-permissive, may be stated in the 421 | form of a separately written license, or stated as exceptions; 422 | the above requirements apply either way. 423 | 424 | 8. Termination. 425 | 426 | You may not propagate or modify a covered work except as expressly 427 | provided under this License. Any attempt otherwise to propagate or 428 | modify it is void, and will automatically terminate your rights under 429 | this License (including any patent licenses granted under the third 430 | paragraph of section 11). 431 | 432 | However, if you cease all violation of this License, then your 433 | license from a particular copyright holder is reinstated (a) 434 | provisionally, unless and until the copyright holder explicitly and 435 | finally terminates your license, and (b) permanently, if the copyright 436 | holder fails to notify you of the violation by some reasonable means 437 | prior to 60 days after the cessation. 438 | 439 | Moreover, your license from a particular copyright holder is 440 | reinstated permanently if the copyright holder notifies you of the 441 | violation by some reasonable means, this is the first time you have 442 | received notice of violation of this License (for any work) from that 443 | copyright holder, and you cure the violation prior to 30 days after 444 | your receipt of the notice. 445 | 446 | Termination of your rights under this section does not terminate the 447 | licenses of parties who have received copies or rights from you under 448 | this License. If your rights have been terminated and not permanently 449 | reinstated, you do not qualify to receive new licenses for the same 450 | material under section 10. 451 | 452 | 9. Acceptance Not Required for Having Copies. 453 | 454 | You are not required to accept this License in order to receive or 455 | run a copy of the Program. Ancillary propagation of a covered work 456 | occurring solely as a consequence of using peer-to-peer transmission 457 | to receive a copy likewise does not require acceptance. However, 458 | nothing other than this License grants you permission to propagate or 459 | modify any covered work. These actions infringe copyright if you do 460 | not accept this License. Therefore, by modifying or propagating a 461 | covered work, you indicate your acceptance of this License to do so. 462 | 463 | 10. Automatic Licensing of Downstream Recipients. 464 | 465 | Each time you convey a covered work, the recipient automatically 466 | receives a license from the original licensors, to run, modify and 467 | propagate that work, subject to this License. You are not responsible 468 | for enforcing compliance by third parties with this License. 469 | 470 | An "entity transaction" is a transaction transferring control of an 471 | organization, or substantially all assets of one, or subdividing an 472 | organization, or merging organizations. If propagation of a covered 473 | work results from an entity transaction, each party to that 474 | transaction who receives a copy of the work also receives whatever 475 | licenses to the work the party's predecessor in interest had or could 476 | give under the previous paragraph, plus a right to possession of the 477 | Corresponding Source of the work from the predecessor in interest, if 478 | the predecessor has it or can get it with reasonable efforts. 479 | 480 | You may not impose any further restrictions on the exercise of the 481 | rights granted or affirmed under this License. For example, you may 482 | not impose a license fee, royalty, or other charge for exercise of 483 | rights granted under this License, and you may not initiate litigation 484 | (including a cross-claim or counterclaim in a lawsuit) alleging that 485 | any patent claim is infringed by making, using, selling, offering for 486 | sale, or importing the Program or any portion of it. 487 | 488 | 11. Patents. 489 | 490 | A "contributor" is a copyright holder who authorizes use under this 491 | License of the Program or a work on which the Program is based. The 492 | work thus licensed is called the contributor's "contributor version". 493 | 494 | A contributor's "essential patent claims" are all patent claims 495 | owned or controlled by the contributor, whether already acquired or 496 | hereafter acquired, that would be infringed by some manner, permitted 497 | by this License, of making, using, or selling its contributor version, 498 | but do not include claims that would be infringed only as a 499 | consequence of further modification of the contributor version. For 500 | purposes of this definition, "control" includes the right to grant 501 | patent sublicenses in a manner consistent with the requirements of 502 | this License. 503 | 504 | Each contributor grants you a non-exclusive, worldwide, royalty-free 505 | patent license under the contributor's essential patent claims, to 506 | make, use, sell, offer for sale, import and otherwise run, modify and 507 | propagate the contents of its contributor version. 508 | 509 | In the following three paragraphs, a "patent license" is any express 510 | agreement or commitment, however denominated, not to enforce a patent 511 | (such as an express permission to practice a patent or covenant not to 512 | sue for patent infringement). To "grant" such a patent license to a 513 | party means to make such an agreement or commitment not to enforce a 514 | patent against the party. 515 | 516 | If you convey a covered work, knowingly relying on a patent license, 517 | and the Corresponding Source of the work is not available for anyone 518 | to copy, free of charge and under the terms of this License, through a 519 | publicly available network server or other readily accessible means, 520 | then you must either (1) cause the Corresponding Source to be so 521 | available, or (2) arrange to deprive yourself of the benefit of the 522 | patent license for this particular work, or (3) arrange, in a manner 523 | consistent with the requirements of this License, to extend the patent 524 | license to downstream recipients. "Knowingly relying" means you have 525 | actual knowledge that, but for the patent license, your conveying the 526 | covered work in a country, or your recipient's use of the covered work 527 | in a country, would infringe one or more identifiable patents in that 528 | country that you have reason to believe are valid. 529 | 530 | If, pursuant to or in connection with a single transaction or 531 | arrangement, you convey, or propagate by procuring conveyance of, a 532 | covered work, and grant a patent license to some of the parties 533 | receiving the covered work authorizing them to use, propagate, modify 534 | or convey a specific copy of the covered work, then the patent license 535 | you grant is automatically extended to all recipients of the covered 536 | work and works based on it. 537 | 538 | A patent license is "discriminatory" if it does not include within 539 | the scope of its coverage, prohibits the exercise of, or is 540 | conditioned on the non-exercise of one or more of the rights that are 541 | specifically granted under this License. You may not convey a covered 542 | work if you are a party to an arrangement with a third party that is 543 | in the business of distributing software, under which you make payment 544 | to the third party based on the extent of your activity of conveying 545 | the work, and under which the third party grants, to any of the 546 | parties who would receive the covered work from you, a discriminatory 547 | patent license (a) in connection with copies of the covered work 548 | conveyed by you (or copies made from those copies), or (b) primarily 549 | for and in connection with specific products or compilations that 550 | contain the covered work, unless you entered into that arrangement, 551 | or that patent license was granted, prior to 28 March 2007. 552 | 553 | Nothing in this License shall be construed as excluding or limiting 554 | any implied license or other defenses to infringement that may 555 | otherwise be available to you under applicable patent law. 556 | 557 | 12. No Surrender of Others' Freedom. 558 | 559 | If conditions are imposed on you (whether by court order, agreement or 560 | otherwise) that contradict the conditions of this License, they do not 561 | excuse you from the conditions of this License. If you cannot convey a 562 | covered work so as to satisfy simultaneously your obligations under this 563 | License and any other pertinent obligations, then as a consequence you may 564 | not convey it at all. For example, if you agree to terms that obligate you 565 | to collect a royalty for further conveying from those to whom you convey 566 | the Program, the only way you could satisfy both those terms and this 567 | License would be to refrain entirely from conveying the Program. 568 | 569 | 13. Use with the GNU Affero General Public License. 570 | 571 | Notwithstanding any other provision of this License, you have 572 | permission to link or combine any covered work with a work licensed 573 | under version 3 of the GNU Affero General Public License into a single 574 | combined work, and to convey the resulting work. The terms of this 575 | License will continue to apply to the part which is the covered work, 576 | but the special requirements of the GNU Affero General Public License, 577 | section 13, concerning interaction through a network will apply to the 578 | combination as such. 579 | 580 | 14. Revised Versions of this License. 581 | 582 | The Free Software Foundation may publish revised and/or new versions of 583 | the GNU General Public License from time to time. Such new versions will 584 | be similar in spirit to the present version, but may differ in detail to 585 | address new problems or concerns. 586 | 587 | Each version is given a distinguishing version number. If the 588 | Program specifies that a certain numbered version of the GNU General 589 | Public License "or any later version" applies to it, you have the 590 | option of following the terms and conditions either of that numbered 591 | version or of any later version published by the Free Software 592 | Foundation. If the Program does not specify a version number of the 593 | GNU General Public License, you may choose any version ever published 594 | by the Free Software Foundation. 595 | 596 | If the Program specifies that a proxy can decide which future 597 | versions of the GNU General Public License can be used, that proxy's 598 | public statement of acceptance of a version permanently authorizes you 599 | to choose that version for the Program. 600 | 601 | Later license versions may give you additional or different 602 | permissions. However, no additional obligations are imposed on any 603 | author or copyright holder as a result of your choosing to follow a 604 | later version. 605 | 606 | 15. Disclaimer of Warranty. 607 | 608 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 609 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 610 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 611 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 612 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 613 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 614 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 615 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 616 | 617 | 16. Limitation of Liability. 618 | 619 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 620 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 621 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 622 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 623 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 624 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 625 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 626 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 627 | SUCH DAMAGES. 628 | 629 | 17. Interpretation of Sections 15 and 16. 630 | 631 | If the disclaimer of warranty and limitation of liability provided 632 | above cannot be given local legal effect according to their terms, 633 | reviewing courts shall apply local law that most closely approximates 634 | an absolute waiver of all civil liability in connection with the 635 | Program, unless a warranty or assumption of liability accompanies a 636 | copy of the Program in return for a fee. 637 | 638 | The above terms and conditions apply along with the following: 639 | You are NOT licensed to use Veil if you submit payloads to ANY online scanner of ANY kind. 640 | 641 | Also, feel free to come up and talk to us at a con, or anywhere. We love this stuff and love sharing ideas. 642 | 643 | 644 | END OF TERMS AND CONDITIONS 645 | -------------------------------------------------------------------------------- /License/LICENSE-theHarvester: -------------------------------------------------------------------------------- 1 | Released under the GPL v 2.0. 2 | 3 | If you did not recieve a copy of the GPL, try http://www.gnu.org/. 4 | 5 | Copyright 2011 Christian Martorella 6 | 7 | theHarvester is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation version 2 of the License. 10 | 11 | theHarvester is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | -------------------------------------------------------------------------------- /Modules/AskSearch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Port from theHarvester! Shout out to him for the code: 3 | # https://github.com/laramies/theHarvester/blob/master/discovery/asksearch.py 4 | import configparser 5 | import requests 6 | from Helpers import Parser 7 | from Helpers import helpers 8 | 9 | # Class will have the following properties: 10 | # 1) name / description 11 | # 2) main name called "ClassName" 12 | # 3) execute function (calls everthing it neeeds) 13 | # 4) places the findings into a queue 14 | 15 | 16 | class ClassName: 17 | 18 | def __init__(self, Domain): 19 | self.name = "Ask Search for Emails" 20 | self.description = "Simple Ask Search for Emails" 21 | config = configparser.ConfigParser() 22 | try: 23 | config.read('Common/SimplyEmail.ini') 24 | self.UserAgent = { 25 | 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'} 26 | self.PageLimit = int(config['AskSearch']['QueryPageLimit']) 27 | self.Counter = int(config['AskSearch']['QueryStart']) 28 | self.Domain = Domain 29 | self.Html = "" 30 | except: 31 | print helpers.color("[*] Major Settings for Ask Search are missing, EXITING!\n", warning=True) 32 | 33 | def execute(self): 34 | self.process() 35 | FinalOutput = self.get_emails() 36 | return FinalOutput 37 | 38 | def process(self): 39 | while self.Counter <= self.PageLimit: 40 | try: 41 | url = 'http://www.ask.com/web?q=@' + str(self.Domain) + \ 42 | '&pu=10&page=' + str(self.Counter) 43 | except Exception as e: 44 | error = "[!] Major issue with Yahoo Search:" + str(e) 45 | print helpers.color(error, warning=True) 46 | try: 47 | r = requests.get(url, headers=self.UserAgent) 48 | except Exception as e: 49 | error = "[!] Fail during Request to Yahoo (Check Connection):" + \ 50 | str(e) 51 | print helpers.color(error, warning=True) 52 | results = r.content 53 | self.Html += results 54 | self.Counter += 1 55 | 56 | def get_emails(self): 57 | Parse = Parser.Parser(self.Html) 58 | Parse.genericClean() 59 | Parse.urlClean() 60 | FinalOutput = Parse.GrepFindEmails() 61 | print FinalOutput 62 | return FinalOutput 63 | -------------------------------------------------------------------------------- /Modules/CanaryBinSearch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | # Non-API-Based 5 | import requests 6 | import configparser 7 | import urllib2 8 | from BeautifulSoup import BeautifulSoup 9 | from Helpers import Parser 10 | from Helpers import helpers 11 | 12 | # Class will have the following properties: 13 | # 1) name / description 14 | # 2) main name called "ClassName" 15 | # 3) execute function (calls everthing it neeeds) 16 | # 4) places the findings into a queue 17 | 18 | # This method will do the following: 19 | # 1) Get raw HTML for lets say enron.com ) 20 | # This is mainly do to the API not supporting code searched with out known repo or user 21 | # :(https://canary.pw/search/?q=earthlink.net&page=3) 22 | # 2) Use beautiful soup to parse the results of the first (5) pages for tags that start with "/view/" 23 | # 3) Ueses a list of URL's and places that raw HTML into a on value 24 | # 4) Sends to parser for results 25 | 26 | # Some considerations are the retunred results: max 100 it seems 27 | # API may return a great array of results - This will be added later 28 | # Still having some major python errors 29 | 30 | 31 | class ClassName: 32 | 33 | def __init__(self, domain): 34 | self.name = "Searching Canary Paste Bin" 35 | self.description = "Search Canary for paste potential data dumps, this can take a bit but a great source" 36 | self.domain = domain 37 | config = configparser.ConfigParser() 38 | self.Html = "" 39 | try: 40 | config.read('Common/SimplyEmail.ini') 41 | self.Depth = int(config['CanaryPasteBin']['PageDepth']) 42 | self.Counter = int(config['CanaryPasteBin']['QueryStart']) 43 | except: 44 | print helpers.color("[*] Major Settings for Canary PasteBin Search are missing, EXITING!\n", warning=True) 45 | 46 | def execute(self): 47 | self.process() 48 | FinalOutput = self.get_emails() 49 | return FinalOutput 50 | 51 | def process(self): 52 | # Get all the Pastebin raw items 53 | # https://canary.pw/search/?q=earthlink.net&page=3 54 | UrlList = [] 55 | while self.Counter <= self.Depth: 56 | try: 57 | url = "https://canary.pw/search/?q=" + str(self.domain) + "&page=" + \ 58 | str(self.Counter) 59 | r = requests.get(url, timeout=5) 60 | if r.status_code != 200: 61 | break 62 | except Exception as e: 63 | error = "[!] Major issue with Canary Pastebin Search:" + str(e) 64 | print helpers.color(error, warning=True) 65 | RawHtml = r.content 66 | # Parse the results for our URLS) 67 | soup = BeautifulSoup(RawHtml) 68 | for a in soup.findAll('a', href=True): 69 | a = a['href'] 70 | if a.startswith('/view'): 71 | UrlList.append(a) 72 | self.Counter += 1 73 | # Now take all gathered URL's and gather the HTML content needed 74 | Status = "[*] Canary found " + str(len(UrlList)) + " PasteBin(s) to Search!" 75 | print helpers.color(Status, status=True) 76 | for item in UrlList: 77 | try: 78 | item = "https://canary.pw" + str(item) 79 | # They can be massive! 80 | rawhtml = urllib2.urlopen(item, timeout=20) 81 | try: 82 | self.Html += rawhtml.read() 83 | except: 84 | pass 85 | except Exception as e: 86 | error = "[!] Connection Timed out on Canary Pastebin Search:" + \ 87 | str(e) 88 | print helpers.color(error, warning=True) 89 | 90 | # We must Pre Parse (python dosnt like the large vars) 91 | def get_emails(self): 92 | # You must report back with parsing errors!!! 93 | # in one case I have seen alex@gmail.com:Password 94 | # This will break most Reg-Ex 95 | Parse = Parser.Parser(self.Html) 96 | Parse.genericClean() 97 | Parse.urlClean() 98 | FinalOutput = Parse.GrepFindEmails() 99 | return FinalOutput 100 | -------------------------------------------------------------------------------- /Modules/EmailHunter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import requests 3 | import configparser 4 | from pprint import pprint 5 | from Helpers import Parser 6 | from Helpers import helpers 7 | 8 | # Class will have the following properties: 9 | # 1) name / description 10 | # 2) main name called "ClassName" 11 | # 3) execute function (calls everthing it neeeds) 12 | # 4) places the findings into a queue 13 | 14 | # https://emailhunter.co/trial/v1/search?offset=0&domain=any.com&format=json 15 | 16 | class ClassName: 17 | 18 | def __init__(self, domain): 19 | self.name = "EmailHunter Trial API" 20 | self.description = "Search the EmailHunter DB for potential emails" 21 | self.domain = domain 22 | config = configparser.ConfigParser() 23 | self.results = [] 24 | try: 25 | config.read('Common/SimplyEmail.ini') 26 | self.UserAgent = str(config['GlobalSettings']['UserAgent']) 27 | except: 28 | print helpers.color("[*] Major Settings for EmailHunter are missing, EXITING!\n", warning=True) 29 | 30 | def execute(self): 31 | self.process() 32 | FinalOutput = self.get_emails() 33 | return FinalOutput 34 | 35 | def process(self): 36 | try: 37 | # This returns a JSON object 38 | url = "https://emailhunter.co/trial/v1/search?offset=0&domain=" + \ 39 | self.domain + "&format=json" 40 | r = requests.get(url) 41 | except Exception as e: 42 | error = "[!] Major issue with PGP Search:" + str(e) 43 | print helpers.color(error, warning=True) 44 | results = r.json() 45 | # pprint(results) 46 | # Check to make sure we got data back from the API 47 | if results['status'] == "success": 48 | # The API starts at 0 for the first value 49 | x = 0 50 | EmailCount = int(results['results']) 51 | # We will itirate of the Json object for the index objects 52 | while x < EmailCount: 53 | self.results.append(results['emails'][int(x)]['value']) 54 | x += 1 55 | 56 | def get_emails(self): 57 | # Make sure you remove any newlines 58 | Parse = Parser.Parser(self.results) 59 | FinalOutput = Parse.CleanListOutput() 60 | return FinalOutput -------------------------------------------------------------------------------- /Modules/FlickrSearch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import string 3 | import requests 4 | import configparser 5 | from Helpers import Parser 6 | from Helpers import helpers 7 | 8 | # Class will have the following properties: 9 | # 1) name / description 10 | # 2) main name called "ClassName" 11 | # 3) execute function (calls everthing it neeeds) 12 | # 4) places the findings into a queue 13 | 14 | 15 | class ClassName: 16 | 17 | def __init__(self, domain): 18 | self.name = "Searching Flicker" 19 | self.description = "Search the Flicker top relvant results for emails" 20 | self.domain = domain 21 | config = configparser.ConfigParser() 22 | self.results = "" 23 | try: 24 | config.read('Common/SimplyEmail.ini') 25 | self.HostName = str(config['FlickrSearch']['Hostname']) 26 | self.UserAgent = str(config['GlobalSettings']['UserAgent']) 27 | except: 28 | print helpers.color("[*] Major Settings for FlickrSearch are missing, EXITING!\n", warning=True) 29 | 30 | def execute(self): 31 | self.process() 32 | FinalOutput = self.get_emails() 33 | return FinalOutput 34 | 35 | def process(self): 36 | try: 37 | url = "https://www.flickr.com/search/?text=%40" + self.domain 38 | r = requests.get(url) 39 | except Exception as e: 40 | error = "[!] Major issue with Flickr Search:" + str(e) 41 | print helpers.color(error, warning=True) 42 | self.results = r.content 43 | # https://www.flickr.com/search/?text=%40microsoft.com 44 | # is an example of a complete request for "@microsoft.com" 45 | 46 | def get_emails(self): 47 | Parse = Parser.Parser(self.results) 48 | FinalOutput = Parse.GrepFindEmails() 49 | return FinalOutput 50 | -------------------------------------------------------------------------------- /Modules/GitHubCodeSearch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | import requests 4 | import configparser 5 | from BeautifulSoup import BeautifulSoup 6 | from Helpers import Parser 7 | from Helpers import helpers 8 | import time 9 | 10 | # Class will have the following properties: 11 | # 1) name / description 12 | # 2) main name called "ClassName" 13 | # 3) execute function (calls everthing it neeeds) 14 | # 4) places the findings into a queue 15 | 16 | # This method will do the following: 17 | # 1) Get raw HTML for lets say enron.com (https://github.com/search?utf8=✓&q=enron.com+&type=Code&ref=searchresults) 18 | # This is mainly do to the API not supporting code searched with out known repo or user :( 19 | # 2) Use beautiful soup to parse the results of the first (5) pages for tags that start with "/" 20 | # 3) Ueses a list of URL's and places that raw HTML into a on value 21 | # 4) Sends to parser for results 22 | 23 | # Here was a simple version of parsing a page: 24 | # urlist = [] 25 | # FinalHtml = "" 26 | # r = requests.get( 27 | # "https://github.com/search?utf8=%E2%9C%93&q=enron.com+&type=Code&ref=searchresults") 28 | # html = r.content 29 | # soup = BeautifulSoup(html) 30 | # for a in soup.findAll('a', href=True): 31 | # a = a['href'] 32 | # if a.startswith('/'): 33 | # time.sleep(1) 34 | # a = 'https://github.com' + str(a) 35 | # html = requests.get(a) 36 | # print "[!] Htiting: " + a 37 | # FinalHtml += html.content 38 | # with open("temps.html", "w") as myfile: 39 | # output = myfile.write(FinalHtml) 40 | 41 | 42 | class ClassName: 43 | 44 | def __init__(self, domain): 45 | self.name = "Searching GitHub Code" 46 | self.description = "Search GitHub code for emails using a large pool of code searches" 47 | self.domain = domain 48 | config = configparser.ConfigParser() 49 | self.Html = "" 50 | try: 51 | config.read('Common/SimplyEmail.ini') 52 | self.Depth = int(config['GitHubSearch']['PageDepth']) 53 | self.Counter = int(config['GitHubSearch']['QueryStart']) 54 | except: 55 | print helpers.color("[*] Major Settings for GitHubSearch are missing, EXITING!\n", warning=True) 56 | 57 | def execute(self): 58 | self.process() 59 | FinalOutput = self.get_emails() 60 | return FinalOutput 61 | 62 | def process(self): 63 | # Get all the USER code Repos 64 | # https://github.com/search?p=2&q=enron.com+&ref=searchresults&type=Code&utf8=✓ 65 | UrlList = [] 66 | while self.Counter <= self.Depth: 67 | try: 68 | url = "https://github.com/search?p=" + str(self.Counter) + "&q=" + \ 69 | str(self.domain) + "+&ref=searchresults&type=Code&utf8=✓" 70 | r = requests.get(url, timeout=2) 71 | if r.status_code != 200: 72 | break 73 | except Exception as e: 74 | error = "[!] Major isself.Counter += 1sue with GitHub Search:" + str(e) 75 | print helpers.color(error, warning=True) 76 | RawHtml = r.content 77 | # Parse the results for our URLS) 78 | soup = BeautifulSoup(RawHtml) 79 | for a in soup.findAll('a', href=True): 80 | a = a['href'] 81 | if a.startswith('/'): 82 | UrlList.append(a) 83 | self.Counter += 1 84 | # Now take all gathered URL's and gather the HTML content needed 85 | for Url in UrlList: 86 | try: 87 | Url = "https://github.com" + Url 88 | html = requests.get(Url, timeout=2) 89 | self.Html += html.content 90 | except Exception as e: 91 | error = "[!] Connection Timed out on Github Search:" + str(e) 92 | print helpers.color(error, warning=True) 93 | 94 | def get_emails(self): 95 | Parse = Parser.Parser(self.Html) 96 | Parse.genericClean() 97 | Parse.urlClean() 98 | FinalOutput = Parse.GrepFindEmails() 99 | return FinalOutput 100 | -------------------------------------------------------------------------------- /Modules/GitHubGistSearch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | import requests 4 | import configparser 5 | from BeautifulSoup import BeautifulSoup 6 | from Helpers import Parser 7 | from Helpers import helpers 8 | import time 9 | 10 | # Class will have the following properties: 11 | # 1) name / description 12 | # 2) main name called "ClassName" 13 | # 3) execute function (calls everthing it neeeds) 14 | # 4) places the findings into a queue 15 | 16 | 17 | # https://gist.github.com/search?utf8=✓&q=%40enron.com&ref=searchresults 18 | 19 | class ClassName: 20 | 21 | def __init__(self, domain): 22 | self.name = "Searching GitHubGist Code" 23 | self.description = "Search GitHubGist code for emails using a large pool of code searches" 24 | self.domain = domain 25 | config = configparser.ConfigParser() 26 | self.Html = "" 27 | try: 28 | config.read('Common/SimplyEmail.ini') 29 | self.Depth = int(config['GitHubGistSearch']['PageDepth']) 30 | self.Counter = int(config['GitHubGistSearch']['QueryStart']) 31 | except: 32 | print helpers.color("[*] Major Settings for GitHubGistSearch are missing, EXITING!\n", warning=True) 33 | 34 | def execute(self): 35 | self.process() 36 | FinalOutput = self.get_emails() 37 | return FinalOutput 38 | 39 | def process(self): 40 | # Get all the USER code Repos 41 | # https://github.com/search?p=2&q=enron.com+&ref=searchresults&type=Code&utf8=✓ 42 | UrlList = [] 43 | while self.Counter <= self.Depth: 44 | try: 45 | # search?p=2&q=%40enron.com&ref=searchresults&utf8=✓ 46 | url = "https://gist.github.com/search?p=" + str(self.Counter) + "&q=%40" + \ 47 | str(self.domain) + "+&ref=searchresults&utf8=✓" 48 | r = requests.get(url, timeout=5) 49 | if r.status_code != 200: 50 | break 51 | except Exception as e: 52 | error = "[!] Major isself.Counter += 1sue with GitHubGist Search:" + str(e) 53 | print helpers.color(error, warning=True) 54 | RawHtml = r.content 55 | # Parse the results for our URLS) 56 | soup = BeautifulSoup(RawHtml) 57 | for a in soup.findAll('a', href=True): 58 | a = a['href'] 59 | if a.startswith('/'): 60 | UrlList.append(a) 61 | self.Counter += 1 62 | # Now take all gathered URL's and gather the HTML content needed 63 | for Url in UrlList: 64 | try: 65 | Url = "https://gist.github.com" + Url 66 | html = requests.get(Url, timeout=2) 67 | self.Html += html.content 68 | except Exception as e: 69 | error = "[!] Connection Timed out on GithubGist Search:" + str(e) 70 | print helpers.color(error, warning=True) 71 | 72 | def get_emails(self): 73 | Parse = Parser.Parser(self.Html) 74 | Parse.genericClean() 75 | Parse.urlClean() 76 | FinalOutput = Parse.GrepFindEmails() 77 | return FinalOutput 78 | -------------------------------------------------------------------------------- /Modules/GoogleSearch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Class will have the following properties: 4 | # 1) name / description 5 | # 2) main name called "ClassName" 6 | # 3) execute function (calls everthing it neeeds) 7 | # 4) places the findings into a queue 8 | import configparser 9 | import requests 10 | import time 11 | from Helpers import helpers 12 | from Helpers import Parser 13 | 14 | 15 | class ClassName: 16 | 17 | def __init__(self, Domain): 18 | self.name = "Google Search for Emails" 19 | self.description = "Uses google to search for emails, parses them out of the" 20 | config = configparser.ConfigParser() 21 | try: 22 | config.read('Common/SimplyEmail.ini') 23 | self.Domain = Domain 24 | self.Quanity = int(config['GoogleSearch']['StartQuantity']) 25 | self.UserAgent = { 26 | 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'} 27 | self.Limit = int(config['GoogleSearch']['QueryLimit']) 28 | self.Counter = int(config['GoogleSearch']['QueryStart']) 29 | self.Html = "" 30 | except: 31 | print helpers.color("[*] Major Settings for GoogleSearch are missing, EXITING!\n", warning=True) 32 | 33 | def execute(self): 34 | self.search() 35 | FinalOutput = self.get_emails() 36 | return FinalOutput 37 | 38 | def search(self): 39 | while self.Counter <= self.Limit and self.Counter <= 1000: 40 | time.sleep(1) 41 | try: 42 | url = "http://www.google.com/search?num=" + str(self.Quanity) + \ 43 | "&start=" + str(self.Counter) + \ 44 | '&hl=en&meta=&q="%40' + self.Domain + '"' 45 | 46 | urly = "http://www.google.com/search?num=" + str(self.Quanity) + "&start=" + \ 47 | str(self.Counter) + "&hl=en&meta=&q=%40\"" + \ 48 | self.Domain + "\"" 49 | except Exception as e: 50 | error = "[!] Major issue with Google Search:" + str(e) 51 | print helpers.color(error, warning=True) 52 | try: 53 | r = requests.get(urly, headers=self.UserAgent) 54 | except Exception as e: 55 | error = "[!] Fail during Request to Google (Check Connection):" + \ 56 | str(e) 57 | print helpers.color(error, warning=True) 58 | results = r.content 59 | self.Html += results 60 | self.Counter += 100 61 | 62 | def get_emails(self): 63 | Parse = Parser.Parser(self.Html) 64 | Parse.genericClean() 65 | Parse.urlClean() 66 | FinalOutput = Parse.GrepFindEmails() 67 | return FinalOutput 68 | -------------------------------------------------------------------------------- /Modules/HtmlScrape.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import subprocess 4 | import configparser 5 | import os 6 | import shutil 7 | from Helpers import * 8 | 9 | 10 | # Class will have the following properties: 11 | # 1) name / description 12 | # 2) main name called "ClassName" 13 | # 3) execute function (calls everthing it neeeds) 14 | # 4) places the findings into a queue 15 | 16 | # Use the same class name so we can easily start up each module the same ways 17 | class ClassName: 18 | 19 | def __init__(self, domain): 20 | # Descriptions that are required!!! 21 | self.name = "HTML Scape of Taget Website" 22 | self.description = "Html Scape the target website for emails and data" 23 | # Settings we will pull from config file (We need required options in 24 | # config file) 25 | config = configparser.ConfigParser() 26 | try: 27 | config.read('Common/SimplyEmail.ini') 28 | self.domain = domain 29 | self.useragent = "--user-agent=" + \ 30 | str(config['GlobalSettings']['UserAgent']) 31 | self.depth = "--level=" + str(config['HtmlScrape']['Depth']) 32 | self.wait = "--wait=" + str(config['HtmlScrape']['Wait']) 33 | self.limit_rate = "--limit-rate=" + \ 34 | str(config['HtmlScrape']['LimitRate']) 35 | self.timeout = "--read-timeout=" + \ 36 | str(config['HtmlScrape']['Timeout']) 37 | self.save = "--directory-prefix=" + \ 38 | str(config['HtmlScrape']['Save']) + str(self.domain) 39 | self.remove = str(config['HtmlScrape']['RemoveHTML']) 40 | except: 41 | print helpers.color("[*] Major Settings for HTML are missing, EXITING!\n", warning=True) 42 | 43 | def execute(self): 44 | try: 45 | self.search() 46 | Emails = self.get_emails() 47 | return Emails 48 | except Exception as e: 49 | print e 50 | 51 | def search(self): 52 | # setup domain so it will follow reddirects 53 | # may move this to httrack in future 54 | TempDomain = "http://www." + str(self.domain) 55 | try: 56 | # Using subprocess, more or less because of the rebust HTML miroring ability 57 | # And also allows proxy / VPN Support 58 | # "--convert-links" 59 | subprocess.call(["wget", "-q", "--header=""Accept: text/html""", self.useragent, 60 | "--recursive", self.depth, self.wait, self.limit_rate, self.save, 61 | self.timeout, "--page-requisites", "-R gif,jpg,pdf,png,css", 62 | "--no-clobber", "--domains", self.domain, TempDomain]) 63 | except: 64 | print "[!] ERROR during Wget Request" 65 | 66 | def get_emails(self): 67 | # Direct location of new dir created during wget 68 | output = [] 69 | FinalOutput = [] 70 | val = "" 71 | directory = self.save.strip("--directory-prefix=") 72 | # directory = "www." + directory 73 | # Grep for any data containing "@", sorting out binary files as well 74 | # Pass list of Dirs to a regex, and read that path for emails 75 | try: 76 | ps = subprocess.Popen( 77 | ('grep', '-r', "@", directory), stdout=subprocess.PIPE) 78 | # Take in "ps" var and parse it for only email addresses 79 | output = [] 80 | try: 81 | val = subprocess.check_output(("grep", "-i", "-o", '[A-Z0-9._%+-]\+@[A-Z0-9.-]\+\.[A-Z]\{2,4\}'), 82 | stdin=ps.stdout) 83 | except Exception as e: 84 | pass 85 | # Supper "hack" since the data returned is from Pipelin /n and all 86 | # in var 87 | if val: 88 | with open('temp.txt', "wr+") as myfile: 89 | myfile.write(str(val)) 90 | with open('temp.txt', "r") as myfile: 91 | output = myfile.readlines() 92 | os.remove('temp.txt') 93 | for item in output: 94 | FinalOutput.append(item.rstrip("\n")) 95 | except Exception as e: 96 | print e 97 | if self.remove == "yes" or self.remove == "Yes": 98 | shutil.rmtree(directory) 99 | # using PIPE output/input to avoid using "shell=True", 100 | # which can leave major security holes if script has certain permisions 101 | return FinalOutput 102 | -------------------------------------------------------------------------------- /Modules/OnionStagram.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import requests 4 | import configparser 5 | import os 6 | from Helpers import * 7 | 8 | 9 | # Class will have the following properties: 10 | # 1) name / description 11 | # 2) main name called "ClassName" 12 | # 3) execute function (calls everthing it neeeds) 13 | # 4) places the findings into a queue 14 | 15 | # http://www.oninstagram.com/profile/search?query=@gmail.com 16 | # this allows raw query, even major like @gmail 17 | 18 | class ClassName: 19 | 20 | def __init__(self, Domain): 21 | self.name = "OnionStagram Search For Instagram Users" 22 | self.description = "Uses OnionStagrams search engine" 23 | config = configparser.ConfigParser() 24 | try: 25 | config.read('Common/SimplyEmail.ini') 26 | self.Domain = Domain 27 | self.Html = "" 28 | except: 29 | print helpers.color("[*] Major Settings for OnionStagram are missing, EXITING!\n", warning=True) 30 | 31 | def execute(self): 32 | self.process() 33 | FinalOutput = self.get_emails() 34 | return FinalOutput 35 | 36 | def process(self): 37 | try: 38 | # page seems to dynamicaly expand :) 39 | url = "http://www.oninstagram.com/profile/search?query=" + \ 40 | self.Domain 41 | r = requests.get(url) 42 | except Exception as e: 43 | error = "[!] Major issue with OnionStagram Search:" + str(e) 44 | print helpers.color(error, warning=True) 45 | self.Html = r.content 46 | 47 | def get_emails(self): 48 | Parse = Parser.Parser(self.Html) 49 | Parse.genericClean() 50 | Parse.urlClean() 51 | FinalOutput = Parse.GrepFindEmails() 52 | return FinalOutput 53 | -------------------------------------------------------------------------------- /Modules/SearchPGP.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import requests 3 | import configparser 4 | from Helpers import Parser 5 | from Helpers import helpers 6 | 7 | # Class will have the following properties: 8 | # 1) name / description 9 | # 2) main name called "ClassName" 10 | # 3) execute function (calls everthing it neeeds) 11 | # 4) places the findings into a queue 12 | 13 | 14 | class ClassName: 15 | 16 | def __init__(self, domain): 17 | self.name = "Searching PGP" 18 | self.description = "Search the PGP database for potential emails" 19 | self.domain = domain 20 | config = configparser.ConfigParser() 21 | self.results = "" 22 | try: 23 | config.read('Common/SimplyEmail.ini') 24 | self.server = str(config['SearchPGP']['KeyServer']) 25 | self.hostname = str(config['SearchPGP']['Hostname']) 26 | self.UserAgent = str(config['GlobalSettings']['UserAgent']) 27 | except: 28 | print helpers.color("[*] Major Settings for SearchPGP are missing, EXITING!\n", warning=True) 29 | 30 | def execute(self): 31 | self.process() 32 | FinalOutput = self.get_emails() 33 | return FinalOutput 34 | 35 | def process(self): 36 | try: 37 | url = "http://pgp.rediris.es:11371/pks/lookup?search=" + \ 38 | self.domain + "&op=index" 39 | r = requests.get(url) 40 | except Exception as e: 41 | error = "[!] Major issue with PGP Search:" + str(e) 42 | print helpers.color(error, warning=True) 43 | self.results = r.content 44 | 45 | def get_emails(self): 46 | Parse = Parser.Parser(self.results) 47 | FinalOutput = Parse.GrepFindEmails() 48 | return FinalOutput 49 | -------------------------------------------------------------------------------- /Modules/WhoisAPISearch.py: -------------------------------------------------------------------------------- 1 | #http://api.hackertarget.com/whois/?q=verisgroup.com 2 | #!/usr/bin/env python 3 | import requests 4 | import configparser 5 | from Helpers import Parser 6 | from Helpers import helpers 7 | 8 | # Class will have the following properties: 9 | # 1) name / description 10 | # 2) main name called "ClassName" 11 | # 3) execute function (calls everthing it neeeds) 12 | # 4) places the findings into a queue 13 | 14 | 15 | class ClassName: 16 | 17 | def __init__(self, domain): 18 | self.name = "Searching Whois" 19 | self.description = "Search the Whois database for potential POC emails" 20 | self.domain = domain 21 | config = configparser.ConfigParser() 22 | self.results = "" 23 | try: 24 | config.read('Common/SimplyEmail.ini') 25 | self.UserAgent = str(config['GlobalSettings']['UserAgent']) 26 | except: 27 | print helpers.color("[*] Major Settings for Search Whois are missing, EXITING!\n", warning=True) 28 | 29 | def execute(self): 30 | self.process() 31 | FinalOutput = self.get_emails() 32 | return FinalOutput 33 | 34 | def process(self): 35 | try: 36 | url = "http://api.hackertarget.com/whois/?q=" + \ 37 | self.domain 38 | r = requests.get(url) 39 | except Exception as e: 40 | error = "[!] Major issue with Whois Search:" + str(e) 41 | print helpers.color(error, warning=True) 42 | self.results = r.content 43 | 44 | def get_emails(self): 45 | Parse = Parser.Parser(self.results) 46 | FinalOutput = Parse.GrepFindEmails() 47 | return FinalOutput 48 | -------------------------------------------------------------------------------- /Modules/Whoisolgy.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import requests 3 | import configparser 4 | from Helpers import Parser 5 | from Helpers import helpers 6 | 7 | # Class will have the following properties: 8 | # 1) name / description 9 | # 2) main name called "ClassName" 10 | # 3) execute function (calls everthing it neeeds) 11 | # 4) places the findings into a queue 12 | 13 | #https://whoisology.com/archive_11/microsoft.com 14 | class ClassName: 15 | 16 | def __init__(self, domain): 17 | self.name = "Searching Whoisology" 18 | self.description = "Search the Whoisology database for potential POC emails" 19 | self.domain = domain 20 | config = configparser.ConfigParser() 21 | self.results = "" 22 | try: 23 | config.read('Common/SimplyEmail.ini') 24 | self.UserAgent = str(config['GlobalSettings']['UserAgent']) 25 | except: 26 | print helpers.color("[*] Major Settings for Search Whoisology are missing, EXITING!\n", warning=True) 27 | 28 | def execute(self): 29 | self.process() 30 | FinalOutput = self.get_emails() 31 | return FinalOutput 32 | 33 | def process(self): 34 | try: 35 | url = "https://whoisology.com/archive_11/" + \ 36 | self.domain 37 | r = requests.get(url) 38 | except Exception as e: 39 | error = "[!] Major issue with Whoisology Search:" + str(e) 40 | print helpers.color(error, warning=True) 41 | self.results = r.content 42 | 43 | def get_emails(self): 44 | Parse = Parser.Parser(self.results) 45 | Parse.genericClean() 46 | Parse.urlClean() 47 | FinalOutput = Parse.GrepFindEmails() 48 | return FinalOutput 49 | -------------------------------------------------------------------------------- /Modules/YahooSearch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Class will have the following properties: 4 | # 1) name / description 5 | # 2) main name called "ClassName" 6 | # 3) execute function (calls everthing it neeeds) 7 | # 4) places the findings into a queue 8 | 9 | # Adapted from theHarvester: 10 | # https://github.com/laramies/theHarvester/blob/master/discovery/yahoosearch.py 11 | # https://emailhunter.co 12 | 13 | import configparser 14 | import requests 15 | import time 16 | from Helpers import helpers 17 | from Helpers import Parser 18 | 19 | 20 | class ClassName: 21 | 22 | def __init__(self, Domain): 23 | self.name = "Yahoo Search for Emails" 24 | self.description = "Uses Yahoo to search for emails, parses them out of the Html" 25 | config = configparser.ConfigParser() 26 | try: 27 | config.read('Common/SimplyEmail.ini') 28 | self.Domain = Domain 29 | self.Quanity = int(config['YahooSearch']['StartQuantity']) 30 | self.UserAgent = { 31 | 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'} 32 | self.Limit = int(config['YahooSearch']['QueryLimit']) 33 | self.Counter = int(config['YahooSearch']['QueryStart']) 34 | self.Html = "" 35 | except: 36 | print helpers.color("[*] Major Settings for YahooSearch are missing, EXITING!\n", warning=True) 37 | 38 | def execute(self): 39 | self.search() 40 | FinalOutput = self.get_emails() 41 | return FinalOutput 42 | 43 | def search(self): 44 | while self.Counter <= self.Limit and self.Counter <= 1000: 45 | time.sleep(1) 46 | try: 47 | url = 'https://search.yahoo.com/search?p=' + str(self.Domain) + \ 48 | '&b=' + str(self.Counter) + "&pz=" + str(self.Quanity) 49 | except Exception as e: 50 | error = "[!] Major issue with Yahoo Search:" + str(e) 51 | print helpers.color(error, warning=True) 52 | try: 53 | r = requests.get(url, headers=self.UserAgent) 54 | except Exception as e: 55 | error = "[!] Fail during Request to Yahoo (Check Connection):" + \ 56 | str(e) 57 | print helpers.color(error, warning=True) 58 | results = r.content 59 | self.Html += results 60 | self.Counter += 100 61 | 62 | def get_emails(self): 63 | Parse = Parser.Parser(self.Html) 64 | Parse.genericClean() 65 | Parse.urlClean() 66 | FinalOutput = Parse.GrepFindEmails() 67 | return FinalOutput 68 | -------------------------------------------------------------------------------- /Modules/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/SimplyEmail/0666c57f64d642d8b2c8bb477d0696f9e0d30f23/Modules/__init__.py -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/killswitch-GUI/SimplyEmail.svg?branch=master)](https://travis-ci.org/killswitch-GUI/SimplyEmail) 2 | # SimplyEmail 3 | 4 | What is the simple email recon tool? This tool was based off the work of theHarvester and kind of a port of the functionality. This was just an expansion of what was used to build theHarvester and will incorporate his work but allow users to easily build Modules for the Framework. Which I felt was desperately needed after building my first module for theHarvester. 5 | 6 | MAJOR CALLOUTS: 7 | @laramies - Devloper of theHarvester tool https://github.com/laramies/theHarvester 8 | 9 | Work Conducted by: 10 | ---------------------------------------------- 11 | * Alexander Rymdeko-Harvey [Twitter] @Killswitch-GUI -- [Web] [CyberSydicates.com](http://cybersyndicates.com) 12 | * Keelyn Roberts [Twitter] @real_slacker007 -- [Web] [CyberSydicates.com](http://cybersyndicates.com) 13 | 14 | ## Scrape EVERYTHING - Simply 15 | 16 | A few small benfits: 17 | - Easy for you to write modules (All you need is 1 required Class option and your up and running) 18 | - Use the built in Parsers for most raw results 19 | - Multiprocessing Queue for modules and Result Queue for easy handling of Email data 20 | - Simple intergration of theHarvester Modules and new ones to come 21 | - Also the ability to change major settings fast without diving into the code 22 | 23 | API Based Searches: 24 | - When API based searches become avaliable, no need to add them to the Command line 25 | - API keys will be auto pulled from the SimpleEmail.ini, this will activate the module for use 26 | 27 | ## Get Started 28 | Please RUN the simple Setup Bash script!!! 29 | ```Bash 30 | root@kali:~/Desktop/SimplyEmail# sh Setup.sh 31 | or 32 | root@kali:~/Desktop/SimplyEmail# ./Setup.sh 33 | ``` 34 | 35 | ### Standard Help 36 | ``` 37 | ============================================================ 38 | Curent Version: 0.1 | Website: CyberSyndicates.com 39 | ============================================================ 40 | Twitter: @real_slacker007 | Twitter: @Killswitch_gui 41 | ============================================================ 42 | ----------------------------------------------------------------------------- 43 | ______ ________ __ __ 44 | / \/ | / / | 45 | /$$$$$$ $$$$$$$$/ _____ ____ ______ $$/$$ | 46 | $$ \__$$/$$ |__ / \/ \ / \/ $$ | 47 | $$ \$$ | $$$$$$ $$$$ |$$$$$$ $$ $$ | 48 | $$$$$$ $$$$$/ $$ | $$ | $$ |/ $$ $$ $$ | 49 | / \__$$ $$ |_____$$ | $$ | $$ /$$$$$$$ $$ $$ | 50 | $$ $$/$$ $$ | $$ | $$ $$ $$ $$ $$ | 51 | $$$$$$/ $$$$$$$$/$$/ $$/ $$/ $$$$$$$/$$/$$/ 52 | 53 | ----------------------------------------------------------------------------- 54 | usage: SimplyEmail.py [-all] [-e company.com] [-s] [-l] 55 | [-t html / flickr / google] 56 | 57 | Email enumeration is a important phase of so many operation that a pen-tester 58 | or Red Teamer goes through. There are tons of applications that do this but I 59 | wanted a simple yet effective way to get what Recon-Ng gets and theHarvester 60 | gets. (You may want to run -h) 61 | 62 | optional arguments: 63 | -all Use all non API methods to obtain Emails 64 | -e company.com Set required email addr user, ex ale@email.com 65 | -s Show only emils matching your domain (We may want to 66 | collect all emails for potential connections) 67 | -l List the current Modules Loaded 68 | -t Html / Flickr / Google 69 | Test individual module (For Linting) 70 | ``` 71 | 72 | ### Run SimplyEmail 73 | 74 | Lets say your target is cybersyndicates.com 75 | ```python 76 | ./SimplyEmail.py -all -e cybersyndicates.com 77 | ``` 78 | This will run ALL modules that are have API Key placed in the SimpleEmail.ini file and will run all non-API based modules. 79 | ### List Modules SimpleEmail 80 | ``` 81 | root@vapt-kali:~/Desktop/SimplyEmail# ./SimplyEmail.py -l 82 | 83 | ============================================================ 84 | Curent Version: 0.1 | Website: CyberSyndicates.com 85 | ============================================================ 86 | Twitter: @real_slacker007 | Twitter: @Killswitch_gui 87 | ============================================================ 88 | ------------------------------------------------------------ 89 | ______ ________ __ __ 90 | / \/ | / / | 91 | /$$$$$$ $$$$$$$$/ _____ ____ ______ $$/$$ | 92 | $$ \__$$/$$ |__ / \/ \ / \/ $$ | 93 | $$ \$$ | $$$$$$ $$$$ |$$$$$$ $$ $$ | 94 | $$$$$$ $$$$$/ $$ | $$ | $$ |/ $$ $$ $$ | 95 | / \__$$ $$ |_____$$ | $$ | $$ /$$$$$$$ $$ $$ | 96 | $$ $$/$$ $$ | $$ | $$ $$ $$ $$ $$ | 97 | $$$$$$/ $$$$$$$$/$$/ $$/ $$/ $$$$$$$/$$/$$/ 98 | 99 | ------------------------------------------------------------ 100 | [*] Available Modules are: 101 | 102 | 1) Modules/HtmlScrape.py 103 | 2) Modules/Whoisolgy.py 104 | 3) Modules/CanaryBinSearch.py 105 | 4) Modules/YahooSearch.py 106 | 5) Modules/GitHubCodeSearch.py 107 | 6) Modules/EmailHunter.py 108 | 7) Modules/WhoisAPISearch.py 109 | 8) Modules/SearchPGP.py 110 | 9) Modules/GoogleSearch.py 111 | 10) Modules/GitHubGistSearch.py 112 | 11) Modules/FlickrSearch.py 113 | ``` 114 | ##Current Email Evasion Techniques 115 | - The following will be built into the Parser Soon: 116 | - shinichiro.hamaji _at_ gmail.com 117 | - shinichiro.hamaji _AT_ gmail.com 118 | - simohayha.bobo at gmail.com 119 | - "jeffreytgilbert" => "gmail.com" 120 | - felix021 # gmail.com 121 | - hirokidaichi[at]gmail.com 122 | - hirokidaichi[@]gmail.com 123 | - hirokidaichi[#]gmail.com 124 | - xaicron{ at }gmail.com 125 | - xaicron{at}gmail.com 126 | - xaicron{@}gmail.com 127 | - xaicron(@)gmail.com 128 | - xaicron + gmail.com 129 | - xaicron ++ gmail.com 130 | - xaicron ## gmail.com 131 | - bekt17[@]gmail.com 132 | - billy3321 -AT- gmail.com 133 | - billy3321[AT]gmail.com 134 | - ybenjo.repose [[[at]]] gmail.com 135 | - sudhindra.r.rao (at) gmail.com 136 | - sudhindra.r.rao nospam gmail.com 137 | - shinichiro.hamaji (.) gmail.com 138 | - shinichiro.hamaji--at--gmail.com 139 | 140 | ##Build Log: 141 | ####Changelog (Current v0.2): 142 | ``` 143 | Modules Added in v0.3: 144 | ----------------------------- 145 | (x) OnionStagram (Instagram User Search) 146 | (x) AskSearch - Port from theHarvester 147 | 148 | Issues Fixed in v0.3: 149 | ---------------------------- 150 | (x) Added Parser to GitHubCode Search 151 | (x) Moved wget to 2 sec timeout 152 | 153 | Modules Added in v0.2: 154 | ----------------------------- 155 | (x) EmailHunter Trial API 156 | 157 | Issues Fixed in v0.2: 158 | ----------------------------- 159 | (x) Fixed Issues with SetupScript 160 | (x) Changes Output Text file name 161 | 162 | 163 | Modules Added in v0.1: 164 | ----------------------------- 165 | (x) HtmlScrape Added to Modules 166 | (x) SearchPGP Added to Modules - Port form theHarvester 167 | (x) Google Search - Port form theHarvester 168 | (x) Flickr Page Search 169 | (x) GitHub Code Search 170 | (x) GitHubGist Code Search 171 | (x) Whois Non-Auth API Search 172 | (x) Whoisology Search 173 | (x) Yahoo Search - Port from theHarvester 174 | (x) Canary (Non-API) PasteBin Search for Past Data Dumps! 175 | 176 | Issues Fixed in v0.1: 177 | ----------------------------- 178 | (x) Wget fails to follow redirects in some cases 179 | (x) Fixed Issues with google search 180 | (x) Major change with how the Framework Handles Consumer and Producred Model 181 | (x) Fix Issues with Join() and Conducter 182 | 183 | Imprrovements in v0.1: 184 | ----------------------------- 185 | (x) Added in valid UserAgents and headers 186 | (x) HTML Scrape now has opption to save or remove is mirror 187 | (x) HTML Scrape UTF-8 issues fixed 188 | ``` 189 | ####Build out Path: 190 | ``` 191 | Modules Under Dev: 192 | ----------------------------- 193 | ( ) StartPage Search (can help with captcha issues) 194 | ( ) GitHub User Search 195 | ( ) Searching SEC Data 196 | ( ) PDFMiner 197 | ( ) Exalead Search - Port from theHarvester 198 | ( ) PwnBin Search 199 | ( ) PasteBin Searches 200 | ( ) Past Data Dumps 201 | ( ) Canary API based and non API 202 | ( ) psbdmp API Based and non Alert 203 | 204 | Framework Under Dev: 205 | ----------------------------- 206 | ( ) New Parsers to clean results 207 | ( ) Fix import errors with Glob 208 | ( ) Add in "[@]something.com" to search Regex and engines 209 | ( ) Add errors for Captcha limit's 210 | ( ) Add Threading/Multi to GitHub Search 211 | ( ) Add Source of collection to HTML Output 212 | 213 | ``` 214 | -------------------------------------------------------------------------------- /Setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Current supported platforms: 4 | # Kali-Linux 5 | # Global Variables 6 | runuser=$(whoami) 7 | tempdir=$(pwd) 8 | 9 | # Title Function 10 | func_title(){ 11 | # Clear (For Prettyness) 12 | clear 13 | 14 | # Echo Title 15 | echo '==========================================================================' 16 | echo ' SimpleEmail Setup Script | [Updated]: ' 17 | echo '==========================================================================' 18 | echo ' [Web]: Http://CyberSyndicates.com | [Twitter]: @KillSwitch-GUI' 19 | echo '==========================================================================' 20 | } 21 | 22 | 23 | 24 | # Environment Checks 25 | func_check_env(){ 26 | # Check Sudo Dependency going to need that! 27 | if [ $(which sudo|wc -l) -eq '0' ]; then 28 | echo 29 | echo ' [ERROR]: This Setup Script Requires sudo!' 30 | echo ' Please Install sudo Then Run This Setup Again.' 31 | echo 32 | exit 1 33 | fi 34 | } 35 | 36 | func_install_requests(){ 37 | echo ' [*] Installing and updating requests libary' 38 | #Insure we have the latest requests module in python 39 | #sudo apt-get -q update 40 | #sudo apt-get -q upgrade 41 | sudo git pull 42 | sudo apt-get install wget -y 43 | sudo apt-get grep wget -y 44 | sudo pip install --upgrade requests 45 | sudo pip install configparser --upgrade 46 | sudo pip install BeautifulSoup --upgrade 47 | chmod 755 SimplyEmail.py 48 | 49 | } 50 | 51 | 52 | # Menu Case Statement 53 | case $1 in 54 | *) 55 | func_title 56 | func_check_env 57 | func_install_requests 58 | ;; 59 | 60 | esac 61 | -------------------------------------------------------------------------------- /SimplyEmail.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # Inspired by theHarvester and the capabilities. This project is simply a learning experience of 4 | # recon methods to obtain email address and the way you can go about it. 5 | # Also I really wanted the ability to learn SQL, and make this tool multipthreaded! 6 | # 7 | # * = Require API Key 8 | # 9 | # SimplyEmail v1.0 build out: 10 | # (1) HTML Sraping 11 | # (2) GoogleSearch 12 | # (3) SEC Public Fillings* 13 | # (4) PDF mining 14 | import os 15 | import argparse 16 | import sys 17 | from Helpers import helpers 18 | from Common import TaskController 19 | 20 | 21 | def cli_parser(): 22 | parser = argparse.ArgumentParser(add_help=False, description=''' 23 | Email enumeration is a important phase of so many operation that a pen-tester or\n 24 | Red Teamer goes through. There are tons of applications that do this but I wanted\n 25 | a simple yet effective way to get what Recon-Ng gets and theHarvester gets.\n 26 | (You may want to run -h) 27 | ''') 28 | parser.add_argument( 29 | "-all", action='store_true', help="Use all non API methods to obtain Emails") 30 | parser.add_argument("-e", metavar="company.com", default="", 31 | help="Set required email addr user, ex ale@email.com") 32 | parser.add_argument( 33 | "-s", action='store_true', help="Show only emils matching your domain (We may want to collect all emails for potential connections)") 34 | parser.add_argument( 35 | "-l", action='store_true', help="List the current Modules Loaded") 36 | parser.add_argument( 37 | "-t", metavar="html / flickr / google", help="Test individual module (For Linting)") 38 | parser.add_argument('-h', '-?', '--h', '-help', 39 | '--help', action="store_true", help=argparse.SUPPRESS) 40 | args = parser.parse_args() 41 | if args.h: 42 | parser.print_help() 43 | sys.exit() 44 | return args.all, args.e, args.s, args.l, args.t 45 | 46 | 47 | def TaskControler(): 48 | # Get all the options passed and pass it to the TaskConducter, this will 49 | # keep all the prcessing on the side. 50 | # need to pass the store true somehow to tell printer to restrict output 51 | cli_all, cli_domain, cli_store, cli_list, cli_test = cli_parser() 52 | cli_domain = cli_domain.lower() 53 | Task = TaskController.Conducter() 54 | Task.load_modules() 55 | if cli_list: 56 | Task.ListModules() 57 | sys.exit(0) 58 | if not len(cli_domain) > 1: 59 | print helpers.color("[*] No Domain Supplied to start up!\n", warning=True) 60 | sys.exit(0) 61 | if cli_test: 62 | # setup a small easy test to activate certain modules 63 | Task.TestModule(cli_domain,cli_test) 64 | if cli_all: 65 | Task.TaskSelector(cli_domain) 66 | 67 | 68 | # def GenerateReport(): 69 | # BootStrap with tables :) 70 | # Make a seprate reporting module fo sure way to busy here 71 | 72 | 73 | def main(): 74 | # instatiate the class 75 | orc = TaskController.Conducter() 76 | orc.title() 77 | orc.title_screen() 78 | 79 | TaskControler() 80 | 81 | 82 | if __name__ == "__main__": 83 | try: 84 | main() 85 | except KeyboardInterrupt: 86 | print 'Interrupted' 87 | try: 88 | sys.exit(0) 89 | except SystemExit: 90 | os._exit(0) 91 | -------------------------------------------------------------------------------- /bootstrap-3.3.5/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2015 Twitter, Inc 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 13 | all 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 21 | THE SOFTWARE. 22 | --------------------------------------------------------------------------------