├── .gitignore ├── AUTHORS.md ├── COPYING ├── MANIFEST.in ├── README.md ├── config ├── accounts.cfg ├── api_keys.cfg ├── browser.cfg ├── general.cfg └── plugins │ ├── wrapper.py.sample │ └── wrapper_v2.py.sample ├── doc ├── CHANGES.md ├── FAQ.md ├── HACKING.md └── INSTALL.md ├── osrframework ├── __init__.py ├── alias_generator.py ├── api │ ├── __init__.py │ └── twitter_api.py ├── checkfy.py ├── domainfy.py ├── domains │ ├── __init__.py │ ├── brand_tld.py │ ├── cctld.py │ ├── email_providers.py │ ├── generic_tld.py │ ├── geographic_tld.py │ ├── gtld.py │ └── other_subdomains.py ├── launcher.py ├── mailfy.py ├── phonefy.py ├── searchengines │ ├── __init__.py │ └── google.py ├── searchfy.py ├── thirdparties │ ├── __init__.py │ ├── blockchain_info │ │ ├── __init__.py │ │ └── getBitcoinAddressDetails.py │ ├── checkIfHashIsCracked.py │ ├── checkIpDetails.py │ ├── checkIpFromAlias.py │ ├── checkPhoneDetails.py │ ├── dehashed_com │ │ ├── __init__.py │ │ └── dehashed.py │ ├── duckduckgo_com │ │ ├── __init__.py │ │ └── duckduckgo.py │ ├── getBitcoinAddressDetails.py │ ├── haveibeenpwned_com │ │ ├── __init__.py │ │ └── hibp.py │ ├── infobel_com │ │ ├── __init__.py │ │ ├── checkPhoneDetails.py │ │ └── processing.py │ ├── ip_api_com │ │ ├── __init__.py │ │ └── checkIpDetails.py │ ├── md5crack_com │ │ ├── __init__.py │ │ └── checkIfHashIsCracked.py │ ├── md5db_net │ │ ├── __init__.py │ │ └── checkIfHashIsCracked.py │ ├── pipl_com │ │ ├── __init__.py │ │ ├── checkInfo.py │ │ └── lib │ │ │ ├── __init__.py │ │ │ ├── containers.py │ │ │ ├── error.py │ │ │ ├── fields.py │ │ │ ├── search.py │ │ │ ├── source.py │ │ │ ├── thumbnail.py │ │ │ └── utils.py │ ├── resolvethem_com │ │ ├── __init__.py │ │ └── processing.py │ └── viewdns_info │ │ ├── __init__.py │ │ └── viewdns.py ├── upgrade.py ├── usufy.py ├── utils │ ├── __init__.py │ ├── banner.py │ ├── benchmark.py │ ├── browser.py │ ├── config_api_keys.py │ ├── config_credentials.py │ ├── configuration.py │ ├── credentials.py │ ├── errors.py │ ├── exceptions.py │ ├── fortunes.py │ ├── general.py │ ├── global_api.py │ ├── platform_selection.py │ ├── platforms.py │ └── updates.py └── wrappers │ ├── __init__.py │ ├── about.py │ ├── affilorama.py │ ├── archive.py │ ├── arduino.py │ ├── ariva.py │ ├── armorgames.py │ ├── askfm.py │ ├── audiob.py │ ├── audioboom.py │ ├── badoo.py │ ├── bandcamp.py │ ├── bennugd.py │ ├── betblog.py │ ├── bitbucket.py │ ├── bitcointalk.py │ ├── bitrated.py │ ├── blogmarks.py │ ├── blogspot.py │ ├── boonex.py │ ├── bubok.py │ ├── buddypic.py │ ├── burbuja.py │ ├── carbonmade.py │ ├── cartodb.py │ ├── causes.py │ ├── ccm.py │ ├── ccsinfo.py │ ├── chess.py │ ├── cockos.py │ ├── codecademy.py │ ├── codementor.py │ ├── coderwall.py │ ├── connectingsingles.py │ ├── couchsurfing.py │ ├── crokes.py │ ├── crowdin.py │ ├── cryptocompare.py │ ├── dailymotion.py │ ├── datpiff.py │ ├── deviantart.py │ ├── digitalspy.py │ ├── disqus.py │ ├── doodle.py │ ├── douban.py │ ├── dribbble.py │ ├── drupal.py │ ├── dzone.py │ ├── ebay.py │ ├── echatta.py │ ├── ello.py │ ├── emoneyspace.py │ ├── enfemenino.py │ ├── etsy.py │ ├── eyeem.py │ ├── fandom.py │ ├── fanpop.py │ ├── fark.py │ ├── flickr.py │ ├── foros24h.py │ ├── forosperu.py │ ├── forospyware.py │ ├── freelancer.py │ ├── freerepublic.py │ ├── github.py │ ├── goodreads.py │ ├── gravatar.py │ ├── gsmspain.py │ ├── houzz.py │ ├── htcmania.py │ ├── hubpages.py │ ├── ibosocial.py │ ├── ifunny.py │ ├── infojobs.py │ ├── infotelefonica.py │ ├── instagram.py │ ├── instructables.py │ ├── issuu.py │ ├── ivoox.py │ ├── jamiiforums.py │ ├── kali.py │ ├── kanogames.py │ ├── keybase.py │ ├── keyserverubuntu.py │ ├── kickstarter.py │ ├── kinja.py │ ├── kongregate.py │ ├── lastfm.py │ ├── listaspam.py │ ├── livejournal.py │ ├── losviajeros.py │ ├── mastodon_social.py │ ├── mastodon_xyz.py │ ├── mcneel.py │ ├── mediavida.py │ ├── medium.py │ ├── memrise.py │ ├── meneame.py │ ├── mercadolibre.py │ ├── meteor.py │ ├── minds.py │ ├── mozilla.py │ ├── mstdn_jp.py │ ├── musicasacra.py │ ├── myeloma.py │ ├── myfitnesspal.py │ ├── myspace.py │ ├── nairaland.py │ ├── netvibes.py │ ├── newgrounds.py │ ├── notabug.py │ ├── occupywallst.py │ ├── ok.py │ ├── okcupid.py │ ├── openframeworks.py │ ├── openstreetmap.py │ ├── papaly.py │ ├── pastebin.py │ ├── patreon.py │ ├── pawoo.py │ ├── pearltrees.py │ ├── pending │ ├── INFO.md │ ├── aporrealos.py │ ├── apsense.py │ ├── backyardchickens.py │ ├── bebee.py │ ├── blackplanet.py │ ├── breakcom.py │ ├── cafemom.py │ ├── cardingbins.py │ ├── cloudflare │ │ ├── forocoches.py │ │ ├── openbugbounty.py │ │ └── phishtank.py │ ├── colourlovers.py │ ├── creativemarket.py │ ├── csu.py │ ├── dailymail.py │ ├── dreamstime.py │ ├── drugbuyersforum.py │ ├── ehow.py │ ├── epinions.py │ ├── espaciolinux.py │ ├── facebook.py │ ├── forocompraventa.py │ ├── forominecraft.py │ ├── foursquare.py │ ├── garage4hackers.py │ ├── gather.py │ ├── hellboundhackers.py │ ├── interracialmatch.py │ ├── intersect.py │ ├── islamicawakening.py │ ├── linkedin.py │ ├── looki.py │ ├── mig.py │ ├── naver.py │ ├── oroom.py │ ├── paypal.py │ ├── peerbackers.py │ ├── photobucket.py │ ├── pinterest.py │ ├── pokerstrategy.py │ ├── rapid7.py │ ├── realcarders.py │ ├── retailmenot.py │ ├── sarahah.py │ ├── sokule.py │ ├── sourceforge.py │ ├── streakgaming.py │ ├── switter.py │ ├── taringa.py │ ├── theguardian.py │ ├── thepiratebay.py │ ├── thesims.py │ ├── torsearch.py │ ├── trip.py │ ├── tripadvisor.py │ ├── tripit.py │ ├── tumblr.py │ ├── tune.py │ ├── v7n.py │ ├── virustotal.py │ ├── wattpad.py │ ├── wordpress.py │ ├── xat.py │ ├── youku.py │ └── youtube.py │ ├── periscope.py │ ├── pjrc.py │ ├── pokerred.py │ ├── pornhub.py │ ├── rankia.py │ ├── reddit.py │ ├── redtube.py │ ├── reverbnation.py │ ├── ripenear.py │ ├── rojadirecta.py │ ├── ruby.py │ ├── scribd.py │ ├── seatwish.py │ ├── sencha.py │ ├── slashdot.py │ ├── slideshare.py │ ├── smartcitizen.py │ ├── smugmug.py │ ├── soundcloud.py │ ├── spaniards.py │ ├── spoj.py │ ├── spotify.py │ ├── spreaker.py │ ├── steamcommunity.py │ ├── steemit.py │ ├── steinberg.py │ ├── teamtreehouse.py │ ├── telegram.py │ ├── thestudentroom.py │ ├── theverge.py │ ├── tippin_me.py │ ├── trakt.py │ ├── twitter.py │ ├── typepad.py │ ├── unsplash.py │ ├── verbling.py │ ├── vexforum.py │ ├── viddler.py │ ├── videohelp.py │ ├── vimeo.py │ ├── vk.py │ ├── warriorforum.py │ ├── webtv.py │ ├── wikipediaar.py │ ├── wikipediaca.py │ ├── wikipediade.py │ ├── wikipediaen.py │ ├── wikipediaes.py │ ├── wikipediaeu.py │ ├── wikipediafr.py │ ├── wikipediapt.py │ ├── wikipediaru.py │ ├── winamp.py │ ├── wishlistr.py │ ├── witty.py │ ├── wykop.py │ ├── xing.py │ ├── xtelefonos.py │ ├── zentyal.py │ └── zotero.py ├── requirements.txt └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | results* 2 | contrib* 3 | logs* 4 | *pyc 5 | *~ 6 | creds.txt 7 | build* 8 | dist* 9 | deb_dist* 10 | *egg* 11 | _lab* 12 | _new* 13 | bin* 14 | _toinclude* 15 | output* 16 | fichero.txt 17 | test* 18 | setuptools* 19 | tmp* 20 | *csv 21 | *xls 22 | *xlsx 23 | *ods 24 | _*sh 25 | *gml 26 | *.gml_* 27 | fuzz.txt 28 | *.mtz 29 | *.zip 30 | *.back 31 | osrframework-virtualenv 32 | possible_emails* 33 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | About the authors 2 | ================== 3 | 4 | Lead developers 5 | --------------- 6 | 7 | This software is a personal project leaded by Yaiza Rubio ([@yrubiosec](https://twitter.com/yrubiosec)) and Félix Brezo ([@febrezo](https://twitter.com/febrezo)), both of whom conform the [i3visio](http://i3visio.com) team. 8 | 9 | Contributors 10 | ------------ 11 | 12 | * Eva Suárez ([@EvaSuarez22](https://twitter.com/EvaSuarez22)) 13 | * Lucas Sánchez 14 | * Fran J. Gómez ([@ffranz](https://twitter.com/ffranz)) 15 | * Abilio Almeida ([@aabilio](https://github.com/aabilio)) 16 | * Bruno Halopeau ([@BrHa11](https://github.com/BrHa11)) 17 | * Alexey Miloserdov ([Mi-Al](https://github.com/Mi-Al)) 18 | * Momoisacat ([@momoisacat](https://github.com/momoisacat)) 19 | * Luis Alberto Lopez Alva ([@lopezalvar](https://github.com/lopezalvar)) 20 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include config *cfg 2 | recursive-include config/plugins *sample 3 | recursive-include osrframework/transforms/lib/osrframework-maltego-settings * 4 | recursive-include osrframework/transforms/lib *txt 5 | recursive-include osrframework/static * 6 | recursive-include osrframework/templates * 7 | include *md 8 | recursive-include doc *md 9 | include requirements.txt 10 | -------------------------------------------------------------------------------- /config/accounts.cfg: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) 4 | # 5 | # This file is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | 21 | # ============================================================================== 22 | # The sections in this file should match with the parameter used to work with 23 | # this platform in the different tools of the framework. 24 | # ------------------------------------------------------------------------------ 25 | 26 | [eqe] 27 | login = 28 | password = 29 | 30 | [flixster] 31 | login = 32 | password = 33 | 34 | [hi5] 35 | login = 36 | password = 37 | 38 | [pokerstrategy] 39 | login = 40 | password = 41 | 42 | [rapid] 43 | login = 44 | password = 45 | 46 | [researchgate] 47 | login = 48 | password = 49 | 50 | [spotify] 51 | login = 52 | password = 53 | 54 | [tripit] 55 | login = 56 | password = 57 | 58 | [thehoodup] 59 | login = 60 | password = 61 | 62 | # ============================================================================== 63 | -------------------------------------------------------------------------------- /config/api_keys.cfg: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) 4 | # 5 | # This file is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | # NOTE: Lines starting with a '#' are comments provided to assist the user. 21 | 22 | # ============================================================================== 23 | # The sections in this file should match with the parameter used to work with 24 | # this platform in the different tools of the framework. 25 | # ------------------------------------------------------------------------------ 26 | 27 | [twitter] 28 | # You can get these details in: 29 | consumer_key = 30 | consumer_secret = 31 | access_key = 32 | access_secret = 33 | 34 | # ============================================================================== 35 | 36 | 37 | # ============================================================================== 38 | # The following API keys may be used by other applications in the framework. 39 | # ------------------------------------------------------------------------------ 40 | 41 | [md5crack_com] 42 | api_key = 43 | 44 | [pipl_com] 45 | api_key = 46 | 47 | [haveibeenpwned_com] 48 | api_key = 49 | 50 | # ============================================================================== 51 | -------------------------------------------------------------------------------- /config/browser.cfg: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) 4 | # 5 | # This file is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | # NOTE: Lines starting with a '#' are comments provided to assist the user. 21 | 22 | # ============================================================================== 23 | # In this section we will define the browser configuration. 24 | # ------------------------------------------------------------------------------ 25 | 26 | [Browser] 27 | 28 | # The User Agent to be used. More can be found at: 29 | # 30 | user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/55.0.2883.87 Chrome/55.0.2883.87 Safari/537.36 31 | # Seconds considered to timeout a session. Increase this value to something 32 | # high like 2000 to debug petitions using proxies such as OWASP ZAP. 33 | timeout = 20000 34 | 35 | # ============================================================================== 36 | 37 | 38 | # ============================================================================== 39 | # In this section we will define the proxy settings. This part is optional. 40 | # ------------------------------------------------------------------------------ 41 | 42 | # This is the protocol of the proxy: 'ProxyHTTP' is parsed to 'http'. 43 | [ProxyHTTP] 44 | 45 | # The hostname. It can be an IP Address '127.0.0.1' or a domain 'example.com'. 46 | host = 47 | # The port of the proxy. 48 | port = 49 | # The credentials to be used if needed. This part is optional. 50 | username = 51 | password = 52 | 53 | # A full example is below to contact to a running instance of OWASP ZAP: 54 | #host = localhost 55 | #port = 8080 56 | #username = user 57 | #password = 1234 58 | 59 | # This is the protocol of the proxy: 'ProxyHTTPS' is parsed to 'https'. 60 | [ProxyHTTPS] 61 | 62 | # The hostname. It can be an IP Address '127.0.0.1' or a domain 'example.com'. 63 | host = 64 | # The port of the proxy. 65 | port = 66 | # The credentials to be used if needed. This part is optional. 67 | username = 68 | password = 69 | 70 | # A full example is below to contact to a running instance of OWASP ZAP: 71 | #host = localhost 72 | #port = 8080 73 | #username = user 74 | #password = 1234 75 | 76 | # ============================================================================== 77 | -------------------------------------------------------------------------------- /config/plugins/wrapper_v2.py.sample: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | ################################################################################ 4 | # 5 | # Copyright 2018 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) 6 | # 7 | # This program is part of OSRFramework. You can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | ################################################################################ 21 | 22 | __author__ = "i3visio " 23 | __version__ = "2.0" 24 | 25 | from osrframework.utils.platforms import Platform 26 | import urllib2 27 | 28 | class Demo(Platform): 29 | """ 30 | A object for Demo. 31 | """ 32 | def __init__(self): 33 | """ 34 | Constructor... 35 | """ 36 | self.platformName = "Demo" 37 | self.tags = ["demo"] 38 | self.modes = { 39 | "usufy": { 40 | "debug": False, 41 | "extra_fields": { 42 | "i3visio.alias": "My alias: ([^<]+)", 43 | }, 44 | "needs_credentials": False, 45 | "not_found_text": "

404

", 46 | "query_validator": ".+", 47 | "url": "http://demo.demo/user/{placeholder}", 48 | }, 49 | "searchfy": { 50 | "debug": False, 51 | "extra_fields": { 52 | "i3visio.alias": "My alias: ([^<]+)", 53 | }, 54 | "needs_credentials": False, 55 | "not_found_text": "

404

", 56 | "query_validator": ".+", 57 | "url": "http://demo.demo/user/{placeholder}", 58 | # Needed function to extract aliases from the website 59 | "alias_regexp": "demo.demo/(.+)" 60 | }, 61 | # Reimplementation needed of check_mailfy 62 | "mailfy": {}, 63 | } 64 | 65 | def check_mailfy(self, query): 66 | """ 67 | Verifying a mailfy query in this platform. 68 | 69 | This might be redefined in any class inheriting from Platform. The only 70 | condition is that any of this should return a dictionary as defined. 71 | 72 | Args: 73 | ----- 74 | query: The element to be searched. 75 | kwargs: Dictionary with extra parameters. Just in case. 76 | 77 | Return: 78 | ------- 79 | Returns the collected data if exists or None if not. 80 | """ 81 | return query if query urllib2.open("https://demo.demo/{}".format(query)) else None 82 | -------------------------------------------------------------------------------- /osrframework/__init__.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2021 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __version__ = "0.20.5" 21 | -------------------------------------------------------------------------------- /osrframework/api/__init__.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | -------------------------------------------------------------------------------- /osrframework/domains/__init__.py: -------------------------------------------------------------------------------- 1 | # !/usr/bin/python 2 | # -*- coding: cp1252 -*- 3 | # 4 | ################################################################################## 5 | # 6 | # This program is part of OSRFramework. You can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program 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 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | ################################################################################## 20 | -------------------------------------------------------------------------------- /osrframework/domains/brand_tld.py: -------------------------------------------------------------------------------- 1 | # !/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | # 4 | ################################################################################## 5 | # 6 | # This program is part of OSRFramework. You can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program 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 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | ################################################################################## 20 | 21 | tld = { 22 | ".allfinanz", # Allfinanz Deutsche Vermögensberatung Aktiengesellschaft 23 | ".android", # Google (Android) 24 | ".aquarelle", # Aquarelle_Group 25 | ".axa", # AXA 26 | ".barclays", # Barclays 27 | ".barclaycard", # Barclays 28 | ".bloomberg", # Bloomberg IP Holdings LLC 29 | ".bmw", # BMW 30 | ".bnl", # Banca Nazionale del Lavoro 31 | ".bnpparibas", # BNP Paribas 32 | ".cal", # Google (Google Calendar) 33 | ".caravan", # Caravan International, Inc. 34 | ".cern", # CERN 35 | ".chrome", # Google (Google Chrome) 36 | ".citic", # CITIC Group 37 | ".crs", # Federated Co-operatives Limited 38 | ".cuisinella", # Société Alsacienne de Meubles (Cuisinella) 39 | ".dnp", # Dai Nippon Printing Co. 40 | ".dvag", # Deutsche Vermögensberatung Aktiengesellschaft 41 | ".emerck", # Merck KGaA 42 | ".everbank", # EverBank 43 | ".firmdale", # Firmdale Holdings 44 | ".flsmidth", # FLSmidth A/S 45 | ".frogans", # OP3FT 46 | ".gbiz", # Google 47 | ".gle", # Google 48 | ".globo", # Grupo Globo 49 | ".gmail", # Google (Gmail) 50 | ".gmo", # GMO Internet 51 | ".gmx", # 1&1 Mail & Media (Global Message Exchange) 52 | ".google", # Google 53 | ".hsbc", # HSBC 54 | ".ibm", # IBM 55 | ".kred", # KredTLD 56 | ".lacaixa", # Caixa d’Estalvis i Pensions de Barcelona 57 | ".latrobe", # La Trobe University 58 | ".lds", # The Church of Jesus Christ of Latter-day Saints (LDS Church)[184] 59 | ".mango", # MANGO 60 | ".mini", # BMW (Mini) 61 | ".monash", # Monash University 62 | ".mormon", # The Church of Jesus Christ of Latter-day Saints (LDS Church)[184] 63 | ".neustar", # Neustar 64 | ".nexus", # Google (Google Nexus) 65 | ".nhk", # NHK 66 | ".nico", # Dwango Co., Ltd. (Niconico) 67 | ".nra", # National Rifle Association 68 | ".otsuka", # Otsuka Holdings 69 | ".ovh", # OVH 70 | ".piaget", # Piaget SA 71 | ".pohl", # Deutsche Vermögensberatung Aktiengesellschaft 72 | ".praxi", # Praxi 73 | ".prod", # Google (products) 74 | ".pwc", # PwC 75 | ".sandvikcoromant", # Sandvik Coromant 76 | ".sca", # Svenska Cellulosa Aktiebolaget 77 | ".scb", # Siam Commercial Bank 78 | ".schmidt", # Société Alsacienne de Meubles (Cuisines Schmidt) 79 | ".seek", # Seek Limited 80 | ".sohu", # Sohu 81 | ".spiegel", # Spiegel-Verlag 82 | ".suzuki", # Suzuki Motor Corporation 83 | ".tui", # TUI AG 84 | ".uol", # Universo Online 85 | ".williamhill", # William Hill 86 | ".wme", # William Morris Endeavor Entertainment 87 | ".wtc", # World Trade Centers Association 88 | ".yandex", # Yandex 89 | ".youtube", # Google (YouTube) 90 | ".xn--fiq64b", # .中信 91 | ".xn--vermgensberater-ctb", # .vermögensberater 92 | ".xn--vermgensberatung-pwb", # .vermögensberatung 93 | ".xn--qcka1pmc", # .グーグル 94 | ".xn--flw351e", # .谷歌 95 | ".xn--cg4bki", # .삼성 96 | } 97 | -------------------------------------------------------------------------------- /osrframework/domains/geographic_tld.py: -------------------------------------------------------------------------------- 1 | # !/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | # 4 | ################################################################################## 5 | # 6 | # This program is part of OSRFramework. You can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program 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 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | ################################################################################## 20 | 21 | tld = { 22 | ".capetown", # Cape Town, South Africa 23 | ".durban", # Durban, South Africa 24 | ".joburg", # Johannesburg, South Africa 25 | ".asia", # Asia-Pacific region 26 | ".krd", # Kurdistan 27 | ".nagoya", # Nagoya, Japan 28 | ".okinawa", # Okinawa, Japan 29 | ".ryukyu", # Ryukyu Islands, Japan 30 | ".taipei", # Taipei, Taiwan 31 | ".tatar", # Tatar peoples and places 32 | ".tokyo", # Tokyo, Japan 33 | ".yokohama", # Yokohama, Japan 34 | ".alsace", # Alsace, France 35 | ".amsterdam", # Amsterdam, The Netherlands 36 | ".barcelona", # Barcelona, Spain 37 | ".bayern", # Bavaria, Germany 38 | ".berlin", # Berlin, Germany 39 | ".brussels", # Brussels, Belgium 40 | ".budapest", # Budapest, Hungary 41 | ".bzh", # Brittany, France 42 | ".cat", # Catalonia; Catalan language and culture 43 | ".cologne", # Cologne, Germany 44 | ".corsica", # Corsica, France 45 | ".cymru", # Wales 46 | ".eus", # Basque, Spain and France 47 | ".frl", # Friesland 48 | ".gal", # Galiza, Spain 49 | ".gent", # Ghent, Belgium 50 | ".hamburg", # Hamburg, Germany 51 | ".irish", # Ireland; global Irish community 52 | ".koeln", # Cologne, Germany 53 | ".london", # London, United Kingdom 54 | ".madrid", # Madrid, Spain 55 | ".moscow", # Moscow, Russia 56 | ".nrw", # North Rhine-Westphalia, Germany 57 | ".paris", # Paris, France 58 | ".ruhr", # Ruhr, Germany 59 | ".saarland", # Saarland, Germany 60 | ".scot", # Scotland 61 | ".tirol", # Tyrol, now split between Austria and Italy 62 | ".vlaanderen", # Flanders, Belgium 63 | ".wales", # Wales 64 | ".wien", # Vienna, Austria 65 | ".zuerich", # Zurich, Switzerland 66 | ".miami", # Miami, USA 67 | ".nyc", # New York City, USA 68 | ".quebec", # Québec, Canada 69 | ".vegas", # Las Vegas, NV, USA 70 | ".kiwi", # New Zealanders (a.k.a. kiwis) 71 | ".melbourne", # Melbourne, Australia 72 | ".sydney", # Sydney, Australia 73 | ".lat", # Latin America 74 | ".rio", # Rio de Janeiro, Brazil 75 | ".xn--1qqw23a", 76 | ".xn--80adxhks", # .москва 77 | } 78 | -------------------------------------------------------------------------------- /osrframework/domains/gtld.py: -------------------------------------------------------------------------------- 1 | # !/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | # 4 | ################################################################################## 5 | # 6 | # This program is part of OSRFramework. You can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program 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 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | ################################################################################## 20 | 21 | tld = { 22 | ".com", 23 | ".org", 24 | ".net", 25 | ".int", 26 | ".edu", 27 | ".gov", 28 | ".mil", 29 | ".arpa", 30 | } 31 | -------------------------------------------------------------------------------- /osrframework/searchengines/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: cp1252 -*- 2 | # 3 | ################################################################################## 4 | # 5 | # OSRFramework is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################## 19 | 20 | import osrframework.utils.logger as logger 21 | 22 | # Calling the logger when being imported 23 | logger.setupLogger(loggerName="osrframework.searchengines") 24 | -------------------------------------------------------------------------------- /osrframework/thirdparties/__init__.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | -------------------------------------------------------------------------------- /osrframework/thirdparties/blockchain_info/__init__.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | -------------------------------------------------------------------------------- /osrframework/thirdparties/blockchain_info/getBitcoinAddressDetails.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | 21 | import argparse 22 | import json 23 | import sys 24 | import urllib2 25 | 26 | 27 | def getBitcoinAddressDetails(address=None): 28 | ''' 29 | Method that checks the presence of a Bitcoin Address in blockchain.info: 30 | { 31 | "total_sent": 41301084, 32 | "total_received": 52195147, 33 | "final_balance": 10894063, 34 | "address": "1APKyS2TEdFMjXjJfMCgavFtoWuv2QNXTw", 35 | "hash160": "66f21efc754af07e87913db46bf24df2eb0d5075", 36 | ... 37 | } 38 | 39 | :param address: Bitcoin address to verify. 40 | 41 | :return: Python structure for the json received. If nothing was found, it will return an empty dictionary. 42 | ''' 43 | try: 44 | apiURL = "https://blockchain.info/rawaddr/" + str(address) 45 | 46 | # Accessing the HIBP API 47 | data = urllib2.urlopen(apiURL).read() 48 | 49 | # Reading the text data onto python structures 50 | jsonData = json.loads(data) 51 | return jsonData 52 | except: 53 | # No information was found, then we return a null entity 54 | return {} 55 | 56 | 57 | if __name__ == "__main__": 58 | parser = argparse.ArgumentParser(description='A library that wraps the search about a Bitcoin address in blockchain.info.', prog='getBitcoinAddressDetails.py', epilog="", add_help=False) 59 | # Adding the main options 60 | # Defining the mutually exclusive group for the main options 61 | parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to blockchain.info.', required=True) 62 | 63 | groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') 64 | groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') 65 | groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') 66 | 67 | args = parser.parse_args() 68 | 69 | print(json.dumps(getBitcoinAddressDetails(address=args.query), indent=2)) 70 | -------------------------------------------------------------------------------- /osrframework/thirdparties/checkIfHashIsCracked.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | import argparse 21 | 22 | import osrframework.thirdparties.md5crack_com.checkIfHashIsCracked as md5crack_com 23 | 24 | if __name__ == "__main__": 25 | parser = argparse.ArgumentParser(description='A library that wraps a search onto md5crack.com.', prog='checkIfHashIsCracked.py', epilog="NOTE: if not provided, the API key will be searched in the config_api_keys.py file.", add_help=False) 26 | # Adding the main options 27 | # Defining the mutually exclusive group for the main options 28 | parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to md5crack.com.', required=True) 29 | parser.add_argument('-a', '--api_key', action='store', help='API key in md5crack.com to be used.', required=False, default=None) 30 | 31 | groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') 32 | groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') 33 | groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') 34 | 35 | args = parser.parse_args() 36 | 37 | print(json.dumps(md5crack_com.checkIfHashIsCracked(hash=args.query, api_key=args.api_key), indent=2)) 38 | -------------------------------------------------------------------------------- /osrframework/thirdparties/checkIpDetails.py: -------------------------------------------------------------------------------- 1 | # !/usr/bin/python 2 | # -*- coding: cp1252 -*- 3 | # 4 | ################################################################################## 5 | # 6 | # Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) 7 | # 8 | # This program is part of OSRFramework. You can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program. If not, see . 20 | # 21 | ################################################################################## 22 | 23 | import argparse 24 | import json 25 | 26 | import osrframework.thirdparties.ip_api_com.checkIpDetails as ip_api_com 27 | 28 | 29 | if __name__ == "__main__": 30 | parser = argparse.ArgumentParser(description='A library that wraps a search onto ip-api.com.', prog='checkIpDetails.py', epilog="", add_help=False) 31 | # Adding the main options 32 | # Defining the mutually exclusive group for the main options 33 | general = parser.add_mutually_exclusive_group(required=True) 34 | general.add_argument('-q', '--query', metavar='', action='store', help='query to be resolved by ip-api.com.') 35 | 36 | groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') 37 | groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') 38 | groupAbout.add_argument('--version', action='version', version='%(prog)s 0.2.0', help='shows the version of the program and exists.') 39 | 40 | args = parser.parse_args() 41 | 42 | print(json.dumps(ip_api_com.checkIpDetails(query=args.query), indent=2)) 43 | -------------------------------------------------------------------------------- /osrframework/thirdparties/checkIpFromAlias.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | import argparse 21 | import json 22 | 23 | import osrframework.thirdparties.resolvethem_com.processing as resolvethem_com 24 | 25 | if __name__ == "__main__": 26 | parser = argparse.ArgumentParser(description='A library that wraps a search onto resolvethem.com.', prog='checkIPFromAlias.py', epilog="", add_help=False) 27 | # Adding the main options 28 | # Defining the mutually exclusive group for the main options 29 | parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to resolvethem.com.', required=True) 30 | 31 | groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') 32 | groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') 33 | groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') 34 | 35 | args = parser.parse_args() 36 | 37 | print(json.dumps(resolvethem_com.checkIPFromAlias(alias=args.query), indent=2)) 38 | -------------------------------------------------------------------------------- /osrframework/thirdparties/checkPhoneDetails.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | import argparse 21 | import json 22 | import sys 23 | import urllib2 24 | 25 | import osrframework.thirdparties.infobel_com.checkPhoneDetails as infobel_com 26 | 27 | if __name__ == "__main__": 28 | parser = argparse.ArgumentParser(description='A library that wraps a search onto infobel.com via Google.', prog='checkPhoneDetails.py', add_help=False) 29 | # Adding the main options 30 | # Defining the mutually exclusive group for the main options 31 | parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to infobel.com.', required=True) 32 | 33 | groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') 34 | groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') 35 | groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') 36 | 37 | args = parser.parse_args() 38 | 39 | print(json.dumps(infobel_com.checkPhoneDetails(query=args.query), indent=2)) 40 | -------------------------------------------------------------------------------- /osrframework/thirdparties/dehashed_com/__init__.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | -------------------------------------------------------------------------------- /osrframework/thirdparties/dehashed_com/dehashed.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | import argparse 21 | import json 22 | import os 23 | import re 24 | import time 25 | 26 | import requests 27 | 28 | import osrframework.utils.general as general 29 | 30 | 31 | def check_if_email_was_hacked(email=None, sleep_seconds=1): 32 | """Method that checks if the given email is stored in the Dehashed website. 33 | 34 | Args: 35 | email (str): Email to verify. 36 | sleep_seconds (int): Number of seconds to wait between calls. 37 | 38 | Returns: 39 | A python structure for the json received. If nothing was found, it will 40 | return an empty list. 41 | """ 42 | leaks = [] 43 | 44 | # Sleeping just a little bit 45 | time.sleep(sleep_seconds) 46 | 47 | target_url = f"https://www.dehashed.com/search?query=\"{email}\"" 48 | 49 | # Building API query 50 | resp = requests.get( 51 | target_url, 52 | verify=True 53 | ) 54 | 55 | platforms_leaked = re.findall("found in (.+) dump", resp.text) 56 | 57 | # Reading the text data onto python structures 58 | try: 59 | for leak in platforms_leaked: 60 | # Building the i3visio like structure 61 | new = {} 62 | new["value"] = f"(Dehashed) {leak} - {email}" 63 | new["type"] = "com.i3visio.Profile" 64 | new["attributes"] = [ 65 | { 66 | "type": "com.i3visio.Platform.Leaked", 67 | "value": leak, 68 | "attributes": [] 69 | }, 70 | { 71 | "type": "@source", 72 | "value": "dehashed.com", 73 | "attributes": [] 74 | }, 75 | { 76 | "type": "@source_uri", 77 | "value": target_url, 78 | "attributes": [] 79 | } 80 | ] + general.expand_entities_from_email(email) 81 | leaks.append(new) 82 | except ValueError: 83 | return [] 84 | except Exception: 85 | print("ERROR: Something happenned when using Dehashed.com.") 86 | return [] 87 | 88 | return leaks 89 | 90 | 91 | if __name__ == "__main__": 92 | parser = argparse.ArgumentParser(description='A library that wraps an account search onto dehashed.com.', prog='dehashed.py', epilog="", add_help=False) 93 | # Adding the main options 94 | # Defining the mutually exclusive group for the main options 95 | parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to dehashed.com.', required=True) 96 | 97 | group_about = parser.add_argument_group('About arguments', 'Showing additional information about this program.') 98 | group_about.add_argument('-h', '--help', action='help', help='shows this help and exists.') 99 | group_about.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') 100 | 101 | args = parser.parse_args() 102 | 103 | result = check_if_email_was_hacked(email=args.query) 104 | print(f"Results found for {args.query}:\n") 105 | print(json.dumps(result, indent=2)) 106 | -------------------------------------------------------------------------------- /osrframework/thirdparties/duckduckgo_com/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/i3visio/osrframework/e02a6e9b1346ab5a01244c0d19bcec8232bf1a37/osrframework/thirdparties/duckduckgo_com/__init__.py -------------------------------------------------------------------------------- /osrframework/thirdparties/duckduckgo_com/duckduckgo.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2021 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | import argparse 21 | import json 22 | 23 | import duckpy 24 | 25 | import osrframework.utils.general as general 26 | 27 | 28 | def check_info(query=None): 29 | """Method that checks the information in DDG 30 | 31 | Args: 32 | query (str): query to verify. 33 | 34 | Returns: 35 | A python structure for the json received. If nothing was found, it will 36 | return an empty list. 37 | """ 38 | results = [] 39 | 40 | client = duckpy.Client() 41 | response = client.search(query) 42 | 43 | # Reading the text data onto python structures 44 | try: 45 | for result in response: 46 | # Building the i3visio like structure 47 | new = {} 48 | new["value"] = f"(DuckDuckGo) {result['title']} - {query}" 49 | new["type"] = "com.i3visio.Profile" 50 | new["attributes"] = [ 51 | { 52 | "type": "@source", 53 | "value": "duckduckgo.com", 54 | "attributes": [] 55 | }, 56 | { 57 | "type": "@source_uri", 58 | "value": result["url"], 59 | "attributes": [] 60 | }, 61 | { 62 | "type": "com.i3visio.Email", 63 | "value": result["url"], 64 | "attributes": [] 65 | }, 66 | { 67 | "type": "com.i3visio.Platform", 68 | "value": result["title"], 69 | "attributes": [] 70 | }, 71 | { 72 | "type": "com.i3visio.Text", 73 | "value": result["description"], 74 | "attributes": [] 75 | } 76 | ] 77 | print(new) 78 | results.append(new) 79 | except ValueError: 80 | return [] 81 | except Exception as _: 82 | print(f"ERROR: Something happenned when using DuckDuckGo. Details: {_}") 83 | return [] 84 | 85 | return results 86 | 87 | 88 | if __name__ == "__main__": 89 | parser = argparse.ArgumentParser(description='A library that wraps an account search onto DuckDuckGo.', prog='duckduckgo.py', epilog="", add_help=False) 90 | # Adding the main options 91 | # Defining the mutually exclusive group for the main options 92 | parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to viewdns.info.', required=True) 93 | 94 | group_about = parser.add_argument_group('About arguments', 'Showing additional information about this program.') 95 | group_about.add_argument('-h', '--help', action='help', help='shows this help and exists.') 96 | group_about.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') 97 | 98 | args = parser.parse_args() 99 | 100 | result = check_info(email=args.query) 101 | print(f"Results found for {args.query}:\n") 102 | print(json.dumps(result, indent=2)) 103 | -------------------------------------------------------------------------------- /osrframework/thirdparties/getBitcoinAddressDetails.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | 21 | import argparse 22 | import json 23 | 24 | import osframework.thirdparties.blockchain_info as blockchain_info 25 | 26 | if __name__ == "__main__": 27 | parser = argparse.ArgumentParser(description='A library that wraps the search about a Bitcoin address in blockchain.info.', prog='getBitcoinAddressDetails.py', epilog="", add_help=False) 28 | # Adding the main options 29 | # Defining the mutually exclusive group for the main options 30 | parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to blockchain.info.', required=True) 31 | 32 | groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') 33 | groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') 34 | groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') 35 | 36 | args = parser.parse_args() 37 | 38 | print(json.dumps(blockchain_info.getBitcoinAddressDetails(address=args.query), indent=2)) 39 | -------------------------------------------------------------------------------- /osrframework/thirdparties/haveibeenpwned_com/__init__.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | -------------------------------------------------------------------------------- /osrframework/thirdparties/infobel_com/__init__.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | -------------------------------------------------------------------------------- /osrframework/thirdparties/infobel_com/checkPhoneDetails.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | import argparse 21 | import json 22 | import sys 23 | import urllib2 24 | 25 | import osrframework.searchengines.google as google 26 | import osrframework.thirdparties.infobel_com.processing as processing 27 | 28 | def checkPhoneDetails(query=None): 29 | ''' 30 | Method that checks if the given hash is stored in the md5crack.com website. 31 | 32 | :param query: query to verify. 33 | 34 | :return: Python structure. 35 | ''' 36 | results = [] 37 | 38 | #TO-DO executing the query against Google and grab the results 39 | # The query should be something like " site:infobel.com" 40 | search = query + " site:infobel.com" 41 | 42 | # This will return a list of i3visio.uri objects 43 | uriObjects = google.processSearch(search) 44 | 45 | #TO-DO: grabbing the phone details for the QUERY 46 | for uri in uriObjects: 47 | # Recovering the website 48 | # Accessing the resources 49 | textResults = processing.getResults(uri["value"]) 50 | # Iterating over every result to process it and recover a person object 51 | for r in textResults: 52 | person = {} 53 | fullname = "" 54 | person["type"]="com.i3visio.Person" 55 | person["value"] = "FULLNAME_NOT_FOUND" 56 | person["attributes"] = processing.extractFieldsFromResult(r) 57 | 58 | for entity in person["attributes"]: 59 | if entity["type"] == "com.i3visio.Name": 60 | person["value"] = entity["value"] 61 | break 62 | 63 | # Appending the Uri of the infobel record: 64 | aux = {} 65 | aux["type"]= "com.i3visio.URI" 66 | aux["value"] = uri["value"] 67 | aux["attributes"] = [] 68 | person["attributes"].append(aux) 69 | 70 | # Appending the platform of the infobel record: 71 | aux = {} 72 | aux["type"]= "com.i3visio.Platform" 73 | aux["value"] = "Infobel" 74 | aux["attributes"] = [] 75 | person["attributes"].append(aux) 76 | 77 | # Appending to the results 78 | results.append(person) 79 | 80 | return results 81 | 82 | if __name__ == "__main__": 83 | parser = argparse.ArgumentParser(description='A library that wraps a search onto infobel.com via Google.', prog='checkPhoneDetails.py', add_help=False) 84 | # Adding the main options 85 | # Defining the mutually exclusive group for the main options 86 | parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to infobel.com.', required=True) 87 | 88 | groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') 89 | groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') 90 | groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') 91 | 92 | args = parser.parse_args() 93 | 94 | print json.dumps(checkPhoneDetails(query=args.query), indent=2) 95 | -------------------------------------------------------------------------------- /osrframework/thirdparties/infobel_com/processing.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | 21 | import argparse 22 | import json 23 | import re 24 | import sys 25 | 26 | import osrframework.utils.browser as browser 27 | 28 | def extractFieldsFromResult(data): 29 | ''' 30 | Method that parses Infobel textual information to return a series of attributes. 31 | 32 | :return: a list of i3visio-like objects. 33 | ''' 34 | 35 | entities = [] 36 | 37 | # Defining the objects to extract 38 | fieldsRegExp = {} 39 | fieldsRegExp["i3visio.fullname"] = "([^<]*)" 40 | fieldsRegExp["i3visio.name"] = " por [^ ]* ([^<]*)" 41 | fieldsRegExp["i3visio.surname"] = " por ([^ ]*) " 42 | fieldsRegExp["i3visio.location.address"] = "itemprop=\"streetAddress\">([^<]*)" 43 | fieldsRegExp["i3visio.location.city"] = "addressLocality\">([^<]*)" 44 | fieldsRegExp["i3visio.location.postalcode"] = "postalCode\">([^<]*)" 45 | fieldsRegExp["i3visio.phone"] = "document.write\('([0-9]+)'" 46 | 47 | for field in fieldsRegExp.keys(): 48 | listRecovered = re.findall(fieldsRegExp[field], data) 49 | if len(listRecovered) >0: 50 | aux = {} 51 | aux["type"]= field 52 | aux["value"] = listRecovered[0].replace('\xa0', ' ') 53 | aux["attributes"] = [] 54 | entities.append(aux) 55 | 56 | return entities 57 | 58 | def getResults(uri): 59 | ''' 60 | Method that recovers the text for each result in infobel.com 61 | 62 | :param uri: Infobel uri 63 | 64 | :return: A list of textual information to be processed 65 | ''' 66 | # Using i3visio browser to avoid certain issues... 67 | i3Browser = browser.Browser() 68 | 69 | data = i3Browser.recoverURL(uri) 70 | 71 | # Strings to be searched 72 | regExp = "(.*)" 73 | # re.DOTALL is needed to match any character INCLUDING \n 74 | results = re.findall(regExp, data, re.DOTALL) 75 | 76 | return results 77 | -------------------------------------------------------------------------------- /osrframework/thirdparties/ip_api_com/__init__.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | -------------------------------------------------------------------------------- /osrframework/thirdparties/md5crack_com/__init__.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | -------------------------------------------------------------------------------- /osrframework/thirdparties/md5crack_com/checkIfHashIsCracked.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | import argparse 21 | import json 22 | import osrframework.utils.config_api_keys as config_api_keys 23 | import sys 24 | import urllib2 25 | 26 | 27 | def checkIfHashIsCracked(hash=None, api_key=None): 28 | ''' 29 | Method that checks if the given hash is stored in the md5crack.com website. 30 | 31 | :param hash: hash to verify. 32 | :param api_key: api_key to be used in md5crack.com. If not provided, the API key will be searched in the config_api_keys.py file. 33 | 34 | :return: Python structure for the Json received. It has the following structure: 35 | { 36 | "phrase": "4d186321c1a7f0f354b297e8914ab240", 37 | "code": 6, 38 | "parsed": "hola", 39 | "response": "The MD5 hash was cracked." 40 | } 41 | ''' 42 | # This is for i3visio 43 | if api_key is None: 44 | #api_key = raw_input("Insert the API KEY here:\t") 45 | allKeys = config_api_keys.get_list_of_api_keys() 46 | try: 47 | api_key_data = allKeys["md5crack_com"] 48 | api_key = api_key_data["api_key"] 49 | except: 50 | # API_Key not found 51 | return {} 52 | 53 | apiURL = "http://api.md5crack.com/crack/"+ api_key +"/" + hash 54 | 55 | # Accessing the HIBP API 56 | data = urllib2.urlopen(apiURL).read() 57 | if "\"parsed\":null" in data: 58 | data = data.replace("\"parsed\":null", "\"parsed\":\"\"") 59 | 60 | # Reading the text data onto python structures 61 | jsonData = json.loads(data) 62 | #print json.dumps(jsonData, indent = 2) 63 | return jsonData 64 | 65 | if __name__ == "__main__": 66 | parser = argparse.ArgumentParser(description='A library that wraps a search onto md5crack.com.', prog='checkIfHashIsCracked.py', epilog="NOTE: if not provided, the API key will be searched in the config_api_keys.py file.", add_help=False) 67 | # Adding the main options 68 | # Defining the mutually exclusive group for the main options 69 | parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to md5crack.com.', required=True) 70 | parser.add_argument('-a', '--api_key', action='store', help='API key in md5crack.com to be used.', required=False, default=None) 71 | 72 | groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') 73 | groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') 74 | groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') 75 | 76 | args = parser.parse_args() 77 | 78 | print(json.dumps(checkIfHashIsCracked(hash=args.query, api_key=args.api_key), indent=2)) 79 | -------------------------------------------------------------------------------- /osrframework/thirdparties/md5db_net/__init__.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | -------------------------------------------------------------------------------- /osrframework/thirdparties/md5db_net/checkIfHashIsCracked.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | import argparse 21 | import json 22 | import sys 23 | import urllib2 24 | 25 | 26 | def checkIfHashIsCracked(hash=None): 27 | """ 28 | Method that checks if the given hash is stored in the md5db.net website. 29 | 30 | :param hash: hash to verify. 31 | 32 | :return: Resolved hash. If nothing was found, it will return an empty list. 33 | 34 | """ 35 | 36 | apiURL = "http://md5db.net/api/" + str(hash).lower() 37 | 38 | try: 39 | 40 | # Getting the result of the query from MD5db.net 41 | data = urllib2.urlopen(apiURL).read() 42 | return data 43 | 44 | except: 45 | # No information was found, then we return a null entity 46 | return [] 47 | 48 | if __name__ == "__main__": 49 | parser = argparse.ArgumentParser(description='A library that wraps a search onto md5db.net.', prog='checkIfHashIsCracked.py', epilog="", add_help=False) 50 | # Adding the main options 51 | # Defining the mutually exclusive group for the main options 52 | parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to md5db.net.', required=True) 53 | 54 | groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') 55 | groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') 56 | groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') 57 | 58 | args = parser.parse_args() 59 | print("Resolved hash for " + args.query + ":\n") 60 | print(json.dumps(checkIfHashIsCracked(hash=args.query), indent=2)) 61 | -------------------------------------------------------------------------------- /osrframework/thirdparties/pipl_com/__init__.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | -------------------------------------------------------------------------------- /osrframework/thirdparties/pipl_com/lib/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: cp1252 -*- 2 | # 3 | ################################################################################## 4 | # 5 | # This file is part of OSRFramework. 6 | # 7 | # OSRFramework 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, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | # 20 | ################################################################################## 21 | 22 | 23 | import osrframework.utils.logger 24 | 25 | # Calling the logger when being imported 26 | osrframework.utils.logger.setupLogger(loggerName="osrframework.thirdparties.pipl_com.lib") 27 | 28 | 29 | __version__ = '1.0' 30 | """Python implementation of Pipl's data model. 31 | The data model is basically Record/Person objects (avaialable in 32 | osrframework.thirdparties.pipl_com.lib.containers) with their source (available in osrframework.thirdparties.pipl_com.lib.source) 33 | and their fields (available in osrframework.thirdparties.pipl_com.lib.fields). 34 | Importing can be done either with: 35 | from osrframework.thirdparties.pipl_com.lib.containers import Record, Person 36 | from osrframework.thirdparties.pipl_com.lib.fields import Name, Address 37 | from osrframework.thirdparties.pipl_com.lib.source import Source 38 | or simply with: 39 | from osrframework.thirdparties.pipl_com.lib import Record, Person, Name, Address, Source 40 | """ 41 | from osrframework.thirdparties.pipl_com.lib.containers import Record, Person 42 | from osrframework.thirdparties.pipl_com.lib.source import Source 43 | from osrframework.thirdparties.pipl_com.lib.fields import * 44 | -------------------------------------------------------------------------------- /osrframework/thirdparties/pipl_com/lib/error.py: -------------------------------------------------------------------------------- 1 | from osrframework.thirdparties.pipl_com.lib.utils import Serializable 2 | 3 | 4 | class APIError(Exception, Serializable): 5 | 6 | """An exception raised when the response from the API contains an error.""" 7 | 8 | def __init__(self, error, http_status_code): 9 | """Extend Exception.__init___ and set two extra attributes - 10 | error (unicode) and http_status_code (int).""" 11 | Exception.__init__(self, error) 12 | self.error = error 13 | self.http_status_code = http_status_code 14 | 15 | @property 16 | def is_user_error(self): 17 | """A bool that indicates whether the error is on the user's side.""" 18 | return 400 <= self.http_status_code < 500 19 | 20 | @property 21 | def is_pipl_error(self): 22 | """A bool that indicates whether the error is on Pipl's side.""" 23 | return not self.is_user_error 24 | 25 | @classmethod 26 | def from_dict(cls, d): 27 | """Transform the dict to a error object and return the error.""" 28 | return cls(d.get('error'), d.get('@http_status_code')) 29 | 30 | def to_dict(self): 31 | """Return a dict representation of the error.""" 32 | return {'error': self.error, '@http_status_code': self.http_status_code} 33 | 34 | -------------------------------------------------------------------------------- /osrframework/thirdparties/pipl_com/lib/source.py: -------------------------------------------------------------------------------- 1 | from osrframework.thirdparties.pipl_com.lib.fields import Field 2 | from osrframework.thirdparties.pipl_com.lib.utils import is_valid_url 3 | 4 | 5 | class Source(Field): 6 | 7 | """A source of data that's available in a Record/Person object. 8 | 9 | The source is simply the URL of the page where the data was found, for 10 | convenience it also contains some meta-data about the data-source (like 11 | its full name and the category it belongs to). 12 | 13 | Note that this class is a subclass of Field even though a source is not 14 | exactly a data field, it's just because the functionality implemented in 15 | Field is usefull here too. 16 | 17 | """ 18 | 19 | attributes = ('is_sponsored',) 20 | children = ('name', 'category', 'url', 'domain') 21 | categories = set(['background_reports', 'contact_details', 22 | 'email_address', 'media', 'personal_profiles', 23 | 'professional_and_business', 'public_records', 24 | 'publications', 'school_and_classmates', 'web_pages']) 25 | 26 | def __init__(self, name=None, category=None, url=None, domain=None, 27 | is_sponsored=None): 28 | """`name`, `category`, `url` and `domain` should all be unicode or utf8 29 | encoded strs (will be decoded automatically). 30 | 31 | `is_sponsored` is a bool value that indicates whether the source is from 32 | one of Pipl's sponsored sources. 33 | 34 | `category` is one of Source.categories. 35 | 36 | """ 37 | Field.__init__(self) 38 | self.name = name 39 | self.category = category 40 | self.url = url 41 | self.domain = domain 42 | self.is_sponsored = is_sponsored 43 | 44 | @property 45 | def is_valid_url(self): 46 | """A bool that indicates whether the URL is valid.""" 47 | return bool(self.url and is_valid_url(self.url)) 48 | 49 | @staticmethod 50 | def validate_categories(categories): 51 | """Take an iterable of source categories and raise ValueError if some 52 | of them are invalid.""" 53 | if not set(categories) <= Source.categories: 54 | invalid = list(set(categories) - Source.categories) 55 | raise ValueError('Invalid categories: %s' % invalid) 56 | 57 | -------------------------------------------------------------------------------- /osrframework/thirdparties/resolvethem_com/__init__.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | -------------------------------------------------------------------------------- /osrframework/thirdparties/resolvethem_com/processing.py: -------------------------------------------------------------------------------- 1 | # !/usr/bin/python 2 | # -*- coding: cp1252 -*- 3 | # 4 | ################################################################################## 5 | # 6 | # This program is part of OSRFramework. You can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program 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 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | ################################################################################## 20 | 21 | import argparse 22 | import re 23 | import requests 24 | import urllib 25 | 26 | def checkIPFromAlias(alias=None): 27 | """ 28 | Method that checks if the given alias is currently connected to Skype and returns its IP address. 29 | 30 | :param alias: Alias to be searched. 31 | 32 | :return: Python structure for the Json received. It has the following structure: 33 | { 34 | "type": "i3visio.ip", 35 | "value": "1.1.1.1", 36 | "attributes" : [] 37 | } 38 | """ 39 | headers = { 40 | "Content-type": "text/html", 41 | "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", 42 | "Accept-Encoding": " gzip, deflate", 43 | "Accept-Language": " es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3", 44 | "Connection": "keep-alive", 45 | "DNT": "1", 46 | "Host": "www.resolvethem.com", 47 | "Referer": "http://www.resolvethem.com/index.php", 48 | "User-Agent": "Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Firefox/38.0", 49 | "Content-Length": "26", 50 | "Content-Type": "application/x-www-form-urlencoded", 51 | } 52 | 53 | req = requests.post("http://www.resolvethem.com/index.php",headers=headers,data={'skypeUsername': alias,'submit':''}) 54 | # Data returned 55 | data = req.content 56 | # Compilation of the regular expression 57 | p = re.compile("class='alert alert-success'>([0-9\.]*)<") 58 | allMatches = p.findall(data) 59 | if len(allMatches)> 0: 60 | jsonData = {} 61 | jsonData["type"]="i3visio.ip" 62 | jsonData["value"]=allMatches[0] 63 | jsonData["attributes"]=[] 64 | return jsonData 65 | return {} 66 | -------------------------------------------------------------------------------- /osrframework/thirdparties/viewdns_info/__init__.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | -------------------------------------------------------------------------------- /osrframework/utils/__init__.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | -------------------------------------------------------------------------------- /osrframework/utils/benchmark.py: -------------------------------------------------------------------------------- 1 | # !/usr/bin/python 2 | # -*- coding: cp1252 -*- 3 | # 4 | ################################################################################## 5 | # 6 | # This program is part of OSRFramework. You can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program 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 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | ################################################################################## 20 | 21 | import time 22 | # global issues 23 | from multiprocessing import Pool 24 | 25 | import logging 26 | import urllib3 27 | 28 | 29 | def testFunctionWeb(): 30 | """Benchmarcking function... 31 | """ 32 | #print p 33 | resp = urllib3.urlopen('http://www.i3visio.com') 34 | html = resp.read() 35 | return 36 | 37 | def testFunction2(): 38 | """Benchmarcking function... 39 | """ 40 | a = 1 41 | for i in range(1000): 42 | a+=1 43 | return 44 | 45 | def multi_run_wrapper(args): 46 | """ Wrapper for being able to launch all the threads of getPageWrapper. 47 | 48 | Args: 49 | We receive the parameters for getPageWrapper as a tuple. 50 | """ 51 | #print args 52 | return testFunctionWeb(*args) 53 | 54 | def do_benchmark(plats): 55 | """Perform the benchmark... 56 | """ 57 | logger = logging.getLogger("osrframework.utils") 58 | # defining the results dict 59 | res = {} 60 | 61 | # args 62 | args = [] 63 | 64 | #for p in plats: 65 | # args.append( (str(p),) ) 66 | 67 | # selecting the number of tries to be performed 68 | tries = [1, 4, 8 ,16, 24, 32, 40, 48, 56, 64] 69 | 70 | #for i in range(1, len(plats)/10): 71 | # tries.append(i*10) 72 | 73 | logger.info("The test is starting recovering webpages by creating the following series of threads: " + str(tries)) 74 | 75 | for i in tries: 76 | print("Testing creating " + str(i) + " simultaneous threads...") 77 | # starting 78 | t0 = time.clock() 79 | pool = Pool(i) 80 | # We call the wrapping function with all the args previously generated 81 | poolResults = pool.map(multi_run_wrapper, args) 82 | 83 | t1 = time.clock() 84 | # storing the results 85 | res[i] = t1 - t0 86 | print(str(i) + "\t" + str(res[i]) + "\n") 87 | 88 | return res 89 | -------------------------------------------------------------------------------- /osrframework/utils/config_api_keys.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | from configparser import ConfigParser 21 | import os 22 | 23 | import osrframework.utils.configuration as configuration 24 | import osrframework.utils.errors as errors 25 | 26 | 27 | def get_list_of_api_keys(): 28 | """Return list of API keys 29 | 30 | Return: 31 | A dictionary containing the API Keys stored in a dictionary depending 32 | on the information required by each platform. 33 | """ 34 | 35 | dict_api_keys = {} 36 | 37 | # If a api_keys.cfg has not been found, creating it by copying from default 38 | config_path = os.path.join(configuration.get_config_path()["appPath"], "api_keys.cfg") 39 | 40 | # Checking if the configuration file exists 41 | if not os.path.exists(config_path): 42 | # Copy the data from the default folder 43 | default_config_path = os.path.join(configuration.get_config_path()["appPathDefaults"], "api_keys.cfg") 44 | 45 | try: 46 | with open(default_config_path) as file: 47 | cont = file.read() 48 | with open(config_path, "w") as output_file: 49 | output_file.write(cont) 50 | except Exception as e: 51 | #raise errors.ConfigurationFileNotFoundError(config_path, default_config_path); 52 | return dict_api_keys 53 | 54 | # Reading the configuration file 55 | config = ConfigParser() 56 | config.read(config_path) 57 | 58 | # Iterating through all the sections, which contain the platforms 59 | for platform in config.sections(): 60 | # Initializing values 61 | platform_api = {} 62 | 63 | incomplete = False 64 | 65 | # Iterating through parametgers 66 | for (param, value) in config.items(platform): 67 | if value == '': 68 | incomplete = True 69 | break 70 | platform_api[param] = value 71 | 72 | # Loading the info in the dict 73 | if not incomplete: 74 | dictAPIeys[platform] = platform_api 75 | 76 | return dict_api_keys 77 | -------------------------------------------------------------------------------- /osrframework/utils/config_credentials.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | from configparser import ConfigParser 21 | import os 22 | 23 | import osrframework.utils.configuration as configuration 24 | import osrframework.utils.errors as errors 25 | 26 | 27 | def get_list_of_credentials(): 28 | """Return list of credentials taken from configuration files 29 | 30 | Returns: 31 | list. A list of tuples containing in the first the name of the platform, 32 | as read from the accounts.cfg file in the application folder. E. g.: 33 | 34 | list_creds.append(("", "", "")) 35 | """ 36 | list_creds = [] 37 | # If a accounts.cfg has not been found, creating it by copying from default 38 | config_path = os.path.join(configuration.get_config_path()["appPath"], "accounts.cfg") 39 | 40 | # Checking if the configuration file exists 41 | if not os.path.exists(config_path): 42 | # Copy the data from the default folder 43 | default_config_path = os.path.join(configuration.get_config_path()["appPathDefaults"], "accounts.cfg") 44 | 45 | try: 46 | with open(default_config_path) as file: 47 | cont = file.read() 48 | with open(config_path, "w") as output_file: 49 | output_file.write(cont) 50 | except Exception as e: 51 | raise errors.ConfigurationFileNotFoundError(config_path, default_config_path); 52 | return list_creds 53 | 54 | # Reading the configuration file 55 | config = ConfigParser() 56 | config.read(config_path) 57 | 58 | # Iterating through all the sections, which contain the platforms 59 | for platform in config.sections(): 60 | # Initializing values 61 | creds = {} 62 | 63 | incomplete = False 64 | 65 | # Iterating through parametgers 66 | for (param, value) in config.items(platform): 67 | if value == '': 68 | incomplete = True 69 | break 70 | creds[param] = value 71 | 72 | # Appending credentials if possible 73 | try: 74 | if not incomplete: 75 | list_creds.append((platform, creds["login"], creds["password"])) 76 | except Exception: 77 | pass 78 | 79 | return list_creds 80 | -------------------------------------------------------------------------------- /osrframework/utils/credentials.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | import os 21 | 22 | import osrframework.utils.config_credentials as c_creds 23 | import osrframework.utils.general as general 24 | 25 | 26 | class Credential(): 27 | """Class to match the credentials needed by a platform 28 | """ 29 | def __init__(self, user, password): 30 | """Creation of the credentials 31 | 32 | Args: 33 | user (str): Login name. 34 | password (str): Password. 35 | """ 36 | self.user = user 37 | self.password = password 38 | 39 | 40 | def get_credentials(): 41 | """Recovering the credentials from a file with the following structure 42 | 43 | Returns: 44 | A dictionary with the following struture: 45 | { "platform1": [C1, C2], "platform2": [C3]} 46 | """ 47 | creds = {} 48 | 49 | creds_tuples = c_creds.get_list_of_credentials() 50 | 51 | for cTuple in creds_tuples: 52 | plat, user, password = cTuple 53 | 54 | c = Credential(user, password) 55 | 56 | if plat not in creds.keys(): 57 | creds[plat] = [c] 58 | else: 59 | creds[plat] = creds[plat].append(c) 60 | 61 | return creds 62 | -------------------------------------------------------------------------------- /osrframework/utils/errors.py: -------------------------------------------------------------------------------- 1 | # !/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | # 4 | ################################################################################## 5 | # 6 | # Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) 7 | # 8 | # This file is part of OSRFramework. You can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program. If not, see . 20 | # 21 | ################################################################################## 22 | 23 | class Error(Exception): 24 | """Base class for exceptions in this module. 25 | 26 | Attributes: 27 | reason -- Defines what has just happened 28 | steps -- Defines what the user can do to solve this 29 | post -- Additional information on how to report the bug 30 | """ 31 | 32 | def __init__(self, reason="OSRFramework Generic Error.", steps = "No more information here. Just have a look at the code :(."): 33 | self.reason = reason 34 | self.steps = steps 35 | self.post = "If you need more information on how to solve this, copy this information and ask us by placing an issue at ." 36 | 37 | def __str__(self): 38 | return "\n\t- Oh! What's happening? > " + self.reason + "\n\t- How can I solve this? > " + self.steps + "\n\t- This is not enough... > " + self.post 39 | 40 | class DefaultConfigurationFileNotFoundError(Error): 41 | """Exception raised when a given configuration file is not found. 42 | 43 | Attributes: 44 | fileName -- input expression in which the error occurred 45 | defaultPath -- the path where the default files should be found 46 | """ 47 | def __init__(self, fileName, defaultPath): 48 | reason = "The configuration file " + fileName + " could not be found. The system tried to get the files provided by default with OSRFramework but they were not found either." 49 | steps = "Check if the configuration path exists or if it is accesible by the current user. You should be able to find the default configuration files at '" + defaultPath + "'. If they are not there, try to solve this by reinstalling OSRFramework again for this user." 50 | Error.__init__(self, reason, steps) 51 | 52 | class ConfigurationParameterNotValidError(Error): 53 | """Exception raised when a given parameter is not valid for this option. 54 | 55 | Attributes: 56 | configurationFilePath -- path to the configuration file 57 | application -- the application that had the problem 58 | parameter -- the parameter that was not properly configured 59 | value -- the value to be changed 60 | """ 61 | def __init__(self, configurationFilePath, application, parameter, value): 62 | reason = "The following parameter in " + application + " was misconfigured: " + parameter + " = " + str(value) 63 | steps = "You can go to the configuration file stored at '" + configurationFilePath + "' and update it accordingly by using the examples provided in the commented lines. In any case, you can always use the backup configuration files provided with the framework." 64 | Error.__init__(self, reason, steps) 65 | -------------------------------------------------------------------------------- /osrframework/utils/exceptions.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | ################################################################################## 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################## 19 | 20 | 21 | import os 22 | 23 | import osrframework.utils.configuration as configuration 24 | import osrframework.utils.general as general 25 | 26 | 27 | class OSRFrameworkException(Exception): 28 | """ 29 | Generic OSrframework Exception 30 | 31 | It will be used to show warnings, i. e., any operation which throws an 32 | exception but which does not stop OSRFramework from running. 33 | 34 | Messages will be printed as warnings, in orange. 35 | """ 36 | def __init__(self, msg, *args, **kwargs): 37 | Exception.__init__(self, general.warning(msg)) 38 | self.generic = "Generic OSRFramework exception." 39 | 40 | 41 | class NoCredentialsException(OSRFrameworkException): 42 | def __init__(self, platform, *args, **kwargs): 43 | msg = """ 44 | [*] Warning:\t{}. Details: 45 | No valid credentials provided for '{}'. 46 | Update the configuration file at: '{}'. 47 | """.format( 48 | self.__class__.__name__, 49 | platform, 50 | os.path.join(configuration.getConfigPath()["appPath"], "accounts.cfg"), 51 | general.emphasis("-x " + platform) 52 | ) 53 | OSRFrameworkException.__init__(self, general.warning(msg)) 54 | self.generic = "The credentials for some platforms where NOT provided." 55 | 56 | 57 | class OSRFrameworkError(Exception): 58 | """ 59 | Generic OSrframework Error 60 | 61 | It will be used to show errors, i. e., any operation which throws an error 62 | from which OSRFramework cannot get recovered. 63 | 64 | Messages will be printed as errors, in red. 65 | """ 66 | def __init__(self, msg, *args, **kwargs): 67 | Exception.__init__(self, "{}".format(general.error(msg))) 68 | self.generic = "Generic OSRFramework error." 69 | 70 | 71 | class NotImplementedModeError(OSRFrameworkError): 72 | def __init__(self, platform, mode, *args, **kwargs): 73 | msg = """ 74 | [*] Error:\t{}. Details: 75 | The '{}' wrapper has tried to call 'self.do_{}(...)'. 76 | The method seems be implemented wrongly or not implemented.""".format( 77 | self.__class__.__name__, 78 | platform, 79 | mode 80 | ) 81 | OSRFrameworkError.__init__(self, msg) 82 | self.generic = "A wrapper has tried to launch a mode which is not yet implemented. This error should not be happening unless you have added a new method out of the standard ones for mailfy, phonefy, searchfy or usufy." 83 | 84 | class BadImplementationError(OSRFrameworkError): 85 | def __init__(self, original_message, *args, **kwargs): 86 | msg = """ 87 | [*] Error:\t{}. Details: 88 | {}. 89 | {}""".format( 90 | self.__class__.__name__, 91 | original_message, 92 | "The wrapper may be missing an attribute like self.creds empty list in its constructor." 93 | ) 94 | OSRFrameworkError.__init__(self, msg) 95 | self.generic = "A wrapper has launched an unexpected implementation error." 96 | -------------------------------------------------------------------------------- /osrframework/utils/fortunes.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | # 18 | ############################################################################### 19 | 20 | import osrframework.utils.configuration as configuration 21 | 22 | 23 | messages = [ 24 | "-- OSINT is not fingerprinting. OSINT is Open Sources Intelligence. -- ", 25 | "-- Social Engineering is not OSINT! -- ", 26 | "-- AGPLv3 enforces that any app using OSRFramework SHOULD also be free software. --", 27 | "-- Exclude a wrapper using '-x'. E. g.: 'usufy -n i3visio -x facebook'. --", 28 | "-- You can export data to formats like gml, xls, etc. E. g.: '-e xls gml'. --", 29 | "-- Use 'alias_generator' to create aliases based on known info. --", 30 | "-- Launch 'usufy' against a list of aliases in a file (1 per line) using '-l'. --", 31 | "-- With 'searchfy' you can find profiles using full names or other data. --", 32 | "-- With 'phonefy' you can guess if a given phone number is linked to spam. --", 33 | "-- To automagically open the collected results in the browser use '-w'. --", 34 | "-- You can find different emails using an alias with 'mailfy -n '. --", 35 | "-- If you want to verify infomation about an email, use 'mailfy -m '. --", 36 | "-- When you reach an email pattern, try 'checkfy' to find candidate emails. --", 37 | "-- Use 'domainfy -n -t all' to find domain names using that alias. --", 38 | "-- Use '-t global cc' to narrow the verifications launched by domainfy. --", 39 | "-- Use checkfy to find emails matching using a nick that match a pattern. --", 40 | "-- With '--extra-words hack', 'alias_generator' will add 'hack' to the nicks. --", 41 | "-- In 'alias_generator', '--common-words' adds words like `xxx', 'real'… --", 42 | "-- Use '--leet' with 'alias_generator' to build h4x0r n1ckn4m3s. --", 43 | "-- In 'domainfy', use '-t cc' to find domains resolving to ccTLDs. --", 44 | "-- In 'usufy', you can add several nicks to '-n'. E. g.: '-n felix yaiza'. --", 45 | "-- In 'domainfy', you may use several words with '-n'. E. g.: '-n felix yaiza'. --", 46 | "-- If you have a file with brand names (1 per line), use 'domainfy' with '-N'. --", 47 | "-- In OSRF CLI apps, you can set a different output folder with '-o'. --", 48 | "-- Hey! '--help' is your friend, pal! --", 49 | "-- With '--whois' in 'domainfy' you can find WhoIs info about a domain. --", 50 | "-- You can get information about an email using 'mailfy -m john@example.com'. --", 51 | "-- With 'mailfy' you can make reverse Whois queries with ViewDNS.info. --", 52 | "-- Troy Hunt's Have I Been Pwned is no longer free to use! :( --", 53 | "-- A Reverse Whois query gets domains registed by a person. --", 54 | "-- Run 'osrf upgrade' to upgrade OSRFramework to the latest version in PyPI. --", 55 | "-- Use 'osrf upgrade --only-check' to check for newer versions in PyPI. --", 56 | "-- Use 'osrf upgrade --use-development' to grab development versions. --", 57 | "-- The 'osrf' tool will list all the tools as subcommands. --", 58 | "-- 'osrf usufy -n i3visio ' and 'usufy -n i3visio' has the same effect. --", 59 | "-- Config files live in '{configuration.get_config_path['appPath']}'. --", 60 | "-- FAQ at ! --" 61 | ] 62 | -------------------------------------------------------------------------------- /osrframework/utils/global_api.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | # 4 | ################################################################################## 5 | # 6 | # Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) 7 | # 8 | # This file is part of OSRFramework. You can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program. If not, see . 20 | # 21 | ################################################################################## 22 | 23 | import argparse 24 | import json 25 | import csv 26 | 27 | import osrframework.utils.config_api_keys as api_keys 28 | 29 | class APIWrapper(): 30 | ''' 31 | Global API wrapper. 32 | ''' 33 | 34 | def __init__(self, api_data=None): 35 | ''' 36 | :param api_data: dictionary containing the credentials for the given platform. 37 | ''' 38 | pass 39 | 40 | def get_user(self, screen_name): 41 | ''' 42 | Method to perform the usufy searches. 43 | 44 | :param screen_name: nickname to be searched. 45 | 46 | :return: User. 47 | ''' 48 | return {} 49 | 50 | def search_users(self, query, n=20, maxUsers=60): 51 | ''' 52 | Method to perform the searchfy searches. 53 | 54 | :param query: Query to be performed. 55 | :param n: Number of results per query. 56 | :param maxUsers: Max. number of users to be recovered. 57 | 58 | :return: List of users. 59 | ''' 60 | return [] 61 | 62 | 63 | def get_all_docs(self, screen_name): 64 | ''' 65 | :param screen_name: nick from which we will try to recover the docs, i. e., tweets, publications, etc. 66 | 67 | :return: List of publications, i. e., tweets, publications, etc. 68 | ''' 69 | return [] 70 | 71 | -------------------------------------------------------------------------------- /osrframework/utils/updates.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | import xmlrpc.client 21 | try: 22 | from pip._internal.utils.misc import get_installed_distributions 23 | except ImportError: # pip<10 24 | from pip import get_installed_distributions 25 | 26 | 27 | class UpgradablePackage(object): 28 | def __init__(self, package_name="osrframework", 29 | repository='https://pypi.python.org/pypi'): 30 | """Checks if a locally installed package has an update 31 | 32 | Args: 33 | packake_name (str): The name of the package. 34 | repository (str): Defines the repository. By default, the official 35 | one. 36 | """ 37 | installed_package = None 38 | self.local_version = None 39 | self.remote_version = None 40 | self.repository = repository 41 | 42 | for dist in get_installed_distributions(): 43 | if dist.project_name == package_name: 44 | installed_package = dist 45 | try: 46 | self.local_version = installed_package.version 47 | except AttributeError: 48 | pass 49 | break 50 | 51 | pypi = xmlrpc.client .ServerProxy(repository) 52 | # This is an array 53 | version_available = pypi.package_releases(package_name) 54 | 55 | try: 56 | self.remote_version = version_available[0] 57 | if version_available[0] < installed_package.version: 58 | # No updates available 59 | self.status = "unstable" 60 | elif version_available[0] == installed_package.version: 61 | # No updates available 62 | self.status = "up-to-date" 63 | else: 64 | # There are updates available! 65 | self.status = "outdated" 66 | except IndexError: 67 | self.status = "unknown" 68 | 69 | def get_dict(self): 70 | """Returns a dict representing the object representation 71 | 72 | Returns: 73 | A dict representing the information stored. 74 | """ 75 | return { 76 | "status": self.status, 77 | "local_version": self.local_version, 78 | "remote_version": self.remote_version, 79 | "repository": self.repository, 80 | } 81 | 82 | def is_upgradable(self): 83 | """Checks if a locally stored version of a file is outdated 84 | 85 | Returns: 86 | Bool if the local version is smaller than the remote one. 87 | """ 88 | return self.local_version < self.remote_version 89 | 90 | 91 | if __name__ == "__main__": 92 | print(UpgradablePackage(package_name="osrframework").get_dict()) 93 | -------------------------------------------------------------------------------- /osrframework/wrappers/__init__.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | -------------------------------------------------------------------------------- /osrframework/wrappers/causes.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Causes(Platform): 28 | """A object for Causes""" 29 | def __init__(self): 30 | self.platformName = "Causes" 31 | self.tags = ["activism"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "https://www.causes.com/" + "" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query. 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = "[^\.]+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = [" (404)"] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | 92 | # Definition of regular expressions to be searched in searchfy mode 93 | #self.fieldsRegExp["searchfy"] = {} 94 | # Example of fields: 95 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 96 | 97 | ################ 98 | # Fields found # 99 | ################ 100 | # This attribute will be feeded when running the program. 101 | self.foundFields = {} 102 | -------------------------------------------------------------------------------- /osrframework/wrappers/ccm.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Ccm(Platform): 28 | """A object for Ccm""" 29 | def __init__(self): 30 | self.platformName = "Ccm" 31 | self.tags = ["tech"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "http://es.ccm.net/profile/user/" + "" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = ".+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = ["Error 404"] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | # Definition of regular expressions to be searched in searchfy mode 92 | #self.fieldsRegExp["searchfy"] = {} 93 | # Example of fields: 94 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 95 | 96 | ################ 97 | # Fields found # 98 | ################ 99 | # This attribute will be feeded when running the program. 100 | self.foundFields = {} 101 | -------------------------------------------------------------------------------- /osrframework/wrappers/douban.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "3.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Douban(Platform): 28 | """ class""" 29 | def __init__(self): 30 | """Constructor with parameters 31 | 32 | This method permits the developer to instantiate dinamically Platform 33 | objects.""" 34 | self.platformName = "Douban" 35 | self.tags = ["social"] 36 | self.modes = { 37 | "usufy": { 38 | "debug": False, 39 | "extra_fields": {}, 40 | "needs_credentials": False, 41 | "not_found_text": '/pics/douban_error.gif"/>', 42 | "query_validator": "[a-z0-9A-Z_]+", 43 | "url": "https://site.douban.com/{placeholder}", 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /osrframework/wrappers/ello.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Ello(Platform): 28 | """A object for Ello""" 29 | def __init__(self): 30 | self.platformName = "Ello" 31 | self.tags = ["social"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "https://ello.co/" + "" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = ".+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = ["| [404] Not Found"] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | # Definition of regular expressions to be searched in searchfy mode 92 | #self.fieldsRegExp["searchfy"] = {} 93 | # Example of fields: 94 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 95 | 96 | ################ 97 | # Fields found # 98 | ################ 99 | # This attribute will be feeded when running the program. 100 | self.foundFields = {} 101 | -------------------------------------------------------------------------------- /osrframework/wrappers/eyeem.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Eyeem(Platform): 28 | """A object for Eyeem""" 29 | def __init__(self): 30 | self.platformName = "Eyeem" 31 | self.tags = ["imagery"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "https://www.eyeem.com/u/" + "" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = ".+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = ["Not Found (404)"] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | # Definition of regular expressions to be searched in searchfy mode 92 | #self.fieldsRegExp["searchfy"] = {} 93 | # Example of fields: 94 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 95 | 96 | ################ 97 | # Fields found # 98 | ################ 99 | # This attribute will be feeded when running the program. 100 | self.foundFields = {} 101 | -------------------------------------------------------------------------------- /osrframework/wrappers/freelancer.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "3.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Freelancer(Platform): 28 | """A object for Facebook""" 29 | def __init__(self): 30 | self.platformName = "Freelancer" 31 | self.tags = ["jobs"] 32 | 33 | self.modes = { 34 | "usufy": { 35 | "debug": False, 36 | "extra_fields": {}, 37 | "needs_credentials": False, 38 | "not_found_text": " Looks like the page you are looking for doesn't exist", # Text that indicates a missing profile 39 | "query_validator": "[a-zA-Z\.0-9_\-]+", # Regular expression that the alias SHOULD match 40 | "url": "https://www.freelancer.com/u/{placeholder}", # Target URL where {placeholder} would be modified by the alias 41 | "test": { 42 | "valid": "james", 43 | "invalid": "7ddf32e17a6ac5" 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /osrframework/wrappers/infojobs.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Infojobs(Platform): 28 | """A object for Infojobs""" 29 | def __init__(self): 30 | self.platformName = "Infojobs" 31 | self.tags = ["jobs"] 32 | 33 | # Valid modes 34 | self.isValidMode = { 35 | "mailfy": True, 36 | "phonefy": False, 37 | "searchfy": False, 38 | "usufy": False, 39 | } 40 | 41 | self.url = {} 42 | 43 | self.needsCredentials = { 44 | "mailfy": False 45 | } 46 | 47 | self.validQuery = { 48 | "mailfy": ".+" 49 | } 50 | 51 | 52 | self.fieldsRegExp = {} 53 | 54 | # Definition of regular expressions to be searched in usufy mode 55 | self.fieldsRegExp["mailfy"] = {} 56 | 57 | ################ 58 | # Fields found # 59 | ################ 60 | # This attribute will be feeded when running the program. 61 | self.foundFields = {} 62 | 63 | def check_mailfy(self, query, kwargs={}): 64 | """Verifying a mailfy query in this platform 65 | 66 | This might be redefined in any class inheriting from Platform. The only 67 | condition is that any of this should return a dictionary as defined. 68 | 69 | Args: 70 | query (str): The element to be searched. 71 | 72 | Returns: 73 | String. The collected data if exists or None if not. 74 | """ 75 | import requests 76 | 77 | s = requests.Session() 78 | 79 | # Getting the first response to grab the csrf_token 80 | r1 = s.get('https://www.infojobs.net') 81 | 82 | # Launching the query to Instagram 83 | r2 = s.post( 84 | 'https://www.infojobs.net/candidate/profile/check-email-registered' 85 | '.xhtml', 86 | data={"email": query}, 87 | ) 88 | 89 | if '{"email_is_secure":true,"email":true}' in r2.text: 90 | return r2.text 91 | return None 92 | -------------------------------------------------------------------------------- /osrframework/wrappers/issuu.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Issuu(Platform): 28 | """A object for Issuu""" 29 | def __init__(self): 30 | self.platformName = "Issuu" 31 | self.tags = ["tools"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "https://www.issuu.com/" + "" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query. 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = ".+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = ["not found"] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | # Definition of regular expressions to be searched in searchfy mode 92 | #self.fieldsRegExp["searchfy"] = {} 93 | # Example of fields: 94 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 95 | 96 | ################ 97 | # Fields found # 98 | ################ 99 | # This attribute will be feeded when running the program. 100 | self.foundFields = {} 101 | -------------------------------------------------------------------------------- /osrframework/wrappers/ivoox.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Ivoox(Platform): 28 | """A object for Ivoox""" 29 | def __init__(self): 30 | self.platformName = "Ivoox" 31 | self.tags = ["opinions", "contact"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "https://" + "" + ".ivoox.com" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query. 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = ".+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = ["pag_404"] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | # Definition of regular expressions to be searched in searchfy mode 92 | #self.fieldsRegExp["searchfy"] = {} 93 | # Example of fields: 94 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 95 | 96 | ################ 97 | # Fields found # 98 | ################ 99 | # This attribute will be feeded when running the program. 100 | self.foundFields = {} 101 | -------------------------------------------------------------------------------- /osrframework/wrappers/jamiiforums.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "3.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Jamiiforums(Platform): 28 | """ class""" 29 | def __init__(self): 30 | """Constructor with parameters 31 | 32 | This method permits the developer to instantiate dinamically Platform 33 | objects.""" 34 | self.platformName = "Jamiiforums" 35 | self.tags = ["opinions"] 36 | self.modes = { 37 | "usufy": { 38 | "debug": False, 39 | "extra_fields": { 40 | "com.i3visio.Name": '>([^<]+)', 41 | }, 42 | "needs_credentials": False, 43 | "not_found_text": "The specified member cannot be found. Please enter a member's entire name.", 44 | "query_validator": "[a-z0-9A-Z_]+", 45 | "url": "https://www.jamiiforums.com/members/?username={placeholder}", 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /osrframework/wrappers/kinja.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Kinja(Platform): 28 | """A object for Kinja""" 29 | def __init__(self): 30 | self.platformName = "Kinja" 31 | self.tags = ["news"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "http://" + "" + ".kinja.com" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query. 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = ".+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = ["Kinja"] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | # Definition of regular expressions to be searched in searchfy mode 92 | #self.fieldsRegExp["searchfy"] = {} 93 | # Example of fields: 94 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 95 | 96 | ################ 97 | # Fields found # 98 | ################ 99 | # This attribute will be feeded when running the program. 100 | self.foundFields = {} 101 | -------------------------------------------------------------------------------- /osrframework/wrappers/listaspam.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "3.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Listaspam(Platform): 28 | """A object for Listaspam""" 29 | def __init__(self): 30 | self.platformName = "Listaspam" 31 | self.tags = ["phone"] 32 | 33 | self.modes = { 34 | "phonefy": { 35 | "debug": False, 36 | "extra_fields": { 37 | "com.i3visio.Location": "
📍([^<]+)
", 38 | "com.i3visio.Labels": 'Nube de tags: (.+)' 39 | }, 40 | "needs_credentials": False, 41 | "not_found_text": "No te quedes sin saber quién te llama por teléfono.", # Text that indicates a missing profile 42 | "query_validator": "[0-9+\-\.]{6-16}", # Regular expression that the alias SHOULD match 43 | "url": "http://www.listaspam.com/busca.php?Telefono={placeholder}", # Target URL where {placeholder} would be modified by the alias 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /osrframework/wrappers/medium.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Medium(Platform): 28 | """A object for Medium""" 29 | def __init__(self): 30 | 31 | self.platformName = "Medium" 32 | self.tags = ["opinions"] 33 | 34 | ######################## 35 | # Defining valid modes # 36 | ######################## 37 | self.isValidMode = {} 38 | self.isValidMode["phonefy"] = False 39 | self.isValidMode["usufy"] = True 40 | self.isValidMode["searchfy"] = False 41 | 42 | ###################################### 43 | # Search URL for the different modes # 44 | ###################################### 45 | # Strings with the URL for each and every mode 46 | self.url = {} 47 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 48 | self.url["usufy"] = "https://medium.com/@" 49 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 50 | 51 | ###################################### 52 | # Whether the user needs credentials # 53 | ###################################### 54 | self.needsCredentials = {} 55 | #self.needsCredentials["phonefy"] = False 56 | self.needsCredentials["usufy"] = False 57 | #self.needsCredentials["searchfy"] = False 58 | 59 | ################# 60 | # Valid queries # 61 | ################# 62 | # Strings that will imply that the query number is not appearing 63 | self.validQuery = {} 64 | # The regular expression '.+' will match any query. 65 | #self.validQuery["phonefy"] = ".*" 66 | self.validQuery["usufy"] = ".+" 67 | #self.validQuery["searchfy"] = ".*" 68 | 69 | ################### 70 | # Not_found clues # 71 | ################### 72 | # Strings that will imply that the query number is not appearing 73 | self.notFoundText = {} 74 | #self.notFoundText["phonefy"] = [] 75 | self.notFoundText["usufy"] = ["PAGE NOT FOUND"] 76 | #self.notFoundText["searchfy"] = [] 77 | 78 | ######################### 79 | # Fields to be searched # 80 | ######################### 81 | self.fieldsRegExp = {} 82 | 83 | # Definition of regular expressions to be searched in phonefy mode 84 | #self.fieldsRegExp["phonefy"] = {} 85 | # Example of fields: 86 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 87 | 88 | # Definition of regular expressions to be searched in usufy mode 89 | self.fieldsRegExp["usufy"] = {} 90 | # Example of fields: 91 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 92 | # Definition of regular expressions to be searched in searchfy mode 93 | #self.fieldsRegExp["searchfy"] = {} 94 | # Example of fields: 95 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 96 | 97 | ################ 98 | # Fields found # 99 | ################ 100 | # This attribute will be feeded when running the program. 101 | self.foundFields = {} 102 | -------------------------------------------------------------------------------- /osrframework/wrappers/minds.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2021 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "3.1" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Minds(Platform): 28 | """ class""" 29 | def __init__(self): 30 | """Constructor with parameters 31 | 32 | This method permits the developer to instantiate dinamically Platform 33 | objects.""" 34 | self.platformName = "Minds" 35 | self.tags = ["social"] 36 | self.modes = { 37 | "usufy": { 38 | "debug": False, 39 | "extra_fields": { 40 | "com.i3visio.Name": '

([^<]+)

', 41 | }, 42 | "needs_credentials": False, 43 | "not_found_text": "this user could not be found", 44 | "query_validator": "[a-z0-9A-Z_]+", 45 | "url": "https://www.minds.com/{placeholder}", 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /osrframework/wrappers/mstdn_jp.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class MstdnJP(Platform): 28 | """ class""" 29 | def __init__(self): 30 | """Constructor with parameters 31 | 32 | This method permits the developer to instantiate dinamically Platform 33 | objects.""" 34 | self.platformName = "MstdnJP" 35 | self.tags = ["social", "mastodon"] 36 | self.modes = { 37 | "usufy": { 38 | "debug": False, 39 | "extra_fields": { 40 | "com.i3visio.Name": "([^<]+)", # Regular expresion to extract the alias 41 | }, 42 | "needs_credentials": False, 43 | "not_found_text": "Mastodon", # Text that indicates a missing profile 44 | "query_validator": "[a-z0-9A-Z_]+", # Regular expression that the alias SHOULD match 45 | "url": "https://mstdn.jp/@{placeholder}", # Target URL where {placeholder} would be modified by the alias 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /osrframework/wrappers/myspace.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Myspace(Platform): 28 | """A object for Myspace""" 29 | def __init__(self): 30 | self.platformName = "Myspace" 31 | self.tags = ["social"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "http://myspace.com/" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query. 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = ".+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = ["Page Not Found"] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | # Definition of regular expressions to be searched in searchfy mode 92 | #self.fieldsRegExp["searchfy"] = {} 93 | # Example of fields: 94 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 95 | 96 | ################ 97 | # Fields found # 98 | ################ 99 | # This attribute will be feeded when running the program. 100 | self.foundFields = {} 101 | -------------------------------------------------------------------------------- /osrframework/wrappers/netvibes.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Netvibes(Platform): 28 | """A object for Netvibes""" 29 | def __init__(self): 30 | self.platformName = "Netvibes" 31 | self.tags = ["tools"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "http://www.netvibes.com/" + "" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query. 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = ".+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = ["error-404"] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | # Definition of regular expressions to be searched in searchfy mode 92 | #self.fieldsRegExp["searchfy"] = {} 93 | # Example of fields: 94 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 95 | 96 | ################ 97 | # Fields found # 98 | ################ 99 | # This attribute will be feeded when running the program. 100 | self.foundFields = {} 101 | -------------------------------------------------------------------------------- /osrframework/wrappers/notabug.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | class Notabug(Platform): 27 | """A object for Notabug""" 28 | def __init__(self): 29 | self.platformName = "Notabug" 30 | self.tags = ["development"] 31 | 32 | ######################## 33 | # Defining valid modes # 34 | ######################## 35 | self.isValidMode = {} 36 | self.isValidMode["phonefy"] = False 37 | self.isValidMode["usufy"] = True 38 | self.isValidMode["searchfy"] = False 39 | 40 | ###################################### 41 | # Search URL for the different modes # 42 | ###################################### 43 | # Strings with the URL for each and every mode 44 | self.url = {} 45 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 46 | self.url["usufy"] = "https://notabug.org/" + "" 47 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 48 | 49 | ###################################### 50 | # Whether the user needs credentials # 51 | ###################################### 52 | self.needsCredentials = {} 53 | #self.needsCredentials["phonefy"] = False 54 | self.needsCredentials["usufy"] = False 55 | #self.needsCredentials["searchfy"] = False 56 | 57 | ################# 58 | # Valid queries # 59 | ################# 60 | # Strings that will imply that the query number is not appearing 61 | self.validQuery = {} 62 | # The regular expression '.+' will match any query 63 | #self.validQuery["phonefy"] = ".*" 64 | self.validQuery["usufy"] = ".+" 65 | #self.validQuery["searchfy"] = ".*" 66 | 67 | ################### 68 | # Not_found clues # 69 | ################### 70 | # Strings that will imply that the query number is not appearing 71 | self.notFoundText = {} 72 | #self.notFoundText["phonefy"] = [] 73 | self.notFoundText["usufy"] = ["404.png"] 74 | #self.notFoundText["searchfy"] = [] 75 | 76 | ######################### 77 | # Fields to be searched # 78 | ######################### 79 | self.fieldsRegExp = {} 80 | 81 | # Definition of regular expressions to be searched in phonefy mode 82 | #self.fieldsRegExp["phonefy"] = {} 83 | # Example of fields: 84 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 85 | 86 | # Definition of regular expressions to be searched in usufy mode 87 | self.fieldsRegExp["usufy"] = {} 88 | # Example of fields: 89 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 90 | # Definition of regular expressions to be searched in searchfy mode 91 | #self.fieldsRegExp["searchfy"] = {} 92 | # Example of fields: 93 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 94 | 95 | ################ 96 | # Fields found # 97 | ################ 98 | # This attribute will be feeded when running the program. 99 | self.foundFields = {} 100 | -------------------------------------------------------------------------------- /osrframework/wrappers/ok.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Ok(Platform): 28 | """A object for Ok.ru""" 29 | def __init__(self): 30 | self.platformName = "Ok" 31 | self.tags = ["social"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "http://ok.ru/" + "" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query. 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = ".+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = ["i/ok-404.png"] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | # Definition of regular expressions to be searched in searchfy mode 92 | #self.fieldsRegExp["searchfy"] = {} 93 | # Example of fields: 94 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 95 | 96 | ################ 97 | # Fields found # 98 | ################ 99 | # This attribute will be feeded when running the program. 100 | self.foundFields = {} 101 | -------------------------------------------------------------------------------- /osrframework/wrappers/okcupid.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "3.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class OkCupid(Platform): 28 | """ class""" 29 | def __init__(self): 30 | """Constructor with parameters 31 | 32 | This method permits the developer to instantiate dinamically Platform 33 | objects.""" 34 | self.platformName = "OkCupid" 35 | self.tags = ["contact"] 36 | self.modes = { 37 | "mailfy": { 38 | "debug": False, 39 | } 40 | } 41 | 42 | def check_mailfy(self, query, kwargs={}): 43 | """Verifying a mailfy query in this platform 44 | 45 | This might be redefined in any class inheriting from Platform. The only 46 | condition is that any of this should return a dictionary as defined. 47 | 48 | Args: 49 | query (str): The element to be searched. 50 | 51 | Returns: 52 | String. The collected data if exists or None if not. 53 | """ 54 | import requests 55 | 56 | s = requests.Session() 57 | 58 | # Getting the first response to grab the csrf_token 59 | r1 = s.get('https://www.okcupid.com') 60 | 61 | # Launching the query to Instagram 62 | r2 = s.post( 63 | 'https://www.okcupid.com/1/apitun/signup/check_email', 64 | json={"email": query}, 65 | ) 66 | 67 | if self.modes["mailfy"]["debug"]: 68 | print(f"Response: {[r2.text]}") 69 | 70 | if '"is_valid" : false' in r2.text: 71 | return r2.text 72 | return None 73 | -------------------------------------------------------------------------------- /osrframework/wrappers/papaly.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Papaly(Platform): 28 | """A object for Papaly.""" 29 | def __init__(self): 30 | self.platformName = "Papaly" 31 | self.tags = ["social"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "https://papaly.com/" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = ".+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = ["Page not found"] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | # Definition of regular expressions to be searched in searchfy mode 92 | #self.fieldsRegExp["searchfy"] = {} 93 | # Example of fields: 94 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 95 | 96 | ################ 97 | # Fields found # 98 | ################ 99 | # This attribute will be feeded when running the program. 100 | self.foundFields = {} 101 | -------------------------------------------------------------------------------- /osrframework/wrappers/patreon.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Patreon(Platform): 28 | """A object for Patreon""" 29 | def __init__(self): 30 | self.platformName = "Patreon" 31 | self.tags = ["video"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "https://www.patreon.com/" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = ".+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = ['"errorCode": 404,'] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | # Definition of regular expressions to be searched in searchfy mode 92 | #self.fieldsRegExp["searchfy"] = {} 93 | # Example of fields: 94 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 95 | 96 | ################ 97 | # Fields found # 98 | ################ 99 | # This attribute will be feeded when running the program. 100 | self.foundFields = {} 101 | -------------------------------------------------------------------------------- /osrframework/wrappers/pawoo.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Pawoo(Platform): 28 | """ class""" 29 | def __init__(self): 30 | """Constructor with parameters 31 | 32 | This method permits the developer to instantiate dinamically Platform 33 | objects.""" 34 | self.platformName = "Pawoo" 35 | self.tags = ["social", "mastodon"] 36 | self.modes = { 37 | "usufy": { 38 | "debug": False, 39 | "extra_fields": { 40 | "com.i3visio.Name": '([^<]+)', # Regular expresion to extract the alias 41 | }, 42 | "needs_credentials": False, 43 | "not_found_text": "Mastodon", # Text that indicates a missing profile 44 | "query_validator": "[a-z0-9A-Z_]+", # Regular expression that the alias SHOULD match 45 | "url": "https://pawoo.net/@{placeholder}", # Target URL where {placeholder} would be modified by the alias 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /osrframework/wrappers/pending/INFO.md: -------------------------------------------------------------------------------- 1 | Information about this folder 2 | ----------------------------- 3 | 4 | This folder contains old wrappers which are not being installed. These wrappers are stored pending of being fixed. 5 | -------------------------------------------------------------------------------- /osrframework/wrappers/pending/colourlovers.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "3.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Colourlovers(Platform): 28 | """ class""" 29 | def __init__(self): 30 | self.platformName = "Colourlovers" 31 | self.tags = ["art"] 32 | 33 | self.modes = { 34 | "usufy": { 35 | "debug": True, 36 | "extra_fields": { 37 | "com.i3visio.Location.Country": '[\n]? +(.+)\n', # Regular expresion to extract the alias 38 | "com.i3visio.Location.City": '([^<]+)', # Regular expresion to extract the alias 39 | }, 40 | "needs_credentials": False, 41 | "not_found_text": "

No one's home

", # Text that indicates a missing profile 42 | "query_validator": "[a-zA-Z0-9_]{3,15}", # Regular expression that the alias SHOULD match 43 | "url": "https://www.colourlovers.com/lover/{placeholder}", # Target URL where {placeholder} would be modified by the alias 44 | "test": { 45 | "valid": "james", 46 | "inavlid": "7ddf32e17a6ac5" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /osrframework/wrappers/pending/facebook.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Facebook(Platform): 28 | """A object for Facebook""" 29 | def __init__(self): 30 | self.platformName = "Facebook" 31 | self.tags = ["social", "contact"] 32 | 33 | # Base URL 34 | self.baseURL = "https://facebook.com/" 35 | 36 | self.modes = { 37 | "usufy": { 38 | "debug": False, 39 | "extra_fields": { 40 | "com.i3visio.FullName": '(.+) \| Facebook', # Regular expresion to extract the alias 41 | }, 42 | "needs_credentials": False, 43 | "not_found_text": "/help/?ref=404", # Text that indicates a missing profile 44 | "query_validator": "[a-zA-Z\.0-9_\-]+", # Regular expression that the alias SHOULD match 45 | "url": "https://www.facebook.com/{placeholder}", # Target URL where {placeholder} would be modified by the alias 46 | }, 47 | "searchfy": { 48 | "debug": False, 49 | "extra_fields": {}, 50 | "needs_credentials": False, 51 | "not_found_text": "We couldn't find anything for", 52 | "query_validator": ".+", 53 | "url": "https://www.facebook.com/public?query={placeholder}", 54 | # Needed function to extract aliases from the website 55 | "alias_regexp": '' 56 | }, 57 | # Reimplementation needed of check_mailfy 58 | "mailfy": {}, 59 | } 60 | -------------------------------------------------------------------------------- /osrframework/wrappers/pending/switter.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Switter(Platform): 28 | """ class""" 29 | def __init__(self): 30 | """Constructor with parameters 31 | 32 | This method permits the developer to instantiate dinamically Platform 33 | objects.""" 34 | self.platformName = "Switter" 35 | self.tags = ["social", "mastodon"] 36 | self.modes = { 37 | "usufy": { 38 | "debug": False, 39 | "extra_fields": { 40 | "com.i3visio.Name": "([^<]+)", # Regular expresion to extract the alias 41 | }, 42 | "needs_credentials": False, 43 | "not_found_text": ["Mastodon", "503 S"], # Text that indicates a missing profile 44 | "query_validator": "[a-z0-9A-Z_]+", # Regular expression that the alias SHOULD match 45 | "url": "https://switter.at/@{placeholder}", # Target URL where {placeholder} would be modified by the alias 46 | }, 47 | # Reimplementation needed of check_mailfy 48 | "mailfy": {}, 49 | } 50 | -------------------------------------------------------------------------------- /osrframework/wrappers/pending/taringa.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio <contacto@i3visio.com>" 21 | __version__ = "3.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Taringa(Platform): 28 | """<Platform> class""" 29 | def __init__(self): 30 | """Constructor with parameters 31 | 32 | This method permits the developer to instantiate dinamically Platform 33 | objects.""" 34 | self.platformName = "taringa" 35 | self.tags = ["social"] 36 | self.modes = { 37 | "usufy": { 38 | "debug": True, 39 | "extra_fields": { 40 | "com.i3visio.Name": '<h2>([^<]+)</h2>', 41 | "com.i3visio.Name": '"firstname":"([^"]+)"', 42 | "com.i3visio.Surname": '"lastname":"([^"]+)"', 43 | "com.i3visio.BirthDate": '"birthday":"([^"]+)"', 44 | "com.i3visio.Gender": '"gender":"([^"]+)"', 45 | "com.i3visio.Country": '"country":"([^"]+)"' 46 | }, 47 | "needs_credentials": False, 48 | "not_found_text": '"firstname":"Taringa!"', 49 | "query_validator": "[a-z0-9A-Z_]+", 50 | "url": "https://www.taringa.net/{placeholder}", 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /osrframework/wrappers/pending/youtube.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio <contacto@i3visio.com>" 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Youtube(Platform): 28 | """<Platform> class""" 29 | def __init__(self): 30 | """Constructor with parameters 31 | 32 | This method permits the developer to instantiate dinamically Platform 33 | objects.""" 34 | self.platformName = "Youtube" 35 | self.tags = ["social", "video"] 36 | self.modes = { 37 | "usufy": { 38 | "debug": False, 39 | "extra_fields": { 40 | "com.i3visio.Date.Create": '{"start": "<li class=\"about-stat joined-date\">", "end": "</li>"}', # Regular expresion to extract the alias 41 | }, 42 | "needs_credentials": False, 43 | "not_found_text": "<title>404 Not Found", # Text that indicates a missing profile 44 | "query_validator": "[^@, ]+", # Regular expression that the alias SHOULD match 45 | "url": "https://www.youtube.com/user/{placeholder}/about", # Target URL where {placeholder} would be modified by the alias 46 | }, 47 | "searchfy": { 48 | "debug": False, 49 | "extra_fields": {}, 50 | "needs_credentials": False, 51 | "not_found_text": "style-scope ytd-background-promo-renderer", 52 | "query_validator": ".+", 53 | "url": "https://www.youtube.com/results?filters=channel&lclk=channel&search_query={placeholder}&sp=EgIQAg%253D%253D", 54 | # Needed function to extract aliases from the website 55 | "alias_regexp": 'url":"/user/([^"]+)","webPageType":"WEB_PAGE_TYPE_BROWSE' 56 | }, 57 | # Reimplementation needed of check_mailfy 58 | "mailfy": {}, 59 | } 60 | -------------------------------------------------------------------------------- /osrframework/wrappers/smugmug.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Smugmug(Platform): 28 | """A object for Smugmug""" 29 | def __init__(self): 30 | self.platformName = "Smugmug" 31 | self.tags = ["imagery"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "http://" + "" + ".smugmug.com/" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = "[^\.]+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = ["Page Not Found"] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | # Definition of regular expressions to be searched in searchfy mode 92 | #self.fieldsRegExp["searchfy"] = {} 93 | # Example of fields: 94 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 95 | 96 | ################ 97 | # Fields found # 98 | ################ 99 | # This attribute will be feeded when running the program. 100 | self.foundFields = {} 101 | -------------------------------------------------------------------------------- /osrframework/wrappers/trakt.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Trakt(Platform): 28 | """A object for Trakt""" 29 | def __init__(self): 30 | self.platformName = "Trakt" 31 | self.tags = ["video"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "https://trakt.tv/people/" + "" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = ".+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = ["

404

"] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | # Definition of regular expressions to be searched in searchfy mode 92 | #self.fieldsRegExp["searchfy"] = {} 93 | # Example of fields: 94 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 95 | 96 | ################ 97 | # Fields found # 98 | ################ 99 | # This attribute will be feeded when running the program. 100 | self.foundFields = {} 101 | -------------------------------------------------------------------------------- /osrframework/wrappers/vk.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Vk(Platform): 28 | """A object for Vk""" 29 | def __init__(self): 30 | self.platformName = "Vk" 31 | self.tags = ["social"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "https://vk.com/" + "" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query. 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = ".+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = ["404 Not Found"] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | # Definition of regular expressions to be searched in searchfy mode 92 | #self.fieldsRegExp["searchfy"] = {} 93 | # Example of fields: 94 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 95 | 96 | ################ 97 | # Fields found # 98 | ################ 99 | # This attribute will be feeded when running the program. 100 | self.foundFields = {} 101 | -------------------------------------------------------------------------------- /osrframework/wrappers/webtv.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015-2020 Félix Brezo and Yaiza Rubio 4 | # 5 | # This program is part of OSRFramework. You can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | ################################################################################ 19 | 20 | __author__ = "Felix Brezo, Yaiza Rubio " 21 | __version__ = "2.0" 22 | 23 | 24 | from osrframework.utils.platforms import Platform 25 | 26 | 27 | class Webtv(Platform): 28 | """A object for Webtv""" 29 | def __init__(self): 30 | self.platformName = "Webtv" 31 | self.tags = ["video"] 32 | 33 | ######################## 34 | # Defining valid modes # 35 | ######################## 36 | self.isValidMode = {} 37 | self.isValidMode["phonefy"] = False 38 | self.isValidMode["usufy"] = True 39 | self.isValidMode["searchfy"] = False 40 | 41 | ###################################### 42 | # Search URL for the different modes # 43 | ###################################### 44 | # Strings with the URL for each and every mode 45 | self.url = {} 46 | #self.url["phonefy"] = "http://anyurl.com//phone/" + "" 47 | self.url["usufy"] = "http://web.tv/user/" + "" 48 | #self.url["searchfy"] = "http://anyurl.com/search/" + "" 49 | 50 | ###################################### 51 | # Whether the user needs credentials # 52 | ###################################### 53 | self.needsCredentials = {} 54 | #self.needsCredentials["phonefy"] = False 55 | self.needsCredentials["usufy"] = False 56 | #self.needsCredentials["searchfy"] = False 57 | 58 | ################# 59 | # Valid queries # 60 | ################# 61 | # Strings that will imply that the query number is not appearing 62 | self.validQuery = {} 63 | # The regular expression '.+' will match any query. 64 | #self.validQuery["phonefy"] = ".*" 65 | self.validQuery["usufy"] = ".+" 66 | #self.validQuery["searchfy"] = ".*" 67 | 68 | ################### 69 | # Not_found clues # 70 | ################### 71 | # Strings that will imply that the query number is not appearing 72 | self.notFoundText = {} 73 | #self.notFoundText["phonefy"] = [] 74 | self.notFoundText["usufy"] = ['- web.tv'] 75 | #self.notFoundText["searchfy"] = [] 76 | 77 | ######################### 78 | # Fields to be searched # 79 | ######################### 80 | self.fieldsRegExp = {} 81 | 82 | # Definition of regular expressions to be searched in phonefy mode 83 | #self.fieldsRegExp["phonefy"] = {} 84 | # Example of fields: 85 | #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" 86 | 87 | # Definition of regular expressions to be searched in usufy mode 88 | self.fieldsRegExp["usufy"] = {} 89 | # Example of fields: 90 | #self.fieldsRegExp["usufy"]["i3visio.location"] = "" 91 | # Definition of regular expressions to be searched in searchfy mode 92 | #self.fieldsRegExp["searchfy"] = {} 93 | # Example of fields: 94 | #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" 95 | 96 | ################ 97 | # Fields found # 98 | ################ 99 | # This attribute will be feeded when running the program. 100 | self.foundFields = {} 101 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | setuptools 2 | bs4 3 | requests 4 | python-emailahoy3 5 | pyexcel==0.2.1 6 | pyexcel_ods==0.1.1 7 | pyexcel_xls==0.1.0 8 | pyexcel_xlsx==0.1.0 9 | pyexcel_io==0.1.0 10 | pyexcel_text==0.2.0 11 | tweepy 12 | networkx 13 | decorator 14 | validate_email 15 | tabulate 16 | oauthlib>=1.0.0 17 | python-whois 18 | pyyaml 19 | colorama 20 | configparser 21 | cfscrape 22 | duckpy 23 | --------------------------------------------------------------------------------