diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..46e853a --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,15 @@ +About the authors +================== + +Lead developers +--------------- + +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. + +Contributors +------------ + +* Eva Suárez ([@EvaSuarez22](https://twitter.com/EvaSuarez22)) +* Lucas Sánchez +* Fran J. Gómez ([@ffranz](https://twitter.com/ffranz)) +* Abilio Almeida ([@aabilio](https://github.com/aabilio)) diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..b5cf62a --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,8 @@ +recursive-include config *cfg +recursive-include config/plugins *sample +recursive-include osrframework/transforms/lib/osrframework-maltego-settings * +recursive-include osrframework/transforms/lib *txt +recursive-include osrframework/static * +recursive-include osrframework/templates * +include *md +recursive-include doc *md diff --git a/PKG-INFO b/PKG-INFO new file mode 100644 index 0000000..ce0c578 --- /dev/null +++ b/PKG-INFO @@ -0,0 +1,130 @@ +Metadata-Version: 1.1 +Name: osrframework +Version: 0.17.2 +Summary: OSRFramework - A set of GPLv3+ OSINT tools developed by i3visio analysts for online research. +Home-page: http://github.com/i3visio/osrframework +Author: Felix Brezo and Yaiza Rubio +Author-email: contacto@i3visio.com +License: COPYING +Description: OSRFramework + ============ + + OSRFramework: Open Sources Research Framework + + Copyright (C) 2014-2017 F. Brezo and Y. Rubio, i3visio + + [![Version in PyPI](https://img.shields.io/pypi/v/osrframework.svg)]() + [![License](https://img.shields.io/badge/license-GNU%20General%20Public%20License%20Version%203%20or%20Later-blue.svg)]() + + 1 - Description + --------------- + + OSRFramework is a GNU AGPLv3+ set of libraries developed by i3visio to perform + Open Source Intelligence tasks. They include references to a bunch of different + applications related to username checking, DNS lookups, information leaks + research, deep web search, regular expressions extraction and many others. + At the same time, by means of ad-hoc Maltego transforms, OSRFramework provides + a way of making these queries graphically as well as several interfaces to + interact with like OSRFConsole or a Web interface. + + 2 - License: GNU AGPLv3+ + ------------------------ + + This is free software, and you are welcome to redistribute it under certain + conditions. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + + + For more details on this issue, check the [COPYING](COPYING) file. + + 3 - Installation + ---------------- + + Fast way to do it on any system for a user with administration privileges: + ``` + pip install osrframework + ``` + You can upgrade to the latest release of the framework with: + ``` + pip install osrframework --upgrade + ``` + This will manage all the dependencies for you and install the latest version of + the framework. + + If you needed further information on how to install OSRFramework on certain + systems, note that you may need to add `export PATH=$PATH:$HOME/.local/bin` to + your `~/.bashrc_profile`). This has been confirmed in some distributions, + including MacOS. In any case, we recommend you yo have a look at the + [INSTALL.md](doc/INSTALL.md) file where we provide additional details for these + cases. + + 4 - Basic usage + --------------- + + If everything went correctly (we hope so!), it's time for trying usufy.py, + mailfy.py and so on. But we are they? They are installed in your path meaning + that you can open a terminal anywhere and typing the name of the program (seems + to be an improvement from previous installations...). Examples: + ``` + usufy.py -n i3visio febrezo yrubiosec -p twitter facebook + searchfy.py -q "i3visio" + mailfy.py -n i3visio + osrfconsole.py + ``` + + Type -h or --help to get more information about which are the parameters of each + application. + + You can find the configuration files in a folder created in your user home to + define the default behaviour of the applications: + ``` + # Configuration files for Linux and MacOS + ~/.config/OSRFramework/ + # Configuration files for Windows + C:\Users\\OSRFramework\ + ``` + + OSRFramework will look for the configuration settings stored there. You can add + new credentials there and if something goes wrong, you can always restore the + files stored in the `defaults` subfolder. + + 5 - HACKING + ----------- + + If you want to extend the functionalities of OSRFramework and you do not know + where to start from, check the [HACKING.md](doc/HACKING.md) file. + + 6 - AUTHORS + ----------- + + More details about the authors in the [AUTHORS.md](AUTHORS.md) file. + +Keywords: python osint harvesting profiling maltego username socialmedia forums +Platform: UNKNOWN +Classifier: Development Status :: 4 - Beta +Classifier: Topic :: Software Development :: Libraries +Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) +Classifier: Programming Language :: Python :: 2 :: Only +Classifier: Programming Language :: Python :: 2.7 +Classifier: Intended Audience :: Developers +Classifier: Intended Audience :: Information Technology +Classifier: Intended Audience :: Science/Research +Classifier: Intended Audience :: Telecommunications Industry +Classifier: Natural Language :: English +Classifier: Topic :: Communications +Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search +Classifier: Topic :: Scientific/Engineering :: Information Analysis +Classifier: Topic :: Scientific/Engineering :: Visualization +Classifier: Topic :: Text Processing :: Markup :: HTML diff --git a/README.md b/README.md new file mode 100644 index 0000000..fd4e1a8 --- /dev/null +++ b/README.md @@ -0,0 +1,104 @@ +OSRFramework +============ + +OSRFramework: Open Sources Research Framework + +Copyright (C) 2014-2017 F. Brezo and Y. Rubio, i3visio + +[![Version in PyPI](https://img.shields.io/pypi/v/osrframework.svg)]() +[![License](https://img.shields.io/badge/license-GNU%20General%20Public%20License%20Version%203%20or%20Later-blue.svg)]() + +1 - Description +--------------- + +OSRFramework is a GNU AGPLv3+ set of libraries developed by i3visio to perform +Open Source Intelligence tasks. They include references to a bunch of different +applications related to username checking, DNS lookups, information leaks +research, deep web search, regular expressions extraction and many others. +At the same time, by means of ad-hoc Maltego transforms, OSRFramework provides +a way of making these queries graphically as well as several interfaces to +interact with like OSRFConsole or a Web interface. + +2 - License: GNU AGPLv3+ +------------------------ + +This is free software, and you are welcome to redistribute it under certain +conditions. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + + +For more details on this issue, check the [COPYING](COPYING) file. + +3 - Installation +---------------- + +Fast way to do it on any system for a user with administration privileges: +``` +pip install osrframework +``` +You can upgrade to the latest release of the framework with: +``` +pip install osrframework --upgrade +``` +This will manage all the dependencies for you and install the latest version of +the framework. + +If you needed further information on how to install OSRFramework on certain +systems, note that you may need to add `export PATH=$PATH:$HOME/.local/bin` to +your `~/.bashrc_profile`). This has been confirmed in some distributions, +including MacOS. In any case, we recommend you yo have a look at the +[INSTALL.md](doc/INSTALL.md) file where we provide additional details for these +cases. + +4 - Basic usage +--------------- + +If everything went correctly (we hope so!), it's time for trying usufy.py, +mailfy.py and so on. But we are they? They are installed in your path meaning +that you can open a terminal anywhere and typing the name of the program (seems +to be an improvement from previous installations...). Examples: +``` +usufy.py -n i3visio febrezo yrubiosec -p twitter facebook +searchfy.py -q "i3visio" +mailfy.py -n i3visio +osrfconsole.py +``` + +Type -h or --help to get more information about which are the parameters of each +application. + +You can find the configuration files in a folder created in your user home to +define the default behaviour of the applications: +``` +# Configuration files for Linux and MacOS +~/.config/OSRFramework/ +# Configuration files for Windows +C:\Users\\OSRFramework\ +``` + +OSRFramework will look for the configuration settings stored there. You can add +new credentials there and if something goes wrong, you can always restore the +files stored in the `defaults` subfolder. + +5 - HACKING +----------- + +If you want to extend the functionalities of OSRFramework and you do not know +where to start from, check the [HACKING.md](doc/HACKING.md) file. + +6 - AUTHORS +----------- + +More details about the authors in the [AUTHORS.md](AUTHORS.md) file. diff --git a/config/accounts.cfg b/config/accounts.cfg new file mode 100644 index 0000000..70800a3 --- /dev/null +++ b/config/accounts.cfg @@ -0,0 +1,62 @@ +################################################################################ +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################ + + +# ============================================================================== +# The sections in this file should match with the parameter used to work with +# this platform in the different tools of the framework. +# ------------------------------------------------------------------------------ + +[eqe] +login = +password = + +[flixster] +login = +password = + +[hi5] +login = +password = + +[pokerstrategy] +login = +password = + +[rapid] +login = +password = + +[researchgate] +login = +password = + +[spotify] +login = +password = + +[tripit] +login = +password = + +[thehoodup] +login = +password = + +# ============================================================================== diff --git a/config/api_keys.cfg b/config/api_keys.cfg new file mode 100644 index 0000000..668f1a6 --- /dev/null +++ b/config/api_keys.cfg @@ -0,0 +1,47 @@ +################################################################################ +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################ + +# NOTE: Lines starting with a '#' are comments provided to assist the user. + +# ============================================================================== +# The sections in this file should match with the parameter used to work with +# this platform in the different tools of the framework. +# ------------------------------------------------------------------------------ + +[twitter] +# You can get these details in: +consumer_key = +consumer_secret = +access_key = +access_secret = + +# ============================================================================== + + +# ============================================================================== +# The following API keys may be used by other applications in the framework. +# ------------------------------------------------------------------------------ + +[md5crack_com] +api_key = + +[pipl_com] +api_key = + +# ============================================================================== diff --git a/config/browser.cfg b/config/browser.cfg new file mode 100644 index 0000000..6f1da38 --- /dev/null +++ b/config/browser.cfg @@ -0,0 +1,76 @@ +################################################################################ +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################ + +# NOTE: Lines starting with a '#' are comments provided to assist the user. + +# ============================================================================== +# In this section we will define the browser configuration. +# ------------------------------------------------------------------------------ + +[Browser] + +# The User Agent to be used. More can be found at: +# +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 +# Seconds considered to timeout a session. Increase this value to something +# high like 2000 to debug petitions using proxies such as OWASP ZAP. +timeout = 20000 + +# ============================================================================== + + +# ============================================================================== +# In this section we will define the proxy settings. This part is optional. +# ------------------------------------------------------------------------------ + +# This is the protocol of the proxy: 'ProxyHTTP' is parsed to 'http'. +[ProxyHTTP] + +# The hostname. It can be an IP Address '127.0.0.1' or a domain 'example.com'. +host = +# The port of the proxy. +port = +# The credentials to be used if needed. This part is optional. +username = +password = + +# A full example is below to contact to a running instance of OWASP ZAP: +#host = localhost +#port = 8080 +#username = user +#password = 1234 + +# This is the protocol of the proxy: 'ProxyHTTPS' is parsed to 'https'. +[ProxyHTTPS] + +# The hostname. It can be an IP Address '127.0.0.1' or a domain 'example.com'. +host = +# The port of the proxy. +port = +# The credentials to be used if needed. This part is optional. +username = +password = + +# A full example is below to contact to a running instance of OWASP ZAP: +#host = localhost +#port = 8080 +#username = user +#password = 1234 + +# ============================================================================== diff --git a/config/general.cfg b/config/general.cfg new file mode 100644 index 0000000..e955215 --- /dev/null +++ b/config/general.cfg @@ -0,0 +1,184 @@ +################################################################################ +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################ + +# NOTES: +# - Lines starting with a '#' are comments provided to assist the user. +# - If something goes wrong and you cannot fix it, delete this file to let the +# system restore a valid version. + + +# ============================================================================== +# In this section we will define the default OSRFramework server configuration. +# ------------------------------------------------------------------------------ + +[osrframework-server] + +# Host of the server. It can be localhost or things like 0.0.0.0 (which would +# make it accesible from everywhere): +host = localhost +#host = 0.0.0.0 +# The port to be used: +port = 30230 +# Whether to use it in debug mode. False is 0 and True is 1. +debug = 0 +# This string should be something random to control who can configure the +# searches. If this string is intercepted, anyone would be able to configure +# OSRFramework using a specially crafted URL to do what they want, not what +# the admin wanted. If None is provided, advanced searches will be blocked. +secret_token = +#secret_token = thisstringshould_besomething-random-NotJoking-so-ChangeMe +upload_folder = /tmp/ + +# ============================================================================== + + +# ============================================================================== +# In this section we will define the default domainfy configuration. +# ------------------------------------------------------------------------------ + +[domainfy] + +# Tlds to be checked by default. It can include several tld: +tlds = global +#tlds = global generic cc brand geographic +# Folder where the output files will be created (without the file name): +output_folder = ./ +# Name of the output file to be used (without the extension): +file_header = profiles +# Extensions to be created. It can include several extensions: +extension = csv +#extension = csv xls xlsx +# Number of threads to be used. It should be an integer: +threads = 32 +# Domains to be manually added +user_defined = +#user_defined = .i3visio.com +# Domains to be manually excluded +exclude_domains = +#exclude_domains = .com .net .org + +# ============================================================================== + +# ============================================================================== +# In this section we will define the default entify configuration. +# ------------------------------------------------------------------------------ + +[entify] + +# Folder where the output files will be created (without the file name): +output_folder = ./ +# Name of the output file to be used (without the extension): +file_header = profiles +# Extensions to be created. It can include several extensions: +extension = csv +#extension = csv xls xlsx + +# ============================================================================== + +# ============================================================================== +# In this section we will define the default mailfy configuration. +# ------------------------------------------------------------------------------ + +[mailfy] + +# Domains to be checked by default. It can include several extensions: +domains = all +#domains = gmail.com prontonmail.com +# Folder where the output files will be created (without the file name): +output_folder = ./ +# Name of the output file to be used (without the extension): +file_header = profiles +# Extensions to be created. It can include several extensions: +extension = csv +#extension = csv xls xlsx +# Number of threads to be used. It should be an integer: +threads = 32 +# Domains to be manually excluded +exclude_domains = +#exclude_domains = gmail.com hotmail.com + +# ============================================================================== + +# ============================================================================== +# In this section we will define the default phonefy configuration. +# ------------------------------------------------------------------------------ + +[phonefy] + +# Platforms to be checked by default. It can include several extensions: +platforms = all +#platforms = listaspam +# Folder where the output files will be created (without the file name): +output_folder = ./ +# Name of the output file to be used (without the extension): +file_header = profiles +# Extensions to be created. It can include several extensions: +extension = csv +#extension = csv xls xlsx +# Platforms to be manually excluded +exclude_platforms = +#exclude_platforms = twitter skype + +# ============================================================================== + +# ============================================================================== +# In this section we will define the default searchfy configuration. +# ------------------------------------------------------------------------------ + +[searchfy] + +# Platforms to be checked by default. It can include several extensions: +platforms = all +#platforms = twitter facebook github +# Folder where the output files will be created (without the file name): +output_folder = ./ +# Name of the output file to be used (without the extension): +file_header = profiles +# Extensions to be created. It can include several extensions: +extension = csv +#extension = csv xls xlsx +# Platforms to be manually excluded +exclude_platforms = +#exclude_platforms = twitter skype + +# ============================================================================== + +# ============================================================================== +# In this section we will define the default usufy configuration. +# ------------------------------------------------------------------------------ + +[usufy] + +# Platforms to be checked by default. It can include several extensions: +platforms = all +#platforms = twitter facebook instagram github youtube +# Folder where the output files will be created (without the file name): +output_folder = ./ +# Name of the output file to be used (without the extension): +file_header = profiles +# Extensions to be created. It can include several extensions: +extension = csv +#extension = csv xls xlsx +# Number of threads to be used. It should be an integer: +threads = 16 +# Platforms to be manually excluded +exclude_platforms = +#exclude_platforms = twitter skype + +# ============================================================================== diff --git a/config/plugins/pattern.py.sample b/config/plugins/pattern.py.sample new file mode 100644 index 0000000..0eae874 --- /dev/null +++ b/config/plugins/pattern.py.sample @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + + +from osrframework.utils.regexp import RegexpObject + +class DemoPattern(RegexpObject): + ''' + class. + ''' + def __init__(self): + ''' + Constructor without parameters. + Most of the times, this will be the ONLY method needed to be overwritten. + + :param name: string containing the name of the regular expression. + :param reg_exp: string containing the regular expresion. + ''' + # This is the tag of the regexp + self.name = "i3visio.demo" + # This is the string containing the reg_exp to be seeked + self.reg_exp = ["[^a-zA-Z1-9]" + "[0-9]{4}-?[A-Z]{3}" +"[^a-zA-Z1-9]"] + + def isValidExp(self, exp): + ''' + Method to verify if a given expression is correct just in case the used regular expression needs additional processing to verify this fact. + This method will be overwritten when necessary. + + :param exp: Expression to verify. + + :return: True | False + ''' + return True + + diff --git a/config/plugins/wrapper.py.sample b/config/plugins/wrapper.py.sample new file mode 100644 index 0000000..9ebcf03 --- /dev/null +++ b/config/plugins/wrapper.py.sample @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Demo(Platform): + """ + A object for Demo. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Demo" + self.tags = ["demo"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://demo.demo/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["THIS IS THE ERROR MESSAGE"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/doc/ADVANCED_CONFIGURATION.md b/doc/ADVANCED_CONFIGURATION.md new file mode 100644 index 0000000..24672cc --- /dev/null +++ b/doc/ADVANCED_CONFIGURATION.md @@ -0,0 +1,4 @@ +Configuring OSRFramework +======================== + +TODO. diff --git a/doc/ALIAS_GENERATOR.md b/doc/ALIAS_GENERATOR.md new file mode 100644 index 0000000..9d68ef0 --- /dev/null +++ b/doc/ALIAS_GENERATOR.md @@ -0,0 +1,4 @@ +Using the Alias Generator Tool +============================== + +TODO. diff --git a/doc/API.md b/doc/API.md new file mode 100644 index 0000000..db81b91 --- /dev/null +++ b/doc/API.md @@ -0,0 +1,4 @@ +USing the API +============= + +TODO. diff --git a/doc/CHANGES.md b/doc/CHANGES.md new file mode 100644 index 0000000..77aec1c --- /dev/null +++ b/doc/CHANGES.md @@ -0,0 +1,761 @@ +OSRFramework Changelog +====================== + +For more information, check the README.Add some wrappers + +0.17.2, 2017/08/21 -- Fixes with some usernames in Kiwi and Smugmug. +- Fix issue #288: Remove the `.` as a valid character for usernames in Smugmug +- Fix issue #287: Remove the `.` as a valid character for usernames in Kiwi +- Move to pending Oroom and Backyardchickens + +0.17.1, 2017/08/20 -- Some fixes and new wrappers. +- Add feature #283: Add Kiwi usufy wrapper +- Add feature #284: Add Sarahah usufy wrapper +- Fix issue #286: Remove intersect.es wrapper as the platform has been changed +- Fix issue #282: Fix openstreetmap usufy wrapper when using usernames containing a dot +- Fix issue #280: Fix serieadictos usufy wrapper +- Fix issue #279: Fix bebee usufy wrapper +- Fix some issues in osrframework_server and the configuration file + +0.17.0, 2017/07/25 -- Prepare the Blackhat Arsenal release +- Add feature #267: Add a leaked email search using HaveIBeenPwned. +- Add feature #168: Add Get as a new platform +- Add feature: Add Seatwish usufy wrapper +- Add feature: Add Xtube usufy wrapper +- Add feature: Add coloured output in usufy, mailfy, searchfy, phonefy, entify, osrfconsole and domainfy +- Add feature: Add colorama utils to general +- Fix issue #278: Remove bladna.nl usufy wrapper +- Fix issue #276: Fix trip.com usufy wrapper +- Fix issue #275: Remove Travian forum usufy wrapper +- Fix issue #274: Remove Carder usufy wrapper +- Update the print functions +- Fix some issues regarding to the display of the license +- Patch issue #277: Fix creativemarket usufy wrapper +- General update of the way in which functions in `osrframework.utils.general` are documented as well as removal of unneeded functions. +- Remove a hack in the export function to set the encoding that implied setting the default encoding using `sys.setdefaultencoding()` and resetting it back after the export. + +0.16.8, 2017/06/22 -- Important update on the setup.py to verify whether the .local/bin folder is in the path. +- Fix issue #187: Review installation with --user in Linux systems where ~/.local/bin is NOT in the PATH +- Fix issue: Several wrappers have been moved to pending: cardingbins, retailmenot, seatfish and xtube + +0.16.7, 2017/06/15 -- Several fixes on certain platforms. +- Temporally removed some wrappers: apsense, flavors, paypal, pinterest, sokule and wordpress +- Fix issue #265: False positives in domainfy +- Fix Dockerfile by removing an unnecessary `sudo`. + +0.16.6, 2017/05/28 -- Several fixes domainfy.py options. +- Add feature #255: Add Metasploit forums as a new usufy wrapper +- Add feature #254: Add Steemit.com as a new usufy platform +- Add feature #253: Add cryptofresh as a new usufy platform +- Fix issue #262: Twitpic now only redirects to Twitter! Thanks for these years, guys! +- Fix issue #261: Paypal.me usufy wrapper is throwing false positives +- Fix issue #260: Ello.co has changed its error message +- Fix issue #259: Gogobot has been moved to trip.com +- Fix issue #258: Launching usufy.py -n whatever -t all crashes the app +- Fix issue #256: Wrong command shown when stopping domainfy +- Fix issue: Rename rapid forum to rapid_i as the platform is rapid-i.com +- Fix issue: -u option in domainfy.py was not working appropiately +- Fix issue: Appropiately showing the list of pending domains in domainfy + +0.16.5, 2017/04/30 -- Fix mailfy.py by adding a timeout to the verifications. +- Fix issue #251: Mailfy seems to be crashing persistently +- Minor refactoring of the mailfy.py documentation and comments + +0.16.4, 2017/04/25 -- Fix some OSRFramework false positives and add Taringa, TheVerge and Openstreetmap. +- Add feature #246: Add theverge.com as a new usufy platform +- Add feature #238: Add Taringa as a new usufy wrapper +- Add feature #236: Add Openstreetmap as a new usufy wrapper +- Fix issue #250: Pinterest wrapper is throwing sometimes false positives +- Fix issue #249: Ixgames usufy wrapper is throwing false positives +- Fix issue #248: Echatta usufy wrapper is throwing false positives +- Fix issue: Break.com was throwing false positives +- Fix issue: Cartodb was throwing false positives +- Fix issue: Creativemarket was throwing false positives +- Rearrange some tags in certain platforms + +0.16.3, 2017/04/13 -- Fix OSRFramework false positives. +- Fix issue #245: Fix BookOfMatches usufy wrapper +- Fix issue #244: Fix Pinterest usufy wrapper +- Fix issue #243: Domainfy.py is throwing some false positives +- Move Stuff platform to pending. It seems that it now permits comments using Facebook Connect + +0.16.2, 2017/03/25 -- Fix OSRFramework false positives. +- Fix issue #240: Fix Dreamstime.me usufy wrapper that is throwing false positives +- Fix issue #239: Fix Paypal.me usufy wrapper that is throwing false positives + +0.16.1, 2017/03/12 -- Fix OSRFramework Server installation. +- Fix issue: Templates and static files were not appropiately dealt by setup.py + +0.16.0, 2017/03/10 -- New major release after participation in the Mobile World Congress Event. +- Add feature #228: Add Mozilla as a new usufy platform +- Add feature #226: Provide a docker file to let users install easily using Docker +- Add feature #223: Providing an API to permit interaction by third party apps +- Add feature #201: Add Mozilla as a new usufy platform +- Add feature #196: Add Goblinrefuge as a new usufy platform +- Add feature #195: Add NotABug as a new usufy platform +- Add feature #193: Add Crowdin as a new usufy platform +- Add feature #143: Consider adding beBee to supported platforms +- Add feature: Add new wrappers as cardingbins.py and unioncarder.py +- Add feature: Provide a domainfy.py Maltego transform +- Add feature: Provide an API to be used by other applications +- Add feature: Provide a GUI to make it easier to launch the commands for newcomers +- Add feature: Add metadata extraction for all usufy wrappers starting with 'a' +- Add feature: Add metadata extraction for all usufy wrappers starting with 'b' +- Add feature: Add Affilorama as a new usufy platform +- Add feature: Add Abou as a new usufy platform +- Add feature: Add Canva as a new usufy platform +- Add feature: Add Cash as a new usufy platform +- Add feature: Add Codecademy as a new usufy platform +- Add feature: Add Coderwall as a new usufy platform +- Add feature: Add Flavors as a new usufy platform +- Add feature: Add iFunny as a new usufy platform +- Add feature: Add Moneymaker as a new usufy platform +- Add feature: Add Okcupid as a new usufy platform +- Add feature: Add Reddit as a new usufy platform +- Add feature: Add Reddit as a new usufy platform +- Add feature: Add V7n as a new usufy platform +- Add feature: Add Viddler as a new usufy platform +- Add feature: Add Wikia as a new usufy platform +- Add feature: Add Bandcamp as a new usufy platform +- Add feature: Add Codementor as a new usufy platform +- Add feature: Add Colourlovers as a new usufy platform +- Add feature: Add Contently as a new usufy platform +- Add feature: Add Creativemarket as a new usufy platform +- Add feature: Add Crokes as a new usufy platform +- Add feature: Add Eightbitme as a new usufy platform +- Add feature: Add Ello as a new usufy platform +- Add feature: Add EyEem as a new usufy platform +- Add feature: Add F6s as a new usufy platform +- Add feature: Add Fiverr as a new usufy platform +- Add feature: Add Fotolog as a new usufy platform +- Add feature: Add Houzz as a new usufy platform +- Add feature: Add Mig as a new usufy platform +- Add feature: Add Miiverse as a new usufy platform +- Add feature: Add Openbugbounty as a new usufy platform +- Add feature: Add Papaly as a new usufy platform +- Add feature: Add Patreon as a new usufy platform +- Add feature: Add Paypal as a new usufy platform +- Add feature: Add Phishtank as a new usufy platform +- Add feature: Add Reverbnation as a new usufy platform +- Add feature: Add Seatwish as a new usufy platform +- Add feature: Add Soup as a new usufy platform +- Add feature: Add Technorati as a new usufy platform +- Add feature: Add Trakt as a new usufy platform +- Add feature: Add Venmo as a new usufy platform +- Add feature: Add Witty as a new usufy platform +- Add feature: Add Younow as a new usufy platform +- Add feature: Add Dzone as a new usufy platform +- Add feature: Add Dreamstime as a new usufy platform +- Add feature: Add Myfitnesspal as a new usufy platform +- Add feature: Add Datpiff as a new usufy platform +- Add new subdomains to domainfy in the category other +- Fix issue #224: Deal with arrays in an entity's value to create two entities of the same type + + +0.15.0, 2017/02/16 -- New major release. Add new wrappers to usufy, mailfy and domainfy. Fix important bugs. +- Add feature #206: Appropiately capturing Ctrl + C Exceptions to stop the execution feature +- Add feature #190: Add a new error message to angel.co +- Add feature #189: Add protonmail.ch as a new mailfy wrapper +- Add feature #186: Add translate.hola.org as a new usufy wrapper +- Add feature #185: Add meteor.com as a new platform +- Add feature #174: Add emoneyspace as a new platform +- Add feature #161: Making osrfconsole use config values in /general.cfg +- Add feature #77: Add Blogmarks as a new platform +- Add feature #76: Add Smugmug as a new platform +- Add feature #75: Add Typepad as a new platform +- Add feature #17: Addition of Gravatar +- Add feature: Add exclude option via the command line to usufy, mailfy, domainfy, searchfy and phonefy +- Add feature: Add exclude option via the configuration file to usufy, mailfy, domainfy, searchfy and phonefy +- Add feature: Add other common subdomains to domainfy under the domains/other_subdomains.py +- Add feature: Add Buddypic wrapper +- Add feature: Add Carder wrapper +- Add feature: Add Csu wrapper +- Add feature: Add Realcarders wrapper +- Add feature: Add SingleTrackWorld wrapper +- Add feature: Add TranslateHola wrapper +- Add feature: Add Warrior wrapper +- Add feature: Add me.com, icloud.com and seznam.cz to mailfy +- Add feature: Add second level TLDs to domainfy for CCTLD *.nz, *.pe, *.py and *.uk +- Add feature: Custom errors for OSRFramework +- Add feature: Some new structures for the usufy fuzzer +- Add feature: Let users configure the connections to an HTTP and an HTTPS proxy +- Add feature: Let users see the list of tags that they can use to select the platforms. +- Fix issue #219: 0.15.0rc9 raises an exception if it has upgraded +- Fix issue #212: Badoo throws false positives +- Fix issue #210: Gsmspain throws false positives +- Fix issue #208: Web.tv throws false positives +- Fix issue #205: Return in each main file a Json with the results instead of nothing +- Fix issue #204: Fix error messages shown in domainfy.py +- Fix issue #200: Deactivate Youku usufy wrapper +- Fix issue #199: Deactivate Gytorrents usufy wrapper +- Fix issue #198: Change Web.tv error message +- Fix issue #197: Change Metacafe error message +- Fix issue #188: Capture exceptions when errors are found in the configuration files bug deployment +- Fix issue #182: Cannot install in virtualenv +- Fix issue #169: searchfy.py --maltego doesn't disable banner +- Fix issue #121 by urlencoding each and every parameter provided to usufy, searchfy and phonefy. Indirectly fixes issue #91 +- Fix issue: Overwrite previous browser.cfg and general.cfg files +- Fix issue: Reactivate tag search in usufy +- Fix issue: Remove autoopen Skype client if it is not already opened +- Fix issue: Update user-agent to a more modern one +- Fix issue: Remove Nubelo wrapper +- Fix issue: Remove libero.it from mailfy as it is no longer working +- Fix issue: Deactivate false positives in mailfy for aaathats3as.com, cocaine.ninja, cock.lu, cock.email, firemail.cc, getbackinthe.kitchen, hitler.rocks, memeware.net and waifu.club from cock.li server as well as other false positives in mailfy for noob.com and wp.pl +- Fix issue: Remove default proxies for HTTP and HTTPS +- Patch issue #220: Hellboundhackers takes too much time to be processed (moved to pending) +- Patch issue #218: CSU throws false positives (moved to pending) +- Patch issue #217: Plancast takes too much time to be processed (moved to pending) +- Patch issue #216: Aporrealos takes too much time to be processed (moved to pending) +- Patch issue #215: Artbreak takes too much time to be processed (moved to pending) +- Patch issue #214: Gitorious takes too much time to be processed (moved to pending) +- Patch issue #213: Fanbitcoin takes too much time to be processed (moved to pending) +- Patch issue #211: Dailymail throws false positives (moved to pending) +- Patch issue #209: Espaciolinux throws false positives (moved to pending) +- Patch issue #207: forocompraventa throws false positives (moved to pending) + +0.14.5, 2016/12/09 -- Add Zotero, Leakforums, CardingHispano, MercadoLibre, Angel, Forospyware, Bubok, etc. (up to 22 new wrappers). +- Add feature #148: Adding Inkonsky as a new platform. +- Add feature #142: Adding angel.co as a new usufy platform. +- Add feature #111: Adding Zotero as a new wrapper. +- Add feature #110: Adding Bitrated.me as a new platform. +- Add feature #109: Adding Spreaker as a new platform. +- Add feature #97: Adding ripenear.me as a new platform. +- Add feature #96: Adding warriorforum as a new platform with usufy. +- Add feature #94: Adding cartodb.com as a platform with usufy. +- Add feature #85: Add muetorrent as a new wrapper. Renamed as a gytorrents. +- Add feature: Add bubok wrapper. +- Add feature: Add cardingmx wrapper. +- Add feature: Add ccm wrapper. +- Add feature: Add espaciolinux wrapper. +- Add feature: Add forocompraventa wrapper. +- Add feature: Add foroptc wrapper. +- Add feature: Add foros24h wrapper. +- Add feature: Add forosspyware wrapper. +- Add feature: Add htcmania wrapper. +- Add feature: Add losviajeros wrapper. +- Add feature: Add leakforums wrapper. +- Add feature: Add cardinghispano wrapper. +- Add feature: Add mercadolibre wrapper. +- Add __author__ and __version__ to the wrappers template. +- Fix issue #183: Web.tv has changed its error. +- Fix issue #180: Artician wrapper is not working. Moved to pending. +- Put in quarantine: unsystem and forominecraft. +- Fix issue: Grab database error in anarchy101.py wrapper. +- Issue #181, required no action. + +0.14.4, 2016/11/06 -- Fix issues #178 and #179 with connectingsingles.com. +- Fix issue #178: Mailfy not working on Windows. +- Fix issue #179: Connecting singles has changed its error. + +0.14.3, 2016/11/04 -- Fix important issue when deploying on Windows after 0.14.0. +- Fix issue #177. Found an issue when installing on Windows 0.14.2. +- Removed temporary files from /tmp when thet are created. + +0.14.2, 2016/10/21 -- Add features #106 and #107 and fix #176. +- Add feature #107: Add keybase.io as a new platform. +- Add feature #106: Add freekabcer as a new platform. +- Fix issue #176: Fix Fanpop error message. + +0.14.1, 2016/10/15 -- Fix issues related to the installation procedure and adding some new platforms. +- Add feature #95: Nairaland forum has usufy. +- Add feature #108: Adding coinbase.com as a new platform. +- Fix issue #173: Setup.py requires being in the sudoers list even when installing for a single user. +- Patch issue #175: Moved Naver to pending. +- Patched an issue in usufy.py that may throw errors when None is returned by getPageWrapper (which should just not happen). + +0.14.0, 2016/09/30 -- Added domainfy as a tool to verify the existence of domains and first release of osrfconsole, a console GUI similar to msfconsole. +- Add domainfy.py application to check the existence of several domains using socket.gethostbyname(). +- Add osrfconsole script to control de utilities in the framework to address issue #158. +- Add general.cfg to address issue #92 and, indirectly, issue #156. +- Modify the shebang of alias_generator, domainfy, entify, enumeration, mailfy, osrfconsole, phonefy, searchfy and usufy to `#!/usr/bin/env python2`. +- Fix issue #172: Remove ummahforum platform. +- Fix issue #171: Dnspython module does not work in Windows. +- Add feature #170: Add OneName as a new usufy platform. +- Fix issue #166: The PLATFORMS variable in osrfconsole does not accept various entries. +- Fix issue #165: Osrfconsole back command exists instead of unloading. +- Add feature #163: Adding tip.me as a new platform. +- Add feature #159: Adding a Console UI to help beginners. Osrfconsole.py is released. +- Add feature #158: Complementing domain search using whois info in domain finder script. +- Add feature #157: Adding domain search in a new script. + +0.13.2, 2016/07/23 -- Fixed issue #154: OSRFramework 0.13.1 is installed but throws an error when launching usufy.py. +- Evilzone and Thepiratebay wrappers have been moved to pending as they are conflicting with Skype. +- Some changes performed in the way in which Skype logs the messages in the console. + +0.13.1, 2016/07/20 -- Fixed a deployment issue with versions which are older than 0.13.0. +- Relevant hotfix deployed to remove any trace of deprecated installations of the framework during the setup. New installs will not perceive the difference. + +0.13.0, 2016/07/19 -- Added the possibility of dinamically adding user-defined modules under the configuration folder. Fixed issues #150, #151, #152, #153. +- Fixed issue #146. Letting the user create new usufy wrappers in its home folder. +- Fixed issue #147. Letting the user create new entify regexps in its home folder. +- Fixed issue #150. Ruby-forum.com has changed its base URL. +- Fixed issue #151. Foodspotting is returning false positives when the first character is a number bug usufy. +- Fixed issue #152. Bucketlistly is returning false positives when the first character is a number bug usufy. +- Fixed issue #153. Sample files (wrapper.py.sample and pattern.py.sample) are not copied during the installation. Added a recursive-include clause to MANIFEST.in to collect the sample files in the config/plugins. +- Addressed issue #149. Bookmarky.com seems not to be working (moved to pending). +- Updated the process of compiling the regular expressions to validate the usernames for each platform. +- Fixed a bug that was not capable of setting properly the api_keys.cfg. +- Modified the configuration file. +- Removed old wrappers which had been removed. +- Added a pending folder with wrappers which need to be fixed. They will not be imported. +- Implemented __eq__ for both wrappers and patterns. + +0.12.1, 2016/07/07 -- Fixed issues in Favstar and mailfy.py. +- Fixed issue #145. Favstar platform returns false positives in usufy when looking for long usernames. +- Fixed issue #144. mailfy.py returns error with specific domains. The error seemed to be a problem when no mail was loaded. +- Fixed issue #130. Removing obsolete warning of not properly working in Windows mailfy. + +0.12.0, 2016/06/12 -- Fixed issues in 8 platforms when making use of usernames with a ".". URL can be automatically opened in the current web browser. Added 3 new mailfy platforms. +- Important change in the way of validating the nicknames. Valid expressions are matched now as ".+". +- Addressed issue #129: Open found URL in the current webbrowser. +- Fixed issue #141: Btinternet.com as new mailfy platform. +- Fixed issue #140: Libero.it as new mailfy platform. +- Fixed issue #139: Ya.ru as new mailfy platform. +- Fixed issue #138: Causes platform does NOT accept the character "." in the username. +- Fixed issue #137: Nubelo platform does NOT accept the character "." in the username. +- Fixed issue #136: Bucketlistly platform does NOT accept the character "." in the username. +- Fixed issue #135: Burdastyle platform does NOT accept the character "." in the username. +- Fixed issue #134: Askfm platform does NOT accept the character "." in the username. +- Fixed issue #133: Gogobot platform does NOT accept the character "." in the username. +- Fixed issue #132: Rankia platform does NOT accept the character "." in the username. +- Fixed issue #131: Twitpic platform does NOT accept the character "." in the username. + +0.11.7, 2016/06/03 -- Critical bug addressed in the installation process identified as #122. Other minor issues addressed too. +- Fixed issue #126: Periscope has changed its error message. + +0.11.6, 2016/06/03 -- Critical bug addressed in the installation process identified as #122. Other minor issues addressed too. +- Fixed issue #125: Ibosocial has changed its error for non-existing websites... Changed the error message. +- Fixed issue #124: Freebase wrapper does not work... +- Fixed issue #123: Arto has closed its service... :(. Platform removed. +- Fixed issue with thepiratebay.mk. Added a new message to find platforms which are no longer available. +- Removed other non working platforms that were maintained unnecessarily. + +0.11.5, 2016/05/15 -- Added 16 new email providers for mailfy.py. +- The following email providers have been whitelisted in mailfy.py: aaathats3as.com, cocaine.ninja, cock.lu, cock.email, firemail.cc, getbackinthe.kitchen, hitler.rocks, lycos.com, memeware.net, rediffmail.com, tuta.io, tutamail.com, tutanota.com, tutanota.de, waifu.club and zoho.com. +- Some updates done in the mailfy.py blacklists. +- Addressed isue #120: Xat.com platform has changed its usufy URL. The wrapper has been deactivated. + +0.11.4, 2016/04/28 -- Corrected a fix #116 in mailfy.py after breaking a thing before committing... +- Fixed issue #116: Mailfy.py is now throwing an error message when the email does not exist. + +0.11.3, 2016/04/28 -- Several fixes addressed (#116, #115, #114, #113, #112) regarding with obsolete platforms. +- Fixed issue #115: Worldcarfans is no longer working bug usufy. Removed. +- Fixed issue #114: Relatious.com platform is broken bug usufy. Removed. +- Fixed issue #113: Thecarcommunity platform is broken. Removed. +- Fixed issue #112: New error message in stumbleupon. Removed, the page is now entirely loaded usin javascript. +- Fixed other issues which were not identified originally: metacafe, youku. + +0.11.2, 2016/04/01 -- Fixed issue #105: Error in mailfy, line 238. +- Fixed issue #105: Error en mailfy (linea 238) bug mailfy. There was a typo in mailfy.py that showed a wrongly modified variable. Removed the "2015" as stated by Pepepy did the trick. + +0.11.1, 2016/03/25 -- Issues related to usufy.py platforms that were throwing false positives. +- Fixed issue #101: Changed the error for gsmspain forums. They had changed the error message. +- Fixed issue #102: Adtriboo is no longer a valid platform. Removed. +- Addressed issue #104: Evilzone has been deactivated until we find the new usufy structure. + +0.11.0, 2016/03/14 -- Adding configuration files so as to let the user configure credentials and API keys, as well as making the Maltego transforms work with the current architecture. +- Fixed issue #51: settings for credentials, API keys and connectivity are now stored in the user's home. +- Fixed issue #65: add threading to mailfy.py to allow parallel queries. +- Fixed issue #84: fix Maltego installation using the content_scripts. The creation of the Maltego configuration file is currently done by the setup.py script. +- Fixed issue #88: ods, xls, xlsx are no longer appending results to previously found files. A change in the API now returns only an array of arrays if there is only one sheet. +- Fixed issue #90: added new documentation files as AUTHORS.md, INSTALL.md and HACKING.md. +- Fixed issue #93: Issue when installing in Windows v0.11.x. An exception has been added in the general.changePermissionsRecursively function to deal with os.chown issues when running on Windows. +- Fixed issue #98: Configuration files seem not to be copied correctly in the installation process. In Windows there was a problem with the direction of the slashes. Updated the configuration.py file to address it. +- Fixed issue #100: With the new installation procedure, networkx should be installed in the system. Added a osrframework/utils/configuration.py file. +- Transforms adjusted to use a copy of the scripts stored in the transforms folder inside the configuration directory to fix an issue when trying to run the scripts from Maltego, which seems not to be capable of launching them otherwise making calls in the "python usufy.py..." way in Windows systems. +- Added a MANIFEST.in file to include static files in the ./config folder and the configuration of the transforms. +- Commented logging text in usufy.py. +- Added the missing script config_api_keys.py which was previously ignored. +- Changed the maximum number of threads to be opened by OSRFramework transforms in Maltego as this could lead to problems with the applications. +- Fixed gsmspain.py wrapper for usufy which was not capable of returning a result properly. +- Deactivated identi.ca and couchsurfing because the platforms seems to be unstable. +- Added a browser.cfg to let the user configure OSRFramework browser settings such as the way in which it gets connected to the internet or the user agent. +- Added an api_keys.cfg file to the configuration file where all the API keys will be stored. +- Added three new dependencies pyopenssl, ndg-httpsclient, pyasn1 to deal with InsecurePlatformWarning when calling the Twitter API. +- Removed obsolete functions from osrframework/utils/general.py. +- Removed the logo.png references. + +0.10.5, 2016/02/13 -- Fixed issue #86, Metacafe is returning false positives. +- Fixed issue #86: Metacafe was returning false positives and the error was updated. +- Updated a dependency for pyexcel_text package. OSRFramework now works with the latest version. + +0.10.4, 2016/02/06 -- Some improvements in the alias generator to address issues #79, #80 and #81. Skype link error message defined as a warning now. +- Fixed issue #79: some new rules to be added to alias_generator.py. +- Fixed issue #80: moving the traditional profilesquatting changes to alias_generator.py. Removed the option from usufy.py. +- Fixed issue #81: all options inserted are now lowercased in alias_generator. +. Modified the Skype warning message to show what is happening and that a Skype session should be opened by the user. +- The interactive interface is now aligned and looks better. +- The birthyear is now the 4th option after the information about the profile. +- README.md brought back as README.md. + +0.10.3, 2016/02/06 -- Fixes in mailfy and some searchfy platforms that got outdated. +- Fixed issue #83: alias_generator script is throwing an error related to where to find Python. +- Moved CHANGES.txt to CHANGES and README.md to README. +- Removed setup.cfg. + +0.10.2, 2016/02/03 -- Fixes in mailfy and some searchfy platforms that got outdated. +- Fixed the searchfy search for the following platforms: facebook and youtube. The wrapper for twitter does NOT accept special characters such as the 'á', 'é', 'í', etc. +- Added more info to the output of the script to let the user know more info about what is happening. +- The number of domains to be searched is configurable now with the -d option. +- Added keemail.me to mailfy.py. +- Relaxing a requirement for a buggy version of pyexcel_text. + +0.10.1, 2016/02/02 -- Two Bitcoin platforms added and a fix introduced to repair aporrealos. +- fanbitcoin and bitcointa have been added to the platform. +- A new error message has been added to aporrealos to avoid false positives when the platform throws errors. +- hotmail.com had to be deactivated from mailfy.py :(. + +0.10.0, 2016/01/30 -- New release with several fixes. +- New platforms added to usufy: archive, ehow, gamesheep, hubpages, kanogames, newgrounds, nubelo, retailmenot, sidereel, thepiratebay, webtv, worldcarfans. +- Fixed issues linked to mailfy: #56, #57, #58 and #60. +- Fixed issue #53: adding tabulate dependency to the requirements.txt file. +- Fixed issue #52: fixed a crash when launching -p wikipedia only in usufy.py and some false positives associated to the platform. +- Fixed issue #64: foxmail.com has been removed from the list of secure domains. +- Fixed issue #67: infotelefonica.es has changed its error. +- Fixed issue #73: more convenient packaging solution with pip. Added osrframework scritps to path. +- Fixed issue #69: the new installation process has been detailed. +- Fixes for mailfy platforms which have been deactivated: outlook.com (#69) and sina.com (#70). +- Different fixes linked to issues #33 (jamiiforums), #43 (qq), #42 (buzznet) and #44 (pixls substitutes rawtherapee). +- Fixes for about, forosperu, hellboundhackers, ivoox and linkedin. +- Addressed issue #61: usufy.py --fuzz sample.txt now uses as separator either a '\t' or a ' '. +- A fix has been introduced in the --fuzz option of usufy.py so as not to stop when a matching pattern has been found. +- Added a new phonefy platform: kimatel (quienera.es). +- Removed unused files such as requirements.txt, utils/export.py, utils/timeout.py. +- Update in the README file. + +0.9.14, 2016/01/21 -- Mitigation of several fixes. +- Fix to issues #46, #47, #48, #49. Mitigating #40, #42, #43, #44, 45. +- Modification of the Welcome banner for the different utilities. Back to normal. + +0.9.13, 2015/11/26 -- Modifications for the Cybercamp. +- Modification of the Welcome banner for the different utilities. +- Changed the default extension to .xls as stated in the help. +- Added a new phonefy platform: infotelefonica.es. +- Modified the name of the listaspam platform from "listspam" to "listaspam". + +0.9.12, 2015/11/18 -- Addition of Periscope. +- Addition of a wrapper for Periscope. +- Imported in the setup.py the local osrframework folder to grab the current version number. +- Fixed some errors in the messages displayed. + +0.9.11, 2015/11/13 -- Addition of a new searchfy platform to look for PGP keys, as well as new platforms for mailfy. +- Added the search in the PGP public key repository by the MIT. +- Fixed a change in garage4hackers platform. +- Added new wikipediafr and wikipediapt user search. +- The platform thehoodup now waits for credentials. +- Added the sina.com email provider to mailfy.py. +- Added a message to urge the users to report any issue to . +- Added a message in mailfy.py when being run under Windows systems to let them know that the app. may behave unexpectedly. +- Corrected a mistake related to matplotlib. +- Added a banner text to each script of the framework showing the current version of the libraries. + +0.9.10, 2015/10/26 -- Updated the error messages of burbuja.info in response to issue #32. +- Fixed in the burbuja platform which were confirmed to be working wrongly. +- Updated a new ebay error message just to try to confirm the reported malfunctioning by some users. +- Temporally deactivation of jamiiforums platform to try to fix this issue further. +- Throwing a Warning message when using Twitter API with old versions of ouath library. + +0.9.9, 2015/10/18 -- Updated the number of email accounts that con be searched with mailfy.py. +- We have added a series of email providers in which the emailahoy library is also working: "yeah.net". +- Added badges to the README.md file. + +0.9.8, 2015/10/15 -- Updated the number of email accounts that con be searched with mailfy.py. +- We have added a series of email providers in which the emailahoy library is also working: "126.com", "163.com", "189.cn", "foxmail.com", "qq.com", "yandex.com". + +0.9.7, 2015/09/29 -- Updated the enumeration.py file and corrected the slashdot wrapper. +- Corrected the slashdot wrapper which was showing the existence of platforms which in fact didn't exist. +- Commented some references to an old logger in enumeration.py. + +0.9.6, 2015/09/22 -- Corrected some installations misconfigurations. +- Fixed an issue when creating the twitter_api which now will try to grab the api_key in compilation time. +- A .csv file will be created by default now in usufy, entify, searchfy, mailfy and phonefy. +- Added a dependency for networkx in requirements.txt. +- Fixes in the installation instructions. + +0.9.5, 2015/09/13 -- Corrected some errors in entify.py. +- Corrected some errors in entify.py when looking for entities in a folder. +- Corrected an error when looking for Spanish DNI. + +0.9.4, 2015/09/12 -- API integration added to extract information, changes in the export files and added the Twitter API wrapper. +- Created a osrframework/api folder where all the wrappers to each platform will be included. +- Considered in platforms.py the chance of using the API if, both, a wrapper exists and the appropriate authentication methods have been provided. +- Added a Twitter API wrapping the credentials in config_api_credentials.py to make use of Tweepy API. +- Added networkx library to store the information in a graph format: png and gml have been added. +- A hack has been used to avoid encoding problems when exporting data. +- An issue has been detected: python-networkx and python-decorator in Debian-based OS is a problem because they are not up-to-date. Installation from pip is required. +- Changed the export modules to change the starting "@" in the attributes to a "_" and the "i3visio." headers to "i3visio_" for usability reasons when loading future versions of visualization apps. + +0.9.3, 2015/08/28 -- Storing the information of mailfy, entify and phonefy files. +- Updating the export primitives of the entify, mailfy and phonefy files. +- Showing some extra text at the beginning of the applications. +- Fix in the extraction of the i3visio.fullname from Twitter. +- Fix in the URIs returned from searchfy (previously, '//' was used in twitter and github wrappers). + +0.9.2, 2015/08/25 -- Dealing with export issues linked to localization. +- Dealing with an issue when printing unicode characters in the terminal (specially, in right-to-left languages). A message error will be displayed in the terminal though the information will be stored safely). +- Back to creation of .xls output files by default. An issue has been detected when creating .ods using Unicode characters. We will wait to test the utility. +- About.me platform temporally deactivated as it requires javascript. + +0.9.1, 2015/08/20 -- Fixes in the export using experimental versions of pyexcel. Release version. +- Fix an issue linked to the export of Unicode characters in this library. It needs to install an experimental library though. +- Usufy will display now additional details when being launched: start and end messages as well as time consumed. + +0.9.0rc5, 2015/08/19 -- Extraction of attributes reconfigured. +- Added youtube and github to searchfy. +- The searchfy file now operates using uri and parsing them. +- Added a new global variable to be able to apply different types of URLs for the profiles in a platform. +- Fix in the csv export that overwrote previous files. + +0.9.0rc4, 2015/08/18 -- Extraction of attributes reconfigured. +- Fix in the extraction of Twitter fields. +- Fix in Twitter and Skype wrappers to return an i3visio.uri.homepage entity for the URIs found in the profiles. Previous approach overrode the profile's URI. + +0.9.0rc3, 2015/08/18 -- Extraction of attributes reconfigured. +- The extraction of attributes from the profiles has been reincluded. +- The Twitter wrapper recovers now the i3visio.location of a user in usufy mode even when the profile is locked. +- Fixed the usufy launcher to show the icon. +- Fixed compatibiliy of the installer for Windows systems. + +0.9.0rc2, 2015/08/16 -- Minor changes linked to redistribution. +- Updating the help texts to include the references to the official repository. +- The .desktop files do not include now a reference to pantheon-terminal. +- Updating the publication process. +- Modification of the regular expressions of the nicks for the following platforms: twitpic, tumblr, rankia, gogobot, buzznet, causes. +- Added about me wrapper to usufy (removed wefollow). + +0.9.0rc1, 2015/08/13 -- First DEB, RPM, compiled version of 0.9.0. +- Updating setup.py to include some data files in /usr/bin/. +- Accomdation of the .mtz Maltego file. +- Creation of .deb, .rpm packages. +- Updating the README. +- Creation of .ods output files by default. +- Addition of icons and desktop launchers for Linux systems (.desktop files). + +0.9.0b7, 2015/08/12 -- Fixes in the Maltego transforms. +- Added Maltego transform: searchfy on Twitter. +- Added Maltego transform: searchfy on Facebook. +- Added Maltego transform: searchfy on Skype. +- Modified Maltego transform: aliasToKnownMails is now operative. +- The i3visio.location.city entity is extracted correctly when calling ip-api.com API. +- If the number of entities returned are too many a message will be displayed in the Transform output tab. +- Debug windows are not shown in production thanks to a new utility included in configure_maltego.py. +- Fix in Skype wrapper to avoid showing errors messages that make Maltego crash. +- Remove PIP dependencies: only pip will be required. The other dependencies will be checked when installed and included to be manually installed by the user. +- Update on the version number from v0.9.0 to 0.9.0 format (without the 'v'). + +v0.9.0b6, 2015/07/15 -- Minor fix in hi5 that needs credentials right now. +- Hi5 wrapper has been modified to request credentials. + +v0.9.0b5, 2015/07/15 -- Added searchfy platforms for skype, facebook and twitter. +- Added the searchfy functionality. +- Fixed the returned objects in usufy (now, it's always a list). +- Facesaerch and ahmia have been temporally deactivated. +- The generated output now does not override the file if it already exists. Instead, it reads the previous data and appends the new information. + +v0.9.0b4, 2015/07/13 -- Fixed the output when too much information is displayed. +- The printed table appearing in the terminal will only show values linked to i3visio.alias, i3visio.platform, i3visio.uri and i3visio.fullname. The rest of the information will be printed to the output files. +- Minor change in the Skype entity previously returned as i3visio.person which now is returned as i3visio.fullname. + +v0.9.0b3, 2015/07/13 -- Fixes in tuporno and fanpop. +- Fixed tupono, fanpop. +- Setting .csv files as default output extension for usufy.py. + +v0.9.0b2, 2015/07/10 -- Notably improved the export capabilities. +- Fixed an error in the generation of the .csv for usufy. +- New export formats included in usufy: .ods, text, .xls, .xlsx. + +v0.9.0b, 2015/06/24 -- Major restructuration of the internal tool. Addition of new platforms and links. +- Moved platforms to wrappers and changed platforms.py to utils. +- Inclusion of old darkfy searches to look for information in Tor platforms. +- Inclusion of regular expression rules to choose valid names. +- Inclusion of a new mailfy.py app that verifies whether an email is known as a valid email using emailahoy. +- Inclusion of a new searchfy.py app that recovers the URL of a search in different platforms. +- Generation of aliases from a person using alias_generator.py +- Inclusion of all the variables to include phonefy, usufy and searchfy search in all platforms. +- Inclusion of plain calls to the different third party API in the main folder. +- Removed phonefy and usufy folders for structural simplicity. +- Added a proof of concept option to access all the users of a given platform. +- Added a facesaerch.py module to look for images. +- Added an alias to IP platform that tries to resolve the location of a user in Skype. +- Added a uriToGoogleCacheUri transform. +- Changed usufy-launcher.py and phonefy-launcher.py to usufy.py and phonefy.py. +- Changed maltfy folder to transforms. +- Opening .onion URI using onion.cab service. +- Updated transforms to match the new distribution. +- Added BeautifulSoup as a needed llibrary for the installation. +- Fixed bladna, breakcom, twicsy, spotify, spoj. +- Deactivating friendsfeed, hellboundhackers and ukdebate (services unavailable for different reasons) and twitch. +- The Skype platform now returns an i3visio.platform entity as expected. + +v0.8.3, 2015/04/09 -- Changed the structure of the returned csv files. +- Adding the possibility of creating a csv output file. + +v0.8.2, 2015/04/08 -- Changed the structure of the returned json files. +- Fixed an issue that created up to n different json files. +- The returned json is a list of i3visio.objects and the list returned is now ordered and no longer linked to the nickname searched. + +v0.8.1, 2015/04/08 -- Minor fixes on certain platforms which were not working. +- Fixed the self.notFoundText in: cafemom, pearltreesspoj. +- Added the self.foundText in: spoj. +- ResearchGate needs credential now. + +v0.8.0, 2015/04/03 -- Improvements in the entity generation and an extensive ip-api.com support. +- Added Maltego transform: coordinatesToGoogleMapsBrowser. +- Added Maltego transform: coordinatesToTwitterBrowser. +- Added Maltego transform: domainToIp_ApiInfo. +- Added Maltego transform: ipToIp_ApiInfo. +- Added default fields to every Maltego Entity. +- Modified Maltego transform: aliasToAllProfiles. +- Modified Maltego transform: aliasToFamousPlatforms. +- Modified Maltego transform: aliasToSkypeAccounts. +- Modified Maltego transform: bitcoinAddressToBlockchainDetails. +- Modified Maltego transform: domainToGoogleSearchUriWithEmails. +- Modified Maltego transform: domainToTld. +- Modified Maltego transform: emailToAlias. +- Modified Maltego transform: emailToBreachAccounts. +- Modified Maltego transform: emailToDomain. +- Modified Maltego transform: emailToSkypeAccounts. +- Modified Maltego transform: expandPropertiesFromI3visioEntity. +- Modified Maltego transform: hashToMD5crackDotCom. +- Modified Maltego transform: ipToIp_ApiInformation. +- Modified Maltego transform: phoneToPerson. +- Modified Maltego transform: phoneToMoreInfo. +- Modified Maltego transform: textToGoogleSearchUri. +- Modified Maltego transform: textToEntities. +- Modified Maltego transform: uriToBrowser. +- Modified Maltego transform: uriToDomain. +- Modified Maltego transform: uriToEntities. +- Modified Maltego transform: uriToPort. +- Modified Maltego transform: uriToProtocol. +- Fixed errors in cafemom.com and activerain.trulia.com platforms. +- Requesting credentials for Pokerstrategy and Flixter platforms. +- Addition of a method to recursively extract the information of the fields and attributes, even when it exceeds the maximum number of queries performed for the free version. +- Change in the returnOutput methods of MaltegoEntity and MaltegoTransform to make use of an auxiliar getOutputText method. +- Creation of two new methods in maltfy.lib.maltego to create new entities. +- Reorganization of ip-api.com json objects returned by the API to display i3visio-like objects. +- Inclusion of thirdparties.pipl script to perform queries on usernames and emails. +- Appending a '/' to URL that do not have it when extracting domains or ports. +- Minor change in the way of grabbing md5crack.com API Key in config_api_keys.py.sample. +- Reorganization of network transforms onto i3visio.network set. +- Added new categories: i3visio.location.geo, i3visio.ipv4. +- Changed the i3visio.protocol icon and moved the i3visio.breach entity to i3visio.person group. +- Fixed some issues regarding the way of showing the License on each file. +- Various identation fixes from 't' to ' '. +- Fixed an error with Trulia platform. A missing pair of quoting marks. + +v0.7.1, 2015/01/17 -- Release of v0.7.1. +- Fix in the domainToGoogleSearchUriWithEmails transform which was wrongly coded. + +v0.7.0, 2015/01/17 -- Release of v0.7.0. +- Added Maltego transform: uriToBrowser. +- Added Maltego transform: uriToBitcoinAddressEntities. +- Added Maltego transform: uriToDniEntities. +- Added Maltego transform: uriToDogecoinAddressEntities. +- Added Maltego transform: uriToEmailEntities. +- Added Maltego transform: uriToIPv4Entities. +- Added Maltego transform: uriToLitecoinAddressEntities. +- Added Maltego transform: uriToMD5Entities. +- Added Maltego transform: uriToNamecoinAddressEntities. +- Added Maltego transform: uriToPeercoinAddressEntities. +- Added Maltego transform: uriToSHA1Entities. +- Added Maltego transform: uriToSHA256Entities. +- Added Maltego transform: uriToUriEntities. +- Added Maltego transform: textToBitcoinAddressEntities. +- Added Maltego transform: textToDniEntities. +- Added Maltego transform: textToDogecoinAddressEntities. +- Added Maltego transform: textToEmailEntities. +- Added Maltego transform: textToIPv4Entities. +- Added Maltego transform: textToLitecoinAddressEntities. +- Added Maltego transform: textToMD5Entities. +- Added Maltego transform: textToNamecoinAddressEntities. +- Added Maltego transform: textToPeercoinAddressEntities. +- Added Maltego transform: textToSHA1Entities. +- Added Maltego transform: textToSHA256Entities. +- Added Maltego transform: textToUriEntities. +- Added Maltego transform: domainToGoogleSearchUriWithEmails. +- Added Maltego transform: textToPhoneDetails. +- Removed Maltego transform: phoneToPerson. +- Reorganization of transforms in different thematic sets. +- Refactoring of uriToEntities.py and textToEntities.py python codes to accept a platform parameter in the transform. +- Changed the name of the Maltego Configuration folder to remove the version in the name. +- Fix the i3visio.surname2 which was wrongly referred as i3visio.surnme2. +- Added different entity categories such as: i3visio.hash, i3visio.location, i3visio.person, i3visio.phone, i3visio.web. + +v0.6.1, 2015/01/15 -- Correction of a couple of issues in the entities. +- Added properties by default to i3visio.person. +- Corrected a reference to a i3visio.phone in infobel_com package (it was identified wrongly as i3visio.location.phone) + +v0.6.0, 2015/01/14 -- Creation of Phonefy architecture. +- Added a Google Search wrapper based on Mario Vilas approach. +- Added Maltego transform: phoneToPerson. +- Added Maltego transform: textToGoogleSearchURI. +- Added Maltego transform: uriToProtocol. +- Added Maltego transform: uriToPort. +- Added Maltego transform: uriToDomain. +- Added Maltego transform: domainToTLD. +- Added tld, person, fullname, name, surname1, surname2, location.postalcode and location.address entities. +- Changed the main path for the configuration files + +v0.5.0, 2015/01/13 -- Creation of Phonefy architecture. +- Added Maltego transform: phoneToMoreInfoListspam. +- Restructuration of phonefy package. +- Change in uriToEntities.py to use an i3visio Browser. +- Fix in i3visio.location.province icon. + +v0.4.0, 2015/01/11 -- Added the usufy package onto OSRFramework. +- Added Maltego transform: aliasToAllProfiles. +- Added Maltego transform: aliasToFamousProfiles. +- Inclusion of i3visiotools global files as osrframework.utils. +- Change in old displaying format of usufy entities. +- Change inheritance of i3visio.uri to i3visio.text (rather than i3visio.object). +- Change icon of i3visio.platform. + +v0.3.0, 2015/01/11 -- Added the extraction of regular expression with entify. +- Added Maltego transform: textToAllEntities. +- Added Maltego transform: uriToAllEntities. +- Added Maltego transform: emailToAlias. +- Added Maltego transform: emailToDomain. +- Inclusion of a --quiet option. +- Inclusion of transforms related to the extraction of entities. +- Minor changes in the name of entify transforms and i3visio.url has been moved to i3visio.uri. +- Changed the url.py module to uri.py. References changed everywhere. +- Added a simple transformation of foo[at]bar[dot]com mails to be foo@bar.com. +- Fix on i3visio.object entity which was not being imported correctly. +- Edit configuration of configure_maltego to update also default paths for the transforms. + +v0.2.0, 2015/01/07 -- Added Maltego transforms. +- Added Maltego transform: aliasToSkypeAccounts. +- Added Maltego transform: bitcoinAddressToBlockchainDetails. +- Added Maltego transform: emailToBreachedAccounts. +- Added Maltego transform: emailToSkypeAccounts. +- Added Maltego transform: hashToMD5crackDotCom. +- Added Maltego transform: expandPropertiesFromI3visioEntity. +- Added entities and logos for Peercoin and Namecoin addresses. +- Removed i3visio.bitcoin, i3visio.litecoin, i3visio.dogecoin entities, as the i3visio.bitcoin.address (et al.) will be used. +- Added entities for i3visio.port, i3visio.domain and i3visio.protocol. +- Changed icon for i3visio.dni. +- Added an autoconfiguration file for Maltego Transforms. + +v0.1.0, 2014/12/31 -- Initial release. +- Added a third-party API wrapper for Skype: checkIPDetails. +- Added a third-party API wrapper for md5crack.com: checkIPDetails. +- Added a third-party API wrapper for ip-api.com: checkIPDetails. +- Added a third-party API wrapper for haveibeenpwned.com: checkIfEmailWasHacked. +- Added a third-party API wrapper for blockchain.info: getBitcoinAddressDetails. +- Initial release. + + +[TO-DO] +Long term: +- Usage of mashape.com API linked to email verification. +- Usage of mashape.com API linked to image verification. +- Inclusions of email verification transforms. +- Inclusion of a call to pipl.com API. +- Full normalization of fields. +- Create Facesaerch and Tor search transforms in Maltego. +- Recover the logging functions. + +[Known issues] +- Text to deep web search is broken. +- Recursive expansion of attributes when the cap is reached in Maltego. +- There is an issue in Maltego Chlorine CE when exporting a transform with the transform.local.parameters popup marked as True: . However, when importing the created .mtz file the popup attribute is not correctly updated not requesting the user who imported the transform the value unless he/she clicks on configure and manually update this value, something which may not be trivial for some users. This issue affects the transform aliasToSelectedPlatforms which will throw an error if not manually configured by the user instead of asking the user to insert the deliberately missing parameters. This is not an OSRFramework issue and has conveniently be notified to Paterva with date of 2015/08/12. diff --git a/doc/ENTIFY.md b/doc/ENTIFY.md new file mode 100644 index 0000000..335bd1c --- /dev/null +++ b/doc/ENTIFY.md @@ -0,0 +1,4 @@ +Using entify.py +=============== + +TODO. diff --git a/doc/HACKING.md b/doc/HACKING.md new file mode 100644 index 0000000..8e92689 --- /dev/null +++ b/doc/HACKING.md @@ -0,0 +1,161 @@ +Contributing to OSRFramework +============================ + +Reporting issues, bugs and fresh ideas +-------------------------------------- + +The way in which we track the issues regarding the software is by means of the issues page in Github's project site, which can be found here: . +Whether you have experimented problems with the installation, you have found a bug in a new platform or you feel that we can add a new functionality, you can find the place to report them there. The only "rule" is to notify one error per issue to be able to track the problems indepently, as well as trying to provide as much information as possible regarding the OS or version you are trying. + +If you find that a transform in Maltego is not behaving as expected, we recommend you to set the debug mode as True. Go to Manage --> Manage Transforms, choose the transform and mark the "Set debug info" as True. Please, copy the information shown in the new tab in the issue so as to provide more information to debug it faster. + +Extending OSRFramework +---------------------- + +This section will provide information about how to extend the different tools found in the framework. + +### Creating new usufy.py wrappers as plugins + +Since OSRFramework 0.13.0, we have added the possibility of creating new wrappers as plugins. + +The basic things you should know in order to create a new wrapper are: +* The structure of the URL that links to the profile. +* The part of the HTML code that says that the user does NOT exist. +* A valid nickname that has an active profile in the website. + +For the example, we are going to use an invented socialnetwork: `http://example.com/james` is the URL of a user called `james` in that figured platform. The error returned is `404 not found`. +Go to the `plugins/wrappers` folder in your home, copy and rename the `wrapper.py.sample` to `example.py`. +Thus you will have a template that you will be able to modify. + +First, we'll change the name of the wrapper and the tags: +``` +class Example(Platform): + """ + A object for Example. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Example" + self.tags = ["test"] +``` + +We'll tell the framework, that this platform has usufy-style profile pages by setting to True the corresponding variable: +``` + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False +``` + +We will provide the URL patern: +``` + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://example.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" +``` + +We will know tell if the platform needs credentials to work: +``` + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False +``` + +In some platforms, we may now that the usernames always match a given regular expression (for instance, Twitter does not allow '.' in a username). If this is the case, we can modify the `validQuery` attribute: +``` + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any non-empty query. + #self.validQuery["phonefy"] = re.compile(".+") + self.validQuery["usufy"] = re.compile(".+") + #self.validQuery["searchfy"] = re.compile(".+") +``` + +The last part, is telling the framework which is the message that appears when the user is not present. This is an array, so more than one message can be used here. +``` + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404 not found"] + #self.notFoundText["searchfy"] = [] +``` + +And that's almost all. You can now test OSRFramework as usual. A new option will be available the next time you run the application. + +Contributing code +----------------- + +If you want us to include your own wrapper, you will be able to extend the whole framework. Think about the wrapper +Whether you want to add a new wrapper or fix a bug, the basic instructions to contribute and perform a pull request on Github are the following (we assume that you have installed Git by yourself, so please follow the instructions in the project's website to install it on your system ). We will assume that the username for this test is `osrframework_contributor`. + +First of all, logged in Github and fork the repository by pressing the corresponding button in . This will create a copy of the repository under your profile (i. e.: `https://github.com/osrframework_contributor/osrframework`). + +You can clone your forked repository now: +``` +# This is an example! Change "osrframework_contributor" for your nick! +git clone https://github.com/osrframework_contributor/osrframework +cd osrframework +``` + +Then, you can modify any file you want, for example, adding the new wrapper that you have created in the previous case. +``` +# Copying the file to the wrappers folder +mv ~/.config/OSRFramework/plugins/wrappers/example.py ./osrframework/wrappers/ +``` + +Whenever you want, you can add the changes performed to the Git index to keep track of what you have changed and prepar it for the commit. +``` +# Add one file +git add ./osrframework/wrappers/example.py +# Or adding all the files modified... Just be a little bit more careful +# git add -A +``` + +Once you are happy with the changes (and you have tested them!), you can commit the changes with a descriptive message. +``` +git commit -m "Adding a new wrapper as example.py." +``` + +You have to push the changes to your Github project. +``` +git push origin +``` + +You're almost there. You can now go to your project's website (`http://github.com/osrframework_contributor/osrframework`) and click in the `Pulls` tab or going directly to it by appending `pulls` to your forked URL, something similar to `https://github.com/osrframework_contributor/osrframework/pulls`. Then provide there as much detail as you can about the contents of the pull request and shortly we will evaluate the changes and pushed it upstream. + +NOTE: a similar procedure can be performed to add new patterns to entify.py. + +Style guide +----------- + +Just a few things to be taken into account: +* Use four spaces ' ' instead of a tab for identing blocks. +* Provide useful and not trivial comments in English to the code you write. +* Classes should start with a capitalised initial letter. +* As a convention, wrappers inside the `platform_selection.py` should be in alphabetical order. Anyone wants to find things easily! + +Licensing +--------- + +The only thing we expect from other authors'code is to use a GPL-compatible license for their code, preferably GPLv3+ itself. We hope that anybody can use this tool for free (as in Free Software Foundation's four freedoms, not as in *free beer*), so help us to do it. + diff --git a/doc/INSTALL.md b/doc/INSTALL.md new file mode 100644 index 0000000..ba8e082 --- /dev/null +++ b/doc/INSTALL.md @@ -0,0 +1,142 @@ +Installation Instructions +========================= + +More detailed installation instructions can be found in this file. This will use the official package uploaded to pip, but if you prefer to use this with Docker check (this file)[USAGE_WITH_DOCKER.md]. + +1.- Verifying the Python and Pip Installation +--------------------------------------------- + +First of all, on any system we should verify that we have a Python 2.7 installation and a Pip installation setup properly. Opening the terminal or the powershell, we can try the following to check your python installation: +``` +python --version +``` +If you get errors at this point or the Python version is not appeating, your system is not yet prepared. You will need to install Python 2.7 from the official website: +``` +https://www.python.org/downloads/ +``` +Follow the installation steps for your system. Note that in one step of the Windows installation process you WILL NEED to manually add c:\Python27 and C:\Python27\scripts to the system. Try again after completing this task. + +Now it's the turn of the package manager. Check that you have the pip version installed: +``` +pip --version +``` +If you get any errors at this point, you have several options: +* If your running Ubuntu or Debian-like systems, try `sudo apt-get install python-pip`. +* In any case you can always download and install it manually. In Windows-like systems, you do NOT need to type sudo. +``` +# Going to the downloads folder +python get-pip.py +``` +You can do it at a time in GNU/Linux and MacOS systems with a couple of commands: +``` +# Downloading +wget https://bootstrap.pypa.io/get-pip.py +# Installing as root +sudo python get-pip.py +``` +Try again and check if the new pip version is installed. + + +2 - Installing OSRFramework from Pip +------------------------------------ +When installing OSRFramework you have to know that several packages and dependencies will be managed by the installer. The instuctions on how to install this may vary depending on the system. + +### In (Most) GNU/Linux Systems and MacOS + +The fast way to do it on almost any system is by installing it with: +``` +pip install osrframework --user +``` + +You should be able to run `usufy.py`, `mailfy.py`, etc. from the terminal because these scripts have been added to the `~/.local/bin/` folder. + +#### Known Possible Issues + +If you are receiving an error saying that it cannot find `usufy.py: command not found`, check if the given folder is in the `PATH` with: +``` +echo $PATH +``` +If you cannot find the given folder in the previous output, you can always manually add this folder to your `PATH` by appending these two lines to your `.bashrc` as defined in . +``` +export PY_USER_BIN=$(python -c 'import site; print(site.USER_BASE + "/bin")') +export PATH=$PY_USER_BIN:$PATH +``` + +You can also try to do it installing the framework as a superuser which would add the scripts to `/usr/local/bin/`. + +``` +``` +However, note that both approaches may interfere with other libraries that you may have installed on your system. If you are worried about this issue, check the Virtual Environment section below. + +### In Windows Systems + +If you have already tested that Python 2.7.x and Pip are installed, this is easy too: +``` +pip install osrframework +``` + +### Using VirtualEnv: Recommended for Devs and Advanced Users + +The Python libraries we use in OSRFramework are all required to run different utils in the framework. However, and specially if you are a developer, the required packages may broke dependencies on your system. That's why we also recommend the installation using `virtualenv`, another Python package that tries to address this issue by downloading a copy of the needed packages in a virtualized environment. + +To do so, you will need to install it with `virtualenv` so as to avoid problems with dependencies with other libraries. You can use Pip to do so: +``` +pip install virtualenv --user +``` +Afterwards, we are creating a virtual environment that we will arbitrarily call `osrframework-virtualenv`. Anyway, you can use the name you choose: +``` +virtualenv osrframework-virtualenv +``` +Now, if you want to enter the newly created virtual environment, you have to activate it. Note that this will change your prompt to indicate that you are now in a virtual environment: +``` +source osrframework-virtualenv/bin/activate +(osrframework-virtualenv)$ +``` +Now in the new virtual environment you would be able to install osrframework easily and run the applications as usual: +``` +(osrframework-virtualenv)$ pip install osrframework +(osrframework-virtualenv)$ usufy.py -h +``` +Note that, we may have several virtual environments in the same system, but they should be activated before using them. Whenever we want to leave the virtual environment, we can type `deactivate`. This is useful to test different OSRFramework installations in the same system avoiding conflicts between them. +``` +(osrframework-virtualenv)$ pip install osrframework +``` + +3 - Testing the installation +------------------------- + +If everything went correctly (we hope so!), it's time for trying `usufy.py`, `mailfy.py` and so on. But we are they? They are installed in your path meaning that you can open a terminal anywhere and typing the name of the program (seems to be an improvement from previous installations...). Examples: +``` +usufy.py -n i3visio febrezo yrubiosec -p twitter facebook +searchfy.py -q "i3visio" +mailfy.py -n i3visio +``` + +4 - Updating the framework +-------------------------- + +OSRFramework is a tool in development mantained by its [authors](AUTHORS.md) and, thus, we will fix bugs and add new platforms from time to time. To upgrade your local osrframework installation you can type the following: +``` +pip install osrframework --upgrade --user +``` +Depending on how you have installed the framework, you may need to do this as superuser: +``` +sudo pip install osrframework --upgrade +``` +This will manage all the dependencies for you and will try to download the latest *stable* version. If you want to try a prerelease version, you can try to upgrade or install it by appending `--pre` tag: +``` +sudo pip install osrframework --upgrade --pre +``` +Please, things can be unstable and lead to problems so do it under your responsibility. To minimize the effect of those strange things that may take place, you may think about installing them using `virtualenv`. + +### Known Possible Issues in OSRFramework <= 0.14.3 on Windows +If you had already installed 0.14.3 or earlier versions of the framework on Windows you may face some problems with `mailfy.py` and the libraries it uses. You *should* uninstall first `dnspython` and `pyDNS` before reinstalling `osrframework` again: +``` +# Uninstalling dnspython +pip uninstall dnspython +# Uninstalling pydns +pip uninstall pydns +# Reinstalling osrframework, upgrading to most recent version +pip install osrframework --upgrade +``` +Anyway, if you are facing any issues regarding the installation keep us posted at . diff --git a/doc/MAILFY.md b/doc/MAILFY.md new file mode 100644 index 0000000..e8e93b6 --- /dev/null +++ b/doc/MAILFY.md @@ -0,0 +1,4 @@ +Using mailfy.py +=============== + +TODO. diff --git a/doc/MALTEGO_CONFIGURATION.md b/doc/MALTEGO_CONFIGURATION.md new file mode 100644 index 0000000..a265d10 --- /dev/null +++ b/doc/MALTEGO_CONFIGURATION.md @@ -0,0 +1,40 @@ +Maltego Configuration Instructions +================================== + +OSRFramework was conceived to interact with third party applications. One of the +first approaches was to be compatible with Maltego. + + +Maltego Installation +-------------------- + +Maltego is a Java application developed by Paterva that tries to make OSINT +easier for the analyst. Although it is not a free software project, there is a +Community Version that can be used without commercial purposes. It can be +downloaded for your current OS directly from Paterva's website: +``` +http://www.paterva.com/web6/products/download2.php +``` +Follow the instructions there. Afterwards, you will be able to launch the app +and use the different tools developed by third parties. + +Configuring Maltego to Work with OSRFramework Transforms and entities +--------------------------------------------------------------------- + +Although others have opted for deploying transforms in the cloud in Maltego +transform hubs, OSRFramework transforms are deployed locally. They are Python +scripts that convert OSRFramework conventional output to a Maltego-like format +that can be interpreted by the client conveniently. + +The entities and transforms created ad-hoc are shipped within the setup script. +It will create a .mtz file in the OSRFramework home and under the default folder +inside the application folder (just in case a disaster happends ;)). +``` +# Under Linux... +~/osrframework-maltego-settings_.mtz +~/.config/OSRFramework/default/osrframework-maltego-settings_.mtz +``` + +Once you have located it, you will then have to import this file in Maltego by +clicking the `Menu --> Import --> Import configuration`. You might have to +manually check all the types in the installer assistant. diff --git a/doc/OSRFCONSOLE.md b/doc/OSRFCONSOLE.md new file mode 100644 index 0000000..97423e5 --- /dev/null +++ b/doc/OSRFCONSOLE.md @@ -0,0 +1,4 @@ +Introduction to OSRFConsole +=========================== + +TODO. diff --git a/doc/OSRFRAMEWORK_SERVER.md b/doc/OSRFRAMEWORK_SERVER.md new file mode 100644 index 0000000..f00c43f --- /dev/null +++ b/doc/OSRFRAMEWORK_SERVER.md @@ -0,0 +1,4 @@ +Using the GUI +============= + +TODO. diff --git a/doc/OTHER_QUESTIONS.md b/doc/OTHER_QUESTIONS.md new file mode 100644 index 0000000..2a34ea6 --- /dev/null +++ b/doc/OTHER_QUESTIONS.md @@ -0,0 +1 @@ +TODO. diff --git a/doc/PHONEFY.md b/doc/PHONEFY.md new file mode 100644 index 0000000..b53d0e7 --- /dev/null +++ b/doc/PHONEFY.md @@ -0,0 +1,4 @@ +Using phonefy.py +================ + +TODO. diff --git a/doc/SEARCHFY.md b/doc/SEARCHFY.md new file mode 100644 index 0000000..0c0c6f8 --- /dev/null +++ b/doc/SEARCHFY.md @@ -0,0 +1,4 @@ +Using searchfy.py +================= + +TODO. diff --git a/doc/USAGE_WITH_DOCKER.md b/doc/USAGE_WITH_DOCKER.md new file mode 100644 index 0000000..05372fd --- /dev/null +++ b/doc/USAGE_WITH_DOCKER.md @@ -0,0 +1,80 @@ +Using OSRFramework with Docker +============================== + +This file will explain how to use the Docker images for OSRFramework. This will let the reader use the tools easily in almost any platform. To do so, the user will have to install Docker on its computer, what should be enough in most systems. + +1.- Verifying Your Docker Installation +-------------------------------------- + +Docker is available for Mac, Windows and Linux and can be installed easily in Azure or AWS. We strongly recommend to follow the official guides to install and run Docker in your system. Some good starting points can be found [here](https://docs.docker.com/engine/installation/). + +2.- Downloading the Latest OSRFramework Version +----------------------------------------------- + +To run the latest OSRFramework isntallation from Docker you can use the following command: +``` +> docker run -it i3visio/osrframework:latest +``` + +It will download our latest official image. Then, you will be able to login into the Docker image to interact as usual without needing to redownload it again. E. g.: +``` +> docker run -it osrframework:latest +root@c79505f6b915:/# usufy.py -n i3visio -p twitter facebook github +... +root@c79505f6b915:/# osrfconsole.py +``` + +If you want to map the port opened by `osrframework_server.py` you will need to specify it when launching Docker to map the ports and make them accesible. In the following example, we are mapping the 30230 port of the container to port 8080 outside it. + +``` +> docker run -it -p 8080:30230 i3visio/osrframework:latest +``` + +Once launched `osrframework_server.py` we will be able to interact with the instance outside it using `curl`. + +``` +> curl http://localhost:8080/info +``` + +3.- Building Your Own Image Locally +----------------------------------- + +As we also provide the Dockerfile, advanced users may opt to build the image themselves. This can be done by _cd-ing_ into the folder of a clones project and using: + +``` +> docker build -t osrframework ./ +``` + +You will be able ro run the built image as usual: + +``` +> docker run -it osrframework +``` + +If by any circunstamce you prefer to rebuild the instance from scratch, you can always tell it to Docker: + +``` +> docker build --no-cache=true -t osrframework ./ +``` + +### Example of a New Build + +As an example, generally we build and push the Docker images as follows: +``` +> docker login +> docker build -t osrframework:0.16.6 ./ +> docker tag osrframework:0.16.6 i3visio/osrframework:latest +> docker push i3visio/osrframework:latest +> docker run -it i3visio/osrframework:latest +``` + +We can always opt to launch a beta vesion: + +``` +> docker login +> docker build -t osrframework:0.16.6 --build-arg VERSION=--pre ./ +> docker tag osrframework:beta i3visio/osrframework:beta +> docker push i3visio/osrframework:beta +> docker run -it i3visio/osrframework:beta +``` + diff --git a/doc/USUFY.md b/doc/USUFY.md new file mode 100644 index 0000000..b6914fb --- /dev/null +++ b/doc/USUFY.md @@ -0,0 +1,4 @@ +Using usufy.py +============== + +TODO. diff --git a/osrframework/__init__.py b/osrframework/__init__.py new file mode 100644 index 0000000..06b7d04 --- /dev/null +++ b/osrframework/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2014-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# OSRFramework is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +import osrframework.utils.logger + +# Calling the logger when being imported +osrframework.utils.logger.setupLogger(loggerName="osrframework") +__version__="0.17.2" diff --git a/osrframework/alias_generator.py b/osrframework/alias_generator.py new file mode 100644 index 0000000..00ba867 --- /dev/null +++ b/osrframework/alias_generator.py @@ -0,0 +1,2909 @@ +#!/usr/bin/python2 +# -*- coding: utf-8 -*- +# +################################################################################ +# +# Copyright 2015-2017 Félix Brezo and Yaiza Rubio +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ + + +__author__ = "Felix Brezo, Yaiza Rubio " +__copyright__ = "Copyright 2015-2017, i3visio" +__credits__ = ["Felix Brezo", "Yaiza Rubio"] +__license__ = "AGPLv3+" +__version__ = "v6.0" +__maintainer__ = "Felix Brezo, Yaiza Rubio" +__email__ = "contacto@i3visio.com" + + +import argparse +import json + +import osrframework.utils.banner as banner +import osrframework.utils.general as general + +# GLOBAL OPTIONS +SEPARATORS = ["_", ".", ''] +COMMON_WORDS = ["666", "home", "mr", "news", "official", "real", "xxx"] +LOCALES = ["ar", "de", "en", "es", "fr", "ru"] +LEET_TRANSFORMS = { + "a" : ["4"], + "b" : ["8"], + "e" : ["3"], + "i" : ["1"], + "l" : ["l"], + "o" : ["0"], + "s" : ["5"], + "t" : ["7"], + "z" : ["2"] +} + + +def main(name=None, surname1=None, surname2=None, city=None, country=None, year=None, useNumbers=False, useCommonWords=False, useLeet=False, useLocales=False, extraWords=[]): + """ + The main method that generates the given aliases. + + It receives several parameters as parsed by this module's `getParser()`. + + Args: + ----- + name: String representing the known name of the investigated profile. + surname1: String representing the first surname of the investigated profile. + surname2: String representing the second surname of the investigated + profile. + city: String representing the city where the profile was born or works. + country: String representing the country. + year: String representing a year linked to the profile. + useNumbers: Boolean representing whether to use random numbers at the end. + useCommonWords: Boolean representing whether to use known commond words to + generate new nicknames. + useNumbers: Boolean representing whether to use random numbers at the end. + useLeet: Boolean representing whether to modify certain letters by numbers + using the leet (*133t*) codification. + extraWords: A list of strings with extra words to be appended to the + generatednicknames. + + Returns + ------- + list: An ordered list of the nicknames generated. + """ + # Lowering all the info received + name = name.lower() + surname1 = surname1.lower() + surname2 = surname2.lower() + year = year.lower() + country = country.lower() + city = city.lower() + + # Check if the value provided is a '' string + if name == '': + name = None + if surname1 == '': + surname1 = None + if surname2 == '': + surname2 = None + if year == '': + year = None + if city == '': + city = None + if country == '': + country = None + + print("\nGenerating new aliases...") + + lista = [] + + try: + tmp = name + "" + surname1 + "" + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1[0] + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + + try: + tmp = name + "" + surname1 + "" + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + surname2[0] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + surname2 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + surname2 + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + surname2 + name + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + surname2 + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1[0] + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + name + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + surname2 + "" + name + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + surname2 + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1[0] + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + name + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + surname2 + "" + name + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + surname2 + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + surname2 + name + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + surname2 + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1[0] + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + name + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + surname2 + "" + name + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + surname2 + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + surname2 + name + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + surname2 + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1[0] + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1[0] + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + name + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + surname2 + "" + name + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + surname2 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + city + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1[0] + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + surname2[0] + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + surname2 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + country + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1[0] + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + name + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + surname2 + "" + name + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + surname2[0] + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + surname2 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + year + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1[0] + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + surname1[0] + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + name + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1 + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name + "" + surname1[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + surname1 + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + surname2[0] + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1[0] + "" + surname2 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0] + "" + surname1 + "" + year[-2:] + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0:1] + "" + surname1 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0:2] + "" + surname1 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + try: + tmp = name[0:3] + "" + surname1 + if tmp not in lista: lista.append(tmp) + except: + pass # An element is missing + + # AFTER THE CREATION, WE WILL PERFORM ADDITIONAL TRANSFORMATIONS + # -------------------------------------------------------------- + + # Creating the output list + listaAdditions = [] + listaAdditions += lista + + # Adding common words + if useCommonWords: + for n in lista: + for w in COMMON_WORDS: + try: + tmp = n + "" + w + if tmp not in listaAdditions: listaAdditions.append(tmp) + except: + pass # An element is missing + + # Adding extra words provided by the user + for n in lista: + for w in extraWords: + try: + tmp = n + "" + w + if tmp not in listaAdditions: listaAdditions.append(tmp) + except: + pass # An element is missing + + # Adding loales + if useLocales: + for n in lista: + for l in LOCALES: + try: + tmp = n + "" + l + if tmp not in listaAdditions: listaAdditions.append(tmp) + except: + pass # An element is missing + + # Appending Numbers to the nicks created + if useNumbers: + for n in lista: + for i in range(100): + try: + tmp = n + "" + str(i).rjust(2, "0") + if tmp not in listaAdditions: listaAdditions.append(tmp) + except: + pass # An element is missing + + + + # Appending Numbers to the nicks + if useLeet: + for n in lista: + # This will store the variations of the nicks with all the possible combinations + possibleChanges = [] + possibleChanges += [n] + for k in LEET_TRANSFORMS.keys(): + try: + # Iterating through the list of possible changes found in the array + for change in LEET_TRANSFORMS[k]: + # Replacing the option + tmp = n.replace(k, change ) + if tmp not in listaAdditions: listaAdditions.append(tmp) + + # Applying all the possible changes + newAliases = [] + for f in possibleChanges: + newAliases.append( f.replace(k, change ) ) + + # Adding the new changes + possibleChanges += newAliases + + except: + pass # An element is missing + # Appending the possible combinations which include ALL the possible leet options + for changedAll in possibleChanges: + if changedAll not in listaAdditions: listaAdditions.append(changedAll) + + listaFinal = [] + + # REMOVING THE "" TAGS TO GET THE FINAL NICKNAMES + for s in SEPARATORS: + for n in listaAdditions: + try: + tmp = n.replace("", s) + lastChar = tmp[-1:] + # Verifying if the last char is or not one of the separators to remove it + if not lastChar in SEPARATORS: + if tmp not in listaFinal: listaFinal.append(tmp) + except: + pass # An element is missing + + + # Sorting list + listaFinal.sort() + print("\nProcess finished.") + print("\nGenerated nicks:\n") + print(general.success(json.dumps(listaFinal, indent=2, sort_keys=True))) + print("\nUp to " + general.emphasis(str(len(listaFinal))) + " nicks generated.\n") + print("Writing the results onto the file:\n\t" + general.emphasis(args.outputFile)) + + oF=open(args.outputFile, "w") + for l in listaFinal: + oF.write(l+"\n") + oF.close() + + return listaFinal + +if __name__ == "__main__": + print(general.title(banner.text)) + + parser = argparse.ArgumentParser(description='alias_generator.py is a tool that tries to create possible aliases based on the inputs known from a person.', prog='alias_generator.py', epilog="", add_help=False) + + # Adding the main options + # Defining the mutually exclusive group for the main options + #general = parser.add_mutually_exclusive_group(required=True) + parser.add_argument('-n', '--name', metavar='', default=None, action='store', help='Name of the person.', required=False) + parser.add_argument('-s1', '--surname1', metavar='', default=None, action='store', help='First surname.', required=False) + parser.add_argument('-s2', '--surname2', metavar='', default=None, action='store', help='Second surname.', required=False) + parser.add_argument('-c', '--city', metavar='', default=None, action='store', help='A city linked to the profile.', required=False) + parser.add_argument('-C', '--country', metavar='', default=None, action='store', help='A country.', required=False) + parser.add_argument('-y', '--year', metavar='', default=None, action='store', help='Birth year.', required=False) + parser.add_argument('-o', '--outputFile', metavar='', default="./output.txt", action='store', help='Path to the output file.', required=False) + + # Other options + groupSquatting = parser.add_argument_group('Profile squatting arguments', 'Showing additional configuration options for this program based on the original -s option in usufy.py.') + groupSquatting.add_argument('--numbers', default=False, action='store_true', help='Adds numbers at the end of the nicknames.') + groupSquatting.add_argument('--common_words', default=False, action='store_true', help='Adds some famous words at the end of the nicknames.') + groupSquatting.add_argument('--leet', default=False, action='store_true', help='Adds the leet mode to change \'a\' by \'4\', \'e\' by \'3\', etc.') + groupSquatting.add_argument('--locales', default=False, action='store_true', help='Adds ending linked to countries.') + groupSquatting.add_argument('--extra_words', default=[], action='store', help='Adds new words to the nicknames provided by the user.') + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s '+__version__, help='shows the version of the program and exists.') + + args = parser.parse_args() + + extraWords = args.extra_words + + if args.name == None and args.surname1 == None and args.surname2 == None and args.city == None and args.country == None and args.year == None: + print("\nCollecting information about the profile") + print("----------------------------------------\n") + + args.name = raw_input(general.emphasis("Insert a name: ".ljust(35, " "))).replace(' ','') + args.surname1 = raw_input(general.emphasis("Insert the first surname: ".ljust(35, " "))).replace(' ','') + args.surname2 = raw_input(general.emphasis("Insert the second surname: ".ljust(35, " "))).replace(' ','') + args.year = raw_input(general.emphasis("Insert a year (e. g.: birthyear): ".ljust(35, " "))).replace(' ','') + args.city = raw_input(general.emphasis("Insert a city: ".ljust(35, " "))).replace(' ','') + args.country = raw_input(general.emphasis("Insert a country: ".ljust(35, " "))).replace(' ','') + + if args.extra_words == []: + print("\nAdditional transformations to be added") + print("--------------------------------------\n") + inputText = raw_input(general.emphasis("Extra words to add (',' separated): ".ljust(35, " "))).replace(' ','') + extraWords += inputText.lower().split(',') + + lista=[] + + + print("\nInput data:") + print("-----------\n") + if args.name != "": + print("Name: ".ljust(20, " ") + args.name) + if args.surname1 != "": + print("First Surname: ".ljust(20, " ") + args.surname1) + if args.surname2 != "": + print("Second Surname: ".ljust(20, " ") + args.surname2) + if args.year != "": + print("Year: ".ljust(20, " ") + args.year) + if args.city != "": + print("City: ".ljust(20, " ") + args.city) + if args.country != "": + print("Country: ".ljust(20, " ") + args.country) + + main( + name=args.name, + surname1=args.surname1, + surname2=args.surname2, + city=args.city, + country=args.country, + year=args.year, + useNumbers=args.numbers, + useCommonWords=args.common_words, + useLeet=args.leet, + useLocales=args.locales, + extraWords=extraWords + ) + + # Urging users to place an issue on Github... + print(banner.footer) diff --git a/osrframework/api/__init__.py b/osrframework/api/__init__.py new file mode 100644 index 0000000..ed3ce14 --- /dev/null +++ b/osrframework/api/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# OSRFramework is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import osrframework.utils.logger + +# Calling the logger when being imported +osrframework.utils.logger.setupLogger(loggerName="osrframework.api") diff --git a/osrframework/api/twitter_api.py b/osrframework/api/twitter_api.py new file mode 100644 index 0000000..9379a85 --- /dev/null +++ b/osrframework/api/twitter_api.py @@ -0,0 +1,831 @@ +#!/usr/bin/env python +# encoding: utf-8 +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import time +import tweepy #https://github.com/tweepy/tweepy +import csv + +import osrframework.utils.config_api_keys as api_keys +from osrframework.utils.global_api import APIWrapper as APIWrapper + +class TwitterAPIWrapper(APIWrapper): + ''' + Twitter API wrapper using tweepy API. + ''' + + def __init__(self, api_data=None): + ''' + :param api_data: dictionary containing the credentials for the given platform. + ''' + if api_data == None: + api_data = api_keys.returnListOfAPIKeys()["twitter"] + # Processing the results received by parameter + self.consumer_key= api_data["consumer_key"] + self.consumer_secret= api_data["consumer_secret"] + self.access_key= api_data["access_key"] + self.access_secret = api_data["access_secret"] + + # The platformName, a bit redundant + self.platformName = "Twitter" + + def _connectToAPI(self): + ''' + :return: A tweepy.API object that performs the queries + ''' + #authorize twitter, initialize tweepy + auth = tweepy.OAuthHandler(self.consumer_key, self.consumer_secret) + auth.set_access_token(self.access_key, self.access_secret) + api = tweepy.API(auth) + return api + + def _rate_limit_status(self, api=None, mode=None): + ''' + Verifying the API limits + ''' + if api == None: + api = self.connectToAPI() + + if mode == None: + print json.dumps(api.rate_limit_status(), indent=2) + raw_input("") + else: + # Testing if we have enough queries + while True: + allLimits = api.rate_limit_status() + if mode == "get_user": + limit = allLimits["resources"]["users"]["/users/show/:id"]["limit"] + remaining = allLimits["resources"]["users"]["/users/show/:id"]["remaining"] + reset = allLimits["resources"]["users"]["/users/show/:id"]["reset"] + elif mode == "get_followers": + limit = allLimits["resources"]["followers"]["/followers/ids"]["limit"] + remaining = allLimits["resources"]["followers"]["/followers/ids"]["remaining"] + reset = allLimits["resources"]["followers"]["/followers/ids"]["reset"] + elif mode == "get_friends": + limit = allLimits["resources"]["friends"]["/friends/ids"]["limit"] + remaining = allLimits["resources"]["friends"]["/friends/ids"]["remaining"] + reset = allLimits["resources"]["friends"]["/friends/ids"]["reset"] + elif mode == "search_users": + limit = allLimits["resources"]["users"]["/users/search"]["limit"] + remaining = allLimits["resources"]["users"]["/users/search"]["remaining"] + reset = allLimits["resources"]["users"]["/users/search"]["reset"] + else: + remaining = 1 + """elif mode == "get_all_docs": + limit = allLimits["resources"]REPLACEME["limit"] + remaining = allLimits["resources"]REPLACEME["remaining"] + reset = allLimits["resources"]REPLACEME["reset"]""" + """elif mode == "get_users": + limit = allLimits["resources"]REPLACEME["limit"] + remaining = allLimits["resources"]REPLACEME["remaining"] + reset = allLimits["resources"]REPLACEME["reset"] """ + """else: + remaining = 1""" + # Checking if we have enough remaining queries + if remaining > 0: + #raw_input(str(remaining) + " queries yet...") + break + else: + waitTime = 60 + print "No more queries remaining, sleeping for " + str(waitTime) +" seconds..." + time.sleep(waitTime) + + return 0 + + def _processUser(self, jUser): + ''' + Convert tweepy.User to a i3visio-like user. This will process the returned JSON object that the API returns to transform it to the i3visio-like format. A sample answer is copied now when testing it to the @i3visio user in Twitter. +{ + "follow_request_sent": false, + "has_extended_profile": false, + "profile_use_background_image": true, + "profile_text_color": "333333", + "default_profile_image": false, + "id": 2594815981, + "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png", + "verified": false, + "profile_location": null, + "profile_image_url_https": "https://pbs.twimg.com/profile_images/491716630292881408/FBqYf9qv_normal.png", + "profile_sidebar_fill_color": "DDEEF6", + "entities": { + "url": { + "urls": [ + { + "url": "http://t.co/Vus95W8ub6", + "indices": [ + 0, + 22 + ], + "expanded_url": "http://www.i3visio.com", + "display_url": "i3visio.com" + } + ] + }, + "description": { + "urls": [ + { + "url": "http://t.co/SGty7or6SQ", + "indices": [ + 30, + 52 + ], + "expanded_url": "http://github.com/i3visio/osrframework", + "display_url": "github.com/i3visio/osrfra\u2026" + } + ] + } + }, + "followers_count": 21, + "profile_sidebar_border_color": "C0DEED", + "id_str": "2594815981", + "profile_background_color": "C0DEED", + "listed_count": 5, + "status": { + "lang": "es", + "favorited": false, + "entities": { + "symbols": [], + "user_mentions": [], + "hashtags": [], + "urls": [] + }, + "contributors": null, + "truncated": false, + "text": "Podemos confirmar que Alpify, aunque acabe en ...fy no es una aplicaci\u00f3n nuestra. ;) \u00a1A aprovechar lo que queda de domingo!", + "created_at": "Sun Aug 16 17:35:37 +0000 2015", + "retweeted": true, + "in_reply_to_status_id_str": null, + "coordinates": null, + "in_reply_to_user_id_str": null, + "source": "Twitter Web Client", + "in_reply_to_status_id": null, + "in_reply_to_screen_name": null, + "id_str": "632968969662689280", + "place": null, + "retweet_count": 1, + "geo": null, + "id": 632968969662689280, + "favorite_count": 0, + "in_reply_to_user_id": null + }, + "is_translation_enabled": false, + "utc_offset": null, + "statuses_count": 56, + "description": "Leading OSRFramework project (http://t.co/SGty7or6SQ) for researching in Open Sources. #security #osint #socialengineering", + "friends_count": 10, + "location": "Espa\u00f1a", + "profile_link_color": "0084B4", + "profile_image_url": "http://pbs.twimg.com/profile_images/491716630292881408/FBqYf9qv_normal.png", + "following": true, + "geo_enabled": false, + "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png", + "name": "i3visio", + "lang": "en", + "profile_background_tile": false, + "favourites_count": 6, + "screen_name": "i3visio", + "notifications": false, + "url": "http://t.co/Vus95W8ub6", + "created_at": "Sun Jun 29 13:27:20 +0000 2014", + "contributors_enabled": false, + "time_zone": null, + "protected": false, + "default_profile": true, + "is_translator": false +} + + :param jUser: A Json representing the information of a profile as returned by the API. + + + :return: Dict in i3visio-like format. + ''' + #raw_input(json.dumps(jUser, indent=2)) + r = {} + r["type"] = "i3visio.profile" + r["value"] = self.platformName + " - " + jUser["screen_name"] + r["attributes"] = [] + + # Appending platform URI + """aux = {} + aux["type"] = "i3visio.uri" + aux["value"] = qURL + aux["attributes"] = [] + r["attributes"].append(aux) """ + # Appending the id + aux = {} + aux["type"] = "@twitter_id" + aux["value"] = jUser["id_str"] + aux["attributes"] = [] + r["attributes"].append(aux) + + # Appending the alias + aux = {} + aux["type"] = "i3visio.alias" + aux["value"] = jUser["screen_name"] + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending fullname + aux = {} + aux["type"] = "i3visio.fullname" + aux["value"] = jUser["name"] + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending description + aux = {} + aux["type"] = "i3visio.text" + aux["value"] = jUser["description"] if jUser["description"] != "" else "[N/A]" + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending platform name + aux = {} + aux["type"] = "i3visio.platform" + aux["value"] = self.platformName + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending location + aux = {} + aux["type"] = "i3visio.location" + aux["value"] = jUser["location"] if jUser["location"] != "" else "[N/A]" + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending profile_location + aux = {} + aux["type"] = "i3visio.location.current" + aux["value"] = jUser["profile_location"] if jUser["profile_location"] != None else "[N/A]" + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending uri homepage + try: + urls = jUser["entities" ]["url"]["urls"] + for url in urls: + aux = {} + aux["type"] = "i3visio.uri.homepage" + aux["value"] = url["expanded_url"] if url["expanded_url"] != None else "[N/A]" + aux["attributes"] = [] + r["attributes"].append(aux) + except Exception as e: + #Something happenned when parsing the URLS + aux = {} + aux["type"] = "i3visio.uri.homepage" + aux["value"] = "[N/A]" + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending profile uri homepage + try: + aux = {} + aux["type"] = "i3visio.uri.image.profile" + aux["value"] = jUser["profile_image_url"] if jUser["profile_image_url"] != None else "[N/A]" + aux["attributes"] = [] + r["attributes"].append(aux) + except Exception as e: + #Something happenned when parsing the Profile URL + aux = {} + aux["type"] = "i3visio.uri.image.profile" + aux["value"] = "[N/A]" + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending uri background + try: + aux = {} + aux["type"] = "i3visio.uri.image.background" + aux["value"] = jUser["profile_background_image_url"] if jUser["profile_background_image_url"] != None else "[N/A]" + aux["attributes"] = [] + r["attributes"].append(aux) + except Exception as e: + #Something happenned when parsing the background URL + aux = {} + aux["type"] = "i3visio.uri.image.background" + aux["value"] = "[N/A]" + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending created_at + aux = {} + aux["type"] = "@created_at" + aux["value"] = jUser["created_at"] + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending friends_count + aux = {} + aux["type"] = "@friends_count" + aux["value"] = str(jUser["friends_count"]) + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending followers_count + aux = {} + aux["type"] = "@followers_count" + aux["value"] = str(jUser["followers_count"]) + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending protected + aux = {} + aux["type"] = "@protected" + aux["value"] = str(jUser["protected"]).lower() + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending geo_enabled + aux = {} + aux["type"] = "@geo_enabled" + aux["value"] = str(jUser["geo_enabled"]).lower() + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending language + aux = {} + aux["type"] = "@language" + aux["value"] = jUser["lang"] + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending time_zone + aux = {} + aux["type"] = "@time_zone" + aux["value"] = jUser["time_zone"] if jUser["time_zone"] != None else "[N/A]" + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending verified + aux = {} + aux["type"] = "@verified" + aux["value"] = str(jUser["verified"]).lower() + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending listed_count + aux = {} + aux["type"] = "@listed_count" + aux["value"] = str(jUser["listed_count"]) + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending publications_count + aux = {} + aux["type"] = "@publications_count" + aux["value"] = str(jUser["statuses_count"]) + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending favourites_count + aux = {} + aux["type"] = "@favourites_count" + aux["value"] = str(jUser["favourites_count"]) + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending suspended + try: + aux = {} + aux["type"] = "@suspended" + aux["value"] = str(jUser["suspended"]).lower() + aux["attributes"] = [] + r["attributes"].append(aux) + except: + pass + return r + + def get_all_docs(self, screen_name): + ''' + Method to get all the tweets emitted by a user. + + :param screen_name: The Twitter username. + + :return: List of tweets. + ''' + def _getNewTweets(api, screen_name,count=200, oldest=None, waitTime=60): + ''' + MEthod that recovers the new tweets or waits until the number of remaining calls has been freed. + + :param api: A valid and connected api. + :param screen_name: screen_name of the user to monitor. + :param count: Number of tweets to grab per iteration. + :param oldes: Oldest tweet to grab in this iteration. + :param waitTime: Number of seconds to wait between tries. + + :return: List of new_tweets + ''' + # Verifying the limits of the API + #self._rate_limit_status(api=api, mode="get_all_docs") + + waiting = True + while waiting == True: + try: + if oldest != None: + # We have to update the oldest id + new_tweets = api.user_timeline(screen_name=screen_name, count=count, max_id=oldest) + else: + new_tweets = api.user_timeline(screen_name=screen_name, count=count) + waiting = False + #save most recent tweets + + except Exception as e: + # Error... We will have to wait + #waiting = True + print str(e) + #print(traceback.format_exc()) + print "No more queries remaining, sleeping for " + str(waitTime) +" seconds..." + time.sleep(waitTime) + + return new_tweets + + # Connecting to the API + api = self._connectToAPI() + + #initialize a list to hold all the tweepy Tweets + alltweets = [] + + #make initial request for most recent tweets (200 is the maximum allowed count) + """waiting = True + while waiting == True: + try: + new_tweets = api.user_timeline(screen_name = screen_name,count=200) + waiting = False + except: + # Error... We will have to wait + waiting = True + time.sleep(waitTime) """ + new_tweets = _getNewTweets(api, screen_name) + + alltweets.extend(new_tweets) + # Storing manually all the json representation for the tweets + jTweets = [] + for n in new_tweets: + jTweets.append(n._json) + if len(alltweets) > 0: + #save the id of the oldest tweet less one + oldest = alltweets[-1].id - 1 + + #keep grabbing tweets until there are no tweets left to grab + while len(new_tweets) > 0: + print "Getting tweets before %s" % (oldest) + + """ #all subsequent requests use the max_id param to prevent duplicates + waiting = True + while waiting == True: + try: + # We have to update the oldest id + new_tweets = api.user_timeline(screen_name = screen_name,count=200, max_id=oldest) + waiting = False + #save most recent tweets + + except: + # Error... We will have to wait + waiting = True + print "No more queries remaining, sleeping for " + str(waitTime) +" seconds..." + time.sleep(waitTime) """ + + new_tweets = _getNewTweets(api, screen_name, oldest=oldest) + + # Extending the list of tweets + alltweets.extend(new_tweets) + + #update the id of the oldest tweet less one + oldest = alltweets[-1].id - 1 + print "... %s tweets downloaded so far" % (len(alltweets)) + # Storing manually all the json representation for the tweets + for n in new_tweets: + jTweets.append(n._json) + else: + # Verifying the limits of the API + print json.dumps(self._rate_limit_status(api=api, mode="get_all_docs"), indent =2) + + #transform the tweepy tweets into a 2D array that will populate the csv + outtweets = [] + # This is how it is represented + """ + "status": { + "lang": "es", + "favorited": false, + "entities": { + "symbols": [], + "user_mentions": [], + "hashtags": [], + "urls": [] + }, + "contributors": null, + "truncated": false, + "text": "Podemos confirmar que Alpify, aunque acabe en ...fy no es una aplicaci\u00f3n nuestra. ;) \u00a1A aprovechar lo que queda de domingo!", + "created_at": "Sun Aug 16 17:35:37 +0000 2015", + "retweeted": true, + "in_reply_to_status_id_str": null, + "coordinates": null, + "in_reply_to_user_id_str": null, + "source": "Twitter Web Client", + "in_reply_to_status_id": null, + "in_reply_to_screen_name": null, + "id_str": "632968969662689280", + "place": null, + "retweet_count": 1, + "geo": null, + "id": 632968969662689280, + "favorite_count": 0, + "in_reply_to_user_id": null + }, + """ + for tweet in jTweets: + row =[] + row.append(tweet["id_str"]) + row.append(tweet["created_at"]) + row.append(tweet["text"].encode("utf-8")) + row.append(tweet["source"]) + row.append(tweet["coordinates"]) + row.append(tweet["retweet_count"]) + row.append(tweet["favorite_count"]) + row.append(tweet["lang"]) + row.append(tweet["place"]) + row.append(tweet["geo"]) + row.append(tweet["id"]) + row.append(screen_name) + + # URLS + urls = [] + """ + [ + { + "url": "http://t.co/SGty7or6SQ", + "indices": [ + 30, + 52 + ], + "expanded_url": "http://github.com/i3visio/osrframework", + "display_url": "github.com/i3visio/osrfra\u2026" + } + ] + """ + for u in tweet["entities"]["urls"]: + urls.append(u["expanded_url"]) + # Creating the string value for the cell + str_urls ="" + if len(urls) == 0: + str_urls = "[N/A]" + else: + for i, u in enumerate(urls): + str_urls += u + # Appending a separator + if i+1 <> len(urls): + str_urls+= "|" + row.append(str_urls.encode('utf-8')) + + # TODO: Extract Mentions + # + mentions = [] + """ "user_mentions": [ + { + "id": 66345537, + "indices": [ + 0, + 10 + ], + "id_str": "66345537", + "screen_name": "muchotomy", + "name": "Tomy" + }, + """ + for a in tweet["entities"]["user_mentions"]: + mentions.append(a["screen_name"]) + # Creating the string value for the cell + str_mentions ="" + if len(mentions) == 0: + str_mentions = "[N/A]" + else: + for i, m in enumerate(mentions): + str_mentions += m + # Appending a separator + if i+1 <> len(mentions): + str_mentions+= "|" + row.append(str_mentions.encode('utf-8')) + + # Appending the row to the output + outtweets.append(row) + + # Writing the csv + with open('%s_tweets.csv' % screen_name, 'wb') as f: + writer = csv.writer(f) + # Writing the headers + writer.writerow([ + "_tweet_id", + "_tweet_created_at", + "_tweet_text", + "_tweet_source", + "_tweet_coordinates", + "_tweet_retweet_count", + "_tweet_favourite_count", + "_tweet_lang", + "i3visio_location", + "_tweet_geo", + "_twitter_id", + "i3visio_alias", + "i3visio_uri", + "i3visio_alias_mentions", + ]) + # Writing the rows + #writer.writerows(outtweets) + for o in outtweets: + try: + writer.writerow(o) + except: + print o + + return jTweets + + def get_followers(self, query): + ''' + Method to get the followers of a user. + + :param query: Query to be performed. + + :return: List of ids. + ''' + # Connecting to the API + api = self._connectToAPI() + + # Verifying the limits of the API + self._rate_limit_status(api=api, mode="get_followers") + + # Making the call to the API + try: + friends_ids = api.followers_ids(query) + except: + return [] + + """res = [] + # Extracting the information from each profile + for a in aux: + us= self.getUser(a) + res.append(self._processUser(us))""" + + return friends_ids + + def get_friends(self, query): + ''' + Method to get the friends of a user. + + :param query: Query to be performed. + + :return: List of users. + ''' + # Connecting to the API + api = self._connectToAPI() + + # Verifying the limits of the API + self._rate_limit_status(api=api, mode="get_friends") + + # Making the call to the API + try: + friends_ids = api.friends_ids(query) + except: + return [] + + """res = [] + # Extracting the information from each profile + for a in aux: + us= self.getUser(a) + res.append(self._processUser(us))""" + + return friends_ids + + + def get_user(self, screen_name): + ''' + Method to perform the usufy searches. + + :param screen_name: nickname to be searched. + + :return: User. + ''' + # Connecting to the API + api = self._connectToAPI() + + # Verifying the limits of the API + self._rate_limit_status(api=api, mode="get_user") + + aux = [] + try: + user = api.get_user(screen_name) + # Iterate through the results using user._json + aux.append(user._json) + except tweepy.error.TweepError as e: + pass + + res = [] + # Extracting the information from each profile + for a in aux: + res.append(self._processUser(a)) + return res + + def search_users(self, query, n=20, maxUsers=60): + ''' + Method to perform the searchfy searches. + + :param query: Query to be performed. + :param n: Number of results per query. + :param maxUsers: Max. number of users to be recovered. + + :return: List of users + ''' + # Connecting to the API + api = self._connectToAPI() + + # Verifying the limits of the API + self._rate_limit_status(api=api, mode="search_users") + + aux = [] + + page = 0 + + # print "Getting page %s of new users..." % page+1 + # Making the call to the API + try: + newUsers = api.search_users(query, n, page) + + for n in newUsers: + aux.append(n._json) + + #keep grabbing tweets until there are no tweets left to grab + while len(aux) < maxUsers & len(newUsers)>0: + page+=1 + print "Getting page %s of new users..." % page + + # Grabbing new Users + newUsers = api.search_users(query, n, page) + + # Save the users found + aux.extend(newUsers) + except: + pass + + res = [] + # Extracting the information from each profile + for a in aux: + res.append(self._processUser(a)) + + return res + + +def main(args): + ''' + Query manager. + ''' + # Creating the instance + tAW = TwitterAPIWrapper() + + # Selecting the query to be launched + if args.type == "get_all_docs": + results = tAW.get_all_docs(args.query) + + elif args.type == "get_user": + results = tAW.get_user(args.query) + + elif args.type == "get_followers": + results = tAW.get_followers(args.query) + + print "... %s followers downloaded... " % (len(results)) + #write the csv + with open('%s_followers.csv' % args.query, 'wb') as f: + writer = csv.writer(f) + for r in results: + writer.writerow([args.query,str(r)]) + + elif args.type == "get_friends": + results = tAW.get_friends(args.query) + print "... %s friends downloaded... " % (len(results)) + #write the csv + with open('%s_friends.csv' % args.query, 'wb') as f: + writer = csv.writer(f) + for r in results: + writer.writerow([args.query,str(r)]) + + elif args.type == "search_users": + results = tAW.search_users(args.query) + + return results + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='A library that wraps searches onto the Twitter API.', prog='twitter_api.py', epilog="NOTE: the API tokens will be searched in api_keys.cfg configuration file.", add_help=False) + # Adding the main options + # Defining the mutually exclusive group for the main options + parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to the Twitter API.', required=True) + parser.add_argument('-t', '--type', action='store', choices=["get_all_docs", "get_user", "get_followers", "get_friends", "search_users"], help='Type of query to be performed.', required=True) + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') + + args = parser.parse_args() + + results = main(args) + + #print json.dumps(results, indent=2) + print len(results) + diff --git a/osrframework/domainfy.py b/osrframework/domainfy.py new file mode 100644 index 0000000..ad22a68 --- /dev/null +++ b/osrframework/domainfy.py @@ -0,0 +1,528 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +################################################################################ +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ + + +__author__ = "Felix Brezo, Yaiza Rubio" +__copyright__ = "Copyright 2016-2017, i3visio" +__credits__ = ["Felix Brezo", "Yaiza Rubio"] +__license__ = "AGPLv3+" +__version__ = "v6.0" +__maintainer__ = "Felix Brezo, Yaiza Rubio" +__email__ = "contacto@i3visio.com" + + +import argparse +import datetime as dt +import json +import os +import signal +import socket +import whois + +# global issues for multiprocessing +from multiprocessing import Process, Queue, Pool + +import osrframework.domains.gtld as gtld +import osrframework.domains.cctld as cctld +import osrframework.domains.generic_tld as generic_tld +import osrframework.domains.geographic_tld as geographic_tld +import osrframework.domains.brand_tld as brand_tld +import osrframework.domains.other_subdomains as other_subdomains + +import osrframework.utils.banner as banner +import osrframework.utils.platform_selection as platform_selection +import osrframework.utils.configuration as configuration +import osrframework.utils.general as general + +# Defining the TLD dictionary based on +TLD = {} +# Global TLD +TLD["global"] = gtld.tld +# Country Code TLD +TLD["cc"] = cctld.tld +# Generic TLD +TLD["generic"] = generic_tld.tld +# Geographic TLD +TLD["geographic"] = geographic_tld.tld +# Brand TLD +TLD["brand"] = brand_tld.tld +# Brand TLD +TLD["other"] = other_subdomains.tld + +def getNumberTLD(): + """ + Counting the total number of TLD being processed. + """ + total = 0 + for typeTld in TLD.keys(): + total+= len(TLD[typeTld]) + return total + + +def getWhoisInfo(domain): + """ + Method that trie to recover the whois info from a domain. + + Args: + ----- + domain: The domain to verify. + + Returns: + -------- + dict: A dictionary containing the result as an i3visio entity with its + `value`, `type` and `attributes`. + """ + new = [] + + # Grabbing the aliases + try: + emails = {} + emails["type"] = "i3visio.alias" + emails["value"] = str(domain.split(".")[0]) + emails["attributes"] = [] + new.append(emails) + except: + pass + + info = whois.whois(domain) + + if info.status == None: + raise Exception("UnknownDomainError: " + domain + " could not be resolved.") + + # Grabbing the emails + try: + emails = {} + emails["type"] = "i3visio.email" + if type(info.emails) is not list: + aux = [info.emails] + emails["value"] = json.dumps(aux) + else: + emails["value"] = json.dumps(info.emails) + emails["attributes"] = [] + new.append(emails) + except: + pass + + # Grabbing the country + try: + tmp = {} + tmp["type"] = "i3visio.location.country" + tmp["value"] = str(info.country) + tmp["attributes"] = [] + new.append(tmp) + except: + pass + + # Grabbing the regitrar + try: + tmp = {} + tmp["type"] = "i3visio.registrar" + tmp["value"] = str(info.registrar) + tmp["attributes"] = [] + new.append(tmp) + except: + pass + + # Grabbing the regitrar + try: + tmp = {} + tmp["type"] = "i3visio.fullname" + try: + tmp["value"] = str(info.name) + except: + tmp["value"] = info.name + tmp["attributes"] = [] + new.append(tmp) + except: + pass + + return new + + +def createDomains(tlds, nicks=None, nicksFile=None): + """ + Method that globally permits to generate the domains to be checked. + + Args: + ----- + tlds: List of tlds. + nicks: List of aliases. + nicksFile: The filepath to the aliases file. + + Returns: + -------- + list: list of domains to be checked. + """ + domain_candidates = [] + if nicks != None: + for n in nicks: + for t in tlds: + tmp = { + "domain" : n + t["tld"], + "type" : t["type"], + "tld": t["tld"] + } + domain_candidates.append(tmp) + elif nicksFile != None: + with open(nicksFile, "r") as iF: + nicks = iF.read().splitlines() + for n in nicks: + for t in tlds: + tmp = { + "domain" : n + t["tld"], + "type" : t["type"], + "tld": t["tld"] + } + domain_candidates.append(tmp) + return domain_candidates + + +def isBlackListed(ipv4): + """ + Method that checks if an IPv4 is blackslited + + There are some providers that resolve always. We have identified these IP + so we have to perform an additional chdeck to confirm that the returned + IPv4 is not a false positive. + + Args: + ----- + ipv4: The IP to be verified. + + Returns: + -------- + bool: It returns whether the IP is blacklisted. + """ + BLACKLISTED = [ + "45.79.222.138", + "88.198.29.97", + "91.144.20.76", + "127.0.0.1", + "127.0.0.2", + "127.0.53.53", + "141.8.226.58", + "144.76.162.245" + ] + + if ipv4 in BLACKLISTED: + return True + else: + return False + +def pool_function(domain): + """ + Wrapper for being able to launch all the threads of getPageWrapper. + + Args: + ----- + domain: We receive the parameters as a dictionary. + ``` + { + "domain" : ".com", + "type" : "global" + } + ``` + Returns: + -------- + dict: A dictionary containing the following values: + `{"platform" : str(domain), "status": "DONE", "data": aux}` + """ + is_valid = True + try: + ipv4 = socket.gethostbyname(domain["domain"]) + + # Check if this ipv4 normally throws false positives + if isBlackListed(ipv4): + return {"platform" : str(domain), "status": "ERROR", "data": {}} + + #If we arrive here... The domain exists!! + aux = {} + aux["type"] = "i3visio.result" + aux["value"] = "Domain Info - " + domain["domain"] + # Performing whois info + try: + aux["attributes"] = getWhoisInfo(domain["domain"]) + except Exception as e: + # If something happened... Well, we'll return an empty attributes array. + aux["attributes"] = [] + + tmp = {} + tmp["type"] = "i3visio.domain" + tmp["value"] = domain["domain"] + tmp["attributes"] = [] + + aux["attributes"].append(tmp) + + tmp = {} + tmp["type"] = "i3visio.tld_type" + tmp["value"] = domain["type"] + tmp["attributes"] = [] + + aux["attributes"].append(tmp) + + tmp = {} + tmp["type"] = "i3visio.ipv4" + tmp["value"] = ipv4 + tmp["attributes"] = [] + + aux["attributes"].append(tmp) + + return {"platform" : str(domain), "status": "DONE", "data": aux} + except Exception as e: + return {"platform" : str(domain), "status": "ERROR", "data": {}} + + +def performSearch(domains=[], nThreads=16): + """ + Method to perform the mail verification process. + + Arguments + --------- + domains: List of domains to check. + nThreads: Number of threads to use. + + Returns + ------- + list: A list containing the results as i3visio entities. + """ + results = [] + + # Using threads in a pool if we are not running the program in main + args = [] + + # Returning None if no valid domain has been returned + if len(domains) == 0: + return results + + # If the process is executed by the current app, we use the Processes. It is faster than pools. + if nThreads <= 0 or nThreads > len(domains): + nThreads = len(domains) + + # Launching the Pool + # ------------------ + # Example catched from: https://stackoverflow.com/questions/11312525/catch-ctrlc-sigint-and-exit-multiprocesses-gracefully-in-python + try: + original_sigint_handler = signal.signal(signal.SIGINT, signal.SIG_IGN) + pool = Pool(nThreads) + signal.signal(signal.SIGINT, original_sigint_handler) + except ValueError: + # To avoid: ValueError: signal only works in main thread + pool = Pool(nThreads) + + poolResults = [] + try: + def log_result(result): + # This is called whenever foo_pool(i) returns a result. + # result_list is modified only by the main process, not the pool workers. + poolResults.append(result) + + for d in domains: + # We need to create all the arguments that will be needed + parameters = ( d, ) + pool.apply_async (pool_function, args= parameters, callback = log_result ) + + # Waiting for results to be finished + while len(poolResults) < len(domains): + pass + # Closing normal termination + pool.close() + except KeyboardInterrupt: + print(general.warning("\nProcess manually stopped by the user. Terminating workers.\n")) + pool.terminate() + print(general.warning("The following domains were not processed:")) + pending_tld = "" + for d in domains: + processed = False + for processedDomain in poolResults: + if str(d) == processedDomain["platform"]: + processed = True + break + if not processed: + print(general.warning("\t- " + str(d["domain"]))) + pending_tld += " " + str(d["tld"]) + print(general.warning("[!] If you want to relaunch the app with these domains you can always run the command with: ")) + print(general.warning("\t domainfy.py ... -t none -u " + pending_tld)) + print(general.warning("[!] If you prefer to avoid these platforms you can manually evade them for whatever reason with: ")) + print(general.warning("\t domainfy.py ... -x " + pending_tld)) + pool.join() + + # Processing the results + # ---------------------- + for serArray in poolResults: + data = serArray["data"] + # We need to recover the results and check if they are not an empty json or None + if data != None and data != {}: + results.append(data) + return results + +def main(args): + """ + Main function to launch phonefy. + + The function is created in this way so as to let other applications make + use of the full configuration capabilities of the application. The + parameters received are used as parsed by this modules `getParser()`. + + Args: + ----- + args: The parameters as processed by this modules `getParser()`. + + Results: + -------- + list: Returns a list with i3visio entities. + """ + results = [] + if not args.quiet: + print(general.title(banner.text)) + + sayingHello = """ +domainfy.py Copyright (C) F. Brezo and Y. Rubio (i3visio) 2016-2017 + +This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you +are welcome to redistribute it under certain conditions. For additional info, +visit """ + general.LICENSE_URL + "\n" + print(general.title(sayingHello)) + + if args.license: + general.showLicense() + else: + # Processing the options returned to remove the "all" option + tlds = [] + if "all" in args.tlds: + for typeTld in TLD.keys(): + for tld in TLD[typeTld]: + if tld not in args.exclude: + tlds.append({ "tld" : tld, "type" : typeTld }) + elif "none" in args.tlds: + pass + else: + for typeTld in TLD.keys(): + if typeTld in args.tlds: + for tld in TLD[typeTld]: + if tld not in args.exclude: + tlds.append({ "tld" : tld, "type" : typeTld }) + + for new in args.user_defined: + if new not in args.exclude: + tlds.append( {"tld": new, "type": "user_defined"}) + + if args.nicks: + domains = createDomains(tlds, nicks = args.nicks) + else: + # nicks_file + domains = createDomains(tlds, nicksFile = args.nicks_file) + + # Showing the execution time... + if not args.quiet: + startTime= dt.datetime.now() + print(str(startTime) + "\tTrying to identify the existence of " + general.emphasis(str(len(domains))) + " domain(s)... Relax!\n") + print(general.emphasis("\tPress to stop...\n")) + + # Perform searches, using different Threads + results = performSearch(domains, args.threads) + + # Trying to store the information recovered + if args.output_folder != None: + if not os.path.exists(args.output_folder): + os.makedirs(args.output_folder) + # Grabbing the results + fileHeader = os.path.join(args.output_folder, args.file_header) + for ext in args.extension: + # Generating output files + general.exportUsufy(results, ext, fileHeader) + + # Showing the information gathered if requested + if not args.quiet: + print("A summary of the results obtained are shown in the following table:\n") + try: + print(general.success(general.usufyToTextExport(results))) + except: + print(general.warning("\nSomething happened when exporting the results. The Json will be shown instead:\n")) + print(general.warning(json.dumps(results, indent=2))) + + now = dt.datetime.now() + print("\n" + str(now) + "\tYou can find all the information collected in the following files:") + for ext in args.extension: + # Showing the output files + print("\t" + general.emphasis(fileHeader + "." + ext)) + + # Showing the execution time... + if not args.quiet: + # Showing the execution time... + endTime= dt.datetime.now() + print("\n" + str(endTime) +"\tFinishing execution...\n") + print("Total time used:\t" + general.emphasis(str(endTime-startTime))) + print("Average seconds/query:\t" + general.emphasis(str((endTime-startTime).total_seconds()/len(domains))) +" seconds\n") + + # Urging users to place an issue on Github... + print(banner.footer) + + return results + +def getParser(): + DEFAULT_VALUES = configuration.returnListOfConfigurationValues("domainfy") + # Capturing errors just in case the option is not found in the configuration + try: + excludeList = [DEFAULT_VALUES["exclude_platforms"]] + except: + excludeList = [] + + parser = argparse.ArgumentParser(description='domainfy.py - Checking the existence of domains.', prog='domainfy.py', epilog='Check the README.md file for further details on the usage of this program or follow us on Twitter in .', add_help=False) + parser._optionals.title = "Input options (one required)" + + # Defining the mutually exclusive group for the main options + groupMainOptions = parser.add_mutually_exclusive_group(required=True) + # Adding the main options + groupMainOptions.add_argument('--license', required=False, action='store_true', default=False, help='shows the GPLv3+ license and exists.') + groupMainOptions.add_argument('-n', '--nicks', metavar='', nargs='+', action='store', help = 'the list of nicks to be checked in the domains selected.') + groupMainOptions.add_argument('-N', '--nicks_file', metavar='', action='store', help = 'the file with the list of nicks to be checked in the domains selected.') + + # Configuring the processing options + groupProcessing = parser.add_argument_group('Processing arguments', 'Configuring the way in which mailfy will process the identified profiles.') + #groupProcessing.add_argument('-L', '--logfolder', metavar='. +# +################################################################################## diff --git a/osrframework/domains/brand_tld.py b/osrframework/domains/brand_tld.py new file mode 100644 index 0000000..411898d --- /dev/null +++ b/osrframework/domains/brand_tld.py @@ -0,0 +1,96 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +tld = { + ".allfinanz", # Allfinanz Deutsche Vermögensberatung Aktiengesellschaft + ".android", # Google (Android) + ".aquarelle", # Aquarelle_Group + ".axa", # AXA + ".barclays", # Barclays + ".barclaycard", # Barclays + ".bloomberg", # Bloomberg IP Holdings LLC + ".bmw", # BMW + ".bnl", # Banca Nazionale del Lavoro + ".bnpparibas", # BNP Paribas + ".cal", # Google (Google Calendar) + ".caravan", # Caravan International, Inc. + ".cern", # CERN + ".chrome", # Google (Google Chrome) + ".citic", # CITIC Group + ".crs", # Federated Co-operatives Limited + ".cuisinella", # Société Alsacienne de Meubles (Cuisinella) + ".dnp", # Dai Nippon Printing Co. + ".dvag", # Deutsche Vermögensberatung Aktiengesellschaft + ".emerck", # Merck KGaA + ".everbank", # EverBank + ".firmdale", # Firmdale Holdings + ".flsmidth", # FLSmidth A/S + ".frogans", # OP3FT + ".gbiz", # Google + ".gle", # Google + ".globo", # Grupo Globo + ".gmail", # Google (Gmail) + ".gmo", # GMO Internet + ".gmx", # 1&1 Mail & Media (Global Message Exchange) + ".google", # Google + ".hsbc", # HSBC + ".ibm", # IBM + ".kred", # KredTLD + ".lacaixa", # Caixa d’Estalvis i Pensions de Barcelona + ".latrobe", # La Trobe University + ".lds", # The Church of Jesus Christ of Latter-day Saints (LDS Church)[184] + ".mango", # MANGO + ".mini", # BMW (Mini) + ".monash", # Monash University + ".mormon", # The Church of Jesus Christ of Latter-day Saints (LDS Church)[184] + ".neustar", # Neustar + ".nexus", # Google (Google Nexus) + ".nhk", # NHK + ".nico", # Dwango Co., Ltd. (Niconico) + ".nra", # National Rifle Association + ".otsuka", # Otsuka Holdings + ".ovh", # OVH + ".piaget", # Piaget SA + ".pohl", # Deutsche Vermögensberatung Aktiengesellschaft + ".praxi", # Praxi + ".prod", # Google (products) + ".pwc", # PwC + ".sandvikcoromant", # Sandvik Coromant + ".sca", # Svenska Cellulosa Aktiebolaget + ".scb", # Siam Commercial Bank + ".schmidt", # Société Alsacienne de Meubles (Cuisines Schmidt) + ".seek", # Seek Limited + ".sohu", # Sohu + ".spiegel", # Spiegel-Verlag + ".suzuki", # Suzuki Motor Corporation + ".tui", # TUI AG + ".uol", # Universo Online + ".williamhill", # William Hill + ".wme", # William Morris Endeavor Entertainment + ".wtc", # World Trade Centers Association + ".yandex", # Yandex + ".youtube", # Google (YouTube) + ".xn--fiq64b", # .中信 + ".xn--vermgensberater-ctb", # .vermögensberater + ".xn--vermgensberatung-pwb", # .vermögensberatung + ".xn--qcka1pmc", # .グーグル + ".xn--flw351e", # .谷歌 + ".xn--cg4bki", # .삼성 +} diff --git a/osrframework/domains/cctld.py b/osrframework/domains/cctld.py new file mode 100644 index 0000000..f2cae25 --- /dev/null +++ b/osrframework/domains/cctld.py @@ -0,0 +1,356 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +tld = { + ".ac", # Ascension Island + ".ad", # Andorra + ".ae", # United Arab Emirates + ".af", # Afghanistan + ".ag", # Antigua and Barbuda + ".ai", # Anguilla + ".al", # Albania + ".am", # Armenia + ".an", # Netherlands Antilles + ".ao", # Angola + ".aq", # Antarctica + ".ar", # Argentina + ".as", # American Samoa + ".at", # Austria + ".au", # Australia + ".aw", # Aruba + ".ax", # Åland + ".az", # Azerbaijan + ".ba", # Bosnia and Herzegovina + ".bb", # Barbados + ".bd", # Bangladesh + ".be", # Belgium + ".bf", # Burkina Faso + ".bg", # Bulgaria + ".bh", # Bahrain + ".bi", # Burundi + ".bj", # Benin + ".bm", # Bermuda + ".bn", # Brunei + ".bo", # Bolivia + ".bq", # Bonaire + ".br", # Brazil + ".bs", # Bahamas + ".bt", # Bhutan + ".bv", # Bouvet Island + ".bw", # Botswana + ".by", # Belarus + ".bz", # Belize + ".ca", # Canada + ".cc", # Cocos (Keeling) Islands + ".cd", # Democratic Republic of the Congo + ".cf", # Central African Republic + ".cg", # Republic of the Congo + ".ch", # Switzerland + ".ci", # Côte d'Ivoire + ".ck", # Cook Islands + ".cl", # Chile + ".cm", # Cameroon + ".cn", # People's Republic of China + ".co", # Colombia + ".cr", # Costa Rica + ".cu", # Cuba + ".cv", # Cape Verde + ".cw", # Curaçao + ".cx", # Christmas Island + ".cy", # Cyprus + ".cz", # Czech Republic + ".de", # Germany + ".dj", # Djibouti + ".dk", # Denmark + ".dm", # Dominica + ".do", # Dominican Republic + ".dz", # Algeria + ".ec", # Ecuador + ".ee", # Estonia + ".eg", # Egypt + ".eh", # Western Sahara + ".er", # Eritrea + ".es", # Spain + ".et", # Ethiopia + ".eu", # European Union + ".fi", # Finland + ".fj", # Fiji + ".fk", # Falkland Islands + ".fm", # Federated States of Micronesia + ".fo", # Faroe Islands + ".fr", # France + ".ga", # Gabon + ".gb", # United Kingdom + ".gd", # Grenada + ".ge", # Georgia + ".gf", # French Guiana + ".gg", # Guernsey + ".gh", # Ghana + ".gi", # Gibraltar + ".gl", # Greenland + ".gm", # The Gambia + ".gn", # Guinea + ".gp", # Guadeloupe + ".gq", # Equatorial Guinea + ".gr", # Greece + ".gs", # South Georgia and the South Sandwich Islands + ".gt", # Guatemala + ".gu", # Guam + ".gw", # Guinea-Bissau + ".gy", # Guyana + ".hk", # Hong Kong + ".hm", # Heard Island and McDonald Islands + ".hn", # Honduras + ".hr", # Croatia + ".ht", # Haiti + ".hu", # Hungary + ".id", # Indonesia + ".ie", # Ireland + ".il", # Israel + ".im", # Isle of Man + ".in", # India + ".io", # British Indian Ocean Territory + ".iq", # Iraq + ".ir", # Iran + ".is", # Iceland + ".it", # Italy + ".je", # Jersey + ".jm", # Jamaica + ".jo", # Jordan + ".jp", # Japan + ".ke", # Kenya + ".kg", # Kyrgyzstan + ".kh", # Cambodia + ".ki", # Kiribati + ".km", # Comoros + ".kn", # Saint Kitts and Nevis + ".kp", # Democratic People's Republic of Korea + ".kr", # Republic of Korea + ".kw", # Kuwait + ".ky", # Cayman Islands + ".kz", # Kazakhstan + ".la", # Laos + ".lb", # Lebanon + ".lc", # Saint Lucia + ".li", # Liechtenstein + ".lk", # Sri Lanka + ".lr", # Liberia + ".ls", # Lesotho + ".lt", # Lithuania + ".lu", # Luxembourg + ".lv", # Latvia + ".ly", # Libya + ".ma", # Morocco + ".mc", # Monaco + ".md", # Moldova + ".me", # Montenegro + ".mg", # Madagascar + ".mh", # Marshall Islands + ".mk", # Macedonia + ".ml", # Mali + ".mm", # Myanmar + ".mn", # Mongolia + ".mo", # Macau + ".mp", # Northern Mariana Islands + ".mq", # Martinique + ".mr", # Mauritania + ".ms", # Montserrat + ".mt", # Malta + ".mu", # Mauritius + ".mv", # Maldives + ".mw", # Malawi + ".mx", # Mexico + ".my", # Malaysia + ".mz", # Mozambique + ".na", # Namibia + ".nc", # New Caledonia + ".ne", # Niger + ".nf", # Norfolk Island + ".ng", # Nigeria + ".ni", # Nicaragua + ".nl", # Netherlands + ".no", # Norway + ".np", # Nepal + ".nr", # Nauru + ".nu", # Niue + ".nz", # New Zealand + ".ac.nz", # New Zealand + ".co.nz", # New Zealand + ".geek.nz", # New Zealand + ".gen.nz", # New Zealand + ".kiwi.nz", # New Zealand + ".maori.nz", # New Zealand + ".net.nz", # New Zealand + ".org.nz", # New Zealand + ".school.nz", # New Zealand + ".om", # Oman + ".pa", # Panama + ".pe", # Peru + ".com.pe", # Peru + ".edu.pe", # Peru + ".net.pe", # Peru + ".nom.pe", # Peru + ".org.pe", # Peru + ".pf", # French Polynesia + ".pg", # Papua New Guinea + ".ph", # Philippines + ".pk", # Pakistan + ".pl", # Poland + ".pm", # Saint-Pierre and Miquelon + ".pn", # Pitcairn Islands + ".pr", # Puerto Rico + ".ps", # Palestine[27] + ".pt", # Portugal + ".pw", # Palau + ".com.py", # Paraguay + ".coop.py", # Paraguay + ".edu.py", # Paraguay + ".net.py", # Paraguay + ".org.py", # Paraguay + ".qa", # Qatar + ".re", # Réunion + ".ro", # Romania + ".rs", # Serbia + ".ru", # Russia + ".rw", # Rwanda + ".sa", # Saudi Arabia + ".sb", # Solomon Islands + ".sc", # Seychelles + ".sd", # Sudan + ".se", # Sweden + ".sg", # Singapore + ".sh", # Saint Helena + ".si", # Slovenia + ".sj", # Svalbard and Jan Mayen Islands + ".sk", # Slovakia + ".sl", # Sierra Leone + ".sm", # San Marino + ".sn", # Senegal + ".so", # Somalia + ".sr", # Suriname + ".ss", # South Sudan + ".st", # São Tomé and Príncipe + ".su", # Soviet Union + ".sv", # El Salvador + ".sx", # Sint Maarten + ".sy", # Syria + ".sz", # Swaziland + ".tc", # Turks and Caicos Islands + ".td", # Chad + ".tf", # French Southern and Antarctic Lands + ".tg", # Togo + ".th", # Thailand + ".tj", # Tajikistan + ".tk", # Tokelau + ".tl", # East Timor + ".tm", # Turkmenistan + ".tn", # Tunisia + ".to", # Tonga + ".tp", # East Timor + ".tr", # Turkey + ".tt", # Trinidad and Tobago + ".tv", # Tuvalu + ".tw", # Taiwan + ".tz", # Tanzania + ".ua", # Ukraine + ".ug", # Uganda + ".ac.uk", # United Kingdom + ".ltd.uk", # United Kingdom + ".me.uk", # United Kingdom + ".net.uk", # United Kingdom + ".nhs.uk", # United Kingdom + ".org.uk", # United Kingdom + ".plc.uk", # United Kingdom + ".sch.uk", # United Kingdom + ".us", # United States of America + ".uy", # Uruguay + ".uz", # Uzbekistan + ".va", # Vatican City + ".vc", # Saint Vincent and the Grenadines + ".ve", # Venezuela + ".vg", # British Virgin Islands + ".vi", # United States Virgin Islands + ".vn", # Vietnam + ".vu", # Vanuatu + ".wf", # Wallis and Futuna + # Needs extra processing to avoid false positives + #".ws", # Samoa + ".ye", # Yemen + ".yt", # Mayotte + ".za", # South Africa + ".zm", # Zambia + ".zw", # Zimbabwe + ".xn--lgbbat1ad8j", # الجزائر. + ".xn--y9a3aq", # .հայ + ".xn--54b7fta0cc", # .বাংলা + ".xn--90ais", # .бел + ".xn--90ae", # .бг[38] + # Needs extra processing to avoid false positives + #".xn--fiqs8s", # .中国 + # Needs extra processing to avoid false positives + #".xn--fiqz9s", # .中國 + ".xn--wgbh1c", # مصر. + ".xn--e1a4c", # .ею + ".xn--node", # .გე + ".xn--qxam", # .ελ[38] + ".xn--j6w193g", # .香港 + ".xn--h2brj9c", # .भारत + ".xn--mgbbh1a71e", # بھارت. + ".xn--fpcrj9c3d", # .భారత్ + ".xn--gecrj9c", # .ભારત + ".xn--s9brj9c", # .ਭਾਰਤ + ".xn--xkc2dl3a5ee0h", # .இந்தியா + ".xn--45brj9c", # .ভারত + #".ಭಾರತ", # India + #".ഭാരതം", # India + #".ভাৰত", # India + #".ଭାରତ", # India + ".xn--mgba3a4f16a", # ایران. + ".xn--mgbtx2b", # عراق. + ".xn--mgbayh7gpa", # الاردن. + ".xn--80ao21a", # .қаз + ".xn--mix082f", # .澳门 + ".xn--mix891f", # .澳門 + ".xn--d1alf", # .мкд + ".xn--mgbx4cd0ab", # مليسيا. + ".xn--l1acc", # .мон + ".xn--mgbc0a9azcg", # المغرب. + ".xn--mgb9awbf", # عمان. + ".xn--mgbai9azgqp6j", # پاکستان. + ".xn--ygbi2ammx", # فلسطين. + ".xn--wgbl6a", # قطر. + ".xn--p1ai", # .рф + ".xn--mgberp4a5d4ar", # السعودية. + ".xn--90a3ac", # .срб + ".xn--yfro4i67o", # .新加坡 + ".xn--clchc0ea0b2g2a9gcd", # .சிங்கப்பூர் + ".xn--3e0b707e", # .한국 + ".xn--fzc2c9e2c", # .ලංකා + ".xn--xkc2al3hye2a", # .இலங்கை + ".xn--mgbpl2fh", # سودان. + ".xn--ogbpf8fl", # سورية. + ".xn--kprw13d", # .台湾 + ".xn--kpry57d", # .台灣 + ".xn--o3cw4h", # .ไทย + ".xn--pgbs0dh", # تونس. + ".xn--j1amh", # .укр + ".xn--mgbaam7a8h", # امارات. + ".xn--mgb2ddes", # اليمن. +} diff --git a/osrframework/domains/generic_tld.py b/osrframework/domains/generic_tld.py new file mode 100644 index 0000000..9e44cc2 --- /dev/null +++ b/osrframework/domains/generic_tld.py @@ -0,0 +1,433 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +tld = { + ".academy", # academic institutes + ".accountant", # accountants and accounting firms + ".accountants", # accountants and accounting firms + ".active", # general + ".actor", # actors + ".adult", # adult entertainment (pornography) + ".aero", # air-transport industry + ".agency", # business associations + ".airforce", # defense contractors + ".apartments", # apartments + ".app", # Phone apps + ".archi", # architects and architect firms[42] + ".army", # defense contractors + ".associates", # business associations + ".attorney", # attorneys and legal organizations + ".auction", # + ".audio", # stereo/sound systems, music + ".autos", # + ".band", # + ".bar", # Bars and related industry + ".bargains", # coupons and online sellers + ".beer", # breweries and beer aficionados + ".best", # + ".bid", # auctions + ".bike", # bicycles + ".bingo", # bingo + ".bio", # biodiversity, biographies + ".biz", # business + ".black", # those who like the color black[47] + ".blackfriday", # Black Friday, retail + ".blog", # Blogs + ".blue", # those who like the color blue[49] + ".boo", # ghosts and spooky business + ".boutique", # specialized businesses + ".build", # construction industry + ".builders", # construction workers + ".business", # businesses + ".buzz", # marketing and social networking + ".cab", # cabs and taxi companies + ".camera", # camera-related businesses + ".camp", # camps and camping + ".cancerresearch", # Organizations, research institutes and individuals interested in ending cancer through research [51] + ".capital", # financial firms + ".cards", # general + ".care", # healthcare industry + ".career", # + ".careers", # Employment + ".cash", # financial + ".casino", # casinos + ".catering", # Food service + ".center", # general + ".ceo", # CEOs + ".channel", # + ".chat", # online chat + ".cheap", # Resellers + ".christmas", # Christmas + ".church", # churches + ".city", # general + ".claims", # retail, auctions + ".cleaning", # Cleaning services + ".click", # + ".clinic", # healthcare clinics + ".clothing", # Apparel + ".cloud", # + ".club", # groups, organizations, assemblies, communities, general + ".coach", # travel (flights and motor coaches) + ".codes", # computer and/or encryption code enthusiasts + ".coffee", # cafés and coffee aficionados + ".college", # Educational + ".community", # social groups, neighborhoods + ".company", # business associations + ".computer", # Technology + ".condos", # Real estate + ".construction", # Construction industry + ".consulting", # hired advisors + ".contractors", # Remodeling and independent businesses + ".cooking", # sharing recipes + ".cool", # General interests + ".coop", # cooperatives + ".country", # general + ".coupons", # coupons + ".credit", # Financial institutions + ".creditcard", # Financial institutions + ".cricket", # cricket + ".cruises", # cruise businesses and travel + ".dad", # families + ".dance", # Dance studios and companies + ".date", # online dating + ".dating", # online dating + ".day", # general + ".deals", # online shopping and couponing + ".degree", # general + ".delivery", # general + ".democrat", # Democratic Party politics + ".dental", # dentists + ".dentist", # dentists + ".design", # graphic art and fashion + ".diamonds", # diamond and jewelry industry + ".diet", # + ".digital", # general + ".direct", # general + ".directory", # general directory + ".discount", # general + ".dog", # dog stores and owners + ".domains", # domain registries + ".download", # technology + ".eat", # restaurants and foodies + ".education", # educational institutes + ".email", # email + ".energy", # energy industry and marketing + ".engineer", # engineers and engineering firms + ".engineering", # engineering firms + ".equipment", # equipment-related businesses + ".esq", # lawyers, law firms, legal professionals + ".estate", # real estate businesses + ".events", # happenings + ".exchange", # generic trade + ".expert", # generic expertise + ".exposed", # general interest + ".express", # shipping + ".fail", # general + ".faith", # religion and churches + ".family", # families + ".fans", # general + ".farm", # farms and agriculture + ".fashion", # clothing industry + ".feedback", # + ".finance", # financial + ".financial", # financial + ".fish", # fishing businesses, sports, and interests + ".fishing", # fishing businesses, sports, and interests + ".fit", # Fitness and exercise + ".fitness", # Fitness and exercise + ".flights", # airline businesses and travel + ".florist", # florists + ".flowers", # florists and gardens + ".fly", # travel + ".foo", # web development + ".football", # soccer and American football + ".forsale", # online retail + ".foundation", # charitable organizations + ".fund", # financial + ".furniture", # furniture businesses + ".fyi", # "for your information" + ".gallery", # photo and art galleries + ".garden", # gardening + ".gift", # gift-giving + ".gifts", # gift-giving + ".gives", # charities and gift-giving + ".glass", # window sales and repairs + ".global", # general + ".gold", # gold and luxury + ".golf", # golf + ".gop", # Republican Party politics + ".graphics", # graphics + ".green", # the environmentally-focused + ".gripe", # opinion sites + ".guide", # help sites + ".guitars", # Guitars + ".guru", # generic expertise + ".healthcare", # healthcare industry + ".help", # help sites + ".here", # generic geographic + ".hiphop", # Hip hop culture + ".hiv", # AIDS and HIV + ".hockey", # hockey + ".holdings", # real estate or financial business + ".holiday", # holiday gift industry + ".homes", # individuals interested in real estate and home improvement + ".horse", # horse-related businesses and interest + ".host", # network companies + ".hosting", # + ".house", # real estate and construction businesses + ".how", # how-to guides + ".info", # information + ".ing", # Verbal suffix: e.g., "jump.ing". + ".ink", # creative printing or tattooing[61] + ".institute[62]", # + ".insure", # Insurance companies + ".international", # international entities + ".investments", # financial + ".jewelry", # jewelry stores + ".jobs", # Employment + ".kim", # people named Kim (given name) + ".kitchen", + ".land", # real estate + ".lawyer", # lawyers and legal organizations + ".lease", # financing + ".legal", # lawyers and legal organizations + ".lgbt", # the lesbian, gay, bisexual and transgender community + ".life", # general + ".lighting", # lighting + ".limited", # general + ".limo", # limousine businesses + ".link", # connecting to information[65] + ".loan", # banks and lenders + ".loans", # banks and lenders + ".lol", # LOL: laughing out loud + ".lotto", # + ".love", # dating sites + ".luxe", # + ".luxury", # businesses catering to the wealthy + ".management", # business management + ".market", # marketing services and retailers + ".marketing", # marketing services + ".markets", # financial and stock markets + ".mba", # Masters in Business Administration + ".media", # general media interests + ".meet", # social gatherings, meeting new people + ".meme", # Internet memes + ".memorial", # memorial sites + ".men", # men + ".menu", # restaurants + ".mobi", # mobile devices + ".moe", # Japanese otaku culture + ".money", + ".mortgage", # mortgage lenders + ".motorcycles", # motorcycles + ".mov", # Digital video + ".movie", # movies and cinemas + ".museum", # museums + ".name", # individuals, by name + ".navy", # defense contractors + ".network", # general + ".new", # general + ".news", # news sites + ".ngo", # Non-governmental organizations. + ".ninja", + ".one", # general + ".ong", # Non-governmental organizations. + ".onl", + ".online", # generic + ".ooo", # general + ".organic", # organic gardeners, farmers, foods, etc. + ".partners", # businesses + ".parts", # manufacturing and consumer auto + ".party", # nightclubs and social gatherings + ".pharmacy", # pharmacies + ".photo", # photography and photo-sharing + ".photography", # photography and photo-sharing + ".photos", # photography and photo-sharing + ".physio", # physical therapists + ".pics", # photography and photo-sharing + ".pictures", # photography and photo-sharing + ".pid", # + ".pink", # those who like the color pink + ".pizza", # pizza parlors + ".place", # general + ".plumbing", # plumbing businesses + ".plus", # generic + ".poker", # Poker players and sites + ".porn", # adult entertainment (pornography) + ".post", # postal services + ".press", # publishing and journalism + ".pro", # professions/professionals + ".productions", # studio/art businesses + ".prof", # Professors, teachers and learning + ".properties", # real estate + ".property", # real estate + ".qpon", # coupons + ".racing", # racing + ".recipes", # recipes and cooking + ".red", # those who like the color red[74] + ".rehab", + ".ren", # Renren users + ".rent", + ".rentals", # short-term ownership + ".repair", # general repair/maintenance businesses + ".report", # business services + ".republican", # Republican Party politics + ".rest", # Restaurants and related industry + ".review", # public reviews + ".reviews", # public reviews + ".rich", # businesses catering to the wealthy + ".rip", # memorial sites[76] + ".rocks", # general + ".rodeo", # Rodeo interest + ".rsvp", # Invitations and replies + ".run", # running and jogging + ".sale", # retail + ".school", # schools + ".science", # science-related sites + ".services", # business services + ".sex", # adult entertainment (pornography) + ".sexy", # adult entertainment + ".shoes", # shoes + ".show", # entertainment and vlogs + ".singles", # online dating + ".site", # general + ".soccer", # soccer + ".social", # general interest + ".software", # computer software + ".solar", # solar-power + ".solutions", # business services + ".space", # as a creative space + ".studio", # art, fitness, & entertainment + ".style", # fashion + ".sucks", # gripe sites + ".supplies", # manufacturing industries + ".supply", # manufacturing industries + ".support", # help pages + ".surf", # surfing + ".surgery", # healthcare industry + ".systems", # technology + ".tattoo", # tattoo aficionados + ".tax", # financial + ".taxi", # taxi services + ".team", # team sports + ".tech", # technology + ".technology", # technology + ".tel", # Internet communication services + ".tennis", # tennis + ".theater", # theaters and cinemas + ".tips", # general help topics + ".tires", # tire manufacturers + ".today", # general + ".tools", # manufacturing industries + ".top", # general + ".tours", # tourism + ".town", # generic geographic + ".toys", # toy businesses + ".trade", # businesses + ".training", # training and how-tos + ".travel", # travel and tourism industry related sites + ".university", # young adults, university life + ".vacations", # travel + ".vet", # veterans and veterinarians + ".video", # video sharing + ".villas", # real estate and/or travel businesses + ".vision", # eye-care businesses + ".vodka", # Vodka-related businesses and interest + ".vote", # democratic elections and campaign websites + ".voting", # polling sites + ".voyage", # travel + ".wang", # general + ".watch", + ".webcam", # Web cam shows and video sharing + ".website", # general + ".wed", # engaged couples and wedding-oriented businesses + ".wedding", # wedding-oriented businesses + ".whoswho", # general + ".wiki", # wikis + ".win", # games, Microsoft Windows + ".wine", # Wine + ".work", # general + ".works", # general + ".world", # general + ".wtf", # general + ".xxx", # adult entertainment (pornography) + ".xyz", # general + ".yoga", # yoga + ".zone", # general + ".maison", # "house" + ".abogado", # "lawyer" + ".gratis", # "free" + ".futbol", # soccer + ".juegos", # "games" + ".soy", # "I am" + ".tienda", + ".uno", # "one", for websites targeting Spanish speaking consumers + ".viajes", # "travel" + ".haus", # "house" + ".immobilien", # "real estate" + ".jetzt", # "now" + ".kaufen", # "buy" + ".reise", # "travel" + ".reisen", # "traveling" + ".schule", # "school" + ".versicherung", # "insurance" + ".desi", # Hindi for the peoples and cultures of South Asia + ".shiksha", + ".casa", # "house" + ".cafe", # "café", "coffee shop", "coffee" + ".immo", # French, German, Dutch[citation needed], and Italian abbreviation for "real estate" + ".moda", # "fashion" + ".voto", # "vote", for election and campaign websites + ".bar", # bars and pubs + ".bank", # banks + ".coop", # cooperatives + ".enterprises", # business associations + ".industries", # industrial businesses + ".institute", # established business associations + ".ltda", # companies in South America + ".pub", # bars and pubs + ".realtor", # realtors + ".reit", # real estate investment trusts + ".rest", # restaurants + ".restaurant", # restaurants + ".sarl", # Société à responsabilité limitée, Francophone Limited liability company + ".ventures", # funding for start-ups + ".xn--4gbrim", # موقع. + ".xn--ngbc5azd", # شبكة. + ".xn--mgbab2bd", # بازار. + ".xn--q9jyb4c", # .みんな + ".xn--3ds443g", # .在线 + ".xn--fiq228c5hs", + ".xn--6frz82g", + ".xn--ses554g", # .网址 + ".xn--io0a7i", # .网络 + ".xn--55qx5d", # .公司 + ".xn--czru2d", # .商城 + ".xn--nqv7f", # .机构 + ".xn--6qq986b3xl", # .我爱你 + ".xn--czr694b", # .商标 + ".xn--rhqv96g", # .世界 + ".xn--3bst00m", # .集团 + ".xn--d1acj3b", # .дети + ".xn--80asehdb", # .онлайн + ".xn--c1avg", # .орг + ".xn--80aswg", # .сайт + ".xn--i1b6b1a6a2e", # .संगठन +} diff --git a/osrframework/domains/geographic_tld.py b/osrframework/domains/geographic_tld.py new file mode 100644 index 0000000..8466d09 --- /dev/null +++ b/osrframework/domains/geographic_tld.py @@ -0,0 +1,77 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +tld = { + ".capetown", # Cape Town, South Africa + ".durban", # Durban, South Africa + ".joburg", # Johannesburg, South Africa + ".asia", # Asia-Pacific region + ".krd", # Kurdistan + ".nagoya", # Nagoya, Japan + ".okinawa", # Okinawa, Japan + ".ryukyu", # Ryukyu Islands, Japan + ".taipei", # Taipei, Taiwan + ".tatar", # Tatar peoples and places + ".tokyo", # Tokyo, Japan + ".yokohama", # Yokohama, Japan + ".alsace", # Alsace, France + ".amsterdam", # Amsterdam, The Netherlands + ".barcelona", # Barcelona, Spain + ".bayern", # Bavaria, Germany + ".berlin", # Berlin, Germany + ".brussels", # Brussels, Belgium + ".budapest", # Budapest, Hungary + ".bzh", # Brittany, France + ".cat", # Catalonia; Catalan language and culture + ".cologne", # Cologne, Germany + ".corsica", # Corsica, France + ".cymru", # Wales + ".eus", # Basque, Spain and France + ".frl", # Friesland + ".gal", # Galiza, Spain + ".gent", # Ghent, Belgium + ".hamburg", # Hamburg, Germany + ".irish", # Ireland; global Irish community + ".koeln", # Cologne, Germany + ".london", # London, United Kingdom + ".madrid", # Madrid, Spain + ".moscow", # Moscow, Russia + ".nrw", # North Rhine-Westphalia, Germany + ".paris", # Paris, France + ".ruhr", # Ruhr, Germany + ".saarland", # Saarland, Germany + ".scot", # Scotland + ".tirol", # Tyrol, now split between Austria and Italy + ".vlaanderen", # Flanders, Belgium + ".wales", # Wales + ".wien", # Vienna, Austria + ".zuerich", # Zurich, Switzerland + ".miami", # Miami, USA + ".nyc", # New York City, USA + ".quebec", # Québec, Canada + ".vegas", # Las Vegas, NV, USA + ".kiwi", # New Zealanders (a.k.a. kiwis) + ".melbourne", # Melbourne, Australia + ".sydney", # Sydney, Australia + ".lat", # Latin America + ".rio", # Rio de Janeiro, Brazil + ".xn--1qqw23a", + ".xn--80adxhks", # .москва +} diff --git a/osrframework/domains/gtld.py b/osrframework/domains/gtld.py new file mode 100644 index 0000000..8b196bb --- /dev/null +++ b/osrframework/domains/gtld.py @@ -0,0 +1,30 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +tld = { + ".com", + ".org", + ".net", + ".int", + ".edu", + ".gov", + ".mil", + ".arpa", +} diff --git a/osrframework/domains/other_subdomains.py b/osrframework/domains/other_subdomains.py new file mode 100644 index 0000000..1f0a69d --- /dev/null +++ b/osrframework/domains/other_subdomains.py @@ -0,0 +1,740 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +tld = { + ".h4ck.me", + # A sample from: https://freedns.afraid.org/domain/registry/ + ".0x.no", + ".100mountain.com", + ".10x.es", + ".120v.ac", + ".1337.cx", + ".150watt.ru", + ".24-7.ro", + ".2fine.de", + ".2ku.ru", + ".2p.fm", + ".3c4d.net", + ".3dxtras.com", + ".3n.cc", + ".3trust.com", + ".404.mn", + ".4040.idv.tw", + ".49b.uk", + ".4twenty.us", + ".688.org", + ".69.mu", + ".7s.com.tr", + ".8634.su", + ".a01.ca", + ".abuser.eu", + ".ac2.ac", + ".adagio.tw", + ".agila.com.br", + ".agropeople.ru", + ".aintno.info", + ".airlinemeals.net", + ".ais-salzburg.at", + ".ajctm.ac", + ".alagrupa.com", + ".albertn.ru", + ".alexlan.org", + ".all.my", + ".allez.la", + ".allisons.org", + ".allowed.org", + ".alveaelectric.com", + ".americajhon.com.pe", + ".americhip.ru", + ".amurt.org.uk", + ".anal-slavery.com", + ".ananda.net.ve", + ".aneisa.com", + ".annaffiare.org", + ".anonymous.lv", + ".antongorbunov.com", + ".antrak.org.tr", + ".apsis.ch", + ".arcprojects.ru", + ".art-works.ro", + ".asenov.ru", + ".asianfreshproduce.com", + ".ask2ask.com", + #".aspserver.net", + ".astrabus.ru", + ".asu.mx", + ".auraria.org", + ".australia.ai", + ".austria-escort.at", + ".awiki.org", + ".ax.it", + ".ax.lt", + ".b33r.us", + ".babypos.hk", + ".bad.mn", + ".bagus.org", + ".bakli.ru", + ".baltijalv.lv", + ".bandweite.de", + ".barge-online.com", + ".beerprojects.com", + ".benjamin.it", + ".bep.co.id", + ".bertmillernatureclub.org", + ".bestforever.com", + ".bgdsupport.com", + ".bhms.com", + ".bigbox.info", + ".bil-nasalab.com", + ".bine.me", + ".biotx.biz", + ".birdriver.org", + ".biz.tm", + ".blinklab.com", + ".blizzie.net", + ".blogs.or.id", + ".bloom.us", + ".blue-jade.net", + ".bluemoon.com.vn", + ".bmvl.ru", + ".bnaz.org", + ".bnpt.go.id", + ".bot.nu", + ".bouncers4rent.com", + ".boxathome.net", + ".brawlcustommusic.com", + ".byte4byte.com", + ".bzpo.ru", + ".caledonianlab.com", + ".catsy.org", + ".caturelang.co.id", + ".cc.net.br", + ".ccc.org.mx", + ".ccmissoula.com", + ".ccode.ml", + ".cda.md", + ".cdvi.ro", + ".celebsplay.com", + ".chebicon.ru", + ".chickenkiller.com", + ".chipmeup.com", + ".clink.biz", + ".cloudwatch.net", + ".cnr.com.pk", + ".cnstefancelmare.ro", + ".coalnet.ru", + ".colegiotamandare.g12.br", + ".colegiotorrevilano.es", + ".compuinter.com", + ".computersforpeace.net", + ".compy.ca", + ".continent.kz", + ".coreytech.com", + ".cpct.com", + ".cpia.org.ar", + ".cr.rs", + ".crabdance.com", + ".crackedsidewalks.com", + ".crazycat.ro", + ".cspro.biz", + ".csproject.org", + ".custom-gaming.net", + ".cut3.name", + ".cw03.ru", + ".cys.ru", + ".dagz.ru", + ".dalk.ru", + ".dark-byte.net", + ".darknigger.com", + ".darkworlds.org", + ".datasource.ro", + ".ddanciu.ro", + ".ddos.im", + ".dearabba.org", + ".death-by-monkeys.com", + ".dellsale.ru", + ".deusexmachina.org", + ".dhm.ro", + ".digitalgroupe.com", + ".diipl.com", + ".diipl.in", + ".divakeramika.com", + ".dmtr.ru", + ".dnet.hu", + ".d-n-s.name", + ".d-n-s.org.uk", + ".dob.jp", + ".donkeyhot.net", + ".doomstuff.com", + ".doskapozora.com", + ".dp76.com", + ".dream.org.il", + ".drunkensailor.org", + ".dyn.ch", + ".dyn.mk", + ".dynet.com", + ".e.co.za", + ".echoparklake.com", + ".e-data.com.tr", + ".edsonide.med.br", + ".e-education.hk", + ".elchemi.com", + ".elitter.net", + ".e-m-a-i-l.org", + ".emakc.ru", + ".embeddedonline.org", + ".empresastaylor.com", + ".encontronapracinha.com.br", + ".endlessmovie.com", + ".enemyterritory.org", + ".entermypicks.com", + ".eolicatalinay.cl", + ".epbsoft.com", + ".epicgamer.org", + ".erke.biz.tr", + ".erki.net", + ".e-sluts.net", + ".essexregional.org", + ".etgr.ru", + ".eurotank.ro", + ".eva.hk", + ".everton.com", + ".evilrouter.com", + ".evils.in", + ".evs.net.br", + ".eye.rs", + ".ezfill.com", + ".ezmangaforums.com", + ".ezxdev.org", + ".fairuse.org", + ".falcongreen.com", + ".farted.net", + ".fasl.info", + ".fatdiary.org", + ".fearpenguins.com", + ".fedea.com.ar", + ".fin-tech.com", + #".fisierulmeu.ro", + ".fivepals.com", + ".flat4free.com", + ".flazzard.com", + ".floripalondon.com", + ".fol.cl", + ".forss.to", + #".fr.to", + ".freebookspot.es", + ".freesa.org", + ".ftp.sh", + ".fuck-off-o.org", + ".funkar.nu", + ".galipan.net.ve", + ".gally.jp", + ".ganino.com", + ".garmanage.com", + ".gayhotelsgreece.com", + ".gayuser.info", + ".gebish.org", + ".gerastar.ru", + ".ghostnation.org", + ".gigaportal.pl", + ".giveawaylisting.com", + ".givemefish.com", + ".god.jp", + ".golf-club.ro", + ".good.one.pl", + ".good-newz.org", + ".gorila.ro", + ".gparente.net.br", + ".grandmasgossip.com", + ".gtk.cl", + ".guardz.ru", + ".guild-site.com", + ".gurcanozturk.com", + ".gw.lt", + ".h0stname.net", + ".h4ck.me", + ".hacked.jp", + ".hackquest.com", + ".hackrz.org", + ".haki.hk", + ".hamradioonline.net", + ".hamshack.info", + ".handfolding.com", + ".hanisch.com", + ".happyforever.com", + ".happyminecraft.com", + ".happyminecraft.net", + ".hashcube.com", + ".hayeshelp.com", + ".hbmc.net", + ".heroinewarrior.com", + ".hiddencorner.org", + ".hijaxdesigns.com", + ".hin.tw", + ".hiprinter.com", + ".hitremixes.com", + ".hmail.us", + ".hmao.pro", + ".holylandshop.ru", + ".home.kg", + ".homelinuxserver.org", + ".homenet.org", + ".h-o-s-t.name", + ".host2go.net", + ".hpc.tw", + ".hs.vc", + ".hulichicken.com", + ".hunnur.com", + ".iantaylor.com", + ".iceblaze.com", + ".icfar.com", + ".icx.ro", + ".id.web.id", + ".id-fb.fm", + ".ig42.org", + ".ignorelist.com", + ".iiiii.info", + ".ilgizvalinurov.ru", + #".ilkor.com", + ".imagespost.com", + ".imagetemplate.com", + ".imagetemplate.net", + ".iminecraft.se", + #".imly.org", + ".india.sh", + ".inedelya.ru", + ".inet2.org", + ".inflict.us", + ".info.gf", + ".info.tm", + ".innograph.co.id", + ".intec.es", + ".ionexusa.com", + ".ipv6.la", + ".ircr.info", + ".isltest.net", + ".ismoke.hk", + ".istanbulsafak.com", + ".i-t.me", + ".it-share.ro", + ".iu4ever.org", + ".ivc.cc", + ".ivc.org.ar", + ".ivi.pl", + ".ixx.io", + ".iz.rs", + ".javafaq.nu", + ".jcor.ca", + ".jedimasters.net", + ".jerkface.net", + ".jesus.si", + ".jobvolume.bg", + ".joe.dj", + ".joiavip.com.br", + ".jpfiles.eu", + ".juliacake.com.vn", + ".jumpingcrab.com", + ".jundy.org", + ".k.vu", + ".k22.su", + ".kadirpolat.net.tr", + ".kalbas.com.vn", + ".kaleebso.com", + ".kanda.ru", + ".kaohsiung.tv", + ".kawa-kun.com", + ".kck-saratov.ru", + ".kein.hk", + ".kiani.com", + ".kidgame.ru", + ".kir22.ru", + ".ko.tl", + ".kompaniet.nu", + ".kopi.co.id", + ".krash.net", + ".ksk-saratov.ru", + ".kyrgyzstan.kg", + ".l5.ca", + ".lanas.cl", + ".lazydalmatian.com", + ".lee.mx", + ".leecantu.com", + ".legalmusicsearch.com", + ".leitud.ee", + ".leonardocastano.com.ar", + ".lex.mn", + ".linkin.tw", + ".linux70.ru", + ".livewave.ru", + ".logisoft-cy.com", + ".logos.g12.br", + ".lolk.org", + ".lovethosetrains.com", + #".loyo.biz", + ".luckyweaving.com", + ".lwts.ru", + ".macrofox.org", + ".macsauto-indonesia.com", + ".madhacker.biz", + ".maersoft.com.ar", + ".make.com.ar", + ".makny.us", + ".malam.or.id", + ".maluwilz.lv", + ".marieblazek.com", + ".mashyk.ru", + ".mcemerald.ro", + ".mcsoft.org", + ".medicost.org", + ".megamovs.com", + ".megatele.ru", + ".menpera.go.id", + ".mett.ru", + ".mikata.ru", + ".mindhackers.org", + ".mine.bz", + ".minecraftnoob.com", + ".minecraftr.us", + ".m-kopa.net", + ".mm.my", + ".moo.com", + ".moonangel.com", + ".mooo.com", + ".mooo.info", + ".morganisageek.org", + ".movdivx.com", + ".move2nz.com", + ".movister.ru", + ".mp3real.ru", + ".mtrstore.com", + ".multicop.com.ar", + ".musterihizmetleri.com", + ".mwop.net", + ".my.to", + ".mybrewbuddies.com", + ".mychild.ug", + ".mycloud.bz", + ".mylogisoft.com", + ".mysaol.com", + ".myxop.com", + ".nard.ca", + ".naru.to", + #".nashvillerollergirls.com", + ".nav.co.id", + ".nedvighimost-sochi.ru", + ".neogene.ru", + ".n-e-t.name", + ".netlord.de", + ".netmask.ca", + ".nevalain.ru", + ".nevskayaratusha.ru", + ".newca.org", + ".nhance.com", + ".nlpd.net.au", + ".nnc.ro", + ".nonze.ro", + ".notici.as", + ".novgaz-rzn.ru", + ".now.im", + ".nrp.com.np", + ".ns22.ru", + ".nx.tc", + ".oganilirkab.go.id", + ".ohbah.com", + ".ohi.tw", + ".okzk.com", + ".oldrussianmagic.com", + ".olelukoie.ru", + ".olife.org", + ".oneindonesia.co.id", + ".oo.fi", + #".openoffcampus.com", + ".opensrc.mx", + ".opris.at", + ".optimas.co.id", + ".orenznakomstva.ru", + ".ormy.ru", + ".orskkino.ru", + ".packetflood.net", + ".packeting.eu", + ".parikh.net", + ".pass.fm", + ".patelmortgage.com", + ".pce-cihazlari.com.tr", + ".pckf.com", + ".peachyweb.com", + ".pedie.info", + ".philipkingsleyshop.ru", + ".photo-cult.com", + ".photo-frame.com", + ".php-dev.net", + ".pics.mu", + ".pii.at", + ".piki.si", + ".pixelfucker.com", + ".play.ai", + ".playfv.com", + #".playop.net", + ".plnntt.co.id", + ".plwgroup.com", + ".pntl.tl", + ".pogramkran.net", + ".polissya.eu", + ".porngo.at", + ".port0.org", + ".portalindustries.org", + ".possessed.us", + ".priamaakcia.sk", + ".privatedns.org", + ".privateimport.jp", + ".procare.co.id", + ".profinet.ro", + ".progr.am", + ".propharma.co.id", + ".prostore.ru", + ".psp-moscow.com", + ".psybnc.org", + #".publicserviceclub.com", + ".punked.us", + ".pwnz.org", + ".qc.to", + ".qlbv.vn", + ".qualirede.com.br", + ".quannhacvang.com", + ".queerline.de", + ".radioamator.ro", + ".radiogirl.fm", + ".raspberryip.com", + ".raspberryip.org", + ".rbb.org", + ".rcrcc.ca", + ".reason.org.nz", + ".recyclesolutionsllc.com", + ".remoteaccess.me", + ".richlorenz.com", + ".rilhas.com", + ".rlstuff.net", + ".rltk.org", + ".rm6.org", + ".rninvest.ru", + ".ro.it", + ".ro.lt", + ".robinhud.com", + ".robot-armies.com", + ".rockingwranchinc.com", + ".rock-n-roll.ru", + ".romaliver.com", + ".r-o-o-t.net", + ".root.sx", + ".roth.ca", + ".routemehome.com", + ".rpz.su", + ".rukodelka.ru", + ".ruok.org", + ".russkoeumea.com", + ".rwbcode.com", + ".sadayuki.jp", + ".sandmeiers.ch", + ".sannon-stamm.com", + ".sarah-lai.com", + ".savage.nu", + ".scay.net", + ".sci123.com", + ".scottlewisonline.com", + ".scrapitsoftware.com", + ".sdp-mos.ru", + ".SEARCH", + ".sektori.org", + ".sen.org.nz", + ".seo.id.lv", + ".servernux.com", + ".serverpit.com", + ".sexmistrz.pl", + ".sextube.ro", + ".sheepindonesia.org", + ".shen.cl", + ".shitcunt.info", + ".shogun.ca", + ".shop.tm", + ".shopper360.com.my", + ".shoppingexpress.com.au", + ".showmyhomes.com", + ".silksky.com", + ".sino.tw", + ".skc.su", + ".skies.tw", + ".sky-cinema.ru", + ".sly.io", + ".smbb.ws", + ".smelly.cc", + ".smirt.ch", + ".sne.jp", + ".solfa.org", + ".solidmation.com", + ".solopos.co.id", + ".soon.it", + ".Sorted by: Popularity", + ".spacescape.in", + ".spacetechnology.net", + ".spelar.se", + ".spstali.ru", + ".ssitech.bg", + ".stalker.fi", + #".stan.cn", + ".star.is", + ".starkom.ru", + #".statescasinos.com", + ".stes.fi", + ".stfu-kthx.net", + ".stocktester.ru", + ".stoupin.ru", + ".strangled.net", + ".streame.tv", + ".stroyexpert.org", + ".stuns.org", + ".suka.se", + ".sumibi.org", + ".surak.kz", + ".surfnet.ca", + ".sweetriders.com", + ".swsc.org.np", + ".sxn.us", + ".syntereo.com", + ".t28.net", + ".t31.org", + ".tacowolf.com", + #".tagan-rog.info", + ".taivas.biz", + ".taiwans.tw", + ".takeshi.cnt.br", + #".tanah-aina.com", + ".teakwondo.one.pl", + ".techkriti.org", + ".techniice.ro", + ".technopagans.com", + ".tecnova.com.br", + ".tedx.ee", + ".teh-server.com", + ".tetuku.com", + ".thc.lv", + ".thcgirls.com", + ".the-button.com", + ".thegmc.com", + ".thejordaans.com", + ".thenme.net", + ".thevaughts.net", + ".thevirus.ro", + ".threecanoes.com", + ".tintira.com", + ".tn.my", + ".topdanang.com", + ".tragazorras.com", + ".tristancartledge.com", + ".tru.io", + ".trumgame.net", + ".tth.cl", + ".tuck.tw", + ".tv-l.ru", + ".tvlinux.com", + ".twilightparadox.com", + ".tzafrir.org.il", + ".u888.cn", + ".ucvradio.cl", + ".ufodns.com", + ".ugo.si", + ".uk.ms", + ".uk.to", + ".ultimatedecision.lv", + ".undo.it", + ".unibutton.com", + ".uplink.li", + ".urca.tv", + ".urist93.ru", + ".us.to", + ".uzhi.ru", + ".uzid.com", + ".vagfans.info", + ".vankin.de", + ".vctel.com", + ".ve3.info", + ".verymad.net", + ".vietnam.ro", + ".violates.me", + ".violates.us", + ".vistnet.net", + ".vivat-consult.ru", + ".vkagent.ru", + ".voles35.ru", + ".vomuan.com", + ".vos.io", + ".vpnx.nl", + ".vr.lt", + ".vxe6.net", + ".wakingmoon.com", + ".warmkessel.com", + ".webs.vc", + ".whyboner.com", + ".wiki.gd", + ".wikihotels.ru", + ".wild1.net", + ".wildsurf.net", + ".winkel.com.ar", + ".winnity.ro", + ".with.mirkforce.de", + ".wojb.org", + ".wolmerica.com", + ".womenclothingtoday.com", + ".xpresit.net", + ".xxxxx.tw", + ".yao.cl", + ".yngling.com", + ".youpc.ro", + ".your.my.id", + ".yourspecialtee.com", + ".z0d.eu", + ".z86.ru", + ".zaibar.ro", + ".zanity.net", + ".zee.ac", + ".zgbi100.ru", + ".zhilcontrol.ru", + ".zonet.us", + ".zsh.jp", + ".zverovich.net", + ".zvezdaringa.ru", + ".zyix.com", + # From subdomain.com: http://www.subdomain.com/ + ".asia.gp", + ".biz.uz", + ".co.gp", + ".com.nu", + ".eu.nu", + ".mobi.ps", + ".name.vu", + ".online.gp", + ".pro.vg", + ".tv.gg", + ".us.nf", + ".web.gg", + ".info.nu", + # Other subdomains. + ".ax.it", + ".ro.it", +} diff --git a/osrframework/entify.py b/osrframework/entify.py new file mode 100644 index 0000000..0c53844 --- /dev/null +++ b/osrframework/entify.py @@ -0,0 +1,349 @@ +#!/usr/bin/env python2 +# -*- coding: utf-8 -*- +# +################################################################################ +# +# Copyright 2015-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ + + +__author__ = "Felix Brezo, Yaiza Rubio " +__copyright__ = "Copyright 2015-2017, i3visio" +__credits__ = ["Felix Brezo", "Yaiza Rubio"] +__license__ = "AGPLv3+" +__version__ = "v6.0" +__maintainer__ = "Felix Brezo, Yaiza Rubio" +__email__ = "contacto@i3visio.com" + + +import argparse +import json +import logging +import os +from os import listdir +from os.path import isfile, join, isdir +import requests +import urllib2 + +import osrframework.utils.banner as banner +from osrframework.utils.regexp import RegexpObject +import osrframework.utils.general as general +import osrframework.utils.logger as logSet +import osrframework.utils.regexp_selection as regexp_selection + + +def getEntitiesByRegexp(data = None, listRegexp = None, verbosity=1, logFolder="./logs"): + """ + Method to obtain entities by Regexp. + + Args: + ----- + data: text where the entities will be looked for. + listRegexp: list of selected regular expressions to be looked for. If + None was provided, all the available will be chosen instead. + verbosity: the verbosity level. + logFolder: the folder to store the logs. + + Returns: + -------- + list: available objects containing the expressions found in the provided + data. + [ + { + "attributes": [], + "type": "i3visio.email", + "value": "foo@bar.com" + }, + { + "attributes": [], + "type": "i3visio.email", + "value": "bar@foo.com" + ] + """ + logSet.setupLogger(loggerName="osrframework.entify", verbosity=verbosity, logFolder=logFolder) + logInstance = logging.getLogger("osrframework.entify") + if listRegexp == None: + listRegexp = regexp_selection.getAllRegexp() + + foundExpr = [] + + for r in listRegexp: + foundExpr += r.findExp(data) + + return foundExpr + + +def scanFolderForRegexp(folder = None, listRegexp = None, recursive = False, verbosity=1, logFolder= "./logs", quiet=False): + """ + [Optionally] recursive method to scan the files in a given folder. + + Args: + ----- + folder: the folder to be scanned. + listRegexp: listRegexp is an array of . + recursive: when True, it performs a recursive search on the subfolders. + + Returns: + -------- + list: Available objects containing the expressions found in the + provided data. An example of the returned data is as follows: + + ``` + [ + { + "attributes": [], + "type": "i3visio.email", + "value": "foo@bar.com" + }, + { + "attributes": [], + "type": "i3visio.email", + "value": "bar@foo.com" + } + ] + ``` + """ + logSet.setupLogger(loggerName="osrframework.entify", verbosity=verbosity, logFolder=logFolder) + logger = logging.getLogger("osrframework.entify") + + logger.info("Scanning the folder: " + folder) + results = [] + + #onlyfiles = [] + #for f in listdir(args.input_folder): + # if isfile(join(args.input_folder, f)): + # onlyfiles.append(f) + onlyfiles = [ f for f in listdir(folder) if isfile(join(folder,f)) ] + + for i, f in enumerate(onlyfiles): + filePath = join(folder,f) + logger.debug("Looking for regular expressions in: " + filePath) + if not quiet: + print(str(i) + "/" + str(len(onlyfiles)) + "\tLooking for regular expressions in: " + filePath) + with open(filePath, "r") as tempF: + # reading data + foundExpr = getEntitiesByRegexp(data = tempF.read(), listRegexp = listRegexp) + logger.debug("Updating the " + str(len(foundExpr)) + " results found on: " + filePath) + aux = {} + aux["type"] = "i3visio.uri" + aux["value"] = filePath + aux["attributes"] = foundExpr + results.append(aux) + + if recursive: + onlyfolders = [ f for f in listdir(folder) if isdir(join(folder,f)) ] + for f in onlyfolders: + folderPath = join(folder, f) + logger.debug("Looking for additional in the folder: "+ folderPath) + results.update(scanFolderForRegexp(folder = folderPath,listRegexp = listRegexp, recursive = recursive)) + + # Printing the information if not in quiet mode + if not quiet: + print(general.success(json.dumps(results, indent=2))) + + return results + + +def scanResource(uri = None, listRegexp = None, verbosity=1, logFolder= "./logs"): + """ + [Optionally] recursive method to scan the files in a given folder. + + Args: + ----- + uri: the URI to be scanned. + listRegexp: listRegexp is an array of . + + Returns: + ------- + dict: the key is the name of the file. + """ + logSet.setupLogger(loggerName="osrframework.entify", verbosity=verbosity, logFolder=logFolder) + logger = logging.getLogger("osrframework.entify") + + results = [] + logger.debug("Looking for regular expressions in: " + uri) + + data = urllib2.urlopen(uri).read() + foundExpr = getEntitiesByRegexp(data = data, listRegexp = listRegexp) + + logger.debug("Updating the " + str(len(foundExpr)) + " results found on: " + uri) + + # Creating the output structure + for f in foundExpr: + aux = {} + + aux={} + aux["type"] = "i3visio.search" + aux["value"] = "URI - " +f["value"] + aux["attributes"] = [] + for a in f["attributes"]: + aux["attributes"].append(a) + + #Appending the entity itself + entity={} + entity["type"] = f["type"] + entity["value"] = f["value"] + entity["attributes"] = [] + aux["attributes"].append(entity) + + #Appending the uri + entity={} + entity["type"] = "i3visio.uri" + entity["value"] = uri + entity["attributes"] = [] + aux["attributes"].append(entity) + + results.append(aux) + + return results + + +def main(args): + """ + Main function to launch phonefy. + + The function is created in this way so as to let other applications make + use of the full configuration capabilities of the application. The + parameters received are used as parsed by this modules `getParser()`. + + Args: + ----- + args: The parameters as processed by this modules `getParser()`. + + Results: + -------- + Returns a list with i3visio entities. + """ + results = [] + + # Recovering the logger + # Calling the logger when being imported + logSet.setupLogger(loggerName="osrframework.entify", verbosity=args.verbose, logFolder=args.logfolder) + # From now on, the logger can be recovered like this: + logger = logging.getLogger("osrframework.entify") + + logger.info("Selecting the regular expressions to be analysed...") + + if not args.quiet: + print(general.title(banner.text)) + + sayingHello = """ +entify.py Copyright (C) F. Brezo and Y. Rubio (i3visio) 2015-2017 + +This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you +are welcome to redistribute it under certain conditions. For additional info, +visit """ + general.LICENSE_URL + "\n" + print(general.info(sayingHello)) + + if args.license: + general.showLicense() + else: + listRegexp = [] + if args.regexp: + listRegexp = regexp_selection.getRegexpsByName(args.regexp) + elif args.new_regexp: + for i, r in enumerate(args.new_regexp): + listRegexp.append(RegexpObject(name = "NewRegexp"+str(i), reg_exp = args.new_regexp)) + + if not args.web: + results = scanFolderForRegexp(folder = args.input_folder, listRegexp= listRegexp, recursive = args.recursive, verbosity=args.verbose, logFolder= args.logfolder, quiet=args.quiet) + else: + results = scanResource(uri = args.web, listRegexp= listRegexp, verbosity=args.verbose, logFolder= args.logfolder) + logger.info("Logging the results:\n" + json.dumps(results, indent=2, sort_keys=True)) + + # Trying to store the information recovered + if args.output_folder != None: + # Verifying an output folder was selected + logger.debug("Preparing the output folder...") + if not os.path.exists(args.output_folder): + logger.warning("The output folder \'" + args.output_folder + "\' does not exist. The system will try to create it.") + os.makedirs(args.output_folder) + + # Grabbing the results + fileHeader = os.path.join(args.output_folder, args.file_header) + for ext in args.extension: + # Generating output files + general.exportUsufy(results, ext, fileHeader) + + # Showing the information gathered if requested + if not args.quiet: + print(str(now) + "\tA summary of the results obtained are shown in the following table:\n") + print(general.success(general.usufyToTextExport(results))) + + now = dt.datetime.now() + print(str(now) + "\tYou can find all the information collected in the following files:") + for ext in args.extension: + # Showing the output files + print("\t-" + general.emphasis(fileHeader + "." + ext)) + + # Urging users to place an issue on Github... + print(banner.footer) + + return results + + +def getParser(): + import osrframework.utils.configuration as configuration + DEFAULT_VALUES = configuration.returnListOfConfigurationValues("entify") + + parser = argparse.ArgumentParser(description='entify.py - entify.py is a program designed to extract using regular expressions all the entities from the files on a given folder. This software also provides an interface to look for these entities in any given text.', prog='entify.py', epilog="Check the README.md file for further details on the usage of this program or follow us on Twitter in .", add_help=False) + parser._optionals.title = "Input options (one required)" + + # Adding the main options + # Defining the mutually exclusive group for the main options + groupMainOptions = parser.add_mutually_exclusive_group(required=True) + listAll = regexp_selection.getAllRegexpNames() + groupMainOptions.add_argument('-r', '--regexp', metavar='', choices=listAll, action='store', nargs='+', help='select the regular expressions to be looked for amongst the following: ' + str(listAll)) + groupMainOptions.add_argument('-R', '--new_regexp', metavar='', action='store', help='add a new regular expression, for example, for testing purposes.') + + # Adding the main options + # Defining the mutually exclusive group for the main options + groupInput = parser.add_mutually_exclusive_group(required=True) + groupInput.add_argument('-i', '--input_folder', metavar='', default=None, action='store', help='path to the folder to analyse.') + groupInput.add_argument('-w', '--web', metavar='', action='store', default=None, help='URI to be recovered and analysed.') + + # adding the option + groupProcessing = parser.add_argument_group('Processing arguments', 'Configuring the processing parameters.') + groupProcessing.add_argument('-e', '--extension', metavar='', nargs='+', choices=['csv', 'gml', 'json', 'mtz', 'ods', 'png', 'txt', 'xls', 'xlsx' ], required=False, default = DEFAULT_VALUES["extension"], action='store', help='output extension for the summary files. Default: xls.') + groupProcessing.add_argument('-o', '--output_folder', metavar='', required=False, default = DEFAULT_VALUES["output_folder"], action='store', help='output folder for the generated documents. While if the paths does not exist, usufy.py will try to create; if this argument is not provided, usufy will NOT write any down any data. Check permissions if something goes wrong.') + groupProcessing.add_argument('-v', '--verbose', metavar='', choices=[0, 1, 2], required=False, action='store', default=1, help='select the verbosity level: 0 - none; 1 - normal (default); 2 - debug.', type=int) + # Getting a sample header for the output files + groupProcessing.add_argument('-F', '--file_header', metavar='', required=False, default = DEFAULT_VALUES["file_header"], action='store', help='Header for the output filenames to be generated. If None was provided the following will be used: profiles..' ) + groupProcessing.add_argument('-q', '--quiet', required=False, action='store_true', default=False, help='Asking the program not to show any output.') + groupProcessing.add_argument('-L', '--logfolder', metavar='. +# +################################################################################ + + +__author__ = "Felix Brezo, Yaiza Rubio " +__copyright__ = "Copyright 2015-2017, i3visio" +__credits__ = ["Felix Brezo", "Yaiza Rubio"] +__license__ = "AGPLv3+" +__version__ = "v6.0" +__maintainer__ = "Felix Brezo, Yaiza Rubio" +__email__ = "contacto@i3visio.com" + + +import argparse +import os +import os.path +import osrframework.utils.banner as banner +import osrframework.utils.browser as browser +import osrframework.utils.general as general +import re + + +def enumerateURL(urlDict, outputFolder, startIndex= 0, maxErrors = 100): + """ + Function that performs the enumeration itself. + """ + + for i, url in enumerate(urlDict.keys()): + # Grabbing domain name: + domain = re.findall("://(.*)/", url)[0] + + # Defining the starting index + index = startIndex + + # The app will stop when this value reaches maxErrors + consecutiveErrors = 0 + + i3Browser = browser.Browser() + + # Main loop that checks if the maximum number of errors has been reached + while consecutiveErrors <= maxErrors: + # creating the new URL to download + newQuery = url.replace("", str(index)) + print(newQuery) + # Downloading the file + try: + data = i3Browser.recoverURL(newQuery) + + filename = domain.replace("/", "|") + "_" + "-profile_" + str(index).rjust(10, "0") +".html" + + if urlDict[url] != None: + if urlDict[url] in data: + print(general.info("Storing resource as:\t" + filename + "...")) + # The profile was found so we will store it: + with open( outputFolder + "/" + filename, "w") as oF: + oF.write(data) + else: + # The profile was found so we will store it: + print(general.info("Storing resource as:\t" + filename + "...") + with open( outputFolder + "/" + filename, "w") as oF: + oF.write(data) + except: + pass + #logger.error("The resource could not be downloaded.") + + index+=1 + + +def enumeration_main(args): + """ + Main loop for the enumeration + """ + print(general.title(banner.text)) + + sayingHello = """ +enumeration.py Copyright (C) F. Brezo and Y. Rubio (i3visio) 2016-2017 + +This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you +are welcome to redistribute it under certain conditions. For additional info, +visit """ + general.LICENSE_URL + "\n" + print(general.info(sayingHello)) + + # Loading URL + urlDict = {} + if args.url !=None: + urlDict[str(args.url)] = None + elif args.platforms != None: + for p in args.platforms: + with open(args.config, "r") as iF: + lines = iF.read().splitlines() + for l in lines: + platform = l.split('\t')[0] + url = l.split('\t')[1] + notFound = l.split('\t')[2] + if p == platform: + urlDict[url] = notFound + else: + return + if not os.path.exists(args.output_folder): + os.makedirs(args.output_folder) + + # Making the call + enumerateURL(urlDict, args.output_folder, startIndex = args.start_index, maxErrors = args.max_errors) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='enumeration.py - Checking the existence of a possible enumeration.', prog='enumeration.py', epilog='Check the README.md file for further details on the usage of this program or follow us on Twitter in .', add_help=False) + parser._optionals.title = "Input options (one required)" + + # Defining the mutually exclusive group for the main options + general = parser.add_mutually_exclusive_group(required=True) + # Adding the main options + general.add_argument('-u', '--url', metavar='', action='store', help = 'the URL address to test. The place where the index will be updated should be indicated as in the URL. For example: http://example.com/user/ would match "http://example.com/user/1", "http://example.com/user/2", etc. Only those platforms receiving a valid response will be loaded, so NO filter by not-found-tags is permitted in this mode.') + general.add_argument('-p', '--platforms', metavar='', nargs='+', action='store', help = 'Selection of a domain found in the configuration file.') + + # Configuring the processing options + groupProcessing = parser.add_argument_group('Processing arguments', 'Configuring the way in which mailfy will process the identified profiles.') + groupProcessing.add_argument('-o', '--output_folder', metavar='', action='store', help='path to the output folder where the results will be stored in raw. The name of the files will be their index.', required=False, default = "./results") + groupProcessing.add_argument('--config', metavar='', action='store', default="./utils/enumeration_config.txt", help = 'the file with the list of URL to test. The format should be: "platform_name\\thttp://example.com/user/\\tNOT_FOUND_TEXT".') + groupProcessing.add_argument('--max_errors', metavar='', action='store', help='maximum number of consecutive errors tolerated until finishing the crawling process.', required=False, default = 100, type = int) + groupProcessing.add_argument('--start_index', metavar='', action='store', help='starting user index for the crawling process.', required=False, default = 0, type = int) + + # About options + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s'+" " + __version__ , help='shows the version of the program and exists.') + + args = parser.parse_args() + + # Calling the main function + enumeration_main(args) diff --git a/osrframework/mailfy.py b/osrframework/mailfy.py new file mode 100644 index 0000000..c8f8550 --- /dev/null +++ b/osrframework/mailfy.py @@ -0,0 +1,658 @@ +#!/usr/bin/env python2 +# -*- coding: utf-8 -*- +# +################################################################################ +# +# Copyright 2015-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ + + +__author__ = "Felix Brezo, Yaiza Rubio" +__copyright__ = "Copyright 2015-2017, i3visio" +__credits__ = ["Felix Brezo", "Yaiza Rubio"] +__license__ = "AGPLv3+" +__version__ = "v6.0" +__maintainer__ = "Felix Brezo, Yaiza Rubio" +__email__ = "contacto@i3visio.com" + + +import argparse +import datetime as dt +import time +import json +# global issues for multiprocessing +from multiprocessing import Process, Queue, Pool +import os +import signal +import sys + +# Email verification libraries +import emailahoy +import validate_email + +import osrframework.thirdparties.haveibeenpwned_com.hibp as hibp +import osrframework.utils.banner as banner +import osrframework.utils.platform_selection as platform_selection +import osrframework.utils.configuration as configuration +import osrframework.utils.general as general + +# Pending +#188.com", "21cn.cn", "popo.163.com", "vip.126.com", "vip.163.com", "vip.188.com" + +EMAIL_DOMAINS = [ + "126.com", + "163.com", + "189.cn", + #"aaathats3as.com", + "btinternet.com", + #"cocaine.ninja", + #"cock.lu", + #"cock.email", + #"firemail.cc", + #"getbackinthe.kitchen", + "gmail.com", + #"hitler.rocks", + "hushmail.com", + "icloud.com", + "keemail.me", + "lycos.com", + "me.com", + #"memeware.net", + #"noob.com", + "protonmail.ch", + "protonmail.com", + "rediffmail.com", + "seznam.cz", + "tuta.io", + "tutamail.com", + "tutanota.com", + "tutanota.de", + #"waifu.club", + #"wp.pl", + "ya.ru", + "yandex.com", + "yeah.net", + "zoho.com" +] + +LEAKED_DOMAINS = [ + "126.com", + "163.com", + "189.cn", + "aol.com", + "bk.ru", + "breakthru.com", + #"aaathats3as.com", + "btinternet.com", + #"cocaine.ninja", + #"cock.lu", + #"cock.email", + #"firemail.cc", + #"getbackinthe.kitchen", + "gmail.com", + "gmx.com", + "gmx.de", + #"hitler.rocks", + "hotmail.com", + "hushmail.com", + "icloud.com", + "inbox.com", + "keemail.me", + "latinmail.com", + "libero.it", + "lycos.com", + "me.com", + "mail.ru", + "mail2tor.com", + #"memeware.net", + #"noob.com", + "outlook.com", + "protonmail.ch", + "protonmail.com", + "rambler.ru", + "rocketmail.com", + "rediffmail.com", + "seznam.cz", + "starmedia.com", + "tuta.io", + "tutamail.com", + "tutanota.com", + "tutanota.de", + "ukr.net", + #"waifu.club", + #"wp.pl", + "ya.ru", + "yahoo.com", + "yandex.com", + "yandex.ru", + "yeah.net", + "zoho.com" +] + + +def getMoreInfo(e): + """ + Method that calls different third party API. + + Args: + ----- + e: Email to verify. + + Returns: + -------- + Three different values: email, alias and domain. + """ + # Grabbing the email + email = {} + email["type"] = "i3visio.email" + email["value"] = e + email["attributes"] = [] + + # Grabbing the alias + alias = {} + alias["type"] = "i3visio.alias" + alias["value"] = e.split("@")[0] + alias["attributes"] = [] + + # Grabbing the domain + domain= {} + domain["type"] = "i3visio.domain" + domain["value"] = e.split("@")[1] + domain["attributes"] = [] + + return email, alias, domain + + +def weCanCheckTheseDomains(email): + """ + Method that verifies if a domain can be safely verified. + + Args: + ----- + email: the email whose domain will be verified. + + Returns: + -------- + bool: it represents whether the domain can be verified. + """ + # Known platform not to be working... + notWorking = [ + "@aol.com", + "@bk.ru", + "@breakthru.com", + "@gmx.", + "@hotmail.co", + "@inbox.com", + "@latinmail.com", + "@libero.it", + "@mail.ru", + "@mail2tor.com", + "@outlook.com", + "@rambler.ru", + "@rocketmail.com", + "@starmedia.com", + "@ukr.net" + "@yahoo.", + "@ymail." + ] + + #notWorking = [] + for n in notWorking: + if n in email: + print(general.warning("WARNING: the domain of '" + email + "' has been blacklisted by mailfy.py as it CANNOT BE VERIFIED.")) + return False + + emailDomains = EMAIL_DOMAINS + safe = False + + for e in emailDomains: + if e in email: + safe = True + break + + if not safe: + print(general.warning("WARNING: the domain of '" + email + "' will not be safely verified.")) + return True + + +def grabEmails(emails=None, emailsFile=None, nicks=None, nicksFile=None, domains = EMAIL_DOMAINS, excludeDomains = []): + """ + Method that generates a list of emails. + + Args: + ----- + emails: Any premade list of emails. + emailsFile: Filepath to the emails file (one per line). + nicks: A list of aliases. + nicksFile: Filepath to the aliases file (one per line). + domains: Domains where the aliases will be tested. + excludeDomains: Domains to be excluded from the created list. + + Returns: + -------- + list: the list of emails that will be verified. + """ + email_candidates = [] + + if emails != None: + email_candidates = emails + elif emailsFile != None: + # Reading the emails file + with open(emailsFile, "r") as iF: + email_candidates = iF.read().splitlines() + elif nicks != None: + # Iterating the list of nicks + for n in nicks: + # Iterating the list of possible domains to build the emails + for d in domains: + if d not in excludeDomains: + email_candidates.append(n+"@"+d) + elif nicksFile != None: + # Reading the list of nicks + with open(nicksFile, "r") as iF: + nicks = iF.read().splitlines() + # Iterating the list of nicks + for n in nicks: + # Iterating the list of possible domains to build the emails + for d in domains: + if d not in excludeDomains: + email_candidates.append(n+"@"+d) + return email_candidates + + +def pool_function(args): + """ + A wrapper for being able to launch all the threads. + + We will use python-emailahoy library for the verification in non-Windows + systems as it is faster than validate_email. In Windows systems the latter + is preferred. + + Args: + ----- + args: reception of the parameters for getPageWrapper as a tuple. + + Returns: + -------- + A dictionary representing whether the verification was ended + successfully. The format is as follows: + ``` + {"platform": "str(domain["value"])", "status": "DONE", "data": aux} + ``` + """ + is_valid = True + + try: + if sys.platform == 'win32': + is_valid = validate_email.validate_email(args, verify=True) + else: + is_valid = emailahoy.verify_email_address(args) + except Exception, e: + print(general.warning("WARNING. An error was found when performing the search. You can omit this message.\n" + str(e))) + is_valid = False + + if is_valid: + email, alias, domain = getMoreInfo(args) + aux = {} + aux["type"] = "i3visio.profile" + aux["value"] = domain["value"] + " - " + alias["value"] + aux["attributes"] = [] + aux["attributes"].append(email) + aux["attributes"].append(alias) + aux["attributes"].append(domain) + + return {"platform": str(domain["value"]), "status": "DONE", "data": aux} + else: + return {"platform": str(domain["value"]), "status": "DONE", "data": {}} + + +def performSearch(emails=[], nThreads=16, secondsBeforeTimeout=5): + """ + Method to perform the mail verification process. + + Args: + ----- + emails: list of emails to be verified. + nThreads: the number of threads to be used. Default: 16 threads. + secondsBeforeTimeout: number of seconds to wait before raising a + timeout. Default: 5 seconds. + + Returns: + -------- + TODO. + """ + # Getting starting time + _startTime = time.time() + + def hasRunOutOfTime(oldEpoch): + """ + Function that checks if a given time has passed. + + It verifies whether the oldEpoch has passed or not by checking if the + seconds passed are greater. + + Arguments + --------- + oldepoch: Seconds passed since 1970 as returned by `time.time()`. + + Returns + ------- + A boolean representing whether it has run out of time. + """ + now = time.time() + return now - oldEpoch >= secondsBeforeTimeout + + results = [] + args = [] + + # Grabbing all the emails that would be validated + for e in emails: + if weCanCheckTheseDomains(e): + args.append((e)) + + # Returning None if no valid domain has been returned + if len(args) == 0: + return results + + # If the process is executed by the current app, we use the Processes. It is faster than pools. + if nThreads <= 0 or nThreads > len(args): + nThreads = len(args) + + # Launching the Pool + # ------------------ + # Example catched from: https://stackoverflow.com/questions/11312525/catch-ctrlc-sigint-and-exit-multiprocesses-gracefully-in-python + try: + original_sigint_handler = signal.signal(signal.SIGINT, signal.SIG_IGN) + pool = Pool(nThreads) + signal.signal(signal.SIGINT, original_sigint_handler) + except ValueError: + # To avoid: ValueError: signal only works in main thread + pool = Pool(nThreads) + + poolResults = [] + try: + def log_result(result): + # This is called whenever foo_pool(i) returns a result. + # result_list is modified only by the main process, not the pool workers. + poolResults.append(result) + + for m in emails: + # We need to create all the arguments that will be needed + parameters = ( m, ) + pool.apply_async (pool_function, args= parameters, callback = log_result ) + + # Waiting for results to be finished or time to pass + while len(poolResults) < len(emails) and not hasRunOutOfTime(_startTime): + pass + + # Closing normal termination + pool.close() + except KeyboardInterrupt: + print(general.warning("\n[!] Process manually stopped by the user. Terminating workers.\n")) + pool.terminate() + + pending = "" + + print(general.warning("[!] The following platforms were not processed:")) + for m in emails: + processed = False + for result in poolResults: + if str(m) in json.dumps(result["data"]): + processed = True + break + if not processed: + print("\t- " + str(p)) + pending += " " + str(m) + + print("\n") + print(general.warning("If you want to relaunch the app with these platforms you can always run the command with: ")) + print("\t mailfy.py ... -p " + general.emphasis(pending)) + print("\n") + print(general.warning("If you prefer to avoid these platforms you can manually evade them for whatever reason with: ")) + print("\t mailfy.py ... -x " + general.emphasis(pending)) + print("\n") + pool.join() + + # Processing the results + # ---------------------- + for serArray in poolResults: + data = serArray["data"] + # We need to recover the results and check if they are not an empty json or None + if data != None and data != {}: + results.append(data) + + pool.close() + + return results + + +def main(args): + """ + Main function to launch phonefy. + + The function is created in this way so as to let other applications make + use of the full configuration capabilities of the application. The + parameters received are used as parsed by this modules `getParser()`. + + Args: + ----- + args: The parameters as processed by this modules `getParser()`. + + Results: + -------- + Returns a list with i3visio entities. + """ + results = [] + + if not args.quiet: + print(general.title(banner.text)) + + sayingHello = """ +mailfy.py Copyright (C) F. Brezo and Y. Rubio (i3visio) 2016-2017 + +This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you +are welcome to redistribute it under certain conditions. For additional info, +visit """ + general.LICENSE_URL + "\n" + print(general.title(sayingHello)) + + # Displaying a warning if this is being run in a windows system + if sys.platform == 'win32': + print(general.warning("""OSRFramework has detected that you are running mailfy.py in a Windows system. +As the "emailahoy" library is NOT working properly there, "validate_email" will +be used instead. Verification may be slower though.""")) + + if args.license: + general.showLicense() + else: + # Grabbing the list of global domains + if args.is_leaked: + domains = LEAKED_DOMAINS + # Processing the options returned to remove the "all" option + elif "all" in args.domains: + domains = EMAIL_DOMAINS + else: + # processing only the given domains and excluding the ones provided + domains = [] + for d in args.domains: + if d not in args.exclude: + domains.append(d) + + if args.create_emails: + emails = grabEmails(nicksFile=args.create_emails, domains=domains, excludeDomains=args.exclude) + else: + emails = grabEmails(emails=args.emails, emailsFile=args.emails_file, nicks=args.nicks, nicksFile=args.nicks_file, domains=domains, excludeDomains=args.exclude) + + startTime= dt.datetime.now() + + if not args.is_leaked: + # Showing the execution time... + if not args.quiet: + print(str(startTime) +"\tStarting search in " + general.emphasis(str(len(emails))) + " different emails:\n"+ json.dumps(emails, indent=2, sort_keys=True) + "\n") + print(general.emphasis("\tPress to stop...\n")) + # Perform searches, using different Threads + tmp = performSearch(emails, args.threads) + + # We make a strict copy of the object + results = list(tmp) + + if not args.quiet: + now = dt.datetime.now() + print(str(now) +"\tMailfy has found " + general.emphasis(str(len(results))) + " existing email(s). Has it been leaked somewhere?") + + # Verify the existence of the mails found as leaked emails. + for r in tmp: + # We assume that the first attribute is always the email + query = r["attributes"][0]["value"] + leaks = hibp.checkIfEmailWasHacked(query) + if len(leaks) > 0: + if not args.quiet: + print(general.success("\t" + query + " has been found in at least " + str(len(leaks)) + " different leaks.")) + email, alias, domain = getMoreInfo(query) + + for leak in leaks: + # Creating a new full entity from scratch + new = {} + new["type"] = "i3visio.profile" + new["value"] = leak["value"] + " - " + alias["value"] + new["attributes"] = [] + new["attributes"].append(email) + new["attributes"].append(alias) + new["attributes"].append(domain) + + # leak contains a i3visio.platform built by HIBP + new["attributes"].append(leak) + results.append(new) + else: + if not args.quiet: + print(general.warning("\t" + query + " has NOT been found on any leak yet.")) + else: + if not args.quiet: + print("\n" + str(startTime) +"\tStarting search of " + general.emphasis(str(len(emails))) + " different emails in leaked databases.\nNote that this will take between 1 and 2 seconds per query due to HIBP API restrictions:\n"+ json.dumps(emails, indent=2, sort_keys=True) + "\n") + print(general.emphasis("\tPress to stop...\n")) + + # Perform is_leaked function + results = [] + for i, e in enumerate(emails): + if not args.quiet: + print("\t" + str(i+1) + "/" + str(len(emails)) + " - Searching if " + e + " has been leaked somewhere...") + leaks = hibp.checkIfEmailWasHacked(e) + + if len(leaks) > 0: + if not args.quiet: + print(general.success("\t" + e + " has been found in at least " + str(len(leaks)) + " different leaks.")) + + email, alias, domain = getMoreInfo(e) + for leak in leaks: + # Creating a new full entity from scratch + new = {} + new["type"] = "i3visio.profile" + new["value"] = leak["value"] + " - " + alias["value"] + new["attributes"] = [] + new["attributes"].append(email) + new["attributes"].append(alias) + new["attributes"].append(domain) + + # leak contains a i3visio.platform built by HIBP + new["attributes"].append(leak) + results.append(new) + + # Trying to store the information recovered + if args.output_folder != None: + if not os.path.exists(args.output_folder): + os.makedirs(args.output_folder) + # Grabbing the results + fileHeader = os.path.join(args.output_folder, args.file_header) + for ext in args.extension: + # Generating output files + general.exportUsufy(results, ext, fileHeader) + + # Showing the information gathered if requested + if not args.quiet: + now = dt.datetime.now() + print("\n" + str(now) + "\tA summary of the results obtained are shown in the following table:\n") + print(general.success(general.usufyToTextExport(results))) + + now = dt.datetime.now() + print("\n" + str(now) + "\tYou can find all the information collected in the following files:") + for ext in args.extension: + # Showing the output files + print(general.emphasis("\t" + fileHeader + "." + ext)) + + # Showing the execution time... + if not args.quiet: + endTime= dt.datetime.now() + print("\n" + str(endTime) +"\tFinishing execution...\n") + print("Total time used:\t" + general.emphasis(str(endTime-startTime))) + print("Average seconds/query:\t" + general.emphasis(str((endTime-startTime).total_seconds()/len(emails))) +" seconds\n") + + if not args.quiet: + # Urging users to place an issue on Github... + print(banner.footer) + + return results + + +def getParser(): + DEFAULT_VALUES = configuration.returnListOfConfigurationValues("mailfy") + # Capturing errors just in case the option is not found in the configuration + try: + excludeList = [DEFAULT_VALUES["exclude_domains"]] + except: + excludeList = [] + + parser = argparse.ArgumentParser(description='mailfy.py - Checking the existence of a given mail.', prog='mailfy.py', epilog='Check the README.md file for further details on the usage of this program or follow us on Twitter in .', add_help=False) + parser._optionals.title = "Input options (one required)" + + # Defining the mutually exclusive group for the main options + groupMainOptions = parser.add_mutually_exclusive_group(required=True) + # Adding the main options + groupMainOptions.add_argument('--license', required=False, action='store_true', default=False, help='shows the GPLv3+ license and exists.') + groupMainOptions.add_argument('-m', '--emails', metavar='', nargs='+', action='store', help = 'the list of emails to be checked.') + groupMainOptions.add_argument('-M', '--emails_file', metavar='', action='store', help = 'the file with the list of emails.') + groupMainOptions.add_argument('-n', '--nicks', metavar='', nargs='+', action='store', help = 'the list of nicks to be checked in the domains selected.') + groupMainOptions.add_argument('-N', '--nicks_file', metavar='', action='store', help = 'the file with the list of nicks to be checked in the domains selected.') + groupMainOptions.add_argument('--create_emails', metavar='', action='store', help = 'the file with the list of nicks to be created in the domains selected.') + + # Configuring the processing options + groupProcessing = parser.add_argument_group('Processing arguments', 'Configuring the way in which mailfy will process the identified profiles.') + #groupProcessing.add_argument('-L', '--logfolder', metavar='. +# +################################################################################ + + +__author__ = "Felix Brezo, Yaiza Rubio " +__copyright__ = "Copyright 2016-2017, i3visio" +__credits__ = ["Felix Brezo", "Yaiza Rubio"] +__license__ = "AGPLv3+" +__version__ = "v6.0" +__maintainer__ = "Felix Brezo, Yaiza Rubio" +__email__ = "contacto@i3visio.com" + + +import argparse +import cmd as cmd +import json +import os +import sys + +import osrframework.utils.configuration as configuration +import osrframework.utils.banner as banner +import osrframework.utils.general as general +import osrframework.utils.platform_selection as platform_selection +import osrframework.utils.regexp_selection as regexp_selection + +import osrframework.domainfy as domainfy +import osrframework.entify as entify +import osrframework.mailfy as mailfy +import osrframework.phonefy as phonefy +import osrframework.searchfy as searchfy +import osrframework.usufy as usufy + +UTILS = [ + "domainfy", + "entify", #: regexp_selection.getAllRegexpNames(), + "mailfy", # mailfy.EMAIL_DOMAINS, + "phonefy", + "searchfy", + "usufy", # platform_selection.getAllPlatformNames("usufy"), +] + +################################################################################ +# Defining the abstract class of the utils that will be managed # +################################################################################ + +class OSRFConsoleUtil(cmd.Cmd): + """Simple class from which of a Metasploit-like interactive interface.""" + # Setting up the name of the module + UNAME = "Abstract Util" + + intro = "" + # Defining the prompt + prompt = 'osrf (' + UNAME + ') > ' + # Defining the character to create hyphens + ruler = '-' + + # Defining the configuration for this module + CONFIG = {} + CONFIG["OPTION"] = { + "DESCRIPTION" : "An example of option.", + "CURRENT_VALUE" : "Hello", + "DEFAULT_VALUE" : "Hello", + "REQUIRED" : False, + "OPTIONS" : ["world", "people"] + } + CONFIG["OUTPUT"] = { + "DESCRIPTION" : "The path to the output folder where the files will be created.", + "CURRENT_VALUE" : "./", + "DEFAULT_VALUE" : "./", + "REQUIRED" : False, + "OPTIONS" : [] + } + CONFIG["EXTENSION"] = { + "DESCRIPTION" : "The default extension of the files to be written.", + "CURRENT_VALUE" : "csv", + "DEFAULT_VALUE" : "csv", + "REQUIRED" : False, + "OPTIONS" : ['csv', 'xls', 'xlsx', 'json', 'gml'] + } + + def _checkIfRequiredAreSet(self): + """Internal function to check if the required parameters have been set.""" + details = "" + for key in self.CONFIG.keys(): + if self.CONFIG[key]["REQUIRED"] and self.CONFIG[key]["CURRENT_VALUE"] == None: + return False + return True + + def _getOptionsDescription(self): + """Internal function to collect the description of each and every parameter""" + details = "" + for key in self.CONFIG.keys(): + details += "\t- " + key + ". " + self.CONFIG[key]["DESCRIPTION"] + "\n" + return details + + def _getParams(self): + """Function that creates the array with the params that will work with this function.""" + # Creating the parameters as if they were created using the command line + params = ["-h"] + return params + + def do_set(self, line): + """Setting the variables defined in CONFIG. You can check their values at any time by typing 'show options'.""" + try: + parameter, value = line.split(" ", 1) + # Setting the parameter + if parameter in self.CONFIG.keys(): + # Verifying if the parameter is in the options + if len(self.CONFIG[parameter]["OPTIONS"]) > 0: + splittedValues = value.split(" ") + + for s in splittedValues: + if s not in self.CONFIG[parameter]["OPTIONS"]: + raise Exception("ERROR: the value provided is not valid.") + # Setting the value + self.CONFIG[parameter]["CURRENT_VALUE"] = value + print(general.info(parameter + "=" + str(value))) + else: + raise Exception("ERROR: parameter not valid.") + except Exception as e: + print(general.error("[!] ERROR: Not enough parameters provided. Usage: set OPTION VALUE.")) + print(general.error(str(e))) + + def complete_set(self, text, line, begidx, endidx): + # First, we will try to get the available parameters + if len(line.split(" ")) == 2: + if not text: + completions = self.CONFIG.keys() + else: + completions = [ f + for f in self.CONFIG.keys() + if f.startswith(text.upper()) + ] + # We are setting the value + elif len(line.split(" ")) >= 3: + # First, we get the given parameter + parameter = line.split(" ")[1] + if not text: + completions = self.CONFIG[parameter]["OPTIONS"] + else: + completions = [ f + for f in self.CONFIG[parameter]["OPTIONS"] + if f.startswith(text.lower()) + ] + return completions + + def do_unset(self, line): + """Unsetting the variables defined in CONFIG. You can check their values at any time by typing 'show options' and unsetting all the options at once by typing 'unset all'".""" + try: + parameter = line.split(" ")[0] + # Getting the parameter + if parameter in self.CONFIG.keys(): + # Unsetting the value + self.CONFIG[parameter]["CURRENT_VALUE"] = self.CONFIG[parameter]["DEFAULT_VALUE"] + print(general.info(parameter + " reseted to '" + str(self.CONFIG[parameter]["DEFAULT_VALUE"]) + "'.")) + elif parameter == "all": + for p in self.CONFIG.keys(): + # Unsetting all the values + self.CONFIG[p]["CURRENT_VALUE"] = self.CONFIG[p]["DEFAULT_VALUE"] + print(general.info("All parameters reseted to their default values.")) + else: + raise Exception("ERROR: parameter not valid.") + except Exception as e: + print(gemeral.error("[!] ERROR: Not enough parameters provided. Usage: unset OPTION")) + print(general.error("Traceback: " + str(e))) + + def complete_unset(self, text, line, begidx, endidx): + # First, we will try to get the available parameters + unsettingOptions = ["all"] + self.CONFIG.keys() + + if len(line.split(" ")) == 2: + if not text: + completions = unsettingOptions + else: + completions = [ f + for f in unsettingOptions + if f.startswith(text.upper()) + ] + return completions + + def do_run(self, line): + """Command that send the order to the framework to launch the current utility.""" + if self._checkIfRequiredAreSet(): + print(general.info("Launching the util...")) + else: + print(general.error("There are required parameters which have not been set.")) + self.do_show("options") + + def do_show(self, line): + """Showing the information about the module. The things to show are: 'options' and 'command'. + - ' options' will show the current values of each and every parameter. + - 'command' will show the command needed to launch the module as is using the cli applications.""" + if line.lower() == "options": + print(general.info("Defining the different options for util " + self.UNAME + "...")) + for key in self.CONFIG.keys(): + print(general.info("\t- " + (key + (" (*)." if self.CONFIG[key]["REQUIRED"] else ".") ).ljust(14) + "" + self.CONFIG[key]["DESCRIPTION"])) + + print(general.info("Showing the current state of the options for util " + self.UNAME + "...")) + for key in self.CONFIG.keys(): + print(general.info("\t- " + (key + (" (*)" if self.CONFIG[key]["REQUIRED"] else "") + ": ").ljust(14) + ("" if self.CONFIG[key]["CURRENT_VALUE"] == None else str(self.CONFIG[key]["CURRENT_VALUE"])))) + elif line.lower() == "command": + print(general.info("Equivalent command to be launched to imitate the current configuration:\n\t$ ") + general.title(self.createCommandLine()) + "\n") + + def complete_show(self, text, line, begidx, endidx): + # First, we will try to get the available parameters + showOptions = ["options", "command"] + + if len(line.split(" ")) == 2: + if not text: + completions = showOptions + else: + completions = [ f + for f in showOptions + if f.startswith(text.lower()) + ] + return completions + + def createCommandLine(self): + """Method to build the commandline that should execute the same actions as defined in the console.""" + if self._checkIfRequiredAreSet(): + command = self.UNAME + # Getting the params + params = self._getParams() + for p in params: + command += " " +p + # Returning the command + return command + else: + return self.UNAME + " -h # NOTE: all the required parameters are not set. Option '-h' is being shown." + + def do_info(self, line): + """This command shows all the information available about the module.""" + print(general.info("Displaying module information.")) + self.do_show("options") + self.do_show("command") + + def do_back(self, line): + """ +This command unloads the current util and returns back to the main console. + """ + return True + + def do_exit(self, line): + """This command will exit the osrfconsole normally.""" + print(general.info("Exiting the program...")) + sys.exit() + +""" + _ _ __ + __| | ___ _ __ ___ __ _(_)_ __ / _|_ _ + / _` |/ _ \| '_ ` _ \ / _` | | '_ \| |_| | | | +| (_| | (_) | | | | | | (_| | | | | | _| |_| | + \__,_|\___/|_| |_| |_|\__,_|_|_| |_|_| \__, | + |___/ +""" + + +################################################################################ +# Defining the class that will create the calls to the domainfy util. # +################################################################################ + +class OSRFConsoleDomainfy(OSRFConsoleUtil): + """Class that controls an interactive domainfy program.""" + # Setting up the name of the module + UNAME = "domainfy.py" + + intro = "" + # Defining the prompt + prompt = general.emphasis('osrf (' + UNAME.split('.')[0] + ') > ') + # Defining the character to create hyphens + ruler = '-' + + DEFAULT_VALUES = configuration.returnListOfConfigurationValues("domainfy") + + # Defining the configuration for this module + CONFIG = {} + CONFIG["NICK"] = { + "DESCRIPTION" : "Nick to be verified.", + "CURRENT_VALUE" : None, + "DEFAULT_VALUE" : None, + "REQUIRED" : True, + "OPTIONS" : [] + } + CONFIG["TLD"] = { + "DESCRIPTION" : "Types of TLD to be verified", + "CURRENT_VALUE" : DEFAULT_VALUES["tlds"], + "DEFAULT_VALUE" : DEFAULT_VALUES["tlds"], + "REQUIRED" : False, + "OPTIONS" : domainfy.TLD.keys(), + } + CONFIG["THREADS"] = { + "DESCRIPTION" : "Number of threads to use.", + "CURRENT_VALUE" : DEFAULT_VALUES["threads"], + "DEFAULT_VALUE" : DEFAULT_VALUES["threads"], + "REQUIRED" : False, + "OPTIONS" : [] + } + CONFIG["OUTPUT"] = { + "DESCRIPTION" : "The path to the output folder where the files will be created.", + "CURRENT_VALUE" : DEFAULT_VALUES["output_folder"], + "DEFAULT_VALUE" : DEFAULT_VALUES["output_folder"], + "REQUIRED" : False, + "OPTIONS" : [] + } + CONFIG["EXTENSION"] = { + "DESCRIPTION" : "The default extension of the files to be written.", + "CURRENT_VALUE" : DEFAULT_VALUES["extension"], + "DEFAULT_VALUE" : DEFAULT_VALUES["extension"], + "REQUIRED" : False, + "OPTIONS" : ['csv', 'xls', 'xlsx', 'json', 'gml'] + } + CONFIG["USER_DEFINED"] = { + "DESCRIPTION" : "Other TLD to be verified. Note that it should start with a '.'.", + "CURRENT_VALUE" : None, + "DEFAULT_VALUE" : None, + "REQUIRED" : False, + "OPTIONS" : [], + } + + def _getParams(self): + """ Function that creates the array with the params that will work with this function""" + # Creating the parameters as if they were created using the command line + params = [ + "-n" ] + self.CONFIG["NICK"]["CURRENT_VALUE"].split() + [ + "-t" ] + self.CONFIG["TLD"]["CURRENT_VALUE"].split() + [ + "-T", str(self.CONFIG["THREADS"]["CURRENT_VALUE"]), + "-o", self.CONFIG["OUTPUT"]["CURRENT_VALUE"], + "-e" ] + self.CONFIG["EXTENSION"]["CURRENT_VALUE"].split() + + # Appending new tlds if provided + if self.CONFIG["USER_DEFINED"]["CURRENT_VALUE"] != None: + params += [ "-u", self.CONFIG["USER_DEFINED"]["CURRENT_VALUE"] ] + return params + + def do_run(self, line): + """Running the current application. This method should be redefined for each util.""" + print + # Checking if all the required parameters have been set + if self._checkIfRequiredAreSet(): + print(general.info("Collecting the options set by the user...")) + # Getting the parser... + parser = domainfy.getParser() + + # Generating the parameters + params = self._getParams() + + args = parser.parse_args(params) + + print(general.info("Launching " + self.UNAME + " with the following parameters: ") + general.emphashis(str(params))) + + try: + usufy.main(args) + except Exception as e: + print(gemeral.error("[!] ERROR. Something happenned when launching the utility. Type 'show options' to check the parameters. ")) + print(general.error("Traceback: " + str(e))) + else: + print(general.error("[!] ERROR. There are required parameters which have not been set.")) + self.do_show("options") + print(general.success("Execution ended successfully.")) + +""" +================================================================================ + _ _ __ + ___ _ __ | |_(_)/ _|_ _ + / _ \ '_ \| __| | |_| | | | +| __/ | | | |_| | _| |_| | + \___|_| |_|\__|_|_| \__, | + |___/ +================================================================================ +""" + +################################################################################ +# Defining the class that will create the calls to the entify util. # +################################################################################ + +class OSRFConsoleEntify(OSRFConsoleUtil): + """Class that controls an interactive entify program.""" + # Setting up the name of the module + UNAME = "entify.py" + + intro = "" + # Defining the prompt + prompt = 'osrf (' + UNAME.split('.')[0] + ') > ' + # Defining the character to create hyphens + ruler = '-' + + DEFAULT_VALUES = configuration.returnListOfConfigurationValues("entify") + + # Defining the configuration for this module + CONFIG = {} + CONFIG["URL"] = { + "DESCRIPTION" : "The URL to be checked.", + "CURRENT_VALUE" : None, + "DEFAULT_VALUE" : None, + "REQUIRED" : True, + "OPTIONS" : [] + } + CONFIG["REGEXP"] = { + "DESCRIPTION" : "The regular expressions to be checked.", + "CURRENT_VALUE" : "all", + "DEFAULT_VALUE" : "all", + "REQUIRED" : False, + "OPTIONS" : regexp_selection.getAllRegexpNames(), + } + CONFIG["OUTPUT"] = { + "DESCRIPTION" : "The path to the output folder where the files will be created.", + "CURRENT_VALUE" : DEFAULT_VALUES["output_folder"], + "DEFAULT_VALUE" : DEFAULT_VALUES["output_folder"], + "REQUIRED" : False, + "OPTIONS" : [] + } + CONFIG["EXTENSION"] = { + "DESCRIPTION" : "The default extension of the files to be written.", + "CURRENT_VALUE" : DEFAULT_VALUES["extension"], + "DEFAULT_VALUE" : DEFAULT_VALUES["extension"], + "REQUIRED" : False, + "OPTIONS" : ['csv', 'xls', 'xlsx', 'json', 'gml'] + } + + def _getParams(self): + """ Function that creates the array with the params that will work with this function""" + # Creating the parameters as if they were created using the command line + params = [ + "-u", self.CONFIG["URL"]["CURRENT_VALUE"], + "-r" ] + self.CONFIG["REGEXP"]["CURRENT_VALUE"].split() + [ + "-o", self.CONFIG["OUTPUT"]["CURRENT_VALUE"], + "-e" ] + self.CONFIG["EXTENSION"]["CURRENT_VALUE"].split() + + return params + + def do_run(self, line): + """Running the current application. This method should be redefined for each util.""" + print + # Checking if all the required parameters have been set + if self._checkIfRequiredAreSet(): + print(general.info("Collecting the options set by the user...")) + # Getting the parser... + parser = entify.getParser() + + # Generating the parameters + params = self._getParams() + + args = parser.parse_args(params) + + print(general.info("Launching " + self.UNAME + " with the following parameters: ") + general.emphashis(str(params))) + + try: + usufy.main(args) + except Exception as e: + print(gemeral.error("[!] ERROR. Something happened when launching the utility. Type 'show options' to check the parameters. ")) + print(general.error("Traceback: " + str(e))) + else: + print(general.error("[!] ERROR. There are required parameters which have not been set.")) + self.do_show("options") + print(general.success("Execution ended successfully.")) + +""" +================================================================================ + _ _ __ + _ __ ___ __ _(_) |/ _|_ _ +| '_ ` _ \ / _` | | | |_| | | | +| | | | | | (_| | | | _| |_| | +|_| |_| |_|\__,_|_|_|_| \__, | + |___/ +================================================================================ +""" + +################################################################################ +# Defining the class that will create the calls to the mailfy util. # +################################################################################ + +class OSRFConsoleMailfy(OSRFConsoleUtil): + """Class that controls an interactive mailfy program.""" + # Setting up the name of the module + UNAME = "mailfy.py" + + intro = "" + # Defining the prompt + prompt = 'osrf (' + UNAME.split('.')[0] + ') > ' + # Defining the character to create hyphens + ruler = '-' + + DEFAULT_VALUES = configuration.returnListOfConfigurationValues("mailfy") + + # Defining the configuration for this module + CONFIG = {} + CONFIG["NICK"] = { + "DESCRIPTION" : "Alias to be verified.", + "CURRENT_VALUE" : None, + "DEFAULT_VALUE" : None, + "REQUIRED" : True, + "OPTIONS" : [] + } + CONFIG["PLATFORMS"] = { + "DESCRIPTION" : "Platforms to be checked.", + "CURRENT_VALUE" : DEFAULT_VALUES["domains"], + "DEFAULT_VALUE" : DEFAULT_VALUES["domains"], + "REQUIRED" : False, + "OPTIONS" : mailfy.EMAIL_DOMAINS, + } + CONFIG["THREADS"] = { + "DESCRIPTION" : "Number of threads to use.", + "CURRENT_VALUE" : DEFAULT_VALUES["threads"], + "DEFAULT_VALUE" : DEFAULT_VALUES["threads"], + "REQUIRED" : False, + "OPTIONS" : [] + } + CONFIG["OUTPUT"] = { + "DESCRIPTION" : "The path to the output folder where the files will be created.", + "CURRENT_VALUE" : DEFAULT_VALUES["output_folder"], + "DEFAULT_VALUE" : DEFAULT_VALUES["output_folder"], + "REQUIRED" : False, + "OPTIONS" : [] + } + CONFIG["EXTENSION"] = { + "DESCRIPTION" : "The default extension of the files to be written.", + "CURRENT_VALUE" : DEFAULT_VALUES["extension"], + "DEFAULT_VALUE" : DEFAULT_VALUES["extension"], + "REQUIRED" : False, + "OPTIONS" : ['csv', 'xls', 'xlsx', 'json', 'gml'] + } + + def _getParams(self): + """ Function that creates the array with the params that will work with this function""" + # Creating the parameters as if they were created using the command line + params = [ + "-n" ] + self.CONFIG["NICK"]["CURRENT_VALUE"].split() + [ + "-p" ] + self.CONFIG["PLATFORMS"]["CURRENT_VALUE"].split() + [ + "-T", str(self.CONFIG["THREADS"]["CURRENT_VALUE"]), + "-o", self.CONFIG["OUTPUT"]["CURRENT_VALUE"], + "-e" ] + self.CONFIG["EXTENSION"]["CURRENT_VALUE"].split() + + return params + + def do_run(self, line): + """Running the current application. This method should be redefined for each util.""" + print + # Checking if all the required parameters have been set + if self._checkIfRequiredAreSet(): + print(general.info("Collecting the options set by the user...")) + # Getting the parser... + parser = mailfy.getParser() + + # Generating the parameters + params = self._getParams() + + args = parser.parse_args(params) + + print(general.info("Launching " + self.UNAME + " with the following parameters: ") + general.emphashis(str(params))) + + try: + usufy.main(args) + except Exception as e: + print(gemeral.error("[!] ERROR. Something happenned when launching the utility. Type 'show options' to check the parameters. ")) + print(general.error("Traceback: " + str(e))) + else: + print(general.error("[!] ERROR. There are required parameters which have not been set.")) + self.do_show("options") + print(general.success("Execution ended successfully.")) + +""" +================================================================================ + _ __ + _ __ | |__ ___ _ __ ___ / _|_ _ +| '_ \| '_ \ / _ \| '_ \ / _ \ |_| | | | +| |_) | | | | (_) | | | | __/ _| |_| | +| .__/|_| |_|\___/|_| |_|\___|_| \__, | +|_| |___/ +================================================================================ +""" + +################################################################################ +# Defining the class that will create the calls to the phonefy util. # +################################################################################ + +class OSRFConsolePhonefy(OSRFConsoleUtil): + """Class that controls an interactive phonefy program.""" + # Setting up the name of the module + UNAME = "phonefy.py" + + intro = "" + # Defining the prompt + prompt = 'osrf (' + UNAME.split('.')[0] + ') > ' + # Defining the character to create hyphens + ruler = '-' + + DEFAULT_VALUES = configuration.returnListOfConfigurationValues("phonefy") + + # Defining the configuration for this module + CONFIG = {} + CONFIG["NUMBER"] = { + "DESCRIPTION" : "Numbers to be verified.", + "CURRENT_VALUE" : None, + "DEFAULT_VALUE" : None, + "REQUIRED" : True, + "OPTIONS" : [] + } + CONFIG["PLATFORMS"] = { + "DESCRIPTION" : "Platforms to be checked.", + "CURRENT_VALUE" : DEFAULT_VALUES["platforms"], + "DEFAULT_VALUE" : DEFAULT_VALUES["platforms"], + "REQUIRED" : False, + "OPTIONS" : platform_selection.getAllPlatformNames("phonefy"), + } + CONFIG["OUTPUT"] = { + "DESCRIPTION" : "The path to the output folder where the files will be created.", + "CURRENT_VALUE" : DEFAULT_VALUES["output_folder"], + "DEFAULT_VALUE" : DEFAULT_VALUES["output_folder"], + "REQUIRED" : False, + "OPTIONS" : [] + } + CONFIG["EXTENSION"] = { + "DESCRIPTION" : "The default extension of the files to be written.", + "CURRENT_VALUE" : DEFAULT_VALUES["extension"], + "DEFAULT_VALUE" : DEFAULT_VALUES["extension"], + "REQUIRED" : False, + "OPTIONS" : ['csv', 'xls', 'xlsx', 'json', 'gml'] + } + + def _getParams(self): + """ Function that creates the array with the params that will work with this function""" + # Creating the parameters as if they were created using the command line + params = [ + "-n" ] + self.CONFIG["NICK"]["CURRENT_VALUE"].split() + [ + "-p" ] + self.CONFIG["PLATFORMS"]["CURRENT_VALUE"].split() + [ + "-o", self.CONFIG["OUTPUT"]["CURRENT_VALUE"], + "-e" ] + self.CONFIG["EXTENSION"]["CURRENT_VALUE"].split() + + return params + + def do_run(self, line): + """ +Running the current application. This method should be redefined for each util. + """ + print + # Checking if all the required parameters have been set + if self._checkIfRequiredAreSet(): + print(general.info("Collecting the options set by the user...")) + # Getting the parser... + parser = phonefy.getParser() + + # Generating the parameters + params = self._getParams() + + args = parser.parse_args(params) + + print(general.info("Launching " + self.UNAME + " with the following parameters: ") + general.emphashis(str(params))) + + try: + usufy.main(args) + except Exception as e: + print(gemeral.error("[!] ERROR. Something happenned when launching the utility. Type 'show options' to check the parameters. ")) + print(general.error("Traceback: " + str(e))) + else: + print(general.error("[!] ERROR. There are required parameters which have not been set.")) + self.do_show("options") + print(general.success("Execution ended successfully.")) + +""" +================================================================================ + _ __ + ___ ___ __ _ _ __ ___| |__ / _|_ _ +/ __|/ _ \/ _` | '__/ __| '_ \| |_| | | | +\__ \ __/ (_| | | | (__| | | | _| |_| | +|___/\___|\__,_|_| \___|_| |_|_| \__, | + |___/ +================================================================================ +""" + +################################################################################ +# Defining the class that will create the calls to the searchfy util. # +################################################################################ + +class OSRFConsoleSearchfy(OSRFConsoleUtil): + """Class that controls an interactive searchfy program""" + # Setting up the name of the module + UNAME = "searchfy.py" + + intro = "" + # Defining the prompt + prompt = 'osrf (' + UNAME.split('.')[0] + ') > ' + # Defining the character to create hyphens + ruler = '-' + + DEFAULT_VALUES = configuration.returnListOfConfigurationValues("searchfy") + + # Defining the configuration for this module + CONFIG = {} + CONFIG["QUERY"] = { + "DESCRIPTION" : "Query to be verified. Escape \" and \'.", + "CURRENT_VALUE" : None, + "DEFAULT_VALUE" : None, + "REQUIRED" : True, + "OPTIONS" : [] + } + CONFIG["PLATFORMS"] = { + "DESCRIPTION" : "Platforms to be checked.", + "CURRENT_VALUE" : DEFAULT_VALUES["platforms"], + "DEFAULT_VALUE" : DEFAULT_VALUES["platforms"], + "REQUIRED" : False, + "OPTIONS" : platform_selection.getAllPlatformNames("searchfy"), + } + CONFIG["OUTPUT"] = { + "DESCRIPTION" : "The path to the output folder where the files will be created.", + "CURRENT_VALUE" : DEFAULT_VALUES["output_folder"], + "DEFAULT_VALUE" : DEFAULT_VALUES["output_folder"], + "REQUIRED" : False, + "OPTIONS" : [] + } + CONFIG["EXTENSION"] = { + "DESCRIPTION" : "The default extension of the files to be written.", + "CURRENT_VALUE" : DEFAULT_VALUES["extension"], + "DEFAULT_VALUE" : DEFAULT_VALUES["extension"], + "REQUIRED" : False, + "OPTIONS" : ['csv', 'xls', 'xlsx', 'json', 'gml'] + } + + def _getParams(self): + """ Function that creates the array with the params that will work with this function""" + # Creating the parameters as if they were created using the command line + params = [ + "-q" ] + self.CONFIG["QUERY"]["CURRENT_VALUE"].split() + [ + "-p" ] + self.CONFIG["PLATFORMS"]["CURRENT_VALUE"].split() + [ + "-o", self.CONFIG["OUTPUT"]["CURRENT_VALUE"], + "-e" ] + self.CONFIG["EXTENSION"]["CURRENT_VALUE"].split() + + return params + + def do_run(self, line): + """Running the current application. This method should be redefined for each util. + """ + print + # Checking if all the required parameters have been set + if self._checkIfRequiredAreSet(): + print(general.info("Collecting the options set by the user...")) + # Getting the parser... + parser = searchfy.getParser() + + # Generating the parameters + params = self._getParams() + + args = parser.parse_args(params) + + print(general.info("Launching " + self.UNAME + " with the following parameters: ") + general.emphashis(str(params))) + + try: + usufy.main(args) + except Exception as e: + print(gemeral.error("[!] ERROR. Something happenned when launching the utility. Type 'show options' to check the parameters. ")) + print(general.error("Traceback: " + str(e))) + else: + print(general.error("[!] ERROR. There are required parameters which have not been set.")) + self.do_show("options") + print(general.success("Execution ended successfully.")) + +""" +================================================================================ + __ + _ _ ___ _ _ / _|_ _ + | | | / __| | | | |_| | | | + | |_| \__ \ |_| | _| |_| | + \__,_|___/\__,_|_| \__, | + |___/ +================================================================================ +""" + +################################################################################ +# Defining the class that will create the calls to the usufy util. # +################################################################################ + +class OSRFConsoleUsufy(OSRFConsoleUtil): + """Class that controls an interactive usufy program""" + # Setting up the name of the module + UNAME = "usufy.py" + + intro = "" + # Defining the prompt + prompt = general.emphasis('osrf (' + UNAME.split('.')[0] + ') > ') + # Defining the character to create hyphens + ruler = '-' + + DEFAULT_VALUES = configuration.returnListOfConfigurationValues("usufy") + + # Defining the configuration for this module + CONFIG = {} + CONFIG["NICK"] = { + "DESCRIPTION" : "Alias to be verified.", + "CURRENT_VALUE" : None, + "DEFAULT_VALUE" : None, + "REQUIRED" : True, + "OPTIONS" : [] + } + CONFIG["PLATFORMS"] = { + "DESCRIPTION" : "Platforms to be checked.", + "CURRENT_VALUE" : DEFAULT_VALUES["platforms"], + "DEFAULT_VALUE" : DEFAULT_VALUES["platforms"], + "REQUIRED" : False, + "OPTIONS" : platform_selection.getAllPlatformNames("usufy"), + } + CONFIG["THREADS"] = { + "DESCRIPTION" : "Number of threads to use.", + "CURRENT_VALUE" : DEFAULT_VALUES["threads"], + "DEFAULT_VALUE" : DEFAULT_VALUES["threads"], + "REQUIRED" : False, + "OPTIONS" : [] + } + CONFIG["OUTPUT"] = { + "DESCRIPTION" : "The path to the output folder where the files will be created.", + "CURRENT_VALUE" : DEFAULT_VALUES["output_folder"], + "DEFAULT_VALUE" : DEFAULT_VALUES["output_folder"], + "REQUIRED" : False, + "OPTIONS" : [] + } + CONFIG["EXTENSION"] = { + "DESCRIPTION" : "The default extension of the files to be written.", + "CURRENT_VALUE" : DEFAULT_VALUES["extension"], + "DEFAULT_VALUE" : DEFAULT_VALUES["extension"], + "REQUIRED" : False, + "OPTIONS" : ['csv', 'xls', 'xlsx', 'json', 'gml'] + } + + def _getParams(self): + """Function that creates the array with the params that will work with this function.""" + # Creating the parameters as if they were created using the command line + params = [ + "-n" ] + self.CONFIG["NICK"]["CURRENT_VALUE"].split() + [ + "-p" ] + self.CONFIG["PLATFORMS"]["CURRENT_VALUE"].split() + [ + "-T", str(self.CONFIG["THREADS"]["CURRENT_VALUE"]), + "-o", self.CONFIG["OUTPUT"]["CURRENT_VALUE"], + "-e" ] + self.CONFIG["EXTENSION"]["CURRENT_VALUE"].split() + + return params + + def do_run(self, line): + """Running the current application. This method should be redefined for each util.""" + print + # Checking if all the required parameters have been set + if self._checkIfRequiredAreSet(): + print(general.info("Collecting the options set by the user...")) + # Getting the parser... + parser = usufy.getParser() + + # Generating the parameters + params = self._getParams() + + args = parser.parse_args(params) + + print(general.info("Launching " + self.UNAME + " with the following parameters: ") + general.emphashis(str(params))) + + try: + usufy.main(args) + except Exception as e: + print(gemeral.error("[!] ERROR. Something happenned when launching the utility. Type 'show options' to check the parameters. ")) + print(general.error("Traceback: " + str(e))) + else: + print(general.error("[!] ERROR. There are required parameters which have not been set.")) + self.do_show("options") + print(general.success("Execution ended successfully.")) + + +""" +================================================================================ + __ _ + ___ ___ _ __ / _| ___ ___ _ __ ___ ___ | | ___ + / _ \/ __| '__| |_ / __/ _ \| '_ \/ __|/ _ \| |/ _ \ + | (_) \__ \ | | _| (_| (_) | | | \__ \ (_) | | __/ + \___/|___/_| |_| \___\___/|_| |_|___/\___/|_|\___| + +================================================================================ +""" +################################################################################ +# Main osrfconsole wrapper. It will control the rest of the utils. # +################################################################################ + +class OSRFConsoleMain(cmd.Cmd): + """ + OSRFramework console application to control the different framework utils. + + Type 'help' to find the commands. + """ + + DISCLAIMER = '''\tOSRFConsole ''' + __version__ + ''' - Copyright (C) F. Brezo and Y. Rubio (i3visio) 2016-2017 + +This program comes with ABSOLUTELY NO WARRANTY. +This is free software, and you are welcome to redistribute it under certain conditions. For additional info, visit to .''' + + intro = banner.text + "\n" + DISCLAIMER + + info = "\n General information" + info += "\n ===================" + info += "\n OSRFramework stands for Open Sources Research Framework. It includes a set of tools that help the analyst in the task of user profiling making use of different OSINT tools. To get additional information about the available commands type 'help'." + info += "\n" + info += "\n Modules available:" + info += "\n ------------------" + info += "\n\t- usufy --> the Jewel of the Chrown. A tool that verifies if a username exists in " + str(len(platform_selection.getAllPlatformNames("usufy"))) + " platforms." + info += "\n\t- mailfy --> a tool to check if a username has been registered in up to " + str(len(mailfy.EMAIL_DOMAINS )) + " email providers." + info += "\n\t- searchfy --> a tool to look for profiles using full names and other info in " + str(len(platform_selection.getAllPlatformNames("searchfy"))) + " platforms." + info += "\n\t- domainfy --> a tool to check the existence of a given domain in up to " + str(domainfy.getNumberTLD()) + " different TLD." + info += "\n\t- phonefy --> a tool that checks if a phone number has been linked to spam practices in " + str(len(platform_selection.getAllPlatformNames("phonefy"))) + " platforms." + info += "\n\t- entify --> a util to look for regular expressions using " + str(len(regexp_selection.getAllRegexpNames())) + " patterns." + info += "\n" + + # Appending the self.info data to the headers... + intro += info + + # Defining the prompt + prompt = general.emphasis('osrf > ') + + ruler = '=' + + def do_info(self, line): + """ + Command that shows again the general information about the application. + """ + configInfo = "\n Additional configuration files:" + configInfo += "\n -------------------------------" + configInfo += "\n You will be able to find more configuration options in the following files in your system. The relevant paths are the ones that follows:" + + # Get the configuration folders in each system + paths = configuration.getConfigPath() + + configInfo += "\n\t- '" + os.path.join(paths["appPath"], "accounts.cfg") + "' -> Configuration details about the login credentials already configured in the framework." + configInfo += "\n\t- '" + os.path.join(paths["appPath"], "api_keys.cfg") + "' -> Configuration details about the API credentials already configured." + configInfo += "\n\t- '" + os.path.join(paths["appPath"], "browser.cfg") + "' -> Connection configuration about how the browsers will be connected." + configInfo += "\n\t- '" + os.path.join(paths["appPath"], "general.cfg") + "' -> General configuration of the different utils containing the default options." + configInfo += "\n\t- '" + paths["appPathDefaults"] + "/' -> Directory containing default files as a backup." + configInfo += "\n\t- '" + paths["appPathPlugins"] + "/' -> Directory containing the details of the user defined plugins." + configInfo += "\n\t- '" + paths["appPathPatterns"] + "/' -> Directory containing the user-defined patterns for entify.py." + configInfo += "\n\t- '" + paths["appPathWrappers"] + "/' -> Directory containing the user-defined wrappers for usufy, searchfy and phonefy platforms." + configInfo += "\n" + print(general.title(self.info) + general.info(configInfo)) + + def do_use(self, line): + """ + This command will define which of the framework's utilities will be loaded. + + The available options are the following: + - domainfy + - entify + - mailfy + - phonefy + - searchfy + - usufy + For example, type 'use usufy' to load the usufy util. You can always use + the to be helped using the autocomplete options. + """ + if line not in UTILS: + print(general.warning("[!] Util is not correct. Try 'help use' to check the available options.")) + return False + elif line == "domainfy": + OSRFConsoleDomainfy().cmdloop() + elif line == "entify": + OSRFConsoleEntify().cmdloop() + elif line == "mailfy": + OSRFConsoleMailfy().cmdloop() + elif line == "phonefy": + OSRFConsolePhonefy().cmdloop() + elif line == "searchfy": + OSRFConsoleSearchfy().cmdloop() + elif line == "usufy": + OSRFConsoleUsufy().cmdloop() + else: + print(general.warning("[!] Not implemented yet. Try 'help use' to check the available options.")) + + def complete_use(self, text, line, begidx, endidx): + if not text: + completions = UTILS + else: + completions = [ f + for f in UTILS + if f.startswith(text.lower()) + ] + return completions + + def do_exit(self, line): + """ + This command will exit osrfconsole normally. + """ + print(info("Exiting...")) + sys.exit() + + +if __name__ == '__main__': + OSRFConsoleMain().cmdloop() diff --git a/osrframework/osrframework_server.py b/osrframework/osrframework_server.py new file mode 100644 index 0000000..508e0f9 --- /dev/null +++ b/osrframework/osrframework_server.py @@ -0,0 +1,534 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +################################################################################ +# +# Copyright 2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ + +__author__ = "Felix Brezo y Yaiza Rubio " +__copyright__ = "Copyright 2015-2017, i3visio" +__credits__ = ["Felix Brezo", "Yaiza Rubio"] +__license__ = "AGPLv3+" +__version__ = "v6.0" +__maintainer__ = "Felix Brezo, Yaiza Rubio" +__email__ = "contacto@i3visio.com" + + +import argparse +import json +import os +import shlex +import sys +import time + +# Server code +import flask +from flask import Flask +from flask import abort, redirect, url_for +from flask import request +from flask import render_template +from flask import send_file + +from werkzeug.utils import secure_filename + +# OSRFramework libraries +import osrframework +import osrframework.domainfy as domainfy +import osrframework.entify as entify +import osrframework.mailfy as mailfy +import osrframework.phonefy as phonefy +import osrframework.searchfy as searchfy +import osrframework.usufy as usufy + +import osrframework.utils.configuration as configuration +import osrframework.utils.platform_selection as platform_selection +import osrframework.utils.updates as updates +import osrframework.utils.general as general +from osrframework.utils.general import error, warning, success, info, title, emphasis + + +# GLOBAL VARIABLES +# ----------------- +# Important notice: this configuration makes STRONGLY UNADVISABLE to deploy this +# server in a different place to localhost for security reasons. +# Creating the SECRET TOKEN +SECRET_TOKEN = "" +# Temporal data. A dictionary of extensions. +loaded_data = {} +# Data folder +configurationPaths = configuration.getConfigPath() +DATA_FOLDER = configurationPaths["appPathData"] +STATIC_FOLDER = os.path.join(configurationPaths["appPathServer"], "static") +TEMPLATES_FOLDER = os.path.join(configurationPaths["appPathServer"], "templates") +# Header filename +HEADER = "profiles" + +# Starting the app +app = Flask( + __name__, + static_url_path='', + static_folder=STATIC_FOLDER, + template_folder=TEMPLATES_FOLDER + ) + +@app.route("/") +def index(): + # Getting the status of the current OSRFramework installation + try: + hasUpdates, version = updates.hasUpdatesOnPypi("osrframework") + if hasUpdates: + notice = { + "icon": "warning", + "message": "OSRFramework's version is " + version + ", but there is a new release on Pypi (" + version + "). We encourage you to upgrade soon!" , + "type": "warning" + } + else: + notice = { + "icon": "thumbs-up", + "message": "OSRFramework is updated to the latest version (" + version + ").", + "type": "success" + } + except: + notice = { + "icon": "close", + "message": "OSRFramework Server could not get connected to Pypi to find new versions. Current version is: " + str(osrframework.__version__) + ".", + "type": "error" + } + return render_template('home.html', mt_home='class=current', notice=notice) + + +@app.route("/info") +def getInfo(): + info = { + "__version__": "OSRFramework " + osrframework.__version__, + "license": "AGPLv3", + "server_time": _getServerTime()[1], + "source_code": "https://github.com/i3visio/osrframework", + } + return flask.Response( + json.dumps( + info, + indent=2, + sort_keys=True + ), + status=200, + mimetype="application/json" + ) + + +@app.route("/research") +@app.route("/research/") +def research(program=None): + """Prepare research UI for the main tools in the framework. + """ + platOptions = platform_selection.getAllPlatformNames(program) + + if not program: + return render_template('research.html', mt_research='class=current', mr_main='class=current') + else: + params = request.args.get('query_text') + + if params != None: + # We perform an additional check to see if we are receiving an array + if params[0] == "[": + # TODO: make it more flexible. This is a workaround to process whois results + params = params.replace("u'", "") + params = params.replace("'", "") + params = params.replace(",", "") + params = params.replace("[", "") + params = params.replace("]", "") + return render_template('research-' + program + '.html', mt_research='class=current', query_text=params, plat_options=platOptions) + else: + return render_template('research-' + program + '.html', mt_research='class=current', plat_options=platOptions) + + +def buildCommandFromParams(program, params): + strCommand = program + ".py " + + for p in params: + strCommand += p + " " + + return strCommand + +@app.route('/research/', methods=['POST']) +def run(program): + """Loading OSRFramework output... + """ + platOptions = platform_selection.getAllPlatformNames(program) + + # Loading the stored global data + global loaded_data + global DATA_FOLDER + output_folder = DATA_FOLDER + + answer = [] + + form = request.form + + if "terminal-form" in form.keys(): + strParams = request.form['tex_command'] + + # Splitting the query + params = shlex.split(strParams) + + # Manually adding the data folder if NOT provided + if "-o " not in strParams: + params += ["-o", output_folder] + + elif "windowed-form" in form.keys(): + # Manually building params + params = [] + + # Iterating through all the attributes. We will use its name to identify them + for key in form.keys(): + if key == "tex_query": + # Adding the queries from the first text file + if program != "searchfy": + params += ["-n"] + else: + params += ["-q"] + + # Splitting the query + splittedQuery = shlex.split(request.form[key]) + + # Adding the parameters + params += splittedQuery + + elif key == "select_platforms": + # Adding the parameter depending on the platform + if program == "domainfy": + params += ["-t"] + elif program == "mailfy": + params += ["-d"] + else: + params += ["-p"] + + # This is a MultiDict. We have to ad an iteration + for pName in form.getlist(key): + params += [pName] + + elif "export_" in key: + params += ["-e"] + params += [key.split("_")[1]] + + elif key == "open_url": + params += ["-w"] + + elif key == "tex_filename": + params += ["-F"] + params += [request.form[key]] + + params += ["-o", DATA_FOLDER] + + # Selecting the appropriate program + if program == "domainfy": + args = domainfy.getParser().parse_args(params) + elif program == "entify": + args = entify.getParser().parse_args(params) + elif program == "mailfy": + args = mailfy.getParser().parse_args(params) + elif program == "phonefy": + args = phonefy.getParser().parse_args(params) + elif program == "searchfy": + args = searchfy.getParser().parse_args(params) + elif program == "usufy": + args = usufy.getParser().parse_args(params) + + # Return output. text/html is required for most browsers to show the text + try: + answer = runQuery(program=program, args=args) + except: + abort(400) + + # Reading CSV + try: + with open(os.path.join(args.output_folder, args.file_header + ".csv")) as iF: + everything = iF.read().splitlines() + loaded_data["csv"] = "" + for i, line in enumerate(everything): + loaded_data["csv"] += line + # Checking if it is the last line. This is done to avoid extra lines. + if i+1 != len (everything): + loaded_data["csv"] += "\n" + except: + pass + + return render_template( + 'research-' + program + '.html', + mt_research='class=current', + plat_options=platOptions, + text_results=general.usufyToTextExport(answer), + command=buildCommandFromParams(program, params) + ) + + +def allowed_file(filename): + ALLOWED_EXTENSIONS = set(['csv']) + return '.' in filename and \ + filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS + + +@app.route("/explore", methods=['GET', 'POST']) +def explore(): + # Based on http://flask.pocoo.org/docs/0.12/patterns/fileuploads/ + global loaded_data + + if request.method == 'POST': + # check if the post request has the file part + if 'file' not in request.files: + flash('No file part') + return redirect(request.url) + file = request.files['file'] + + # if user does not select file, browser also + # submit a empty part without filename + if file.filename == '': + notice = { + "icon": "warning", + "message": "No file was selected." , + "type": "warning" + } + return render_template('explore.html', mt_explore='class=current', alert=notice) + + # Checking if the file name is permitted + if file and allowed_file(file.filename): + filename = secure_filename(file.filename) + + # TODO: pretty unsafe as it is now + # Recovering the loaded_data: ! + loaded_data["csv"] = "" + everything = file.stream.read().splitlines() + for i, line in enumerate(everything): + loaded_data["csv"] += line + # Checking if it is the last line. This is done to avoid extra lines. + if i+1 != len (everything): + loaded_data["csv"] += "\n" + return render_template('explore.html', mt_explore='class=current', csvData=loaded_data["csv"].decode('utf-8')) + else: + notice = { + "icon": "close", + "message": "This is not a valid extension. We only support CSV files.", + "type": "error" + } + return render_template('explore.html', mt_explore='class=current', alert=notice) + else: + try: + csvData=loaded_data["csv"].decode('utf-8') + return render_template( + 'explore.html', + mt_explore='class=current', + csvData=csvData + ) + except: + return render_template( + 'explore.html', + mt_explore='class=current' + ) + + +@app.route("/get_temporal_data/") +def get_temporal_data(fileName): + global loaded_data + extension = fileName.split('.')[-1] + if extension in loaded_data.keys(): + return loaded_data[extension] + else: + return "No data found." + + +def runQuery(program, args=[]): + """Function that wraps the queries. + """ + # Selecting the appropriate program + if program == "domainfy": + answer = domainfy.main(args) + elif program == "entify": + answer = entify.main(args) + elif program == "mailfy": + answer = mailfy.main(args) + elif program == "phonefy": + answer = phonefy.main(args) + elif program == "searchfy": + answer = searchfy.main(args) + elif program == "usufy": + answer = usufy.main(args) + + # Returning the output + return answer + + +# -------------- +# API Management +# -------------- + + +@app.route('/api/v1//') +def api_v1(command, query): + """Loading API v1.0 executions... + :param command: the command to be launched. + :param query: the user name to be searched. + + This application can received a random number set by the administrator + that may allow the one who performs the query to run code. Use it with + caution. + """ + # Splitting the query + splittedQuery = shlex.split(query) + + # Get info froo OSRFramework configuration files + if SECRET_TOKEN and SECRET_TOKEN == request.args.get('secret_token'): + params = splittedQuery + else: + params = [splittedQuery[0]] + + # Selecting the appropriate program + if command == "domainfy": + args = domainfy.getParser().parse_args(['-n'] + params) + elif command == "entify": + args = entify.getParser().parse_args(['-w'] + params) + elif command == "mailfy": + args = mailfy.getParser().parse_args(['-n'] + params) + elif command == "phonefy": + args = phonefy.getParser().parse_args(['-n'] + params) + elif command == "searchfy": + args = searchfy.getParser().parse_args(['-q'] + params) + elif command == "usufy": + args = usufy.getParser().parse_args(['-n'] + params) + + answer = runQuery(command, args) + # Grabbing current Time + osrfTimestamp, osrfDate = _getServerTime() + + if answer != None: + return flask.Response( + json.dumps({ + "code": 200, + "content": answer, + 'date': osrfDate, + "description": "200 OK. The response contains an entity corresponding to the requested resource.", + 'timestamp': osrfTimestamp + }, + indent=2, + sort_keys=True + ), + status=200, + mimetype="application/json" + ) + else: + abort(400) + + +def _getServerTime(): + """Get current time and date. + """ + t = time.time() + d = time.ctime(int(time.time())) + return t, d + + +# ---------------- +# Error Management +# ---------------- + + +@app.errorhandler(400) +def general_error(error): + """400 Bad Request. The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing). + """ + return render_template( + 'error.html', + errorCode='400', + errorDescription="Client Error: 400 Bad Request. The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)." + ), 400 + + +@app.errorhandler(403) +def not_found_error(error): + """403 Forbidden. The request was a valid request, but the server is refusing to respond to it. The user might be logged in but does not have the necessary permissions for the resource. + """ + return render_template( + 'error.html', + errorCode='403', + errorDescription='Client Error: 403 Forbidden. The request was a valid request, but the server is refusing to respond to it.' + ), 403 + + +@app.errorhandler(404) +def not_found_error(error): + """404 Not Found. Thee requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible. + """ + return render_template( + 'error.html', + errorCode='404', + errorDescription='Client Error: 404 Not Found. The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible.', + ), 404 + + +# -------------- +# Launching code +# -------------- + + +if __name__ == "__main__": + DEFAULT_VALUES = configuration.returnListOfConfigurationValues("osrframework-server") + + try: + SECRET_TOKEN = DEFAULT_VALUES["secret_token"] + except: + SECRET_TOKEN = None + + try: + # Get file path from + app.config['UPLOAD_FOLDER'] = DEFAULT_VALUES["upload_folder"] + except: + app.config['UPLOAD_FOLDER'] = "/tmp/" + + # Loading the server parser + parser = argparse.ArgumentParser( + description='OSRFramework Server - The tool that will start a local server.', + prog='./osrframework-server.py', + epilog="Check the README.md file for further details on the usage of this program or follow us on Twitter in .", + add_help=False + ) + + # adding the option + groupServerConfiguration = parser.add_argument_group('Configuration arguments', 'Configuring the processing parameters.') + groupServerConfiguration.add_argument('--host', metavar='', required=False, default=DEFAULT_VALUES["host"], action='store', help='choose the host in which the server will be accesible. If "0.0.0.0" is choosen, the server will be accesible by any remote machine. Use this carefully. Default: localhost.') + groupServerConfiguration.add_argument('--port', metavar='', required=False, default=DEFAULT_VALUES["port"], type=int, action='store', help='choose the port in which the server will be accesible. Use this carefully.') + groupServerConfiguration.add_argument('--debug', required=False, default=DEFAULT_VALUES["debug"], action='store_true', help='choose whether error messages will be deployed. Do NOT use this for production.') + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s ' + " " + osrframework.__version__, help='shows the version of the program and exists.') + + # Parse args + args = parser.parse_args() + + print(general.title(osrframework.utils.banner.text)) + # Starting the server + print(general.info("[*] Server started at " + "http://" + args.host + ":" + str(args.port) + "... You can access it in your browser.")) + print(general.info("[*] Press at any time to stop the server.")) + + app.run( + debug=args.debug, + host=args.host, + port=args.port + ) + + print(general.info("\n[*] OSRFramework server exited normally.")) diff --git a/osrframework/patterns/__init__.py b/osrframework/patterns/__init__.py new file mode 100644 index 0000000..fe13e7d --- /dev/null +++ b/osrframework/patterns/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import osrframework.utils.logger + +# Calling the logger when being imported +osrframework.utils.logger.setupLogger(loggerName="osrframework.patterns") diff --git a/osrframework/patterns/bitcoinaddress.py b/osrframework/patterns/bitcoinaddress.py new file mode 100644 index 0000000..fd0e49e --- /dev/null +++ b/osrframework/patterns/bitcoinaddress.py @@ -0,0 +1,41 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +from osrframework.utils.regexp import RegexpObject + +class BitcoinAddress(RegexpObject): + ''' + class. + ''' + def __init__(self): + ''' + Constructor without parameters. + Most of the times, this will be the ONLY method needed to be overwritten. + + :param name: string containing the name of the regular expression. + :param reg_exp: string containing the regular expresion. + ''' + # This is the tag of the regexp + self.name = "i3visio.bitcoin.address" + # This is the string containing the reg_exp to be seeked + self.reg_exp = ["[^a-zA-Z0-9]" + "([13][a-km-zA-HJ-NP-Z1-9]{26,33})" + "[^a-zA-Z0-9]"] + diff --git a/osrframework/patterns/dni.py b/osrframework/patterns/dni.py new file mode 100644 index 0000000..6ecf0fb --- /dev/null +++ b/osrframework/patterns/dni.py @@ -0,0 +1,74 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +from osrframework.utils.regexp import RegexpObject + +class DNI(RegexpObject): + ''' + class. + ''' + def __init__(self): + ''' + Constructor without parameters. + Most of the times, this will be the ONLY method needed to be overwritten. + + :param name: string containing the name of the regular expression. + :param reg_exp: string containing the regular expresion. + ''' + # This is the tag of the regexp + self.name = "i3visio.dni" + # This is the string containing the reg_exp to be seeked + self.reg_exp = ["[^a-zA-Z1-9]" + "[0-9]{7,8}[\-\ ]?[a-zA-Z]" +"[^a-zA-Z1-9]"] + + def isValidExp(self, exp): + ''' + Method to verify if a given expression is correct just in case the used regular expression needs additional processing to verify this fact.$ + This method will be overwritten when necessary. + + :param exp: Expression to verify. + + :return: True | False + ''' + # order of the letters depending on which is the mod of the number + # 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 + order = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E', 'T'] + + #print exp + l = exp[len(exp)-1] + + try: + # verifying if it is an 8-length number + number = int(exp[0:7]) + if l == order[number%23]: + return True + except: + try: + # verifying if it is a 7-length number + number = int(exp[0:6]) + if l == order[number%23]: + return True + except: + # not a valid number + return False + return False + + diff --git a/osrframework/patterns/dogecoinaddress.py b/osrframework/patterns/dogecoinaddress.py new file mode 100644 index 0000000..62f7bc7 --- /dev/null +++ b/osrframework/patterns/dogecoinaddress.py @@ -0,0 +1,41 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +from osrframework.utils.regexp import RegexpObject + +class DogecoinAddress(RegexpObject): + ''' + class. + ''' + def __init__(self): + ''' + Constructor without parameters. + Most of the times, this will be the ONLY method needed to be overwritten. + + :param name: string containing the name of the regular expression. + :param reg_exp: string containing the regular expresion. + ''' + # This is the tag of the regexp + self.name = "i3visio.dogecoin.address" + # This is the string containing the reg_exp to be seeked + self.reg_exp = ["[^a-zA-Z0-9]" + "(D[a-km-zA-HJ-NP-Z1-9]{33})" + "[^a-zA-Z0-9]"] + diff --git a/osrframework/patterns/email.py b/osrframework/patterns/email.py new file mode 100644 index 0000000..911a330 --- /dev/null +++ b/osrframework/patterns/email.py @@ -0,0 +1,105 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +from osrframework.utils.regexp import RegexpObject + +class Email(RegexpObject): + ''' + class. It identifies emails that include: + foo@bar.com + foo[at]bar[dot]com + foo[arroba]bar[punto]com + foo [at] bar [dot] com + ''' + def __init__(self): + ''' + Constructor without parameters. + Most of the times, this will be the ONLY method needed to be overwritten. + + :param name: string containing the name of the regular expression. + :param reg_exp: string containing the regular expresion. + ''' + # This is the tag of the regexp + self.name = "i3visio.email" + # This is the string containing the reg_exp to be seeked + self.reg_exp = ["([a-zA-Z0-9\.\-_]+(?:@| ?\[(?:arroba|at)\] ?)[a-zA-Z0-9\.\-]+(?:\.| ?\[(?:punto|dot)\] ?)[a-zA-Z]+)"] + + # This will be the expression to be processed. This variable only exists in this class: + self.substitutionValues= {} + self.substitutionValues["@"]= [' at ',' arroba ', '[at]', '[arroba]', ' [at] ', ' [arroba] '] + self.substitutionValues["."]= [' dot ', ' punto ', '[dot]', '[punto]', ' [dot] ', ' [punto] '] + + def getAttributes(self, found = None): + ''' + Method to extract additional attributes from a given expression (i. e.: domains and ports from URL and so on). This method may be overwritten in certain child classes. + :param found: expression to be processed. + :return: The output format will be like: + [{"type" : "i3visio.email", "value": "foo@bar.com", "attributes": [] }, {"type" : "i3visio.domain", "value": "foo.com", "attributes": [] }] + ''' + # List of attributes + results = [] + + if not '@' in found: + # character may be '@' or '.' + for character in self.substitutionValues.keys(): + for value in self.substitutionValues[character]: + # replacing '[at]' for '@'... + found=found.replace(value, character) + + # Building the auxiliar email + aux = {} + aux["type"] = "i3visio.email" + aux["value"] = found + aux["attributes"] = [] + results.append(aux) + else: + # Getting the information of the alias: + aux = {} + aux["type"] = "i3visio.alias" + aux["value"] = found.split('@')[0] + aux["attributes"] = [] + results.append(aux) + + # Getting the information of the domain: + aux = {} + aux["type"] = "i3visio.domain" + aux["value"] = found.split('@')[1] + aux["attributes"] = [] + results.append(aux) + + return results + + def getEntityType(self, found = None): + ''' + Method to recover the value of the entity in case it may vary. + :param found: The expression to be analysed. + :return: The entity type returned will be an s'i3visio.email' for foo@bar.com and an 'i3visio.text' for foo[at]bar[dot]com. + ''' + # character may be '@' or '.' + for character in self.substitutionValues.keys(): + for value in self.substitutionValues[character]: + if value in found: + return "i3visio.text" + # If none of the values were found... Returning as usual the 'i3visio.email' string. + return self.name + + diff --git a/osrframework/patterns/ipv4.py b/osrframework/patterns/ipv4.py new file mode 100644 index 0000000..81fa7ae --- /dev/null +++ b/osrframework/patterns/ipv4.py @@ -0,0 +1,42 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +from osrframework.utils.regexp import RegexpObject + +class IPv4(RegexpObject): + ''' + class. + ''' + def __init__(self): + ''' + Constructor without parameters. + Most of the times, this will be the ONLY method needed to be overwritten. + + :param name: string containing the name of the regular expression. + :param reg_exp: string containing the regular expresion. + ''' + # This is the tag of the regexp + self.name = "i3visio.ipv4" + # This is the string containing the reg_exp to be seeked + #self.reg_exp = ["[^a-zA-Z0-9](25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d){3})[^a-zA-Z0-9]"] + self.reg_exp = ["[^a-zA-Z0-9]" + "([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})" + "[^a-zA-Z0-9]"] + diff --git a/osrframework/patterns/litecoinaddress.py b/osrframework/patterns/litecoinaddress.py new file mode 100644 index 0000000..382d3ad --- /dev/null +++ b/osrframework/patterns/litecoinaddress.py @@ -0,0 +1,41 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +from osrframework.utils.regexp import RegexpObject + +class LitecoinAddress(RegexpObject): + ''' + class. + ''' + def __init__(self): + ''' + Constructor without parameters. + Most of the times, this will be the ONLY method needed to be overwritten. + + :param name: string containing the name of the regular expression. + :param reg_exp: string containing the regular expresion. + ''' + # This is the tag of the regexp + self.name = "i3visio.litecoin.address" + # This is the string containing the reg_exp to be seeked + self.reg_exp = ["[^a-zA-Z0-9]" + "(L[a-km-zA-HJ-NP-Z1-9]{32})" + "[^a-zA-Z0-9]"] + diff --git a/osrframework/patterns/md5.py b/osrframework/patterns/md5.py new file mode 100644 index 0000000..337a01f --- /dev/null +++ b/osrframework/patterns/md5.py @@ -0,0 +1,41 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +from osrframework.utils.regexp import RegexpObject + +class MD5(RegexpObject): + ''' + class. + ''' + def __init__(self): + ''' + Constructor without parameters. + Most of the times, this will be the ONLY method needed to be overwritten. + + :param name: string containing the name of the regular expression. + :param reg_exp: string containing the regular expresion. + ''' + # This is the tag of the regexp + self.name = "i3visio.md5" + # This is the string containing the reg_exp to be seeked + self.reg_exp = ["[^a-zA-Z0-9]" + "([a-z0-9]{32}|[A-Z0-9]{32})" + "[^a-zA-Z0-9]"] + diff --git a/osrframework/patterns/namecoinaddress.py b/osrframework/patterns/namecoinaddress.py new file mode 100644 index 0000000..c76e762 --- /dev/null +++ b/osrframework/patterns/namecoinaddress.py @@ -0,0 +1,41 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +from osrframework.utils.regexp import RegexpObject + +class NamecoinAddress(RegexpObject): + ''' + class. + ''' + def __init__(self): + ''' + Constructor without parameters. + Most of the times, this will be the ONLY method needed to be overwritten. + + :param name: string containing the name of the regular expression. + :param reg_exp: string containing the regular expresion. + ''' + # This is the tag of the regexp + self.name = "i3visio.namecoin.address" + # This is the string containing the reg_exp to be seeked + self.reg_exp = ["[^a-zA-Z0-9]" + "([N][a-km-zA-HJ-NP-Z1-9]{26,33})" + "[^a-zA-Z0-9]"] + diff --git a/osrframework/patterns/peercoinaddress.py b/osrframework/patterns/peercoinaddress.py new file mode 100644 index 0000000..1cf7dcf --- /dev/null +++ b/osrframework/patterns/peercoinaddress.py @@ -0,0 +1,41 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +from osrframework.utils.regexp import RegexpObject + +class PeercoinAddress(RegexpObject): + ''' + class. + ''' + def __init__(self): + ''' + Constructor without parameters. + Most of the times, this will be the ONLY method needed to be overwritten. + + :param name: string containing the name of the regular expression. + :param reg_exp: string containing the regular expresion. + ''' + # This is the tag of the regexp + self.name = "i3visio.peercoin.address" + # This is the string containing the reg_exp to be seeked + self.reg_exp = ["[^a-zA-Z0-9]" + "(P[a-km-zA-HJ-NP-Z1-9]{33})" + "[^a-zA-Z0-9]"] + diff --git a/osrframework/patterns/sha1.py b/osrframework/patterns/sha1.py new file mode 100644 index 0000000..261999e --- /dev/null +++ b/osrframework/patterns/sha1.py @@ -0,0 +1,41 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +from osrframework.utils.regexp import RegexpObject + +class SHA1(RegexpObject): + ''' + class. + ''' + def __init__(self): + ''' + Constructor without parameters. + Most of the times, this will be the ONLY method needed to be overwritten. + + :param name: string containing the name of the regular expression. + :param reg_exp: string containing the regular expresion. + ''' + # This is the tag of the regexp + self.name = "i3visio.sha1" + # This is the string containing the reg_exp to be seeked + self.reg_exp = ["[^a-zA-Z0-9]" + "([a-z0-9]{40}|[A-Z0-9]{40})" + "[^a-zA-Z0-9]"] + diff --git a/osrframework/patterns/sha256.py b/osrframework/patterns/sha256.py new file mode 100644 index 0000000..d82b8f8 --- /dev/null +++ b/osrframework/patterns/sha256.py @@ -0,0 +1,41 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +from osrframework.utils.regexp import RegexpObject + +class SHA256(RegexpObject): + ''' + class. + ''' + def __init__(self): + ''' + Constructor without parameters. + Most of the times, this will be the ONLY method needed to be overwritten. + + :param name: string containing the name of the regular expression. + :param reg_exp: string containing the regular expresion. + ''' + # This is the tag of the regexp + self.name = "i3visio.sha256" + # This is the string containing the reg_exp to be seeked + self.reg_exp = ["[^a-zA-Z0-9]" + "([a-z0-9]{64}|[A-Z0-9]{64})" + "[^a-zA-Z0-9]"] + diff --git a/osrframework/patterns/uri.py b/osrframework/patterns/uri.py new file mode 100644 index 0000000..4b6ef96 --- /dev/null +++ b/osrframework/patterns/uri.py @@ -0,0 +1,92 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import re +from osrframework.utils.regexp import RegexpObject + +class URI(RegexpObject): + ''' + class. + ''' + def __init__(self): + ''' + Constructor without parameters. + Most of the times, this will be the ONLY method needed to be overwritten. + + :param name: string containing the name of the regular expression. + :param reg_exp: string containing the regular expresion. + ''' + # This is the tag of the regexp + self.name = "i3visio.uri" + # This is the string containing the reg_exp to be seeked. The former and latter characters are not needed. + #self.reg_exp = ["((?:https?|s?ftp|file)://[a-zA-Z0-9\_\.\-]+(?:\:[0-9]{1,5})(?:/[a-zA-Z0-9\_\.\-/=\?&]+))"] + self.reg_exp = ["((?:https?|s?ftp|file)://[a-zA-Z0-9\_\.\-]+(?:\:[0-9]{1,5}|)(?:/[a-zA-Z0-9\_\.\-/=\?&]+|))"] + #self.reg_exp = ["((?:https?|s?ftp|file)://[a-zA-Z0-9\_\.\-]+(?:/[a-zA-Z0-9\_\.\-/=\?&%]+))"] + + def getAttributes(self, foundExp): + ''' + Method to extract additional attributes from a given expression (i. e.: domains and ports from URL and so on). This method may be overwritten in certain child classes. + :param found_exp: expression to be processed. + :return: The output format will be like: + [{"type" : "i3visio.domain", "value": "twitter.com", "attributes": [] }, {"type" : "i3visio.protocol", "value": "http", "attributes": [] }] + ''' + # Defining a dictionary + attributes = [] + + protocolRegExp = "((?:https?|s?ftp|file))://" + foundProtocol = re.findall(protocolRegExp, foundExp) + if len(foundProtocol) > 0: + # Defining a protocol element + aux = {} + aux["type"] = "i3visio.protocol" + # Defining the regular expression to extract the protocol from a URL + aux["value"] = foundProtocol[0] + # Each attributes will be swept + aux["attributes"] = [] + attributes.append(aux) + + domainRegExp = "(?:https?|s?ftp)://([a-zA-Z0-9\_\.\-]+)(?:\:|/)" + foundDomain = re.findall(domainRegExp, foundExp) + if len(foundDomain) > 0: + # Defining a domain element + aux = {} + aux["type"] = "i3visio.domain" + # Inserting the found domain + aux["value"] = foundDomain[0] + # Each attributes will be swept + aux["attributes"] = [] + attributes.append(aux) + + portRegExp = "(?:https?|s?ftp)://[a-zA-Z0-9\_\.\-]+:([0-9]{1,5})/" + foundPort = re.findall(portRegExp, foundExp) + if len(foundPort) > 0: + # Defining a domain element + aux = {} + aux["type"] = "i3visio.port" + # Inserting the found domain + aux["value"] = foundPort[0] + # Each attributes will be swept + aux["attributes"] = [] + attributes.append(aux) + + return attributes + + diff --git a/osrframework/phonefy.py b/osrframework/phonefy.py new file mode 100644 index 0000000..92d96b6 --- /dev/null +++ b/osrframework/phonefy.py @@ -0,0 +1,195 @@ +#!/usr/bin/env python2 +# -*- coding: utf-8 -*- +# +################################################################################ +# +# Copyright 2015-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ + + +__author__ = "Felix Brezo, Yaiza Rubio " +__copyright__ = "Copyright 2015-2017, i3visio" +__credits__ = ["Felix Brezo", "Yaiza Rubio"] +__license__ = "AGPLv3+" +__version__ = "v6.0" +__maintainer__ = "Felix Brezo, Yaiza Rubio" +__email__ = "contacto@i3visio.com" + + +import argparse +import datetime as dt +import json +import os + +import osrframework.utils.banner as banner +import osrframework.utils.platform_selection as platform_selection +import osrframework.utils.configuration as configuration +import osrframework.utils.general as general + +from osrframework.utils.general import error, warning, success, info, title, emphasis + + +def processPhoneList(platformNames=[], numbers=[], excludePlatformNames=[]): + """ + Method to perform the phone list. + + :param platformNames: List of names fr the platforms. + :param numbers: List of numbers to be queried. + + :return: + """ + # Grabbing the objects + platforms = platform_selection.getPlatformsByName(platformNames, mode="phonefy", excludePlatformNames=excludePlatformNames) + + results = [] + for num in numbers: + for pla in platforms: + # This returns a json.txt! + entities = pla.getInfo(query=num, process = True, mode="phonefy") + if entities != {}: + results+=json.loads(entities) + return results + +def main(args): + """ + Main function to launch phonefy. + + The function is created in this way so as to let other applications make + use of the full configuration capabilities of the application. The + parameters received are used as parsed by this modules `getParser()`. + + Args: + ----- + args: The parameters as processed by this modules `getParser()`. + + Results: + -------- + Returns a list with i3visio entities. + """ + results = [] + + if not args.quiet: + print(general.title(banner.text)) + + sayingHello = """ +phonefy.py Copyright (C) F. Brezo and Y. Rubio (i3visio) 2014-2017 + +This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you +are welcome to redistribute it under certain conditions. For additional info, +visit """ + general.LICENSE_URL + "\n" + print(general.title(sayingHello)) + + if args.license: + general.showLicense() + else: + # Showing the execution time... + startTime= dt.datetime.now() + #TODO: Get the number searchable platforms in this context + print(str(startTime) + "\tStarting search in different platform(s)... Relax!\n") + print(general.emphasis("\tPress to stop...\n")) + try: + results = processPhoneList(platformNames=args.platforms, numbers=args.numbers, excludePlatformNames=args.exclude) + except KeyboardInterrupt: + print(general.error("\n[!] Process manually stopped by the user. Workers terminated without providing any result.\n")) + + # Trying to store the information recovered + if args.output_folder != None: + # Verifying an output folder was selected + if not os.path.exists(args.output_folder): + os.makedirs(args.output_folder) + # Grabbing the results + fileHeader = os.path.join(args.output_folder, args.file_header) + for ext in args.extension: + # Generating output files + general.exportUsufy(results, ext, fileHeader) + + # Showing the information gathered if requested + if not args.quiet: + now = dt.datetime.now() + print(str(now) + "\tA summary of the results obtained are shown in the following table:\n") + print(general.success(general.usufyToTextExport(results))) + + if args.web_browser: + general.openResultsInBrowser(results) + + now = dt.datetime.now() + print("\n" + str(now) + "\tYou can find all the information collected in the following files:") + for ext in args.extension: + # Showing the output files + print("\t" + general.emphasis(fileHeader + "." + ext)) + + # Showing the execution time... + endTime= dt.datetime.now() + print("\n" + str(endTime) +"\tFinishing execution...\n") + print("Total time consumed:\t" + general.emphasis(str(endTime-startTime)) + "\n") + #TODO: Get the number searchable platforms in this context + #print("Average seconds/query:\t" + general.emphasis(str((endTime-startTime).total_seconds()/len(listPlatforms))) +" seconds\n") + + # Urging users to place an issue on Github... + print(banner.footer) + + return results + + +def getParser(): + DEFAULT_VALUES = configuration.returnListOfConfigurationValues("phonefy") + # Capturing errors just in case the option is not found in the configuration + try: + excludeList = [DEFAULT_VALUES["exclude_platforms"]] + except: + excludeList = [] + + parser = argparse.ArgumentParser(description='phonefy.py - Piece of software that checks the existence of a given series of phones in a bunch of phone number lists associated to malicious activities.', prog='phonefy.py', epilog='Check the README.md file for further details on the usage of this program or follow us on Twitter in .', add_help=False) + parser._optionals.title = "Input options (one required)" + + # Defining the mutually exclusive group for the main options + groupMainOptions = parser.add_mutually_exclusive_group(required=True) + # Adding the main options + groupMainOptions.add_argument('--license', required=False, action='store_true', default=False, help='shows the GPLv3+ license and exists.') + groupMainOptions.add_argument('-n', '--numbers', metavar='', nargs='+', action='store', help = 'the list of phones to process (at least one is required).') + + listAll = platform_selection.getAllPlatformNames("phonefy") + + # Configuring the processing options + groupProcessing = parser.add_argument_group('Processing arguments', 'Configuring the way in which usufy will process the identified profiles.') + #groupProcessing.add_argument('-L', '--logfolder', metavar='. +# +################################################################################## + +import osrframework.utils.logger as logger + +# Calling the logger when being imported +logger.setupLogger(loggerName="osrframework.searchengines") diff --git a/osrframework/searchengines/google.py b/osrframework/searchengines/google.py new file mode 100644 index 0000000..76e1768 --- /dev/null +++ b/osrframework/searchengines/google.py @@ -0,0 +1,281 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__all__ = ['search'] + +import argparse +import json +import os +import sys +import time + +if sys.version_info[0] > 2: + from http.cookiejar import LWPCookieJar + from urllib.request import Request, urlopen + from urllib.parse import quote_plus, urlparse, parse_qs +else: + from cookielib import LWPCookieJar + from urllib import quote_plus + from urllib2 import Request, urlopen + from urlparse import urlparse, parse_qs + +# Lazy import of BeautifulSoup. +BeautifulSoup = None + +# URL templates to make Google searches. +url_home = "http://www.google.%(tld)s/" +url_search = "http://www.google.%(tld)s/search?hl=%(lang)s&q=%(query)s&btnG=Google+Search&inurl=https" +url_next_page = "http://www.google.%(tld)s/search?hl=%(lang)s&q=%(query)s&start=%(start)d&inurl=https" +url_search_num = "http://www.google.%(tld)s/search?hl=%(lang)s&q=%(query)s&num=%(num)d&btnG=Google+Search&inurl=https" +url_next_page_num = "http://www.google.%(tld)s/search?hl=%(lang)s&q=%(query)s&num=%(num)d&start=%(start)d&inurl=https" + +# Cookie jar. Stored at the user's home folder. +home_folder = os.getenv('HOME') +if not home_folder: + home_folder = os.getenv('USERHOME') + if not home_folder: + home_folder = '.' # Use the current folder on error. +cookie_jar = LWPCookieJar(os.path.join(home_folder, '.google-cookie')) +try: + cookie_jar.load() +except Exception: + pass + +# Request the given URL and return the response page, using the cookie jar. +def get_page(url): + """ + Request the given URL and return the response page, using the cookie jar. + + @type url: str + @param url: URL to retrieve. + + @rtype: str + @return: Web page retrieved for the given URL. + + @raise IOError: An exception is raised on error. + @raise urllib2.URLError: An exception is raised on error. + @raise urllib2.HTTPError: An exception is raised on error. + """ + request = Request(url) + request.add_header('User-Agent', + 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)') + cookie_jar.add_cookie_header(request) + response = urlopen(request) + cookie_jar.extract_cookies(response, request) + html = response.read() + response.close() + cookie_jar.save() + return html + +# Filter links found in the Google result pages HTML code. +# Returns None if the link doesn't yield a valid result. +def filter_result(link): + try: + + # Valid results are absolute URLs not pointing to a Google domain + # like images.google.com or googleusercontent.com + o = urlparse(link, 'http') + if o.netloc and 'google' not in o.netloc: + return link + + # Decode hidden URLs. + if link.startswith('/url?'): + link = parse_qs(o.query)['q'][0] + + # Valid results are absolute URLs not pointing to a Google domain + # like images.google.com or googleusercontent.com + o = urlparse(link, 'http') + if o.netloc and 'google' not in o.netloc: + return link + + # Otherwise, or on error, return None. + except Exception: + pass + return None + +# Returns a generator that yields URLs. +def search(query, tld='com', lang='en', num=10, start=0, stop=None, pause=2.0, + only_standard=False): + """ + Search the given query string using Google. + + @type query: str + @param query: Query string. Must NOT be url-encoded. + + @type tld: str + @param tld: Top level domain. + + @type lang: str + @param lang: Languaje. + + @type num: int + @param num: Number of results per page. + + @type start: int + @param start: First result to retrieve. + + @type stop: int + @param stop: Last result to retrieve. + Use C{None} to keep searching forever. + + @type pause: float + @param pause: Lapse to wait between HTTP requests. + A lapse too long will make the search slow, but a lapse too short may + cause Google to block your IP. Your mileage may vary! + + @type only_standard: bool + @param only_standard: If C{True}, only returns the standard results from + each page. If C{False}, it returns every possible link from each page, + except for those that point back to Google itself. Defaults to C{False} + for backwards compatibility with older versions of this module. + + @rtype: generator + @return: Generator (iterator) that yields found URLs. If the C{stop} + parameter is C{None} the iterator will loop forever. + """ + + # Lazy import of BeautifulSoup. + # Try to use BeautifulSoup 4 if available, fall back to 3 otherwise. + global BeautifulSoup + if BeautifulSoup is None: + try: + from bs4 import BeautifulSoup + except ImportError: + from BeautifulSoup import BeautifulSoup + + # Set of hashes for the results found. + # This is used to avoid repeated results. + hashes = set() + + # Prepare the search string. + query = quote_plus(query) + + # Grab the cookie from the home page. + get_page(url_home % vars()) + + # Prepare the URL of the first request. + if start: + if num == 10: + url = url_next_page % vars() + else: + url = url_next_page_num % vars() + else: + if num == 10: + url = url_search % vars() + else: + url = url_search_num % vars() + + # Loop until we reach the maximum result, if any (otherwise, loop forever). + while not stop or start < stop: + + # Sleep between requests. + time.sleep(pause) + + # Request the Google Search results page. + html = get_page(url) + + # Parse the response and process every anchored URL. + soup = BeautifulSoup(html) + anchors = soup.find(id='search').findAll('a') + for a in anchors: + + # Leave only the "standard" results if requested. + # Otherwise grab all possible links. + if only_standard and ( + not a.parent or a.parent.name.lower() != "h3"): + continue + + # Get the URL from the anchor tag. + try: + link = a['href'] + except KeyError: + continue + + # Filter invalid links and links pointing to Google itself. + link = filter_result(link) + if not link: + continue + + # Discard repeated results. + h = hash(link) + if h in hashes: + continue + hashes.add(h) + + # Yield the result. + yield link + + # End if there are no more results. + if not soup.find(id='nav'): + break + + # Prepare the URL for the next request. + start += num + if num == 10: + url = url_next_page % vars() + else: + url = url_next_page_num % vars() + +# Returns a generator that yields URLs. +def processSearch(query, tld='com', lang='en', num=10, start=0, stop=50, pause=2.0, only_standard=False): + ''' + Method that recovers the URI for a search returning an i3visio-compliant json object. + + :return: A json-like object. + + ''' + uriList = search(query, tld=tld, lang=lang, num=int(num), start=int(start), stop=int(stop), pause=float(pause),only_standard=only_standard) + + # Dictionary containing the URI objects + results = [] + + # Building the objects + for uri in uriList: + aux = {} + aux["type"] = "i3visio.uri" + aux["value"] = uri + aux["attributes"] = [] + results.append(aux) + + return results + +# When run as a script... +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='A package that allows the execution of searches in Google.', prog='google.py', add_help=False) + parser.add_argument("-q", "--query", metavar="", required = True, help="Query to be performed.") + parser.add_argument("--tld", metavar="TLD", default="com", help="top level domain to use [default: com]") + parser.add_argument("--lang", metavar="LANGUAGE", default="en",help="produce results in the given language [default: en]") + parser.add_argument("--num", metavar="NUMBER", type=int, default=10,help="number of results per page [default: 10]") + parser.add_argument("--start", metavar="NUMBER", type=int, default=0, help="first result to retrieve [default: 0]") + parser.add_argument("--stop", metavar="NUMBER", type=int, default=50, help="last result to retrieve [default: 100]") + parser.add_argument("--pause", metavar="SECONDS", type=float, default=2.0, help="pause between HTTP requests [default: 2.0]") + parser.add_argument("--all", dest="only_standard", action="store_false", default=True, help="grab all possible links from result pages") + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') + args = parser.parse_args() + + print "Searching..." + + results = processSearch(args.query, tld=args.tld, lang=args.lang, num=int(args.num), start=int(args.start), stop=int(args.stop), pause=float(args.pause),only_standard=args.only_standard) + + print json.dumps(results, indent=2) + diff --git a/osrframework/searchfy.py b/osrframework/searchfy.py new file mode 100644 index 0000000..72b2e5e --- /dev/null +++ b/osrframework/searchfy.py @@ -0,0 +1,211 @@ +#!/usr/bin/env python2 +# -*- coding: utf-8 -*- +# +################################################################################ +# +# Copyright 2015-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ + + +__author__ = "Felix Brezo, Yaiza Rubio " +__copyright__ = "Copyright 2015-2017, i3visio" +__credits__ = ["Felix Brezo", "Yaiza Rubio"] +__license__ = "AGPLv3+" +__version__ = "v6.0" +__maintainer__ = "Felix Brezo, Yaiza Rubio" +__email__ = "contacto@i3visio.com" + + +import argparse +import datetime as dt +import json +import os + +import osrframework.utils.banner as banner +import osrframework.utils.platform_selection as platform_selection +import osrframework.utils.configuration as configuration +import osrframework.utils.general as general + +from osrframework.utils.general import error, warning, success, info, title, emphasis + + +def performSearch(platformNames=[], queries=[], process=False, excludePlatformNames=[]): + """ + Method to perform the search itself on the different platforms. + + Args: + ----- + platforms: List of objects. + queries: List of queries to be performed. + process: Whether to process all the profiles... SLOW! + + Returns: + -------- + A list with the entities collected. + """ + # Grabbing the objects + platforms = platform_selection.getPlatformsByName(platformNames, mode="searchfy", excludePlatformNames=excludePlatformNames) + results = [] + for q in queries: + for pla in platforms: + # This returns a json.txt! + entities = pla.getInfo(query=q, process = process, mode="searchfy") + if entities != "[]": + results += json.loads(entities) + return results + + +def main(args): + """ + Main function to launch usufy. + + The function is created in this way so as to let other applications make + use of the full configuration capabilities of the application. The + parameters received are used as parsed by this modules `getParser()`. + + Args: + ----- + args: Arguments received in the command line. + + Returns: + -------- + A list of i3visio entities. + """ + results = [] + + if not args.maltego: + print(general.title(banner.text)) + + sayingHello = """ +searchfy.py Copyright (C) F. Brezo and Y. Rubio (i3visio) 2014-2017 + +This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you +are welcome to redistribute it under certain conditions. For additional info, +visit """ + general.LICENSE_URL + "\n" + print(general.title(sayingHello)) + + if args.license: + general.showLicense() + else: + # Showing the execution time... + startTime= dt.datetime.now() + print(str(startTime) + "\tStarting search in different platform(s)... Relax!\n") + print(general.emphasis("\tPress to stop...\n")) + # Performing the search + try: + results = performSearch(platformNames=args.platforms, queries=args.queries, process=args.process, excludePlatformNames=args.exclude) + except KeyboardInterrupt: + print(general.error("\n[!] Process manually stopped by the user. Workers terminated without providing any result.\n")) + results = [] + + # Generating summary files for each ... + if args.extension: + # Storing the file... + if not args.maltego: + # Verifying if the outputPath exists + if not os.path.exists (args.output_folder): + os.makedirs(args.output_folder) + + # Grabbing the results + fileHeader = os.path.join(args.output_folder, args.file_header) + + if not args.maltego: + # Iterating through the given extensions to print its values + for ext in args.extension: + # Generating output files + general.exportUsufy(results, ext, fileHeader) + + # Generating the Maltego output + if args.maltego: + general.listToMaltego(results) + + # Printing the results if requested + if not args.maltego: + now = dt.datetime.now() + print(str(now) + "\tA summary of the results obtained are listed in the following table:\n") + print(general.success(general.usufyToTextExport(results))) + + if args.web_browser: + general.openResultsInBrowser(results) + + now = dt.datetime.now() + print("\n" + str(now) + "\tYou can find all the information collected in the following files:") + for ext in args.extension: + # Showing the output files + print("\t" + general.emphasis(fileHeader + "." + ext)) + + # Showing the execution time... + endTime= dt.datetime.now() + print("\n" + str(endTime) +"\tFinishing execution...\n") + print("Total time used:\t" + general.emphasis(str(endTime-startTime))) + print("Average seconds/query:\t" + general.emphasis(str((endTime-startTime).total_seconds()/len(args.platforms))) +" seconds\n") + + # Urging users to place an issue on Github... + print(banner.footer) + + return results + + +def getParser(): + DEFAULT_VALUES = configuration.returnListOfConfigurationValues("searchfy") + # Capturing errors just in case the option is not found in the configuration + try: + excludeList = [DEFAULT_VALUES["exclude_platforms"]] + except: + excludeList = [] + + parser = argparse.ArgumentParser(description='searchfy.py - Piece of software that performs a query on the platforms in OSRFramework.', prog='searchfy.py', epilog='Check the README.md file for further details on the usage of this program or follow us on Twitter in .', add_help=False) + parser._optionals.title = "Input options (one required)" + + # Defining the mutually exclusive group for the main options + groupMain = parser.add_mutually_exclusive_group(required=True) + # Adding the main options + groupMain.add_argument('--license', required=False, action='store_true', default=False, help='shows the GPLv3+ license and exists.') + groupMain.add_argument('-q', '--queries', metavar='', nargs='+', action='store', help = 'the list of queries to be performed).') + + listAll = platform_selection.getAllPlatformNames("searchfy") + + # Configuring the processing options + groupProcessing = parser.add_argument_group('Processing arguments', 'Configuring the way in which searchfy will process the identified profiles.') + #groupProcessing.add_argument('-L', '--logfolder', metavar='. +# +##################################################################################*/ + +/* The main explorer */ +#chart_div { + height: 800px; + width: 100%; + min-width: 700px; +} + +body { + height: 100%; + background-color: #ddd; +} + +h4 { + text-align: center; +} + +h5 { + text-align: center; +} + +.tabConfiguration { + background-color: #def; +} + +div#loading { + width: 35px; + height: 35px; + display: none; + background: url(/static/img/loading.gif) no-repeat; + cursor: wait; +} + +/* The fonts for attributes */ +.attrib .fa{ + width: 15px; + text-align: center; +} + +.listItem{ + width: 130px; +} +.content{ + padding: 3px; + text-align: center; +} + +.regTitle{ + font-weight: 700; + font-size: 0.8em; +} + +.regSubtitle{ + font-size: 0.6em; +} + +.attributeText{ + font-size: 0.5em; +} diff --git a/osrframework/static/css/font-awesome.min.css b/osrframework/static/css/font-awesome.min.css new file mode 100644 index 0000000..ec53d4d --- /dev/null +++ b/osrframework/static/css/font-awesome.min.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.2.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"} \ No newline at end of file diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/css/font-awesome.css b/osrframework/static/css/fonts/font-awesome-4.2.0/css/font-awesome.css new file mode 100644 index 0000000..4040b3c --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/css/font-awesome.css @@ -0,0 +1,1672 @@ +/*! + * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */ +/* FONT PATH + * -------------------------- */ +@font-face { + font-family: 'FontAwesome'; + src: url('../fonts/fontawesome-webfont.eot?v=4.2.0'); + src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg'); + font-weight: normal; + font-style: normal; +} +.fa { + display: inline-block; + font: normal normal normal 14px/1 FontAwesome; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +/* makes the font 33% larger relative to the icon container */ +.fa-lg { + font-size: 1.33333333em; + line-height: 0.75em; + vertical-align: -15%; +} +.fa-2x { + font-size: 2em; +} +.fa-3x { + font-size: 3em; +} +.fa-4x { + font-size: 4em; +} +.fa-5x { + font-size: 5em; +} +.fa-fw { + width: 1.28571429em; + text-align: center; +} +.fa-ul { + padding-left: 0; + margin-left: 2.14285714em; + list-style-type: none; +} +.fa-ul > li { + position: relative; +} +.fa-li { + position: absolute; + left: -2.14285714em; + width: 2.14285714em; + top: 0.14285714em; + text-align: center; +} +.fa-li.fa-lg { + left: -1.85714286em; +} +.fa-border { + padding: .2em .25em .15em; + border: solid 0.08em #eeeeee; + border-radius: .1em; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.fa.pull-left { + margin-right: .3em; +} +.fa.pull-right { + margin-left: .3em; +} +.fa-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; +} +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +.fa-rotate-90 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} +.fa-rotate-180 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} +.fa-rotate-270 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); + -webkit-transform: rotate(270deg); + -ms-transform: rotate(270deg); + transform: rotate(270deg); +} +.fa-flip-horizontal { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); + -webkit-transform: scale(-1, 1); + -ms-transform: scale(-1, 1); + transform: scale(-1, 1); +} +.fa-flip-vertical { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); + -webkit-transform: scale(1, -1); + -ms-transform: scale(1, -1); + transform: scale(1, -1); +} +:root .fa-rotate-90, +:root .fa-rotate-180, +:root .fa-rotate-270, +:root .fa-flip-horizontal, +:root .fa-flip-vertical { + filter: none; +} +.fa-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; +} +.fa-stack-1x, +.fa-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} +.fa-stack-1x { + line-height: inherit; +} +.fa-stack-2x { + font-size: 2em; +} +.fa-inverse { + color: #ffffff; +} +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.fa-glass:before { + content: "\f000"; +} +.fa-music:before { + content: "\f001"; +} +.fa-search:before { + content: "\f002"; +} +.fa-envelope-o:before { + content: "\f003"; +} +.fa-heart:before { + content: "\f004"; +} +.fa-star:before { + content: "\f005"; +} +.fa-star-o:before { + content: "\f006"; +} +.fa-user:before { + content: "\f007"; +} +.fa-film:before { + content: "\f008"; +} +.fa-th-large:before { + content: "\f009"; +} +.fa-th:before { + content: "\f00a"; +} +.fa-th-list:before { + content: "\f00b"; +} +.fa-check:before { + content: "\f00c"; +} +.fa-remove:before, +.fa-close:before, +.fa-times:before { + content: "\f00d"; +} +.fa-search-plus:before { + content: "\f00e"; +} +.fa-search-minus:before { + content: "\f010"; +} +.fa-power-off:before { + content: "\f011"; +} +.fa-signal:before { + content: "\f012"; +} +.fa-gear:before, +.fa-cog:before { + content: "\f013"; +} +.fa-trash-o:before { + content: "\f014"; +} +.fa-home:before { + content: "\f015"; +} +.fa-file-o:before { + content: "\f016"; +} +.fa-clock-o:before { + content: "\f017"; +} +.fa-road:before { + content: "\f018"; +} +.fa-download:before { + content: "\f019"; +} +.fa-arrow-circle-o-down:before { + content: "\f01a"; +} +.fa-arrow-circle-o-up:before { + content: "\f01b"; +} +.fa-inbox:before { + content: "\f01c"; +} +.fa-play-circle-o:before { + content: "\f01d"; +} +.fa-rotate-right:before, +.fa-repeat:before { + content: "\f01e"; +} +.fa-refresh:before { + content: "\f021"; +} +.fa-list-alt:before { + content: "\f022"; +} +.fa-lock:before { + content: "\f023"; +} +.fa-flag:before { + content: "\f024"; +} +.fa-headphones:before { + content: "\f025"; +} +.fa-volume-off:before { + content: "\f026"; +} +.fa-volume-down:before { + content: "\f027"; +} +.fa-volume-up:before { + content: "\f028"; +} +.fa-qrcode:before { + content: "\f029"; +} +.fa-barcode:before { + content: "\f02a"; +} +.fa-tag:before { + content: "\f02b"; +} +.fa-tags:before { + content: "\f02c"; +} +.fa-book:before { + content: "\f02d"; +} +.fa-bookmark:before { + content: "\f02e"; +} +.fa-print:before { + content: "\f02f"; +} +.fa-camera:before { + content: "\f030"; +} +.fa-font:before { + content: "\f031"; +} +.fa-bold:before { + content: "\f032"; +} +.fa-italic:before { + content: "\f033"; +} +.fa-text-height:before { + content: "\f034"; +} +.fa-text-width:before { + content: "\f035"; +} +.fa-align-left:before { + content: "\f036"; +} +.fa-align-center:before { + content: "\f037"; +} +.fa-align-right:before { + content: "\f038"; +} +.fa-align-justify:before { + content: "\f039"; +} +.fa-list:before { + content: "\f03a"; +} +.fa-dedent:before, +.fa-outdent:before { + content: "\f03b"; +} +.fa-indent:before { + content: "\f03c"; +} +.fa-video-camera:before { + content: "\f03d"; +} +.fa-photo:before, +.fa-image:before, +.fa-picture-o:before { + content: "\f03e"; +} +.fa-pencil:before { + content: "\f040"; +} +.fa-map-marker:before { + content: "\f041"; +} +.fa-adjust:before { + content: "\f042"; +} +.fa-tint:before { + content: "\f043"; +} +.fa-edit:before, +.fa-pencil-square-o:before { + content: "\f044"; +} +.fa-share-square-o:before { + content: "\f045"; +} +.fa-check-square-o:before { + content: "\f046"; +} +.fa-arrows:before { + content: "\f047"; +} +.fa-step-backward:before { + content: "\f048"; +} +.fa-fast-backward:before { + content: "\f049"; +} +.fa-backward:before { + content: "\f04a"; +} +.fa-play:before { + content: "\f04b"; +} +.fa-pause:before { + content: "\f04c"; +} +.fa-stop:before { + content: "\f04d"; +} +.fa-forward:before { + content: "\f04e"; +} +.fa-fast-forward:before { + content: "\f050"; +} +.fa-step-forward:before { + content: "\f051"; +} +.fa-eject:before { + content: "\f052"; +} +.fa-chevron-left:before { + content: "\f053"; +} +.fa-chevron-right:before { + content: "\f054"; +} +.fa-plus-circle:before { + content: "\f055"; +} +.fa-minus-circle:before { + content: "\f056"; +} +.fa-times-circle:before { + content: "\f057"; +} +.fa-check-circle:before { + content: "\f058"; +} +.fa-question-circle:before { + content: "\f059"; +} +.fa-info-circle:before { + content: "\f05a"; +} +.fa-crosshairs:before { + content: "\f05b"; +} +.fa-times-circle-o:before { + content: "\f05c"; +} +.fa-check-circle-o:before { + content: "\f05d"; +} +.fa-ban:before { + content: "\f05e"; +} +.fa-arrow-left:before { + content: "\f060"; +} +.fa-arrow-right:before { + content: "\f061"; +} +.fa-arrow-up:before { + content: "\f062"; +} +.fa-arrow-down:before { + content: "\f063"; +} +.fa-mail-forward:before, +.fa-share:before { + content: "\f064"; +} +.fa-expand:before { + content: "\f065"; +} +.fa-compress:before { + content: "\f066"; +} +.fa-plus:before { + content: "\f067"; +} +.fa-minus:before { + content: "\f068"; +} +.fa-asterisk:before { + content: "\f069"; +} +.fa-exclamation-circle:before { + content: "\f06a"; +} +.fa-gift:before { + content: "\f06b"; +} +.fa-leaf:before { + content: "\f06c"; +} +.fa-fire:before { + content: "\f06d"; +} +.fa-eye:before { + content: "\f06e"; +} +.fa-eye-slash:before { + content: "\f070"; +} +.fa-warning:before, +.fa-exclamation-triangle:before { + content: "\f071"; +} +.fa-plane:before { + content: "\f072"; +} +.fa-calendar:before { + content: "\f073"; +} +.fa-random:before { + content: "\f074"; +} +.fa-comment:before { + content: "\f075"; +} +.fa-magnet:before { + content: "\f076"; +} +.fa-chevron-up:before { + content: "\f077"; +} +.fa-chevron-down:before { + content: "\f078"; +} +.fa-retweet:before { + content: "\f079"; +} +.fa-shopping-cart:before { + content: "\f07a"; +} +.fa-folder:before { + content: "\f07b"; +} +.fa-folder-open:before { + content: "\f07c"; +} +.fa-arrows-v:before { + content: "\f07d"; +} +.fa-arrows-h:before { + content: "\f07e"; +} +.fa-bar-chart-o:before, +.fa-bar-chart:before { + content: "\f080"; +} +.fa-twitter-square:before { + content: "\f081"; +} +.fa-facebook-square:before { + content: "\f082"; +} +.fa-camera-retro:before { + content: "\f083"; +} +.fa-key:before { + content: "\f084"; +} +.fa-gears:before, +.fa-cogs:before { + content: "\f085"; +} +.fa-comments:before { + content: "\f086"; +} +.fa-thumbs-o-up:before { + content: "\f087"; +} +.fa-thumbs-o-down:before { + content: "\f088"; +} +.fa-star-half:before { + content: "\f089"; +} +.fa-heart-o:before { + content: "\f08a"; +} +.fa-sign-out:before { + content: "\f08b"; +} +.fa-linkedin-square:before { + content: "\f08c"; +} +.fa-thumb-tack:before { + content: "\f08d"; +} +.fa-external-link:before { + content: "\f08e"; +} +.fa-sign-in:before { + content: "\f090"; +} +.fa-trophy:before { + content: "\f091"; +} +.fa-github-square:before { + content: "\f092"; +} +.fa-upload:before { + content: "\f093"; +} +.fa-lemon-o:before { + content: "\f094"; +} +.fa-phone:before { + content: "\f095"; +} +.fa-square-o:before { + content: "\f096"; +} +.fa-bookmark-o:before { + content: "\f097"; +} +.fa-phone-square:before { + content: "\f098"; +} +.fa-twitter:before { + content: "\f099"; +} +.fa-facebook:before { + content: "\f09a"; +} +.fa-github:before { + content: "\f09b"; +} +.fa-unlock:before { + content: "\f09c"; +} +.fa-credit-card:before { + content: "\f09d"; +} +.fa-rss:before { + content: "\f09e"; +} +.fa-hdd-o:before { + content: "\f0a0"; +} +.fa-bullhorn:before { + content: "\f0a1"; +} +.fa-bell:before { + content: "\f0f3"; +} +.fa-certificate:before { + content: "\f0a3"; +} +.fa-hand-o-right:before { + content: "\f0a4"; +} +.fa-hand-o-left:before { + content: "\f0a5"; +} +.fa-hand-o-up:before { + content: "\f0a6"; +} +.fa-hand-o-down:before { + content: "\f0a7"; +} +.fa-arrow-circle-left:before { + content: "\f0a8"; +} +.fa-arrow-circle-right:before { + content: "\f0a9"; +} +.fa-arrow-circle-up:before { + content: "\f0aa"; +} +.fa-arrow-circle-down:before { + content: "\f0ab"; +} +.fa-globe:before { + content: "\f0ac"; +} +.fa-wrench:before { + content: "\f0ad"; +} +.fa-tasks:before { + content: "\f0ae"; +} +.fa-filter:before { + content: "\f0b0"; +} +.fa-briefcase:before { + content: "\f0b1"; +} +.fa-arrows-alt:before { + content: "\f0b2"; +} +.fa-group:before, +.fa-users:before { + content: "\f0c0"; +} +.fa-chain:before, +.fa-link:before { + content: "\f0c1"; +} +.fa-cloud:before { + content: "\f0c2"; +} +.fa-flask:before { + content: "\f0c3"; +} +.fa-cut:before, +.fa-scissors:before { + content: "\f0c4"; +} +.fa-copy:before, +.fa-files-o:before { + content: "\f0c5"; +} +.fa-paperclip:before { + content: "\f0c6"; +} +.fa-save:before, +.fa-floppy-o:before { + content: "\f0c7"; +} +.fa-square:before { + content: "\f0c8"; +} +.fa-navicon:before, +.fa-reorder:before, +.fa-bars:before { + content: "\f0c9"; +} +.fa-list-ul:before { + content: "\f0ca"; +} +.fa-list-ol:before { + content: "\f0cb"; +} +.fa-strikethrough:before { + content: "\f0cc"; +} +.fa-underline:before { + content: "\f0cd"; +} +.fa-table:before { + content: "\f0ce"; +} +.fa-magic:before { + content: "\f0d0"; +} +.fa-truck:before { + content: "\f0d1"; +} +.fa-pinterest:before { + content: "\f0d2"; +} +.fa-pinterest-square:before { + content: "\f0d3"; +} +.fa-google-plus-square:before { + content: "\f0d4"; +} +.fa-google-plus:before { + content: "\f0d5"; +} +.fa-money:before { + content: "\f0d6"; +} +.fa-caret-down:before { + content: "\f0d7"; +} +.fa-caret-up:before { + content: "\f0d8"; +} +.fa-caret-left:before { + content: "\f0d9"; +} +.fa-caret-right:before { + content: "\f0da"; +} +.fa-columns:before { + content: "\f0db"; +} +.fa-unsorted:before, +.fa-sort:before { + content: "\f0dc"; +} +.fa-sort-down:before, +.fa-sort-desc:before { + content: "\f0dd"; +} +.fa-sort-up:before, +.fa-sort-asc:before { + content: "\f0de"; +} +.fa-envelope:before { + content: "\f0e0"; +} +.fa-linkedin:before { + content: "\f0e1"; +} +.fa-rotate-left:before, +.fa-undo:before { + content: "\f0e2"; +} +.fa-legal:before, +.fa-gavel:before { + content: "\f0e3"; +} +.fa-dashboard:before, +.fa-tachometer:before { + content: "\f0e4"; +} +.fa-comment-o:before { + content: "\f0e5"; +} +.fa-comments-o:before { + content: "\f0e6"; +} +.fa-flash:before, +.fa-bolt:before { + content: "\f0e7"; +} +.fa-sitemap:before { + content: "\f0e8"; +} +.fa-umbrella:before { + content: "\f0e9"; +} +.fa-paste:before, +.fa-clipboard:before { + content: "\f0ea"; +} +.fa-lightbulb-o:before { + content: "\f0eb"; +} +.fa-exchange:before { + content: "\f0ec"; +} +.fa-cloud-download:before { + content: "\f0ed"; +} +.fa-cloud-upload:before { + content: "\f0ee"; +} +.fa-user-md:before { + content: "\f0f0"; +} +.fa-stethoscope:before { + content: "\f0f1"; +} +.fa-suitcase:before { + content: "\f0f2"; +} +.fa-bell-o:before { + content: "\f0a2"; +} +.fa-coffee:before { + content: "\f0f4"; +} +.fa-cutlery:before { + content: "\f0f5"; +} +.fa-file-text-o:before { + content: "\f0f6"; +} +.fa-building-o:before { + content: "\f0f7"; +} +.fa-hospital-o:before { + content: "\f0f8"; +} +.fa-ambulance:before { + content: "\f0f9"; +} +.fa-medkit:before { + content: "\f0fa"; +} +.fa-fighter-jet:before { + content: "\f0fb"; +} +.fa-beer:before { + content: "\f0fc"; +} +.fa-h-square:before { + content: "\f0fd"; +} +.fa-plus-square:before { + content: "\f0fe"; +} +.fa-angle-double-left:before { + content: "\f100"; +} +.fa-angle-double-right:before { + content: "\f101"; +} +.fa-angle-double-up:before { + content: "\f102"; +} +.fa-angle-double-down:before { + content: "\f103"; +} +.fa-angle-left:before { + content: "\f104"; +} +.fa-angle-right:before { + content: "\f105"; +} +.fa-angle-up:before { + content: "\f106"; +} +.fa-angle-down:before { + content: "\f107"; +} +.fa-desktop:before { + content: "\f108"; +} +.fa-laptop:before { + content: "\f109"; +} +.fa-tablet:before { + content: "\f10a"; +} +.fa-mobile-phone:before, +.fa-mobile:before { + content: "\f10b"; +} +.fa-circle-o:before { + content: "\f10c"; +} +.fa-quote-left:before { + content: "\f10d"; +} +.fa-quote-right:before { + content: "\f10e"; +} +.fa-spinner:before { + content: "\f110"; +} +.fa-circle:before { + content: "\f111"; +} +.fa-mail-reply:before, +.fa-reply:before { + content: "\f112"; +} +.fa-github-alt:before { + content: "\f113"; +} +.fa-folder-o:before { + content: "\f114"; +} +.fa-folder-open-o:before { + content: "\f115"; +} +.fa-smile-o:before { + content: "\f118"; +} +.fa-frown-o:before { + content: "\f119"; +} +.fa-meh-o:before { + content: "\f11a"; +} +.fa-gamepad:before { + content: "\f11b"; +} +.fa-keyboard-o:before { + content: "\f11c"; +} +.fa-flag-o:before { + content: "\f11d"; +} +.fa-flag-checkered:before { + content: "\f11e"; +} +.fa-terminal:before { + content: "\f120"; +} +.fa-code:before { + content: "\f121"; +} +.fa-mail-reply-all:before, +.fa-reply-all:before { + content: "\f122"; +} +.fa-star-half-empty:before, +.fa-star-half-full:before, +.fa-star-half-o:before { + content: "\f123"; +} +.fa-location-arrow:before { + content: "\f124"; +} +.fa-crop:before { + content: "\f125"; +} +.fa-code-fork:before { + content: "\f126"; +} +.fa-unlink:before, +.fa-chain-broken:before { + content: "\f127"; +} +.fa-question:before { + content: "\f128"; +} +.fa-info:before { + content: "\f129"; +} +.fa-exclamation:before { + content: "\f12a"; +} +.fa-superscript:before { + content: "\f12b"; +} +.fa-subscript:before { + content: "\f12c"; +} +.fa-eraser:before { + content: "\f12d"; +} +.fa-puzzle-piece:before { + content: "\f12e"; +} +.fa-microphone:before { + content: "\f130"; +} +.fa-microphone-slash:before { + content: "\f131"; +} +.fa-shield:before { + content: "\f132"; +} +.fa-calendar-o:before { + content: "\f133"; +} +.fa-fire-extinguisher:before { + content: "\f134"; +} +.fa-rocket:before { + content: "\f135"; +} +.fa-maxcdn:before { + content: "\f136"; +} +.fa-chevron-circle-left:before { + content: "\f137"; +} +.fa-chevron-circle-right:before { + content: "\f138"; +} +.fa-chevron-circle-up:before { + content: "\f139"; +} +.fa-chevron-circle-down:before { + content: "\f13a"; +} +.fa-html5:before { + content: "\f13b"; +} +.fa-css3:before { + content: "\f13c"; +} +.fa-anchor:before { + content: "\f13d"; +} +.fa-unlock-alt:before { + content: "\f13e"; +} +.fa-bullseye:before { + content: "\f140"; +} +.fa-ellipsis-h:before { + content: "\f141"; +} +.fa-ellipsis-v:before { + content: "\f142"; +} +.fa-rss-square:before { + content: "\f143"; +} +.fa-play-circle:before { + content: "\f144"; +} +.fa-ticket:before { + content: "\f145"; +} +.fa-minus-square:before { + content: "\f146"; +} +.fa-minus-square-o:before { + content: "\f147"; +} +.fa-level-up:before { + content: "\f148"; +} +.fa-level-down:before { + content: "\f149"; +} +.fa-check-square:before { + content: "\f14a"; +} +.fa-pencil-square:before { + content: "\f14b"; +} +.fa-external-link-square:before { + content: "\f14c"; +} +.fa-share-square:before { + content: "\f14d"; +} +.fa-compass:before { + content: "\f14e"; +} +.fa-toggle-down:before, +.fa-caret-square-o-down:before { + content: "\f150"; +} +.fa-toggle-up:before, +.fa-caret-square-o-up:before { + content: "\f151"; +} +.fa-toggle-right:before, +.fa-caret-square-o-right:before { + content: "\f152"; +} +.fa-euro:before, +.fa-eur:before { + content: "\f153"; +} +.fa-gbp:before { + content: "\f154"; +} +.fa-dollar:before, +.fa-usd:before { + content: "\f155"; +} +.fa-rupee:before, +.fa-inr:before { + content: "\f156"; +} +.fa-cny:before, +.fa-rmb:before, +.fa-yen:before, +.fa-jpy:before { + content: "\f157"; +} +.fa-ruble:before, +.fa-rouble:before, +.fa-rub:before { + content: "\f158"; +} +.fa-won:before, +.fa-krw:before { + content: "\f159"; +} +.fa-bitcoin:before, +.fa-btc:before { + content: "\f15a"; +} +.fa-file:before { + content: "\f15b"; +} +.fa-file-text:before { + content: "\f15c"; +} +.fa-sort-alpha-asc:before { + content: "\f15d"; +} +.fa-sort-alpha-desc:before { + content: "\f15e"; +} +.fa-sort-amount-asc:before { + content: "\f160"; +} +.fa-sort-amount-desc:before { + content: "\f161"; +} +.fa-sort-numeric-asc:before { + content: "\f162"; +} +.fa-sort-numeric-desc:before { + content: "\f163"; +} +.fa-thumbs-up:before { + content: "\f164"; +} +.fa-thumbs-down:before { + content: "\f165"; +} +.fa-youtube-square:before { + content: "\f166"; +} +.fa-youtube:before { + content: "\f167"; +} +.fa-xing:before { + content: "\f168"; +} +.fa-xing-square:before { + content: "\f169"; +} +.fa-youtube-play:before { + content: "\f16a"; +} +.fa-dropbox:before { + content: "\f16b"; +} +.fa-stack-overflow:before { + content: "\f16c"; +} +.fa-instagram:before { + content: "\f16d"; +} +.fa-flickr:before { + content: "\f16e"; +} +.fa-adn:before { + content: "\f170"; +} +.fa-bitbucket:before { + content: "\f171"; +} +.fa-bitbucket-square:before { + content: "\f172"; +} +.fa-tumblr:before { + content: "\f173"; +} +.fa-tumblr-square:before { + content: "\f174"; +} +.fa-long-arrow-down:before { + content: "\f175"; +} +.fa-long-arrow-up:before { + content: "\f176"; +} +.fa-long-arrow-left:before { + content: "\f177"; +} +.fa-long-arrow-right:before { + content: "\f178"; +} +.fa-apple:before { + content: "\f179"; +} +.fa-windows:before { + content: "\f17a"; +} +.fa-android:before { + content: "\f17b"; +} +.fa-linux:before { + content: "\f17c"; +} +.fa-dribbble:before { + content: "\f17d"; +} +.fa-skype:before { + content: "\f17e"; +} +.fa-foursquare:before { + content: "\f180"; +} +.fa-trello:before { + content: "\f181"; +} +.fa-female:before { + content: "\f182"; +} +.fa-male:before { + content: "\f183"; +} +.fa-gittip:before { + content: "\f184"; +} +.fa-sun-o:before { + content: "\f185"; +} +.fa-moon-o:before { + content: "\f186"; +} +.fa-archive:before { + content: "\f187"; +} +.fa-bug:before { + content: "\f188"; +} +.fa-vk:before { + content: "\f189"; +} +.fa-weibo:before { + content: "\f18a"; +} +.fa-renren:before { + content: "\f18b"; +} +.fa-pagelines:before { + content: "\f18c"; +} +.fa-stack-exchange:before { + content: "\f18d"; +} +.fa-arrow-circle-o-right:before { + content: "\f18e"; +} +.fa-arrow-circle-o-left:before { + content: "\f190"; +} +.fa-toggle-left:before, +.fa-caret-square-o-left:before { + content: "\f191"; +} +.fa-dot-circle-o:before { + content: "\f192"; +} +.fa-wheelchair:before { + content: "\f193"; +} +.fa-vimeo-square:before { + content: "\f194"; +} +.fa-turkish-lira:before, +.fa-try:before { + content: "\f195"; +} +.fa-plus-square-o:before { + content: "\f196"; +} +.fa-space-shuttle:before { + content: "\f197"; +} +.fa-slack:before { + content: "\f198"; +} +.fa-envelope-square:before { + content: "\f199"; +} +.fa-wordpress:before { + content: "\f19a"; +} +.fa-openid:before { + content: "\f19b"; +} +.fa-institution:before, +.fa-bank:before, +.fa-university:before { + content: "\f19c"; +} +.fa-mortar-board:before, +.fa-graduation-cap:before { + content: "\f19d"; +} +.fa-yahoo:before { + content: "\f19e"; +} +.fa-google:before { + content: "\f1a0"; +} +.fa-reddit:before { + content: "\f1a1"; +} +.fa-reddit-square:before { + content: "\f1a2"; +} +.fa-stumbleupon-circle:before { + content: "\f1a3"; +} +.fa-stumbleupon:before { + content: "\f1a4"; +} +.fa-delicious:before { + content: "\f1a5"; +} +.fa-digg:before { + content: "\f1a6"; +} +.fa-pied-piper:before { + content: "\f1a7"; +} +.fa-pied-piper-alt:before { + content: "\f1a8"; +} +.fa-drupal:before { + content: "\f1a9"; +} +.fa-joomla:before { + content: "\f1aa"; +} +.fa-language:before { + content: "\f1ab"; +} +.fa-fax:before { + content: "\f1ac"; +} +.fa-building:before { + content: "\f1ad"; +} +.fa-child:before { + content: "\f1ae"; +} +.fa-paw:before { + content: "\f1b0"; +} +.fa-spoon:before { + content: "\f1b1"; +} +.fa-cube:before { + content: "\f1b2"; +} +.fa-cubes:before { + content: "\f1b3"; +} +.fa-behance:before { + content: "\f1b4"; +} +.fa-behance-square:before { + content: "\f1b5"; +} +.fa-steam:before { + content: "\f1b6"; +} +.fa-steam-square:before { + content: "\f1b7"; +} +.fa-recycle:before { + content: "\f1b8"; +} +.fa-automobile:before, +.fa-car:before { + content: "\f1b9"; +} +.fa-cab:before, +.fa-taxi:before { + content: "\f1ba"; +} +.fa-tree:before { + content: "\f1bb"; +} +.fa-spotify:before { + content: "\f1bc"; +} +.fa-deviantart:before { + content: "\f1bd"; +} +.fa-soundcloud:before { + content: "\f1be"; +} +.fa-database:before { + content: "\f1c0"; +} +.fa-file-pdf-o:before { + content: "\f1c1"; +} +.fa-file-word-o:before { + content: "\f1c2"; +} +.fa-file-excel-o:before { + content: "\f1c3"; +} +.fa-file-powerpoint-o:before { + content: "\f1c4"; +} +.fa-file-photo-o:before, +.fa-file-picture-o:before, +.fa-file-image-o:before { + content: "\f1c5"; +} +.fa-file-zip-o:before, +.fa-file-archive-o:before { + content: "\f1c6"; +} +.fa-file-sound-o:before, +.fa-file-audio-o:before { + content: "\f1c7"; +} +.fa-file-movie-o:before, +.fa-file-video-o:before { + content: "\f1c8"; +} +.fa-file-code-o:before { + content: "\f1c9"; +} +.fa-vine:before { + content: "\f1ca"; +} +.fa-codepen:before { + content: "\f1cb"; +} +.fa-jsfiddle:before { + content: "\f1cc"; +} +.fa-life-bouy:before, +.fa-life-buoy:before, +.fa-life-saver:before, +.fa-support:before, +.fa-life-ring:before { + content: "\f1cd"; +} +.fa-circle-o-notch:before { + content: "\f1ce"; +} +.fa-ra:before, +.fa-rebel:before { + content: "\f1d0"; +} +.fa-ge:before, +.fa-empire:before { + content: "\f1d1"; +} +.fa-git-square:before { + content: "\f1d2"; +} +.fa-git:before { + content: "\f1d3"; +} +.fa-hacker-news:before { + content: "\f1d4"; +} +.fa-tencent-weibo:before { + content: "\f1d5"; +} +.fa-qq:before { + content: "\f1d6"; +} +.fa-wechat:before, +.fa-weixin:before { + content: "\f1d7"; +} +.fa-send:before, +.fa-paper-plane:before { + content: "\f1d8"; +} +.fa-send-o:before, +.fa-paper-plane-o:before { + content: "\f1d9"; +} +.fa-history:before { + content: "\f1da"; +} +.fa-circle-thin:before { + content: "\f1db"; +} +.fa-header:before { + content: "\f1dc"; +} +.fa-paragraph:before { + content: "\f1dd"; +} +.fa-sliders:before { + content: "\f1de"; +} +.fa-share-alt:before { + content: "\f1e0"; +} +.fa-share-alt-square:before { + content: "\f1e1"; +} +.fa-bomb:before { + content: "\f1e2"; +} +.fa-soccer-ball-o:before, +.fa-futbol-o:before { + content: "\f1e3"; +} +.fa-tty:before { + content: "\f1e4"; +} +.fa-binoculars:before { + content: "\f1e5"; +} +.fa-plug:before { + content: "\f1e6"; +} +.fa-slideshare:before { + content: "\f1e7"; +} +.fa-twitch:before { + content: "\f1e8"; +} +.fa-yelp:before { + content: "\f1e9"; +} +.fa-newspaper-o:before { + content: "\f1ea"; +} +.fa-wifi:before { + content: "\f1eb"; +} +.fa-calculator:before { + content: "\f1ec"; +} +.fa-paypal:before { + content: "\f1ed"; +} +.fa-google-wallet:before { + content: "\f1ee"; +} +.fa-cc-visa:before { + content: "\f1f0"; +} +.fa-cc-mastercard:before { + content: "\f1f1"; +} +.fa-cc-discover:before { + content: "\f1f2"; +} +.fa-cc-amex:before { + content: "\f1f3"; +} +.fa-cc-paypal:before { + content: "\f1f4"; +} +.fa-cc-stripe:before { + content: "\f1f5"; +} +.fa-bell-slash:before { + content: "\f1f6"; +} +.fa-bell-slash-o:before { + content: "\f1f7"; +} +.fa-trash:before { + content: "\f1f8"; +} +.fa-copyright:before { + content: "\f1f9"; +} +.fa-at:before { + content: "\f1fa"; +} +.fa-eyedropper:before { + content: "\f1fb"; +} +.fa-paint-brush:before { + content: "\f1fc"; +} +.fa-birthday-cake:before { + content: "\f1fd"; +} +.fa-area-chart:before { + content: "\f1fe"; +} +.fa-pie-chart:before { + content: "\f200"; +} +.fa-line-chart:before { + content: "\f201"; +} +.fa-lastfm:before { + content: "\f202"; +} +.fa-lastfm-square:before { + content: "\f203"; +} +.fa-toggle-off:before { + content: "\f204"; +} +.fa-toggle-on:before { + content: "\f205"; +} +.fa-bicycle:before { + content: "\f206"; +} +.fa-bus:before { + content: "\f207"; +} +.fa-ioxhost:before { + content: "\f208"; +} +.fa-angellist:before { + content: "\f209"; +} +.fa-cc:before { + content: "\f20a"; +} +.fa-shekel:before, +.fa-sheqel:before, +.fa-ils:before { + content: "\f20b"; +} +.fa-meanpath:before { + content: "\f20c"; +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/css/font-awesome.min.css b/osrframework/static/css/fonts/font-awesome-4.2.0/css/font-awesome.min.css new file mode 100644 index 0000000..ec53d4d --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/css/font-awesome.min.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.2.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"} \ No newline at end of file diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/fonts/FontAwesome.otf b/osrframework/static/css/fonts/font-awesome-4.2.0/fonts/FontAwesome.otf new file mode 100644 index 0000000..81c9ad9 Binary files /dev/null and b/osrframework/static/css/fonts/font-awesome-4.2.0/fonts/FontAwesome.otf differ diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.eot b/osrframework/static/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..84677bc Binary files /dev/null and b/osrframework/static/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.eot differ diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.svg b/osrframework/static/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..d907b25 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.svg @@ -0,0 +1,520 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.ttf b/osrframework/static/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..96a3639 Binary files /dev/null and b/osrframework/static/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.ttf differ diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.woff b/osrframework/static/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..628b6a5 Binary files /dev/null and b/osrframework/static/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.woff differ diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/less/bordered-pulled.less b/osrframework/static/css/fonts/font-awesome-4.2.0/less/bordered-pulled.less new file mode 100644 index 0000000..0c90eb5 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/less/bordered-pulled.less @@ -0,0 +1,16 @@ +// Bordered & Pulled +// ------------------------- + +.@{fa-css-prefix}-border { + padding: .2em .25em .15em; + border: solid .08em @fa-border-color; + border-radius: .1em; +} + +.pull-right { float: right; } +.pull-left { float: left; } + +.@{fa-css-prefix} { + &.pull-left { margin-right: .3em; } + &.pull-right { margin-left: .3em; } +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/less/core.less b/osrframework/static/css/fonts/font-awesome-4.2.0/less/core.less new file mode 100644 index 0000000..01d1910 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/less/core.less @@ -0,0 +1,11 @@ +// Base Class Definition +// ------------------------- + +.@{fa-css-prefix} { + display: inline-block; + font: normal normal normal 14px/1 FontAwesome; // shortening font declaration + font-size: inherit; // can't have font-size inherit on line above, so need to override + text-rendering: auto; // optimizelegibility throws things off #1094 + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/less/fixed-width.less b/osrframework/static/css/fonts/font-awesome-4.2.0/less/fixed-width.less new file mode 100644 index 0000000..110289f --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/less/fixed-width.less @@ -0,0 +1,6 @@ +// Fixed Width Icons +// ------------------------- +.@{fa-css-prefix}-fw { + width: (18em / 14); + text-align: center; +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/less/font-awesome.less b/osrframework/static/css/fonts/font-awesome-4.2.0/less/font-awesome.less new file mode 100644 index 0000000..195fd46 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/less/font-awesome.less @@ -0,0 +1,17 @@ +/*! + * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */ + +@import "variables.less"; +@import "mixins.less"; +@import "path.less"; +@import "core.less"; +@import "larger.less"; +@import "fixed-width.less"; +@import "list.less"; +@import "bordered-pulled.less"; +@import "spinning.less"; +@import "rotated-flipped.less"; +@import "stacked.less"; +@import "icons.less"; diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/less/icons.less b/osrframework/static/css/fonts/font-awesome-4.2.0/less/icons.less new file mode 100644 index 0000000..b5c26c7 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/less/icons.less @@ -0,0 +1,552 @@ +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ + +.@{fa-css-prefix}-glass:before { content: @fa-var-glass; } +.@{fa-css-prefix}-music:before { content: @fa-var-music; } +.@{fa-css-prefix}-search:before { content: @fa-var-search; } +.@{fa-css-prefix}-envelope-o:before { content: @fa-var-envelope-o; } +.@{fa-css-prefix}-heart:before { content: @fa-var-heart; } +.@{fa-css-prefix}-star:before { content: @fa-var-star; } +.@{fa-css-prefix}-star-o:before { content: @fa-var-star-o; } +.@{fa-css-prefix}-user:before { content: @fa-var-user; } +.@{fa-css-prefix}-film:before { content: @fa-var-film; } +.@{fa-css-prefix}-th-large:before { content: @fa-var-th-large; } +.@{fa-css-prefix}-th:before { content: @fa-var-th; } +.@{fa-css-prefix}-th-list:before { content: @fa-var-th-list; } +.@{fa-css-prefix}-check:before { content: @fa-var-check; } +.@{fa-css-prefix}-remove:before, +.@{fa-css-prefix}-close:before, +.@{fa-css-prefix}-times:before { content: @fa-var-times; } +.@{fa-css-prefix}-search-plus:before { content: @fa-var-search-plus; } +.@{fa-css-prefix}-search-minus:before { content: @fa-var-search-minus; } +.@{fa-css-prefix}-power-off:before { content: @fa-var-power-off; } +.@{fa-css-prefix}-signal:before { content: @fa-var-signal; } +.@{fa-css-prefix}-gear:before, +.@{fa-css-prefix}-cog:before { content: @fa-var-cog; } +.@{fa-css-prefix}-trash-o:before { content: @fa-var-trash-o; } +.@{fa-css-prefix}-home:before { content: @fa-var-home; } +.@{fa-css-prefix}-file-o:before { content: @fa-var-file-o; } +.@{fa-css-prefix}-clock-o:before { content: @fa-var-clock-o; } +.@{fa-css-prefix}-road:before { content: @fa-var-road; } +.@{fa-css-prefix}-download:before { content: @fa-var-download; } +.@{fa-css-prefix}-arrow-circle-o-down:before { content: @fa-var-arrow-circle-o-down; } +.@{fa-css-prefix}-arrow-circle-o-up:before { content: @fa-var-arrow-circle-o-up; } +.@{fa-css-prefix}-inbox:before { content: @fa-var-inbox; } +.@{fa-css-prefix}-play-circle-o:before { content: @fa-var-play-circle-o; } +.@{fa-css-prefix}-rotate-right:before, +.@{fa-css-prefix}-repeat:before { content: @fa-var-repeat; } +.@{fa-css-prefix}-refresh:before { content: @fa-var-refresh; } +.@{fa-css-prefix}-list-alt:before { content: @fa-var-list-alt; } +.@{fa-css-prefix}-lock:before { content: @fa-var-lock; } +.@{fa-css-prefix}-flag:before { content: @fa-var-flag; } +.@{fa-css-prefix}-headphones:before { content: @fa-var-headphones; } +.@{fa-css-prefix}-volume-off:before { content: @fa-var-volume-off; } +.@{fa-css-prefix}-volume-down:before { content: @fa-var-volume-down; } +.@{fa-css-prefix}-volume-up:before { content: @fa-var-volume-up; } +.@{fa-css-prefix}-qrcode:before { content: @fa-var-qrcode; } +.@{fa-css-prefix}-barcode:before { content: @fa-var-barcode; } +.@{fa-css-prefix}-tag:before { content: @fa-var-tag; } +.@{fa-css-prefix}-tags:before { content: @fa-var-tags; } +.@{fa-css-prefix}-book:before { content: @fa-var-book; } +.@{fa-css-prefix}-bookmark:before { content: @fa-var-bookmark; } +.@{fa-css-prefix}-print:before { content: @fa-var-print; } +.@{fa-css-prefix}-camera:before { content: @fa-var-camera; } +.@{fa-css-prefix}-font:before { content: @fa-var-font; } +.@{fa-css-prefix}-bold:before { content: @fa-var-bold; } +.@{fa-css-prefix}-italic:before { content: @fa-var-italic; } +.@{fa-css-prefix}-text-height:before { content: @fa-var-text-height; } +.@{fa-css-prefix}-text-width:before { content: @fa-var-text-width; } +.@{fa-css-prefix}-align-left:before { content: @fa-var-align-left; } +.@{fa-css-prefix}-align-center:before { content: @fa-var-align-center; } +.@{fa-css-prefix}-align-right:before { content: @fa-var-align-right; } +.@{fa-css-prefix}-align-justify:before { content: @fa-var-align-justify; } +.@{fa-css-prefix}-list:before { content: @fa-var-list; } +.@{fa-css-prefix}-dedent:before, +.@{fa-css-prefix}-outdent:before { content: @fa-var-outdent; } +.@{fa-css-prefix}-indent:before { content: @fa-var-indent; } +.@{fa-css-prefix}-video-camera:before { content: @fa-var-video-camera; } +.@{fa-css-prefix}-photo:before, +.@{fa-css-prefix}-image:before, +.@{fa-css-prefix}-picture-o:before { content: @fa-var-picture-o; } +.@{fa-css-prefix}-pencil:before { content: @fa-var-pencil; } +.@{fa-css-prefix}-map-marker:before { content: @fa-var-map-marker; } +.@{fa-css-prefix}-adjust:before { content: @fa-var-adjust; } +.@{fa-css-prefix}-tint:before { content: @fa-var-tint; } +.@{fa-css-prefix}-edit:before, +.@{fa-css-prefix}-pencil-square-o:before { content: @fa-var-pencil-square-o; } +.@{fa-css-prefix}-share-square-o:before { content: @fa-var-share-square-o; } +.@{fa-css-prefix}-check-square-o:before { content: @fa-var-check-square-o; } +.@{fa-css-prefix}-arrows:before { content: @fa-var-arrows; } +.@{fa-css-prefix}-step-backward:before { content: @fa-var-step-backward; } +.@{fa-css-prefix}-fast-backward:before { content: @fa-var-fast-backward; } +.@{fa-css-prefix}-backward:before { content: @fa-var-backward; } +.@{fa-css-prefix}-play:before { content: @fa-var-play; } +.@{fa-css-prefix}-pause:before { content: @fa-var-pause; } +.@{fa-css-prefix}-stop:before { content: @fa-var-stop; } +.@{fa-css-prefix}-forward:before { content: @fa-var-forward; } +.@{fa-css-prefix}-fast-forward:before { content: @fa-var-fast-forward; } +.@{fa-css-prefix}-step-forward:before { content: @fa-var-step-forward; } +.@{fa-css-prefix}-eject:before { content: @fa-var-eject; } +.@{fa-css-prefix}-chevron-left:before { content: @fa-var-chevron-left; } +.@{fa-css-prefix}-chevron-right:before { content: @fa-var-chevron-right; } +.@{fa-css-prefix}-plus-circle:before { content: @fa-var-plus-circle; } +.@{fa-css-prefix}-minus-circle:before { content: @fa-var-minus-circle; } +.@{fa-css-prefix}-times-circle:before { content: @fa-var-times-circle; } +.@{fa-css-prefix}-check-circle:before { content: @fa-var-check-circle; } +.@{fa-css-prefix}-question-circle:before { content: @fa-var-question-circle; } +.@{fa-css-prefix}-info-circle:before { content: @fa-var-info-circle; } +.@{fa-css-prefix}-crosshairs:before { content: @fa-var-crosshairs; } +.@{fa-css-prefix}-times-circle-o:before { content: @fa-var-times-circle-o; } +.@{fa-css-prefix}-check-circle-o:before { content: @fa-var-check-circle-o; } +.@{fa-css-prefix}-ban:before { content: @fa-var-ban; } +.@{fa-css-prefix}-arrow-left:before { content: @fa-var-arrow-left; } +.@{fa-css-prefix}-arrow-right:before { content: @fa-var-arrow-right; } +.@{fa-css-prefix}-arrow-up:before { content: @fa-var-arrow-up; } +.@{fa-css-prefix}-arrow-down:before { content: @fa-var-arrow-down; } +.@{fa-css-prefix}-mail-forward:before, +.@{fa-css-prefix}-share:before { content: @fa-var-share; } +.@{fa-css-prefix}-expand:before { content: @fa-var-expand; } +.@{fa-css-prefix}-compress:before { content: @fa-var-compress; } +.@{fa-css-prefix}-plus:before { content: @fa-var-plus; } +.@{fa-css-prefix}-minus:before { content: @fa-var-minus; } +.@{fa-css-prefix}-asterisk:before { content: @fa-var-asterisk; } +.@{fa-css-prefix}-exclamation-circle:before { content: @fa-var-exclamation-circle; } +.@{fa-css-prefix}-gift:before { content: @fa-var-gift; } +.@{fa-css-prefix}-leaf:before { content: @fa-var-leaf; } +.@{fa-css-prefix}-fire:before { content: @fa-var-fire; } +.@{fa-css-prefix}-eye:before { content: @fa-var-eye; } +.@{fa-css-prefix}-eye-slash:before { content: @fa-var-eye-slash; } +.@{fa-css-prefix}-warning:before, +.@{fa-css-prefix}-exclamation-triangle:before { content: @fa-var-exclamation-triangle; } +.@{fa-css-prefix}-plane:before { content: @fa-var-plane; } +.@{fa-css-prefix}-calendar:before { content: @fa-var-calendar; } +.@{fa-css-prefix}-random:before { content: @fa-var-random; } +.@{fa-css-prefix}-comment:before { content: @fa-var-comment; } +.@{fa-css-prefix}-magnet:before { content: @fa-var-magnet; } +.@{fa-css-prefix}-chevron-up:before { content: @fa-var-chevron-up; } +.@{fa-css-prefix}-chevron-down:before { content: @fa-var-chevron-down; } +.@{fa-css-prefix}-retweet:before { content: @fa-var-retweet; } +.@{fa-css-prefix}-shopping-cart:before { content: @fa-var-shopping-cart; } +.@{fa-css-prefix}-folder:before { content: @fa-var-folder; } +.@{fa-css-prefix}-folder-open:before { content: @fa-var-folder-open; } +.@{fa-css-prefix}-arrows-v:before { content: @fa-var-arrows-v; } +.@{fa-css-prefix}-arrows-h:before { content: @fa-var-arrows-h; } +.@{fa-css-prefix}-bar-chart-o:before, +.@{fa-css-prefix}-bar-chart:before { content: @fa-var-bar-chart; } +.@{fa-css-prefix}-twitter-square:before { content: @fa-var-twitter-square; } +.@{fa-css-prefix}-facebook-square:before { content: @fa-var-facebook-square; } +.@{fa-css-prefix}-camera-retro:before { content: @fa-var-camera-retro; } +.@{fa-css-prefix}-key:before { content: @fa-var-key; } +.@{fa-css-prefix}-gears:before, +.@{fa-css-prefix}-cogs:before { content: @fa-var-cogs; } +.@{fa-css-prefix}-comments:before { content: @fa-var-comments; } +.@{fa-css-prefix}-thumbs-o-up:before { content: @fa-var-thumbs-o-up; } +.@{fa-css-prefix}-thumbs-o-down:before { content: @fa-var-thumbs-o-down; } +.@{fa-css-prefix}-star-half:before { content: @fa-var-star-half; } +.@{fa-css-prefix}-heart-o:before { content: @fa-var-heart-o; } +.@{fa-css-prefix}-sign-out:before { content: @fa-var-sign-out; } +.@{fa-css-prefix}-linkedin-square:before { content: @fa-var-linkedin-square; } +.@{fa-css-prefix}-thumb-tack:before { content: @fa-var-thumb-tack; } +.@{fa-css-prefix}-external-link:before { content: @fa-var-external-link; } +.@{fa-css-prefix}-sign-in:before { content: @fa-var-sign-in; } +.@{fa-css-prefix}-trophy:before { content: @fa-var-trophy; } +.@{fa-css-prefix}-github-square:before { content: @fa-var-github-square; } +.@{fa-css-prefix}-upload:before { content: @fa-var-upload; } +.@{fa-css-prefix}-lemon-o:before { content: @fa-var-lemon-o; } +.@{fa-css-prefix}-phone:before { content: @fa-var-phone; } +.@{fa-css-prefix}-square-o:before { content: @fa-var-square-o; } +.@{fa-css-prefix}-bookmark-o:before { content: @fa-var-bookmark-o; } +.@{fa-css-prefix}-phone-square:before { content: @fa-var-phone-square; } +.@{fa-css-prefix}-twitter:before { content: @fa-var-twitter; } +.@{fa-css-prefix}-facebook:before { content: @fa-var-facebook; } +.@{fa-css-prefix}-github:before { content: @fa-var-github; } +.@{fa-css-prefix}-unlock:before { content: @fa-var-unlock; } +.@{fa-css-prefix}-credit-card:before { content: @fa-var-credit-card; } +.@{fa-css-prefix}-rss:before { content: @fa-var-rss; } +.@{fa-css-prefix}-hdd-o:before { content: @fa-var-hdd-o; } +.@{fa-css-prefix}-bullhorn:before { content: @fa-var-bullhorn; } +.@{fa-css-prefix}-bell:before { content: @fa-var-bell; } +.@{fa-css-prefix}-certificate:before { content: @fa-var-certificate; } +.@{fa-css-prefix}-hand-o-right:before { content: @fa-var-hand-o-right; } +.@{fa-css-prefix}-hand-o-left:before { content: @fa-var-hand-o-left; } +.@{fa-css-prefix}-hand-o-up:before { content: @fa-var-hand-o-up; } +.@{fa-css-prefix}-hand-o-down:before { content: @fa-var-hand-o-down; } +.@{fa-css-prefix}-arrow-circle-left:before { content: @fa-var-arrow-circle-left; } +.@{fa-css-prefix}-arrow-circle-right:before { content: @fa-var-arrow-circle-right; } +.@{fa-css-prefix}-arrow-circle-up:before { content: @fa-var-arrow-circle-up; } +.@{fa-css-prefix}-arrow-circle-down:before { content: @fa-var-arrow-circle-down; } +.@{fa-css-prefix}-globe:before { content: @fa-var-globe; } +.@{fa-css-prefix}-wrench:before { content: @fa-var-wrench; } +.@{fa-css-prefix}-tasks:before { content: @fa-var-tasks; } +.@{fa-css-prefix}-filter:before { content: @fa-var-filter; } +.@{fa-css-prefix}-briefcase:before { content: @fa-var-briefcase; } +.@{fa-css-prefix}-arrows-alt:before { content: @fa-var-arrows-alt; } +.@{fa-css-prefix}-group:before, +.@{fa-css-prefix}-users:before { content: @fa-var-users; } +.@{fa-css-prefix}-chain:before, +.@{fa-css-prefix}-link:before { content: @fa-var-link; } +.@{fa-css-prefix}-cloud:before { content: @fa-var-cloud; } +.@{fa-css-prefix}-flask:before { content: @fa-var-flask; } +.@{fa-css-prefix}-cut:before, +.@{fa-css-prefix}-scissors:before { content: @fa-var-scissors; } +.@{fa-css-prefix}-copy:before, +.@{fa-css-prefix}-files-o:before { content: @fa-var-files-o; } +.@{fa-css-prefix}-paperclip:before { content: @fa-var-paperclip; } +.@{fa-css-prefix}-save:before, +.@{fa-css-prefix}-floppy-o:before { content: @fa-var-floppy-o; } +.@{fa-css-prefix}-square:before { content: @fa-var-square; } +.@{fa-css-prefix}-navicon:before, +.@{fa-css-prefix}-reorder:before, +.@{fa-css-prefix}-bars:before { content: @fa-var-bars; } +.@{fa-css-prefix}-list-ul:before { content: @fa-var-list-ul; } +.@{fa-css-prefix}-list-ol:before { content: @fa-var-list-ol; } +.@{fa-css-prefix}-strikethrough:before { content: @fa-var-strikethrough; } +.@{fa-css-prefix}-underline:before { content: @fa-var-underline; } +.@{fa-css-prefix}-table:before { content: @fa-var-table; } +.@{fa-css-prefix}-magic:before { content: @fa-var-magic; } +.@{fa-css-prefix}-truck:before { content: @fa-var-truck; } +.@{fa-css-prefix}-pinterest:before { content: @fa-var-pinterest; } +.@{fa-css-prefix}-pinterest-square:before { content: @fa-var-pinterest-square; } +.@{fa-css-prefix}-google-plus-square:before { content: @fa-var-google-plus-square; } +.@{fa-css-prefix}-google-plus:before { content: @fa-var-google-plus; } +.@{fa-css-prefix}-money:before { content: @fa-var-money; } +.@{fa-css-prefix}-caret-down:before { content: @fa-var-caret-down; } +.@{fa-css-prefix}-caret-up:before { content: @fa-var-caret-up; } +.@{fa-css-prefix}-caret-left:before { content: @fa-var-caret-left; } +.@{fa-css-prefix}-caret-right:before { content: @fa-var-caret-right; } +.@{fa-css-prefix}-columns:before { content: @fa-var-columns; } +.@{fa-css-prefix}-unsorted:before, +.@{fa-css-prefix}-sort:before { content: @fa-var-sort; } +.@{fa-css-prefix}-sort-down:before, +.@{fa-css-prefix}-sort-desc:before { content: @fa-var-sort-desc; } +.@{fa-css-prefix}-sort-up:before, +.@{fa-css-prefix}-sort-asc:before { content: @fa-var-sort-asc; } +.@{fa-css-prefix}-envelope:before { content: @fa-var-envelope; } +.@{fa-css-prefix}-linkedin:before { content: @fa-var-linkedin; } +.@{fa-css-prefix}-rotate-left:before, +.@{fa-css-prefix}-undo:before { content: @fa-var-undo; } +.@{fa-css-prefix}-legal:before, +.@{fa-css-prefix}-gavel:before { content: @fa-var-gavel; } +.@{fa-css-prefix}-dashboard:before, +.@{fa-css-prefix}-tachometer:before { content: @fa-var-tachometer; } +.@{fa-css-prefix}-comment-o:before { content: @fa-var-comment-o; } +.@{fa-css-prefix}-comments-o:before { content: @fa-var-comments-o; } +.@{fa-css-prefix}-flash:before, +.@{fa-css-prefix}-bolt:before { content: @fa-var-bolt; } +.@{fa-css-prefix}-sitemap:before { content: @fa-var-sitemap; } +.@{fa-css-prefix}-umbrella:before { content: @fa-var-umbrella; } +.@{fa-css-prefix}-paste:before, +.@{fa-css-prefix}-clipboard:before { content: @fa-var-clipboard; } +.@{fa-css-prefix}-lightbulb-o:before { content: @fa-var-lightbulb-o; } +.@{fa-css-prefix}-exchange:before { content: @fa-var-exchange; } +.@{fa-css-prefix}-cloud-download:before { content: @fa-var-cloud-download; } +.@{fa-css-prefix}-cloud-upload:before { content: @fa-var-cloud-upload; } +.@{fa-css-prefix}-user-md:before { content: @fa-var-user-md; } +.@{fa-css-prefix}-stethoscope:before { content: @fa-var-stethoscope; } +.@{fa-css-prefix}-suitcase:before { content: @fa-var-suitcase; } +.@{fa-css-prefix}-bell-o:before { content: @fa-var-bell-o; } +.@{fa-css-prefix}-coffee:before { content: @fa-var-coffee; } +.@{fa-css-prefix}-cutlery:before { content: @fa-var-cutlery; } +.@{fa-css-prefix}-file-text-o:before { content: @fa-var-file-text-o; } +.@{fa-css-prefix}-building-o:before { content: @fa-var-building-o; } +.@{fa-css-prefix}-hospital-o:before { content: @fa-var-hospital-o; } +.@{fa-css-prefix}-ambulance:before { content: @fa-var-ambulance; } +.@{fa-css-prefix}-medkit:before { content: @fa-var-medkit; } +.@{fa-css-prefix}-fighter-jet:before { content: @fa-var-fighter-jet; } +.@{fa-css-prefix}-beer:before { content: @fa-var-beer; } +.@{fa-css-prefix}-h-square:before { content: @fa-var-h-square; } +.@{fa-css-prefix}-plus-square:before { content: @fa-var-plus-square; } +.@{fa-css-prefix}-angle-double-left:before { content: @fa-var-angle-double-left; } +.@{fa-css-prefix}-angle-double-right:before { content: @fa-var-angle-double-right; } +.@{fa-css-prefix}-angle-double-up:before { content: @fa-var-angle-double-up; } +.@{fa-css-prefix}-angle-double-down:before { content: @fa-var-angle-double-down; } +.@{fa-css-prefix}-angle-left:before { content: @fa-var-angle-left; } +.@{fa-css-prefix}-angle-right:before { content: @fa-var-angle-right; } +.@{fa-css-prefix}-angle-up:before { content: @fa-var-angle-up; } +.@{fa-css-prefix}-angle-down:before { content: @fa-var-angle-down; } +.@{fa-css-prefix}-desktop:before { content: @fa-var-desktop; } +.@{fa-css-prefix}-laptop:before { content: @fa-var-laptop; } +.@{fa-css-prefix}-tablet:before { content: @fa-var-tablet; } +.@{fa-css-prefix}-mobile-phone:before, +.@{fa-css-prefix}-mobile:before { content: @fa-var-mobile; } +.@{fa-css-prefix}-circle-o:before { content: @fa-var-circle-o; } +.@{fa-css-prefix}-quote-left:before { content: @fa-var-quote-left; } +.@{fa-css-prefix}-quote-right:before { content: @fa-var-quote-right; } +.@{fa-css-prefix}-spinner:before { content: @fa-var-spinner; } +.@{fa-css-prefix}-circle:before { content: @fa-var-circle; } +.@{fa-css-prefix}-mail-reply:before, +.@{fa-css-prefix}-reply:before { content: @fa-var-reply; } +.@{fa-css-prefix}-github-alt:before { content: @fa-var-github-alt; } +.@{fa-css-prefix}-folder-o:before { content: @fa-var-folder-o; } +.@{fa-css-prefix}-folder-open-o:before { content: @fa-var-folder-open-o; } +.@{fa-css-prefix}-smile-o:before { content: @fa-var-smile-o; } +.@{fa-css-prefix}-frown-o:before { content: @fa-var-frown-o; } +.@{fa-css-prefix}-meh-o:before { content: @fa-var-meh-o; } +.@{fa-css-prefix}-gamepad:before { content: @fa-var-gamepad; } +.@{fa-css-prefix}-keyboard-o:before { content: @fa-var-keyboard-o; } +.@{fa-css-prefix}-flag-o:before { content: @fa-var-flag-o; } +.@{fa-css-prefix}-flag-checkered:before { content: @fa-var-flag-checkered; } +.@{fa-css-prefix}-terminal:before { content: @fa-var-terminal; } +.@{fa-css-prefix}-code:before { content: @fa-var-code; } +.@{fa-css-prefix}-mail-reply-all:before, +.@{fa-css-prefix}-reply-all:before { content: @fa-var-reply-all; } +.@{fa-css-prefix}-star-half-empty:before, +.@{fa-css-prefix}-star-half-full:before, +.@{fa-css-prefix}-star-half-o:before { content: @fa-var-star-half-o; } +.@{fa-css-prefix}-location-arrow:before { content: @fa-var-location-arrow; } +.@{fa-css-prefix}-crop:before { content: @fa-var-crop; } +.@{fa-css-prefix}-code-fork:before { content: @fa-var-code-fork; } +.@{fa-css-prefix}-unlink:before, +.@{fa-css-prefix}-chain-broken:before { content: @fa-var-chain-broken; } +.@{fa-css-prefix}-question:before { content: @fa-var-question; } +.@{fa-css-prefix}-info:before { content: @fa-var-info; } +.@{fa-css-prefix}-exclamation:before { content: @fa-var-exclamation; } +.@{fa-css-prefix}-superscript:before { content: @fa-var-superscript; } +.@{fa-css-prefix}-subscript:before { content: @fa-var-subscript; } +.@{fa-css-prefix}-eraser:before { content: @fa-var-eraser; } +.@{fa-css-prefix}-puzzle-piece:before { content: @fa-var-puzzle-piece; } +.@{fa-css-prefix}-microphone:before { content: @fa-var-microphone; } +.@{fa-css-prefix}-microphone-slash:before { content: @fa-var-microphone-slash; } +.@{fa-css-prefix}-shield:before { content: @fa-var-shield; } +.@{fa-css-prefix}-calendar-o:before { content: @fa-var-calendar-o; } +.@{fa-css-prefix}-fire-extinguisher:before { content: @fa-var-fire-extinguisher; } +.@{fa-css-prefix}-rocket:before { content: @fa-var-rocket; } +.@{fa-css-prefix}-maxcdn:before { content: @fa-var-maxcdn; } +.@{fa-css-prefix}-chevron-circle-left:before { content: @fa-var-chevron-circle-left; } +.@{fa-css-prefix}-chevron-circle-right:before { content: @fa-var-chevron-circle-right; } +.@{fa-css-prefix}-chevron-circle-up:before { content: @fa-var-chevron-circle-up; } +.@{fa-css-prefix}-chevron-circle-down:before { content: @fa-var-chevron-circle-down; } +.@{fa-css-prefix}-html5:before { content: @fa-var-html5; } +.@{fa-css-prefix}-css3:before { content: @fa-var-css3; } +.@{fa-css-prefix}-anchor:before { content: @fa-var-anchor; } +.@{fa-css-prefix}-unlock-alt:before { content: @fa-var-unlock-alt; } +.@{fa-css-prefix}-bullseye:before { content: @fa-var-bullseye; } +.@{fa-css-prefix}-ellipsis-h:before { content: @fa-var-ellipsis-h; } +.@{fa-css-prefix}-ellipsis-v:before { content: @fa-var-ellipsis-v; } +.@{fa-css-prefix}-rss-square:before { content: @fa-var-rss-square; } +.@{fa-css-prefix}-play-circle:before { content: @fa-var-play-circle; } +.@{fa-css-prefix}-ticket:before { content: @fa-var-ticket; } +.@{fa-css-prefix}-minus-square:before { content: @fa-var-minus-square; } +.@{fa-css-prefix}-minus-square-o:before { content: @fa-var-minus-square-o; } +.@{fa-css-prefix}-level-up:before { content: @fa-var-level-up; } +.@{fa-css-prefix}-level-down:before { content: @fa-var-level-down; } +.@{fa-css-prefix}-check-square:before { content: @fa-var-check-square; } +.@{fa-css-prefix}-pencil-square:before { content: @fa-var-pencil-square; } +.@{fa-css-prefix}-external-link-square:before { content: @fa-var-external-link-square; } +.@{fa-css-prefix}-share-square:before { content: @fa-var-share-square; } +.@{fa-css-prefix}-compass:before { content: @fa-var-compass; } +.@{fa-css-prefix}-toggle-down:before, +.@{fa-css-prefix}-caret-square-o-down:before { content: @fa-var-caret-square-o-down; } +.@{fa-css-prefix}-toggle-up:before, +.@{fa-css-prefix}-caret-square-o-up:before { content: @fa-var-caret-square-o-up; } +.@{fa-css-prefix}-toggle-right:before, +.@{fa-css-prefix}-caret-square-o-right:before { content: @fa-var-caret-square-o-right; } +.@{fa-css-prefix}-euro:before, +.@{fa-css-prefix}-eur:before { content: @fa-var-eur; } +.@{fa-css-prefix}-gbp:before { content: @fa-var-gbp; } +.@{fa-css-prefix}-dollar:before, +.@{fa-css-prefix}-usd:before { content: @fa-var-usd; } +.@{fa-css-prefix}-rupee:before, +.@{fa-css-prefix}-inr:before { content: @fa-var-inr; } +.@{fa-css-prefix}-cny:before, +.@{fa-css-prefix}-rmb:before, +.@{fa-css-prefix}-yen:before, +.@{fa-css-prefix}-jpy:before { content: @fa-var-jpy; } +.@{fa-css-prefix}-ruble:before, +.@{fa-css-prefix}-rouble:before, +.@{fa-css-prefix}-rub:before { content: @fa-var-rub; } +.@{fa-css-prefix}-won:before, +.@{fa-css-prefix}-krw:before { content: @fa-var-krw; } +.@{fa-css-prefix}-bitcoin:before, +.@{fa-css-prefix}-btc:before { content: @fa-var-btc; } +.@{fa-css-prefix}-file:before { content: @fa-var-file; } +.@{fa-css-prefix}-file-text:before { content: @fa-var-file-text; } +.@{fa-css-prefix}-sort-alpha-asc:before { content: @fa-var-sort-alpha-asc; } +.@{fa-css-prefix}-sort-alpha-desc:before { content: @fa-var-sort-alpha-desc; } +.@{fa-css-prefix}-sort-amount-asc:before { content: @fa-var-sort-amount-asc; } +.@{fa-css-prefix}-sort-amount-desc:before { content: @fa-var-sort-amount-desc; } +.@{fa-css-prefix}-sort-numeric-asc:before { content: @fa-var-sort-numeric-asc; } +.@{fa-css-prefix}-sort-numeric-desc:before { content: @fa-var-sort-numeric-desc; } +.@{fa-css-prefix}-thumbs-up:before { content: @fa-var-thumbs-up; } +.@{fa-css-prefix}-thumbs-down:before { content: @fa-var-thumbs-down; } +.@{fa-css-prefix}-youtube-square:before { content: @fa-var-youtube-square; } +.@{fa-css-prefix}-youtube:before { content: @fa-var-youtube; } +.@{fa-css-prefix}-xing:before { content: @fa-var-xing; } +.@{fa-css-prefix}-xing-square:before { content: @fa-var-xing-square; } +.@{fa-css-prefix}-youtube-play:before { content: @fa-var-youtube-play; } +.@{fa-css-prefix}-dropbox:before { content: @fa-var-dropbox; } +.@{fa-css-prefix}-stack-overflow:before { content: @fa-var-stack-overflow; } +.@{fa-css-prefix}-instagram:before { content: @fa-var-instagram; } +.@{fa-css-prefix}-flickr:before { content: @fa-var-flickr; } +.@{fa-css-prefix}-adn:before { content: @fa-var-adn; } +.@{fa-css-prefix}-bitbucket:before { content: @fa-var-bitbucket; } +.@{fa-css-prefix}-bitbucket-square:before { content: @fa-var-bitbucket-square; } +.@{fa-css-prefix}-tumblr:before { content: @fa-var-tumblr; } +.@{fa-css-prefix}-tumblr-square:before { content: @fa-var-tumblr-square; } +.@{fa-css-prefix}-long-arrow-down:before { content: @fa-var-long-arrow-down; } +.@{fa-css-prefix}-long-arrow-up:before { content: @fa-var-long-arrow-up; } +.@{fa-css-prefix}-long-arrow-left:before { content: @fa-var-long-arrow-left; } +.@{fa-css-prefix}-long-arrow-right:before { content: @fa-var-long-arrow-right; } +.@{fa-css-prefix}-apple:before { content: @fa-var-apple; } +.@{fa-css-prefix}-windows:before { content: @fa-var-windows; } +.@{fa-css-prefix}-android:before { content: @fa-var-android; } +.@{fa-css-prefix}-linux:before { content: @fa-var-linux; } +.@{fa-css-prefix}-dribbble:before { content: @fa-var-dribbble; } +.@{fa-css-prefix}-skype:before { content: @fa-var-skype; } +.@{fa-css-prefix}-foursquare:before { content: @fa-var-foursquare; } +.@{fa-css-prefix}-trello:before { content: @fa-var-trello; } +.@{fa-css-prefix}-female:before { content: @fa-var-female; } +.@{fa-css-prefix}-male:before { content: @fa-var-male; } +.@{fa-css-prefix}-gittip:before { content: @fa-var-gittip; } +.@{fa-css-prefix}-sun-o:before { content: @fa-var-sun-o; } +.@{fa-css-prefix}-moon-o:before { content: @fa-var-moon-o; } +.@{fa-css-prefix}-archive:before { content: @fa-var-archive; } +.@{fa-css-prefix}-bug:before { content: @fa-var-bug; } +.@{fa-css-prefix}-vk:before { content: @fa-var-vk; } +.@{fa-css-prefix}-weibo:before { content: @fa-var-weibo; } +.@{fa-css-prefix}-renren:before { content: @fa-var-renren; } +.@{fa-css-prefix}-pagelines:before { content: @fa-var-pagelines; } +.@{fa-css-prefix}-stack-exchange:before { content: @fa-var-stack-exchange; } +.@{fa-css-prefix}-arrow-circle-o-right:before { content: @fa-var-arrow-circle-o-right; } +.@{fa-css-prefix}-arrow-circle-o-left:before { content: @fa-var-arrow-circle-o-left; } +.@{fa-css-prefix}-toggle-left:before, +.@{fa-css-prefix}-caret-square-o-left:before { content: @fa-var-caret-square-o-left; } +.@{fa-css-prefix}-dot-circle-o:before { content: @fa-var-dot-circle-o; } +.@{fa-css-prefix}-wheelchair:before { content: @fa-var-wheelchair; } +.@{fa-css-prefix}-vimeo-square:before { content: @fa-var-vimeo-square; } +.@{fa-css-prefix}-turkish-lira:before, +.@{fa-css-prefix}-try:before { content: @fa-var-try; } +.@{fa-css-prefix}-plus-square-o:before { content: @fa-var-plus-square-o; } +.@{fa-css-prefix}-space-shuttle:before { content: @fa-var-space-shuttle; } +.@{fa-css-prefix}-slack:before { content: @fa-var-slack; } +.@{fa-css-prefix}-envelope-square:before { content: @fa-var-envelope-square; } +.@{fa-css-prefix}-wordpress:before { content: @fa-var-wordpress; } +.@{fa-css-prefix}-openid:before { content: @fa-var-openid; } +.@{fa-css-prefix}-institution:before, +.@{fa-css-prefix}-bank:before, +.@{fa-css-prefix}-university:before { content: @fa-var-university; } +.@{fa-css-prefix}-mortar-board:before, +.@{fa-css-prefix}-graduation-cap:before { content: @fa-var-graduation-cap; } +.@{fa-css-prefix}-yahoo:before { content: @fa-var-yahoo; } +.@{fa-css-prefix}-google:before { content: @fa-var-google; } +.@{fa-css-prefix}-reddit:before { content: @fa-var-reddit; } +.@{fa-css-prefix}-reddit-square:before { content: @fa-var-reddit-square; } +.@{fa-css-prefix}-stumbleupon-circle:before { content: @fa-var-stumbleupon-circle; } +.@{fa-css-prefix}-stumbleupon:before { content: @fa-var-stumbleupon; } +.@{fa-css-prefix}-delicious:before { content: @fa-var-delicious; } +.@{fa-css-prefix}-digg:before { content: @fa-var-digg; } +.@{fa-css-prefix}-pied-piper:before { content: @fa-var-pied-piper; } +.@{fa-css-prefix}-pied-piper-alt:before { content: @fa-var-pied-piper-alt; } +.@{fa-css-prefix}-drupal:before { content: @fa-var-drupal; } +.@{fa-css-prefix}-joomla:before { content: @fa-var-joomla; } +.@{fa-css-prefix}-language:before { content: @fa-var-language; } +.@{fa-css-prefix}-fax:before { content: @fa-var-fax; } +.@{fa-css-prefix}-building:before { content: @fa-var-building; } +.@{fa-css-prefix}-child:before { content: @fa-var-child; } +.@{fa-css-prefix}-paw:before { content: @fa-var-paw; } +.@{fa-css-prefix}-spoon:before { content: @fa-var-spoon; } +.@{fa-css-prefix}-cube:before { content: @fa-var-cube; } +.@{fa-css-prefix}-cubes:before { content: @fa-var-cubes; } +.@{fa-css-prefix}-behance:before { content: @fa-var-behance; } +.@{fa-css-prefix}-behance-square:before { content: @fa-var-behance-square; } +.@{fa-css-prefix}-steam:before { content: @fa-var-steam; } +.@{fa-css-prefix}-steam-square:before { content: @fa-var-steam-square; } +.@{fa-css-prefix}-recycle:before { content: @fa-var-recycle; } +.@{fa-css-prefix}-automobile:before, +.@{fa-css-prefix}-car:before { content: @fa-var-car; } +.@{fa-css-prefix}-cab:before, +.@{fa-css-prefix}-taxi:before { content: @fa-var-taxi; } +.@{fa-css-prefix}-tree:before { content: @fa-var-tree; } +.@{fa-css-prefix}-spotify:before { content: @fa-var-spotify; } +.@{fa-css-prefix}-deviantart:before { content: @fa-var-deviantart; } +.@{fa-css-prefix}-soundcloud:before { content: @fa-var-soundcloud; } +.@{fa-css-prefix}-database:before { content: @fa-var-database; } +.@{fa-css-prefix}-file-pdf-o:before { content: @fa-var-file-pdf-o; } +.@{fa-css-prefix}-file-word-o:before { content: @fa-var-file-word-o; } +.@{fa-css-prefix}-file-excel-o:before { content: @fa-var-file-excel-o; } +.@{fa-css-prefix}-file-powerpoint-o:before { content: @fa-var-file-powerpoint-o; } +.@{fa-css-prefix}-file-photo-o:before, +.@{fa-css-prefix}-file-picture-o:before, +.@{fa-css-prefix}-file-image-o:before { content: @fa-var-file-image-o; } +.@{fa-css-prefix}-file-zip-o:before, +.@{fa-css-prefix}-file-archive-o:before { content: @fa-var-file-archive-o; } +.@{fa-css-prefix}-file-sound-o:before, +.@{fa-css-prefix}-file-audio-o:before { content: @fa-var-file-audio-o; } +.@{fa-css-prefix}-file-movie-o:before, +.@{fa-css-prefix}-file-video-o:before { content: @fa-var-file-video-o; } +.@{fa-css-prefix}-file-code-o:before { content: @fa-var-file-code-o; } +.@{fa-css-prefix}-vine:before { content: @fa-var-vine; } +.@{fa-css-prefix}-codepen:before { content: @fa-var-codepen; } +.@{fa-css-prefix}-jsfiddle:before { content: @fa-var-jsfiddle; } +.@{fa-css-prefix}-life-bouy:before, +.@{fa-css-prefix}-life-buoy:before, +.@{fa-css-prefix}-life-saver:before, +.@{fa-css-prefix}-support:before, +.@{fa-css-prefix}-life-ring:before { content: @fa-var-life-ring; } +.@{fa-css-prefix}-circle-o-notch:before { content: @fa-var-circle-o-notch; } +.@{fa-css-prefix}-ra:before, +.@{fa-css-prefix}-rebel:before { content: @fa-var-rebel; } +.@{fa-css-prefix}-ge:before, +.@{fa-css-prefix}-empire:before { content: @fa-var-empire; } +.@{fa-css-prefix}-git-square:before { content: @fa-var-git-square; } +.@{fa-css-prefix}-git:before { content: @fa-var-git; } +.@{fa-css-prefix}-hacker-news:before { content: @fa-var-hacker-news; } +.@{fa-css-prefix}-tencent-weibo:before { content: @fa-var-tencent-weibo; } +.@{fa-css-prefix}-qq:before { content: @fa-var-qq; } +.@{fa-css-prefix}-wechat:before, +.@{fa-css-prefix}-weixin:before { content: @fa-var-weixin; } +.@{fa-css-prefix}-send:before, +.@{fa-css-prefix}-paper-plane:before { content: @fa-var-paper-plane; } +.@{fa-css-prefix}-send-o:before, +.@{fa-css-prefix}-paper-plane-o:before { content: @fa-var-paper-plane-o; } +.@{fa-css-prefix}-history:before { content: @fa-var-history; } +.@{fa-css-prefix}-circle-thin:before { content: @fa-var-circle-thin; } +.@{fa-css-prefix}-header:before { content: @fa-var-header; } +.@{fa-css-prefix}-paragraph:before { content: @fa-var-paragraph; } +.@{fa-css-prefix}-sliders:before { content: @fa-var-sliders; } +.@{fa-css-prefix}-share-alt:before { content: @fa-var-share-alt; } +.@{fa-css-prefix}-share-alt-square:before { content: @fa-var-share-alt-square; } +.@{fa-css-prefix}-bomb:before { content: @fa-var-bomb; } +.@{fa-css-prefix}-soccer-ball-o:before, +.@{fa-css-prefix}-futbol-o:before { content: @fa-var-futbol-o; } +.@{fa-css-prefix}-tty:before { content: @fa-var-tty; } +.@{fa-css-prefix}-binoculars:before { content: @fa-var-binoculars; } +.@{fa-css-prefix}-plug:before { content: @fa-var-plug; } +.@{fa-css-prefix}-slideshare:before { content: @fa-var-slideshare; } +.@{fa-css-prefix}-twitch:before { content: @fa-var-twitch; } +.@{fa-css-prefix}-yelp:before { content: @fa-var-yelp; } +.@{fa-css-prefix}-newspaper-o:before { content: @fa-var-newspaper-o; } +.@{fa-css-prefix}-wifi:before { content: @fa-var-wifi; } +.@{fa-css-prefix}-calculator:before { content: @fa-var-calculator; } +.@{fa-css-prefix}-paypal:before { content: @fa-var-paypal; } +.@{fa-css-prefix}-google-wallet:before { content: @fa-var-google-wallet; } +.@{fa-css-prefix}-cc-visa:before { content: @fa-var-cc-visa; } +.@{fa-css-prefix}-cc-mastercard:before { content: @fa-var-cc-mastercard; } +.@{fa-css-prefix}-cc-discover:before { content: @fa-var-cc-discover; } +.@{fa-css-prefix}-cc-amex:before { content: @fa-var-cc-amex; } +.@{fa-css-prefix}-cc-paypal:before { content: @fa-var-cc-paypal; } +.@{fa-css-prefix}-cc-stripe:before { content: @fa-var-cc-stripe; } +.@{fa-css-prefix}-bell-slash:before { content: @fa-var-bell-slash; } +.@{fa-css-prefix}-bell-slash-o:before { content: @fa-var-bell-slash-o; } +.@{fa-css-prefix}-trash:before { content: @fa-var-trash; } +.@{fa-css-prefix}-copyright:before { content: @fa-var-copyright; } +.@{fa-css-prefix}-at:before { content: @fa-var-at; } +.@{fa-css-prefix}-eyedropper:before { content: @fa-var-eyedropper; } +.@{fa-css-prefix}-paint-brush:before { content: @fa-var-paint-brush; } +.@{fa-css-prefix}-birthday-cake:before { content: @fa-var-birthday-cake; } +.@{fa-css-prefix}-area-chart:before { content: @fa-var-area-chart; } +.@{fa-css-prefix}-pie-chart:before { content: @fa-var-pie-chart; } +.@{fa-css-prefix}-line-chart:before { content: @fa-var-line-chart; } +.@{fa-css-prefix}-lastfm:before { content: @fa-var-lastfm; } +.@{fa-css-prefix}-lastfm-square:before { content: @fa-var-lastfm-square; } +.@{fa-css-prefix}-toggle-off:before { content: @fa-var-toggle-off; } +.@{fa-css-prefix}-toggle-on:before { content: @fa-var-toggle-on; } +.@{fa-css-prefix}-bicycle:before { content: @fa-var-bicycle; } +.@{fa-css-prefix}-bus:before { content: @fa-var-bus; } +.@{fa-css-prefix}-ioxhost:before { content: @fa-var-ioxhost; } +.@{fa-css-prefix}-angellist:before { content: @fa-var-angellist; } +.@{fa-css-prefix}-cc:before { content: @fa-var-cc; } +.@{fa-css-prefix}-shekel:before, +.@{fa-css-prefix}-sheqel:before, +.@{fa-css-prefix}-ils:before { content: @fa-var-ils; } +.@{fa-css-prefix}-meanpath:before { content: @fa-var-meanpath; } diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/less/larger.less b/osrframework/static/css/fonts/font-awesome-4.2.0/less/larger.less new file mode 100644 index 0000000..c9d6467 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/less/larger.less @@ -0,0 +1,13 @@ +// Icon Sizes +// ------------------------- + +/* makes the font 33% larger relative to the icon container */ +.@{fa-css-prefix}-lg { + font-size: (4em / 3); + line-height: (3em / 4); + vertical-align: -15%; +} +.@{fa-css-prefix}-2x { font-size: 2em; } +.@{fa-css-prefix}-3x { font-size: 3em; } +.@{fa-css-prefix}-4x { font-size: 4em; } +.@{fa-css-prefix}-5x { font-size: 5em; } diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/less/list.less b/osrframework/static/css/fonts/font-awesome-4.2.0/less/list.less new file mode 100644 index 0000000..0b44038 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/less/list.less @@ -0,0 +1,19 @@ +// List Icons +// ------------------------- + +.@{fa-css-prefix}-ul { + padding-left: 0; + margin-left: @fa-li-width; + list-style-type: none; + > li { position: relative; } +} +.@{fa-css-prefix}-li { + position: absolute; + left: -@fa-li-width; + width: @fa-li-width; + top: (2em / 14); + text-align: center; + &.@{fa-css-prefix}-lg { + left: (-@fa-li-width + (4em / 14)); + } +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/less/mixins.less b/osrframework/static/css/fonts/font-awesome-4.2.0/less/mixins.less new file mode 100644 index 0000000..b7bfadc --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/less/mixins.less @@ -0,0 +1,25 @@ +// Mixins +// -------------------------- + +.fa-icon() { + display: inline-block; + font: normal normal normal 14px/1 FontAwesome; // shortening font declaration + font-size: inherit; // can't have font-size inherit on line above, so need to override + text-rendering: auto; // optimizelegibility throws things off #1094 + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.fa-icon-rotate(@degrees, @rotation) { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); + -webkit-transform: rotate(@degrees); + -ms-transform: rotate(@degrees); + transform: rotate(@degrees); +} + +.fa-icon-flip(@horiz, @vert, @rotation) { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); + -webkit-transform: scale(@horiz, @vert); + -ms-transform: scale(@horiz, @vert); + transform: scale(@horiz, @vert); +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/less/path.less b/osrframework/static/css/fonts/font-awesome-4.2.0/less/path.less new file mode 100644 index 0000000..c5a6912 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/less/path.less @@ -0,0 +1,14 @@ +/* FONT PATH + * -------------------------- */ + +@font-face { + font-family: 'FontAwesome'; + src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); + src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), + url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), + url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), + url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); +// src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts + font-weight: normal; + font-style: normal; +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/less/rotated-flipped.less b/osrframework/static/css/fonts/font-awesome-4.2.0/less/rotated-flipped.less new file mode 100644 index 0000000..f6ba814 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/less/rotated-flipped.less @@ -0,0 +1,20 @@ +// Rotated & Flipped Icons +// ------------------------- + +.@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } +.@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } +.@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } + +.@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } +.@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } + +// Hook for IE8-9 +// ------------------------- + +:root .@{fa-css-prefix}-rotate-90, +:root .@{fa-css-prefix}-rotate-180, +:root .@{fa-css-prefix}-rotate-270, +:root .@{fa-css-prefix}-flip-horizontal, +:root .@{fa-css-prefix}-flip-vertical { + filter: none; +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/less/spinning.less b/osrframework/static/css/fonts/font-awesome-4.2.0/less/spinning.less new file mode 100644 index 0000000..6e1564e --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/less/spinning.less @@ -0,0 +1,29 @@ +// Spinning Icons +// -------------------------- + +.@{fa-css-prefix}-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; +} + +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} + +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/less/stacked.less b/osrframework/static/css/fonts/font-awesome-4.2.0/less/stacked.less new file mode 100644 index 0000000..fc53fb0 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/less/stacked.less @@ -0,0 +1,20 @@ +// Stacked Icons +// ------------------------- + +.@{fa-css-prefix}-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; +} +.@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} +.@{fa-css-prefix}-stack-1x { line-height: inherit; } +.@{fa-css-prefix}-stack-2x { font-size: 2em; } +.@{fa-css-prefix}-inverse { color: @fa-inverse; } diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/less/variables.less b/osrframework/static/css/fonts/font-awesome-4.2.0/less/variables.less new file mode 100644 index 0000000..ccf939d --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/less/variables.less @@ -0,0 +1,561 @@ +// Variables +// -------------------------- + +@fa-font-path: "../fonts"; +//@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts"; // for referencing Bootstrap CDN font files directly +@fa-css-prefix: fa; +@fa-version: "4.2.0"; +@fa-border-color: #eee; +@fa-inverse: #fff; +@fa-li-width: (30em / 14); + +@fa-var-adjust: "\f042"; +@fa-var-adn: "\f170"; +@fa-var-align-center: "\f037"; +@fa-var-align-justify: "\f039"; +@fa-var-align-left: "\f036"; +@fa-var-align-right: "\f038"; +@fa-var-ambulance: "\f0f9"; +@fa-var-anchor: "\f13d"; +@fa-var-android: "\f17b"; +@fa-var-angellist: "\f209"; +@fa-var-angle-double-down: "\f103"; +@fa-var-angle-double-left: "\f100"; +@fa-var-angle-double-right: "\f101"; +@fa-var-angle-double-up: "\f102"; +@fa-var-angle-down: "\f107"; +@fa-var-angle-left: "\f104"; +@fa-var-angle-right: "\f105"; +@fa-var-angle-up: "\f106"; +@fa-var-apple: "\f179"; +@fa-var-archive: "\f187"; +@fa-var-area-chart: "\f1fe"; +@fa-var-arrow-circle-down: "\f0ab"; +@fa-var-arrow-circle-left: "\f0a8"; +@fa-var-arrow-circle-o-down: "\f01a"; +@fa-var-arrow-circle-o-left: "\f190"; +@fa-var-arrow-circle-o-right: "\f18e"; +@fa-var-arrow-circle-o-up: "\f01b"; +@fa-var-arrow-circle-right: "\f0a9"; +@fa-var-arrow-circle-up: "\f0aa"; +@fa-var-arrow-down: "\f063"; +@fa-var-arrow-left: "\f060"; +@fa-var-arrow-right: "\f061"; +@fa-var-arrow-up: "\f062"; +@fa-var-arrows: "\f047"; +@fa-var-arrows-alt: "\f0b2"; +@fa-var-arrows-h: "\f07e"; +@fa-var-arrows-v: "\f07d"; +@fa-var-asterisk: "\f069"; +@fa-var-at: "\f1fa"; +@fa-var-automobile: "\f1b9"; +@fa-var-backward: "\f04a"; +@fa-var-ban: "\f05e"; +@fa-var-bank: "\f19c"; +@fa-var-bar-chart: "\f080"; +@fa-var-bar-chart-o: "\f080"; +@fa-var-barcode: "\f02a"; +@fa-var-bars: "\f0c9"; +@fa-var-beer: "\f0fc"; +@fa-var-behance: "\f1b4"; +@fa-var-behance-square: "\f1b5"; +@fa-var-bell: "\f0f3"; +@fa-var-bell-o: "\f0a2"; +@fa-var-bell-slash: "\f1f6"; +@fa-var-bell-slash-o: "\f1f7"; +@fa-var-bicycle: "\f206"; +@fa-var-binoculars: "\f1e5"; +@fa-var-birthday-cake: "\f1fd"; +@fa-var-bitbucket: "\f171"; +@fa-var-bitbucket-square: "\f172"; +@fa-var-bitcoin: "\f15a"; +@fa-var-bold: "\f032"; +@fa-var-bolt: "\f0e7"; +@fa-var-bomb: "\f1e2"; +@fa-var-book: "\f02d"; +@fa-var-bookmark: "\f02e"; +@fa-var-bookmark-o: "\f097"; +@fa-var-briefcase: "\f0b1"; +@fa-var-btc: "\f15a"; +@fa-var-bug: "\f188"; +@fa-var-building: "\f1ad"; +@fa-var-building-o: "\f0f7"; +@fa-var-bullhorn: "\f0a1"; +@fa-var-bullseye: "\f140"; +@fa-var-bus: "\f207"; +@fa-var-cab: "\f1ba"; +@fa-var-calculator: "\f1ec"; +@fa-var-calendar: "\f073"; +@fa-var-calendar-o: "\f133"; +@fa-var-camera: "\f030"; +@fa-var-camera-retro: "\f083"; +@fa-var-car: "\f1b9"; +@fa-var-caret-down: "\f0d7"; +@fa-var-caret-left: "\f0d9"; +@fa-var-caret-right: "\f0da"; +@fa-var-caret-square-o-down: "\f150"; +@fa-var-caret-square-o-left: "\f191"; +@fa-var-caret-square-o-right: "\f152"; +@fa-var-caret-square-o-up: "\f151"; +@fa-var-caret-up: "\f0d8"; +@fa-var-cc: "\f20a"; +@fa-var-cc-amex: "\f1f3"; +@fa-var-cc-discover: "\f1f2"; +@fa-var-cc-mastercard: "\f1f1"; +@fa-var-cc-paypal: "\f1f4"; +@fa-var-cc-stripe: "\f1f5"; +@fa-var-cc-visa: "\f1f0"; +@fa-var-certificate: "\f0a3"; +@fa-var-chain: "\f0c1"; +@fa-var-chain-broken: "\f127"; +@fa-var-check: "\f00c"; +@fa-var-check-circle: "\f058"; +@fa-var-check-circle-o: "\f05d"; +@fa-var-check-square: "\f14a"; +@fa-var-check-square-o: "\f046"; +@fa-var-chevron-circle-down: "\f13a"; +@fa-var-chevron-circle-left: "\f137"; +@fa-var-chevron-circle-right: "\f138"; +@fa-var-chevron-circle-up: "\f139"; +@fa-var-chevron-down: "\f078"; +@fa-var-chevron-left: "\f053"; +@fa-var-chevron-right: "\f054"; +@fa-var-chevron-up: "\f077"; +@fa-var-child: "\f1ae"; +@fa-var-circle: "\f111"; +@fa-var-circle-o: "\f10c"; +@fa-var-circle-o-notch: "\f1ce"; +@fa-var-circle-thin: "\f1db"; +@fa-var-clipboard: "\f0ea"; +@fa-var-clock-o: "\f017"; +@fa-var-close: "\f00d"; +@fa-var-cloud: "\f0c2"; +@fa-var-cloud-download: "\f0ed"; +@fa-var-cloud-upload: "\f0ee"; +@fa-var-cny: "\f157"; +@fa-var-code: "\f121"; +@fa-var-code-fork: "\f126"; +@fa-var-codepen: "\f1cb"; +@fa-var-coffee: "\f0f4"; +@fa-var-cog: "\f013"; +@fa-var-cogs: "\f085"; +@fa-var-columns: "\f0db"; +@fa-var-comment: "\f075"; +@fa-var-comment-o: "\f0e5"; +@fa-var-comments: "\f086"; +@fa-var-comments-o: "\f0e6"; +@fa-var-compass: "\f14e"; +@fa-var-compress: "\f066"; +@fa-var-copy: "\f0c5"; +@fa-var-copyright: "\f1f9"; +@fa-var-credit-card: "\f09d"; +@fa-var-crop: "\f125"; +@fa-var-crosshairs: "\f05b"; +@fa-var-css3: "\f13c"; +@fa-var-cube: "\f1b2"; +@fa-var-cubes: "\f1b3"; +@fa-var-cut: "\f0c4"; +@fa-var-cutlery: "\f0f5"; +@fa-var-dashboard: "\f0e4"; +@fa-var-database: "\f1c0"; +@fa-var-dedent: "\f03b"; +@fa-var-delicious: "\f1a5"; +@fa-var-desktop: "\f108"; +@fa-var-deviantart: "\f1bd"; +@fa-var-digg: "\f1a6"; +@fa-var-dollar: "\f155"; +@fa-var-dot-circle-o: "\f192"; +@fa-var-download: "\f019"; +@fa-var-dribbble: "\f17d"; +@fa-var-dropbox: "\f16b"; +@fa-var-drupal: "\f1a9"; +@fa-var-edit: "\f044"; +@fa-var-eject: "\f052"; +@fa-var-ellipsis-h: "\f141"; +@fa-var-ellipsis-v: "\f142"; +@fa-var-empire: "\f1d1"; +@fa-var-envelope: "\f0e0"; +@fa-var-envelope-o: "\f003"; +@fa-var-envelope-square: "\f199"; +@fa-var-eraser: "\f12d"; +@fa-var-eur: "\f153"; +@fa-var-euro: "\f153"; +@fa-var-exchange: "\f0ec"; +@fa-var-exclamation: "\f12a"; +@fa-var-exclamation-circle: "\f06a"; +@fa-var-exclamation-triangle: "\f071"; +@fa-var-expand: "\f065"; +@fa-var-external-link: "\f08e"; +@fa-var-external-link-square: "\f14c"; +@fa-var-eye: "\f06e"; +@fa-var-eye-slash: "\f070"; +@fa-var-eyedropper: "\f1fb"; +@fa-var-facebook: "\f09a"; +@fa-var-facebook-square: "\f082"; +@fa-var-fast-backward: "\f049"; +@fa-var-fast-forward: "\f050"; +@fa-var-fax: "\f1ac"; +@fa-var-female: "\f182"; +@fa-var-fighter-jet: "\f0fb"; +@fa-var-file: "\f15b"; +@fa-var-file-archive-o: "\f1c6"; +@fa-var-file-audio-o: "\f1c7"; +@fa-var-file-code-o: "\f1c9"; +@fa-var-file-excel-o: "\f1c3"; +@fa-var-file-image-o: "\f1c5"; +@fa-var-file-movie-o: "\f1c8"; +@fa-var-file-o: "\f016"; +@fa-var-file-pdf-o: "\f1c1"; +@fa-var-file-photo-o: "\f1c5"; +@fa-var-file-picture-o: "\f1c5"; +@fa-var-file-powerpoint-o: "\f1c4"; +@fa-var-file-sound-o: "\f1c7"; +@fa-var-file-text: "\f15c"; +@fa-var-file-text-o: "\f0f6"; +@fa-var-file-video-o: "\f1c8"; +@fa-var-file-word-o: "\f1c2"; +@fa-var-file-zip-o: "\f1c6"; +@fa-var-files-o: "\f0c5"; +@fa-var-film: "\f008"; +@fa-var-filter: "\f0b0"; +@fa-var-fire: "\f06d"; +@fa-var-fire-extinguisher: "\f134"; +@fa-var-flag: "\f024"; +@fa-var-flag-checkered: "\f11e"; +@fa-var-flag-o: "\f11d"; +@fa-var-flash: "\f0e7"; +@fa-var-flask: "\f0c3"; +@fa-var-flickr: "\f16e"; +@fa-var-floppy-o: "\f0c7"; +@fa-var-folder: "\f07b"; +@fa-var-folder-o: "\f114"; +@fa-var-folder-open: "\f07c"; +@fa-var-folder-open-o: "\f115"; +@fa-var-font: "\f031"; +@fa-var-forward: "\f04e"; +@fa-var-foursquare: "\f180"; +@fa-var-frown-o: "\f119"; +@fa-var-futbol-o: "\f1e3"; +@fa-var-gamepad: "\f11b"; +@fa-var-gavel: "\f0e3"; +@fa-var-gbp: "\f154"; +@fa-var-ge: "\f1d1"; +@fa-var-gear: "\f013"; +@fa-var-gears: "\f085"; +@fa-var-gift: "\f06b"; +@fa-var-git: "\f1d3"; +@fa-var-git-square: "\f1d2"; +@fa-var-github: "\f09b"; +@fa-var-github-alt: "\f113"; +@fa-var-github-square: "\f092"; +@fa-var-gittip: "\f184"; +@fa-var-glass: "\f000"; +@fa-var-globe: "\f0ac"; +@fa-var-google: "\f1a0"; +@fa-var-google-plus: "\f0d5"; +@fa-var-google-plus-square: "\f0d4"; +@fa-var-google-wallet: "\f1ee"; +@fa-var-graduation-cap: "\f19d"; +@fa-var-group: "\f0c0"; +@fa-var-h-square: "\f0fd"; +@fa-var-hacker-news: "\f1d4"; +@fa-var-hand-o-down: "\f0a7"; +@fa-var-hand-o-left: "\f0a5"; +@fa-var-hand-o-right: "\f0a4"; +@fa-var-hand-o-up: "\f0a6"; +@fa-var-hdd-o: "\f0a0"; +@fa-var-header: "\f1dc"; +@fa-var-headphones: "\f025"; +@fa-var-heart: "\f004"; +@fa-var-heart-o: "\f08a"; +@fa-var-history: "\f1da"; +@fa-var-home: "\f015"; +@fa-var-hospital-o: "\f0f8"; +@fa-var-html5: "\f13b"; +@fa-var-ils: "\f20b"; +@fa-var-image: "\f03e"; +@fa-var-inbox: "\f01c"; +@fa-var-indent: "\f03c"; +@fa-var-info: "\f129"; +@fa-var-info-circle: "\f05a"; +@fa-var-inr: "\f156"; +@fa-var-instagram: "\f16d"; +@fa-var-institution: "\f19c"; +@fa-var-ioxhost: "\f208"; +@fa-var-italic: "\f033"; +@fa-var-joomla: "\f1aa"; +@fa-var-jpy: "\f157"; +@fa-var-jsfiddle: "\f1cc"; +@fa-var-key: "\f084"; +@fa-var-keyboard-o: "\f11c"; +@fa-var-krw: "\f159"; +@fa-var-language: "\f1ab"; +@fa-var-laptop: "\f109"; +@fa-var-lastfm: "\f202"; +@fa-var-lastfm-square: "\f203"; +@fa-var-leaf: "\f06c"; +@fa-var-legal: "\f0e3"; +@fa-var-lemon-o: "\f094"; +@fa-var-level-down: "\f149"; +@fa-var-level-up: "\f148"; +@fa-var-life-bouy: "\f1cd"; +@fa-var-life-buoy: "\f1cd"; +@fa-var-life-ring: "\f1cd"; +@fa-var-life-saver: "\f1cd"; +@fa-var-lightbulb-o: "\f0eb"; +@fa-var-line-chart: "\f201"; +@fa-var-link: "\f0c1"; +@fa-var-linkedin: "\f0e1"; +@fa-var-linkedin-square: "\f08c"; +@fa-var-linux: "\f17c"; +@fa-var-list: "\f03a"; +@fa-var-list-alt: "\f022"; +@fa-var-list-ol: "\f0cb"; +@fa-var-list-ul: "\f0ca"; +@fa-var-location-arrow: "\f124"; +@fa-var-lock: "\f023"; +@fa-var-long-arrow-down: "\f175"; +@fa-var-long-arrow-left: "\f177"; +@fa-var-long-arrow-right: "\f178"; +@fa-var-long-arrow-up: "\f176"; +@fa-var-magic: "\f0d0"; +@fa-var-magnet: "\f076"; +@fa-var-mail-forward: "\f064"; +@fa-var-mail-reply: "\f112"; +@fa-var-mail-reply-all: "\f122"; +@fa-var-male: "\f183"; +@fa-var-map-marker: "\f041"; +@fa-var-maxcdn: "\f136"; +@fa-var-meanpath: "\f20c"; +@fa-var-medkit: "\f0fa"; +@fa-var-meh-o: "\f11a"; +@fa-var-microphone: "\f130"; +@fa-var-microphone-slash: "\f131"; +@fa-var-minus: "\f068"; +@fa-var-minus-circle: "\f056"; +@fa-var-minus-square: "\f146"; +@fa-var-minus-square-o: "\f147"; +@fa-var-mobile: "\f10b"; +@fa-var-mobile-phone: "\f10b"; +@fa-var-money: "\f0d6"; +@fa-var-moon-o: "\f186"; +@fa-var-mortar-board: "\f19d"; +@fa-var-music: "\f001"; +@fa-var-navicon: "\f0c9"; +@fa-var-newspaper-o: "\f1ea"; +@fa-var-openid: "\f19b"; +@fa-var-outdent: "\f03b"; +@fa-var-pagelines: "\f18c"; +@fa-var-paint-brush: "\f1fc"; +@fa-var-paper-plane: "\f1d8"; +@fa-var-paper-plane-o: "\f1d9"; +@fa-var-paperclip: "\f0c6"; +@fa-var-paragraph: "\f1dd"; +@fa-var-paste: "\f0ea"; +@fa-var-pause: "\f04c"; +@fa-var-paw: "\f1b0"; +@fa-var-paypal: "\f1ed"; +@fa-var-pencil: "\f040"; +@fa-var-pencil-square: "\f14b"; +@fa-var-pencil-square-o: "\f044"; +@fa-var-phone: "\f095"; +@fa-var-phone-square: "\f098"; +@fa-var-photo: "\f03e"; +@fa-var-picture-o: "\f03e"; +@fa-var-pie-chart: "\f200"; +@fa-var-pied-piper: "\f1a7"; +@fa-var-pied-piper-alt: "\f1a8"; +@fa-var-pinterest: "\f0d2"; +@fa-var-pinterest-square: "\f0d3"; +@fa-var-plane: "\f072"; +@fa-var-play: "\f04b"; +@fa-var-play-circle: "\f144"; +@fa-var-play-circle-o: "\f01d"; +@fa-var-plug: "\f1e6"; +@fa-var-plus: "\f067"; +@fa-var-plus-circle: "\f055"; +@fa-var-plus-square: "\f0fe"; +@fa-var-plus-square-o: "\f196"; +@fa-var-power-off: "\f011"; +@fa-var-print: "\f02f"; +@fa-var-puzzle-piece: "\f12e"; +@fa-var-qq: "\f1d6"; +@fa-var-qrcode: "\f029"; +@fa-var-question: "\f128"; +@fa-var-question-circle: "\f059"; +@fa-var-quote-left: "\f10d"; +@fa-var-quote-right: "\f10e"; +@fa-var-ra: "\f1d0"; +@fa-var-random: "\f074"; +@fa-var-rebel: "\f1d0"; +@fa-var-recycle: "\f1b8"; +@fa-var-reddit: "\f1a1"; +@fa-var-reddit-square: "\f1a2"; +@fa-var-refresh: "\f021"; +@fa-var-remove: "\f00d"; +@fa-var-renren: "\f18b"; +@fa-var-reorder: "\f0c9"; +@fa-var-repeat: "\f01e"; +@fa-var-reply: "\f112"; +@fa-var-reply-all: "\f122"; +@fa-var-retweet: "\f079"; +@fa-var-rmb: "\f157"; +@fa-var-road: "\f018"; +@fa-var-rocket: "\f135"; +@fa-var-rotate-left: "\f0e2"; +@fa-var-rotate-right: "\f01e"; +@fa-var-rouble: "\f158"; +@fa-var-rss: "\f09e"; +@fa-var-rss-square: "\f143"; +@fa-var-rub: "\f158"; +@fa-var-ruble: "\f158"; +@fa-var-rupee: "\f156"; +@fa-var-save: "\f0c7"; +@fa-var-scissors: "\f0c4"; +@fa-var-search: "\f002"; +@fa-var-search-minus: "\f010"; +@fa-var-search-plus: "\f00e"; +@fa-var-send: "\f1d8"; +@fa-var-send-o: "\f1d9"; +@fa-var-share: "\f064"; +@fa-var-share-alt: "\f1e0"; +@fa-var-share-alt-square: "\f1e1"; +@fa-var-share-square: "\f14d"; +@fa-var-share-square-o: "\f045"; +@fa-var-shekel: "\f20b"; +@fa-var-sheqel: "\f20b"; +@fa-var-shield: "\f132"; +@fa-var-shopping-cart: "\f07a"; +@fa-var-sign-in: "\f090"; +@fa-var-sign-out: "\f08b"; +@fa-var-signal: "\f012"; +@fa-var-sitemap: "\f0e8"; +@fa-var-skype: "\f17e"; +@fa-var-slack: "\f198"; +@fa-var-sliders: "\f1de"; +@fa-var-slideshare: "\f1e7"; +@fa-var-smile-o: "\f118"; +@fa-var-soccer-ball-o: "\f1e3"; +@fa-var-sort: "\f0dc"; +@fa-var-sort-alpha-asc: "\f15d"; +@fa-var-sort-alpha-desc: "\f15e"; +@fa-var-sort-amount-asc: "\f160"; +@fa-var-sort-amount-desc: "\f161"; +@fa-var-sort-asc: "\f0de"; +@fa-var-sort-desc: "\f0dd"; +@fa-var-sort-down: "\f0dd"; +@fa-var-sort-numeric-asc: "\f162"; +@fa-var-sort-numeric-desc: "\f163"; +@fa-var-sort-up: "\f0de"; +@fa-var-soundcloud: "\f1be"; +@fa-var-space-shuttle: "\f197"; +@fa-var-spinner: "\f110"; +@fa-var-spoon: "\f1b1"; +@fa-var-spotify: "\f1bc"; +@fa-var-square: "\f0c8"; +@fa-var-square-o: "\f096"; +@fa-var-stack-exchange: "\f18d"; +@fa-var-stack-overflow: "\f16c"; +@fa-var-star: "\f005"; +@fa-var-star-half: "\f089"; +@fa-var-star-half-empty: "\f123"; +@fa-var-star-half-full: "\f123"; +@fa-var-star-half-o: "\f123"; +@fa-var-star-o: "\f006"; +@fa-var-steam: "\f1b6"; +@fa-var-steam-square: "\f1b7"; +@fa-var-step-backward: "\f048"; +@fa-var-step-forward: "\f051"; +@fa-var-stethoscope: "\f0f1"; +@fa-var-stop: "\f04d"; +@fa-var-strikethrough: "\f0cc"; +@fa-var-stumbleupon: "\f1a4"; +@fa-var-stumbleupon-circle: "\f1a3"; +@fa-var-subscript: "\f12c"; +@fa-var-suitcase: "\f0f2"; +@fa-var-sun-o: "\f185"; +@fa-var-superscript: "\f12b"; +@fa-var-support: "\f1cd"; +@fa-var-table: "\f0ce"; +@fa-var-tablet: "\f10a"; +@fa-var-tachometer: "\f0e4"; +@fa-var-tag: "\f02b"; +@fa-var-tags: "\f02c"; +@fa-var-tasks: "\f0ae"; +@fa-var-taxi: "\f1ba"; +@fa-var-tencent-weibo: "\f1d5"; +@fa-var-terminal: "\f120"; +@fa-var-text-height: "\f034"; +@fa-var-text-width: "\f035"; +@fa-var-th: "\f00a"; +@fa-var-th-large: "\f009"; +@fa-var-th-list: "\f00b"; +@fa-var-thumb-tack: "\f08d"; +@fa-var-thumbs-down: "\f165"; +@fa-var-thumbs-o-down: "\f088"; +@fa-var-thumbs-o-up: "\f087"; +@fa-var-thumbs-up: "\f164"; +@fa-var-ticket: "\f145"; +@fa-var-times: "\f00d"; +@fa-var-times-circle: "\f057"; +@fa-var-times-circle-o: "\f05c"; +@fa-var-tint: "\f043"; +@fa-var-toggle-down: "\f150"; +@fa-var-toggle-left: "\f191"; +@fa-var-toggle-off: "\f204"; +@fa-var-toggle-on: "\f205"; +@fa-var-toggle-right: "\f152"; +@fa-var-toggle-up: "\f151"; +@fa-var-trash: "\f1f8"; +@fa-var-trash-o: "\f014"; +@fa-var-tree: "\f1bb"; +@fa-var-trello: "\f181"; +@fa-var-trophy: "\f091"; +@fa-var-truck: "\f0d1"; +@fa-var-try: "\f195"; +@fa-var-tty: "\f1e4"; +@fa-var-tumblr: "\f173"; +@fa-var-tumblr-square: "\f174"; +@fa-var-turkish-lira: "\f195"; +@fa-var-twitch: "\f1e8"; +@fa-var-twitter: "\f099"; +@fa-var-twitter-square: "\f081"; +@fa-var-umbrella: "\f0e9"; +@fa-var-underline: "\f0cd"; +@fa-var-undo: "\f0e2"; +@fa-var-university: "\f19c"; +@fa-var-unlink: "\f127"; +@fa-var-unlock: "\f09c"; +@fa-var-unlock-alt: "\f13e"; +@fa-var-unsorted: "\f0dc"; +@fa-var-upload: "\f093"; +@fa-var-usd: "\f155"; +@fa-var-user: "\f007"; +@fa-var-user-md: "\f0f0"; +@fa-var-users: "\f0c0"; +@fa-var-video-camera: "\f03d"; +@fa-var-vimeo-square: "\f194"; +@fa-var-vine: "\f1ca"; +@fa-var-vk: "\f189"; +@fa-var-volume-down: "\f027"; +@fa-var-volume-off: "\f026"; +@fa-var-volume-up: "\f028"; +@fa-var-warning: "\f071"; +@fa-var-wechat: "\f1d7"; +@fa-var-weibo: "\f18a"; +@fa-var-weixin: "\f1d7"; +@fa-var-wheelchair: "\f193"; +@fa-var-wifi: "\f1eb"; +@fa-var-windows: "\f17a"; +@fa-var-won: "\f159"; +@fa-var-wordpress: "\f19a"; +@fa-var-wrench: "\f0ad"; +@fa-var-xing: "\f168"; +@fa-var-xing-square: "\f169"; +@fa-var-yahoo: "\f19e"; +@fa-var-yelp: "\f1e9"; +@fa-var-yen: "\f157"; +@fa-var-youtube: "\f167"; +@fa-var-youtube-play: "\f16a"; +@fa-var-youtube-square: "\f166"; + diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_bordered-pulled.scss b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_bordered-pulled.scss new file mode 100644 index 0000000..9d3fdf3 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_bordered-pulled.scss @@ -0,0 +1,16 @@ +// Bordered & Pulled +// ------------------------- + +.#{$fa-css-prefix}-border { + padding: .2em .25em .15em; + border: solid .08em $fa-border-color; + border-radius: .1em; +} + +.pull-right { float: right; } +.pull-left { float: left; } + +.#{$fa-css-prefix} { + &.pull-left { margin-right: .3em; } + &.pull-right { margin-left: .3em; } +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_core.scss b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_core.scss new file mode 100644 index 0000000..ca46d37 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_core.scss @@ -0,0 +1,11 @@ +// Base Class Definition +// ------------------------- + +.#{$fa-css-prefix} { + display: inline-block; + font: normal normal normal 14px/1 FontAwesome; // shortening font declaration + font-size: inherit; // can't have font-size inherit on line above, so need to override + text-rendering: auto; // optimizelegibility throws things off #1094 + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_fixed-width.scss b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_fixed-width.scss new file mode 100644 index 0000000..b221c98 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_fixed-width.scss @@ -0,0 +1,6 @@ +// Fixed Width Icons +// ------------------------- +.#{$fa-css-prefix}-fw { + width: (18em / 14); + text-align: center; +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_icons.scss b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_icons.scss new file mode 100644 index 0000000..8dc2939 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_icons.scss @@ -0,0 +1,552 @@ +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ + +.#{$fa-css-prefix}-glass:before { content: $fa-var-glass; } +.#{$fa-css-prefix}-music:before { content: $fa-var-music; } +.#{$fa-css-prefix}-search:before { content: $fa-var-search; } +.#{$fa-css-prefix}-envelope-o:before { content: $fa-var-envelope-o; } +.#{$fa-css-prefix}-heart:before { content: $fa-var-heart; } +.#{$fa-css-prefix}-star:before { content: $fa-var-star; } +.#{$fa-css-prefix}-star-o:before { content: $fa-var-star-o; } +.#{$fa-css-prefix}-user:before { content: $fa-var-user; } +.#{$fa-css-prefix}-film:before { content: $fa-var-film; } +.#{$fa-css-prefix}-th-large:before { content: $fa-var-th-large; } +.#{$fa-css-prefix}-th:before { content: $fa-var-th; } +.#{$fa-css-prefix}-th-list:before { content: $fa-var-th-list; } +.#{$fa-css-prefix}-check:before { content: $fa-var-check; } +.#{$fa-css-prefix}-remove:before, +.#{$fa-css-prefix}-close:before, +.#{$fa-css-prefix}-times:before { content: $fa-var-times; } +.#{$fa-css-prefix}-search-plus:before { content: $fa-var-search-plus; } +.#{$fa-css-prefix}-search-minus:before { content: $fa-var-search-minus; } +.#{$fa-css-prefix}-power-off:before { content: $fa-var-power-off; } +.#{$fa-css-prefix}-signal:before { content: $fa-var-signal; } +.#{$fa-css-prefix}-gear:before, +.#{$fa-css-prefix}-cog:before { content: $fa-var-cog; } +.#{$fa-css-prefix}-trash-o:before { content: $fa-var-trash-o; } +.#{$fa-css-prefix}-home:before { content: $fa-var-home; } +.#{$fa-css-prefix}-file-o:before { content: $fa-var-file-o; } +.#{$fa-css-prefix}-clock-o:before { content: $fa-var-clock-o; } +.#{$fa-css-prefix}-road:before { content: $fa-var-road; } +.#{$fa-css-prefix}-download:before { content: $fa-var-download; } +.#{$fa-css-prefix}-arrow-circle-o-down:before { content: $fa-var-arrow-circle-o-down; } +.#{$fa-css-prefix}-arrow-circle-o-up:before { content: $fa-var-arrow-circle-o-up; } +.#{$fa-css-prefix}-inbox:before { content: $fa-var-inbox; } +.#{$fa-css-prefix}-play-circle-o:before { content: $fa-var-play-circle-o; } +.#{$fa-css-prefix}-rotate-right:before, +.#{$fa-css-prefix}-repeat:before { content: $fa-var-repeat; } +.#{$fa-css-prefix}-refresh:before { content: $fa-var-refresh; } +.#{$fa-css-prefix}-list-alt:before { content: $fa-var-list-alt; } +.#{$fa-css-prefix}-lock:before { content: $fa-var-lock; } +.#{$fa-css-prefix}-flag:before { content: $fa-var-flag; } +.#{$fa-css-prefix}-headphones:before { content: $fa-var-headphones; } +.#{$fa-css-prefix}-volume-off:before { content: $fa-var-volume-off; } +.#{$fa-css-prefix}-volume-down:before { content: $fa-var-volume-down; } +.#{$fa-css-prefix}-volume-up:before { content: $fa-var-volume-up; } +.#{$fa-css-prefix}-qrcode:before { content: $fa-var-qrcode; } +.#{$fa-css-prefix}-barcode:before { content: $fa-var-barcode; } +.#{$fa-css-prefix}-tag:before { content: $fa-var-tag; } +.#{$fa-css-prefix}-tags:before { content: $fa-var-tags; } +.#{$fa-css-prefix}-book:before { content: $fa-var-book; } +.#{$fa-css-prefix}-bookmark:before { content: $fa-var-bookmark; } +.#{$fa-css-prefix}-print:before { content: $fa-var-print; } +.#{$fa-css-prefix}-camera:before { content: $fa-var-camera; } +.#{$fa-css-prefix}-font:before { content: $fa-var-font; } +.#{$fa-css-prefix}-bold:before { content: $fa-var-bold; } +.#{$fa-css-prefix}-italic:before { content: $fa-var-italic; } +.#{$fa-css-prefix}-text-height:before { content: $fa-var-text-height; } +.#{$fa-css-prefix}-text-width:before { content: $fa-var-text-width; } +.#{$fa-css-prefix}-align-left:before { content: $fa-var-align-left; } +.#{$fa-css-prefix}-align-center:before { content: $fa-var-align-center; } +.#{$fa-css-prefix}-align-right:before { content: $fa-var-align-right; } +.#{$fa-css-prefix}-align-justify:before { content: $fa-var-align-justify; } +.#{$fa-css-prefix}-list:before { content: $fa-var-list; } +.#{$fa-css-prefix}-dedent:before, +.#{$fa-css-prefix}-outdent:before { content: $fa-var-outdent; } +.#{$fa-css-prefix}-indent:before { content: $fa-var-indent; } +.#{$fa-css-prefix}-video-camera:before { content: $fa-var-video-camera; } +.#{$fa-css-prefix}-photo:before, +.#{$fa-css-prefix}-image:before, +.#{$fa-css-prefix}-picture-o:before { content: $fa-var-picture-o; } +.#{$fa-css-prefix}-pencil:before { content: $fa-var-pencil; } +.#{$fa-css-prefix}-map-marker:before { content: $fa-var-map-marker; } +.#{$fa-css-prefix}-adjust:before { content: $fa-var-adjust; } +.#{$fa-css-prefix}-tint:before { content: $fa-var-tint; } +.#{$fa-css-prefix}-edit:before, +.#{$fa-css-prefix}-pencil-square-o:before { content: $fa-var-pencil-square-o; } +.#{$fa-css-prefix}-share-square-o:before { content: $fa-var-share-square-o; } +.#{$fa-css-prefix}-check-square-o:before { content: $fa-var-check-square-o; } +.#{$fa-css-prefix}-arrows:before { content: $fa-var-arrows; } +.#{$fa-css-prefix}-step-backward:before { content: $fa-var-step-backward; } +.#{$fa-css-prefix}-fast-backward:before { content: $fa-var-fast-backward; } +.#{$fa-css-prefix}-backward:before { content: $fa-var-backward; } +.#{$fa-css-prefix}-play:before { content: $fa-var-play; } +.#{$fa-css-prefix}-pause:before { content: $fa-var-pause; } +.#{$fa-css-prefix}-stop:before { content: $fa-var-stop; } +.#{$fa-css-prefix}-forward:before { content: $fa-var-forward; } +.#{$fa-css-prefix}-fast-forward:before { content: $fa-var-fast-forward; } +.#{$fa-css-prefix}-step-forward:before { content: $fa-var-step-forward; } +.#{$fa-css-prefix}-eject:before { content: $fa-var-eject; } +.#{$fa-css-prefix}-chevron-left:before { content: $fa-var-chevron-left; } +.#{$fa-css-prefix}-chevron-right:before { content: $fa-var-chevron-right; } +.#{$fa-css-prefix}-plus-circle:before { content: $fa-var-plus-circle; } +.#{$fa-css-prefix}-minus-circle:before { content: $fa-var-minus-circle; } +.#{$fa-css-prefix}-times-circle:before { content: $fa-var-times-circle; } +.#{$fa-css-prefix}-check-circle:before { content: $fa-var-check-circle; } +.#{$fa-css-prefix}-question-circle:before { content: $fa-var-question-circle; } +.#{$fa-css-prefix}-info-circle:before { content: $fa-var-info-circle; } +.#{$fa-css-prefix}-crosshairs:before { content: $fa-var-crosshairs; } +.#{$fa-css-prefix}-times-circle-o:before { content: $fa-var-times-circle-o; } +.#{$fa-css-prefix}-check-circle-o:before { content: $fa-var-check-circle-o; } +.#{$fa-css-prefix}-ban:before { content: $fa-var-ban; } +.#{$fa-css-prefix}-arrow-left:before { content: $fa-var-arrow-left; } +.#{$fa-css-prefix}-arrow-right:before { content: $fa-var-arrow-right; } +.#{$fa-css-prefix}-arrow-up:before { content: $fa-var-arrow-up; } +.#{$fa-css-prefix}-arrow-down:before { content: $fa-var-arrow-down; } +.#{$fa-css-prefix}-mail-forward:before, +.#{$fa-css-prefix}-share:before { content: $fa-var-share; } +.#{$fa-css-prefix}-expand:before { content: $fa-var-expand; } +.#{$fa-css-prefix}-compress:before { content: $fa-var-compress; } +.#{$fa-css-prefix}-plus:before { content: $fa-var-plus; } +.#{$fa-css-prefix}-minus:before { content: $fa-var-minus; } +.#{$fa-css-prefix}-asterisk:before { content: $fa-var-asterisk; } +.#{$fa-css-prefix}-exclamation-circle:before { content: $fa-var-exclamation-circle; } +.#{$fa-css-prefix}-gift:before { content: $fa-var-gift; } +.#{$fa-css-prefix}-leaf:before { content: $fa-var-leaf; } +.#{$fa-css-prefix}-fire:before { content: $fa-var-fire; } +.#{$fa-css-prefix}-eye:before { content: $fa-var-eye; } +.#{$fa-css-prefix}-eye-slash:before { content: $fa-var-eye-slash; } +.#{$fa-css-prefix}-warning:before, +.#{$fa-css-prefix}-exclamation-triangle:before { content: $fa-var-exclamation-triangle; } +.#{$fa-css-prefix}-plane:before { content: $fa-var-plane; } +.#{$fa-css-prefix}-calendar:before { content: $fa-var-calendar; } +.#{$fa-css-prefix}-random:before { content: $fa-var-random; } +.#{$fa-css-prefix}-comment:before { content: $fa-var-comment; } +.#{$fa-css-prefix}-magnet:before { content: $fa-var-magnet; } +.#{$fa-css-prefix}-chevron-up:before { content: $fa-var-chevron-up; } +.#{$fa-css-prefix}-chevron-down:before { content: $fa-var-chevron-down; } +.#{$fa-css-prefix}-retweet:before { content: $fa-var-retweet; } +.#{$fa-css-prefix}-shopping-cart:before { content: $fa-var-shopping-cart; } +.#{$fa-css-prefix}-folder:before { content: $fa-var-folder; } +.#{$fa-css-prefix}-folder-open:before { content: $fa-var-folder-open; } +.#{$fa-css-prefix}-arrows-v:before { content: $fa-var-arrows-v; } +.#{$fa-css-prefix}-arrows-h:before { content: $fa-var-arrows-h; } +.#{$fa-css-prefix}-bar-chart-o:before, +.#{$fa-css-prefix}-bar-chart:before { content: $fa-var-bar-chart; } +.#{$fa-css-prefix}-twitter-square:before { content: $fa-var-twitter-square; } +.#{$fa-css-prefix}-facebook-square:before { content: $fa-var-facebook-square; } +.#{$fa-css-prefix}-camera-retro:before { content: $fa-var-camera-retro; } +.#{$fa-css-prefix}-key:before { content: $fa-var-key; } +.#{$fa-css-prefix}-gears:before, +.#{$fa-css-prefix}-cogs:before { content: $fa-var-cogs; } +.#{$fa-css-prefix}-comments:before { content: $fa-var-comments; } +.#{$fa-css-prefix}-thumbs-o-up:before { content: $fa-var-thumbs-o-up; } +.#{$fa-css-prefix}-thumbs-o-down:before { content: $fa-var-thumbs-o-down; } +.#{$fa-css-prefix}-star-half:before { content: $fa-var-star-half; } +.#{$fa-css-prefix}-heart-o:before { content: $fa-var-heart-o; } +.#{$fa-css-prefix}-sign-out:before { content: $fa-var-sign-out; } +.#{$fa-css-prefix}-linkedin-square:before { content: $fa-var-linkedin-square; } +.#{$fa-css-prefix}-thumb-tack:before { content: $fa-var-thumb-tack; } +.#{$fa-css-prefix}-external-link:before { content: $fa-var-external-link; } +.#{$fa-css-prefix}-sign-in:before { content: $fa-var-sign-in; } +.#{$fa-css-prefix}-trophy:before { content: $fa-var-trophy; } +.#{$fa-css-prefix}-github-square:before { content: $fa-var-github-square; } +.#{$fa-css-prefix}-upload:before { content: $fa-var-upload; } +.#{$fa-css-prefix}-lemon-o:before { content: $fa-var-lemon-o; } +.#{$fa-css-prefix}-phone:before { content: $fa-var-phone; } +.#{$fa-css-prefix}-square-o:before { content: $fa-var-square-o; } +.#{$fa-css-prefix}-bookmark-o:before { content: $fa-var-bookmark-o; } +.#{$fa-css-prefix}-phone-square:before { content: $fa-var-phone-square; } +.#{$fa-css-prefix}-twitter:before { content: $fa-var-twitter; } +.#{$fa-css-prefix}-facebook:before { content: $fa-var-facebook; } +.#{$fa-css-prefix}-github:before { content: $fa-var-github; } +.#{$fa-css-prefix}-unlock:before { content: $fa-var-unlock; } +.#{$fa-css-prefix}-credit-card:before { content: $fa-var-credit-card; } +.#{$fa-css-prefix}-rss:before { content: $fa-var-rss; } +.#{$fa-css-prefix}-hdd-o:before { content: $fa-var-hdd-o; } +.#{$fa-css-prefix}-bullhorn:before { content: $fa-var-bullhorn; } +.#{$fa-css-prefix}-bell:before { content: $fa-var-bell; } +.#{$fa-css-prefix}-certificate:before { content: $fa-var-certificate; } +.#{$fa-css-prefix}-hand-o-right:before { content: $fa-var-hand-o-right; } +.#{$fa-css-prefix}-hand-o-left:before { content: $fa-var-hand-o-left; } +.#{$fa-css-prefix}-hand-o-up:before { content: $fa-var-hand-o-up; } +.#{$fa-css-prefix}-hand-o-down:before { content: $fa-var-hand-o-down; } +.#{$fa-css-prefix}-arrow-circle-left:before { content: $fa-var-arrow-circle-left; } +.#{$fa-css-prefix}-arrow-circle-right:before { content: $fa-var-arrow-circle-right; } +.#{$fa-css-prefix}-arrow-circle-up:before { content: $fa-var-arrow-circle-up; } +.#{$fa-css-prefix}-arrow-circle-down:before { content: $fa-var-arrow-circle-down; } +.#{$fa-css-prefix}-globe:before { content: $fa-var-globe; } +.#{$fa-css-prefix}-wrench:before { content: $fa-var-wrench; } +.#{$fa-css-prefix}-tasks:before { content: $fa-var-tasks; } +.#{$fa-css-prefix}-filter:before { content: $fa-var-filter; } +.#{$fa-css-prefix}-briefcase:before { content: $fa-var-briefcase; } +.#{$fa-css-prefix}-arrows-alt:before { content: $fa-var-arrows-alt; } +.#{$fa-css-prefix}-group:before, +.#{$fa-css-prefix}-users:before { content: $fa-var-users; } +.#{$fa-css-prefix}-chain:before, +.#{$fa-css-prefix}-link:before { content: $fa-var-link; } +.#{$fa-css-prefix}-cloud:before { content: $fa-var-cloud; } +.#{$fa-css-prefix}-flask:before { content: $fa-var-flask; } +.#{$fa-css-prefix}-cut:before, +.#{$fa-css-prefix}-scissors:before { content: $fa-var-scissors; } +.#{$fa-css-prefix}-copy:before, +.#{$fa-css-prefix}-files-o:before { content: $fa-var-files-o; } +.#{$fa-css-prefix}-paperclip:before { content: $fa-var-paperclip; } +.#{$fa-css-prefix}-save:before, +.#{$fa-css-prefix}-floppy-o:before { content: $fa-var-floppy-o; } +.#{$fa-css-prefix}-square:before { content: $fa-var-square; } +.#{$fa-css-prefix}-navicon:before, +.#{$fa-css-prefix}-reorder:before, +.#{$fa-css-prefix}-bars:before { content: $fa-var-bars; } +.#{$fa-css-prefix}-list-ul:before { content: $fa-var-list-ul; } +.#{$fa-css-prefix}-list-ol:before { content: $fa-var-list-ol; } +.#{$fa-css-prefix}-strikethrough:before { content: $fa-var-strikethrough; } +.#{$fa-css-prefix}-underline:before { content: $fa-var-underline; } +.#{$fa-css-prefix}-table:before { content: $fa-var-table; } +.#{$fa-css-prefix}-magic:before { content: $fa-var-magic; } +.#{$fa-css-prefix}-truck:before { content: $fa-var-truck; } +.#{$fa-css-prefix}-pinterest:before { content: $fa-var-pinterest; } +.#{$fa-css-prefix}-pinterest-square:before { content: $fa-var-pinterest-square; } +.#{$fa-css-prefix}-google-plus-square:before { content: $fa-var-google-plus-square; } +.#{$fa-css-prefix}-google-plus:before { content: $fa-var-google-plus; } +.#{$fa-css-prefix}-money:before { content: $fa-var-money; } +.#{$fa-css-prefix}-caret-down:before { content: $fa-var-caret-down; } +.#{$fa-css-prefix}-caret-up:before { content: $fa-var-caret-up; } +.#{$fa-css-prefix}-caret-left:before { content: $fa-var-caret-left; } +.#{$fa-css-prefix}-caret-right:before { content: $fa-var-caret-right; } +.#{$fa-css-prefix}-columns:before { content: $fa-var-columns; } +.#{$fa-css-prefix}-unsorted:before, +.#{$fa-css-prefix}-sort:before { content: $fa-var-sort; } +.#{$fa-css-prefix}-sort-down:before, +.#{$fa-css-prefix}-sort-desc:before { content: $fa-var-sort-desc; } +.#{$fa-css-prefix}-sort-up:before, +.#{$fa-css-prefix}-sort-asc:before { content: $fa-var-sort-asc; } +.#{$fa-css-prefix}-envelope:before { content: $fa-var-envelope; } +.#{$fa-css-prefix}-linkedin:before { content: $fa-var-linkedin; } +.#{$fa-css-prefix}-rotate-left:before, +.#{$fa-css-prefix}-undo:before { content: $fa-var-undo; } +.#{$fa-css-prefix}-legal:before, +.#{$fa-css-prefix}-gavel:before { content: $fa-var-gavel; } +.#{$fa-css-prefix}-dashboard:before, +.#{$fa-css-prefix}-tachometer:before { content: $fa-var-tachometer; } +.#{$fa-css-prefix}-comment-o:before { content: $fa-var-comment-o; } +.#{$fa-css-prefix}-comments-o:before { content: $fa-var-comments-o; } +.#{$fa-css-prefix}-flash:before, +.#{$fa-css-prefix}-bolt:before { content: $fa-var-bolt; } +.#{$fa-css-prefix}-sitemap:before { content: $fa-var-sitemap; } +.#{$fa-css-prefix}-umbrella:before { content: $fa-var-umbrella; } +.#{$fa-css-prefix}-paste:before, +.#{$fa-css-prefix}-clipboard:before { content: $fa-var-clipboard; } +.#{$fa-css-prefix}-lightbulb-o:before { content: $fa-var-lightbulb-o; } +.#{$fa-css-prefix}-exchange:before { content: $fa-var-exchange; } +.#{$fa-css-prefix}-cloud-download:before { content: $fa-var-cloud-download; } +.#{$fa-css-prefix}-cloud-upload:before { content: $fa-var-cloud-upload; } +.#{$fa-css-prefix}-user-md:before { content: $fa-var-user-md; } +.#{$fa-css-prefix}-stethoscope:before { content: $fa-var-stethoscope; } +.#{$fa-css-prefix}-suitcase:before { content: $fa-var-suitcase; } +.#{$fa-css-prefix}-bell-o:before { content: $fa-var-bell-o; } +.#{$fa-css-prefix}-coffee:before { content: $fa-var-coffee; } +.#{$fa-css-prefix}-cutlery:before { content: $fa-var-cutlery; } +.#{$fa-css-prefix}-file-text-o:before { content: $fa-var-file-text-o; } +.#{$fa-css-prefix}-building-o:before { content: $fa-var-building-o; } +.#{$fa-css-prefix}-hospital-o:before { content: $fa-var-hospital-o; } +.#{$fa-css-prefix}-ambulance:before { content: $fa-var-ambulance; } +.#{$fa-css-prefix}-medkit:before { content: $fa-var-medkit; } +.#{$fa-css-prefix}-fighter-jet:before { content: $fa-var-fighter-jet; } +.#{$fa-css-prefix}-beer:before { content: $fa-var-beer; } +.#{$fa-css-prefix}-h-square:before { content: $fa-var-h-square; } +.#{$fa-css-prefix}-plus-square:before { content: $fa-var-plus-square; } +.#{$fa-css-prefix}-angle-double-left:before { content: $fa-var-angle-double-left; } +.#{$fa-css-prefix}-angle-double-right:before { content: $fa-var-angle-double-right; } +.#{$fa-css-prefix}-angle-double-up:before { content: $fa-var-angle-double-up; } +.#{$fa-css-prefix}-angle-double-down:before { content: $fa-var-angle-double-down; } +.#{$fa-css-prefix}-angle-left:before { content: $fa-var-angle-left; } +.#{$fa-css-prefix}-angle-right:before { content: $fa-var-angle-right; } +.#{$fa-css-prefix}-angle-up:before { content: $fa-var-angle-up; } +.#{$fa-css-prefix}-angle-down:before { content: $fa-var-angle-down; } +.#{$fa-css-prefix}-desktop:before { content: $fa-var-desktop; } +.#{$fa-css-prefix}-laptop:before { content: $fa-var-laptop; } +.#{$fa-css-prefix}-tablet:before { content: $fa-var-tablet; } +.#{$fa-css-prefix}-mobile-phone:before, +.#{$fa-css-prefix}-mobile:before { content: $fa-var-mobile; } +.#{$fa-css-prefix}-circle-o:before { content: $fa-var-circle-o; } +.#{$fa-css-prefix}-quote-left:before { content: $fa-var-quote-left; } +.#{$fa-css-prefix}-quote-right:before { content: $fa-var-quote-right; } +.#{$fa-css-prefix}-spinner:before { content: $fa-var-spinner; } +.#{$fa-css-prefix}-circle:before { content: $fa-var-circle; } +.#{$fa-css-prefix}-mail-reply:before, +.#{$fa-css-prefix}-reply:before { content: $fa-var-reply; } +.#{$fa-css-prefix}-github-alt:before { content: $fa-var-github-alt; } +.#{$fa-css-prefix}-folder-o:before { content: $fa-var-folder-o; } +.#{$fa-css-prefix}-folder-open-o:before { content: $fa-var-folder-open-o; } +.#{$fa-css-prefix}-smile-o:before { content: $fa-var-smile-o; } +.#{$fa-css-prefix}-frown-o:before { content: $fa-var-frown-o; } +.#{$fa-css-prefix}-meh-o:before { content: $fa-var-meh-o; } +.#{$fa-css-prefix}-gamepad:before { content: $fa-var-gamepad; } +.#{$fa-css-prefix}-keyboard-o:before { content: $fa-var-keyboard-o; } +.#{$fa-css-prefix}-flag-o:before { content: $fa-var-flag-o; } +.#{$fa-css-prefix}-flag-checkered:before { content: $fa-var-flag-checkered; } +.#{$fa-css-prefix}-terminal:before { content: $fa-var-terminal; } +.#{$fa-css-prefix}-code:before { content: $fa-var-code; } +.#{$fa-css-prefix}-mail-reply-all:before, +.#{$fa-css-prefix}-reply-all:before { content: $fa-var-reply-all; } +.#{$fa-css-prefix}-star-half-empty:before, +.#{$fa-css-prefix}-star-half-full:before, +.#{$fa-css-prefix}-star-half-o:before { content: $fa-var-star-half-o; } +.#{$fa-css-prefix}-location-arrow:before { content: $fa-var-location-arrow; } +.#{$fa-css-prefix}-crop:before { content: $fa-var-crop; } +.#{$fa-css-prefix}-code-fork:before { content: $fa-var-code-fork; } +.#{$fa-css-prefix}-unlink:before, +.#{$fa-css-prefix}-chain-broken:before { content: $fa-var-chain-broken; } +.#{$fa-css-prefix}-question:before { content: $fa-var-question; } +.#{$fa-css-prefix}-info:before { content: $fa-var-info; } +.#{$fa-css-prefix}-exclamation:before { content: $fa-var-exclamation; } +.#{$fa-css-prefix}-superscript:before { content: $fa-var-superscript; } +.#{$fa-css-prefix}-subscript:before { content: $fa-var-subscript; } +.#{$fa-css-prefix}-eraser:before { content: $fa-var-eraser; } +.#{$fa-css-prefix}-puzzle-piece:before { content: $fa-var-puzzle-piece; } +.#{$fa-css-prefix}-microphone:before { content: $fa-var-microphone; } +.#{$fa-css-prefix}-microphone-slash:before { content: $fa-var-microphone-slash; } +.#{$fa-css-prefix}-shield:before { content: $fa-var-shield; } +.#{$fa-css-prefix}-calendar-o:before { content: $fa-var-calendar-o; } +.#{$fa-css-prefix}-fire-extinguisher:before { content: $fa-var-fire-extinguisher; } +.#{$fa-css-prefix}-rocket:before { content: $fa-var-rocket; } +.#{$fa-css-prefix}-maxcdn:before { content: $fa-var-maxcdn; } +.#{$fa-css-prefix}-chevron-circle-left:before { content: $fa-var-chevron-circle-left; } +.#{$fa-css-prefix}-chevron-circle-right:before { content: $fa-var-chevron-circle-right; } +.#{$fa-css-prefix}-chevron-circle-up:before { content: $fa-var-chevron-circle-up; } +.#{$fa-css-prefix}-chevron-circle-down:before { content: $fa-var-chevron-circle-down; } +.#{$fa-css-prefix}-html5:before { content: $fa-var-html5; } +.#{$fa-css-prefix}-css3:before { content: $fa-var-css3; } +.#{$fa-css-prefix}-anchor:before { content: $fa-var-anchor; } +.#{$fa-css-prefix}-unlock-alt:before { content: $fa-var-unlock-alt; } +.#{$fa-css-prefix}-bullseye:before { content: $fa-var-bullseye; } +.#{$fa-css-prefix}-ellipsis-h:before { content: $fa-var-ellipsis-h; } +.#{$fa-css-prefix}-ellipsis-v:before { content: $fa-var-ellipsis-v; } +.#{$fa-css-prefix}-rss-square:before { content: $fa-var-rss-square; } +.#{$fa-css-prefix}-play-circle:before { content: $fa-var-play-circle; } +.#{$fa-css-prefix}-ticket:before { content: $fa-var-ticket; } +.#{$fa-css-prefix}-minus-square:before { content: $fa-var-minus-square; } +.#{$fa-css-prefix}-minus-square-o:before { content: $fa-var-minus-square-o; } +.#{$fa-css-prefix}-level-up:before { content: $fa-var-level-up; } +.#{$fa-css-prefix}-level-down:before { content: $fa-var-level-down; } +.#{$fa-css-prefix}-check-square:before { content: $fa-var-check-square; } +.#{$fa-css-prefix}-pencil-square:before { content: $fa-var-pencil-square; } +.#{$fa-css-prefix}-external-link-square:before { content: $fa-var-external-link-square; } +.#{$fa-css-prefix}-share-square:before { content: $fa-var-share-square; } +.#{$fa-css-prefix}-compass:before { content: $fa-var-compass; } +.#{$fa-css-prefix}-toggle-down:before, +.#{$fa-css-prefix}-caret-square-o-down:before { content: $fa-var-caret-square-o-down; } +.#{$fa-css-prefix}-toggle-up:before, +.#{$fa-css-prefix}-caret-square-o-up:before { content: $fa-var-caret-square-o-up; } +.#{$fa-css-prefix}-toggle-right:before, +.#{$fa-css-prefix}-caret-square-o-right:before { content: $fa-var-caret-square-o-right; } +.#{$fa-css-prefix}-euro:before, +.#{$fa-css-prefix}-eur:before { content: $fa-var-eur; } +.#{$fa-css-prefix}-gbp:before { content: $fa-var-gbp; } +.#{$fa-css-prefix}-dollar:before, +.#{$fa-css-prefix}-usd:before { content: $fa-var-usd; } +.#{$fa-css-prefix}-rupee:before, +.#{$fa-css-prefix}-inr:before { content: $fa-var-inr; } +.#{$fa-css-prefix}-cny:before, +.#{$fa-css-prefix}-rmb:before, +.#{$fa-css-prefix}-yen:before, +.#{$fa-css-prefix}-jpy:before { content: $fa-var-jpy; } +.#{$fa-css-prefix}-ruble:before, +.#{$fa-css-prefix}-rouble:before, +.#{$fa-css-prefix}-rub:before { content: $fa-var-rub; } +.#{$fa-css-prefix}-won:before, +.#{$fa-css-prefix}-krw:before { content: $fa-var-krw; } +.#{$fa-css-prefix}-bitcoin:before, +.#{$fa-css-prefix}-btc:before { content: $fa-var-btc; } +.#{$fa-css-prefix}-file:before { content: $fa-var-file; } +.#{$fa-css-prefix}-file-text:before { content: $fa-var-file-text; } +.#{$fa-css-prefix}-sort-alpha-asc:before { content: $fa-var-sort-alpha-asc; } +.#{$fa-css-prefix}-sort-alpha-desc:before { content: $fa-var-sort-alpha-desc; } +.#{$fa-css-prefix}-sort-amount-asc:before { content: $fa-var-sort-amount-asc; } +.#{$fa-css-prefix}-sort-amount-desc:before { content: $fa-var-sort-amount-desc; } +.#{$fa-css-prefix}-sort-numeric-asc:before { content: $fa-var-sort-numeric-asc; } +.#{$fa-css-prefix}-sort-numeric-desc:before { content: $fa-var-sort-numeric-desc; } +.#{$fa-css-prefix}-thumbs-up:before { content: $fa-var-thumbs-up; } +.#{$fa-css-prefix}-thumbs-down:before { content: $fa-var-thumbs-down; } +.#{$fa-css-prefix}-youtube-square:before { content: $fa-var-youtube-square; } +.#{$fa-css-prefix}-youtube:before { content: $fa-var-youtube; } +.#{$fa-css-prefix}-xing:before { content: $fa-var-xing; } +.#{$fa-css-prefix}-xing-square:before { content: $fa-var-xing-square; } +.#{$fa-css-prefix}-youtube-play:before { content: $fa-var-youtube-play; } +.#{$fa-css-prefix}-dropbox:before { content: $fa-var-dropbox; } +.#{$fa-css-prefix}-stack-overflow:before { content: $fa-var-stack-overflow; } +.#{$fa-css-prefix}-instagram:before { content: $fa-var-instagram; } +.#{$fa-css-prefix}-flickr:before { content: $fa-var-flickr; } +.#{$fa-css-prefix}-adn:before { content: $fa-var-adn; } +.#{$fa-css-prefix}-bitbucket:before { content: $fa-var-bitbucket; } +.#{$fa-css-prefix}-bitbucket-square:before { content: $fa-var-bitbucket-square; } +.#{$fa-css-prefix}-tumblr:before { content: $fa-var-tumblr; } +.#{$fa-css-prefix}-tumblr-square:before { content: $fa-var-tumblr-square; } +.#{$fa-css-prefix}-long-arrow-down:before { content: $fa-var-long-arrow-down; } +.#{$fa-css-prefix}-long-arrow-up:before { content: $fa-var-long-arrow-up; } +.#{$fa-css-prefix}-long-arrow-left:before { content: $fa-var-long-arrow-left; } +.#{$fa-css-prefix}-long-arrow-right:before { content: $fa-var-long-arrow-right; } +.#{$fa-css-prefix}-apple:before { content: $fa-var-apple; } +.#{$fa-css-prefix}-windows:before { content: $fa-var-windows; } +.#{$fa-css-prefix}-android:before { content: $fa-var-android; } +.#{$fa-css-prefix}-linux:before { content: $fa-var-linux; } +.#{$fa-css-prefix}-dribbble:before { content: $fa-var-dribbble; } +.#{$fa-css-prefix}-skype:before { content: $fa-var-skype; } +.#{$fa-css-prefix}-foursquare:before { content: $fa-var-foursquare; } +.#{$fa-css-prefix}-trello:before { content: $fa-var-trello; } +.#{$fa-css-prefix}-female:before { content: $fa-var-female; } +.#{$fa-css-prefix}-male:before { content: $fa-var-male; } +.#{$fa-css-prefix}-gittip:before { content: $fa-var-gittip; } +.#{$fa-css-prefix}-sun-o:before { content: $fa-var-sun-o; } +.#{$fa-css-prefix}-moon-o:before { content: $fa-var-moon-o; } +.#{$fa-css-prefix}-archive:before { content: $fa-var-archive; } +.#{$fa-css-prefix}-bug:before { content: $fa-var-bug; } +.#{$fa-css-prefix}-vk:before { content: $fa-var-vk; } +.#{$fa-css-prefix}-weibo:before { content: $fa-var-weibo; } +.#{$fa-css-prefix}-renren:before { content: $fa-var-renren; } +.#{$fa-css-prefix}-pagelines:before { content: $fa-var-pagelines; } +.#{$fa-css-prefix}-stack-exchange:before { content: $fa-var-stack-exchange; } +.#{$fa-css-prefix}-arrow-circle-o-right:before { content: $fa-var-arrow-circle-o-right; } +.#{$fa-css-prefix}-arrow-circle-o-left:before { content: $fa-var-arrow-circle-o-left; } +.#{$fa-css-prefix}-toggle-left:before, +.#{$fa-css-prefix}-caret-square-o-left:before { content: $fa-var-caret-square-o-left; } +.#{$fa-css-prefix}-dot-circle-o:before { content: $fa-var-dot-circle-o; } +.#{$fa-css-prefix}-wheelchair:before { content: $fa-var-wheelchair; } +.#{$fa-css-prefix}-vimeo-square:before { content: $fa-var-vimeo-square; } +.#{$fa-css-prefix}-turkish-lira:before, +.#{$fa-css-prefix}-try:before { content: $fa-var-try; } +.#{$fa-css-prefix}-plus-square-o:before { content: $fa-var-plus-square-o; } +.#{$fa-css-prefix}-space-shuttle:before { content: $fa-var-space-shuttle; } +.#{$fa-css-prefix}-slack:before { content: $fa-var-slack; } +.#{$fa-css-prefix}-envelope-square:before { content: $fa-var-envelope-square; } +.#{$fa-css-prefix}-wordpress:before { content: $fa-var-wordpress; } +.#{$fa-css-prefix}-openid:before { content: $fa-var-openid; } +.#{$fa-css-prefix}-institution:before, +.#{$fa-css-prefix}-bank:before, +.#{$fa-css-prefix}-university:before { content: $fa-var-university; } +.#{$fa-css-prefix}-mortar-board:before, +.#{$fa-css-prefix}-graduation-cap:before { content: $fa-var-graduation-cap; } +.#{$fa-css-prefix}-yahoo:before { content: $fa-var-yahoo; } +.#{$fa-css-prefix}-google:before { content: $fa-var-google; } +.#{$fa-css-prefix}-reddit:before { content: $fa-var-reddit; } +.#{$fa-css-prefix}-reddit-square:before { content: $fa-var-reddit-square; } +.#{$fa-css-prefix}-stumbleupon-circle:before { content: $fa-var-stumbleupon-circle; } +.#{$fa-css-prefix}-stumbleupon:before { content: $fa-var-stumbleupon; } +.#{$fa-css-prefix}-delicious:before { content: $fa-var-delicious; } +.#{$fa-css-prefix}-digg:before { content: $fa-var-digg; } +.#{$fa-css-prefix}-pied-piper:before { content: $fa-var-pied-piper; } +.#{$fa-css-prefix}-pied-piper-alt:before { content: $fa-var-pied-piper-alt; } +.#{$fa-css-prefix}-drupal:before { content: $fa-var-drupal; } +.#{$fa-css-prefix}-joomla:before { content: $fa-var-joomla; } +.#{$fa-css-prefix}-language:before { content: $fa-var-language; } +.#{$fa-css-prefix}-fax:before { content: $fa-var-fax; } +.#{$fa-css-prefix}-building:before { content: $fa-var-building; } +.#{$fa-css-prefix}-child:before { content: $fa-var-child; } +.#{$fa-css-prefix}-paw:before { content: $fa-var-paw; } +.#{$fa-css-prefix}-spoon:before { content: $fa-var-spoon; } +.#{$fa-css-prefix}-cube:before { content: $fa-var-cube; } +.#{$fa-css-prefix}-cubes:before { content: $fa-var-cubes; } +.#{$fa-css-prefix}-behance:before { content: $fa-var-behance; } +.#{$fa-css-prefix}-behance-square:before { content: $fa-var-behance-square; } +.#{$fa-css-prefix}-steam:before { content: $fa-var-steam; } +.#{$fa-css-prefix}-steam-square:before { content: $fa-var-steam-square; } +.#{$fa-css-prefix}-recycle:before { content: $fa-var-recycle; } +.#{$fa-css-prefix}-automobile:before, +.#{$fa-css-prefix}-car:before { content: $fa-var-car; } +.#{$fa-css-prefix}-cab:before, +.#{$fa-css-prefix}-taxi:before { content: $fa-var-taxi; } +.#{$fa-css-prefix}-tree:before { content: $fa-var-tree; } +.#{$fa-css-prefix}-spotify:before { content: $fa-var-spotify; } +.#{$fa-css-prefix}-deviantart:before { content: $fa-var-deviantart; } +.#{$fa-css-prefix}-soundcloud:before { content: $fa-var-soundcloud; } +.#{$fa-css-prefix}-database:before { content: $fa-var-database; } +.#{$fa-css-prefix}-file-pdf-o:before { content: $fa-var-file-pdf-o; } +.#{$fa-css-prefix}-file-word-o:before { content: $fa-var-file-word-o; } +.#{$fa-css-prefix}-file-excel-o:before { content: $fa-var-file-excel-o; } +.#{$fa-css-prefix}-file-powerpoint-o:before { content: $fa-var-file-powerpoint-o; } +.#{$fa-css-prefix}-file-photo-o:before, +.#{$fa-css-prefix}-file-picture-o:before, +.#{$fa-css-prefix}-file-image-o:before { content: $fa-var-file-image-o; } +.#{$fa-css-prefix}-file-zip-o:before, +.#{$fa-css-prefix}-file-archive-o:before { content: $fa-var-file-archive-o; } +.#{$fa-css-prefix}-file-sound-o:before, +.#{$fa-css-prefix}-file-audio-o:before { content: $fa-var-file-audio-o; } +.#{$fa-css-prefix}-file-movie-o:before, +.#{$fa-css-prefix}-file-video-o:before { content: $fa-var-file-video-o; } +.#{$fa-css-prefix}-file-code-o:before { content: $fa-var-file-code-o; } +.#{$fa-css-prefix}-vine:before { content: $fa-var-vine; } +.#{$fa-css-prefix}-codepen:before { content: $fa-var-codepen; } +.#{$fa-css-prefix}-jsfiddle:before { content: $fa-var-jsfiddle; } +.#{$fa-css-prefix}-life-bouy:before, +.#{$fa-css-prefix}-life-buoy:before, +.#{$fa-css-prefix}-life-saver:before, +.#{$fa-css-prefix}-support:before, +.#{$fa-css-prefix}-life-ring:before { content: $fa-var-life-ring; } +.#{$fa-css-prefix}-circle-o-notch:before { content: $fa-var-circle-o-notch; } +.#{$fa-css-prefix}-ra:before, +.#{$fa-css-prefix}-rebel:before { content: $fa-var-rebel; } +.#{$fa-css-prefix}-ge:before, +.#{$fa-css-prefix}-empire:before { content: $fa-var-empire; } +.#{$fa-css-prefix}-git-square:before { content: $fa-var-git-square; } +.#{$fa-css-prefix}-git:before { content: $fa-var-git; } +.#{$fa-css-prefix}-hacker-news:before { content: $fa-var-hacker-news; } +.#{$fa-css-prefix}-tencent-weibo:before { content: $fa-var-tencent-weibo; } +.#{$fa-css-prefix}-qq:before { content: $fa-var-qq; } +.#{$fa-css-prefix}-wechat:before, +.#{$fa-css-prefix}-weixin:before { content: $fa-var-weixin; } +.#{$fa-css-prefix}-send:before, +.#{$fa-css-prefix}-paper-plane:before { content: $fa-var-paper-plane; } +.#{$fa-css-prefix}-send-o:before, +.#{$fa-css-prefix}-paper-plane-o:before { content: $fa-var-paper-plane-o; } +.#{$fa-css-prefix}-history:before { content: $fa-var-history; } +.#{$fa-css-prefix}-circle-thin:before { content: $fa-var-circle-thin; } +.#{$fa-css-prefix}-header:before { content: $fa-var-header; } +.#{$fa-css-prefix}-paragraph:before { content: $fa-var-paragraph; } +.#{$fa-css-prefix}-sliders:before { content: $fa-var-sliders; } +.#{$fa-css-prefix}-share-alt:before { content: $fa-var-share-alt; } +.#{$fa-css-prefix}-share-alt-square:before { content: $fa-var-share-alt-square; } +.#{$fa-css-prefix}-bomb:before { content: $fa-var-bomb; } +.#{$fa-css-prefix}-soccer-ball-o:before, +.#{$fa-css-prefix}-futbol-o:before { content: $fa-var-futbol-o; } +.#{$fa-css-prefix}-tty:before { content: $fa-var-tty; } +.#{$fa-css-prefix}-binoculars:before { content: $fa-var-binoculars; } +.#{$fa-css-prefix}-plug:before { content: $fa-var-plug; } +.#{$fa-css-prefix}-slideshare:before { content: $fa-var-slideshare; } +.#{$fa-css-prefix}-twitch:before { content: $fa-var-twitch; } +.#{$fa-css-prefix}-yelp:before { content: $fa-var-yelp; } +.#{$fa-css-prefix}-newspaper-o:before { content: $fa-var-newspaper-o; } +.#{$fa-css-prefix}-wifi:before { content: $fa-var-wifi; } +.#{$fa-css-prefix}-calculator:before { content: $fa-var-calculator; } +.#{$fa-css-prefix}-paypal:before { content: $fa-var-paypal; } +.#{$fa-css-prefix}-google-wallet:before { content: $fa-var-google-wallet; } +.#{$fa-css-prefix}-cc-visa:before { content: $fa-var-cc-visa; } +.#{$fa-css-prefix}-cc-mastercard:before { content: $fa-var-cc-mastercard; } +.#{$fa-css-prefix}-cc-discover:before { content: $fa-var-cc-discover; } +.#{$fa-css-prefix}-cc-amex:before { content: $fa-var-cc-amex; } +.#{$fa-css-prefix}-cc-paypal:before { content: $fa-var-cc-paypal; } +.#{$fa-css-prefix}-cc-stripe:before { content: $fa-var-cc-stripe; } +.#{$fa-css-prefix}-bell-slash:before { content: $fa-var-bell-slash; } +.#{$fa-css-prefix}-bell-slash-o:before { content: $fa-var-bell-slash-o; } +.#{$fa-css-prefix}-trash:before { content: $fa-var-trash; } +.#{$fa-css-prefix}-copyright:before { content: $fa-var-copyright; } +.#{$fa-css-prefix}-at:before { content: $fa-var-at; } +.#{$fa-css-prefix}-eyedropper:before { content: $fa-var-eyedropper; } +.#{$fa-css-prefix}-paint-brush:before { content: $fa-var-paint-brush; } +.#{$fa-css-prefix}-birthday-cake:before { content: $fa-var-birthday-cake; } +.#{$fa-css-prefix}-area-chart:before { content: $fa-var-area-chart; } +.#{$fa-css-prefix}-pie-chart:before { content: $fa-var-pie-chart; } +.#{$fa-css-prefix}-line-chart:before { content: $fa-var-line-chart; } +.#{$fa-css-prefix}-lastfm:before { content: $fa-var-lastfm; } +.#{$fa-css-prefix}-lastfm-square:before { content: $fa-var-lastfm-square; } +.#{$fa-css-prefix}-toggle-off:before { content: $fa-var-toggle-off; } +.#{$fa-css-prefix}-toggle-on:before { content: $fa-var-toggle-on; } +.#{$fa-css-prefix}-bicycle:before { content: $fa-var-bicycle; } +.#{$fa-css-prefix}-bus:before { content: $fa-var-bus; } +.#{$fa-css-prefix}-ioxhost:before { content: $fa-var-ioxhost; } +.#{$fa-css-prefix}-angellist:before { content: $fa-var-angellist; } +.#{$fa-css-prefix}-cc:before { content: $fa-var-cc; } +.#{$fa-css-prefix}-shekel:before, +.#{$fa-css-prefix}-sheqel:before, +.#{$fa-css-prefix}-ils:before { content: $fa-var-ils; } +.#{$fa-css-prefix}-meanpath:before { content: $fa-var-meanpath; } diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_larger.scss b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_larger.scss new file mode 100644 index 0000000..41e9a81 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_larger.scss @@ -0,0 +1,13 @@ +// Icon Sizes +// ------------------------- + +/* makes the font 33% larger relative to the icon container */ +.#{$fa-css-prefix}-lg { + font-size: (4em / 3); + line-height: (3em / 4); + vertical-align: -15%; +} +.#{$fa-css-prefix}-2x { font-size: 2em; } +.#{$fa-css-prefix}-3x { font-size: 3em; } +.#{$fa-css-prefix}-4x { font-size: 4em; } +.#{$fa-css-prefix}-5x { font-size: 5em; } diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_list.scss b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_list.scss new file mode 100644 index 0000000..7d1e4d5 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_list.scss @@ -0,0 +1,19 @@ +// List Icons +// ------------------------- + +.#{$fa-css-prefix}-ul { + padding-left: 0; + margin-left: $fa-li-width; + list-style-type: none; + > li { position: relative; } +} +.#{$fa-css-prefix}-li { + position: absolute; + left: -$fa-li-width; + width: $fa-li-width; + top: (2em / 14); + text-align: center; + &.#{$fa-css-prefix}-lg { + left: -$fa-li-width + (4em / 14); + } +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_mixins.scss b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_mixins.scss new file mode 100644 index 0000000..a139dfb --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_mixins.scss @@ -0,0 +1,25 @@ +// Mixins +// -------------------------- + +@mixin fa-icon() { + display: inline-block; + font: normal normal normal 14px/1 FontAwesome; // shortening font declaration + font-size: inherit; // can't have font-size inherit on line above, so need to override + text-rendering: auto; // optimizelegibility throws things off #1094 + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +@mixin fa-icon-rotate($degrees, $rotation) { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); + -webkit-transform: rotate($degrees); + -ms-transform: rotate($degrees); + transform: rotate($degrees); +} + +@mixin fa-icon-flip($horiz, $vert, $rotation) { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); + -webkit-transform: scale($horiz, $vert); + -ms-transform: scale($horiz, $vert); + transform: scale($horiz, $vert); +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_path.scss b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_path.scss new file mode 100644 index 0000000..fd21c35 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_path.scss @@ -0,0 +1,14 @@ +/* FONT PATH + * -------------------------- */ + +@font-face { + font-family: 'FontAwesome'; + src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); + src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), + url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), + url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), + url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); + //src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts + font-weight: normal; + font-style: normal; +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_rotated-flipped.scss b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_rotated-flipped.scss new file mode 100644 index 0000000..a3558fd --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_rotated-flipped.scss @@ -0,0 +1,20 @@ +// Rotated & Flipped Icons +// ------------------------- + +.#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } +.#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } +.#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } + +.#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } +.#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } + +// Hook for IE8-9 +// ------------------------- + +:root .#{$fa-css-prefix}-rotate-90, +:root .#{$fa-css-prefix}-rotate-180, +:root .#{$fa-css-prefix}-rotate-270, +:root .#{$fa-css-prefix}-flip-horizontal, +:root .#{$fa-css-prefix}-flip-vertical { + filter: none; +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_spinning.scss b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_spinning.scss new file mode 100644 index 0000000..002c5d5 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_spinning.scss @@ -0,0 +1,29 @@ +// Spinning Icons +// -------------------------- + +.#{$fa-css-prefix}-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; +} + +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} + +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_stacked.scss b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_stacked.scss new file mode 100644 index 0000000..aef7403 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_stacked.scss @@ -0,0 +1,20 @@ +// Stacked Icons +// ------------------------- + +.#{$fa-css-prefix}-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; +} +.#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} +.#{$fa-css-prefix}-stack-1x { line-height: inherit; } +.#{$fa-css-prefix}-stack-2x { font-size: 2em; } +.#{$fa-css-prefix}-inverse { color: $fa-inverse; } diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_variables.scss b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_variables.scss new file mode 100644 index 0000000..669c307 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/_variables.scss @@ -0,0 +1,561 @@ +// Variables +// -------------------------- + +$fa-font-path: "../fonts" !default; +//$fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts" !default; // for referencing Bootstrap CDN font files directly +$fa-css-prefix: fa !default; +$fa-version: "4.2.0" !default; +$fa-border-color: #eee !default; +$fa-inverse: #fff !default; +$fa-li-width: (30em / 14) !default; + +$fa-var-adjust: "\f042"; +$fa-var-adn: "\f170"; +$fa-var-align-center: "\f037"; +$fa-var-align-justify: "\f039"; +$fa-var-align-left: "\f036"; +$fa-var-align-right: "\f038"; +$fa-var-ambulance: "\f0f9"; +$fa-var-anchor: "\f13d"; +$fa-var-android: "\f17b"; +$fa-var-angellist: "\f209"; +$fa-var-angle-double-down: "\f103"; +$fa-var-angle-double-left: "\f100"; +$fa-var-angle-double-right: "\f101"; +$fa-var-angle-double-up: "\f102"; +$fa-var-angle-down: "\f107"; +$fa-var-angle-left: "\f104"; +$fa-var-angle-right: "\f105"; +$fa-var-angle-up: "\f106"; +$fa-var-apple: "\f179"; +$fa-var-archive: "\f187"; +$fa-var-area-chart: "\f1fe"; +$fa-var-arrow-circle-down: "\f0ab"; +$fa-var-arrow-circle-left: "\f0a8"; +$fa-var-arrow-circle-o-down: "\f01a"; +$fa-var-arrow-circle-o-left: "\f190"; +$fa-var-arrow-circle-o-right: "\f18e"; +$fa-var-arrow-circle-o-up: "\f01b"; +$fa-var-arrow-circle-right: "\f0a9"; +$fa-var-arrow-circle-up: "\f0aa"; +$fa-var-arrow-down: "\f063"; +$fa-var-arrow-left: "\f060"; +$fa-var-arrow-right: "\f061"; +$fa-var-arrow-up: "\f062"; +$fa-var-arrows: "\f047"; +$fa-var-arrows-alt: "\f0b2"; +$fa-var-arrows-h: "\f07e"; +$fa-var-arrows-v: "\f07d"; +$fa-var-asterisk: "\f069"; +$fa-var-at: "\f1fa"; +$fa-var-automobile: "\f1b9"; +$fa-var-backward: "\f04a"; +$fa-var-ban: "\f05e"; +$fa-var-bank: "\f19c"; +$fa-var-bar-chart: "\f080"; +$fa-var-bar-chart-o: "\f080"; +$fa-var-barcode: "\f02a"; +$fa-var-bars: "\f0c9"; +$fa-var-beer: "\f0fc"; +$fa-var-behance: "\f1b4"; +$fa-var-behance-square: "\f1b5"; +$fa-var-bell: "\f0f3"; +$fa-var-bell-o: "\f0a2"; +$fa-var-bell-slash: "\f1f6"; +$fa-var-bell-slash-o: "\f1f7"; +$fa-var-bicycle: "\f206"; +$fa-var-binoculars: "\f1e5"; +$fa-var-birthday-cake: "\f1fd"; +$fa-var-bitbucket: "\f171"; +$fa-var-bitbucket-square: "\f172"; +$fa-var-bitcoin: "\f15a"; +$fa-var-bold: "\f032"; +$fa-var-bolt: "\f0e7"; +$fa-var-bomb: "\f1e2"; +$fa-var-book: "\f02d"; +$fa-var-bookmark: "\f02e"; +$fa-var-bookmark-o: "\f097"; +$fa-var-briefcase: "\f0b1"; +$fa-var-btc: "\f15a"; +$fa-var-bug: "\f188"; +$fa-var-building: "\f1ad"; +$fa-var-building-o: "\f0f7"; +$fa-var-bullhorn: "\f0a1"; +$fa-var-bullseye: "\f140"; +$fa-var-bus: "\f207"; +$fa-var-cab: "\f1ba"; +$fa-var-calculator: "\f1ec"; +$fa-var-calendar: "\f073"; +$fa-var-calendar-o: "\f133"; +$fa-var-camera: "\f030"; +$fa-var-camera-retro: "\f083"; +$fa-var-car: "\f1b9"; +$fa-var-caret-down: "\f0d7"; +$fa-var-caret-left: "\f0d9"; +$fa-var-caret-right: "\f0da"; +$fa-var-caret-square-o-down: "\f150"; +$fa-var-caret-square-o-left: "\f191"; +$fa-var-caret-square-o-right: "\f152"; +$fa-var-caret-square-o-up: "\f151"; +$fa-var-caret-up: "\f0d8"; +$fa-var-cc: "\f20a"; +$fa-var-cc-amex: "\f1f3"; +$fa-var-cc-discover: "\f1f2"; +$fa-var-cc-mastercard: "\f1f1"; +$fa-var-cc-paypal: "\f1f4"; +$fa-var-cc-stripe: "\f1f5"; +$fa-var-cc-visa: "\f1f0"; +$fa-var-certificate: "\f0a3"; +$fa-var-chain: "\f0c1"; +$fa-var-chain-broken: "\f127"; +$fa-var-check: "\f00c"; +$fa-var-check-circle: "\f058"; +$fa-var-check-circle-o: "\f05d"; +$fa-var-check-square: "\f14a"; +$fa-var-check-square-o: "\f046"; +$fa-var-chevron-circle-down: "\f13a"; +$fa-var-chevron-circle-left: "\f137"; +$fa-var-chevron-circle-right: "\f138"; +$fa-var-chevron-circle-up: "\f139"; +$fa-var-chevron-down: "\f078"; +$fa-var-chevron-left: "\f053"; +$fa-var-chevron-right: "\f054"; +$fa-var-chevron-up: "\f077"; +$fa-var-child: "\f1ae"; +$fa-var-circle: "\f111"; +$fa-var-circle-o: "\f10c"; +$fa-var-circle-o-notch: "\f1ce"; +$fa-var-circle-thin: "\f1db"; +$fa-var-clipboard: "\f0ea"; +$fa-var-clock-o: "\f017"; +$fa-var-close: "\f00d"; +$fa-var-cloud: "\f0c2"; +$fa-var-cloud-download: "\f0ed"; +$fa-var-cloud-upload: "\f0ee"; +$fa-var-cny: "\f157"; +$fa-var-code: "\f121"; +$fa-var-code-fork: "\f126"; +$fa-var-codepen: "\f1cb"; +$fa-var-coffee: "\f0f4"; +$fa-var-cog: "\f013"; +$fa-var-cogs: "\f085"; +$fa-var-columns: "\f0db"; +$fa-var-comment: "\f075"; +$fa-var-comment-o: "\f0e5"; +$fa-var-comments: "\f086"; +$fa-var-comments-o: "\f0e6"; +$fa-var-compass: "\f14e"; +$fa-var-compress: "\f066"; +$fa-var-copy: "\f0c5"; +$fa-var-copyright: "\f1f9"; +$fa-var-credit-card: "\f09d"; +$fa-var-crop: "\f125"; +$fa-var-crosshairs: "\f05b"; +$fa-var-css3: "\f13c"; +$fa-var-cube: "\f1b2"; +$fa-var-cubes: "\f1b3"; +$fa-var-cut: "\f0c4"; +$fa-var-cutlery: "\f0f5"; +$fa-var-dashboard: "\f0e4"; +$fa-var-database: "\f1c0"; +$fa-var-dedent: "\f03b"; +$fa-var-delicious: "\f1a5"; +$fa-var-desktop: "\f108"; +$fa-var-deviantart: "\f1bd"; +$fa-var-digg: "\f1a6"; +$fa-var-dollar: "\f155"; +$fa-var-dot-circle-o: "\f192"; +$fa-var-download: "\f019"; +$fa-var-dribbble: "\f17d"; +$fa-var-dropbox: "\f16b"; +$fa-var-drupal: "\f1a9"; +$fa-var-edit: "\f044"; +$fa-var-eject: "\f052"; +$fa-var-ellipsis-h: "\f141"; +$fa-var-ellipsis-v: "\f142"; +$fa-var-empire: "\f1d1"; +$fa-var-envelope: "\f0e0"; +$fa-var-envelope-o: "\f003"; +$fa-var-envelope-square: "\f199"; +$fa-var-eraser: "\f12d"; +$fa-var-eur: "\f153"; +$fa-var-euro: "\f153"; +$fa-var-exchange: "\f0ec"; +$fa-var-exclamation: "\f12a"; +$fa-var-exclamation-circle: "\f06a"; +$fa-var-exclamation-triangle: "\f071"; +$fa-var-expand: "\f065"; +$fa-var-external-link: "\f08e"; +$fa-var-external-link-square: "\f14c"; +$fa-var-eye: "\f06e"; +$fa-var-eye-slash: "\f070"; +$fa-var-eyedropper: "\f1fb"; +$fa-var-facebook: "\f09a"; +$fa-var-facebook-square: "\f082"; +$fa-var-fast-backward: "\f049"; +$fa-var-fast-forward: "\f050"; +$fa-var-fax: "\f1ac"; +$fa-var-female: "\f182"; +$fa-var-fighter-jet: "\f0fb"; +$fa-var-file: "\f15b"; +$fa-var-file-archive-o: "\f1c6"; +$fa-var-file-audio-o: "\f1c7"; +$fa-var-file-code-o: "\f1c9"; +$fa-var-file-excel-o: "\f1c3"; +$fa-var-file-image-o: "\f1c5"; +$fa-var-file-movie-o: "\f1c8"; +$fa-var-file-o: "\f016"; +$fa-var-file-pdf-o: "\f1c1"; +$fa-var-file-photo-o: "\f1c5"; +$fa-var-file-picture-o: "\f1c5"; +$fa-var-file-powerpoint-o: "\f1c4"; +$fa-var-file-sound-o: "\f1c7"; +$fa-var-file-text: "\f15c"; +$fa-var-file-text-o: "\f0f6"; +$fa-var-file-video-o: "\f1c8"; +$fa-var-file-word-o: "\f1c2"; +$fa-var-file-zip-o: "\f1c6"; +$fa-var-files-o: "\f0c5"; +$fa-var-film: "\f008"; +$fa-var-filter: "\f0b0"; +$fa-var-fire: "\f06d"; +$fa-var-fire-extinguisher: "\f134"; +$fa-var-flag: "\f024"; +$fa-var-flag-checkered: "\f11e"; +$fa-var-flag-o: "\f11d"; +$fa-var-flash: "\f0e7"; +$fa-var-flask: "\f0c3"; +$fa-var-flickr: "\f16e"; +$fa-var-floppy-o: "\f0c7"; +$fa-var-folder: "\f07b"; +$fa-var-folder-o: "\f114"; +$fa-var-folder-open: "\f07c"; +$fa-var-folder-open-o: "\f115"; +$fa-var-font: "\f031"; +$fa-var-forward: "\f04e"; +$fa-var-foursquare: "\f180"; +$fa-var-frown-o: "\f119"; +$fa-var-futbol-o: "\f1e3"; +$fa-var-gamepad: "\f11b"; +$fa-var-gavel: "\f0e3"; +$fa-var-gbp: "\f154"; +$fa-var-ge: "\f1d1"; +$fa-var-gear: "\f013"; +$fa-var-gears: "\f085"; +$fa-var-gift: "\f06b"; +$fa-var-git: "\f1d3"; +$fa-var-git-square: "\f1d2"; +$fa-var-github: "\f09b"; +$fa-var-github-alt: "\f113"; +$fa-var-github-square: "\f092"; +$fa-var-gittip: "\f184"; +$fa-var-glass: "\f000"; +$fa-var-globe: "\f0ac"; +$fa-var-google: "\f1a0"; +$fa-var-google-plus: "\f0d5"; +$fa-var-google-plus-square: "\f0d4"; +$fa-var-google-wallet: "\f1ee"; +$fa-var-graduation-cap: "\f19d"; +$fa-var-group: "\f0c0"; +$fa-var-h-square: "\f0fd"; +$fa-var-hacker-news: "\f1d4"; +$fa-var-hand-o-down: "\f0a7"; +$fa-var-hand-o-left: "\f0a5"; +$fa-var-hand-o-right: "\f0a4"; +$fa-var-hand-o-up: "\f0a6"; +$fa-var-hdd-o: "\f0a0"; +$fa-var-header: "\f1dc"; +$fa-var-headphones: "\f025"; +$fa-var-heart: "\f004"; +$fa-var-heart-o: "\f08a"; +$fa-var-history: "\f1da"; +$fa-var-home: "\f015"; +$fa-var-hospital-o: "\f0f8"; +$fa-var-html5: "\f13b"; +$fa-var-ils: "\f20b"; +$fa-var-image: "\f03e"; +$fa-var-inbox: "\f01c"; +$fa-var-indent: "\f03c"; +$fa-var-info: "\f129"; +$fa-var-info-circle: "\f05a"; +$fa-var-inr: "\f156"; +$fa-var-instagram: "\f16d"; +$fa-var-institution: "\f19c"; +$fa-var-ioxhost: "\f208"; +$fa-var-italic: "\f033"; +$fa-var-joomla: "\f1aa"; +$fa-var-jpy: "\f157"; +$fa-var-jsfiddle: "\f1cc"; +$fa-var-key: "\f084"; +$fa-var-keyboard-o: "\f11c"; +$fa-var-krw: "\f159"; +$fa-var-language: "\f1ab"; +$fa-var-laptop: "\f109"; +$fa-var-lastfm: "\f202"; +$fa-var-lastfm-square: "\f203"; +$fa-var-leaf: "\f06c"; +$fa-var-legal: "\f0e3"; +$fa-var-lemon-o: "\f094"; +$fa-var-level-down: "\f149"; +$fa-var-level-up: "\f148"; +$fa-var-life-bouy: "\f1cd"; +$fa-var-life-buoy: "\f1cd"; +$fa-var-life-ring: "\f1cd"; +$fa-var-life-saver: "\f1cd"; +$fa-var-lightbulb-o: "\f0eb"; +$fa-var-line-chart: "\f201"; +$fa-var-link: "\f0c1"; +$fa-var-linkedin: "\f0e1"; +$fa-var-linkedin-square: "\f08c"; +$fa-var-linux: "\f17c"; +$fa-var-list: "\f03a"; +$fa-var-list-alt: "\f022"; +$fa-var-list-ol: "\f0cb"; +$fa-var-list-ul: "\f0ca"; +$fa-var-location-arrow: "\f124"; +$fa-var-lock: "\f023"; +$fa-var-long-arrow-down: "\f175"; +$fa-var-long-arrow-left: "\f177"; +$fa-var-long-arrow-right: "\f178"; +$fa-var-long-arrow-up: "\f176"; +$fa-var-magic: "\f0d0"; +$fa-var-magnet: "\f076"; +$fa-var-mail-forward: "\f064"; +$fa-var-mail-reply: "\f112"; +$fa-var-mail-reply-all: "\f122"; +$fa-var-male: "\f183"; +$fa-var-map-marker: "\f041"; +$fa-var-maxcdn: "\f136"; +$fa-var-meanpath: "\f20c"; +$fa-var-medkit: "\f0fa"; +$fa-var-meh-o: "\f11a"; +$fa-var-microphone: "\f130"; +$fa-var-microphone-slash: "\f131"; +$fa-var-minus: "\f068"; +$fa-var-minus-circle: "\f056"; +$fa-var-minus-square: "\f146"; +$fa-var-minus-square-o: "\f147"; +$fa-var-mobile: "\f10b"; +$fa-var-mobile-phone: "\f10b"; +$fa-var-money: "\f0d6"; +$fa-var-moon-o: "\f186"; +$fa-var-mortar-board: "\f19d"; +$fa-var-music: "\f001"; +$fa-var-navicon: "\f0c9"; +$fa-var-newspaper-o: "\f1ea"; +$fa-var-openid: "\f19b"; +$fa-var-outdent: "\f03b"; +$fa-var-pagelines: "\f18c"; +$fa-var-paint-brush: "\f1fc"; +$fa-var-paper-plane: "\f1d8"; +$fa-var-paper-plane-o: "\f1d9"; +$fa-var-paperclip: "\f0c6"; +$fa-var-paragraph: "\f1dd"; +$fa-var-paste: "\f0ea"; +$fa-var-pause: "\f04c"; +$fa-var-paw: "\f1b0"; +$fa-var-paypal: "\f1ed"; +$fa-var-pencil: "\f040"; +$fa-var-pencil-square: "\f14b"; +$fa-var-pencil-square-o: "\f044"; +$fa-var-phone: "\f095"; +$fa-var-phone-square: "\f098"; +$fa-var-photo: "\f03e"; +$fa-var-picture-o: "\f03e"; +$fa-var-pie-chart: "\f200"; +$fa-var-pied-piper: "\f1a7"; +$fa-var-pied-piper-alt: "\f1a8"; +$fa-var-pinterest: "\f0d2"; +$fa-var-pinterest-square: "\f0d3"; +$fa-var-plane: "\f072"; +$fa-var-play: "\f04b"; +$fa-var-play-circle: "\f144"; +$fa-var-play-circle-o: "\f01d"; +$fa-var-plug: "\f1e6"; +$fa-var-plus: "\f067"; +$fa-var-plus-circle: "\f055"; +$fa-var-plus-square: "\f0fe"; +$fa-var-plus-square-o: "\f196"; +$fa-var-power-off: "\f011"; +$fa-var-print: "\f02f"; +$fa-var-puzzle-piece: "\f12e"; +$fa-var-qq: "\f1d6"; +$fa-var-qrcode: "\f029"; +$fa-var-question: "\f128"; +$fa-var-question-circle: "\f059"; +$fa-var-quote-left: "\f10d"; +$fa-var-quote-right: "\f10e"; +$fa-var-ra: "\f1d0"; +$fa-var-random: "\f074"; +$fa-var-rebel: "\f1d0"; +$fa-var-recycle: "\f1b8"; +$fa-var-reddit: "\f1a1"; +$fa-var-reddit-square: "\f1a2"; +$fa-var-refresh: "\f021"; +$fa-var-remove: "\f00d"; +$fa-var-renren: "\f18b"; +$fa-var-reorder: "\f0c9"; +$fa-var-repeat: "\f01e"; +$fa-var-reply: "\f112"; +$fa-var-reply-all: "\f122"; +$fa-var-retweet: "\f079"; +$fa-var-rmb: "\f157"; +$fa-var-road: "\f018"; +$fa-var-rocket: "\f135"; +$fa-var-rotate-left: "\f0e2"; +$fa-var-rotate-right: "\f01e"; +$fa-var-rouble: "\f158"; +$fa-var-rss: "\f09e"; +$fa-var-rss-square: "\f143"; +$fa-var-rub: "\f158"; +$fa-var-ruble: "\f158"; +$fa-var-rupee: "\f156"; +$fa-var-save: "\f0c7"; +$fa-var-scissors: "\f0c4"; +$fa-var-search: "\f002"; +$fa-var-search-minus: "\f010"; +$fa-var-search-plus: "\f00e"; +$fa-var-send: "\f1d8"; +$fa-var-send-o: "\f1d9"; +$fa-var-share: "\f064"; +$fa-var-share-alt: "\f1e0"; +$fa-var-share-alt-square: "\f1e1"; +$fa-var-share-square: "\f14d"; +$fa-var-share-square-o: "\f045"; +$fa-var-shekel: "\f20b"; +$fa-var-sheqel: "\f20b"; +$fa-var-shield: "\f132"; +$fa-var-shopping-cart: "\f07a"; +$fa-var-sign-in: "\f090"; +$fa-var-sign-out: "\f08b"; +$fa-var-signal: "\f012"; +$fa-var-sitemap: "\f0e8"; +$fa-var-skype: "\f17e"; +$fa-var-slack: "\f198"; +$fa-var-sliders: "\f1de"; +$fa-var-slideshare: "\f1e7"; +$fa-var-smile-o: "\f118"; +$fa-var-soccer-ball-o: "\f1e3"; +$fa-var-sort: "\f0dc"; +$fa-var-sort-alpha-asc: "\f15d"; +$fa-var-sort-alpha-desc: "\f15e"; +$fa-var-sort-amount-asc: "\f160"; +$fa-var-sort-amount-desc: "\f161"; +$fa-var-sort-asc: "\f0de"; +$fa-var-sort-desc: "\f0dd"; +$fa-var-sort-down: "\f0dd"; +$fa-var-sort-numeric-asc: "\f162"; +$fa-var-sort-numeric-desc: "\f163"; +$fa-var-sort-up: "\f0de"; +$fa-var-soundcloud: "\f1be"; +$fa-var-space-shuttle: "\f197"; +$fa-var-spinner: "\f110"; +$fa-var-spoon: "\f1b1"; +$fa-var-spotify: "\f1bc"; +$fa-var-square: "\f0c8"; +$fa-var-square-o: "\f096"; +$fa-var-stack-exchange: "\f18d"; +$fa-var-stack-overflow: "\f16c"; +$fa-var-star: "\f005"; +$fa-var-star-half: "\f089"; +$fa-var-star-half-empty: "\f123"; +$fa-var-star-half-full: "\f123"; +$fa-var-star-half-o: "\f123"; +$fa-var-star-o: "\f006"; +$fa-var-steam: "\f1b6"; +$fa-var-steam-square: "\f1b7"; +$fa-var-step-backward: "\f048"; +$fa-var-step-forward: "\f051"; +$fa-var-stethoscope: "\f0f1"; +$fa-var-stop: "\f04d"; +$fa-var-strikethrough: "\f0cc"; +$fa-var-stumbleupon: "\f1a4"; +$fa-var-stumbleupon-circle: "\f1a3"; +$fa-var-subscript: "\f12c"; +$fa-var-suitcase: "\f0f2"; +$fa-var-sun-o: "\f185"; +$fa-var-superscript: "\f12b"; +$fa-var-support: "\f1cd"; +$fa-var-table: "\f0ce"; +$fa-var-tablet: "\f10a"; +$fa-var-tachometer: "\f0e4"; +$fa-var-tag: "\f02b"; +$fa-var-tags: "\f02c"; +$fa-var-tasks: "\f0ae"; +$fa-var-taxi: "\f1ba"; +$fa-var-tencent-weibo: "\f1d5"; +$fa-var-terminal: "\f120"; +$fa-var-text-height: "\f034"; +$fa-var-text-width: "\f035"; +$fa-var-th: "\f00a"; +$fa-var-th-large: "\f009"; +$fa-var-th-list: "\f00b"; +$fa-var-thumb-tack: "\f08d"; +$fa-var-thumbs-down: "\f165"; +$fa-var-thumbs-o-down: "\f088"; +$fa-var-thumbs-o-up: "\f087"; +$fa-var-thumbs-up: "\f164"; +$fa-var-ticket: "\f145"; +$fa-var-times: "\f00d"; +$fa-var-times-circle: "\f057"; +$fa-var-times-circle-o: "\f05c"; +$fa-var-tint: "\f043"; +$fa-var-toggle-down: "\f150"; +$fa-var-toggle-left: "\f191"; +$fa-var-toggle-off: "\f204"; +$fa-var-toggle-on: "\f205"; +$fa-var-toggle-right: "\f152"; +$fa-var-toggle-up: "\f151"; +$fa-var-trash: "\f1f8"; +$fa-var-trash-o: "\f014"; +$fa-var-tree: "\f1bb"; +$fa-var-trello: "\f181"; +$fa-var-trophy: "\f091"; +$fa-var-truck: "\f0d1"; +$fa-var-try: "\f195"; +$fa-var-tty: "\f1e4"; +$fa-var-tumblr: "\f173"; +$fa-var-tumblr-square: "\f174"; +$fa-var-turkish-lira: "\f195"; +$fa-var-twitch: "\f1e8"; +$fa-var-twitter: "\f099"; +$fa-var-twitter-square: "\f081"; +$fa-var-umbrella: "\f0e9"; +$fa-var-underline: "\f0cd"; +$fa-var-undo: "\f0e2"; +$fa-var-university: "\f19c"; +$fa-var-unlink: "\f127"; +$fa-var-unlock: "\f09c"; +$fa-var-unlock-alt: "\f13e"; +$fa-var-unsorted: "\f0dc"; +$fa-var-upload: "\f093"; +$fa-var-usd: "\f155"; +$fa-var-user: "\f007"; +$fa-var-user-md: "\f0f0"; +$fa-var-users: "\f0c0"; +$fa-var-video-camera: "\f03d"; +$fa-var-vimeo-square: "\f194"; +$fa-var-vine: "\f1ca"; +$fa-var-vk: "\f189"; +$fa-var-volume-down: "\f027"; +$fa-var-volume-off: "\f026"; +$fa-var-volume-up: "\f028"; +$fa-var-warning: "\f071"; +$fa-var-wechat: "\f1d7"; +$fa-var-weibo: "\f18a"; +$fa-var-weixin: "\f1d7"; +$fa-var-wheelchair: "\f193"; +$fa-var-wifi: "\f1eb"; +$fa-var-windows: "\f17a"; +$fa-var-won: "\f159"; +$fa-var-wordpress: "\f19a"; +$fa-var-wrench: "\f0ad"; +$fa-var-xing: "\f168"; +$fa-var-xing-square: "\f169"; +$fa-var-yahoo: "\f19e"; +$fa-var-yelp: "\f1e9"; +$fa-var-yen: "\f157"; +$fa-var-youtube: "\f167"; +$fa-var-youtube-play: "\f16a"; +$fa-var-youtube-square: "\f166"; + diff --git a/osrframework/static/css/fonts/font-awesome-4.2.0/scss/font-awesome.scss b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/font-awesome.scss new file mode 100644 index 0000000..f300c09 --- /dev/null +++ b/osrframework/static/css/fonts/font-awesome-4.2.0/scss/font-awesome.scss @@ -0,0 +1,17 @@ +/*! + * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */ + +@import "variables"; +@import "mixins"; +@import "path"; +@import "core"; +@import "larger"; +@import "fixed-width"; +@import "list"; +@import "bordered-pulled"; +@import "spinning"; +@import "rotated-flipped"; +@import "stacked"; +@import "icons"; diff --git a/osrframework/static/css/img/breadcrumbs-bg.gif b/osrframework/static/css/img/breadcrumbs-bg.gif new file mode 100755 index 0000000..669dd15 Binary files /dev/null and b/osrframework/static/css/img/breadcrumbs-bg.gif differ diff --git a/osrframework/static/css/img/bx_loader.gif b/osrframework/static/css/img/bx_loader.gif new file mode 100755 index 0000000..f4ff40e Binary files /dev/null and b/osrframework/static/css/img/bx_loader.gif differ diff --git a/osrframework/static/css/img/fancybox/blank.gif b/osrframework/static/css/img/fancybox/blank.gif new file mode 100755 index 0000000..35d42e8 Binary files /dev/null and b/osrframework/static/css/img/fancybox/blank.gif differ diff --git a/osrframework/static/css/img/fancybox/jquery.easing-1.3.pack.js b/osrframework/static/css/img/fancybox/jquery.easing-1.3.pack.js new file mode 100755 index 0000000..9028179 --- /dev/null +++ b/osrframework/static/css/img/fancybox/jquery.easing-1.3.pack.js @@ -0,0 +1,72 @@ +/* + * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ + * + * Uses the built in easing capabilities added In jQuery 1.1 + * to offer multiple easing options + * + * TERMS OF USE - jQuery Easing + * + * Open source under the BSD License. + * + * Copyright © 2008 George McGinley Smith + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the author nor the names of contributors may be used to endorse + * or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * +*/ + +// t: current time, b: begInnIng value, c: change In value, d: duration +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t')[0], { prop: 0 }), + + isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest, + + /* + * Private methods + */ + + _abort = function() { + loading.hide(); + + imgPreloader.onerror = imgPreloader.onload = null; + + if (ajaxLoader) { + ajaxLoader.abort(); + } + + tmp.empty(); + }, + + _error = function() { + if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) { + loading.hide(); + busy = false; + return; + } + + selectedOpts.titleShow = false; + + selectedOpts.width = 'auto'; + selectedOpts.height = 'auto'; + + tmp.html( '

The requested content cannot be loaded.
Please try again later.

' ); + + _process_inline(); + }, + + _start = function() { + var obj = selectedArray[ selectedIndex ], + href, + type, + title, + str, + emb, + ret; + + _abort(); + + selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox'))); + + ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts); + + if (ret === false) { + busy = false; + return; + } else if (typeof ret == 'object') { + selectedOpts = $.extend(selectedOpts, ret); + } + + title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || ''; + + if (obj.nodeName && !selectedOpts.orig) { + selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj); + } + + if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) { + title = selectedOpts.orig.attr('alt'); + } + + href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null; + + if ((/^(?:javascript)/i).test(href) || href == '#') { + href = null; + } + + if (selectedOpts.type) { + type = selectedOpts.type; + + if (!href) { + href = selectedOpts.content; + } + + } else if (selectedOpts.content) { + type = 'html'; + + } else if (href) { + if (href.match(imgRegExp)) { + type = 'image'; + + } else if (href.match(swfRegExp)) { + type = 'swf'; + + } else if ($(obj).hasClass("iframe")) { + type = 'iframe'; + + } else if (href.indexOf("#") === 0) { + type = 'inline'; + + } else { + type = 'ajax'; + } + } + + if (!type) { + _error(); + return; + } + + if (type == 'inline') { + obj = href.substr(href.indexOf("#")); + type = $(obj).length > 0 ? 'inline' : 'ajax'; + } + + selectedOpts.type = type; + selectedOpts.href = href; + selectedOpts.title = title; + + if (selectedOpts.autoDimensions) { + if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') { + selectedOpts.width = 'auto'; + selectedOpts.height = 'auto'; + } else { + selectedOpts.autoDimensions = false; + } + } + + if (selectedOpts.modal) { + selectedOpts.overlayShow = true; + selectedOpts.hideOnOverlayClick = false; + selectedOpts.hideOnContentClick = false; + selectedOpts.enableEscapeButton = false; + selectedOpts.showCloseButton = false; + } + + selectedOpts.padding = parseInt(selectedOpts.padding, 10); + selectedOpts.margin = parseInt(selectedOpts.margin, 10); + + tmp.css('padding', (selectedOpts.padding + selectedOpts.margin)); + + $('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() { + $(this).replaceWith(content.children()); + }); + + switch (type) { + case 'html' : + tmp.html( selectedOpts.content ); + _process_inline(); + break; + + case 'inline' : + if ( $(obj).parent().is('#fancybox-content') === true) { + busy = false; + return; + } + + $('
') + .hide() + .insertBefore( $(obj) ) + .bind('fancybox-cleanup', function() { + $(this).replaceWith(content.children()); + }).bind('fancybox-cancel', function() { + $(this).replaceWith(tmp.children()); + }); + + $(obj).appendTo(tmp); + + _process_inline(); + break; + + case 'image': + busy = false; + + $.fancybox.showActivity(); + + imgPreloader = new Image(); + + imgPreloader.onerror = function() { + _error(); + }; + + imgPreloader.onload = function() { + busy = true; + + imgPreloader.onerror = imgPreloader.onload = null; + + _process_image(); + }; + + imgPreloader.src = href; + break; + + case 'swf': + selectedOpts.scrolling = 'no'; + + str = ''; + emb = ''; + + $.each(selectedOpts.swf, function(name, val) { + str += ''; + emb += ' ' + name + '="' + val + '"'; + }); + + str += ''; + + tmp.html(str); + + _process_inline(); + break; + + case 'ajax': + busy = false; + + $.fancybox.showActivity(); + + selectedOpts.ajax.win = selectedOpts.ajax.success; + + ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, { + url : href, + data : selectedOpts.ajax.data || {}, + error : function(XMLHttpRequest, textStatus, errorThrown) { + if ( XMLHttpRequest.status > 0 ) { + _error(); + } + }, + success : function(data, textStatus, XMLHttpRequest) { + var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader; + if (o.status == 200) { + if ( typeof selectedOpts.ajax.win == 'function' ) { + ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest); + + if (ret === false) { + loading.hide(); + return; + } else if (typeof ret == 'string' || typeof ret == 'object') { + data = ret; + } + } + + tmp.html( data ); + _process_inline(); + } + } + })); + + break; + + case 'iframe': + _show(); + break; + } + }, + + _process_inline = function() { + var + w = selectedOpts.width, + h = selectedOpts.height; + + if (w.toString().indexOf('%') > -1) { + w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px'; + + } else { + w = w == 'auto' ? 'auto' : w + 'px'; + } + + if (h.toString().indexOf('%') > -1) { + h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px'; + + } else { + h = h == 'auto' ? 'auto' : h + 'px'; + } + + tmp.wrapInner('
'); + + selectedOpts.width = tmp.width(); + selectedOpts.height = tmp.height(); + + _show(); + }, + + _process_image = function() { + selectedOpts.width = imgPreloader.width; + selectedOpts.height = imgPreloader.height; + + $("").attr({ + 'id' : 'fancybox-img', + 'src' : imgPreloader.src, + 'alt' : selectedOpts.title + }).appendTo( tmp ); + + _show(); + }, + + _show = function() { + var pos, equal; + + loading.hide(); + + if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) { + $.event.trigger('fancybox-cancel'); + + busy = false; + return; + } + + busy = true; + + $(content.add( overlay )).unbind(); + + $(window).unbind("resize.fb scroll.fb"); + $(document).unbind('keydown.fb'); + + if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') { + wrap.css('height', wrap.height()); + } + + currentArray = selectedArray; + currentIndex = selectedIndex; + currentOpts = selectedOpts; + + if (currentOpts.overlayShow) { + overlay.css({ + 'background-color' : currentOpts.overlayColor, + 'opacity' : currentOpts.overlayOpacity, + 'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto', + 'height' : $(document).height() + }); + + if (!overlay.is(':visible')) { + if (isIE6) { + $('select:not(#fancybox-tmp select)').filter(function() { + return this.style.visibility !== 'hidden'; + }).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() { + this.style.visibility = 'inherit'; + }); + } + + overlay.show(); + } + } else { + overlay.hide(); + } + + final_pos = _get_zoom_to(); + + _process_title(); + + if (wrap.is(":visible")) { + $( close.add( nav_left ).add( nav_right ) ).hide(); + + pos = wrap.position(), + + start_pos = { + top : pos.top, + left : pos.left, + width : wrap.width(), + height : wrap.height() + }; + + equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height); + + content.fadeTo(currentOpts.changeFade, 0.3, function() { + var finish_resizing = function() { + content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish); + }; + + $.event.trigger('fancybox-change'); + + content + .empty() + .removeAttr('filter') + .css({ + 'border-width' : currentOpts.padding, + 'width' : final_pos.width - currentOpts.padding * 2, + 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2 + }); + + if (equal) { + finish_resizing(); + + } else { + fx.prop = 0; + + $(fx).animate({prop: 1}, { + duration : currentOpts.changeSpeed, + easing : currentOpts.easingChange, + step : _draw, + complete : finish_resizing + }); + } + }); + + return; + } + + wrap.removeAttr("style"); + + content.css('border-width', currentOpts.padding); + + if (currentOpts.transitionIn == 'elastic') { + start_pos = _get_zoom_from(); + + content.html( tmp.contents() ); + + wrap.show(); + + if (currentOpts.opacity) { + final_pos.opacity = 0; + } + + fx.prop = 0; + + $(fx).animate({prop: 1}, { + duration : currentOpts.speedIn, + easing : currentOpts.easingIn, + step : _draw, + complete : _finish + }); + + return; + } + + if (currentOpts.titlePosition == 'inside' && titleHeight > 0) { + title.show(); + } + + content + .css({ + 'width' : final_pos.width - currentOpts.padding * 2, + 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2 + }) + .html( tmp.contents() ); + + wrap + .css(final_pos) + .fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish ); + }, + + _format_title = function(title) { + if (title && title.length) { + if (currentOpts.titlePosition == 'float') { + return '
' + title + '
'; + } + + return '
' + title + '
'; + } + + return false; + }, + + _process_title = function() { + titleStr = currentOpts.title || ''; + titleHeight = 0; + + title + .empty() + .removeAttr('style') + .removeClass(); + + if (currentOpts.titleShow === false) { + title.hide(); + return; + } + + titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr); + + if (!titleStr || titleStr === '') { + title.hide(); + return; + } + + title + .addClass('fancybox-title-' + currentOpts.titlePosition) + .html( titleStr ) + .appendTo( 'body' ) + .show(); + + switch (currentOpts.titlePosition) { + case 'inside': + title + .css({ + 'width' : final_pos.width - (currentOpts.padding * 2), + 'marginLeft' : currentOpts.padding, + 'marginRight' : currentOpts.padding + }); + + titleHeight = title.outerHeight(true); + + title.appendTo( outer ); + + final_pos.height += titleHeight; + break; + + case 'over': + title + .css({ + 'marginLeft' : currentOpts.padding, + 'width' : final_pos.width - (currentOpts.padding * 2), + 'bottom' : currentOpts.padding + }) + .appendTo( outer ); + break; + + case 'float': + title + .css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1) + .appendTo( wrap ); + break; + + default: + title + .css({ + 'width' : final_pos.width - (currentOpts.padding * 2), + 'paddingLeft' : currentOpts.padding, + 'paddingRight' : currentOpts.padding + }) + .appendTo( wrap ); + break; + } + + title.hide(); + }, + + _set_navigation = function() { + if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) { + $(document).bind('keydown.fb', function(e) { + if (e.keyCode == 27 && currentOpts.enableEscapeButton) { + e.preventDefault(); + $.fancybox.close(); + + } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') { + e.preventDefault(); + $.fancybox[ e.keyCode == 37 ? 'prev' : 'next'](); + } + }); + } + + if (!currentOpts.showNavArrows) { + nav_left.hide(); + nav_right.hide(); + return; + } + + if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) { + nav_left.show(); + } + + if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) { + nav_right.show(); + } + }, + + _finish = function () { + if (!$.support.opacity) { + content.get(0).style.removeAttribute('filter'); + wrap.get(0).style.removeAttribute('filter'); + } + + if (selectedOpts.autoDimensions) { + content.css('height', 'auto'); + } + + wrap.css('height', 'auto'); + + if (titleStr && titleStr.length) { + title.show(); + } + + if (currentOpts.showCloseButton) { + close.show(); + } + + _set_navigation(); + + if (currentOpts.hideOnContentClick) { + content.bind('click', $.fancybox.close); + } + + if (currentOpts.hideOnOverlayClick) { + overlay.bind('click', $.fancybox.close); + } + + $(window).bind("resize.fb", $.fancybox.resize); + + if (currentOpts.centerOnScroll) { + $(window).bind("scroll.fb", $.fancybox.center); + } + + if (currentOpts.type == 'iframe') { + $('').appendTo(content); + } + + wrap.show(); + + busy = false; + + $.fancybox.center(); + + currentOpts.onComplete(currentArray, currentIndex, currentOpts); + + _preload_images(); + }, + + _preload_images = function() { + var href, + objNext; + + if ((currentArray.length -1) > currentIndex) { + href = currentArray[ currentIndex + 1 ].href; + + if (typeof href !== 'undefined' && href.match(imgRegExp)) { + objNext = new Image(); + objNext.src = href; + } + } + + if (currentIndex > 0) { + href = currentArray[ currentIndex - 1 ].href; + + if (typeof href !== 'undefined' && href.match(imgRegExp)) { + objNext = new Image(); + objNext.src = href; + } + } + }, + + _draw = function(pos) { + var dim = { + width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10), + height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10), + + top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10), + left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10) + }; + + if (typeof final_pos.opacity !== 'undefined') { + dim.opacity = pos < 0.5 ? 0.5 : pos; + } + + wrap.css(dim); + + content.css({ + 'width' : dim.width - currentOpts.padding * 2, + 'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2 + }); + }, + + _get_viewport = function() { + return [ + $(window).width() - (currentOpts.margin * 2), + $(window).height() - (currentOpts.margin * 2), + $(document).scrollLeft() + currentOpts.margin, + $(document).scrollTop() + currentOpts.margin + ]; + }, + + _get_zoom_to = function () { + var view = _get_viewport(), + to = {}, + resize = currentOpts.autoScale, + double_padding = currentOpts.padding * 2, + ratio; + + if (currentOpts.width.toString().indexOf('%') > -1) { + to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10); + } else { + to.width = currentOpts.width + double_padding; + } + + if (currentOpts.height.toString().indexOf('%') > -1) { + to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10); + } else { + to.height = currentOpts.height + double_padding; + } + + if (resize && (to.width > view[0] || to.height > view[1])) { + if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') { + ratio = (currentOpts.width ) / (currentOpts.height ); + + if ((to.width ) > view[0]) { + to.width = view[0]; + to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10); + } + + if ((to.height) > view[1]) { + to.height = view[1]; + to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10); + } + + } else { + to.width = Math.min(to.width, view[0]); + to.height = Math.min(to.height, view[1]); + } + } + + to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10); + to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10); + + return to; + }, + + _get_obj_pos = function(obj) { + var pos = obj.offset(); + + pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0; + pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0; + + pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0; + pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0; + + pos.width = obj.width(); + pos.height = obj.height(); + + return pos; + }, + + _get_zoom_from = function() { + var orig = selectedOpts.orig ? $(selectedOpts.orig) : false, + from = {}, + pos, + view; + + if (orig && orig.length) { + pos = _get_obj_pos(orig); + + from = { + width : pos.width + (currentOpts.padding * 2), + height : pos.height + (currentOpts.padding * 2), + top : pos.top - currentOpts.padding - 20, + left : pos.left - currentOpts.padding - 20 + }; + + } else { + view = _get_viewport(); + + from = { + width : currentOpts.padding * 2, + height : currentOpts.padding * 2, + top : parseInt(view[3] + view[1] * 0.5, 10), + left : parseInt(view[2] + view[0] * 0.5, 10) + }; + } + + return from; + }, + + _animate_loading = function() { + if (!loading.is(':visible')){ + clearInterval(loadingTimer); + return; + } + + $('div', loading).css('top', (loadingFrame * -40) + 'px'); + + loadingFrame = (loadingFrame + 1) % 12; + }; + + /* + * Public methods + */ + + $.fn.fancybox = function(options) { + if (!$(this).length) { + return this; + } + + $(this) + .data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {}))) + .unbind('click.fb') + .bind('click.fb', function(e) { + e.preventDefault(); + + if (busy) { + return; + } + + busy = true; + + $(this).blur(); + + selectedArray = []; + selectedIndex = 0; + + var rel = $(this).attr('rel') || ''; + + if (!rel || rel == '' || rel === 'nofollow') { + selectedArray.push(this); + + } else { + selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]"); + selectedIndex = selectedArray.index( this ); + } + + _start(); + + return; + }); + + return this; + }; + + $.fancybox = function(obj) { + var opts; + + if (busy) { + return; + } + + busy = true; + opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {}; + + selectedArray = []; + selectedIndex = parseInt(opts.index, 10) || 0; + + if ($.isArray(obj)) { + for (var i = 0, j = obj.length; i < j; i++) { + if (typeof obj[i] == 'object') { + $(obj[i]).data('fancybox', $.extend({}, opts, obj[i])); + } else { + obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts)); + } + } + + selectedArray = jQuery.merge(selectedArray, obj); + + } else { + if (typeof obj == 'object') { + $(obj).data('fancybox', $.extend({}, opts, obj)); + } else { + obj = $({}).data('fancybox', $.extend({content : obj}, opts)); + } + + selectedArray.push(obj); + } + + if (selectedIndex > selectedArray.length || selectedIndex < 0) { + selectedIndex = 0; + } + + _start(); + }; + + $.fancybox.showActivity = function() { + clearInterval(loadingTimer); + + loading.show(); + loadingTimer = setInterval(_animate_loading, 66); + }; + + $.fancybox.hideActivity = function() { + loading.hide(); + }; + + $.fancybox.next = function() { + return $.fancybox.pos( currentIndex + 1); + }; + + $.fancybox.prev = function() { + return $.fancybox.pos( currentIndex - 1); + }; + + $.fancybox.pos = function(pos) { + if (busy) { + return; + } + + pos = parseInt(pos); + + selectedArray = currentArray; + + if (pos > -1 && pos < currentArray.length) { + selectedIndex = pos; + _start(); + + } else if (currentOpts.cyclic && currentArray.length > 1) { + selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1; + _start(); + } + + return; + }; + + $.fancybox.cancel = function() { + if (busy) { + return; + } + + busy = true; + + $.event.trigger('fancybox-cancel'); + + _abort(); + + selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts); + + busy = false; + }; + + // Note: within an iframe use - parent.$.fancybox.close(); + $.fancybox.close = function() { + if (busy || wrap.is(':hidden')) { + return; + } + + busy = true; + + if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) { + busy = false; + return; + } + + _abort(); + + $(close.add( nav_left ).add( nav_right )).hide(); + + $(content.add( overlay )).unbind(); + + $(window).unbind("resize.fb scroll.fb"); + $(document).unbind('keydown.fb'); + + content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank'); + + if (currentOpts.titlePosition !== 'inside') { + title.empty(); + } + + wrap.stop(); + + function _cleanup() { + overlay.fadeOut('fast'); + + title.empty().hide(); + wrap.hide(); + + $.event.trigger('fancybox-cleanup'); + + content.empty(); + + currentOpts.onClosed(currentArray, currentIndex, currentOpts); + + currentArray = selectedOpts = []; + currentIndex = selectedIndex = 0; + currentOpts = selectedOpts = {}; + + busy = false; + } + + if (currentOpts.transitionOut == 'elastic') { + start_pos = _get_zoom_from(); + + var pos = wrap.position(); + + final_pos = { + top : pos.top , + left : pos.left, + width : wrap.width(), + height : wrap.height() + }; + + if (currentOpts.opacity) { + final_pos.opacity = 1; + } + + title.empty().hide(); + + fx.prop = 1; + + $(fx).animate({ prop: 0 }, { + duration : currentOpts.speedOut, + easing : currentOpts.easingOut, + step : _draw, + complete : _cleanup + }); + + } else { + wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup); + } + }; + + $.fancybox.resize = function() { + if (overlay.is(':visible')) { + overlay.css('height', $(document).height()); + } + + $.fancybox.center(true); + }; + + $.fancybox.center = function() { + var view, align; + + if (busy) { + return; + } + + align = arguments[0] === true ? 1 : 0; + view = _get_viewport(); + + if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) { + return; + } + + wrap + .stop() + .animate({ + 'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)), + 'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding)) + }, typeof arguments[0] == 'number' ? arguments[0] : 200); + }; + + $.fancybox.init = function() { + if ($("#fancybox-wrap").length) { + return; + } + + $('body').append( + tmp = $('
'), + loading = $('
'), + overlay = $('
'), + wrap = $('
') + ); + + outer = $('
') + .append('
') + .appendTo( wrap ); + + outer.append( + content = $('
'), + close = $(''), + title = $('
'), + + nav_left = $(''), + nav_right = $('') + ); + + close.click($.fancybox.close); + loading.click($.fancybox.cancel); + + nav_left.click(function(e) { + e.preventDefault(); + $.fancybox.prev(); + }); + + nav_right.click(function(e) { + e.preventDefault(); + $.fancybox.next(); + }); + + if ($.fn.mousewheel) { + wrap.bind('mousewheel.fb', function(e, delta) { + if (busy) { + e.preventDefault(); + + } else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) { + e.preventDefault(); + $.fancybox[ delta > 0 ? 'prev' : 'next'](); + } + }); + } + + if (!$.support.opacity) { + wrap.addClass('fancybox-ie'); + } + + if (isIE6) { + loading.addClass('fancybox-ie6'); + wrap.addClass('fancybox-ie6'); + + $('').prependTo(outer); + } + }; + + $.fn.fancybox.defaults = { + padding : 10, + margin : 40, + opacity : false, + modal : false, + cyclic : false, + scrolling : 'auto', // 'auto', 'yes' or 'no' + + width : 560, + height : 340, + + autoScale : true, + autoDimensions : true, + centerOnScroll : false, + + ajax : {}, + swf : { wmode: 'transparent' }, + + hideOnOverlayClick : true, + hideOnContentClick : false, + + overlayShow : true, + overlayOpacity : 0.7, + overlayColor : '#777', + + titleShow : true, + titlePosition : 'float', // 'float', 'outside', 'inside' or 'over' + titleFormat : null, + titleFromAlt : false, + + transitionIn : 'fade', // 'elastic', 'fade' or 'none' + transitionOut : 'fade', // 'elastic', 'fade' or 'none' + + speedIn : 300, + speedOut : 300, + + changeSpeed : 300, + changeFade : 'fast', + + easingIn : 'swing', + easingOut : 'swing', + + showCloseButton : true, + showNavArrows : true, + enableEscapeButton : true, + enableKeyboardNav : true, + + onStart : function(){}, + onCancel : function(){}, + onComplete : function(){}, + onCleanup : function(){}, + onClosed : function(){}, + onError : function(){} + }; + + $(document).ready(function() { + $.fancybox.init(); + }); + +})(jQuery); \ No newline at end of file diff --git a/osrframework/static/css/img/fancybox/jquery.fancybox-1.3.4.pack.js b/osrframework/static/css/img/fancybox/jquery.fancybox-1.3.4.pack.js new file mode 100755 index 0000000..1373ed0 --- /dev/null +++ b/osrframework/static/css/img/fancybox/jquery.fancybox-1.3.4.pack.js @@ -0,0 +1,46 @@ +/* + * FancyBox - jQuery Plugin + * Simple and fancy lightbox alternative + * + * Examples and documentation at: http://fancybox.net + * + * Copyright (c) 2008 - 2010 Janis Skarnelis + * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. + * + * Version: 1.3.4 (11/11/2010) + * Requires: jQuery v1.3+ + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ + +;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("
")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('

The requested content cannot be loaded.
Please try again later.

'); +F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)|| +c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick= +false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('
').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel", +function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='';P="";b.each(e.swf,function(x,H){C+='';P+=" "+x+'="'+H+'"'});C+='";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win== +"function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('
');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor, +opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length? +d.titlePosition=="float"?'
'+s+'
':'
'+s+"
":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding}); +y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height== +i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents()); +f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode== +37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto"); +s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('').appendTo(j); +f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c); +j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type== +"image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"), +10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)}; +b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k= +0,C=a.length;ko.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+ +1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h= +true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1; +b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5- +d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('
'),t=b('
'),u=b('
'),f=b('
'));D=b('
').append('
').appendTo(f); +D.append(j=b('
'),E=b(''),n=b('
'),z=b(''),A=b(''));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()}); +b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('').prependTo(D)}}}; +b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing", +easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery); \ No newline at end of file diff --git a/osrframework/static/css/img/fancybox/jquery.mousewheel-3.0.4.pack.js b/osrframework/static/css/img/fancybox/jquery.mousewheel-3.0.4.pack.js new file mode 100755 index 0000000..cb66588 --- /dev/null +++ b/osrframework/static/css/img/fancybox/jquery.mousewheel-3.0.4.pack.js @@ -0,0 +1,14 @@ +/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) +* Licensed under the MIT License (LICENSE.txt). +* +* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. +* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. +* Thanks to: Seamus Leahy for adding deltaX and deltaY +* +* Version: 3.0.4 +* +* Requires: 1.2.2+ +*/ + +(function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a= +f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); \ No newline at end of file diff --git a/osrframework/static/css/jquery.fancybox-1.3.4.css b/osrframework/static/css/jquery.fancybox-1.3.4.css new file mode 100755 index 0000000..57a5403 --- /dev/null +++ b/osrframework/static/css/jquery.fancybox-1.3.4.css @@ -0,0 +1,366 @@ +/* + * FancyBox - jQuery Plugin + * Simple and fancy lightbox alternative + * + * Examples and documentation at: http://fancybox.net + * + * Copyright (c) 2008 - 2010 Janis Skarnelis + * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. + * + * Version: 1.3.4 (11/11/2010) + * Requires: jQuery v1.3+ + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ + +#fancybox-loading { + position: fixed; + top: 50%; + left: 50%; + width: 40px; + height: 40px; + margin-top: -20px; + margin-left: -20px; + cursor: pointer; + overflow: hidden; + z-index: 1104; + display: none; +} + +#fancybox-loading div { + position: absolute; + top: 0; + left: 0; + width: 40px; + height: 480px; + background-image: url('img/fancybox/fancybox.png'); +} + +#fancybox-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + z-index: 1100; + display: none; +} + +#fancybox-tmp { + padding: 0; + margin: 0; + border: 0; + overflow: auto; + display: none; +} + +#fancybox-wrap { + position: absolute; + top: 0; + left: 0; + padding: 20px; + z-index: 1101; + outline: none; + display: none; +} + +#fancybox-outer { + position: relative; + width: 100%; + height: 100%; + background: #fff; +} + +#fancybox-wrap, +#fancybox-wrap *{ +-webkit-box-sizing: content-box; /* Safari/Chrome, other WebKit */ +-moz-box-sizing: content-box; /* Firefox, other Gecko */ +box-sizing: content-box; /* Opera/IE 8+ */ +} + +#fancybox-content { + width: 0; + height: 0; + padding: 0; + outline: none; + position: relative; + overflow: hidden; + z-index: 1102; + border: 0 solid #fff; +} + +#fancybox-hide-sel-frame { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: transparent; + z-index: 1101; +} + +#fancybox-close { + position: absolute; + top: -15px; + right: -15px; + width: 30px; + height: 30px; + background: transparent url('img/fancybox/fancybox.png') -40px 0; + cursor: pointer; + z-index: 1103; + display: none; +} + +#fancybox-error { + color: #444; + font: normal 12px/20px Arial; + padding: 14px; + margin: 0; +} + +#fancybox-img { + width: 100%; + height: 100%; + padding: 0; + margin: 0; + border: none; + outline: none; + line-height: 0; + vertical-align: top; +} + +#fancybox-frame { + width: 100%; + height: 100%; + border: none; + display: block; +} + +#fancybox-left, #fancybox-right { + position: absolute; + bottom: 0; + height: 100%; + width: 35%; + cursor: pointer; + outline: none; + background: transparent url('img/fancybox/blank.gif'); + z-index: 1102; + display: none; +} + +#fancybox-left { + left: 0; +} + +#fancybox-right { + right: 0; +} + +#fancybox-left-ico, #fancybox-right-ico { + position: absolute; + top: 50%; + left: -9999px; + width: 30px; + height: 30px; + margin-top: -15px; + cursor: pointer; + z-index: 1102; + display: block; +} + +#fancybox-left-ico { + background-image: url('img/fancybox/fancybox.png'); + background-position: -40px -30px; +} + +#fancybox-right-ico { + background-image: url('img/fancybox/fancybox.png'); + background-position: -40px -60px; +} + +#fancybox-left:hover, #fancybox-right:hover { + visibility: visible; /* IE6 */ +} + +#fancybox-left:hover span { + left: 20px; +} + +#fancybox-right:hover span { + left: auto; + right: 20px; +} + +.fancybox-bg { + position: absolute; + padding: 0; + margin: 0; + border: 0; + width: 20px; + height: 20px; + z-index: 1001; +} + +#fancybox-bg-n { + top: -20px; + left: 0; + width: 100%; + background-image: url('img/fancybox/fancybox-x.png'); +} + +#fancybox-bg-ne { + top: -20px; + right: -20px; + background-image: url('img/fancybox/fancybox.png'); + background-position: -40px -162px; +} + +#fancybox-bg-e { + top: 0; + right: -20px; + height: 100%; + background-image: url('img/fancybox/fancybox-y.png'); + background-position: -20px 0; +} + +#fancybox-bg-se { + bottom: -20px; + right: -20px; + background-image: url('img/fancybox/fancybox.png'); + background-position: -40px -182px; +} + +#fancybox-bg-s { + bottom: -20px; + left: 0; + width: 100%; + background-image: url('img/fancybox/fancybox-x.png'); + background-position: 0 -20px; +} + +#fancybox-bg-sw { + bottom: -20px; + left: -20px; + background-image: url('img/fancybox/fancybox.png'); + background-position: -40px -142px; +} + +#fancybox-bg-w { + top: 0; + left: -20px; + height: 100%; + background-image: url('img/fancybox/fancybox-y.png'); +} + +#fancybox-bg-nw { + top: -20px; + left: -20px; + background-image: url('img/fancybox/fancybox.png'); + background-position: -40px -122px; +} + +#fancybox-title { + font-family: Helvetica; + font-size: 12px; + z-index: 1102; +} + +.fancybox-title-inside { + padding-bottom: 10px; + text-align: center; + color: #333; + background: #fff; + position: relative; +} + +.fancybox-title-outside { + padding-top: 10px; + color: #fff; +} + +.fancybox-title-over { + position: absolute; + bottom: 0; + left: 0; + color: #FFF; + text-align: left; +} + +#fancybox-title-over { + padding: 10px; + background-image: url('img/fancybox/fancy_title_over.png'); + display: block; +} + +.fancybox-title-float { + position: absolute; + left: 0; + bottom: -20px; + height: 32px; +} + +#fancybox-title-float-wrap { + border: none; + border-collapse: collapse; + width: auto; +} + +#fancybox-title-float-wrap td { + border: none; + white-space: nowrap; +} + +#fancybox-title-float-left { + padding: 0 0 0 15px; + background: url('img/fancybox/fancybox.png') -40px -90px no-repeat; +} + +#fancybox-title-float-main { + color: #FFF; + line-height: 29px; + font-weight: bold; + padding: 0 0 3px 0; + background: url('img/fancybox/fancybox-x.png') 0 -40px; +} + +#fancybox-title-float-right { + padding: 0 0 0 15px; + background: url('img/fancybox/fancybox.png') -55px -90px no-repeat; +} + +/* IE6 */ + +.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_close.png', sizingMethod='scale'); } + +.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_nav_left.png', sizingMethod='scale'); } +.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_nav_right.png', sizingMethod='scale'); } + +.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; } +.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_title_left.png', sizingMethod='scale'); } +.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_title_main.png', sizingMethod='scale'); } +.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_title_right.png', sizingMethod='scale'); } + +.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame { + height: expression(this.parentNode.clientHeight + "px"); +} + +#fancybox-loading.fancybox-ie6 { + position: absolute; margin-top: 0; + top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'); +} + +#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_loading.png', sizingMethod='scale'); } + +/* IE6, IE7, IE8 */ + +.fancybox-ie .fancybox-bg { background: transparent !important; } + +.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_n.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_ne.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_e.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_se.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_s.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_sw.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_w.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_nw.png', sizingMethod='scale'); } diff --git a/osrframework/static/css/keshif-style.css b/osrframework/static/css/keshif-style.css new file mode 100644 index 0000000..e13bd89 --- /dev/null +++ b/osrframework/static/css/keshif-style.css @@ -0,0 +1,239 @@ +html, +body { + min-height: 100%; + min-height: 100vh; + margin: 0px; + padding: 0px; +} +.contents { + padding-top: 10px; +} +#chart_div { + margin: 0 auto; +} +.showConfigButton { + display: inline-block !important; +} +.recordDisplay[displaytype="grid"] > .listItemGroup > .listItem > .content .thumbnail { + display: block; + overflow-y: hidden; + overflow-x: hidden; + position: relative; + -webkit-transition: background-color 300ms linear; + -moz-transition: background-color 300ms linear; + -o-transition: background-color 300ms linear; + transition: background-color 300ms linear; +} +.recordDisplay[displaytype="grid"] > .listItemGroup > .listItem > .content .thumbnail > .thumbImg { + display: block; + margin-left: auto; + margin-right: auto; + background-color: white; + width: 100%; +} +.recordDisplay[displaytype="grid"] > .listItemGroup > .listItem > .content .subTitle { + display: block; + font-family: Georgia, "Times New Roman", Times, serif; + font-style: italic; + font-weight: 400; + color: gray; + font-size: 0.8em; + text-align: left; +} +.recordDisplay[displaytype="grid"] > .listItemGroup > .listItem > .content .title { + display: block; + margin-left: auto; + margin-right: auto; + margin-top: 2px; + text-align: left; + font-size: 0.9em; + font-family: 'Helvetica Neue Custom', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-weight: 700; +} +.recordDisplay[displaytype="grid"] > .listItemGroup > .listItem:hover .thumbImg { + box-shadow: 0px 0px 4px black; +} +.recordDisplay[displaytype="grid"] > .listItemGroup > .listItem[highlight=true] > .content .thumbnail { + background-color: orangered; +} +.pageTitle { + text-align: center; + padding-top: 10px; + font-family: 'Montserrat', sans-serif; + font-size: 1.8em; + text-shadow: 2px 2px 0px lightgray; + text-transform: capitalize; +} +.pageSubtitle { + text-align: center; + font-family: 'Montserrat', sans-serif; + padding-top: 10px; + padding-bottom: 5px; + font-size: 0.9em; + font-weight: 300; + line-height: 1.5em; +} +#infobox { + position: fixed; + left: 0px; + right: 0px; + bottom: 0px; + text-align: center; + font-weight: 300; + font-family: sans-serif; + font-size: 0.8em; + padding: 3px 120px 3px 120px; + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0d…g9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNsZXNzaGF0LWdlbmVyYXRlZCkiIC8+PC9zdmc+); + background-image: -webkit-linear-gradient(bottom, #dfd2a9 0%, rgba(255, 255, 255, 0) 80%); + background-image: -moz-linear-gradient(bottom, #dfd2a9 0%, rgba(255, 255, 255, 0) 80%); + background-image: -o-linear-gradient(bottom, #dfd2a9 0%, rgba(255, 255, 255, 0) 80%); + background-image: linear-gradient(to top, #dfd2a9 0%, rgba(255, 255, 255, 0) 80%); +} +#infobox a { + color: black; + font-weight: 500; +} +#infobox a:hover { + color: orangered; +} +#infobox .fa { + color: gray; +} +.keshif_logo { + position: absolute; + display: block; + top: 5px; + left: 5px; + width: 33px; + height: 33px; + font-size: 12px; + overflow: hidden; + cursor: auto; + -webkit-transition: width 500ms ease-in-out, background-color 500ms ease-in-out; + -moz-transition: width 500ms ease-in-out, background-color 500ms ease-in-out; + -o-transition: width 500ms ease-in-out, background-color 500ms ease-in-out; + transition: width 500ms ease-in-out, background-color 500ms ease-in-out; + border-radius: 5px; + cursor: pointer; + text-decoration: none; +} +.keshif_logo:hover { + background-color: #EEEEEE; + width: 200px; +} +.keshif_logo > .keshif_logo_img { + height: 33px; + float: left; +} +.keshif_logo > .keshif_logo_content { + display: block; + width: 300px; + font-family: Verdana, Arial, Helvetica, sans-serif; + letter-spacing: .12em; + color: #727365; + vertical-align: center; +} +.comment_popup { + position: fixed; + top: 5px; + left: 5px; + cursor: pointer; +} +.comment_popup .fa-stack { + float: left; + clear: left; + height: 1.5em; + margin-top: -15px; + margin-left: -15px; + font-size: 2em; +} +.comment_popup .fa-comment { + color: #ffcd2e; +} +.comment_popup .texttt { + font-family: sans-serif; + font-weight: 300; + font-size: 0.8em; +} +.comment_popup:hover .texttt { + color: orangered; +} +.comment_popup:hover .fa-comment { + color: orangered; +} +.forkongithub { + position: fixed; + display: block; + z-index: 0; +} +.forkongithub a.fork-ribbon { + background: #000; + color: #fff; + text-decoration: none; + font-family: arial, sans-serif; + text-align: center; + font-weight: bold; + padding: 5px 40px; + font-size: 0.8rem; + line-height: 1.5rem; + position: relative; + transition: 0.5s; +} +.forkongithub a.fork-ribbon::before, +.forkongithub a.fork-ribbon::after { + width: 100%; + display: block; + position: absolute; + top: 1px; + left: 0; + height: 1px; + background: #fff; + content: ""; +} +.forkongithub a.fork-ribbon::after { + bottom: 1px; + top: auto; +} +.forkongithub a.fork-ribbon:hover { + background: orangered; + color: #fff; +} +@media screen and (min-width: 800px) { + .forkongithub { + width: 0px; + height: 150px; + } + .forkongithub.fork-bottom { + bottom: 0; + } + .forkongithub.fork-right { + right: 0; + } + .forkongithub.fork-right a.fork-ribbon { + font-size: 1.1em; + -webkit-transform: rotate(-45deg); + -moz-transform: rotate(-45deg); + -o-transform: rotate(-45deg); + -ms-transform: rotate(-45deg); + transform: rotate(-45deg); + } + .forkongithub.fork-left { + left: -60px; + } + .forkongithub.fork-left a.fork-ribbon { + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -o-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); + right: auto; + left: 0px; + } + .forkongithub a.fork-ribbon { + width: 150px; + position: absolute; + top: 80px; + right: -60px; + box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.8); + } +} diff --git a/osrframework/static/css/keshif.css b/osrframework/static/css/keshif.css new file mode 100644 index 0000000..d69c912 --- /dev/null +++ b/osrframework/static/css/keshif.css @@ -0,0 +1,3796 @@ +/********************************* +kshf library + +Copyright (c) 20014-2015, University of Maryland +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the University of Maryland nor the names of its contributors + may not be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +************************************ */ +.kshf { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + position: relative; + left: 0px; + font-family: 'Roboto', Helvetica, Arial, sans-serif; + text-rendering: optimizeLegibility; + -webkit-transition: left 300ms ease-in-out; + -moz-transition: left 300ms ease-in-out; + -o-transition: left 300ms ease-in-out; + transition: left 300ms ease-in-out; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.kshf * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.kshf[noanim=false] .aggr { + -webkit-transition: -webkit-transform 700ms ease-in-out, background-color 100ms linear, opacity 200ms linear; + -moz-transition: -moz-transform 700ms ease-in-out, background-color 100ms linear, opacity 200ms linear; + -o-transition: -o-transform 700ms ease-in-out, background-color 100ms linear, opacity 200ms linear; + transition: -webkit-transform 700ms ease-in-out,-moz-transform 700ms ease-in-out,-o-transform 700ms ease-in-out,transform 700ms ease-in-out, background-color 100ms linear, opacity 200ms linear; +} +.kshf[noanim=false] .chartAxis_Measure { + -webkit-transition: -webkit-transform 700ms ease-in-out, background-color 250ms ease-in-out; + -moz-transition: -moz-transform 700ms ease-in-out, background-color 250ms ease-in-out; + -o-transition: -o-transform 700ms ease-in-out, background-color 250ms ease-in-out; + transition: -webkit-transform 700ms ease-in-out,-moz-transform 700ms ease-in-out,-o-transform 700ms ease-in-out,transform 700ms ease-in-out, background-color 250ms ease-in-out; +} +.kshf[noanim=false] .chartAxis_Measure .tick { + -webkit-transition: -webkit-transform 500ms ease-out; + -moz-transition: -moz-transform 500ms ease-out; + -o-transition: -o-transform 500ms ease-out; + transition: -webkit-transform 500ms ease-out,-moz-transform 500ms ease-out,-o-transform 500ms ease-out,transform 500ms ease-out; +} +.kshf[noanim=false] .attrib { + -webkit-transition: all 700ms ease-in-out; + -moz-transition: all 700ms ease-in-out; + -o-transition: all 700ms ease-in-out; + transition: all 700ms ease-in-out; +} +.kshf[noanim=false] .wrapper { + -webkit-transition: height 700ms ease-in-out; + -moz-transition: height 700ms ease-in-out; + -o-transition: height 700ms ease-in-out; + transition: height 700ms ease-in-out; +} +.kshf[noanim=false] .panels_Above { + -webkit-transition: height 700ms ease-in-out; + -moz-transition: height 700ms ease-in-out; + -o-transition: height 700ms ease-in-out; + transition: height 700ms ease-in-out; +} +.kshf[noanim=false] .controlLine > .base { + -webkit-transition: -webkit-transform 700ms ease-in-out, background-color 100ms linear, opacity 200ms linear; + -moz-transition: -moz-transform 700ms ease-in-out, background-color 100ms linear, opacity 200ms linear; + -o-transition: -o-transform 700ms ease-in-out, background-color 100ms linear, opacity 200ms linear; + transition: -webkit-transform 700ms ease-in-out,-moz-transform 700ms ease-in-out,-o-transform 700ms ease-in-out,transform 700ms ease-in-out, background-color 100ms linear, opacity 200ms linear; +} +.kshf[noanim=false] .controlLine > .handle { + -webkit-transition: -webkit-transform 700ms ease-in-out, background-color 100ms linear, opacity 200ms linear; + -moz-transition: -moz-transform 700ms ease-in-out, background-color 100ms linear, opacity 200ms linear; + -o-transition: -o-transform 700ms ease-in-out, background-color 100ms linear, opacity 200ms linear; + transition: -webkit-transform 700ms ease-in-out,-moz-transform 700ms ease-in-out,-o-transform 700ms ease-in-out,transform 700ms ease-in-out, background-color 100ms linear, opacity 200ms linear; +} +.kshf[drag_cursor="grab"] { + cursor: -moz-grab; + cursor: -webkit-grab; + cursor: grab; +} +.kshf[drag_cursor="grabbing"] { + cursor: -moz-grabbing; + cursor: -webkit-grabbing; + cursor: grabbing; +} +.kshf .panel[catLabelDragging=true] .kshfChart > .wrapper > .facetCategorical > .attribGroup > .chartCatLabelResize { + display: block; + border-left: solid lightgray 2px; +} +.kshf[attribsShown=true] { + left: 120px; +} +.kshf[attribsShown=true] > .attributePanel { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; +} +.kshf[attribsShown=true] .kshfChart:hover > .wrapper > .facetCategorical > .attribGroup > .chartCatLabelResize { + display: block; +} +.kshf[attribsShown=true] .recordDisplay .buttonRecordViewRemove { + visibility: visible; +} +.kshf[attribsShown=true] .recordDisplay:hover > .listItemGroup > .dragWidthHandle { + display: block; +} +.kshf[attribsShown=true] .recordDisplay--Header > .itemRank_control { + display: inline-block; +} +.kshf[attribsShown=true] .panel:hover > .panelAdjustWidth { + display: block; +} +.kshf[attribsShown=true] .editableTextContainer > .editTextButton { + display: inline-block; +} +.kshf[attribsShown=true] .editableTextContainer:hover > .editTextButton { + opacity: 1; +} +.kshf[attribsShown=true] .buttonSummaryRemove { + display: inline-block !important; +} +.kshf[percentview=true] .chartAxis_Measure > .percentSign::after { + content: "%"; +} +.kshf[percentview=true] .chartAxis_Measure > .tick > .text:after { + content: "%"; +} +.kshf[showdropzone=true]:not([dropattrtype~="unique"]) .kshfChart[collapsed=false] { + -webkit-flex-grow: 3; + flex-grow: 3; + -webkit-box-flex: 3; + -moz-box-flex: 3; + -webkit-flex: 3; + -ms-flex: 3; + flex: 3; + overflow: hidden; +} +.kshf[showdropzone=true]:not([dropattrtype~="unique"]) .panel[hassummaries="true"] > .dropZone_between_wrapper { + display: block; +} +.kshf[showdropzone=true]:not([dropattrtype~="unique"]) .panel[hassummaries="true"] > .dropZone_panel { + display: block; + width: 100%; + height: 100%; + background-color: #EEEEEE; + opacity: 0.3; + cursor: default; + border-width: 0px; + border-radius: 5px; +} +.kshf[showdropzone=true]:not([dropattrtype~="unique"]) .panel[hassummaries="true"] > .dropZone_panel > .dropIcon { + display: none; +} +.kshf[showdropzone=true]:not([dropattrtype~="unique"]) .panel[hassummaries="true"] > .dropZone_panel > .dropText { + display: none; +} +.kshf[showdropzone=true]:not([dropattrtype~="unique"]) .panel[hassummaries="false"] > .dropZone_panel { + display: block; +} +.kshf[showdropzone=true][dropSource="browser"] > .attributePanel > .attributeList > .dropZone_AttribList { + display: block; +} +.kshf[showdropzone=true][dropattrtype~="unique"] .recordDisplay[hasRecordView="false"] { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + min-height: 50px; +} +.kshf[showdropzone=true][dropattrtype~="unique"] .dropZone_recordView { + display: block !important; +} +.kshf[showdropzone=true][dropattrtype~="interval"] .dropZone_resultSort { + display: block !important; +} +.kshf[showdropzone=true][dropattrtype~="categorical"][dropattrtype~="singlevalue"] .dropZone_textSearch { + display: block !important; +} +.kshf[ratiomode=true] .chartAxis_Measure > .tick > .text::after { + content: "%"; +} +.kshf[previewcompare="true"] .compare { + opacity: 1 !important; +} +.kshf[previewcompare="true"] .compareLine { + opacity: 1 !important; +} +.kshf[isfiltered=true] .panel_Basic > .filterClearAll { + opacity: 1; + pointer-events: all; +} +.kshf .compareButton { + display: block; + position: absolute; + font-size: 0.7em; + color: gray; + opacity: 0; + cursor: pointer; + pointer-events: none; + -webkit-transition: opacity 500ms ease-in-out; + -moz-transition: opacity 500ms ease-in-out; + -o-transition: opacity 500ms ease-in-out; + transition: opacity 500ms ease-in-out; +} +.kshf .compareButton:after { + content: "\f13e"; +} +.kshf .compareButton:hover:after { + content: "\f023"; +} +.kshf .compareButton[inside] { + color: white; + text-shadow: 0px 0px 1px #000000; +} +.kshf span[showlock="true"] .compareButton { + pointer-events: all; + opacity: 1; +} +.kshf span[compare="true"] .compareButton { + pointer-events: all; + opacity: 1; +} +.kshf span[compare="true"] .compareButton:not([inside]) { + color: #2f4f4f; +} +.kshf span[compare="true"] .compareButton:after { + content: "\f023"; +} +.kshf span[compare="true"] .compareButton:hover:after { + content: "\f13e"; +} +.kshf .unitName { + opacity: 0.6; + margin-left: 1px; +} +.kshf .sortButton { + cursor: pointer; +} +.kshf .sortButton:hover { + color: #ff4500; +} +.kshf .sortButton:before { + content: "\f161"; +} +.kshf .sortButton[inverse='true']:before { + content: "\f160"; +} +.kshf .AndOrNot { + color: white; + display: inline-block; + font-weight: 300; + font-size: 0.8em; + vertical-align: top; + border-radius: 3px; + padding: 0px 2px 0px 2px; + margin-top: 1px; + opacity: 0.7; +} +.kshf .AndOrNot.AndOrNot_And { + background-color: #1d4870; +} +.kshf .AndOrNot.AndOrNot_Or { + background-color: #1c737a; +} +.kshf .AndOrNot.AndOrNot_Not { + background-color: #808080; +} +.kshf .noselect { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.kshf .editableTextContainer > .editableText:focus { + background-color: white; + box-shadow: 0 0 3px #2CABCF; + border-color: #2CABCF; + border-style: solid; + border-width: 1px; + outline: 0 none; + margin: 0px; +} +.kshf .editableTextContainer > .editTextButton { + display: none; + opacity: 0; + font-size: 0.8em; + color: gray; + margin-left: 2px; + vertical-align: top; + cursor: pointer; +} +.kshf .editableTextContainer > .editTextButton:before { + content: '\f040'; +} +.kshf .editableTextContainer > .editTextButton:hover { + color: black; +} +.kshf .editableTextContainer[edittitle="true"] > .editTextButton::before { + content: "\f00c"; +} +.kshf .editableTextContainer[state='edited'] > .editTextButton { + display: inline-block; +} +.kshf > .attributePanel { + display: none; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + position: absolute; + left: -220px; + width: 215px; + top: 0px; + height: 100%; +} +.kshf > .attributePanel > .attributePanelHeader { + cursor: default; + text-align: center; + border-radius: 3px; + background-color: #efeadf; + text-shadow: 0px 1px lightgray; + padding-top: 3px; + box-shadow: 0px 0px 2px #B0A47D; +} +.kshf > .attributePanel > .attributePanelHeader > .addAttrib { + display: none; + color: gray; + position: absolute; + left: 5px; + cursor: pointer; +} +.kshf > .attributePanel > .attributePanelHeader > .addAttrib:hover { + color: orangered; +} +.kshf > .attributePanel > .attributePanelHeader > .hidePanel { + color: gray; + position: absolute; + right: 3px; + cursor: pointer; +} +.kshf > .attributePanel > .attributePanelHeader > .hidePanel:hover { + color: orangered; +} +.kshf > .attributePanel > .attributeList { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + overflow-y: auto; + overflow-x: hidden; +} +.kshf > .attributePanel > .attributeList > .dropZone_AttribList { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + -webkit-box-ordinal-group: 10; + -moz-box-ordinal-group: 10; + -ms-flex-order: 10; + -webkit-order: 10; + order: 10; + display: none; + border-radius: 10px; + border: solid 1px #d3dbe2; + box-shadow: 0px 0px 1px #bec8d1; + margin: 2px; +} +.kshf > .attributePanel .nugget { + display: block; + position: relative; + font-size: 0.8em; + padding: 2px; + margin: 2px; + min-height: 36px; + left: 0px; + border-radius: 3px; + background-color: #e8e8e8; + border: solid 1px lightgray; + cursor: -moz-grab; + cursor: -webkit-grab; + cursor: grab; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-transition: opacity 400ms linear, -webkit-transform 400ms ease-in-out; + -moz-transition: opacity 400ms linear, -moz-transform 400ms ease-in-out; + -o-transition: opacity 400ms linear, -o-transform 400ms ease-in-out; + transition: opacity 400ms linear,-webkit-transform 400ms ease-in-out,-moz-transform 400ms ease-in-out,-o-transform 400ms ease-in-out,transform 400ms ease-in-out; +} +.kshf > .attributePanel .nugget > .summaryTitle { + display: inline; + margin: 1px; +} +.kshf > .attributePanel .nugget > .editCodeButton { + display: none; + font-size: 0.9em; + color: black; + cursor: pointer; +} +.kshf > .attributePanel .nugget > .editCodeButton:hover { + color: black; +} +.kshf > .attributePanel .nugget > .summaryTypeIcon { + float: right; +} +.kshf > .attributePanel .nugget .nuggetInfo { + display: inline-block; + width: 100%; + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + -webkit-align-self: center; + -ms-flex-item-align: center; + align-self: center; + font-weight: 500; + font-size: 0.7em; + vertical-align: top; + text-align: center; +} +.kshf > .attributePanel .nugget .nuggetInfo > .num_left { + float: left; + margin-left: 2px; +} +.kshf > .attributePanel .nugget .nuggetInfo > .num_right { + float: right; + margin-right: 2px; +} +.kshf > .attributePanel .nugget .nuggetInfo > .fa { + color: gray; +} +.kshf > .attributePanel .nugget[aggr_initialized=false] > .nuggetViz > .nuggetInfo { + font-size: 2em; + text-align: center; + position: relative; +} +.kshf > .attributePanel .nugget[aggr_initialized=false] > .nuggetViz > .nuggetInfo:before { + content: "\f110"; +} +.kshf > .attributePanel .nugget[aggr_initialized=false] > .nuggetViz > .nuggetChart { + display: none !important; +} +.kshf > .attributePanel .nugget[aggr_initialized=false] > .nuggetViz:hover > .nuggetInfo { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; +} +.kshf > .attributePanel .nugget > .nuggetViz { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + height: 30px; + background-color: rgba(255, 255, 255, 0.8); + width: 50px; + float: right; + width: 60px; + border-radius: 5px; + border: solid 1px rgba(255, 255, 255, 0.8); +} +.kshf > .attributePanel .nugget > .nuggetViz > .nuggetChart { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + height: 30px; + margin-right: 3px; + margin-left: 3px; +} +.kshf > .attributePanel .nugget > .nuggetViz > .nuggetChart > .nuggetBar { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + display: block; + background-color: #b8c7d2; +} +.kshf > .attributePanel .nugget:hover { + background-color: #E8E0CE; + border-color: #B8B6B1; +} +.kshf > .attributePanel .nugget:hover > .nuggetViz { + border-color: gray; +} +.kshf > .attributePanel .nugget[datatype~="interval"] > .nuggetViz { + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; +} +.kshf > .attributePanel .nugget[datatype~="interval"] > .nuggetViz > .nuggetChart { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} +.kshf > .attributePanel .nugget[datatype~="interval"] > .nuggetViz > .nuggetChart > .nuggetBar { + -webkit-align-self: flex-end; + -ms-flex-item-align: end; + align-self: flex-end; +} +.kshf > .attributePanel .nugget[datatype~="interval"] .nuggetChart { + -webkit-box-ordinal-group: 1; + -moz-box-ordinal-group: 1; + -ms-flex-order: 1; + -webkit-order: 1; + order: 1; +} +.kshf > .attributePanel .nugget[datatype~="interval"] .nuggetInfo { + -webkit-box-ordinal-group: 2; + -moz-box-ordinal-group: 2; + -ms-flex-order: 2; + -webkit-order: 2; + order: 2; + max-height: 1em; +} +.kshf > .attributePanel .nugget[datatype~='time'] .nuggetInfo:before { + content: '\f017'; +} +.kshf > .attributePanel .nugget[datatype~="categorical"] > .nuggetViz { + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} +.kshf > .attributePanel .nugget[datatype~="categorical"] > .nuggetViz > .nuggetChart { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; +} +.kshf > .attributePanel .nugget[state='custom'] > .editCodeButton { + display: inline-block; +} +.kshf > .attributePanel .nugget[moved] { + opacity: 0.5 !important; +} +.kshf > .attributePanel .nugget[anim="disappear"] { + opacity: 0; + -webkit-transform: translateX(100px); + -moz-transform: translateX(100px); + -o-transform: translateX(100px); + -ms-transform: translateX(100px); + transform: translateX(100px); +} +.kshf > .attributePanel .nugget[anim="appear"] { + opacity: 1; + -webkit-transform: translateX(0px); + -moz-transform: translateX(0px); + -o-transform: translateX(0px); + -ms-transform: translateX(0px); + transform: translateX(0px); +} +.kshf .panel_Basic { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + position: relative; + background-color: #efeadf; + box-shadow: 0px 0px 2px #B8AF9A; + margin-bottom: 4px; + padding-bottom: 2px; +} +.kshf .panel_Basic > .recordInfo { + vertical-align: top; + display: block; + white-space: nowrap; + cursor: default; + font-size: 1.2em; + font-weight: 700; + text-shadow: 1px 1px lightgray; + margin-bottom: -1px; + z-index: 10; +} +.kshf .panel_Basic > .recordInfo > .activeRecordCount { + display: inline-block; + text-align: right; + margin-right: 3px; +} +.kshf .panel_Basic > .filtercrumbs { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + padding: 4px 5px 0px 5px; + font-size: 0.8em; + vertical-align: top; +} +.kshf .panel_Basic > .filtercrumbs > .filter-block { + display: inline-block; + position: relative; + cursor: pointer; + color: #252112; + font-weight: 300; + box-shadow: 1px 1px 1px #4e472b; + background-color: rgba(255, 255, 255, 0.5); + margin-right: 5px; + padding-left: 2px; + max-width: 0px; + -webkit-transition: all 250ms linear; + -moz-transition: all 250ms linear; + -o-transition: all 250ms linear; + transition: all 250ms linear; +} +.kshf .panel_Basic > .filtercrumbs > .filter-block > .sdsdsds { + pointer-events: none; + /* + max-width: 300px; + max-width: 300px; + -o-text-overflow: ellipsis; + text-overflow: ellipsis;*/ + display: block; + white-space: nowrap; + overflow: hidden; +} +.kshf .panel_Basic > .filtercrumbs > .filter-block > .sdsdsds > .filterHeader { + padding: 1px; + font-size: 1em; + font-weight: 700; +} +.kshf .panel_Basic > .filtercrumbs > .filter-block > .sdsdsds > .filterHeader:after { + content: ': '; +} +.kshf .panel_Basic > .filtercrumbs > .filter-block > .sdsdsds > .filterDetails { + padding: 1px 0px 1px 0px; + display: inline; + margin-right: 15px; +} +.kshf .panel_Basic > .filtercrumbs > .filter-block > .chartClearFilterButton.summary { + pointer-events: none; +} +.kshf .panel_Basic > .filtercrumbs > .filter-block[ready=true] { + max-width: 100%; +} +.kshf .panel_Basic > .filtercrumbs > .filter-block[ready=false] { + max-width: 0px; +} +.kshf .panel_Basic > .filtercrumbs > .filter-block[ready=false] .chartClearFilterButton { + display: none; +} +.kshf .panel_Basic > .filtercrumbs > .filter-block:hover { + background-color: #ffffff; +} +.kshf .panel_Basic > .filtercrumbs > .filter-block:hover .sdsdsds { + text-decoration: line-through; +} +.kshf .panel_Basic > .filtercrumbs > .filter-block:hover .chartClearFilterButton { + background-color: #B6AF96; + color: #635d46; +} +.kshf .panel_Basic > .filtercrumbs > .filter-block b { + font-weight: 700; +} +.kshf .panel_Basic > .filtercrumbs > .filter-block[filtered=false] { + display: none; +} +.kshf .panel_Basic > .filterClearAll { + opacity: 0; + pointer-events: none; + right: 41px; + height: 1.3em; + cursor: pointer; + color: #252112; + font-weight: 300; + border: 1px #685b2b solid; + background-color: #E9E2CE; + padding-left: 1px; + white-space: nowrap; + -webkit-transition: background-color 100ms linear, opacity 300ms linear; + -moz-transition: background-color 100ms linear, opacity 300ms linear; + -o-transition: background-color 100ms linear, opacity 300ms linear; + transition: background-color 100ms linear, opacity 300ms linear; +} +.kshf .panel_Basic > .filterClearAll:hover { + background-color: white; + box-shadow: none; +} +.kshf .panel_Basic > .filterClearAll .title { + font-size: 0.8em; +} +.kshf .panel_Basic > .rightBoxes { + font-size: 1.0em; + color: #635d46; + padding-right: 2px; + white-space: nowrap; +} +.kshf .panel_Basic > .rightBoxes > .fa { + cursor: pointer; + margin-left: 4px; +} +.kshf .panel_Basic > .rightBoxes > .fa:hover { + color: #cb5454; +} +.kshf .panel_Basic > .rightBoxes .showConfigButton { + display: none; +} +.kshf .panel_Basic > .rightBoxes .showConfigButton:hover { + animation: fa-spin 2s infinite linear; + -webkit-animation: fa-spin 2s infinite linear; +} +.kshf .panel_Basic > .rightBoxes .datasource { + display: none; + text-decoration: none; + color: #635d46; +} +.kshf .panel_Basic > .totalViz { + height: 3px; + margin-top: 1px; + position: absolute; + bottom: 0px; + left: 0px; + width: 100%; +} +.kshf .panel_Basic > .totalViz > .aggr { + cursor: default !important; + left: 0px; + top: 0px; + height: 100%; + -webkit-transition: all 200ms ease-in-out; + -moz-transition: all 200ms ease-in-out; + -o-transition: all 200ms ease-in-out; + transition: all 200ms ease-in-out; +} +.kshf .panel_Basic > .totalViz > .aggr.total { + width: 100%; +} +.kshf .panel_Basic > .totalViz > .aggr.preview { + transform: inherit; +} +.kshf .panels_Above { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} +.kshf .attribDragBox { + position: absolute; + top: 0px; + left: 0px; + min-height: 21px; + width: 200px; + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMSAxIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48bGluZWFyR3JhZGllbnQgaWQ9Imxlc3NoYXQtZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjEwMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9InJnYigyNDUsIDI0NSwgMjQ1KSIgc3RvcC1vcGFjaXR5PSIxIi8+PHN0b3Agb2Zmc2V0PSIyMCUiIHN0b3AtY29sb3I9InJnYigyNDEsIDI0MSwgMjQxKSIgc3RvcC1vcGFjaXR5PSIxIi8+PHN0b3Agb2Zmc2V0PSI4MCUiIHN0b3AtY29sb3I9InJnYigyNDEsIDI0MSwgMjQxKSIgc3RvcC1vcGFjaXR5PSIxIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSJyZ2IoMjQ1LCAyNDUsIDI0NSkiIHN0b3Atb3BhY2l0eT0iMSIvPjwvbGluZWFyR3JhZGllbnQ+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNsZXNzaGF0LWdlbmVyYXRlZCkiIC8+PC9zdmc+); + background-image: -webkit-linear-gradient(right, rgba(245, 245, 245, 1) 0%, rgba(241, 241, 241, 1) 20%, rgba(241, 241, 241, 1) 80%, rgba(245, 245, 245, 1) 100%);; + background-image: -moz-linear-gradient(right, rgba(245, 245, 245, 1) 0%, rgba(241, 241, 241, 1) 20%, rgba(241, 241, 241, 1) 80%, rgba(245, 245, 245, 1) 100%);; + background-image: -o-linear-gradient(right, rgba(245, 245, 245, 1) 0%, rgba(241, 241, 241, 1) 20%, rgba(241, 241, 241, 1) 80%, rgba(245, 245, 245, 1) 100%);; + background-image: linear-gradient(to left, rgba(245, 245, 245, 1) 0%, rgba(241, 241, 241, 1) 20%, rgba(241, 241, 241, 1) 80%, rgba(245, 245, 245, 1) 100%);; + border-radius: 3px; + border: solid 1px lightgray; + box-shadow: 5px 5px 20px gray; + display: none; + z-index: 400; + text-align: center; + font-weight: 500; + font-size: 0.9em; + cursor: default; + text-rendering: initial; + pointer-events: none; +} +.kshf > .warningBox_wrapper { + position: absolute; + top: -20px; + opacity: 0; + margin: 0 auto; + width: 100%; + text-align: center; + z-index: 50; + pointer-events: none; + -webkit-transition: opacity 500ms ease-in-out, top 500ms; + -moz-transition: opacity 500ms ease-in-out, top 500ms; + -o-transition: opacity 500ms ease-in-out, top 500ms; + transition: opacity 500ms ease-in-out, top 500ms; +} +.kshf > .warningBox_wrapper > .warningBox { + background-color: #F8EE82; + border-radius: 5px; + font-size: 0.8em; + font-weight: 100; + padding: 2px 5px; + border: solid 1px #d6ce79; + box-shadow: 1px 1px 3px gray; +} +.kshf > .warningBox_wrapper > .warningBox > .warningText { + cursor: default; +} +.kshf > .warningBox_wrapper > .warningBox > .dismiss { + margin-left: 5px; + color: gray; + cursor: pointer; + text-decoration: underline; + font-size: 0.8em; +} +.kshf > .warningBox_wrapper > .warningBox > .dismiss:hover { + color: orangered; +} +.kshf > .warningBox_wrapper[shown=true] { + opacity: 1; + top: 5px; + pointer-events: all; +} +.kshf > .pointerBlock { + position: fixed; + left: 0px; + top: 0px; + width: 100%; + height: 100%; + z-index: -10; + pointer-events: none; +} +.kshf > .pointerBlock[active] { + z-index: 700; + pointer-events: all; +} +.kshf .panel > .dropZone_between_wrapper { + display: none; + -webkit-flex-grow: 1; + flex-grow: 1; + position: relative; + margin-top: 2px; + z-index: 340; + border-radius: 5px; + width: calc(100% - 3px); + -webkit-transition: flex-grow 450ms ease-in-out, background-color 250ms linear, width 500ms ease-in-out; + -moz-transition: flex-grow 450ms ease-in-out, background-color 250ms linear, width 500ms ease-in-out; + -o-transition: flex-grow 450ms ease-in-out, background-color 250ms linear, width 500ms ease-in-out; + transition: flex-grow 450ms ease-in-out, background-color 250ms linear, width 500ms ease-in-out; +} +.kshf .panel > .dropZone_between_wrapper > .dropZone_between { + border-radius: 5px; + border: solid 1px #adb4ba; + box-shadow: 1px 1px 1px #adb3b7; + position: relative; + height: 22px; + text-align: center; + overflow: hidden; +} +.kshf .panel > .dropZone_between_wrapper > .dropZone_between > .dropText { + vertical-align: top; + margin-top: 2px; +} +.kshf .panel > .dropZone_between_wrapper[hovered=true] { + -webkit-flex-grow: 4; + flex-grow: 4; + position: relative; + background-color: rgba(217, 224, 230, 0.7); +} +.kshf .panel > .dropZone_between_wrapper[hovered=true] > .dropZone_between > .dropIcon { + color: orangered; +} +.kshf .panel .dropZone { + background-color: rgba(217, 224, 230, 0.7); + text-align: center; +} +.kshf .panel .dropZone[readyToDrop=true] { + background-color: #ffbca3; + border-color: orangered; + cursor: s-resize; +} +.kshf .panel .dropZone[readyToDrop=true] > .dropText { + display: inline-block; +} +.kshf .panel .dropZone_summary { + z-index: 250; + position: relative; + cursor: default; + -webkit-transition: background-color 100ms linear, width 300ms ease-in-out; + -moz-transition: background-color 100ms linear, width 300ms ease-in-out; + -o-transition: background-color 100ms linear, width 300ms ease-in-out; + transition: background-color 100ms linear, width 300ms ease-in-out; +} +.kshf .panel .dropZone_summary:hover { + background-color: #ffbca3; +} +.kshf .panel .dropZone_summary > .dropIcon { + margin: 0px; + font-size: 1.5em; + font-weight: 700; + color: #7E8A96; + text-shadow: 1px 1px 1px #B6BCC2; +} +.kshf .panel > .dropZone_panel { + display: none; + border-color: gray; + border-style: solid; + border-width: 0px; + position: absolute; + z-index: 230; +} +.kshf .panel .dropIcon { + pointer-events: none; + margin: 0px; + font-size: 2em; + color: #7E8A96; + text-shadow: 1px 1px 1px #B6BCC2; + display: inline-block; +} +.kshf .panel .dropText { + display: none; + margin-left: 4px; + font-size: 1.0em; + font-weight: 300; +} +.kshf .panel[hidebars=true] .kshf .attrib .aggr_Group { + display: none; +} +.kshf .panel[hidebaraxis=true] .facetCategorical .chartAxis_Measure { + display: none; +} +.kshf .panel[hidebaraxis=true] .facetCategorical .barChartMainInfo { + display: none; +} +.kshf .panel > .panelAdjustWidth { + display: none; + opacity: 0; + position: absolute; + height: 100%; + width: 0px; + top: 0px; + border-width: 0px 2px 0px 0px; + border-style: dotted; + border-color: lightgray; + cursor: col-resize; + opacity: 0.8; + z-index: 10; + pointer-events: all; +} +.kshf .panel > .panelAdjustWidth:hover { + border-color: gray; + border-style: dashed; +} +.kshf .panel > .panelAdjustWidth[dragging] { + border-color: gray; + border-style: dashed; + display: block; +} +.kshf .panel.panel_bottom { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + width: 100%; + position: relative; +} +.kshf .panel.panel_bottom > .dropZone_panel { + bottom: 0px; + height: 30px; + width: 100%; + border-radius: 30px 30px 0px 0px; + border-top-width: 2px; +} +.kshf .panel.panel_bottom > .dropZone_between_wrapper > .dropZone_between > .dropIcon { + display: inline-block; +} +.kshf .panel.panel_bottom > .dropZone_between_wrapper > .dropZone_between > .dropText { + display: inline-block; + vertical-align: top; +} +.kshf .panel.panel_side { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + vertical-align: top; + position: relative; + height: 100%; +} +.kshf .panel.panel_side > .dropZone_panel { + top: 0px; + height: 100%; + width: 50px; + z-index: 231; +} +.kshf .panel.panel_side > .dropZone_panel > .dropIcon { + margin-top: 150px; + top: 200px; +} +.kshf .panel.panel_left > .dropZone_panel { + left: 0px; + border-radius: 0px 40px 40px 0px; + border-right-width: 2px; +} +.kshf .panel.panel_left > .panelAdjustWidth { + right: -2px; +} +.kshf .panel.panel_right > .dropZone_panel { + right: 0px; + border-radius: 40px 0px 0px 40px; + border-left-width: 2px; +} +.kshf .panel.panel_right > .panelAdjustWidth { + left: -2px; +} +.kshf .panel.panel_middle { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + vertical-align: top; + position: relative; +} +.kshf .panel.panel_middle > .dropZone_panel { + bottom: 0px; + height: 100%; + width: 100%; + left: 0px; + border-radius: 40px 40px 0px 0px; + border-top-width: 2px; +} +.kshf .panel.panel_resize { + position: absolute; + right: 0px; + bottom: 0px; + cursor: nwse-resize; + width: 0; + height: 0; + z-index: 2500; + border-right: 16px solid lightgray; + border-top: 16px solid transparent; +} +.kshf .panel.panel_resize:hover { + border-right: 16px solid orangered; +} +.kshf .panel.panel_resize[dragging="true"] { + border-right: 16px solid orangered; +} +.kshf .panel.panel_infobox { + position: absolute; + height: 100%; + width: 100%; + z-index: 2000; + transform: scale(1); + text-align: center; + -webkit-transition: -webkit-transform 500ms ease-in-out, opacity 500ms; + -moz-transition: -moz-transform 500ms ease-in-out, opacity 500ms; + -o-transition: -o-transform 500ms ease-in-out, opacity 500ms; + transition: -webkit-transform 500ms ease-in-out,-moz-transform 500ms ease-in-out,-o-transform 500ms ease-in-out,transform 500ms ease-in-out, opacity 500ms; +} +.kshf .panel.panel_infobox lesshat-selector { + -lh-property: 0; } +@-webkit-keyframes itemZoom{ 0%{-webkit-transform: scale(0); opacity:1;} 100% {-webkit-transform: scale(1); opacity:1;}} +@-moz-keyframes itemZoom{ 0%{-moz-transform: scale(0); opacity:1;} 100% {-moz-transform: scale(1); opacity:1;}} +@-o-keyframes itemZoom{ 0%{-o-transform: scale(0); opacity:1;} 100% {-o-transform: scale(1); opacity:1;}} +@keyframes itemZoom{ 0%{-webkit-transform: scale(0);-moz-transform: scale(0);-ms-transform: scale(0);transform: scale(0); opacity:1;} 100% {-webkit-transform: scale(1);-moz-transform: scale(1);-ms-transform: scale(1);transform: scale(1); opacity:1;}; +} +.kshf .panel.panel_infobox .infobox_close_button { + position: absolute; + right: 3px; + top: 3px; + background-color: #979797; + width: 20px; + height: 20px; + border-radius: 20px; + text-align: center; + cursor: pointer; + line-height: 20px; + color: white; +} +.kshf .panel.panel_infobox .infobox_close_button:hover { + background-color: #6f6f6f; +} +.kshf .panel.panel_infobox > .background { + width: 100%; + height: 100%; + z-index: -2; + background: #0b0b0b; + opacity: 0.8; + position: absolute; + -webkit-transition: all 0.5s; + -moz-transition: all 0.5s; + -o-transition: all 0.5s; + transition: all 0.5s; + border-radius: 5px; +} +.kshf .panel.panel_infobox > .infobox_content { + display: none; + margin: auto; + box-shadow: 0px 0px 20px gray; + border-radius: 15px; + background-color: white; + opacity: 1.0; + z-index: 1043; + max-height: 90%; + max-width: 90%; + overflow-y: auto; + overflow-x: hidden; +} +.kshf .panel.panel_infobox > .infobox_source { + background-color: white; + width: 550px; + height: 250px; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; +} +.kshf .panel.panel_infobox > .infobox_source .fa-info-circle { + color: gray; + cursor: pointer; + padding: 0px 5px; +} +.kshf .panel.panel_infobox > .infobox_source .fa-info-circle:hover { + color: black; +} +.kshf .panel.panel_infobox > .infobox_source > .sourceHeader { + font-weight: 700; + font-size: 1.3em; + margin: 5px 5px 0px 5px; +} +.kshf .panel.panel_infobox > .infobox_source > .source_wrapper { + width: 430px; + display: inline-block; + margin: 5px; + padding: 5px; + border: solid 1px lightgray; + border-radius: 5px; +} +.kshf .panel.panel_infobox > .infobox_source > .source_wrapper > .offpoofff { + margin-bottom: 3px; +} +.kshf .panel.panel_infobox > .infobox_source > .source_wrapper .gdocLink { + width: 350px; +} +.kshf .panel.panel_infobox > .infobox_source > .source_wrapper .source_from { + display: inline-block; + border: solid 1px lightgray; + padding: 2px 4px; + border-radius: 7px; + font-weight: 300; + margin: 0px 5px; + font-size: 0.8em; + cursor: pointer; + color: #a0a0a0; +} +.kshf .panel.panel_infobox > .infobox_source > .source_wrapper .source_from:hover { + color: black; + box-shadow: 0px 0px 1px gray; +} +.kshf .panel.panel_infobox > .infobox_source > .source_wrapper .gdocLink_ready { + opacity: 0; + pointer-events: none; +} +.kshf .panel.panel_infobox > .infobox_source > .source_wrapper .gdocLink_ready:before { + content: "\f057"; + color: red; +} +.kshf .panel.panel_infobox > .infobox_source > .source_wrapper .gdocLink_ready[ready=true] { + pointer-events: all; +} +.kshf .panel.panel_infobox > .infobox_source > .source_wrapper .gdocLink_ready[ready=true]:before { + content: "\f058"; + color: green; +} +.kshf .panel.panel_infobox > .infobox_source[selected_source_type="GoogleSheet"] .source_from[source_type="GoogleSheet"] { + background-color: #EEE; + color: black; + cursor: default; +} +.kshf .panel.panel_infobox > .infobox_source[selected_source_type="GoogleSheet"] .tableHeader:before { + content: "Sheet"; +} +.kshf .panel.panel_infobox > .infobox_source[selected_source_type="Dropbox"] .source_from[source_type="Dropbox"] { + background-color: #EEE; + color: black; + cursor: default; +} +.kshf .panel.panel_infobox > .infobox_source[selected_source_type="Dropbox"] .tableHeader:before { + content: "File"; +} +.kshf .panel.panel_infobox > .infobox_source[selected_source_type="Dropbox"] > .sheetInfo .fileType_wrapper { + display: inline-block; +} +.kshf .panel.panel_infobox > .infobox_source[selected_source_type="GoogleDrive"] .source_from[source_type="GoogleDrive"] { + background-color: #EEE; + color: black; + cursor: default; +} +.kshf .panel.panel_infobox > .infobox_source[selected_source_type="GoogleDrive"] .tableHeader:before { + content: "File"; +} +.kshf .panel.panel_infobox > .infobox_source[selected_source_type="GoogleDrive"] > .sheetInfo .fileType_wrapper { + display: inline-block; +} +.kshf .panel.panel_infobox > .infobox_source > .sheetInfo { + border: solid 1px lightgray; + border-radius: 5px; + text-align: left; + width: 300px; + margin: 0 auto; + padding-bottom: 5px; +} +.kshf .panel.panel_infobox > .infobox_source > .sheetInfo .tableHeader { + font-weight: 700; + text-align: center; + border-bottom: solid 1px lightgray; + margin-bottom: 2px; + margin-top: 5px; +} +.kshf .panel.panel_infobox > .infobox_source > .sheetInfo > .sheet_wrapper { + margin: 0 auto; +} +.kshf .panel.panel_infobox > .infobox_source > .sheetInfo .sheetColumn_ID { + width: 60px; +} +.kshf .panel.panel_infobox > .infobox_source > .sheetInfo .subheading { + width: 110px; + display: inline-block; + text-align: right; + cursor: default; +} +.kshf .panel.panel_infobox > .infobox_source > .sheetInfo .subheading:not(.tableHeader) { + font-weight: 300; +} +.kshf .panel.panel_infobox > .infobox_source > .sheetInfo .sheetColumn_Splitter { + width: 60px; +} +.kshf .panel.panel_infobox > .infobox_source > .sheetInfo .sheetName { + width: 85px; +} +.kshf .panel.panel_infobox > .infobox_source > .sheetInfo .sheetColumn_Seperator { + width: 30px; +} +.kshf .panel.panel_infobox > .infobox_source > .sheetInfo .fileType_wrapper { + display: none; +} +.kshf .panel.panel_infobox > .infobox_source > .sheetInfo .sheetColumn_sep_wrapper { + display: none; + font-size: 0.8em; + margin-left: 5px; + cursor: default; +} +.kshf .panel.panel_infobox > .infobox_source > .actionButton { + display: inline-block; + border: solid 1px gray; + padding: 5px; + margin: 5px; + border-radius: 5px; + background-color: white; + font-weight: 300; +} +.kshf .panel.panel_infobox > .infobox_source > .actionButton[disabled=true] { + color: gray; + border-color: lightgray; + cursor: not-allowed; +} +.kshf .panel.panel_infobox > .infobox_source > .actionButton[disabled=false]:hover { + cursor: pointer; + box-shadow: 1px 1px 1px gray; + background-color: #EEE; +} +.kshf .panel.panel_infobox > .infobox_loading { + width: 300px; + height: 35px; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; +} +.kshf .panel.panel_infobox > .infobox_loading .spinner { + position: absolute; + left: 20px; + top: 3px; + width: 50px; + height: 30px; + text-align: center; + font-size: 10px; +} +.kshf .panel.panel_infobox > .infobox_loading .spinner > .spinner_x { + margin-right: 2px; + background-color: #a3bdd1; + height: 100%; + width: 6px; + display: inline-block; + -webkit-animation: stretchdelay 1.2s infinite ease-in-out; + -moz-animation: stretchdelay 1.2s infinite ease-in-out; + -o-animation: stretchdelay 1.2s infinite ease-in-out; + animation: stretchdelay 1.2s infinite ease-in-out; +} +.kshf .panel.panel_infobox > .infobox_loading .spinner > .spinner_2 { + -webkit-animation-delay: -1.1s; + -moz-animation-delay: -1.1s; + -o-animation-delay: -1.1s; + animation-delay: -1.1s; +} +.kshf .panel.panel_infobox > .infobox_loading .spinner > .spinner_3 { + -webkit-animation-delay: -1s; + -moz-animation-delay: -1s; + -o-animation-delay: -1s; + animation-delay: -1s; +} +.kshf .panel.panel_infobox > .infobox_loading .spinner > .spinner_4 { + -webkit-animation-delay: -0.9s; + -moz-animation-delay: -0.9s; + -o-animation-delay: -0.9s; + animation-delay: -0.9s; +} +.kshf .panel.panel_infobox > .infobox_loading .spinner > .spinner_5 { + -webkit-animation-delay: -0.8s; + -moz-animation-delay: -0.8s; + -o-animation-delay: -0.8s; + animation-delay: -0.8s; +} +.kshf .panel.panel_infobox > .infobox_loading div.status_text { + margin: auto; + position: absolute; + top: 10px; + left: 70px; + height: 20px; +} +.kshf .panel.panel_infobox > .infobox_loading div.status_text > .status_text_sub { + margin-left: 5px; +} +.kshf .panel.panel_infobox > .infobox_credit { + display: none; + width: 390px; + height: 260px; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; +} +.kshf .panel.panel_infobox > .infobox_credit div.all-the-credits { + margin: auto; +} +.kshf .panel.panel_infobox > .infobox_credit div.header { + background-color: #d8ddd4; + width: 100%; + padding-top: 5px; + border-top-left-radius: 15px; + border-top-right-radius: 15px; + border-bottom: solid 2px #3c5e43; +} +.kshf .panel.panel_infobox > .infobox_credit span.libName { + font-size: 1.4em; + font-weight: 700; +} +.kshf .panel.panel_infobox > .infobox_credit div.project_fund { + font-size: 0.8em; + font-weight: 300; +} +.kshf .panel.panel_infobox > .infobox_itemZoom { + position: relative; + margin: 20px; + padding: 10px; +} +.kshf .panel.panel_infobox[show=loading] > .infobox_loading { + display: inline-block; +} +.kshf .panel.panel_infobox[show=credit] > .infobox_credit { + display: inline-block; +} +.kshf .panel.panel_infobox[show=source] > .infobox_source { + display: inline-block; +} +.kshf .panel.panel_infobox[show=none] { + pointer-events: none; +} +.kshf .panel.panel_infobox[show=none] > .background { + opacity: 0; +} +.kshf .panel.panel_infobox[show=itemZoom] > .infobox_itemZoom { + -webkit-animation: itemZoom 500ms forwards; + -moz-animation: itemZoom 500ms forwards; + -o-animation: itemZoom 500ms forwards; + animation: itemZoom 500ms forwards; + -webkit-animation-iteration-count: 1; + -moz-animation-iteration-count: 1; + -o-animation-iteration-count: 1; + animation-iteration-count: 1; + -webkit-animation-timing-function: ease-in-out; + -moz-animation-timing-function: ease-in-out; + -o-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + display: inline-block; +} +.kshf .hasLabelWidth { + text-align: right; +} +.kshf .attrib:not([selected="0"]) .attribLabel { + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMSAxIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48bGluZWFyR3JhZGllbnQgaWQ9Imxlc3NoYXQtZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIxMDAlIiB5Mj0iMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9InJnYigyMjAsMjIwLDIyMCkiIHN0b3Atb3BhY2l0eT0iMCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0icmdiKDIyMCwyMjAsMjIwKSIgc3RvcC1vcGFjaXR5PSIxIi8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2xlc3NoYXQtZ2VuZXJhdGVkKSIgLz48L3N2Zz4=); + background-image: -webkit-linear-gradient(left, rgba(220,220,220,0) 0%, rgba(220,220,220,1) 20px); + background-image: -moz-linear-gradient(left, rgba(220,220,220,0) 0%, rgba(220,220,220,1) 20px); + background-image: -o-linear-gradient(left, rgba(220,220,220,0) 0%, rgba(220,220,220,1) 20px); + background-image: linear-gradient(to right, rgba(220,220,220,0) 0%, rgba(220,220,220,1) 20px); +} +.kshf .attrib:not([selected="0"]) .item_count_wrapper { + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMSAxIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48bGluZWFyR3JhZGllbnQgaWQ9Imxlc3NoYXQtZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIxMDAlIiB5Mj0iMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9InJnYigyMjAsMjIwLDIyMCkiIHN0b3Atb3BhY2l0eT0iMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0icmdiKDIyMCwyMjAsMjIwKSIgc3RvcC1vcGFjaXR5PSIwIi8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2xlc3NoYXQtZ2VuZXJhdGVkKSIgLz48L3N2Zz4=); + background-image: -webkit-linear-gradient(left, rgba(220,220,220,1) 0%, rgba(220,220,220,0) 100%); + background-image: -moz-linear-gradient(left, rgba(220,220,220,1) 0%, rgba(220,220,220,0) 100%); + background-image: -o-linear-gradient(left, rgba(220,220,220,1) 0%, rgba(220,220,220,0) 100%); + background-image: linear-gradient(to right, rgba(220,220,220,1) 0%, rgba(220,220,220,0) 100%); +} +.kshf .kshfChart[collapsed=true] .headerGroup > .header_display_control > .fa.buttonSummaryCollapse { + opacity: 1; +} +.kshf .kshfChart[collapsed=true] .headerGroup > .header_display_control > .fa.buttonSummaryCollapse::before { + content: "\f065" !important; +} +.kshf .belowAttribs { + direction: ltr; +} +.kshf .subFacets .kshfChart { + margin-left: 17px; +} +.kshf .facetCategorical .scrollToTop { + right: 1px; +} +.kshf .chartClearFilterButton { + width: 14px; + height: 100%; + display: inline-block; + cursor: pointer; + font-weight: 700; + font-size: 11px; + text-align: center; + -webkit-transition: background-color 100ms linear,color 100ms linear, opacity 400ms; + -moz-transition: background-color 100ms linear,color 100ms linear, opacity 400ms; + -o-transition: background-color 100ms linear,color 100ms linear, opacity 400ms; + transition: background-color 100ms linear,color 100ms linear, opacity 400ms; + background-color: #635d46; + color: #eeebe0; + border: solid 1px #635d46; +} +.kshf .chartClearFilterButton:hover { + background-color: #B6AF96; + color: #635d46; +} +.kshf .chartClearFilterButton.alone { + display: none; + vertical-align: top; + pointer-events: all; + box-shadow: 0px 0px 1px #474940; + margin-top: 1px; + font-size: 0.8em; +} +.kshf .chartClearFilterButton.alone > .fa-times { + top: -1px; + position: relative; +} +.kshf .chartClearFilterButton.summary { + display: inline-block; + position: absolute; + right: 0px; + margin-left: 2px; + line-height: 0.9em; +} +.kshf .chartClearFilterButton.allFilter { + display: inline-block; + margin-left: 2px; + height: 19px; + vertical-align: top; + border-width: 0px 0px 0px 1px; + line-height: 19px; +} +.kshf .selection_bar rect { + fill: #788890; + fill-opacity: 0; + cursor: col-resize; + stroke-width: 1.5; + pointer-events: none; +} +.kshf .selection_bar rect:hover { + stroke: orangered; +} +.kshf .chartAxis_Measure { + pointer-events: none; + position: absolute; + z-index: 2; + top: 0px; +} +.kshf .chartAxis_Measure > .tick { + opacity: 0; + position: absolute; +} +.kshf .chartAxis_Measure > .tick > .text { + display: block; + position: relative; + text-align: center; + font-size: 0.6em; + font-weight: 300; + line-height: 9px; + cursor: default; + color: gray; +} +.kshf .chartAxis_Measure > .tick > .line { + display: block; + position: absolute; +} +.kshf .chartAxis_Measure > .percentSign { + pointer-events: all; + position: absolute; + color: gray; + font-size: 0.7em; + font-weight: 700; + cursor: pointer; + line-height: 1em; + padding: 0px 2px; + border: solid 1px rgba(153, 171, 146, 0); + border-radius: 5px; + background-color: rgba(211, 217, 197, 0); + -webkit-transition: background-color 250ms linear, border-color 250ms linear; + -moz-transition: background-color 250ms linear, border-color 250ms linear; + -o-transition: background-color 250ms linear, border-color 250ms linear; + transition: background-color 250ms linear, border-color 250ms linear; +} +.kshf .chartAxis_Measure > .percentSign:after { + content: '#'; +} +.kshf .chartAxis_Measure > .percentSign[highlight=true] { + color: black; + background-color: #d3d9c5; + border: solid 1px #99ab92; +} +.kshf .chartAxis_Measure > .chartAxis_Measure_background { + position: absolute; + left: 0px; + top: 0px; + cursor: pointer; + pointer-events: all; + background-color: #E0E4D7; + border: solid 1px #B7CAAF; + border-radius: 5px; + opacity: 0; + -webkit-transition: opacity 250ms linear; + -moz-transition: opacity 250ms linear; + -o-transition: opacity 250ms linear; + transition: opacity 250ms linear; +} +.kshf .chartAxis_Measure > .chartAxis_Measure_background[highlight=true] { + opacity: 1; +} +.kshf .border_line { + position: relative; + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMSAxIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48bGluZWFyR3JhZGllbnQgaWQ9Imxlc3NoYXQtZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjEwMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9InJnYigxOTAsIDE5MCwgMTkwKSIgc3RvcC1vcGFjaXR5PSIwIi8+PHN0b3Agb2Zmc2V0PSIxMCUiIHN0b3AtY29sb3I9InJnYigxOTAsIDE5MCwgMTkwKSIgc3RvcC1vcGFjaXR5PSIxIi8+PHN0b3Agb2Zmc2V0PSI5MCUiIHN0b3AtY29sb3I9InJnYigxOTAsIDE5MCwgMTkwKSIgc3RvcC1vcGFjaXR5PSIxIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSJyZ2IoMTkwLCAxOTAsIDE5MCkiIHN0b3Atb3BhY2l0eT0iMCIvPjwvbGluZWFyR3JhZGllbnQ+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNsZXNzaGF0LWdlbmVyYXRlZCkiIC8+PC9zdmc+); + background-image: -webkit-linear-gradient(right, rgba(190, 190, 190, 0) 0%, rgba(190, 190, 190, 1) 10%, rgba(190, 190, 190, 1) 90%, rgba(190, 190, 190, 0) 100%);; + background-image: -moz-linear-gradient(right, rgba(190, 190, 190, 0) 0%, rgba(190, 190, 190, 1) 10%, rgba(190, 190, 190, 1) 90%, rgba(190, 190, 190, 0) 100%);; + background-image: -o-linear-gradient(right, rgba(190, 190, 190, 0) 0%, rgba(190, 190, 190, 1) 10%, rgba(190, 190, 190, 1) 90%, rgba(190, 190, 190, 0) 100%);; + background-image: linear-gradient(to left, rgba(190, 190, 190, 0) 0%, rgba(190, 190, 190, 1) 10%, rgba(190, 190, 190, 1) 90%, rgba(190, 190, 190, 0) 100%);; + height: 1px; + margin-bottom: -2px; + pointer-events: all; + top: -1px; +} +.kshf .border_line.border_line_bottom { + width: 100%; + height: 1px; + margin-bottom: 0px; +} +.kshf .dragWidthHandle { + display: none; + position: absolute; + top: 0px; + cursor: col-resize; + border-left: dotted lightgray 2px; + width: 4px; +} +.kshf .dragWidthHandle:hover { + border-color: gray; +} +.kshf .dragWidthHandle[dragging] { + display: block; + border-color: lightgray; + border-style: solid; + border-left-width: 2px; + border-right: none; + border-top: none; + border-bottom: none; +} +.kshf .headerGroup { + position: relative; + text-align: center; + padding-top: 1px; + border-radius: 3px; + box-shadow: 0px 0px 2px #9b9b9b; + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMSAxIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48bGluZWFyR3JhZGllbnQgaWQ9Imxlc3NoYXQtZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjEwMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9InJnYigxOTAsIDE5MCwgMTkwKSIgc3RvcC1vcGFjaXR5PSIwLjMiLz48c3RvcCBvZmZzZXQ9IjIwJSIgc3RvcC1jb2xvcj0icmdiKDE5MCwgMTkwLCAxOTApIiBzdG9wLW9wYWNpdHk9IjAuNCIvPjxzdG9wIG9mZnNldD0iODAlIiBzdG9wLWNvbG9yPSJyZ2IoMTkwLCAxOTAsIDE5MCkiIHN0b3Atb3BhY2l0eT0iMC40Ii8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSJyZ2IoMTkwLCAxOTAsIDE5MCkiIHN0b3Atb3BhY2l0eT0iMC4zIi8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2xlc3NoYXQtZ2VuZXJhdGVkKSIgLz48L3N2Zz4=); + background-image: -webkit-linear-gradient(right, rgba(190, 190, 190, 0.3) 0%, rgba(190, 190, 190, 0.4) 20%, rgba(190, 190, 190, 0.4) 80%, rgba(190, 190, 190, 0.3) 100%);; + background-image: -moz-linear-gradient(right, rgba(190, 190, 190, 0.3) 0%, rgba(190, 190, 190, 0.4) 20%, rgba(190, 190, 190, 0.4) 80%, rgba(190, 190, 190, 0.3) 100%);; + background-image: -o-linear-gradient(right, rgba(190, 190, 190, 0.3) 0%, rgba(190, 190, 190, 0.4) 20%, rgba(190, 190, 190, 0.4) 80%, rgba(190, 190, 190, 0.3) 100%);; + background-image: linear-gradient(to left, rgba(190, 190, 190, 0.3) 0%, rgba(190, 190, 190, 0.4) 20%, rgba(190, 190, 190, 0.4) 80%, rgba(190, 190, 190, 0.3) 100%);; + z-index: 6; +} +.kshf .headerGroup .summaryTitle { + display: block; + font-weight: 700; + cursor: default; + padding-top: 2px; + text-rendering: initial; + white-space: nowrap; + text-align: center; + margin: 0 auto; + height: 20px; + /*white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis;*/ +} +.kshf .headerGroup .summaryTitle > .summaryTitle_text { + display: inline-block; + max-width: calc(100% - 60px); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-size: 0.9em; +} +.kshf .headerGroup .summaryTitle > .summaryTitle_text:focus { + background-color: white; + box-shadow: 0 0 3px #2CABCF; + outline: 0 none; + padding-left: 3px; + padding-right: 3px; +} +.kshf .headerGroup .save_filter_as_set { + display: none; + position: absolute; + cursor: pointer; + margin-left: 4px; + margin-top: 1px; + width: 15px; + color: gray; +} +.kshf .headerGroup .save_filter_as_set:hover { + color: black; +} +.kshf .headerGroup .chartClearFilterButton.rowFilter { + pointer-events: all; + height: 14px; + width: 14px; + line-height: 13px; + margin-right: 3px; +} +.kshf .headerGroup .facetIcons { + top: 2px; + right: 2px; + position: absolute; + font-size: 0.9em; + color: gray; +} +.kshf .headerGroup .facetIcons .fa { + cursor: pointer; + margin-left: 2px; +} +.kshf .headerGroup .facetIcons .fa:hover { + color: black; +} +.kshf .headerGroup .facetIcons .hasMultiMappings { + display: none; +} +.kshf .headerGroup .facetIcons .summaryDescription { + cursor: default; +} +.kshf .headerGroup > .header_display_control { + display: block; + position: absolute; + font-size: 0.9em; + top: 3px; + left: 2px; + -webkit-transition: color 250ms linear, opacity 100ms linear ; + -moz-transition: color 250ms linear, opacity 100ms linear ; + -o-transition: color 250ms linear, opacity 100ms linear ; + transition: color 250ms linear, opacity 100ms linear ; + -webkit-transform-origin: 50% 50%; + -moz-transform-origin: 50% 50%; + -o-transform-origin: 50% 50%; + -ms-transform-origin: 50% 50%; + transform-origin: 50% 50%; +} +.kshf .headerGroup > .header_display_control > .fa { + display: inline-block; + vertical-align: top; + opacity: 0; + color: black; + cursor: pointer; + margin-right: 2px; + width: 14px; + height: 14px; + width: 13px; + height: 13px; +} +.kshf .headerGroup > .header_display_control > .fa:hover { + color: #cb5454; +} +.kshf .headerGroup > .header_display_control > .buttonSummaryCollapse::before { + content: "\f066"; +} +.kshf .headerGroup > .header_display_control > .buttonSummaryRemove { + display: none; +} +.kshf .headerGroup > .header_display_control > .buttonSummaryExpand { + display: none; +} +.kshf .aggr { + display: block; + position: absolute; + background-color: #b8c7d2; + -webkit-transform-origin: 0% 0%; + -moz-transform-origin: 0% 0%; + -o-transform-origin: 0% 0%; + -ms-transform-origin: 0% 0%; + transform-origin: 0% 0%; +} +.kshf .aggr.active { + cursor: pointer; + pointer-events: all; +} +.kshf .aggr.total { + background-color: #dee2e6; + pointer-events: none; +} +.kshf .aggr.preview { + background-color: #ff6a33; + pointer-events: none; + -webkit-transform: scaleX(0); + -moz-transform: scaleX(0); + -o-transform: scaleX(0); + -ms-transform: scaleX(0); + transform: scaleX(0); +} +.kshf .aggr.preview[fast] { + -webkit-transition: -webkit-transform 200ms ease-in-out; + -moz-transition: -moz-transform 200ms ease-in-out; + -o-transition: -o-transform 200ms ease-in-out; + transition: -webkit-transform 200ms ease-in-out,-moz-transform 200ms ease-in-out,-o-transform 200ms ease-in-out,transform 200ms ease-in-out; +} +.kshf .aggr.compare { + background-color: #2f4f4f; + pointer-events: none; + -webkit-transition: -webkit-transform 700ms ease-in-out, opacity 400ms ease-in-out; + -moz-transition: -moz-transform 700ms ease-in-out, opacity 400ms ease-in-out; + -o-transition: -o-transform 700ms ease-in-out, opacity 400ms ease-in-out; + transition: -webkit-transform 700ms ease-in-out,-moz-transform 700ms ease-in-out,-o-transform 700ms ease-in-out,transform 700ms ease-in-out, opacity 400ms ease-in-out; + opacity: 0; +} +.kshf .kshfChart { + display: block; + position: relative; + -webkit-transition: max-height 700ms ease-in-out; + -moz-transition: max-height 700ms ease-in-out; + -o-transition: max-height 700ms ease-in-out; + transition: max-height 700ms ease-in-out; + /* &:before{ + content:''; width:100%; height:100%; + position:absolute; top:0; left:0; + pointer-events:none; + }*/ +} +.kshf .kshfChart > .wrapper { + position: relative; + overflow: hidden; + -webkit-transition: height 700ms ease-in-out; + -moz-transition: height 700ms ease-in-out; + -o-transition: height 700ms ease-in-out; + transition: height 700ms ease-in-out; +} +.kshf .kshfChart > .wrapper > .facetCategorical { + overflow: hidden; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls { + border-bottom: dotted 1px lightgray; + margin-bottom: -1px; + position: relative; + display: none; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .attribTextSearch { + display: none; + vertical-align: top; + white-space: nowrap; + position: relative; + cursor: text; + height: 18px; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .attribTextSearch > .attribTextSearchInput { + display: inline-block; + width: calc(100% - 13px); + height: 15px; + font-size: 0.7em; + font-weight: 700; + border-width: 0px; + color: #cb5454; + background-color: rgba(244, 244, 244, 0); + pointer-events: all; + margin: 2px 0px 0px 0px; + cursor: text; + text-align: right; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .attribTextSearch > .attribTextSearchInput:focus { + outline-color: #cb5454; + outline-width: 2px; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .attribTextSearch > .attribTextSearchInput:hover { + border: solid 1px #cb5454; + padding: 0px 0px 0px 0px; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .attribTextSearch > .attribTextSearchInput::-webkit-input-placeholder { + font-weight: 500; + color: #cb5454; + text-align: right; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .attribTextSearch > .attribTextSearchInput:focus::-webkit-input-placeholder { + color: #F3CDCD; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .attribTextSearch > .attribTextSearchInput:hover::-webkit-input-placeholder { + color: #F3CDCD; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .attribTextSearch > .attribTextSearchControl { + position: relative; + top: 0px; + padding-left: 1px; + font-size: 0.7em; + pointer-events: none; + color: #cb5454; + cursor: default; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .attribTextSearch > .attribTextSearchControl:before { + content: "\f002"; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .attribTextSearch > .attribTextSearchControl[showClear=true] { + cursor: pointer; + pointer-events: all; + color: gray; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .attribTextSearch > .attribTextSearchControl[showClear=true]:hover { + color: #cb5454; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .attribTextSearch > .attribTextSearchControl[showClear=true]:before { + content: "\f057"; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .catSortButton { + opacity: 0; + position: absolute; + bottom: 1px; + font-size: 0.7em; + text-align: right; + padding-right: 2px; + -webkit-transition: opacity 200ms linear; + -moz-transition: opacity 200ms linear; + -o-transition: opacity 200ms linear; + transition: opacity 200ms linear; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .catSortButton:hover { + color: #ff4500; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .catSortButton:before { + content: "\f161"; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .catSortButton[inverse='true']:before { + content: "\f160"; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .sortOptionSelectGroup { + display: block; + vertical-align: top; + white-space: nowrap; + position: relative; + font-weight: 300; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .sortOptionSelectGroup > .optionSelect { + width: 100%; + height: 17px; + font-size: 0.7em; + -webkit-appearance: none; + -moz-appearance: none; + background: transparent; + appearance: none; + font-weight: 300; + border-width: 0px; + cursor: pointer; + padding-right: 0px; + margin: 0px; + vertical-align: middle; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .facetControls > .sortOptionSelectGroup > .optionSelect:hover { + color: orangered; +} +.kshf .kshfChart > .wrapper > .facetCategorical .scrollToTop { + margin-top: -13px; + font-size: 0.8em; + pointer-events: all; + position: absolute; +} +.kshf .kshfChart > .wrapper > .facetCategorical .selectAllAttribsButton { + font-size: 0.6em; + float: left; + margin-left: 2px; + font-weight: 300; + color: black; + border: solid 1px lightgray; + border-radius: 10px; + padding: 1px 5px 0px 5px; + background-color: rgba(150, 150, 100, 0.2); + cursor: pointer; +} +.kshf .kshfChart > .wrapper > .facetCategorical .selectAllAttribsButton:hover { + box-shadow: 0px 0px 1px black; +} +.kshf .kshfChart > .wrapper > .facetCategorical .selectAllAttribsButton::before { + content: '+ Add Filter with All'; +} +.kshf .kshfChart > .wrapper > .facetCategorical .scroll_display_more { + font-size: 0.7em; + line-height: 1.4em; + vertical-align: top; + cursor: pointer; + color: #b4b4b4; + opacity: 1; + pointer-events: all; + display: inline-block; + padding-top: 2px; +} +.kshf .kshfChart > .wrapper > .facetCategorical .scroll_display_more:hover { + color: #cb5454; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup { + position: relative; + overflow-y: auto; + overflow-x: hidden; + display: block; + z-index: 5; + -webkit-transition: height 700ms ease-in-out; + -moz-transition: height 700ms ease-in-out; + -o-transition: height 700ms ease-in-out; + transition: height 700ms ease-in-out; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .chartBackground { + opacity: 0; + width: 1px; + display: block; + -webkit-transition: opacity 250ms; + -moz-transition: opacity 250ms; + -o-transition: opacity 250ms; + transition: opacity 250ms; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .chartCatLabelResize { + display: none; + z-index: 25; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib { + display: block; + position: absolute; + white-space: nowrap; + top: 0px; + height: 16px; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib > .clickArea { + z-index: 20; + display: inline-block; + vertical-align: top; + pointer-events: all; + margin-top: 4px; + margin-bottom: 4px; + height: 10px !important; + position: absolute; + font-size: 0.8em; + font-weight: 300; + width: 1px; + left: 0px; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib .compareButton { + width: 9px; + text-align: right; + top: 4px; + z-index: 300; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib .compareButton[inside] { + margin-left: -11px; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib > .attribLabel { + position: absolute; + display: inline-block; + vertical-align: top; + line-height: 18px; + pointer-events: none; + z-index: 21; + font-size: 0.8em; + font-weight: 300; + cursor: default; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib > .attribLabel > .theLabel:before { + color: white; + font-weight: 300; + font-size: 0.7em; + vertical-align: top; + border-radius: 3px; + padding: 1px 2px 0px 2px; + margin: 0px 2px; + opacity: 0.4; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib > .attribLabel > .theLabel .AndOrNot { + display: inline; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib > .item_count_wrapper { + position: absolute; + display: inline-block; + vertical-align: top; + line-height: 19px; + height: 18px; + font-size: 0.7em; + pointer-events: none; + padding-right: 1px; + text-align: right; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib > .aggr_Group { + display: inline-block; + vertical-align: top; + position: relative; + pointer-events: none; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib > .aggr_Group .aggr { + -webkit-transform-origin: 0% 0%; + -moz-transform-origin: 0% 0%; + -o-transform-origin: 0% 0%; + -ms-transform-origin: 0% 0%; + transform-origin: 0% 0%; + top: 4px; + width: 1px; + height: 10px; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib > .aggr_Group .aggr.total_tip { + right: -5px; + /* right arrow */ + border-top: 5px solid transparent; + border-bottom: 5px solid transparent; + border-left: 5px solid #dee2e6; + background-color: initial; + /* + // The sawtooth pattern + width: 8px; + left: 0px; + height: 10px; + top: 4px; + opacity: 0px; + + background: linear-gradient(-135deg, transparent 75%, @color_bars_background 75%) 0 50%, + linear-gradient(-45deg, transparent 75%, @color_bars_background 75%) 0 50%; + + background-position: top left, top left; + background-repeat: repeat; + background-size: 8px 8px; + */ +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib > .aggr_Group .aggr.compare { + width: 1px; + height: 5px; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib .filterButtons { + white-space: nowrap; + cursor: pointer; + vertical-align: top; + z-index: 100; + pointer-events: all; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib .filterButtons > .filterButton { + display: none; + pointer-events: all; + margin-right: 2px; + border-radius: 4px; + vertical-align: middle; + padding: 1px 2px 0px 3px; + line-height: 13px; + color: white; + font-weight: 300; + font-size: 0.7em; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib .filterButtons > .orButton { + background-color: #269aa3; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib .filterButtons > .orButton:hover { + background-color: #1c737a; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib .filterButtons > .notButton { + background-color: #a6a6a6; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib .filterButtons > .notButton:hover { + background-color: gray; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[activeItems='0'] .measureLabel { + visibility: hidden; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[compare="true"] > .attribLabel > .theLabel { + font-weight: 700; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib:not([selected="0"]) > .attribLabel > .theLabel { + font-weight: 700; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib:not([selected="0"]) .clickArea { + cursor: pointer; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[selected="-1"] > .attribLabel > .theLabel { + text-decoration: line-through; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[selected="1"] { + /* &[show-box=true]{ + > .attribLabel > .theLabel:before{ + content: "And"; + background-color: @color_query_and; + } + }*/ +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[selected="1"] > .attribLabel > .theLabel { + color: #1d4870; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[selected="2"] > .attribLabel > .theLabel { + color: #1c737a; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[selected="2"][show-box=true] > .attribLabel > .filterButtons > .orButton { + display: inline; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[selected="-1"] { + /* + > .attribLabel > .theLabel{ + color: @color_query_not; + &:before{ + content: "Not"; + background-color: @color_query_not; + } + } + */ +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[selected="-1"] > .attribLabel > .theLabel { + color: #808080; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[selected="-1"] > .attribLabel > .filterButtons > .notButton { + display: inline; + background-color: #808080; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[noitems=false][highlight^="selected"] > .attribLabel > .theLabel { + font-weight: 700 !important; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[noitems=false][highlight^="selected"][selected="0"] .clickArea { + cursor: pointer; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[noitems=false][highlight^="selected"][selected="0"][selecttype="and"] > .attribLabel > .theLabel { + color: #1d4870; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[noitems=false][highlight^="selected"][selected="0"][selecttype="or"] > .attribLabel > .theLabel { + color: #1c737a; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[noitems=false][highlight^="selected"][selected="0"][selecttype="not"] > .attribLabel > .theLabel { + color: #808080; + text-decoration: line-through; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[noitems=false][highlight=true] > .attribLabel > .theLabel { + color: #ff6a33; + font-weight: 700; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[noitems=true] { + color: gray; +} +.kshf .kshfChart > .wrapper > .facetCategorical > .attribGroup > .attrib[noitems=true] .measureLabel { + display: none; +} +.kshf .kshfChart > .wrapper > .facetCategorical:hover > .facetControls > .catSortButton { + opacity: 1; +} +.kshf .kshfChart > .wrapper > .facetInterval { + padding: 7px 11px 0px 6px; + overflow: hidden; +} +.kshf .kshfChart > .wrapper > .facetInterval[scaletype="time"] span.aggr { + opacity: 0 !important; +} +.kshf .kshfChart > .wrapper > .facetInterval[scaletype="step"] .zoomControl[sign="plus"] { + display: none !important; +} +.kshf .kshfChart > .wrapper > .facetInterval[zoomed="true"] .zoomControl[sign="minus"] { + display: block !important; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram { + position: relative; + pointer-events: all; + -webkit-transition: height 700ms ease-in-out; + -moz-transition: height 700ms ease-in-out; + -o-transition: height 700ms ease-in-out; + transition: height 700ms ease-in-out; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .timeSVG .lineTrend.total { + fill: #EEF0F2; + stroke: none; + stroke-width: 1.5px; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .timeSVG .lineTrend.active { + fill: #d7e0e6; + stroke: #b8c7d2; + stroke-width: 1.5px; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .timeSVG .activeLine { + stroke: #b8c7d2; + stroke-width: 2px; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .timeSVG .lineTrend.preview { + fill: rgba(255, 106, 51, 0.3); + stroke: #ff6a33; + stroke-width: 2px; + opacity: 0; + -webkit-transition: opacity 500ms linear; + -moz-transition: opacity 500ms linear; + -o-transition: opacity 500ms linear; + transition: opacity 500ms linear; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .timeSVG .previewLine { + stroke: #ff6a33; + stroke-width: 2px; + opacity: 0; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .timeSVG .lineTrend.compare { + fill: none; + stroke: #2f4f4f; + stroke-width: 1.5px; + opacity: 0; + -webkit-transition: opacity 500ms linear; + -moz-transition: opacity 500ms linear; + -o-transition: opacity 500ms linear; + transition: opacity 500ms linear; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .timeSVG .compareLine { + stroke: #2f4f4f; + stroke-width: 2px; + opacity: 0; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .bins { + position: absolute; + top: 0px; + z-index: 3; + height: 100%; + -webkit-transition: -webkit-transform 700ms ease-in-out, background-color 250ms ease-in-out; + -moz-transition: -moz-transform 700ms ease-in-out, background-color 250ms ease-in-out; + -o-transition: -o-transform 700ms ease-in-out, background-color 250ms ease-in-out; + transition: -webkit-transform 700ms ease-in-out,-moz-transform 700ms ease-in-out,-o-transform 700ms ease-in-out,transform 700ms ease-in-out, background-color 250ms ease-in-out; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .bins > .aggr_Group { + position: absolute; + display: block; + height: 100%; + pointer-events: none; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .bins > .aggr_Group > .aggr { + width: 1px; + height: 1px; + -webkit-transform-origin: 0% 100%; + -moz-transform-origin: 0% 100%; + -o-transform-origin: 0% 100%; + -ms-transform-origin: 0% 100%; + transform-origin: 0% 100%; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .bins > .aggr_Group > .aggr.total_tip { + content: " "; + display: block; + position: absolute; + top: -7px; + width: 100%; + left: 0px; + height: 8px; + opacity: 0; + background: linear-gradient(-135deg, transparent 75%, #dee2e6 75%) 0 50%, linear-gradient(135deg, transparent 75%, #dee2e6 75%) 0 50%; + background-position: top left, top left; + background-repeat: repeat; + background-size: 8px 8px; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .bins > .aggr_Group > .compareButton { + position: absolute; + width: 100%; + text-align: center; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .bins > .aggr_Group > .compareButton[inside] { + margin-top: 12px; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .bins > .aggr_Group > .measureLabel { + top: 1px; + display: block; + position: relative; + width: 100%; + font-size: 0.7em; + text-align: center; + cursor: pointer; + pointer-events: all; + -webkit-transition: -webkit-transform 700ms ease-in-out; + -moz-transition: -moz-transform 700ms ease-in-out; + -o-transition: -o-transform 700ms ease-in-out; + transition: -webkit-transform 700ms ease-in-out,-moz-transform 700ms ease-in-out,-o-transform 700ms ease-in-out,transform 700ms ease-in-out; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .bins > .aggr_Group[noitems=true] > .measureLabel { + display: none; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .chartAxis_Measure { + top: 0px; + width: 100%; + height: 100%; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .chartAxis_Measure > .percentSign { + bottom: -1px; + left: 0px; + width: 20px; + text-align: right; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .chartAxis_Measure > .chartAxis_Measure_background { + width: 21px; + height: calc(100% - 12px); + top: 0px; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .chartAxis_Measure > .tick { + left: 21px; + width: 100%; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .chartAxis_Measure > .tick > .line { + border-bottom: dotted 1px #b6b3b3; + width: 100%; + left: 0px; + pointer-events: none; +} +.kshf .kshfChart > .wrapper > .facetInterval > .histogram > .chartAxis_Measure > .tick > .text { + position: relative; + width: 25px; + left: -25px; + top: -3px; + text-align: right; + padding-right: 1px; +} +.kshf .kshfChart > .wrapper > .facetInterval > .percentileGroup { + height: 12px; + margin-top: 1px; + position: relative; + border-style: solid; + border-color: lightgray; + border-width: 1px 0px; +} +.kshf .kshfChart > .wrapper > .facetInterval > .percentileGroup > .percentileTitle { + font-size: 0.6em; + position: absolute; + display: inline-block; + font-weight: 300; + top: 0px; + left: -9px; + text-shadow: 0px 0px 2px white; + z-index: 120; + color: gray; + pointer-events: none; + display: none; +} +.kshf .kshfChart > .wrapper > .facetInterval > .percentileGroup:hover > .percentileTitle { + display: block; +} +.kshf .kshfChart > .wrapper > .facetInterval > .percentileGroup > .quantile { + display: inline-block; + position: absolute; + height: 10px; + left: 0px; + width: 1px; + -webkit-transition: -webkit-transform 700ms ease-in-out; + -moz-transition: -moz-transform 700ms ease-in-out; + -o-transition: -o-transform 700ms ease-in-out; + transition: -webkit-transform 700ms ease-in-out,-moz-transform 700ms ease-in-out,-o-transform 700ms ease-in-out,transform 700ms ease-in-out; + -webkit-transform-origin: 0% 0%; + -moz-transform-origin: 0% 0%; + -o-transform-origin: 0% 0%; + -ms-transform-origin: 0% 0%; + transform-origin: 0% 0%; +} +.kshf .kshfChart > .wrapper > .facetInterval > .percentileGroup > .quantile.q_pos { + background-color: #1b6f61; + margin-left: -0.5px; + z-index: 101; + pointer-events: none; +} +.kshf .kshfChart > .wrapper > .facetInterval > .percentileGroup > .quantile.q_pos.q_50 { + width: 4px; + background-color: #1b6f61; + margin-left: -2px; + pointer-events: all; +} +.kshf .kshfChart > .wrapper > .facetInterval > .percentileGroup > .quantile.q_range:hover { + border-color: #1b6f61; + border-style: solid; + border-width: 1px 0px 1px 0px; + z-index: 100; +} +.kshf .kshfChart > .wrapper > .facetInterval > .percentileGroup > .quantile.q_40_60 { + background-color: #2aad97; +} +.kshf .kshfChart > .wrapper > .facetInterval > .percentileGroup > .quantile.q_30_70 { + background-color: #78decd; +} +.kshf .kshfChart > .wrapper > .facetInterval > .percentileGroup > .quantile.q_20_80 { + background-color: #caf2eb; +} +.kshf .kshfChart > .wrapper > .facetInterval > .percentileGroup > .quantile.q_10_90 { + background-color: #f3fcfb; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider { + position: relative; + pointer-events: all; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .zoomControl { + display: none; + position: absolute; + left: -20px; + top: -1px; + font-size: 0.8em; + color: gray; + cursor: pointer; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .zoomControl:hover { + color: black; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .zoomControl[sign="plus"]:before { + content: "\f00e"; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .zoomControl[sign="minus"]:before { + content: "\f010"; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine { + height: 11px; + cursor: ew-resize; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .selectedItemValue { + position: absolute; + z-index: 20; + top: 1px; + display: none; + -webkit-transition: all 450ms ease-in-out; + -moz-transition: all 450ms ease-in-out; + -o-transition: all 450ms ease-in-out; + transition: all 450ms ease-in-out; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .selectedItemValue > .circlee { + display: block; + border-radius: 20px; + width: 8px; + height: 8px; + background-color: orangered; + left: -4px; + position: relative; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .selectedItemValue > .selected-item-value-text { + position: relative; + top: 0px; + color: #ff6a33; + font-size: 0.8em; + white-space: nowrap; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .selectedItemValue > .selected-item-value-text > .selected-item-value-text-v { + position: relative; + left: -50%; + top: -2px; + background-color: white; + border-radius: 4px; + border: solid 1px #DDDDDD; + padding: 0px 1px; + font-size: 0.9em; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .base { + display: block; + position: absolute; + box-shadow: inset 0px 0px 2px gray; + -webkit-transform-origin: 0% 0%; + -moz-transform-origin: 0% 0%; + -o-transform-origin: 0% 0%; + -ms-transform-origin: 0% 0%; + transform-origin: 0% 0%; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .base.total { + width: 100%; + height: 3px; + top: 3px; + background-color: lightgray; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .base.active { + height: 8px; + top: 1px; + width: 1px; + opacity: 0; + pointer-events: none; + background-color: #30b8c4; + -webkit-transition: opacity 500ms; + -moz-transition: opacity 500ms; + -o-transition: opacity 500ms; + transition: opacity 500ms; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .base.active[filtered=true] { + opacity: 1; + pointer-events: all; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .base.active:hover { + background-color: orangered !important; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .handle { + display: block; + position: absolute; + width: 6px; + height: 8px; + background-color: white; + border-width: 1px; + border-color: black; + border-style: solid; + cursor: ew-resize; + z-index: 10; + top: 1px; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .handle:hover { + background-color: orangered !important; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .handle.min { + left: -5px; + border-top-left-radius: 10px; + border-bottom-left-radius: 10px; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .handle.min > .rangeLimitOnChart { + left: 3px; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .handle.max { + border-top-right-radius: 10px; + border-bottom-right-radius: 10px; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .handle.max > .rangeLimitOnChart { + left: -2px; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .handle > .rangeLimitOnChart { + position: absolute; + display: none; + width: 2px; + border-left: dotted 2px #30b8c4; + cursor: ew-resize; + box-shadow: 0px 0px 2px white; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .controlLine > .handle > .rangeLimitOnChart:hover { + border-left: solid 2px #30b8c4; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .labelGroup { + cursor: default; + position: relative; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .labelGroup > .tick { + position: absolute; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .labelGroup > .tick > .text { + top: -1px; + font-size: 0.7em; + font-weight: 300; + position: relative; + left: -50%; + display: block; + text-align: center; + white-space: nowrap; +} +.kshf .kshfChart > .wrapper > .facetInterval > .intervalSlider > .labelGroup > .tick > .line { + position: absolute; + top: -10px; + height: 10px; + border-left: solid 1px #a0a0a0; + display: block; + pointer-events: none; +} +.kshf .kshfChart .subFacets { + position: relative; + height: 100%; +} +.kshf .kshfChart .facetGroupBar { + display: inline-block; + position: absolute; + height: 100%; + width: 17px; + border-right: solid 2px #ccc3c3; + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMSAxIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48bGluZWFyR3JhZGllbnQgaWQ9Imxlc3NoYXQtZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIxMDAlIiB5Mj0iMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9InJnYigyMDQsMTk1LDE5NSkiIHN0b3Atb3BhY2l0eT0iMCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0icmdiKDIwNCwxOTUsMTk1KSIgc3RvcC1vcGFjaXR5PSIwLjUiLz48L2xpbmVhckdyYWRpZW50PjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjbGVzc2hhdC1nZW5lcmF0ZWQpIiAvPjwvc3ZnPg==); + background-image: -webkit-linear-gradient(left, rgba(204,195,195,0) 0%, rgba(204,195,195,0.5) 100%); + background-image: -moz-linear-gradient(left, rgba(204,195,195,0) 0%, rgba(204,195,195,0.5) 100%); + background-image: -o-linear-gradient(left, rgba(204,195,195,0) 0%, rgba(204,195,195,0.5) 100%); + background-image: linear-gradient(to right, rgba(204,195,195,0) 0%, rgba(204,195,195,0.5) 100%); +} +.kshf .kshfChart .facetGroupBar > .facetGroupBarSub { + height: 100%; + width: 1px; + margin: auto; + background-color: black; +} +.kshf .kshfChart[collapsed=true] > .headerGroup .summaryTitle { + cursor: pointer; +} +.kshf .kshfChart[collapsed=true] > .wrapper .facetCategorical > .facetControls { + display: none; +} +.kshf .kshfChart[collapsed=true] > .wrapper .facetCategorical > .scrollToTop { + display: none; +} +.kshf .kshfChart[collapsed=true] > .wrapper .facetCategorical > .attribGroup { + display: none; +} +.kshf .kshfChart[collapsed=true] > .wrapper .facetCategorical > .belowAttribs { + display: none; +} +.kshf .kshfChart[collapsed=true] > .wrapper .facetInterval > .histogram { + display: none; +} +.kshf .kshfChart[collapsed=true] > .wrapper .facetInterval > .intervalSlider { + display: none; +} +.kshf .kshfChart[filtered=true] > .headerGroup .chartClearFilterButton { + display: inline-block; +} +.kshf .kshfChart[filtered=true]:hover > .wrapper > .facetInterval > .intervalSlider > .zoomControl { + display: block; +} +.kshf .kshfChart[filtered=true]:hover > .wrapper > .facetInterval > .intervalSlider > .controlLine > .handle > .rangeLimitOnChart { + display: block; +} +.kshf .kshfChart[hasmultivalueitem=false][filtered_or="0"][filtered_and="0"] > .wrapper > .facetCategorical > .attribGroup > .attrib:hover[selected="0"] .notButton { + display: inline; +} +.kshf .kshfChart[hasmultivalueitem=false][filtered_or="0"] > .wrapper > .facetCategorical > .attribGroup > .attrib:hover[selected="-1"] { + cursor: pointer; +} +.kshf .kshfChart:not([filtered_or="0"]) > .wrapper > .facetCategorical > .attribGroup > .attrib[selected="0"]:hover .orButton { + display: inline; +} +.kshf .kshfChart:not([filtered_and="0"]) > .wrapper > .facetCategorical > .attribGroup > .attrib[selected="0"]:hover .orButton { + display: inline; +} +.kshf .kshfChart[hasmultivalueitem=true] > .wrapper > .facetCategorical > .attribGroup > .attrib[selected="0"][highlight="selected"] .notButton { + display: inline; +} +.kshf .kshfChart[filtered_range=true] .chartClearFilterButton.rangeFilter { + display: inline-block; +} +.kshf .kshfChart[refreshSorting="true"] .catSortButton:before { + content: "\f175" !important; +} +.kshf .kshfChart:hover > .headerGroup { + box-shadow: 0px 0px 2px #646464; +} +.kshf .kshfChart:hover > .headerGroup > .header_display_control > .fa { + opacity: 1; +} +.kshf .kshfChart:hover[hasmultivalueitem=true] > .headerGroup .hasMultiMappings { + display: inline-block; +} +.kshf .kshfChart[hasFacets=true] > .headerGroup { + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMSAxIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48bGluZWFyR3JhZGllbnQgaWQ9Imxlc3NoYXQtZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjEwMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9InJnYigxNTEsIDE1MSwgMTUxKSIgc3RvcC1vcGFjaXR5PSIwLjIiLz48c3RvcCBvZmZzZXQ9IjIwJSIgc3RvcC1jb2xvcj0icmdiKDE1MSwgMTUxLCAxNTEpIiBzdG9wLW9wYWNpdHk9IjAuNCIvPjxzdG9wIG9mZnNldD0iODAlIiBzdG9wLWNvbG9yPSJyZ2IoMTUxLCAxNTEsIDE1MSkiIHN0b3Atb3BhY2l0eT0iMC40Ii8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSJyZ2IoMTUxLCAxNTEsIDE1MSkiIHN0b3Atb3BhY2l0eT0iMC4yIi8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2xlc3NoYXQtZ2VuZXJhdGVkKSIgLz48L3N2Zz4=); + background-image: -webkit-linear-gradient(right, rgba(151, 151, 151, 0.2) 0%, rgba(151, 151, 151, 0.4) 20%, rgba(151, 151, 151, 0.4) 80%, rgba(151, 151, 151, 0.2) 100%);; + background-image: -moz-linear-gradient(right, rgba(151, 151, 151, 0.2) 0%, rgba(151, 151, 151, 0.4) 20%, rgba(151, 151, 151, 0.4) 80%, rgba(151, 151, 151, 0.2) 100%);; + background-image: -o-linear-gradient(right, rgba(151, 151, 151, 0.2) 0%, rgba(151, 151, 151, 0.4) 20%, rgba(151, 151, 151, 0.4) 80%, rgba(151, 151, 151, 0.2) 100%);; + background-image: linear-gradient(to left, rgba(151, 151, 151, 0.2) 0%, rgba(151, 151, 151, 0.4) 20%, rgba(151, 151, 151, 0.4) 80%, rgba(151, 151, 151, 0.2) 100%);; +} +.kshf .kshfChart[hasFacets=true] > .headerGroup .summaryTitle { + font-size: 1.3em; +} +.kshf .belowAttribs { + position: relative; + height: 18px; +} +.kshf .belowAttribs .border_line { + opacity: 0.6; +} +.kshf .belowAttribs > .chartAxis_Measure > .percentSign { + right: 0px; +} +.kshf .belowAttribs > .chartAxis_Measure > .chartAxis_Measure_background { + height: 12px; +} +.kshf .belowAttribs > .chartAxis_Measure > .tick > .text { + width: 20px; + left: -10px; + top: 2px; + -webkit-transition: top 700ms ease-in-out; + -moz-transition: top 700ms ease-in-out; + -o-transition: top 700ms ease-in-out; + transition: top 700ms ease-in-out; +} +.kshf .belowAttribs > .chartAxis_Measure > .tick > .line { + width: 0px; + border-left: dotted 1px #b6b3b3; + -webkit-transition: top 700ms ease-in-out, height 700ms ease-in-out; + -moz-transition: top 700ms ease-in-out, height 700ms ease-in-out; + -o-transition: top 700ms ease-in-out, height 700ms ease-in-out; + transition: top 700ms ease-in-out, height 700ms ease-in-out; +} +.kshf .measureLabel { + color: #969da3; +} +.kshf[resultpreview="true"] .measureLabel { + color: orangered; +} +.kshf[resultpreview="true"] .kshfChart:not([hasmultivalueitem="true"]):hover .attrib:not([highlight="selected"]) .measureLabel { + color: #969da3; +} +.kshf[resultpreview="true"] .kshfChart:not([hasmultivalueitem="true"]):hover .aggr_Group:not([highlight="selected"]) .measureLabel { + color: #969da3; +} +.kshf[resultpreview="true"] .lineTrend.preview { + opacity: 1 !important; +} +.kshf[resultpreview="true"] .previewLine { + opacity: 1 !important; +} +.kshf .selectVertLine { + display: inline-block; + background-color: #EEDDDE; + width: 2px; + display: none; + position: absolute; +} +.kshf .middleColumn { + display: -webkit-box; + display: -moz-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + position: relative; +} +.kshf .recordDisplay { + position: relative; + top: 0px; + overflow: hidden; + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-transition: margin-top 700ms ease-in-out; + -moz-transition: margin-top 700ms ease-in-out; + -o-transition: margin-top 700ms ease-in-out; + transition: margin-top 700ms ease-in-out; +} +.kshf .recordDisplay > .dropZone_recordView { + display: none; + position: relative; + height: 100%; + width: 100%; + z-index: 50; + cursor: s-resize; + background-color: #efecde; + border-radius: 0px 0px 40px 40px; + border-style: solid; + border-width: 0px 0px 2px 0px; + border-color: #918e7b; + text-align: center; + margin-bottom: 5px; +} +.kshf .recordDisplay > .dropZone_recordView > .dropIcon { + margin: 10px 0px 0px 0px; + font-size: 2em; + color: #918E7B; + text-shadow: 1px 1px 1px #B8B6AB; +} +.kshf .recordDisplay > .dropZone_recordView:hover { + background-color: #ffbca3; +} +.kshf .recordDisplay > .dropZone_recordView[readyToDrop=true] { + background-color: #ffbca3; +} +.kshf .recordDisplay > .listItemGroup { + width: 100%; + overflow-y: scroll; + overflow-x: hidden; + position: relative; + background-color: white; + -webkit-transition: height 700ms ease-in-out; + -moz-transition: height 700ms ease-in-out; + -o-transition: height 700ms ease-in-out; + transition: height 700ms ease-in-out; +} +.kshf .recordDisplay > .listItemGroup > .dragWidthHandle { + z-index: 200; + height: 100%; +} +.kshf .recordDisplay > .listItemGroup > .listItem { + opacity: 1; + cursor: default; + overflow: hidden; + vertical-align: top; + padding: 1px 0px; + position: relative; + -webkit-transition: opacity 500ms ease; + -moz-transition: opacity 500ms ease; + -o-transition: opacity 500ms ease; + transition: opacity 500ms ease; +} +.kshf .recordDisplay > .listItemGroup > .listItem > .recordRank { + font-size: 0.6em; + color: gray; + font-weight: 300; + font-style: italic; + text-align: right; +} +.kshf .recordDisplay > .listItemGroup > .listItem > .content { + vertical-align: top; + border: solid 0px lightgray; + position: relative; +} +.kshf .recordDisplay > .listItemGroup > .listItem > .content > .iteminfo { + float: none; + clear: left; + font-weight: normal; + margin-bottom: 2px; +} +.kshf .recordDisplay > .listItemGroup > .listItem > .content > .iteminfo_0 { + font-size: 1.0em; + color: black; +} +.kshf .recordDisplay > .listItemGroup > .listItem > .content > .iteminfo_1 { + font-size: 0.9em; + color: #555555; +} +.kshf .recordDisplay > .listItemGroup > .listItem > .content > .iteminfo_2 { + font-size: 0.8em; + color: #555555; + font-style: italic; + font-weight: 300; +} +.kshf .recordDisplay > .listItemGroup > .listItem > .content > .iteminfo_3 { + font-size: 0.8em; + color: #a71f1f; + font-style: italic; + font-weight: 300; +} +.kshf .recordDisplay > .listItemGroup > .listItem > .recordToggleDetail { + display: none; + vertical-align: top; + width: 18px; + cursor: pointer; + font-weight: 700; +} +.kshf .recordDisplay > .listItemGroup > .listItem > .recordToggleDetail > .item_details_toggle { + -webkit-transition: -webkit-transform 500ms; + -moz-transition: -moz-transform 500ms; + -o-transition: -o-transform 500ms; + transition: -webkit-transform 500ms,-moz-transform 500ms,-o-transform 500ms,transform 500ms; + color: gray; + position: relative; +} +.kshf .recordDisplay > .listItemGroup > .listItem > .recordToggleDetail > .item_details_toggle:hover { + color: black; +} +.kshf .recordDisplay > .listItemGroup > .listItem[animst="open"] { + opacity: 0; +} +.kshf .recordDisplay > .listItemGroup > .listItem[animst="closed"] { + max-height: 0px !important; + padding: 0px !important; + opacity: 0; +} +.kshf .recordDisplay > .listItemGroup > .listItem[animst="visible"] { + display: block; +} +.kshf .recordDisplay > .listItemGroup > .listItem[details="true"] { + max-height: none; +} +.kshf .recordDisplay > .listItemGroup > .listItem[details="true"] .item_details_toggle { + display: inline-block; + -webkit-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -o-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} +.kshf .recordDisplay > .listItemGroup > .listItem[details="true"] .item_details { + display: block; +} +.kshf .recordDisplay > .listItemGroup > .listItem[details="false"] .item_details_toggle { + display: inline-block; +} +.kshf .recordDisplay > .listItemGroup > .listItem[details="false"] .item_details { + display: none; +} +.kshf .recordDisplay > .listItemGroup > .listItem[highlight^="selected"] { + box-shadow: inset 0px 0px 2px black; +} +.kshf .recordDisplay > .listItemGroup > .listItem[highlight^="selected"][selectedForLink=true] { + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMSAxIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48bGluZWFyR3JhZGllbnQgaWQ9Imxlc3NoYXQtZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjEwMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9InJnYigyNTUsMTkzLDE1NykiIHN0b3Atb3BhY2l0eT0iMSIvPjxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSJyZ2IoMjU1LDE5MywxNTcpIiBzdG9wLW9wYWNpdHk9IjAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9InJnYigyNTUsMTkzLDE1NykiIHN0b3Atb3BhY2l0eT0iMCIvPjwvbGluZWFyR3JhZGllbnQ+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNsZXNzaGF0LWdlbmVyYXRlZCkiIC8+PC9zdmc+); + background-image: -webkit-linear-gradient(right, rgba(255,193,157,1), rgba(255,193,157,0) 30px, rgba(255,193,157,0) 100%); + background-image: -moz-linear-gradient(right, rgba(255,193,157,1), rgba(255,193,157,0) 30px, rgba(255,193,157,0) 100%); + background-image: -o-linear-gradient(right, rgba(255,193,157,1), rgba(255,193,157,0) 30px, rgba(255,193,157,0) 100%); + background-image: linear-gradient(to left, rgba(255,193,157,1), rgba(255,193,157,0) 30px, rgba(255,193,157,0) 100%); +} +.kshf .recordDisplay > .listItemGroup > .listItem[highlight^="selected"][selectedForLink=true] > .itemLinkStateColumn > .itemLinkIcon { + display: inline; + color: #cc3700; +} +.kshf .recordDisplay > .listItemGroup > .listItem[highlight^="selected"][selectedForLink=true] > .itemLinkStateColumn > .itemLinkIcon:hover { + color: orangered; +} +.kshf .recordDisplay > .listItemGroup > .listItem[highlight=true] { + box-shadow: inset 0px 0px 5px #BBBBBB; + background-color: #F8F8F8; +} +.kshf .recordDisplay > .listItemGroup > .listItem[highlight=true] > .itemLinkStateColumn > .itemLinkIcon { + display: inline; + color: gray; +} +.kshf .recordDisplay > .listItemGroup > .listItem[selectedForLink=true] .itemLinkStateColumn > .itemSelectCheckbox:before { + content: "\f046"; +} +.kshf .recordDisplay > .listItemGroup > .listItem[selectedForLink=false] .itemLinkStateColumn > .itemSelectCheckbox:before { + content: "\f096"; +} +.kshf .recordDisplay > .showMore { + display: block; + cursor: pointer; + border: solid 1px lightgray; + border-radius: 9px; + box-shadow: 2px 2px 2px #D8D8D8; + font-weight: 300; + font-size: 0.8em; + background-color: #eee; + height: 20px; + width: calc(100% - 23px); + text-align: center; + position: absolute; + left: 4px; + -webkit-transition: bottom 700ms ease 50ms; + -moz-transition: bottom 700ms ease 50ms; + -o-transition: bottom 700ms ease 50ms; + transition: bottom 700ms ease 50ms; +} +.kshf .recordDisplay > .showMore lesshat-selector { + -lh-property: 0; } +@-webkit-keyframes fade{ 0%{opacity:1;} 50%{opacity:0;} 100% {opacity:1;}} +@-moz-keyframes fade{ 0%{opacity:1;} 50%{opacity:0;} 100% {opacity:1;}} +@-o-keyframes fade{ 0%{opacity:1;} 50%{opacity:0;} 100% {opacity:1;}} +@keyframes fade{ 0%{opacity:1;} 50%{opacity:0;} 100% {opacity:1;}; +} +.kshf .recordDisplay > .showMore > .MoreText { + display: inline-block; + vertical-align: top; + top: 2px; + position: relative; +} +.kshf .recordDisplay > .showMore > .Count { + font-size: 0.9em; + top: 3px; + position: relative; + color: gray; +} +.kshf .recordDisplay > .showMore > .Count.CountAbove { + float: left; + margin-left: 3px; +} +.kshf .recordDisplay > .showMore > .Count.CountBelow { + float: right; + margin-right: 3px; +} +.kshf .recordDisplay > .showMore:hover { + box-shadow: 2px 2px 2px gray; +} +.kshf .recordDisplay > .showMore:hover span.MoreText { + text-decoration: underline; +} +.kshf .recordDisplay > .showMore[showMoreVisible=true] { + opacity: 1; + bottom: 4px; +} +.kshf .recordDisplay > .showMore[showMoreVisible=false] { + bottom: -27px; + opacity: 0; +} +.kshf .recordDisplay[showRank=true] .recordRank { + display: inline-block; +} +.kshf .recordDisplay[showRank=true] .itemRank_control { + color: black; +} +.kshf .recordDisplay[showRank=false] .recordRank { + display: none; +} +.kshf .recordDisplay[showRank=false] .itemRank_control { + color: gray; +} +.kshf .recordDisplay[displaytype="grid"][hasrecordview="true"] > .listItemGroup { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + justify-content: space-around; + -webkit-justify-content: space-around; +} +.kshf .recordDisplay[displaytype="grid"][hasrecordview="true"] > .listItemGroup > .listItem { + display: block; + -webkit-align-self: flex-start; + -ms-flex-item-align: start; + align-self: flex-start; +} +.kshf .recordDisplay[displaytype="grid"][hasrecordview="true"] > .listItemGroup > .listItem > .recordRank { + vertical-align: top; + margin-right: 2px; +} +.kshf .recordDisplay[displaytype="grid"][hasrecordview="true"] > .listItemGroup > .listItem > .content { + display: block; +} +.kshf .recordDisplay[displaytype="grid"][hasrecordview="true"] > .listItemGroup > .listItem > .recordToggleDetail { + display: block; + position: absolute; + z-index: 10; +} +.kshf .recordDisplay[displaytype="list"][hasrecordview="true"] > .listItemGroup > .listItem { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + width: 100%; +} +.kshf .recordDisplay[displaytype="list"][hasrecordview="true"] > .listItemGroup > .listItem > .recordSortCol { + padding-right: 3px; + padding-top: 2px; + font-weight: 300; + text-align: right; + font-size: 0.8em; + cursor: default; + vertical-align: top; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.kshf .recordDisplay[displaytype="list"][hasrecordview="true"] > .listItemGroup > .listItem > .recordRank { + float: left; + margin-top: 4px; + width: 15px; + padding-right: 2px; +} +.kshf .recordDisplay[displaytype="list"][hasrecordview="true"] > .listItemGroup > .listItem > .recordToggleDetail { + width: 18px; + text-align: center; +} +.kshf .recordDisplay[displaytype="list"][hasrecordview="true"] > .listItemGroup > .listItem > .content { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; +} +.kshf .recordDisplay[displaytype="list"][hasrecordview="true"][detailsToggle="zoom"] > .listItemGroup > .listItem > .recordToggleDetail { + display: inline-block; +} +.kshf .recordDisplay[displaytype="list"][hasrecordview="true"][detailsToggle="one"] > .listItemGroup > .listItem > .recordToggleDetail { + display: inline-block; +} +.kshf .recordDisplay[displaytype="list"][hasrecordview="true"][detailsToggle="one"] > .listItemGroup > .listItem > .recordToggleDetail > .item_details_toggle:before { + content: "\f078"; +} +.kshf .recordDisplay[detailsToggle="zoom"] > .listItemGroup > .listItem > .recordToggleDetail > .item_details_toggle:before { + content: "\f140"; +} +.kshf .recordDisplay[hasRecordView="false"] > .recordDisplay--Header { + display: none; +} +.kshf .recordDisplay[hasRecordView="false"] > .dropZone_recordView { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + position: absolute; +} +.kshf .recordDisplay[hasRecordView="false"] > .listItemGroup { + display: none; +} +.kshf .recordDisplay[hasRecordView="true"] { + box-shadow: 0px 0px 2px #89713c; + margin: 0px 2px 2px 2px; +} +.kshf .recordDisplay[hasRecordView="true"] > .recordDisplay--Header { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; +} +.kshf .recordDisplay[hasRecordView="true"] > .dropZone_recordView { + position: absolute; +} +.kshf .recordDisplay:hover > .recordDisplay--Header > .sortColumn { + opacity: 1; + pointer-events: all; +} +.kshf .scrollToTop { + display: inline-block; + visibility: hidden; + color: red; + cursor: pointer; + color: #aaaaaa; + -webkit-transition: color 300ms ease-in-out; + -moz-transition: color 300ms ease-in-out; + -o-transition: color 300ms ease-in-out; + transition: color 300ms ease-in-out; +} +.kshf .scrollToTop:hover { + color: #cb5454; +} +.kshf .recordDisplay--Header { + font-size: 0.9em; + position: relative; + background-color: #EBE5DF; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + min-height: 18px; +} +.kshf .recordDisplay--Header > .itemRank_control { + display: none; + width: 13px; + text-align: right; + font-weight: 100; + font-size: 0.9em; + cursor: pointer; +} +.kshf .recordDisplay--Header > .itemRank_control:before { + content: "\f102"; +} +.kshf .recordDisplay--Header > .itemRank_control:hover { + color: orangered; +} +.kshf .recordDisplay--Header > .removeSortOption_wrapper { + display: none; +} +.kshf .recordDisplay--Header .removeSortOption { + cursor: pointer; + width: 14px; + height: 14px; + display: inline-block; + color: gray; +} +.kshf .recordDisplay--Header .removeSortOption:before { + content: "\f00d"; +} +.kshf .recordDisplay--Header .removeSortOption:hover { + color: black; +} +.kshf .recordDisplay--Header > .header_listSortColumn { + display: inline-block; + -webkit-align-self: flex-end; + -ms-flex-item-align: end; + align-self: flex-end; + white-space: nowrap; + text-align: right; + padding-right: 1px; + position: relative; +} +.kshf .recordDisplay--Header > .header_listSortColumn > .sortColumnName { + font-weight: 300; + font-size: 0.9em; + margin: 0px 0px 1px 3px; + display: inline-block; + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; +} +.kshf .recordDisplay--Header > .header_listSortColumn > .listSortOptionSelect { + width: 100%; + bottom: 0px; +} +.kshf .recordDisplay--Header > .header_listSortColumn > .dropZone_resultSort { + display: none; + cursor: s-resize; + position: absolute; + height: 100%; + width: 100%; + z-index: 50; + background-color: #eaeaea; + border-radius: 5px; + border-style: solid; + border-width: 2px; + border-color: gray; + text-align: center; +} +.kshf .recordDisplay--Header > .header_listSortColumn > .dropZone_resultSort > .dropZone_resultSort_text { + pointer-events: none; + font-size: 0.8em; + display: block; + font-weight: 300; +} +.kshf .recordDisplay--Header > .header_listSortColumn > .dropZone_resultSort > .dropZone_resultSort_text:before { + content: "Sort by"; +} +.kshf .recordDisplay--Header > .header_listSortColumn > .dropZone_resultSort:hover { + background-color: #ffbca3; +} +.kshf .recordDisplay--Header > .sortColumn { + opacity: 0; + -webkit-align-self: flex-end; + -ms-flex-item-align: end; + align-self: flex-end; + width: 17px; + font-size: 0.8em; + margin-bottom: 2px; + vertical-align: bottom; + -webkit-transition: opacity 250ms linear; + -moz-transition: opacity 250ms linear; + -o-transition: opacity 250ms linear; + transition: opacity 250ms linear; +} +.kshf .recordDisplay--Header > .buttonRecordViewRemove { + display: inline-block; + visibility: hidden; +} +.kshf .recordDisplay--Header > .buttonRecordViewRemove:hover { + cursor: pointer; + color: orangered; +} +.kshf .recordDisplay--Header > .scrollToTop { + padding-top: 2px; +} +.kshf .recordDisplay--Header > .recordTextSearch { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + -webkit-align-self: flex-end; + -ms-flex-item-align: end; + align-self: flex-end; + white-space: nowrap; + display: inline-block; + vertical-align: bottom; + position: relative; + height: 18px; + margin-left: 4px; +} +.kshf .recordDisplay--Header > .recordTextSearch > .dropZone_textSearch { + display: none; + position: absolute; + height: 100%; + width: 100%; + z-index: 50; + background-color: #eaeaea; + border-radius: 5px; + border-style: solid; + border-width: 2px; + border-color: gray; + text-align: center; +} +.kshf .recordDisplay--Header > .recordTextSearch > .dropZone_textSearch > .dropZone_textSearch_text { + pointer-events: none; + font-size: 0.7em; + display: block; + font-weight: 300; +} +.kshf .recordDisplay--Header > .recordTextSearch > .dropZone_textSearch:hover { + background-color: #ffbca3; +} +.kshf .recordDisplay--Header > .recordTextSearch > .mainTextSearch_input { + display: none; + font-size: 0.8em; + font-weight: 700; + color: #cb5454; + padding: 0px 2px; + background-color: rgba(255, 255, 255, 0); + pointer-events: all; + border-width: 0px; + border-style: solid; + border-color: #cb5454; + margin: 1px; + width: calc(100% - 17px); +} +.kshf .recordDisplay--Header > .recordTextSearch > .mainTextSearch_input:focus { + outline-color: #cb5454; + outline-width: 2px; +} +.kshf .recordDisplay--Header > .recordTextSearch > .mainTextSearch_input:hover { + border-width: 1px; + background-color: white; + margin: 0px; +} +.kshf .recordDisplay--Header > .recordTextSearch > .mainTextSearch_input::-webkit-input-placeholder { + color: #cb5454; + font-weight: 300; +} +.kshf .recordDisplay--Header > .recordTextSearch > .mainTextSearch_input:focus::-webkit-input-placeholder { + color: #F3CDCD; +} +.kshf .recordDisplay--Header > .recordTextSearch > .searchIcon { + display: none; + padding-left: 1px; + color: #cb5454; +} +.kshf .recordDisplay--Header > .recordTextSearch > .clearText { + display: none; + position: absolute; + right: 4px; + top: 1px; + cursor: pointer; + color: gray; +} +.kshf .recordDisplay--Header > .recordTextSearch > .clearText:hover { + color: #cb5454; +} +.kshf .recordDisplay--Header > .recordTextSearch[isActive="true"] > .mainTextSearch_input { + display: inline-block; +} +.kshf .recordDisplay--Header > .recordTextSearch[isActive="true"] > .searchIcon { + display: inline-block; +} +.kshf .boxinbox { + margin-top: 10px; +} +.kshf .boxinbox:hover { + background-color: #EFEFEF; +} +.kshf .boxinbox ul { + margin: 5px 0px 5px 0px; +} +.kshf .boxinbox.features { + width: 500px; + text-align: left; + border: solid 0px lightgray; + box-shadow: 0px 0px 0px gray; +} +.kshf .boxinbox.features .credits_features { + margin-top: 4px; + padding-left: 20px; +} +.kshf .boxinbox.project_credits { + font-size: 0.9em; + font-style: italic; +} +.kshf .boxinbox.project_credits a.myName { + display: inline-block; + margin: 17px 10px; + vertical-align: top; + color: black; + font-weight: 700; + font-style: normal; + text-decoration: none; +} +.kshf .boxinbox.project_3rdparty img { + position: relative; +} +@-webkit-keyframes stretchdelay { + 0%, + 40%, + 100% { + -webkit-transform: scaleY(0.4); + -moz-transform: scaleY(0.4); + -o-transform: scaleY(0.4); + -ms-transform: scaleY(0.4); + transform: scaleY(0.4); + } + 20% { + -webkit-transform: scaleY(0.8); + -moz-transform: scaleY(0.8); + -o-transform: scaleY(0.8); + -ms-transform: scaleY(0.8); + transform: scaleY(0.8); + background-color: #fa7746; + } +} +@-moz-keyframes stretchdelay { + 0%, + 40%, + 100% { + -webkit-transform: scaleY(0.4); + -moz-transform: scaleY(0.4); + -o-transform: scaleY(0.4); + -ms-transform: scaleY(0.4); + transform: scaleY(0.4); + } + 20% { + -webkit-transform: scaleY(0.8); + -moz-transform: scaleY(0.8); + -o-transform: scaleY(0.8); + -ms-transform: scaleY(0.8); + transform: scaleY(0.8); + background-color: #fa7746; + } +} +@-ms-keyframes stretchdelay { + 0%, + 40%, + 100% { + -webkit-transform: scaleY(0.4); + -moz-transform: scaleY(0.4); + -o-transform: scaleY(0.4); + -ms-transform: scaleY(0.4); + transform: scaleY(0.4); + } + 20% { + -webkit-transform: scaleY(0.8); + -moz-transform: scaleY(0.8); + -o-transform: scaleY(0.8); + -ms-transform: scaleY(0.8); + transform: scaleY(0.8); + background-color: #fa7746; + } +} +@-o-keyframes stretchdelay { + 0%, + 40%, + 100% { + -webkit-transform: scaleY(0.4); + -moz-transform: scaleY(0.4); + -o-transform: scaleY(0.4); + -ms-transform: scaleY(0.4); + transform: scaleY(0.4); + } + 20% { + -webkit-transform: scaleY(0.8); + -moz-transform: scaleY(0.8); + -o-transform: scaleY(0.8); + -ms-transform: scaleY(0.8); + transform: scaleY(0.8); + background-color: #fa7746; + } +} +@keyframes stretchdelay { + 0%, + 40%, + 100% { + -webkit-transform: scaleY(0.4); + -moz-transform: scaleY(0.4); + -o-transform: scaleY(0.4); + -ms-transform: scaleY(0.4); + transform: scaleY(0.4); + } + 20% { + -webkit-transform: scaleY(0.8); + -moz-transform: scaleY(0.8); + -o-transform: scaleY(0.8); + -ms-transform: scaleY(0.8); + transform: scaleY(0.8); + background-color: #fa7746; + } +} +.tipsy { + font-size: 10px; + position: absolute; + padding: 5px; + z-index: 100000; + pointer-events: none; +} +.tipsy .tipsy-inner { + font-family: Helvetica, Arial, sans-serif; + padding: 3px; + font-size: 1.2em; + background-color: #000; + color: #FFF; + max-width: 200px; + text-align: center; + font-weight: 300px; + border-radius: 3px; +} +.tipsy .tipsy-inner span.big { + font-size: 1.4em; +} +.tipsy .tipsy-inner span.action { + font-weight: 700; +} +.tipsy.tipsyFilterAnd .tipsy-inner { + background-color: #1d4870; +} +.tipsy.tipsyFilterAnd .tipsy-arrow { + border-color: #1d4870; +} +.tipsy.tipsyFilterOr .tipsy-inner { + background-color: #1c737a; +} +.tipsy.tipsyFilterOr .tipsy-arrow { + border-color: #1c737a; +} +.tipsy.tipsyFilterNot .tipsy-inner { + background-color: #808080; +} +.tipsy.tipsyFilterNot .tipsy-arrow { + border-color: #808080; +} +.tipsy.tipsyFilterLock .tipsy-inner { + background-color: #2f4f4f; +} +.tipsy.tipsyFilterLock .tipsy-arrow { + border-color: #2f4f4f; +} +/* Uncomment for shadow */ +/*.tipsy-inner { box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000; -moz-box-shadow: 0 0 5px #000000; }*/ +.tipsy-arrow { + position: absolute; + width: 0; + height: 0; + line-height: 0; + border: 5px dashed #000; +} +.tipsy-n .tipsy-arrow { + top: 0px; + left: 50%; + margin-left: -5px; + border-bottom-style: solid; + border-top: none; + border-left-color: transparent !important; + border-right-color: transparent !important; +} +.tipsy-nw .tipsy-arrow { + top: 0; + left: 10px; + border-bottom-style: solid; + border-top: none; + border-left-color: transparent !important; + border-right-color: transparent !important; +} +.tipsy-ne .tipsy-arrow { + top: 0; + right: 10px; + border-bottom-style: solid; + border-top: none; + border-left-color: transparent !important; + border-right-color: transparent !important; +} +.tipsy-s .tipsy-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-top-style: solid; + border-bottom: none; + border-left-color: transparent !important; + border-right-color: transparent !important; +} +.tipsy-sw .tipsy-arrow { + bottom: 0; + left: 10px; + border-top-style: solid; + border-bottom: none; + border-left-color: transparent !important; + border-right-color: transparent !important; +} +.tipsy-se .tipsy-arrow { + bottom: 0; + right: 10px; + border-top-style: solid; + border-bottom: none; + border-left-color: transparent !important; + border-right-color: transparent !important; +} +.tipsy-e .tipsy-arrow { + right: 0; + top: 50%; + margin-top: -5px; + border-left-style: solid; + border-right: none; + border-top-color: transparent !important; + border-bottom-color: transparent !important; +} +.tipsy-w .tipsy-arrow { + left: 0; + top: 50%; + margin-top: -5px; + border-right-style: solid; + border-left: none; + border-top-color: transparent !important; + border-bottom-color: transparent !important; +} +@-webkit-keyframes shrink { + from { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -o-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + to { + -webkit-transform: scale(0.5); + -moz-transform: scale(0.5); + -o-transform: scale(0.5); + -ms-transform: scale(0.5); + transform: scale(0.5); + } +} +@-moz-keyframes shrink { + from { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -o-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + to { + -webkit-transform: scale(0.5); + -moz-transform: scale(0.5); + -o-transform: scale(0.5); + -ms-transform: scale(0.5); + transform: scale(0.5); + } +} +@-ms-keyframes shrink { + from { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -o-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + to { + -webkit-transform: scale(0.5); + -moz-transform: scale(0.5); + -o-transform: scale(0.5); + -ms-transform: scale(0.5); + transform: scale(0.5); + } +} +@-o-keyframes shrink { + from { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -o-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + to { + -webkit-transform: scale(0.5); + -moz-transform: scale(0.5); + -o-transform: scale(0.5); + -ms-transform: scale(0.5); + transform: scale(0.5); + } +} +@keyframes shrink { + from { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -o-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + to { + -webkit-transform: scale(0.5); + -moz-transform: scale(0.5); + -o-transform: scale(0.5); + -ms-transform: scale(0.5); + transform: scale(0.5); + } +} diff --git a/osrframework/static/css/kickstart-buttons.css b/osrframework/static/css/kickstart-buttons.css new file mode 100755 index 0000000..85986ae --- /dev/null +++ b/osrframework/static/css/kickstart-buttons.css @@ -0,0 +1,369 @@ +/* + 99Lime.com HTML KickStart by Joshua Gatcke + kickstart-buttons.css + + Super Easy Cross Browser CSS3 Gradients + http://www.colorzilla.com/gradient-editor/ +*/ + +/*--------------------------------- + BUTTONS +-----------------------------------*/ +button, +a.btn, +a.btn:visited, +a.button, +a.button:visited, +input[type="submit"], +input[type="reset"], +input[type="button"]{ +position:relative; +top:0; +left:0; +vertical-align: middle; +margin:0; +padding:10px 15px; +line-height:100%; +-moz-border-radius:5px; +-webkit-border-radius:5px; +border-radius:5px; +cursor: pointer; +width:auto; +overflow:visible; +font-weight:normal; +font-size:14px; /*Pixels for consistancy*/ +text-shadow:0 1px 0 #fff; +color:#666; +text-decoration:none; +vertical-align: middle; +-webkit-box-sizing: border-box; +-moz-box-sizing: border-box; +box-sizing: border-box; +display:inline-block; +*display:inline;/*IE ONLY*/ +zoom:1; +border:1px solid #ccc; +background: rgb(252,252,252); /* Old browsers */ +background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(224,224,224,1) 100%); /* FF3.6+ */ +background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(224,224,224,1))); /* Chrome,Safari4+ */ +background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* Chrome10+,Safari5.1+ */ +background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* Opera11.10+ */ +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#e0e0e0',GradientType=0 ); /* IE6-9 */ +background: linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* W3C */ +} + +button:active, +a.btn:active, +a.btn:visited:active, +a.button:active, +a.button:visited:active, +input[type="submit"]:active, +input[type="reset"]:active, +input[type="button"]:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.2),inset 0 -10px 20px rgba(0,0,0,0.07);-moz-box-shadow:inset 0 3px 5px rgba(0,0,0,0.2),inset 0 -10px 20px rgba(0,0,0,0.07);box-shadow:inset 0 3px 5px rgba(0,0,0,0.2),inset 0 -10px 20px rgba(0,0,0,0.07);} +button[disabled],.disabled:active{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} + +button, +input[type="submit"], +input[type="reset"], +input[type="button"]{*padding:7px 15px;}/*IE 7 ONLY*/ + + a.btn,a.button{}/*overrides*/ + button.small, a.btn.small, a.button.small{font-size:0.8em;padding:5px 10px;} + button.medium, a.btn.medium, a.button.medium{}/*default*/ + button.large, a.btn.large, a.button.large{font-size:1.3em;padding:10px 20px;} + button.disabled, a.btn.disabled, a.button.disabled{color:#ccc;cursor:default;background:#efefef;} + button.disabled:hover, a.btn.disabled:hover, a.button.disabled:hover{border:1px solid #ccc;background:#efefef;} + + button:hover, + a.btn:hover, + a.button:hover, + input[type="submit"]:hover, + input[type="reset"]:hover, + input[type="button"]:hover{ + border:1px solid #bbb; + background: rgb(252,252,252); /* Old browsers */ + background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(237,237,237,1) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(237,237,237,1))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Opera11.10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* W3C */ + } + + +/*--------------------------------- + BUTTON BAR +-----------------------------------*/ +ul.button-bar{ +display:inline-block; +*display:inline; +margin:0; +padding:0; +font-size:0; +position:relative; +top:0; +left:0; +zoom:1; +border:0; +background:0; +} + + ul.button-bar li{ + display:inline-block; + *display:inline; + position:relative; + top:0; + left:0; + zoom:1; + margin:0 -1px 0 0; + padding:0; + line-height:100%; + font-size:0px; + border:1px solid #ccc; + background: rgb(252,252,252); /* Old browsers */ + background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(224,224,224,1) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(224,224,224,1))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* Opera11.10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#e0e0e0',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* W3C */ + } + + ul.button-bar li a{ + margin:0; + display:inline-block; + *display:inline; + padding:7px 10px; + position:relative; + top:0; + left:0; + zoom:1; + font-weight:normal; + font-size:14px; /*Pixels for consistancy*/ + text-shadow:0 1px 0 #fff; + color:#666; + text-decoration:none; + vertical-align: middle; + line-height:100%; + border-left:1px solid #fff; + } + + ul.button-bar li.first, + ul.button-bar li.first a{ + -moz-border-radius-bottomleft: 5px; + -moz-border-radius-topleft: 5px; + -webkit-border-bottom-left-radius: 5px; + -webkit-border-top-left-radius: 5px; + border-top-left-radius: 5px; + border-bottom-left-radius: 5px; + -moz-background-clip:content-box; + -webkit-background-clip: border; + background-clip: content-box; + } + + ul.button-bar li.last, + ul.button-bar li.last a{ + -moz-border-radius-bottomright: 5px; + -moz-border-radius-topright: 5px; + -webkit-border-bottom-right-radius: 5px; + -webkit-border-top-right-radius: 5px; + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; + -moz-background-clip:content-box; + -webkit-background-clip: border; + } + + ul.button-bar li a:hover{ + background: rgb(252,252,252); /* Old browsers */ + background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(237,237,237,1) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(237,237,237,1))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Opera11.10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* W3C */ + } + + ul.button-bar li a:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.2),inset 0 -10px 20px rgba(0,0,0,0.07);-moz-box-shadow:inset 0 3px 5px rgba(0,0,0,0.2),inset 0 -10px 20px rgba(0,0,0,0.07);box-shadow:inset 0 3px 5px rgba(0,0,0,0.2),inset 0 -10px 20px rgba(0,0,0,0.07);border-left:1px solid #ccc;} + +/*--------------------------------- + STYLES +-----------------------------------*/ +.pill{-webkit-border-radius:200em;-moz-border-radius:200em;border-radius:200em;} +.pop{-webkit-box-shadow:0px 1px 5px rgba(0,0,0,0.2);-moz-box-shadow:0px 1px 5px rgba(0,0,0,0.2);box-shadow:0px 1px 5px rgba(0,0,0,0.2);} +.inset{-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.3);-moz-box-shadow:inset 0 1px 3px rgba(0,0,0,0.3);box-shadow:inset 0 1px 3px rgba(0,0,0,0.3);} +.square{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;} + +/*--------------------------------- + ORANGE +-----------------------------------*/ +button.orange, +a.btn.orange, +a.button.orange, +input[type=submit].orange, +input[type=reset].orange, +input[type=button].orange{ +text-shadow:0 -1px 0 #FC730A; +color:#fff; +border:1px solid #FC730A; +background: rgb(255,168,76); /* Old browsers */ +background: -moz-linear-gradient(top, rgba(255,168,76,1) 0%, rgba(255,123,13,1) 100%); /* FF3.6+ */ +background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,168,76,1)), color-stop(100%,rgba(255,123,13,1))); /* Chrome,Safari4+ */ +background: -webkit-linear-gradient(top, rgba(255,168,76,1) 0%,rgba(255,123,13,1) 100%); /* Chrome10+,Safari5.1+ */ +background: -o-linear-gradient(top, rgba(255,168,76,1) 0%,rgba(255,123,13,1) 100%); /* Opera 11.10+ */ +background: linear-gradient(top, rgba(255,168,76,1) 0%,rgba(255,123,13,1) 100%); /* W3C */ +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffa84c', endColorstr='#ff7b0d',GradientType=0 ); /* IE6-9 */ +} + + button.orange:hover, + a.btn.orange:hover, + a.button.orange:hover{ + text-shadow:0 1px 0 #FC730A; + border:1px solid #FC730A; + background: rgb(249,191,74); /* Old browsers */ + background: -moz-linear-gradient(top, rgba(249,191,74,1) 0%, rgba(249,181,9,1) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(249,191,74,1)), color-stop(100%,rgba(249,181,9,1))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(249,191,74,1) 0%,rgba(249,181,9,1) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(249,191,74,1) 0%,rgba(249,181,9,1) 100%); /* Opera 11.10+ */ + background: linear-gradient(top, rgba(249,191,74,1) 0%,rgba(249,181,9,1) 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f9bf4a', endColorstr='#f9b509',GradientType=0 ); /* IE6-9 */ + } + +/*--------------------------------- + BLUE +-----------------------------------*/ +button.blue, +a.btn.blue, +a.button.blue, +input[type=submit].blue, +input[type=reset].blue, +input[type=button].blue{ +text-shadow:0 -1px 0 #1D6DC1; +color:#fff; +border:1px solid #1D6DC1; +background: rgb(122,188,255); /* Old browsers */ +background: -moz-linear-gradient(top, rgba(122,188,255,1) 0%, rgba(96,171,248,1) 44%, rgba(64,150,238,1) 100%); /* FF3.6+ */ +background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(122,188,255,1)), color-stop(44%,rgba(96,171,248,1)), color-stop(100%,rgba(64,150,238,1))); /* Chrome,Safari4+ */ +background: -webkit-linear-gradient(top, rgba(122,188,255,1) 0%,rgba(96,171,248,1) 44%,rgba(64,150,238,1) 100%); /* Chrome10+,Safari5.1+ */ +background: -o-linear-gradient(top, rgba(122,188,255,1) 0%,rgba(96,171,248,1) 44%,rgba(64,150,238,1) 100%); /* Opera11.10+ */ +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7abcff', endColorstr='#4096ee',GradientType=0 ); /* IE6-9 */ +background: linear-gradient(top, rgba(122,188,255,1) 0%,rgba(96,171,248,1) 44%,rgba(64,150,238,1) 100%); /* W3C */ +} + + button.blue:hover, + a.btn.blue:hover, + a.button.blue:hover{ + text-shadow:0 1px 0 #1D6DC1; + border:1px solid #1D6DC1; + background: rgb(155,205,255); /* Old browsers */ + background: -moz-linear-gradient(top, rgba(155,205,255,1) 0%, rgba(134,192,250,1) 44%, rgba(110,176,242,1) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(155,205,255,1)), color-stop(44%,rgba(134,192,250,1)), color-stop(100%,rgba(110,176,242,1))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(155,205,255,1) 0%,rgba(134,192,250,1) 44%,rgba(110,176,242,1) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(155,205,255,1) 0%,rgba(134,192,250,1) 44%,rgba(110,176,242,1) 100%); /* Opera 11.10+ */ + background: linear-gradient(top, rgba(155,205,255,1) 0%,rgba(134,192,250,1) 44%,rgba(110,176,242,1) 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9bcdff', endColorstr='#6eb0f2',GradientType=0 ); /* IE6-9 */ + } + +/*--------------------------------- + PINK +-----------------------------------*/ +button.pink, +a.btn.pink, +a.button.pink, +input[type=submit].pink, +input[type=reset].pink, +input[type=button].pink{ +text-shadow:0 -1px 0 #EF0251; +color:#fff; +border:1px solid #EF0251; +background: rgb(255,93,177); /* Old browsers */ +background: -moz-linear-gradient(top, rgba(255,93,177,1) 0%, rgba(239,1,124,1) 100%); /* FF3.6+ */ +background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,93,177,1)), color-stop(100%,rgba(239,1,124,1))); /* Chrome,Safari4+ */ +background: -webkit-linear-gradient(top, rgba(255,93,177,1) 0%,rgba(239,1,124,1) 100%); /* Chrome10+,Safari5.1+ */ +background: -o-linear-gradient(top, rgba(255,93,177,1) 0%,rgba(239,1,124,1) 100%); /* Opera 11.10+ */ +background: linear-gradient(top, rgba(255,93,177,1) 0%,rgba(239,1,124,1) 100%); /* W3C */ +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff5db1', endColorstr='#ef017c',GradientType=0 ); /* IE6-9 */ +} + + button.pink:hover, + a.btn.pink:hover, + a.button.pink:hover{ + text-shadow:0 1px 0 #EF0251; + border:1px solid #EF0251; + background: rgb(255,169,213); /* Old browsers */ + background: -moz-linear-gradient(top, rgba(255,169,213,1) 0%, rgba(254,112,185,1) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,169,213,1)), color-stop(100%,rgba(254,112,185,1))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(255,169,213,1) 0%,rgba(254,112,185,1) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(255,169,213,1) 0%,rgba(254,112,185,1) 100%); /* Opera 11.10+ */ + background: linear-gradient(top, rgba(255,169,213,1) 0%,rgba(254,112,185,1) 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffa9d5', endColorstr='#fe70b9',GradientType=0 ); /* IE6-9 */ + } + +/*--------------------------------- + GREEN +-----------------------------------*/ +button.green, +a.btn.green, +a.button.green, +input[type=submit].green, +input[type=reset].green, +input[type=button].green{ +text-shadow:0 -1px 0 #669E00; +color:#fff; +border:1px solid #669E00; +background: rgb(143,196,0); /* Old browsers */ +background: -moz-linear-gradient(top, rgba(143,196,0,1) 0%, rgba(107,165,0,1) 100%); /* FF3.6+ */ +background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(143,196,0,1)), color-stop(100%,rgba(107,165,0,1))); /* Chrome,Safari4+ */ +background: -webkit-linear-gradient(top, rgba(143,196,0,1) 0%,rgba(107,165,0,1) 100%); /* Chrome10+,Safari5.1+ */ +background: -o-linear-gradient(top, rgba(143,196,0,1) 0%,rgba(107,165,0,1) 100%); /* Opera 11.10+ */ +background: linear-gradient(top, rgba(143,196,0,1) 0%,rgba(107,165,0,1) 100%); /* W3C */ +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#8fc400', endColorstr='#6ba500',GradientType=0 ); /* IE6-9 */ +} + + button.green:hover, + a.btn.green:hover, + a.button.green:hover{ + text-shadow:0 1px 0 #669E00; + border:1px solid #669E00; + background: rgb(198,226,120); /* Old browsers */ + background: -moz-linear-gradient(top, rgba(198,226,120,1) 0%, rgba(167,211,44,1) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(198,226,120,1)), color-stop(100%,rgba(167,211,44,1))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(198,226,120,1) 0%,rgba(167,211,44,1) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(198,226,120,1) 0%,rgba(167,211,44,1) 100%); /* Opera 11.10+ */ + background: linear-gradient(top, rgba(198,226,120,1) 0%,rgba(167,211,44,1) 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#c6e278', endColorstr='#a7d32c',GradientType=0 ); /* IE6-9 */ + } + +/*--------------------------------- + RED +-----------------------------------*/ +button.red, +a.btn.red, +a.button.red, +input[type=submit].red, +input[type=reset].red, +input[type=button].red{ +text-shadow:0 -1px 0 #B21203; +color:#fff; +border:1px solid #B21203; +background: rgb(229,60,22); /* Old browsers */ +background: -moz-linear-gradient(top, rgba(229,60,22,1) 0%, rgba(207,4,4,1) 100%); /* FF3.6+ */ +background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(229,60,22,1)), color-stop(100%,rgba(207,4,4,1))); /* Chrome,Safari4+ */ +background: -webkit-linear-gradient(top, rgba(229,60,22,1) 0%,rgba(207,4,4,1) 100%); /* Chrome10+,Safari5.1+ */ +background: -o-linear-gradient(top, rgba(229,60,22,1) 0%,rgba(207,4,4,1) 100%); /* Opera 11.10+ */ +background: linear-gradient(top, rgba(229,60,22,1) 0%,rgba(207,4,4,1) 100%); /* W3C */ +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e53c16', endColorstr='#cf0404',GradientType=0 ); /* IE6-9 */ +} + + button.red:hover, + a.btn.red:hover, + a.button.red:hover{ + text-shadow:0 1px 0 #B21203; + border:1px solid #B21203; + background: rgb(238,106,76); /* Old browsers */ + background: -moz-linear-gradient(top, rgba(238,106,76,1) 0%, rgba(251,33,33,1) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(238,106,76,1)), color-stop(100%,rgba(251,33,33,1))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(238,106,76,1) 0%,rgba(251,33,33,1) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(238,106,76,1) 0%,rgba(251,33,33,1) 100%); /* Opera 11.10+ */ + background: linear-gradient(top, rgba(238,106,76,1) 0%,rgba(251,33,33,1) 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ee6a4c', endColorstr='#fb2121',GradientType=0 ); /* IE6-9 */ + } diff --git a/osrframework/static/css/kickstart-forms.css b/osrframework/static/css/kickstart-forms.css new file mode 100755 index 0000000..fb5d84c --- /dev/null +++ b/osrframework/static/css/kickstart-forms.css @@ -0,0 +1,290 @@ +/*--------------------------------- + FORMS +-----------------------------------*/ +form{ +padding:0; +margin:0; +} + +fieldset{ +margin:30px 0 20px 0; +padding:5px 15px 15px 15px; +border:1px solid #ccc; +background:#f5f5f5; +-moz-border-radius:5px; +-webkit-border-radius:5px; +border-radius:5px; +position: relative; +top:0; +left:0; +} + + legend{ + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + border:1px solid #ccc; + background:#f5f5f5; + padding:2px 10px; + margin:0 0 0 0; + display:block; + position: relative; + top:0; + left:0; + } + + /*IE ONLY - I know, this is a stop gap*/ + .msie fieldset{padding-top:25px;} + .msie legend{position:absolute;top:-0.7em;left:10px;} + +label{ +display:inline-block; +*display:inline; +vertical-align: middle; +margin:0; +padding:0; +position:relative; +top:0; +left:0; +zoom:1; +-moz-box-sizing: border-box; +-webkit-box-sizing: border-box; +box-sizing: border-box; +} + + label.inline{ + display:inline; + margin:0; + } + + label span{ + color:#999; + font-size:0.9em; + } + + label span.right{ + position:absolute; + bottom:0; + right:0; + text-align:right; + display:inline-block; + *display:inline; + } + + label.disabled{ + color:#ccc; + } + +input{ +display:inline-block; +*display:inline; +vertical-align: middle; +width:auto; +zoom:1; +margin:0; +border:1px solid #ccc; +font-size:1em; +padding:5px 0; +text-indent: 5px; +-moz-border-radius:5px; +-webkit-border-radius:5px; +border-radius:5px; +background:#fff; +-moz-box-shadow:inset 0 0 6px #ccc; +-webkit-box-shadow:inset 0 1px 6px #ccc; +box-shadow:inset 0 1px 6px #ccc; +-moz-box-sizing: border-box; +-webkit-box-sizing: border-box; +box-sizing: border-box; +} + + input::-webkit-input-placeholder, + input:-moz-placeholder, + .placeholder{ + color:#bbb; + } + + input::-moz-focus-inner {border:0;} + + input[disabled="disabled"], input.disabled{ + color:#999; + background:#f5f5f5; + -moz-box-shadow:inset 0 0 2px #ddd; + -webkit-box-shadow:inset 0 1px 2px #ddd; + box-shadow:inset 0 1px 2px #ddd; + } + + /* FOCUS STATES */ + input[type="text"]:focus, + textarea:focus, + button:focus, + a.button:focus, + select:focus, + input[type="file"]:focus, + input[type="password"]:focus{ + -webkit-box-shadow: 0 0 7px #6DB9FF; + -moz-box-shadow : 0 0 7px #6DB9FF; + box-shadow : 0 0 7px #6DB9FF; + border: 1px solid #50B1FE; + outline: none; + } + + /* TRANSITION */ + input[type="text"], + textarea, + button, + a.button, + a, + input[type="file"]{ + -moz-transition: -moz-box-shadow 0.5s, border 0.5s, background 0.5s; + -webkit-transition: -webkit-box-shadow 0.5s, border 0.5s, background 0.5s; + -o-transition: box-shadow 0.5s, border 0.5s, background 0.5s; + transition: box-shadow 0.5s, border 0.5s, background 0.5s; + } + +input.checkbox, +input[type="checkbox"]{ +display:inline; +width:auto; +margin:0; +padding:0; +border:0; +background:none; +vertical-align:center; +*vertical-align: top; +} + +input.radio, +input[type="radio"]{ +display:inline; +width:auto; +margin:0; +padding:0; +border:0; +background:none; +vertical-align:center; +*vertical-align: top; +} + + input[type="radio"]:focus, + input[ type="checkbox"]:focus{ + -webkit-box-shadow: 0 0 5px #6DB9FF; + -moz-box-shadow : 0 0 5px #6DB9FF; + box-shadow : 0 0 5px #6DB9FF; + outline-color: #6DB9FF; + } + +input.file, +input[type="file"]{ +/*font-size:0.8em;*/ +-moz-box-shadow:none; +-webkit-box-shadow:none; +box-shadow:none; +border:none; +} + +select{ +display:inline; +width:auto; +margin:0; +border:1px solid #ccc; +line-height:100%; +padding:3px; +vertical-align: middle; +} + + select[disabled="disabled"], select.disabled{ + color:#999; + background:#f5f5f5; + -moz-box-shadow:inset 0 0 2px #ddd; + -webkit-box-shadow:inset 0 1px 2px #ddd; + box-shadow:inset 0 1px 2px #ddd; + } + +textarea{ +width:auto; +height:200px; +margin:0; +border:1px solid #ccc; +padding:5px; +vertical-align: middle; +font-family:inherit; +font-size:0.9em; +-moz-border-radius:5px; +-webkit-border-radius:5px; +border-radius:5px; +-moz-box-shadow:inset 0 0 6px #ccc; +-webkit-box-shadow:inset 0 1px 6px #ccc; +box-shadow:inset 0 1px 6px #ccc; +-moz-box-sizing: border-box; +-webkit-box-sizing: border-box; +box-sizing: border-box; +} + +/*--------------------------------- + COLUMN SIZES +-----------------------------------*/ + +/* sizes */ +input[class*="col_"], +select[class*="col_"], +label[class*="col_"]{ +float:none;display:inline-block;*display:inline;margin-bottom:0; +*margin-left: 0.5%;*margin-right: 0.5%;/* this is for IE 7 Only and is not a good fix - work needed here */ +} + +/*--------------------------------- + FORMS VERTICAL +-----------------------------------*/ +form.vertical{ + +} + + form.vertical label{display:block;} + form.vertical input, + form.vertical select, + form.vertical textarea{width:100%;display:block;margin-bottom:10px;} + form.vertical .chzn-container{display:block;margin-bottom:10px;} + form.vertical .chzn-choices{display:block;margin-bottom:10px;} + + /* radios & checks */ + form.vertical input.checkbox, + form.vertical input[type="checkbox"], + form.vertical input.radio, + form.vertical input[type="radio"], + form.vertical label.inline{display:inline;width:auto;margin:0;} +/*--------------------------------- + FORM VALIDATION +-----------------------------------*/ +label.error{color:red;} +input.error{border:1px solid red;} +select.error{border:1px solid red;} + +/*--------------------------------- + NOTICES +-----------------------------------*/ +.notice{ +border:1px solid gold; +background:lightyellow; +padding:10px 20px 10px 40px; +margin:10px 0; +-moz-border-radius:5px; +-webkit-border-radius:5px; +border-radius:5px; +color:#DEAE00; +line-height:120%; +vertical-align: center; +text-shadow:0px 1px rgba(255,255,255,0.5); +position:relative; +top:0; +left:0; +clear:both; +} + + .notice.warning{}/*default*/ + .notice.error{border:1px solid red;background:pink;color:red;} + .notice.success{border:1px solid green;background:lightgreen;color:green;} + .notice i[class*='fa-']{position:absolute;top:50%;left:0.8em;margin-top:-0.6em;} + .notice a[class*='fa-remove'], + .notice a[class*='fa-remove']:active, + .notice a[class*='fa-remove']:visited{text-decoration:none;font-size:12px;position:absolute;top:5px;right:5px;left:auto;color:inherit;margin-top:0;left:auto;} diff --git a/osrframework/static/css/kickstart-grid.css b/osrframework/static/css/kickstart-grid.css new file mode 100755 index 0000000..810c5a2 --- /dev/null +++ b/osrframework/static/css/kickstart-grid.css @@ -0,0 +1,167 @@ +/* + 99Lime.com HTML KickStart by Joshua Gatcke + kickstart-grids.css + + DO NOT EDIT THIS FILE unless you know what you are doing. +*/ +/*--------------------------------- + GRID/COLUMNS +----------------------------------- + tinyfluidgrid.com + & girlfriendnyc.com + with changes by 99Lime +-----------------------------------*/ + /* + & Columns : 12 + & Gutter %: 20% + & MaxWidth: 1280px + */ + +.grid{ +max-width:1600px; +margin:0 auto; +padding:0 2em; +} + +.grid.flex{ +width:100%; +max-width:100%; +padding:0 2%; +padding:2em; +} + +.row{ +display:block; +overflow:hidden; +clear:both; +} + +*[class*="col_"].alpha{margin-left:0;} +*[class*="col_"].omega{margin-right:0;} + +.col_1 { width: 6.6666666666667%; } +.col_2 { width: 15%; } +.col_3 { width: 23.333333333333%; } +.col_4 { width: 31.666666666667%; } +.col_5 { width: 40%; } +.col_6 { width: 48.333333333333%; } +.col_7 { width: 56.666666666667%; } +.col_8 { width: 65%; } +.col_9 { width: 73.333333333333%; } +.col_10 { width: 81.666666666667%; } +.col_11 { width: 90%; } +.col_12 { width: 98.333333333333%; } + +*[class*="col_"]{ +margin-left: 0.83333333333333%; +margin-right: 0.83333333333333%; +margin-top:0.5em; +margin-bottom:0.5em; +float: left; +display: block; +} + +.grid img{ +max-width: 100%; +height:auto; +} + +.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0} +.clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0} +* html .clearfix, *:first-child+html .clearfix{zoom:1} + +/* Viewable Grids + To view your grids, add the class .visible to any grid container. + This will add a background color so you can see the layout of your grids. +*/ +*[class*="col_"].visible{ +background:#eee; +border:1px dotted #ccc; +} + + +/*--------------------------------- + Responsive Grid Media Queries - 1280, 1024, 768, 480 + 1280-1024 - desktop (default grid) + 1024-768 - tablet landscape + 768-480 - tablet + 480-less - phone landscape & smaller +-----------------------------------*/ +@media all and (min-width: 1024px) and (max-width: 1280px) { + + .grid *[class*="col_"]{} + .grid{max-width: 1024px;} + .show-desktop {display:block;} + .hide-desktop {display:none;} + .show-tablet {display:none;} + .hide-tablet {display:block;} + .show-phone {display:none;} + .hide-phone {display:block;} + +} + +@media all and (min-width: 768px) and (max-width: 1024px) { + + .grid *[class*="col_"]{} + .grid{max-width: 768px;} + .show-desktop {display:none;} + .hide-desktop {display:block;} + .show-tablet {display:block;} + .hide-tablet {display:none;} + .show-phone {display:none;} + .hide-phone {display:block;} + +} + + +@media all and (min-width: 480px) and (max-width: 768px) { + + .grid *[class*="col_"]{ + float:none; + width:auto; + clear:both; + display:block; + } + + /* columns inside of columns */ + .grid *[class*="col_"] [class*="col_"]{ + margin-left:0; + margin-right:0; + width:100%; + } + + .grid{max-width: 480px;} + .show-desktop {display:none;} + .hide-desktop {display:block;} + .show-tablet {display:block;} + .hide-tablet {display:none;} + .show-phone {display:none;} + .hide-phone {display:block;} + +} + +@media all and (max-width: 480px) { + + .grid *[class*="col_"]{ + float:none; + width:auto; + clear:both; + display:block; + } + + /* columns inside of columns */ + .grid *[class*="col_"] [class*="col_"]{ + margin-left:0; + margin-right:0; + width:100%; + } + + .grid{max-width: 100%;/*320*/} + .show-desktop {display:none;} + .hide-desktop {display:block;} + .show-tablet {display:none;} + .hide-tablet {display:block;} + .show-phone {display:block;} + .hide-phone {display:none;} + +} diff --git a/osrframework/static/css/kickstart-menus.css b/osrframework/static/css/kickstart-menus.css new file mode 100755 index 0000000..73a9332 --- /dev/null +++ b/osrframework/static/css/kickstart-menus.css @@ -0,0 +1,180 @@ +/* + 99Lime.com HTML KickStart by Joshua Gatcke + kickstart-menus.css +*/ + +/*--------------------------------- + MENU LAYOUT + DO NOT EDIT This Section (unless you know what you are doing) +-----------------------------------*/ +.menu{margin:0;padding:0;line-height:100%; +font-size:0; /* Kill white space gap between LI elements */ +position:relative;z-index:1000;} + + .menu:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0} + .menu li{margin:0;padding:0;list-style-type:none;display:inline-block;*display:inline;position:relative;zoom:1;line-height:inherit; + top:0;left:0;font-size:16px; /* fixed font-size to replace font-size:0 in parent .menu 1em/16px default */} + .menu li a{margin:0;padding:0;display:block;display:inline;display:inline-block;position:relative;zoom:1;line-height:100%;top:0;left:0;} + + +/*--------------Sub Menus-------------------*/ + /*.menu li:hover > ul{display:block;}*/ + .menu ul{margin:0;padding:0;position: absolute;top:100%;left:0;display:none;min-width:150px;max-width:150%;*width:150px;} + .menu ul li{display:block;width:100%;} + .menu ul li a{display:block;} + .menu ul ul{top:0;left:100%;} + +/*--------------Dividers-------------------*/ + .menu ul li.divider{border-top:1px solid #ccc;} + .menu ul li.divider a{border-top:1px solid #fff;} + + +/*--------------Right---------------------*/ + .menu li.right{float:right;} + + +/*--------------Arrows-------------------*/ + .menu li.has-menu a{padding-right:25px;} + .menu li.has-menu span.arrow{border-style:solid;border-width:5px; + display:block;position:absolute;top:50%;right:5px;font-size:0;line-height:0;height:0;width:0;} + .menu li li.has-menu span.arrow{margin-top:-4px;} + +/*--------------Vertical Menu Layout-------------------*/ +.menu.vertical{} + .menu.vertical li{display:block;} + .menu.vertical li a{display:block;} + .menu.vertical ul{top:0;left:100%;} + .menu.vertical li.has-menu span.arrow{margin-top:-4px;} + +/*--------------Vertical Right Menu Layout-------------------*/ +.menu.vertical.right{text-align:left;} + .menu.vertical.right ul{top:0;right:100%;left:auto;} + .menu.vertical.right li a{padding-left:25px;padding-right:20px;} + .menu.vertical.right li.has-menu span.arrow{right:auto;left:5px;margin-top:-4px;} + + +/*--------------------------------- + MENU STYLES + EDIT BELOW THIS LINE TO CUSTOMIZE +-----------------------------------*/ +.menu{ +border:1px solid #ccc; +background: #eee; /* Old browsers */ +background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(224,224,224,1) 100%); /* FF3.6+ */ +background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(224,224,224,1))); /* Chrome,Safari4+ */ +background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* Chrome10+,Safari5.1+ */ +background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* Opera11.10+ */ +background: linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* W3C */ +z-index:600; +} + + .menu li{} + + .menu li a{ + text-shadow:0px 1px 1px #fff; + padding:15px 20px; + text-decoration:none; + font-size:0.9em; + color: #777; + } + + .menu li.current>a, + .menu li.current>a:hover, + .menu li.current.hover>a{ + background: rgb(122,188,255); /* Old browsers */ + background: -moz-linear-gradient(top, rgba(122,188,255,1) 0%, rgba(96,171,248,1) 44%, rgba(64,150,238,1) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(122,188,255,1)), color-stop(44%,rgba(96,171,248,1)), color-stop(100%,rgba(64,150,238,1))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(122,188,255,1) 0%,rgba(96,171,248,1) 44%,rgba(64,150,238,1) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(122,188,255,1) 0%,rgba(96,171,248,1) 44%,rgba(64,150,238,1) 100%); /* Opera11.10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7abcff', endColorstr='#4096ee',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, rgba(122,188,255,1) 0%,rgba(96,171,248,1) 44%,rgba(64,150,238,1) 100%); /* W3C */ + color:#fff; + text-shadow:0px -1px 0 rgba(0,0,0,0.2); + cursor: default; + } + + .menu li a:hover, + .menu li.hover>a{ + background:#f5f5f5; + } + + /* sub menus */ + .menu ul{ + background: #efefef; + border:1px solid #ccc; + } + + .menu ul li{} + .menu ul li a{} + + /* sub-sub menus */ + .menu ul ul{} + .menu ul ul li{} + .menu ul ul li a{} + + /* arrows */ + /* arrow down */ .menu li.has-menu span.arrow{border-color-top:#ccc;border-color:#ccc transparent transparent transparent;} + /* arrow left */ .menu li li.has-menu span.arrow, .menu.vertical li.has-menu span.arrow + {border-color-left:#ccc;border-color:transparent transparent transparent #ccc;} + /* arrow right */ .menu.vertical.right li.has-menu span.arrow{border-color-right:#ccc;border-color:transparent #ccc transparent transparent;} + + /* dividers */ .menu ul li.divider{border-top:1px solid #ccc;} + .menu ul li.divider a{border-top:1px solid #fff;} + + + +/*--------------------------------- + RESPONSIVE MENU STYLES + DO NOT EDIT unless you know what you are doing +-----------------------------------*/ + +.menu li.menu-toggle{display:none;} + + +@media all and (max-width: 768px) { + + .grid .menu li, + .grid .menu.vertical li, + .grid .menu.vertical.right li{ + display:block; + display:none; + } + + .grid .menu li.menu-toggle, + .grid .menu.vertical li.menu-toggle, + .grid .menu.vertical.right li.menu-toggle{ + display:block; + } + + .grid .menu:hover li, + .grid .menu.vertical:hover li, + .grid .menu.vertical.right:hover li{ + display:block; + } + + /* arrows */ + .grid .menu li.has-menu span.arrow, + .grid .menu.vertical li.has-menu span.arrow, + .grid .menu.vertical.right li.has-menu span.arrow, + .grid .menu li li.has-menu span.arrow, .menu.vertical li.has-menu span.arrow + {border-color-top:#ccc;border-color:#ccc transparent transparent transparent;} + + .grid .menu.vertical.right li.has-menu span.arrow{ + right:5px;left:auto; + } + + .grid .menu li a{ + display:block; + } + + .grid .menu ul, + .grid .menu ul ul, + .grid .menu.vertical ul, + .grid .menu.vertical.right ul{ + position:relative; + top:0; + left:0; + margin:10px; + } + +} diff --git a/osrframework/static/css/kickstart-slideshow.css b/osrframework/static/css/kickstart-slideshow.css new file mode 100755 index 0000000..fa558e0 --- /dev/null +++ b/osrframework/static/css/kickstart-slideshow.css @@ -0,0 +1,223 @@ +/*--------------------------------- + SLIDESHOW2 - Slight Fixes for the slideshow layout *needs work +-----------------------------------*/ + + .slideshow{ + clear:both; + margin:0; + padding:0; + width:auto; + height:auto; + overflow:hidden; + } + + .slideshow li{ + list-style-type:none; + margin:0; + padding:0; + float:left; + display:block; + } + +/** + * BxSlider v4.0 - Fully loaded, responsive content slider + * http://bxslider.com + * + * Written by: Steven Wanderski, 2012 + * http://stevenwanderski.com + * (while drinking Belgian ales and listening to jazz) + * + * CEO and founder of bxCreative, LTD + * http://bxcreative.com + */ + + +/** RESET AND LAYOUT +===================================*/ +.bx-wrapper, .bx-wrapper *{ + -webkit-box-sizing: content-box; /* Safari/Chrome, other WebKit */ + -moz-box-sizing: content-box; /* Firefox, other Gecko */ + box-sizing: content-box; /* Opera/IE 8+ */ +} + +.bx-wrapper { + position: relative; + margin: 0 0 60px; + padding: 0; + *zoom: 1; +} + +.bx-wrapper img { + width: 100%; + display: block; +} + +/** THEME +===================================*/ + +.bx-wrapper .bx-viewport { + -moz-box-shadow: 0 0 5px #ccc; + -webkit-box-shadow: 0 0 5px #ccc; + box-shadow: 0 0 5px #ccc; + border: solid #fff 5px; + left: 0; + background: #fff; +} + +.bx-wrapper .bx-pager, +.bx-wrapper .bx-controls-auto { + position: absolute; + bottom: -30px; + width: 100%; +} + +/* LOADER */ + +.bx-wrapper .bx-loading { + min-height: 50px; + background: url(img/bx_loader.gif) center center no-repeat #fff; + height: 100%; + width: 100%; + position: absolute; + top: 0; + left: 0; + z-index: 2000; +} + +/* PAGER */ + +.bx-wrapper .bx-pager { + text-align: center; + font-size: .85em; + font-family: Arial; + font-weight: bold; + color: #666; + padding-top: 20px; +} + +.bx-wrapper .bx-pager .bx-pager-item, +.bx-wrapper .bx-controls-auto .bx-controls-auto-item { + display: inline-block; + *zoom: 1; + *display: inline; +} + +.bx-wrapper .bx-pager.bx-default-pager a { + background: #666; + text-indent: -9999px; + display: block; + width: 10px; + height: 10px; + margin: 0 5px; + outline: 0; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; +} + +.bx-wrapper .bx-pager.bx-default-pager a:hover, +.bx-wrapper .bx-pager.bx-default-pager a.active { + background: #000; +} + +/* DIRECTION CONTROLS (NEXT / PREV) */ + +.bx-wrapper .bx-prev { + left: 10px; + background: url(img/controls.png) no-repeat 0 -32px; +} + +.bx-wrapper .bx-next { + right: 10px; + background: url(img/controls.png) no-repeat -43px -32px; +} + +.bx-wrapper .bx-prev:hover { + background-position: 0 0; +} + +.bx-wrapper .bx-next:hover { + background-position: -43px 0; +} + +.bx-wrapper .bx-controls-direction a { + position: absolute; + top: 50%; + margin-top: -16px; + outline: 0; + width: 32px; + height: 32px; + text-indent: -9999px; + z-index: 9999; +} + +.bx-wrapper .bx-controls-direction a.disabled { + display: none; +} + +/* AUTO CONTROLS (START / STOP) */ + +.bx-wrapper .bx-controls-auto { + text-align: center; +} + +.bx-wrapper .bx-controls-auto .bx-start { + display: block; + text-indent: -9999px; + width: 10px; + height: 11px; + outline: 0; + background: url(img/controls.png) -86px -11px no-repeat; + margin: 0 3px; +} + +.bx-wrapper .bx-controls-auto .bx-start:hover, +.bx-wrapper .bx-controls-auto .bx-start.active { + background-position: -86px 0; +} + +.bx-wrapper .bx-controls-auto .bx-stop { + display: block; + text-indent: -9999px; + width: 9px; + height: 11px; + outline: 0; + background: url(img/controls.png) -86px -44px no-repeat; + margin: 0 3px; +} + +.bx-wrapper .bx-controls-auto .bx-stop:hover, +.bx-wrapper .bx-controls-auto .bx-stop.active { + background-position: -86px -33px; +} + +/* PAGER WITH AUTO-CONTROLS HYBRID LAYOUT */ + +.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-pager { + text-align: left; + width: 80%; +} + +.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-controls-auto { + right: 0; + width: 35px; +} + +/* IMAGE CAPTIONS */ + +.bx-wrapper .bx-caption { + position: absolute; + bottom: 0; + left: 0; + background: #666\9; + background: rgba(80, 80, 80, 0.75); + width: 100%; +} + +.bx-wrapper .bx-caption span { + color: #fff; + font-family: Arial; + display: block; + font-size: .85em; + padding: 10px; +} diff --git a/osrframework/static/css/kickstart-style.css b/osrframework/static/css/kickstart-style.css new file mode 100755 index 0000000..4f39ca4 --- /dev/null +++ b/osrframework/static/css/kickstart-style.css @@ -0,0 +1,155 @@ +/* + 99Lime.com HTML KickStart by Joshua Gatcke + style.css + +*/ + +/*--------------------------------- + IMPORTS +-----------------------------------*/ +@import url(https://fonts.googleapis.com/css?family=Arimo:400,700); + +/*--------------------------------- + OVERRIDES +-----------------------------------*/ +h1,h2,h3,h4,h5,h6{ +font-family: "Arimo", arial, verdana, sans-serif; +font-weight:normal; +} + +thead th, +tbody th{ +font-family: "Arimo", arial, verdana, sans-serif; +} + +button, +a.btn, +input[type="submit"], +input[type="reset"], +input[type="button"]{ +font-family: "Arimo", arial, verdana, sans-serif; +} + +.menu{ +font-family: "Arimo", arial, verdana, sans-serif; +} + +blockquote{ +font-family: "Arimo", arial, verdana, sans-serif; +} + +/*--------------------------------- + LAYOUT +-----------------------------------*/ +body{ +margin:0; +padding:0 0 0 0; +color:#000; +background:#efefef url(css/img/gray_jean.png); +font:normal 0.9em/150% 'Arimo', arial, verdana, sans-serif; +text-shadow: 0 0 1px transparent; /* google font pixelation fix */ +} + +#wrap{ +width:100%; +background:#fff; +margin:30px auto 30px auto; +padding:0 2%; +border:1px solid #ccc; +} + + +#footer{ +text-align:center; +padding:20px; +margin:0; +border-top:1px solid #ddd; +color:#999; +font-size:0.8em; +text-shadow:0px 1px 1px #fff; +position: relative; +top:0; +left:0; +background:#fff; +} + + #link-top{ + display:none; + } + +/* NAV BAR*/ +.navbar{ +position:fixed; +top:0; +left:0; +width: 100%; +background:#000; +color:#fff; +z-index:1000; +} + + .navbar #logo{ + position:absolute; + top:0; + right:0; + padding:0.5em 1em; + font-size: 1.7em; + color:#efefef; + text-decoration:none; + } + + .navbar span{ + color:#86dc00; + } + + + .navbar ul{ + display:inline-block; + margin:0; + padding:0; + } + + .navbar li{ + margin:0; + padding:0; + list-style-type:0; + display:inline-block; + } + + .navbar li a{ + display:inline-block; + color:#efefef; + padding:1em 1.3em; + text-decoration:none; + text-transform: uppercase; + line-height:100%; + font-size: 1.2em; + } + +.callout{ +background:#4598ef;/*#86dc00;*/ +padding:3em 0; +color:#fff; +box-shadow:inset 0 0 10px rgba(0,0,0,0.2); +text-align: center; +text-shadow:0px 1px 3px rgba(0,0,0,0.2); +display:block; +} + .callout + div.grid{margin-top:50px;} + a.callout{cursor:pointer;} + .callout i.icon-4x{font-size:6em;} + .callout h4{margin-bottom:30px;} + .callout-top{margin:50px 0 0 0;} + .callout p{margin-bottom:0;} + .callout .button{margin-top:10px;} + .callout.green{background:#19ad0b;/*#86dc00;*/} + +#mc_embed_signup{ +padding:30px 0; +} + +#ui-preview{ +border:5px solid #ddd; +margin:30px 0; +display:block; +} diff --git a/osrframework/static/css/kickstart.css b/osrframework/static/css/kickstart.css new file mode 100755 index 0000000..85e654c --- /dev/null +++ b/osrframework/static/css/kickstart.css @@ -0,0 +1,519 @@ +/* + 99Lime.com HTML KickStart by Joshua Gatcke + kickstart.css + + Don't edit the file if you want HTML KickStart to be upgradeable. + Instead, copy any CSS selectors you want to modify to your style.css file. + + // Colors + blue: #4D99E0; +*/ +/*--------------------------------- + IMPORTS +-----------------------------------*/ +@import url(kickstart-buttons.css); +@import url(kickstart-forms.css); +@import url(kickstart-menus.css); +@import url(kickstart-grid.css); +@import url(jquery.fancybox-1.3.4.css); +@import url(kickstart-slideshow.css); +@import url(prettify.css); +@import url(tiptip.css); +@import url(fonts/font-awesome-4.2.0/css/font-awesome.min.css); + +/*--------------------------------- + HTML ELEMENTS +-----------------------------------*/ +*{ +-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ +-moz-box-sizing: border-box; /* Firefox, other Gecko */ +box-sizing: border-box; /* Opera/IE 8+ */ +} +a{color:#4D99E0;outline:0;} +a:active{color:inherit;} +a:visited{} +a:hover{} +a img{border:0;} +a [class^="icon-"]{color:inherit;text-decoration:none;} +strong,b{color:#000;font-weight:bold;} +strike{} +em,i{} +.hide{display:none;} +.show{display:block;} + +/*--------------------------------- + UTILITY +-----------------------------------*/ +.center{text-align:center;} +.left{text-align:left;} +.right{text-align:right;} + +/*--------------------------------- + HR +-----------------------------------*/ +hr{clear:both;border-bottom:0;border-top:1px dotted #ccc;border-right:0;border-left:0;margin:30px 0;min-height: 0;height:1px;} +hr.alt1{border-style: solid;} +hr.alt2{border-style: dashed;} + +/*--------------------------------- + HTML5 ELEMENTS (shim) +-----------------------------------*/ +article,aside,details,figcaption,figure, +footer,header,hgroup,menu,nav,section { +display:block; +} + +/*--------------------------------- + HEADINGS +-----------------------------------*/ +h1,h2,h3,h4,h5,h6{ +font-weight:bold; +line-height:140%; +} + +h1{ +font-size:3.5em; +margin:10px 0 10px 0; +} + +h2{ +font-size:3em; +margin:10px 0 10px 0; +} + +h3{ +font-size:2.5em; +margin:10px 0 10px 0; +line-height:130%; +} + +h4{ +font-size:2em; +margin:10px 0 10px 0; +} + +h5{ +font-size:1.5em; +margin:10px 0 10px 0; +} + +h6{ +font-size:1.2em; +margin:10px 0 5px 0; +} + +/*--------------------------------- + PARAGRAPHS +-----------------------------------*/ +p{ +margin:10px 0; +} + +/*--------------------------------- + BLOCKQUOTES +-----------------------------------*/ +blockquote{ +font-size:1.5em; +line-height:1.5em; +font-style: italic; +margin:30px 30px 30px 0; +padding:0 0 0 20px; +border-left:1px solid #ccc; +} + + blockquote span{font-size:0.7em;display:block;} + blockquote.small{font-size:1.2em;} + +/*--------------------------------- + LISTS +-----------------------------------*/ +ul, ol{ +padding:0; +margin:0 0 20px 25px; +} + +li{ +padding:5px 0; +margin:0; +} + +ul.list-unstyled{ +padding:0; +margin:0 0 20px 0; +} + +ul.list-unstyled li{ +padding:5px 0; +margin:0; +list-style-type:none; + +} + +ul.alt{ +padding:0; +margin:0 0 20px 0; +} + +ul.alt li{ +list-style-type:none; +border-top:1px dotted #ccc; +border-bottom:1px dotted #ccc; +margin:0 0 -1px 0; +background:url(img/icon-arrow-right.png) no-repeat 5px 0.7em; +padding-left:20px; +} + +ul.icons{ +margin:0 0 20px 0; +padding:0; +} + +ul.icons li{ +list-style-type:none; +margin:0; +padding:5px 0; +} + +/*--------------------------------- + PRE & CODE +-----------------------------------*/ +code{ +font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; +font-size:0.9em; +border:1px solid lightblue; +padding:3px; +-moz-border-radius:3px; +-webkit-border-radius:3px; +border-radius:3px; +color:#518BAB; +} + +pre{ +white-space: pre-wrap; /* css-3 */ +white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ +white-space: -pre-wrap; /* Opera 4-6 */ +white-space: -o-pre-wrap; /* Opera 7 */ +word-wrap: break-word; /* Internet Explorer 5.5+ */ +margin: 0 0 0 0; +padding:5px 5px 3px 5px; +background:#fff; +-moz-border-radius:5px; +-webkit-border-radius:5px; +border-radius:5px; +-webkit-box-shadow:inset 0 0 7px rgba(0,0,0,0.2); +-moz-box-shadow:inset 0 0 7px rgba(0,0,0,0.2); +box-shadow:inset 0 0 7px rgba(0,0,0,0.2); +padding:10px; +margin:0 0; +border:1px solid #ddd; +font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; +font-size:0.9em; +} + +/*--------------------------------- + TABLES +-----------------------------------*/ +table{width:100%;margin:0 0 10px 0;text-align:left;border-collapse: collapse;} + thead, tbody{margin:0;padding:0;} + th, td{padding:7px 10px;font-size:0.9em;border-bottom:1px dotted #ddd;text-align:left;} + thead th{font-size:0.9em;padding:3px 10px;border-bottom:1px solid #ddd;} + tbody tr.last th, + tbody tr.last td{border-bottom:0;} + +/* striped */ +table.striped{} + table.striped tr.alt{background:#f5f5f5;} + table.striped thead th{background:#fff;} + table.striped tbody th{background:#f5f5f5;text-align:right;padding-right:15px;border-right:1px dotted #e5e5e5;} + table.striped tbody tr.alt th{background:#efefef;} + +/* tight */ +table.tight{} + table.tight th, .tight td{padding:2px 10px;} + +/* sortable */ +table.sortable{border:1px solid #ddd;} + table.sortable thead th{cursor: pointer;position:relative;top:0;left:0;border-right:1px solid #ddd;} + table.sortable thead th:hover{background:#efefef;} + table.sortable span.arrow{border-style:solid;border-width:5px; + display:block;position:absolute;top:50%;right:5px;font-size:0; + border-color:#ccc transparent transparent transparent; + line-height:0;height:0;width:0;margin-top:-2px;} + table.sortable span.arrow.up{border-color:transparent transparent #ccc transparent;margin-top:-7px;} + +/*--------------------------------- + TABS +-----------------------------------*/ +ul.tabs{ +margin:10px 0 -1px 0; +padding:0; +width:100%; +border-bottom:1px solid #e5e5e5; +float:left; +font-size:0; +} + + ul.tabs.left{text-align:left;} + ul.tabs.center{text-align:center;} + ul.tabs.right{text-align:right;} + ul.tabs.right li{margin:0 0 0 -2px;} + + ul.tabs li{ + font-size:14px; + list-style-type:none; + margin:0 -2px 0 0; + padding:0; + display:inline-block; + *display:inline;/*IE ONLY*/ + position:relative; + top:0; + left:0; + *top:1px;/*IE 7 ONLY*/ + zoom:1; + } + + ul.tabs li a{ + text-decoration:none; + color:#666; + display:inline-block; + padding:9px 15px; + position: relative; + top:0; + left:0; + line-height:100%; + background:#f5f5f5; + -webkit-box-shadow: inset 0 -3px 3px rgba(0,0,0,0.03); + -moz-box-shadow: inset 0 -3px 3px rgba(0,0,0,0.03); + box-shadow: inset 0 -3px 3px rgba(0,0,0,0.03); + border:1px solid #e5e5e5; + border-bottom:0; + font-size:0.9em; + zoom:1; + } + + ul.tabs li a:hover{ + background:#fff; + } + + ul.tabs li.current a{ + position:relative; + top:1px; + left:0; + background:#fff; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + color:#222; + } + + .tab-content{ + border:1px solid #efefef; + border:1px solid #e5e5e5; + background:#fff; + clear:both; + padding:20px; + margin:0 0 40px 0; + } + + +/*--------------------------------- + BREADCRUMBS +-----------------------------------*/ +ul.breadcrumbs{ +margin:10px 0; +padding:0; +line-height:0%; +font-size:0; +} + + ul.breadcrumbs li{ + list-style-type:none; + margin:0; + padding:0; + display:inline-block; + *display:inline; /* IE ONLY*/ + position:relative; + zoom:1; + line-height:100%; + font-size:14px; /* 0.8em default to override font-size:0; on parent*/ + } + + ul.breadcrumbs li a{ + display:inline-block; + *display:inline; /* IE ONLY*/ + position:relative; + padding:5px 15px 5px 5px; + font-size:0.9em; + zoom:1; + margin:0; + background:url(img/icon-arrow-right.png) no-repeat right center; + } + + ul.breadcrumbs li.last a{ + color:#333; + cursor: default; + text-decoration:none; + background:none; + } + + ul.breadcrumbs li.last a:hover{ + text-decoration:none; + } + + /* Alternative Style */ + ul.breadcrumbs.alt1{ + border:1px solid transparent; + font-size:0; + } + + ul.breadcrumbs.alt1 li a{ + padding:10px 25px 10px 15px; + background:url(img/breadcrumbs-bg.gif) no-repeat right center; + text-decoration:none; + border-top:1px solid #efefef; + border-bottom:1px solid #efefef; + font-size:12px; + } + + ul.breadcrumbs.alt1 a:hover{ + text-decoration:underline; + } + + ul.breadcrumbs.alt1 li.first a{ + border-left:1px solid #efefef; + } + + ul.breadcrumbs.alt1 li.last a{ + background:none; + border-right:1px solid #efefef; + } + +/*--------------------------------- + IMAGES +-----------------------------------*/ +/* + for img .style1, .style2, .style3 + view js/kickstart.js Image Style Helpers +*/ +img{ +margin:0; +padding:0; +display:inline-block; +position:relative; +zoom:1; +vertical-align: bottom; +} + + img.align-left, .img-wrap.align-left{float:left;margin:0 10px 5px 0;} + img.align-right, .img-wrap.align-right{float:right;margin:0 0 5px 10px;} + img.full-width{clear:both;display:block;width:100%;height:auto;margin:0 0 10px 0;} + + div.caption{ + background:#f5f5f5; + border:1px solid #ddd; + padding:3px; + max-width:100%; + display:inline-block; + height:auto; + } + + div.caption img{ + display:block; + padding:0; + margin:0; + width:100%; + height:auto; + } + + div.caption span{ + display:block; + margin-top:3px; + font-size:0.8em; + color:#666; + padding:0px 5px; + } + + .gallery{} + + .gallery a{ + display:inline-block; + position:relative; + border:1px solid #ddd; + background:#fff; + padding:3px; + margin:5px; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + } + + .gallery a img{ + display: block; + position: relative; + margin:0; + padding:0; + } + +/*--------------------------------- + SLIDESHOW2 +-----------------------------------*/ +.slideshow-wrap{ +clear:both; +margin:0; +padding:0; +position:relative; +top:0; +left:0; +overflow:hidden; +clear:both; +} + + .slideshow-inner{ + overflow:hidden; + clear:both; + position:relative; + top:0; + left:0; + border:1px solid #efefef; + } + + .slideshow{ + clear:both; + margin:0; + padding:0; + width:auto; + height:auto; + overflow:hidden; + } + + .slideshow li{ + list-style-type:none; + margin:0; + padding:0; + float:left; + display:block; + } + + .slideshow img{vertical-align: bottom;} + + .slideshow-buttons{ + text-align:right; + margin:3px 0 0 0; + padding:0; + } + + .slideshow-buttons li{display:inline;position:relative;top:0;left:0;line-height:100%;margin:0;padding:0;} + .slideshow-buttons li.current a{background:#ddd;} + + .slideshow-buttons a{ + display:inline; + position:relative; + top:0; + left:0; + padding:1px 3px; + margin:0 1px; + line-height:100%; + border:1px solid #efefef; + text-decoration:none; + font-size:0.8em; + } diff --git a/osrframework/static/css/prettify.css b/osrframework/static/css/prettify.css new file mode 100755 index 0000000..c4941e9 --- /dev/null +++ b/osrframework/static/css/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file diff --git a/osrframework/static/css/style.css b/osrframework/static/css/style.css new file mode 100644 index 0000000..e13bd89 --- /dev/null +++ b/osrframework/static/css/style.css @@ -0,0 +1,239 @@ +html, +body { + min-height: 100%; + min-height: 100vh; + margin: 0px; + padding: 0px; +} +.contents { + padding-top: 10px; +} +#chart_div { + margin: 0 auto; +} +.showConfigButton { + display: inline-block !important; +} +.recordDisplay[displaytype="grid"] > .listItemGroup > .listItem > .content .thumbnail { + display: block; + overflow-y: hidden; + overflow-x: hidden; + position: relative; + -webkit-transition: background-color 300ms linear; + -moz-transition: background-color 300ms linear; + -o-transition: background-color 300ms linear; + transition: background-color 300ms linear; +} +.recordDisplay[displaytype="grid"] > .listItemGroup > .listItem > .content .thumbnail > .thumbImg { + display: block; + margin-left: auto; + margin-right: auto; + background-color: white; + width: 100%; +} +.recordDisplay[displaytype="grid"] > .listItemGroup > .listItem > .content .subTitle { + display: block; + font-family: Georgia, "Times New Roman", Times, serif; + font-style: italic; + font-weight: 400; + color: gray; + font-size: 0.8em; + text-align: left; +} +.recordDisplay[displaytype="grid"] > .listItemGroup > .listItem > .content .title { + display: block; + margin-left: auto; + margin-right: auto; + margin-top: 2px; + text-align: left; + font-size: 0.9em; + font-family: 'Helvetica Neue Custom', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-weight: 700; +} +.recordDisplay[displaytype="grid"] > .listItemGroup > .listItem:hover .thumbImg { + box-shadow: 0px 0px 4px black; +} +.recordDisplay[displaytype="grid"] > .listItemGroup > .listItem[highlight=true] > .content .thumbnail { + background-color: orangered; +} +.pageTitle { + text-align: center; + padding-top: 10px; + font-family: 'Montserrat', sans-serif; + font-size: 1.8em; + text-shadow: 2px 2px 0px lightgray; + text-transform: capitalize; +} +.pageSubtitle { + text-align: center; + font-family: 'Montserrat', sans-serif; + padding-top: 10px; + padding-bottom: 5px; + font-size: 0.9em; + font-weight: 300; + line-height: 1.5em; +} +#infobox { + position: fixed; + left: 0px; + right: 0px; + bottom: 0px; + text-align: center; + font-weight: 300; + font-family: sans-serif; + font-size: 0.8em; + padding: 3px 120px 3px 120px; + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0d…g9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNsZXNzaGF0LWdlbmVyYXRlZCkiIC8+PC9zdmc+); + background-image: -webkit-linear-gradient(bottom, #dfd2a9 0%, rgba(255, 255, 255, 0) 80%); + background-image: -moz-linear-gradient(bottom, #dfd2a9 0%, rgba(255, 255, 255, 0) 80%); + background-image: -o-linear-gradient(bottom, #dfd2a9 0%, rgba(255, 255, 255, 0) 80%); + background-image: linear-gradient(to top, #dfd2a9 0%, rgba(255, 255, 255, 0) 80%); +} +#infobox a { + color: black; + font-weight: 500; +} +#infobox a:hover { + color: orangered; +} +#infobox .fa { + color: gray; +} +.keshif_logo { + position: absolute; + display: block; + top: 5px; + left: 5px; + width: 33px; + height: 33px; + font-size: 12px; + overflow: hidden; + cursor: auto; + -webkit-transition: width 500ms ease-in-out, background-color 500ms ease-in-out; + -moz-transition: width 500ms ease-in-out, background-color 500ms ease-in-out; + -o-transition: width 500ms ease-in-out, background-color 500ms ease-in-out; + transition: width 500ms ease-in-out, background-color 500ms ease-in-out; + border-radius: 5px; + cursor: pointer; + text-decoration: none; +} +.keshif_logo:hover { + background-color: #EEEEEE; + width: 200px; +} +.keshif_logo > .keshif_logo_img { + height: 33px; + float: left; +} +.keshif_logo > .keshif_logo_content { + display: block; + width: 300px; + font-family: Verdana, Arial, Helvetica, sans-serif; + letter-spacing: .12em; + color: #727365; + vertical-align: center; +} +.comment_popup { + position: fixed; + top: 5px; + left: 5px; + cursor: pointer; +} +.comment_popup .fa-stack { + float: left; + clear: left; + height: 1.5em; + margin-top: -15px; + margin-left: -15px; + font-size: 2em; +} +.comment_popup .fa-comment { + color: #ffcd2e; +} +.comment_popup .texttt { + font-family: sans-serif; + font-weight: 300; + font-size: 0.8em; +} +.comment_popup:hover .texttt { + color: orangered; +} +.comment_popup:hover .fa-comment { + color: orangered; +} +.forkongithub { + position: fixed; + display: block; + z-index: 0; +} +.forkongithub a.fork-ribbon { + background: #000; + color: #fff; + text-decoration: none; + font-family: arial, sans-serif; + text-align: center; + font-weight: bold; + padding: 5px 40px; + font-size: 0.8rem; + line-height: 1.5rem; + position: relative; + transition: 0.5s; +} +.forkongithub a.fork-ribbon::before, +.forkongithub a.fork-ribbon::after { + width: 100%; + display: block; + position: absolute; + top: 1px; + left: 0; + height: 1px; + background: #fff; + content: ""; +} +.forkongithub a.fork-ribbon::after { + bottom: 1px; + top: auto; +} +.forkongithub a.fork-ribbon:hover { + background: orangered; + color: #fff; +} +@media screen and (min-width: 800px) { + .forkongithub { + width: 0px; + height: 150px; + } + .forkongithub.fork-bottom { + bottom: 0; + } + .forkongithub.fork-right { + right: 0; + } + .forkongithub.fork-right a.fork-ribbon { + font-size: 1.1em; + -webkit-transform: rotate(-45deg); + -moz-transform: rotate(-45deg); + -o-transform: rotate(-45deg); + -ms-transform: rotate(-45deg); + transform: rotate(-45deg); + } + .forkongithub.fork-left { + left: -60px; + } + .forkongithub.fork-left a.fork-ribbon { + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -o-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); + right: auto; + left: 0px; + } + .forkongithub a.fork-ribbon { + width: 150px; + position: absolute; + top: 80px; + right: -60px; + box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.8); + } +} diff --git a/osrframework/static/css/tiptip.css b/osrframework/static/css/tiptip.css new file mode 100755 index 0000000..a5456b7 --- /dev/null +++ b/osrframework/static/css/tiptip.css @@ -0,0 +1,99 @@ +/* + TipTip CSS - Version 1.2 + http://code.drewwilson.com/entry/tiptip-jquery-plugin +*/ + +#tiptip_holder { display: none; position: absolute; top: 0; left: 0; z-index: 99999; } +#tiptip_holder.tip_top { padding-bottom: 5px; } +#tiptip_holder.tip_bottom { padding-top: 5px; } +#tiptip_holder.tip_right { padding-left: 5px; } +#tiptip_holder.tip_left { padding-right: 5px; } + +#tiptip_content { +font-size: 11px; +color: #fff; +text-shadow: 0 0 2px #000; +padding: 4px 8px; +border: 1px solid rgba(255,255,255,0.25); +background:#212121; +background-color: rgba(25,25,25,0.92); +background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(#000)); +-webkit-border-radius: 3px; +-moz-border-radius: 3px; +border-radius: 3px; +-webkit-box-shadow: 0 0 3px #555; +-moz-box-shadow: 0 0 3px #555; +box-shadow: 0 0 3px #555; +*background:#212121; +} + +#tiptip_arrow, #tiptip_arrow_inner { +position: absolute; +border-color: transparent; +border-style: solid; +border-width: 6px; +height: 0; +width: 0; +} + +#tiptip_holder.tip_top #tiptip_arrow { +border-top-color: #fff; +border-top-color: rgba(255,255,255,0.35); +} + +#tiptip_holder.tip_bottom #tiptip_arrow { +border-bottom-color: #fff; +border-bottom-color: rgba(255,255,255,0.35); +} + +#tiptip_holder.tip_right #tiptip_arrow { +border-right-color: #fff; +border-right-color: rgba(255,255,255,0.35); +} + +#tiptip_holder.tip_left #tiptip_arrow { +border-left-color: #fff; +border-left-color: rgba(255,255,255,0.35); +} + +#tiptip_holder.tip_top #tiptip_arrow_inner { +margin-top: -7px; +margin-left: -6px; +border-top-color: rgb(25,25,25); +border-top-color: rgba(25,25,25,0.92); +} + +#tiptip_holder.tip_bottom #tiptip_arrow_inner { +margin-top: -5px; +margin-left: -6px; +border-bottom-color: rgb(25,25,25); +border-bottom-color: rgba(25,25,25,0.92); +} + +#tiptip_holder.tip_right #tiptip_arrow_inner { +margin-top: -6px; +margin-left: -5px; +border-right-color: rgb(25,25,25); +border-right-color: rgba(25,25,25,0.92); +} + +#tiptip_holder.tip_left #tiptip_arrow_inner { +margin-top: -6px; +margin-left: -7px; +border-left-color: rgb(25,25,25); +border-left-color: rgba(25,25,25,0.92); +} + +/* Webkit Hacks */ +@media screen and (-webkit-min-device-pixel-ratio:0) { + #tiptip_content { + padding: 4px 8px 5px 8px; + background-color: rgba(45,45,45,0.88); + } + #tiptip_holder.tip_bottom #tiptip_arrow_inner { + border-bottom-color: rgba(45,45,45,0.88); + } + #tiptip_holder.tip_top #tiptip_arrow_inner { + border-top-color: rgba(20,20,20,0.92); + } +} \ No newline at end of file diff --git a/osrframework/static/favicon.ico b/osrframework/static/favicon.ico new file mode 100644 index 0000000..b2d9e09 Binary files /dev/null and b/osrframework/static/favicon.ico differ diff --git a/osrframework/static/img/globe.png b/osrframework/static/img/globe.png new file mode 100644 index 0000000..35484b2 Binary files /dev/null and b/osrframework/static/img/globe.png differ diff --git a/osrframework/static/img/loading.gif b/osrframework/static/img/loading.gif new file mode 100644 index 0000000..c69e937 Binary files /dev/null and b/osrframework/static/img/loading.gif differ diff --git a/osrframework/static/img/mail.png b/osrframework/static/img/mail.png new file mode 100644 index 0000000..5dae7d9 Binary files /dev/null and b/osrframework/static/img/mail.png differ diff --git a/osrframework/static/img/osrframework-full.png b/osrframework/static/img/osrframework-full.png new file mode 100644 index 0000000..717f9da Binary files /dev/null and b/osrframework/static/img/osrframework-full.png differ diff --git a/osrframework/static/img/osrframework-normal.png b/osrframework/static/img/osrframework-normal.png new file mode 100644 index 0000000..0e747ec Binary files /dev/null and b/osrframework/static/img/osrframework-normal.png differ diff --git a/osrframework/static/img/osrframework-tiny.png b/osrframework/static/img/osrframework-tiny.png new file mode 100644 index 0000000..14da7a3 Binary files /dev/null and b/osrframework/static/img/osrframework-tiny.png differ diff --git a/osrframework/static/img/other.png b/osrframework/static/img/other.png new file mode 100644 index 0000000..e839726 Binary files /dev/null and b/osrframework/static/img/other.png differ diff --git a/osrframework/static/img/phone.png b/osrframework/static/img/phone.png new file mode 100644 index 0000000..e8b9e42 Binary files /dev/null and b/osrframework/static/img/phone.png differ diff --git a/osrframework/static/img/thanks.gif b/osrframework/static/img/thanks.gif new file mode 100644 index 0000000..c93e20a Binary files /dev/null and b/osrframework/static/img/thanks.gif differ diff --git a/osrframework/static/img/user.png b/osrframework/static/img/user.png new file mode 100644 index 0000000..71e1ebf Binary files /dev/null and b/osrframework/static/img/user.png differ diff --git a/osrframework/static/js/d3.3.5.5.min.js b/osrframework/static/js/d3.3.5.5.min.js new file mode 100644 index 0000000..34d5513 --- /dev/null +++ b/osrframework/static/js/d3.3.5.5.min.js @@ -0,0 +1,5 @@ +!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function r(n){return null===n?0/0:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function c(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function l(){this._=Object.create(null)}function s(n){return(n+="")===pa||n[0]===va?va+n:n}function f(n){return(n+="")[0]===va?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=da.length;r>e;++e){var u=da[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++ue;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function Z(n){return ya(n,Sa),n}function V(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t0&&(n=n.slice(0,a));var l=ka.get(n);return l&&(n=l,c=B),a?t?u:r:t?b:i}function $(n,t){return function(e){var r=ta.event;ta.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ta.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Aa,u="click"+r,i=ta.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ea&&(Ea="onselectstart"in e?!1:x(e.style,"userSelect")),Ea){var o=n(e).style,a=o[Ea];o[Ea]="none"}return function(n){if(i.on(r,null),Ea&&(o[Ea]=a),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Na){var i=t(n);if(i.scrollX||i.scrollY){r=ta.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();Na=!(o.f||o.e),r.remove()}}return Na?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}function G(){return ta.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nt(n){return n>1?0:-1>n?qa:Math.acos(n)}function tt(n){return n>1?Ra:-1>n?-Ra:Math.asin(n)}function et(n){return((n=Math.exp(n))-1/n)/2}function rt(n){return((n=Math.exp(n))+1/n)/2}function ut(n){return((n=Math.exp(2*n))-1)/(n+1)}function it(n){return(n=Math.sin(n/2))*n}function ot(){}function at(n,t,e){return this instanceof at?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof at?new at(n.h,n.s,n.l):bt(""+n,_t,at):new at(n,t,e)}function ct(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,new mt(u(n+120),u(n),u(n-120))}function lt(n,t,e){return this instanceof lt?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof lt?new lt(n.h,n.c,n.l):n instanceof ft?gt(n.l,n.a,n.b):gt((n=wt((n=ta.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new lt(n,t,e)}function st(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new ft(e,Math.cos(n*=Da)*t,Math.sin(n)*t)}function ft(n,t,e){return this instanceof ft?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof ft?new ft(n.l,n.a,n.b):n instanceof lt?st(n.h,n.c,n.l):wt((n=mt(n)).r,n.g,n.b):new ft(n,t,e)}function ht(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=pt(u)*Xa,r=pt(r)*$a,i=pt(i)*Ba,new mt(dt(3.2404542*u-1.5371385*r-.4985314*i),dt(-.969266*u+1.8760108*r+.041556*i),dt(.0556434*u-.2040259*r+1.0572252*i))}function gt(n,t,e){return n>0?new lt(Math.atan2(e,t)*Pa,Math.sqrt(t*t+e*e),n):new lt(0/0,0/0,n)}function pt(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function vt(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function dt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mt(n,t,e){return this instanceof mt?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mt?new mt(n.r,n.g,n.b):bt(""+n,mt,ct):new mt(n,t,e)}function yt(n){return new mt(n>>16,n>>8&255,255&n)}function Mt(n){return yt(n)+""}function xt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function bt(n,t,e){var r,u,i,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(n))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(kt(u[0]),kt(u[1]),kt(u[2]))}return(i=Ga.get(n.toLowerCase()))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&i)>>4,o=o>>4|o,a=240&i,a=a>>4|a,c=15&i,c=c<<4|c):7===n.length&&(o=(16711680&i)>>16,a=(65280&i)>>8,c=255&i)),t(o,a,c))}function _t(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),new at(r,u,c)}function wt(n,t,e){n=St(n),t=St(t),e=St(e);var r=vt((.4124564*n+.3575761*t+.1804375*e)/Xa),u=vt((.2126729*n+.7151522*t+.072175*e)/$a),i=vt((.0193339*n+.119192*t+.9503041*e)/Ba);return ft(116*u-16,500*(r-u),200*(u-i))}function St(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function kt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function Et(n){return"function"==typeof n?n:function(){return n}}function At(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Nt(t,e,n,r)}}function Nt(n,t,e,r){function u(){var n,t=c.status;if(!t&&zt(c)||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return void o.error.call(i,r)}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=ta.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,l=null;return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=ta.event;ta.event=n;try{o.progress.call(i,c)}finally{ta.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(l=n,i):l},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ra(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var s in a)c.setRequestHeader(s,a[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},ta.rebind(i,o,"on"),null==r?i:i.get(Ct(r))}function Ct(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function zt(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qt(){var n=Lt(),t=Tt()-n;t>24?(isFinite(t)&&(clearTimeout(tc),tc=setTimeout(qt,t)),nc=0):(nc=1,rc(qt))}function Lt(){var n=Date.now();for(ec=Ka;ec;)n>=ec.t&&(ec.f=ec.c(n-ec.t)),ec=ec.n;return n}function Tt(){for(var n,t=Ka,e=1/0;t;)t.f?t=n?n.n=t.n:Ka=t.n:(t.t8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Pt(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],o=0,a=r[0],c=0;u>0&&a>0&&(c+a+1>t&&(a=Math.max(1,t-c)),i.push(n.substring(u-=a,u+a)),!((c+=a+1)>t));)a=r[o=(o+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=ic.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",c=e[4]||"",l=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===o)&&(l=r="0",o="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=oc.get(g)||Ut;var M=l&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>p){var c=ta.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!l&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===o?u+n+k:">"===o?k+u+n:"^"===o?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Ut(n){return n+""}function jt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ft(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new cc(e-1)),1),e}function i(n,e){return t(n=new cc(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{cc=jt;var r=new jt;return r._=n,o(r,t,e)}finally{cc=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Ht(n);return c.floor=c,c.round=Ht(r),c.ceil=Ht(u),c.offset=Ht(i),c.range=a,n}function Ht(n){return function(t,e){try{cc=jt;var r=new jt;return r._=t,n(r,e)._}finally{cc=Date}}}function Ot(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++aa;){if(r>=l)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=C[o in sc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.slice(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,N.c.toString(),t,r)}function c(n,t,r){return e(n,N.x.toString(),t,r)}function l(n,t,r){return e(n,N.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{cc=jt;var t=new cc;return t._=n,r(t)}finally{cc=Date}}var r=t(n);return e.parse=function(n){try{cc=jt;var t=r.parse(n);return t&&t._}finally{cc=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ae;var M=ta.map(),x=Yt(v),b=Zt(v),_=Yt(d),w=Zt(d),S=Yt(m),k=Zt(m),E=Yt(y),A=Zt(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var N={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return It(n.getDate(),t,2)},e:function(n,t){return It(n.getDate(),t,2)},H:function(n,t){return It(n.getHours(),t,2)},I:function(n,t){return It(n.getHours()%12||12,t,2)},j:function(n,t){return It(1+ac.dayOfYear(n),t,3)},L:function(n,t){return It(n.getMilliseconds(),t,3)},m:function(n,t){return It(n.getMonth()+1,t,2)},M:function(n,t){return It(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return It(n.getSeconds(),t,2)},U:function(n,t){return It(ac.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return It(ac.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return It(n.getFullYear()%100,t,2)},Y:function(n,t){return It(n.getFullYear()%1e4,t,4)},Z:ie,"%":function(){return"%"}},C={a:r,A:u,b:i,B:o,c:a,d:Qt,e:Qt,H:te,I:te,j:ne,L:ue,m:Kt,M:ee,p:s,S:re,U:Xt,w:Vt,W:$t,x:c,X:l,y:Wt,Y:Bt,Z:Jt,"%":oe};return t}function It(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Yt(n){return new RegExp("^(?:"+n.map(ta.requote).join("|")+")","i")}function Zt(n){for(var t=new l,e=-1,r=n.length;++e68?1900:2e3)}function Kt(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function Qt(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function ne(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function te(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ee(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function re(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ue(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ie(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=ga(t)/60|0,u=ga(t)%60;return e+It(r,"0",2)+It(u,"0",2)}function oe(n,t,e){hc.lastIndex=0;var r=hc.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ae(n){for(var t=n.length,e=-1;++e=0?1:-1,a=o*e,c=Math.cos(t),l=Math.sin(t),s=i*l,f=u*c+s*Math.cos(a),h=s*o*Math.sin(a);yc.add(Math.atan2(h,f)),r=n,u=c,i=l}var t,e,r,u,i;Mc.point=function(o,a){Mc.point=n,r=(t=o)*Da,u=Math.cos(a=(e=a)*Da/2+qa/4),i=Math.sin(a)},Mc.lineEnd=function(){n(t,e)}}function pe(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function ve(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function de(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function me(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function ye(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function Me(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function xe(n){return[Math.atan2(n[1],n[0]),tt(n[2])]}function be(n,t){return ga(n[0]-t[0])a;++a)u.point((e=n[a])[0],e[1]);return void u.lineEnd()}var c=new qe(e,n,null,!0),l=new qe(e,null,c,!1);c.o=l,i.push(c),o.push(l),c=new qe(r,n,null,!1),l=new qe(r,null,c,!0),c.o=l,i.push(c),o.push(l)}}),o.sort(t),ze(i),ze(o),i.length){for(var a=0,c=e,l=o.length;l>a;++a)o[a].e=c=!c;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,l=s.length;l>a;++a)u.point((f=s[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var a=s.length-1;a>=0;--a)u.point((f=s[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function ze(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r0){for(b||(i.polygonStart(),b=!0),i.lineStart();++o1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Te))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:l,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=l,g=ta.merge(g);var n=Fe(m,p);g.length?(b||(i.polygonStart(),b=!0),Ce(g,De,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Re(),x=t(M),b=!1;return y}}function Te(n){return n.length>1}function Re(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function De(n,t){return((n=n.x)[0]<0?n[1]-Ra-Ca:Ra-n[1])-((t=t.x)[0]<0?t[1]-Ra-Ca:Ra-t[1])}function Pe(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?qa:-qa,c=ga(i-e);ga(c-qa)0?Ra:-Ra),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=qa&&(ga(e-u)Ca?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function je(n,t,e,r){var u;if(null==n)u=e*Ra,r.point(-qa,u),r.point(0,u),r.point(qa,u),r.point(qa,0),r.point(qa,-u),r.point(0,-u),r.point(-qa,-u),r.point(-qa,0),r.point(-qa,u);else if(ga(n[0]-t[0])>Ca){var i=n[0]a;++a){var l=t[a],s=l.length;if(s)for(var f=l[0],h=f[0],g=f[1]/2+qa/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=l[d];var m=n[0],y=n[1]/2+qa/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>qa,k=p*M;if(yc.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*La:b,S^h>=e^m>=e){var E=de(pe(f),pe(n));Me(E);var A=de(u,E);Me(A);var N=(S^b>=0?-1:1)*tt(A[2]);(r>N||r===N&&(E[0]||E[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Ca>i||Ca>i&&0>yc)^1&o}function He(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,c,l,s;return{lineStart:function(){l=c=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?qa:-qa),h):0;if(!e&&(l=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(be(e,g)||be(p,g))&&(p[0]+=Ca,p[1]+=Ca,v=t(p[0],p[1]))),v!==c)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(s=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&be(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return s|(l&&c)<<1}}}function r(n,t,e){var r=pe(n),u=pe(t),o=[1,0,0],a=de(r,u),c=ve(a,a),l=a[0],s=c-l*l;if(!s)return!e&&n;var f=i*c/s,h=-i*l/s,g=de(o,a),p=ye(o,f),v=ye(a,h);me(p,v);var d=g,m=ve(p,d),y=ve(d,d),M=m*m-y*(ve(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=ye(d,(-m-x)/y);if(me(b,p),b=xe(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(_=w,w=S,S=_);var A=S-w,N=ga(A-qa)A;if(!N&&k>E&&(_=k,k=E,E=_),C?N?k+E>0^b[1]<(ga(b[0]-w)qa^(w<=b[0]&&b[0]<=S)){var z=ye(d,(-m+x)/y);return me(z,p),[b,xe(z)]}}}function u(t,e){var r=o?n:qa-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=ga(i)>Ca,c=gr(n,6*Da);return Le(t,e,c,o?[0,-n]:[-qa,n-qa])}function Oe(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,l=o.y,s=a.x,f=a.y,h=0,g=1,p=s-c,v=f-l;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-l,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-l,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:l+h*v}),1>g&&(u.b={x:c+g*p,y:l+g*v}),u}}}}}}function Ie(n,t,e,r){function u(r,u){return ga(r[0]-n)0?0:3:ga(r[0]-e)0?2:1:ga(r[1]-t)0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,l=a[0];c>o;++o)i=a[o],l[1]<=r?i[1]>r&&Q(l,i,n)>0&&++t:i[1]<=r&&Q(l,i,n)<0&&--t,l=i;return 0!==t}function l(i,a,c,l){var s=0,f=0;if(null==i||(s=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do l.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+c+4)%4)!==f)}else l.point(a[0],a[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&a.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=0/0}function g(){v&&(p(y,M),x&&w&&A.rejoin(),v.push(A.buffer())),C.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Tc,Math.min(Tc,n)),t=Math.max(-Tc,Math.min(Tc,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};N(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,E=a,A=Re(),N=Oe(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=ta.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),l(null,null,1,a),a.lineEnd()),u&&Ce(v,i,t,l,a),a.polygonEnd()),v=d=m=null}};return C}}function Ye(n){var t=0,e=qa/3,r=ir(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*qa/180,e=n[1]*qa/180):[t/qa*180,e/qa*180]},u}function Ze(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,tt((i-(n*n+e*e)*u*u)/(2*u))]},e}function Ve(){function n(n,t){Dc+=u*n-r*t,r=n,u=t}var t,e,r,u;Hc.point=function(i,o){Hc.point=n,t=r=i,e=u=o},Hc.lineEnd=function(){n(t,e)}}function Xe(n,t){Pc>n&&(Pc=n),n>jc&&(jc=n),Uc>t&&(Uc=t),t>Fc&&(Fc=t)}function $e(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=Be(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=Be(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Be(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function We(n,t){_c+=n,wc+=t,++Sc}function Je(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);kc+=o*(t+n)/2,Ec+=o*(e+r)/2,Ac+=o,We(t=n,e=r)}var t,e;Ic.point=function(r,u){Ic.point=n,We(t=r,e=u)}}function Ge(){Ic.point=We}function Ke(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);kc+=o*(r+n)/2,Ec+=o*(u+t)/2,Ac+=o,o=u*n-r*t,Nc+=o*(r+n),Cc+=o*(u+t),zc+=3*o,We(r=n,u=t)}var t,e,r,u;Ic.point=function(i,o){Ic.point=n,We(t=r=i,e=u=o)},Ic.lineEnd=function(){n(t,e)}}function Qe(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,La)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:b};return a}function nr(n){function t(n){return(a?r:e)(n)}function e(t){return rr(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=0/0,S.point=i,t.lineStart()}function i(e,r){var i=pe([e,r]),o=n(e,r);u(M,x,y,b,_,w,M=o[0],x=o[1],y=e,b=i[0],_=i[1],w=i[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=l,S.lineEnd=s}function l(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c +},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,l,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=a+g,_=c+p,w=l+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),E=ga(ga(w)-1)i||ga((y*z+M*q)/x-.5)>.3||o>a*g+c*p+l*v)&&(u(t,e,r,a,c,l,N,C,E,b/=S,_/=S,w,d,m),m.point(N,C),u(N,C,E,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Da),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function tr(n){var t=nr(function(t,e){return n([t*Pa,e*Pa])});return function(n){return or(t(n))}}function er(n){this.stream=n}function rr(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ur(n){return ir(function(){return n})()}function ir(n){function t(n){return n=a(n[0]*Da,n[1]*Da),[n[0]*h+c,l-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(l-n[1])/h),n&&[n[0]*Pa,n[1]*Pa]}function r(){a=Ae(o=lr(m,M,x),i);var n=i(v,d);return c=g-n[0]*h,l=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,o,a,c,l,s,f=nr(function(n,t){return n=i(n,t),[n[0]*h+c,l-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Lc,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=or(b(o,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Lc):He((w=+n)*Da),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Ie(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Da,d=n[1]%360*Da,r()):[v*Pa,d*Pa]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Da,M=n[1]%360*Da,x=n.length>2?n[2]%360*Da:0,r()):[m*Pa,M*Pa,x*Pa]},ta.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function or(n){return rr(n,function(t,e){n.point(t*Da,e*Da)})}function ar(n,t){return[n,t]}function cr(n,t){return[n>qa?n-La:-qa>n?n+La:n,t]}function lr(n,t,e){return n?t||e?Ae(fr(n),hr(t,e)):fr(n):t||e?hr(t,e):cr}function sr(n){return function(t,e){return t+=n,[t>qa?t-La:-qa>t?t+La:t,e]}}function fr(n){var t=sr(n);return t.invert=sr(-n),t}function hr(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*r+a*u;return[Math.atan2(c*i-s*o,a*r-l*u),tt(s*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*i-c*o;return[Math.atan2(c*i+l*o,a*r+s*u),tt(s*r-a*u)]},e}function gr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=pr(e,u),i=pr(e,i),(o>0?i>u:u>i)&&(u+=o*La)):(u=n+o*La,i=n-.5*c);for(var l,s=u;o>0?s>i:i>s;s-=c)a.point((l=xe([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],l[1])}}function pr(n,t){var e=pe(t);e[0]-=n,Me(e);var r=nt(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Ca)%(2*Math.PI)}function vr(n,t,e){var r=ta.range(n,t-Ca,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function dr(n,t,e){var r=ta.range(n,t-Ca,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function mr(n){return n.source}function yr(n){return n.target}function Mr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),l=u*Math.sin(n),s=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(it(r-t)+u*o*it(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*s,u=e*l+t*f,o=e*i+t*a;return[Math.atan2(u,r)*Pa,Math.atan2(o,Math.sqrt(r*r+u*u))*Pa]}:function(){return[n*Pa,t*Pa]};return p.distance=h,p}function xr(){function n(n,u){var i=Math.sin(u*=Da),o=Math.cos(u),a=ga((n*=Da)-t),c=Math.cos(a);Yc+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;Zc.point=function(u,i){t=u*Da,e=Math.sin(i*=Da),r=Math.cos(i),Zc.point=n},Zc.lineEnd=function(){Zc.point=Zc.lineEnd=b}}function br(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function _r(n,t){function e(n,t){o>0?-Ra+Ca>t&&(t=-Ra+Ca):t>Ra-Ca&&(t=Ra-Ca);var e=o/Math.pow(u(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(qa/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),o=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=o-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-Ra]},e):Sr}function wr(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return ga(u)u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function zr(n,t){return n[0]-t[0]||n[1]-t[1]}function qr(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Lr(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],l=e[1],s=t[1]-c,f=r[1]-l,h=(a*(c-l)-f*(u-i))/(f*o-a*s);return[u+h*o,c+h*s]}function Tr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Rr(){tu(this),this.edge=this.site=this.circle=null}function Dr(n){var t=el.pop()||new Rr;return t.site=n,t}function Pr(n){Xr(n),Qc.remove(n),el.push(n),tu(n)}function Ur(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];Pr(n);for(var c=i;c.circle&&ga(e-c.circle.x)s;++s)l=a[s],c=a[s-1],Kr(l.edge,c.site,l.site,u);c=a[0],l=a[f-1],l.edge=Jr(c.site,l.site,null,u),Vr(c),Vr(l)}function jr(n){for(var t,e,r,u,i=n.x,o=n.y,a=Qc._;a;)if(r=Fr(a,o)-i,r>Ca)a=a.L;else{if(u=i-Hr(a,o),!(u>Ca)){r>-Ca?(t=a.P,e=a):u>-Ca?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Dr(n);if(Qc.insert(t,c),t||e){if(t===e)return Xr(t),e=Dr(t.site),Qc.insert(c,e),c.edge=e.edge=Jr(t.site,c.site),Vr(t),void Vr(e);if(!e)return void(c.edge=Jr(t.site,c.site));Xr(t),Xr(e);var l=t.site,s=l.x,f=l.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};Kr(e.edge,l,p,x),c.edge=Jr(l,n,null,x),e.edge=Jr(n,p,null,x),Vr(t),Vr(e)}}function Fr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,l=c-t;if(!l)return a;var s=a-r,f=1/i-1/l,h=s/l;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*l)-c+l/2+u-i/2)))/f+r:(r+a)/2}function Hr(n,t){var e=n.N;if(e)return Fr(e,t);var r=n.site;return r.y===t?r.x:1/0}function Or(n){this.site=n,this.edges=[]}function Ir(n){for(var t,e,r,u,i,o,a,c,l,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=Kc,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)s=a[o].end(),r=s.x,u=s.y,l=a[++o%c].start(),t=l.x,e=l.y,(ga(r-t)>Ca||ga(u-e)>Ca)&&(a.splice(o,0,new Qr(Gr(i.site,s,ga(r-f)Ca?{x:f,y:ga(t-f)Ca?{x:ga(e-p)Ca?{x:h,y:ga(t-h)Ca?{x:ga(e-g)=-za)){var g=c*c+l*l,p=s*s+f*f,v=(f*g-l*p)/h,d=(c*p-s*g)/h,f=d+a,m=rl.pop()||new Zr;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=tl._;M;)if(m.yd||d>=a)return;if(h>p){if(i){if(i.y>=l)return}else i={x:d,y:c};e={x:d,y:l}}else{if(i){if(i.yr||r>1)if(h>p){if(i){if(i.y>=l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else{if(i){if(i.yg){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.xi||f>o||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(c>m){var y=Math.sqrt(c=m);r=t-y,u=e-y,i=t+y,o=e+y,a=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:l(n,s,f,x,b);break;case 1:l(n,x,f,h,b);break;case 2:l(n,s,b,x,g);break;case 3:l(n,x,b,h,g)}}}(n,r,u,i,o),a}function gu(n,t){n=ta.rgb(n),t=ta.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,o=t.g-r,a=t.b-u;return function(n){return"#"+xt(Math.round(e+i*n))+xt(Math.round(r+o*n))+xt(Math.round(u+a*n))}}function pu(n,t){var e,r={},u={};for(e in n)e in t?r[e]=mu(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function vu(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function du(n,t){var e,r,u,i=il.lastIndex=ol.lastIndex=0,o=-1,a=[],c=[];for(n+="",t+="";(e=il.exec(n))&&(r=ol.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),a[o]?a[o]+=u:a[++o]=u),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:vu(e,r)})),i=ol.lastIndex;return ir;++r)a[(e=c[r]).i]=e.x(n);return a.join("")})}function mu(n,t){for(var e,r=ta.interpolators.length;--r>=0&&!(e=ta.interpolators[r](n,t)););return e}function yu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(mu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function Mu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function xu(n){return function(t){return 1-n(1-t)}}function bu(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function _u(n){return n*n}function wu(n){return n*n*n}function Su(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function ku(n){return function(t){return Math.pow(t,n)}}function Eu(n){return 1-Math.cos(n*Ra)}function Au(n){return Math.pow(2,10*(n-1))}function Nu(n){return 1-Math.sqrt(1-n*n)}function Cu(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/La*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*La/t)}}function zu(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function qu(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Lu(n,t){n=ta.hcl(n),t=ta.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return st(e+i*n,r+o*n,u+a*n)+""}}function Tu(n,t){n=ta.hsl(n),t=ta.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return ct(e+i*n,r+o*n,u+a*n)+""}}function Ru(n,t){n=ta.lab(n),t=ta.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ht(e+i*n,r+o*n,u+a*n)+""}}function Du(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Pu(n){var t=[n.a,n.b],e=[n.c,n.d],r=ju(t),u=Uu(t,e),i=ju(Fu(e,t,-u))||0;t[0]*e[1]180?s+=360:s-l>180&&(l+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:vu(l,s)})):s&&r.push(r.pop()+"rotate("+s+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:vu(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:vu(g[0],p[0])},{i:e-2,x:vu(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++i=0;)e.push(u[r])}function Qu(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,o=-1;++oe;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function si(n){return n.reduce(fi,0)}function fi(n,t){return n+t[1]}function hi(n,t){return gi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function gi(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function pi(n){return[ta.min(n),ta.max(n)]}function vi(n,t){return n.value-t.value}function di(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function mi(n,t){n._pack_next=t,t._pack_prev=n}function yi(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Mi(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(l=e.length)){var e,r,u,i,o,a,c,l,s=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(xi),r=e[0],r.x=-r.r,r.y=0,t(r),l>1&&(u=e[1],u.x=u.r,u.y=0,t(u),l>2))for(i=e[2],wi(r,u,i),t(i),di(r,i),r._pack_prev=i,di(i,u),u=r._pack_next,o=3;l>o;o++){wi(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(yi(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!yi(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.ro;o++)i=e[o],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(bi)}}function xi(n){n._pack_next=n._pack_prev=n}function bi(n){delete n._pack_next,delete n._pack_prev}function _i(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++i=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Ci(n,t,e){return n.a.parent===t.parent?n.a:e}function zi(n){return 1+ta.max(n,function(n){return n.y})}function qi(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Li(n){var t=n.children;return t&&t.length?Li(t[0]):n}function Ti(n){var t,e=n.children;return e&&(t=e.length)?Ti(e[t-1]):n}function Ri(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Di(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Pi(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Ui(n){return n.rangeExtent?n.rangeExtent():Pi(n.range())}function ji(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Fi(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Hi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:ml}function Oi(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]2?Oi:ji,c=r?Iu:Ou;return o=u(n,t,c,e),a=u(t,n,c,mu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Du)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Xi(n,t)},i.tickFormat=function(t,e){return $i(n,t,e)},i.nice=function(t){return Zi(n,t),u()},i.copy=function(){return Ii(n,t,e,r)},u()}function Yi(n,t){return ta.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Zi(n,t){return Fi(n,Hi(Vi(n,t)[2]))}function Vi(n,t){null==t&&(t=10);var e=Pi(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Xi(n,t){return ta.range.apply(ta,Vi(n,t))}function $i(n,t,e){var r=Vi(n,t);if(e){var u=ic.exec(e);if(u.shift(),"s"===u[8]){var i=ta.formatPrefix(Math.max(ga(r[0]),ga(r[1])));return u[7]||(u[7]="."+Bi(i.scale(r[2]))),u[8]="f",e=ta.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+Wi(u[8],r)),e=u.join("")}else e=",."+Bi(r[2])+"f";return ta.format(e)}function Bi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Wi(n,t){var e=Bi(t[2]);return n in yl?Math.abs(e-Bi(Math.max(ga(t[0]),ga(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Ji(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Fi(r.map(u),e?Math:xl);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=Pi(r),o=[],a=n[0],c=n[1],l=Math.floor(u(a)),s=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(s-l)){if(e){for(;s>l;l++)for(var h=1;f>h;h++)o.push(i(l)*h);o.push(i(l))}else for(o.push(i(l));l++0;h--)o.push(i(l)*h);for(l=0;o[l]c;s--);o=o.slice(l,s)}return o},o.tickFormat=function(n,t){if(!arguments.length)return Ml;arguments.length<2?t=Ml:"function"!=typeof t&&(t=ta.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return Ji(n.copy(),t,e,r)},Yi(o,n)}function Gi(n,t,e){function r(t){return n(u(t))}var u=Ki(t),i=Ki(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Xi(e,n)},r.tickFormat=function(n,t){return $i(e,n,t)},r.nice=function(n){return r.domain(Zi(e,n))},r.exponent=function(o){return arguments.length?(u=Ki(t=o),i=Ki(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return Gi(n.copy(),t,e)},Yi(r,n)}function Ki(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function Qi(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):0/0))-1)%i.length]}function r(t,e){return ta.range(n.length).map(function(n){return t+e*n})}var u,i,o;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new l;for(var i,o=-1,a=r.length;++oe?[0/0,0/0]:[e>0?a[e-1]:n[0],et?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return to(n,t,e)},u()}function eo(n,t){function e(e){return e>=e?t[ta.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return eo(n,t)},e}function ro(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Xi(n,t)},t.tickFormat=function(t,e){return $i(n,t,e)},t.copy=function(){return ro(n)},t}function uo(){return 0}function io(n){return n.innerRadius}function oo(n){return n.outerRadius}function ao(n){return n.startAngle}function co(n){return n.endAngle}function lo(n){return n&&n.padAngle}function so(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function fo(n,t,e,r,u){var i=n[0]-t[0],o=n[1]-t[1],a=(u?r:-r)/Math.sqrt(i*i+o*o),c=a*o,l=-a*i,s=n[0]+c,f=n[1]+l,h=t[0]+c,g=t[1]+l,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(M*M*y-x*x),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,E=_-p,A=w-v,N=S-p,C=k-v;return E*E+A*A>N*N+C*C&&(_=S,w=k),[[_-c,w-l],[_*e/M,w*e/M]]}function ho(n){function t(t){function o(){l.push("M",i(n(s),a))}for(var c,l=[],s=[],f=-1,h=t.length,g=Et(e),p=Et(r);++f1&&u.push("H",r[0]),u.join("")}function mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var l=2;l9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function To(n){return n.length<3?go(n):n[0]+_o(n,Lo(n))}function Ro(n){for(var t,e,r,u=-1,i=n.length;++ur)return s();var u=i[i.active];u&&(--i.count,delete i[i.active],u.event&&u.event.interrupt.call(n,n.__data__,u.index)),i.active=r,o.event&&o.event.start.call(n,n.__data__,t),o.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&v.push(r)}),h=o.ease,f=o.duration,ta.timer(function(){return p.c=l(e||1)?Ne:l,1},0,a)}function l(e){if(i.active!==r)return 1;for(var u=e/f,a=h(u),c=v.length;c>0;)v[--c].call(n,a);return u>=1?(o.event&&o.event.end.call(n,n.__data__,t),s()):void 0}function s(){return--i.count?delete i[r]:delete n[e],1}var f,h,g=o.delay,p=ec,v=[];return p.t=g+a,u>=g?c(u-g):void(p.c=c)},0,a)}}function Bo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function Wo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function Jo(n){return n.toISOString()}function Go(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=ta.bisect(Vl,u);return i==Vl.length?[t.year,Vi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Vl[i-1]1?{floor:function(t){for(;e(t=n.floor(t));)t=Ko(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Ko(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Pi(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Ko(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Go(n.copy(),t,e)},Yi(r,n)}function Ko(n){return new Date(n)}function Qo(n){return JSON.parse(n.responseText)}function na(n){var t=ua.createRange();return t.selectNode(ua.body),t.createContextualFragment(n.responseText)}var ta={version:"3.5.5"},ea=[].slice,ra=function(n){return ea.call(n)},ua=this.document;if(ua)try{ra(ua.documentElement.childNodes)[0].nodeType}catch(ia){ra=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),ua)try{ua.createElement("DIV").style.setProperty("opacity",0,"")}catch(oa){var aa=this.Element.prototype,ca=aa.setAttribute,la=aa.setAttributeNS,sa=this.CSSStyleDeclaration.prototype,fa=sa.setProperty;aa.setAttribute=function(n,t){ca.call(this,n,t+"")},aa.setAttributeNS=function(n,t,e){la.call(this,n,t,e+"")},sa.setProperty=function(n,t,e){fa.call(this,n,t+"",e)}}ta.ascending=e,ta.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},ta.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u=r){e=r;break}for(;++ur&&(e=r)}else{for(;++u=r){e=r;break}for(;++ur&&(e=r)}return e},ta.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u=r){e=r;break}for(;++ue&&(e=r)}else{for(;++u=r){e=r;break}for(;++ue&&(e=r)}return e},ta.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i=r){e=u=r;break}for(;++ir&&(e=r),r>u&&(u=r))}else{for(;++i=r){e=u=r;break}for(;++ir&&(e=r),r>u&&(u=r))}return[e,u]},ta.sum=function(n,t){var e,r=0,i=n.length,o=-1;if(1===arguments.length)for(;++o1?c/(s-1):void 0},ta.deviation=function(){var n=ta.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ha=i(e);ta.bisectLeft=ha.left,ta.bisect=ta.bisectRight=ha.right,ta.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},ta.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},ta.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ta.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},ta.zip=function(){if(!(r=arguments.length))return[];for(var n=-1,t=ta.min(arguments,o),e=new Array(t);++n=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var ga=Math.abs;ta.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=a(ga(e)),o=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++o)>t;)u.push(r/i);else for(;(r=n+e*++o)=i.length)return r?r.call(u,o):e?o.sort(e):o;for(var c,s,f,h,g=-1,p=o.length,v=i[a++],d=new l;++g=i.length)return n;var r=[],u=o[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],o=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(ta.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return o[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},ta.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},c(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),ta.behavior={},ta.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ta.event=null,ta.requote=function(n){return n.replace(ma,"\\$&")};var ma=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ya={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},Ma=function(n,t){return t.querySelector(n)},xa=function(n,t){return t.querySelectorAll(n)},ba=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(ba=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(Ma=function(n,t){return Sizzle(n,t)[0]||null},xa=Sizzle,ba=Sizzle.matchesSelector),ta.selection=function(){return ta.select(ua.documentElement)};var _a=ta.selection.prototype=[];_a.select=function(n){var t,e,r,u,i=[];n=N(n);for(var o=-1,a=this.length;++o=0&&(e=n.slice(0,t),n=n.slice(t+1)),wa.hasOwnProperty(e)?{space:wa[e],local:n}:n}},_a.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ta.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},_a.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++uu){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},_a.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},_a.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},_a.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},_a.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},_a.insert=function(n,t){return n=j(n),t=N(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},_a.remove=function(){return this.each(F)},_a.data=function(n,t){function e(n,e){var r,u,i,o=n.length,f=e.length,h=Math.min(o,f),g=new Array(f),p=new Array(f),v=new Array(o);if(t){var d,m=new l,y=new Array(o);for(r=-1;++rr;++r)p[r]=H(e[r]);for(;o>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,a.push(p),c.push(g),s.push(v)}var r,u,i=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++ii;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return A(u)},_a.order=function(){for(var n=-1,t=this.length;++n=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},_a.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++tn;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},_a.size=function(){var n=0;return Y(this,function(){++n}),n};var Sa=[];ta.selection.enter=Z,ta.selection.enter.prototype=Sa,Sa.append=_a.append,Sa.empty=_a.empty,Sa.node=_a.node,Sa.call=_a.call,Sa.size=_a.size,Sa.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++ar){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var ka=ta.map({mouseenter:"mouseover",mouseleave:"mouseout"});ua&&ka.forEach(function(n){"on"+n in ua&&ka.remove(n)});var Ea,Aa=0;ta.mouse=function(n){return J(n,k())};var Na=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;ta.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},ta.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",o)}function e(n,t,e,i,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:n,dy:e}))}function c(){t(h,v)&&(m.on(i+d,null).on(o+d,null),y(p&&ta.event.target===f),g({type:"dragend"}))}var l,s=this,f=ta.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=ta.select(e(f)).on(i+d,a).on(o+d,c),y=W(f),M=t(h,v);u?(l=u.apply(s,arguments),l=[l.x-M[0],l.y-M[1]]):l=[0,0],g({type:"dragstart"})}}var r=E(n,"drag","dragstart","dragend"),u=null,i=e(b,ta.mouse,t,"mousemove","mouseup"),o=e(G,ta.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},ta.rebind(n,r,"on")},ta.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ra(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Ca=1e-6,za=Ca*Ca,qa=Math.PI,La=2*qa,Ta=La-Ca,Ra=qa/2,Da=qa/180,Pa=180/qa,Ua=Math.SQRT2,ja=2,Fa=4;ta.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=rt(v),o=i/(ja*h)*(e*ut(Ua*t+v)-et(v));return[r+o*l,u+o*s,i*e/rt(Ua*t+v)]}return[r+n*l,u+n*s,i*Math.exp(Ua*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],l=o-r,s=a-u,f=l*l+s*s,h=Math.sqrt(f),g=(c*c-i*i+Fa*f)/(2*i*ja*h),p=(c*c-i*i-Fa*f)/(2*c*ja*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/Ua;return e.duration=1e3*y,e},ta.behavior.zoom=function(){function n(n){n.on(q,f).on(Oa+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(N[0],Math.min(N[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function o(t,e,r,o){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,o)),i(d=e,r),t=ta.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function a(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function c(n){z++||n({type:"zoomstart"})}function l(n){a(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||n({type:"zoomend"}),d=null}function f(){function n(){f=1,i(ta.mouse(u),g),l(a)}function r(){h.on(L,null).on(T,null),p(f&&ta.event.target===o),s(a)}var u=this,o=ta.event.target,a=D.of(u,arguments),f=0,h=ta.select(t(u)).on(L,n).on(T,r),g=e(ta.mouse(u)),p=W(u);Dl.call(u),c(a)}function h(){function n(){var n=ta.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=ta.event.target;ta.select(t).on(x,r).on(b,a),_.push(t);for(var e=ta.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var c=n(),l=Date.now();if(1===c.length){if(500>l-M){var s=c[0];o(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=l}else if(c.length>1){var s=c[0],f=c[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,o=ta.touches(p);Dl.call(p);for(var a=0,c=o.length;c>a;++a,r=null)if(e=o[a],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),l(v)}function a(){if(ta.event.touches.length){for(var t=ta.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}ta.selectAll(_).on(y,null),w.on(q,f).on(R,h),E(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+ta.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=ta.select(p),E=W(p);t(),c(v),w.on(q,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(v=e(d=m||ta.mouse(this)),Dl.call(this),c(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*Ha())*k.k),i(d,v),l(n)}function p(){var n=ta.mouse(this),t=Math.log(k.k)/Math.LN2;o(this,n,e(n),ta.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},A=[960,500],N=Ia,C=250,z=0,q="mousedown.zoom",L="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=E(n,"zoomstart","zoom","zoomend");return Oa||(Oa="onwheel"in ua?(Ha=function(){return-ta.event.deltaY*(ta.event.deltaMode?120:1)},"wheel"):"onmousewheel"in ua?(Ha=function(){return ta.event.wheelDelta},"mousewheel"):(Ha=function(){return-ta.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Tl?ta.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},c(n)}).tween("zoom:zoom",function(){var e=A[0],r=A[1],u=d?d[0]:e/2,i=d?d[1]:r/2,o=ta.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:u-r[0]*a,y:i-r[1]*a,k:a},l(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,c(n),l(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},a(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:+t},a(),n):k.k},n.scaleExtent=function(t){return arguments.length?(N=null==t?Ia:[+t[0],+t[1]],n):N},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(A=t&&[+t[0],+t[1]],n):A},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},ta.rebind(n,D,"on")};var Ha,Oa,Ia=[0,1/0];ta.color=ot,ot.prototype.toString=function(){return this.rgb()+""},ta.hsl=at;var Ya=at.prototype=new ot;Ya.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,this.l/n)},Ya.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,n*this.l)},Ya.rgb=function(){return ct(this.h,this.s,this.l)},ta.hcl=lt;var Za=lt.prototype=new ot;Za.brighter=function(n){return new lt(this.h,this.c,Math.min(100,this.l+Va*(arguments.length?n:1)))},Za.darker=function(n){return new lt(this.h,this.c,Math.max(0,this.l-Va*(arguments.length?n:1)))},Za.rgb=function(){return st(this.h,this.c,this.l).rgb()},ta.lab=ft;var Va=18,Xa=.95047,$a=1,Ba=1.08883,Wa=ft.prototype=new ot;Wa.brighter=function(n){return new ft(Math.min(100,this.l+Va*(arguments.length?n:1)),this.a,this.b)},Wa.darker=function(n){return new ft(Math.max(0,this.l-Va*(arguments.length?n:1)),this.a,this.b)},Wa.rgb=function(){return ht(this.l,this.a,this.b)},ta.rgb=mt;var Ja=mt.prototype=new ot;Ja.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new mt(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mt(u,u,u)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mt(n*this.r,n*this.g,n*this.b)},Ja.hsl=function(){return _t(this.r,this.g,this.b)},Ja.toString=function(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)};var Ga=ta.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Ga.forEach(function(n,t){Ga.set(n,yt(t))}),ta.functor=Et,ta.xhr=At(y),ta.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=Nt(n,t,null==e?r:u(e),i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=l)return o;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++s;){var r=n.charCodeAt(s++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++a);else if(r!==c)continue;return n.slice(t,s-a)}return n.slice(t)}for(var r,u,i={},o={},a=[],l=n.length,s=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,f++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},ta.csv=ta.dsv(",","text/csv"),ta.tsv=ta.dsv(" ","text/tab-separated-values");var Ka,Qa,nc,tc,ec,rc=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};ta.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};Qa?Qa.n=i:Ka=i,Qa=i,nc||(tc=clearTimeout(tc),nc=1,rc(qt))},ta.timer.flush=function(){Lt(),Tt()},ta.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var uc=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Dt);ta.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=ta.round(n,Rt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),uc[8+e/3]};var ic=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,oc=ta.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ta.round(n,Rt(n,t))).toFixed(Math.max(0,Math.min(20,Rt(n*(1+1e-15),t))))}}),ac=ta.time={},cc=Date;jt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){lc.setUTCDate.apply(this._,arguments)},setDay:function(){lc.setUTCDay.apply(this._,arguments)},setFullYear:function(){lc.setUTCFullYear.apply(this._,arguments)},setHours:function(){lc.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){lc.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){lc.setUTCMinutes.apply(this._,arguments)},setMonth:function(){lc.setUTCMonth.apply(this._,arguments)},setSeconds:function(){lc.setUTCSeconds.apply(this._,arguments)},setTime:function(){lc.setTime.apply(this._,arguments)}};var lc=Date.prototype;ac.year=Ft(function(n){return n=ac.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),ac.years=ac.year.range,ac.years.utc=ac.year.utc.range,ac.day=Ft(function(n){var t=new cc(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),ac.days=ac.day.range,ac.days.utc=ac.day.utc.range,ac.dayOfYear=function(n){var t=ac.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=ac[n]=Ft(function(n){return(n=ac.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=ac.year(n).getDay();return Math.floor((ac.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});ac[n+"s"]=e.range,ac[n+"s"].utc=e.utc.range,ac[n+"OfYear"]=function(n){var e=ac.year(n).getDay();return Math.floor((ac.dayOfYear(n)+(e+t)%7)/7)}}),ac.week=ac.sunday,ac.weeks=ac.sunday.range,ac.weeks.utc=ac.sunday.utc.range,ac.weekOfYear=ac.sundayOfYear;var sc={"-":"",_:" ",0:"0"},fc=/^\s*\d+/,hc=/^%/;ta.locale=function(n){return{numberFormat:Pt(n),timeFormat:Ot(n)}};var gc=ta.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ta.format=gc.numberFormat,ta.geo={},ce.prototype={s:0,t:0,add:function(n){le(n,this.t,pc),le(pc.s,this.s,this),this.s?this.t+=pc.t:this.s=pc.t +},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var pc=new ce;ta.geo.stream=function(n,t){n&&vc.hasOwnProperty(n.type)?vc[n.type](n,t):se(n,t)};var vc={Feature:function(n,t){se(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++rn?4*qa+n:n,Mc.lineStart=Mc.lineEnd=Mc.point=b}};ta.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=pe([t*Da,e*Da]);if(m){var u=de(m,r),i=[u[1],-u[0],0],o=de(i,u);Me(o),o=xe(o);var c=t-p,l=c>0?1:-1,v=o[0]*Pa*l,d=ga(c)>180;if(d^(v>l*p&&l*t>v)){var y=o[1]*Pa;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>l*p&&l*t>v)){var y=-o[1]*Pa;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=ga(r)>180?r+(r>0?360:-360):r}else v=n,d=e;Mc.point(n,e),t(n,e)}function i(){Mc.lineStart()}function o(){u(v,d),Mc.lineEnd(),ga(y)>Ca&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function l(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nyc?(s=-(h=180),f=-(g=90)):y>Ca?g=90:-Ca>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],ta.geo.stream(n,b);var t=M.length;if(t){M.sort(c);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],l(e[0],u)||l(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,s=e[0],h=u[1])}return M=x=null,1/0===s||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[s,f],[h,g]]}}(),ta.geo.centroid=function(n){xc=bc=_c=wc=Sc=kc=Ec=Ac=Nc=Cc=zc=0,ta.geo.stream(n,qc);var t=Nc,e=Cc,r=zc,u=t*t+e*e+r*r;return za>u&&(t=kc,e=Ec,r=Ac,Ca>bc&&(t=_c,e=wc,r=Sc),u=t*t+e*e+r*r,za>u)?[0/0,0/0]:[Math.atan2(e,t)*Pa,tt(r/Math.sqrt(u))*Pa]};var xc,bc,_c,wc,Sc,kc,Ec,Ac,Nc,Cc,zc,qc={sphere:b,point:_e,lineStart:Se,lineEnd:ke,polygonStart:function(){qc.lineStart=Ee},polygonEnd:function(){qc.lineStart=Se}},Lc=Le(Ne,Pe,je,[-qa,-qa/2]),Tc=1e9;ta.geo.clipExtent=function(){var n,t,e,r,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=Ie(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ta.geo.conicEqualArea=function(){return Ye(Ze)}).raw=Ze,ta.geo.albers=function(){return ta.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ta.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,e(i,o),t||(r(i,o),t)||u(i,o),t}var t,e,r,u,i=ta.geo.albers(),o=ta.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ta.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?o:u>=.166&&.234>u&&r>=-.214&&-.115>r?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var l=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*l,f-.238*l],[s+.455*l,f+.238*l]]).stream(c).point,r=o.translate([s-.307*l,f+.201*l]).clipExtent([[s-.425*l+Ca,f+.12*l+Ca],[s-.214*l-Ca,f+.234*l-Ca]]).stream(c).point,u=a.translate([s-.205*l,f+.212*l]).clipExtent([[s-.214*l+Ca,f+.166*l+Ca],[s-.115*l-Ca,f+.234*l-Ca]]).stream(c).point,n},n.scale(1070)};var Rc,Dc,Pc,Uc,jc,Fc,Hc={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Dc=0,Hc.lineStart=Ve},polygonEnd:function(){Hc.lineStart=Hc.lineEnd=Hc.point=b,Rc+=ga(Dc/2)}},Oc={point:Xe,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Ic={point:We,lineStart:Je,lineEnd:Ge,polygonStart:function(){Ic.lineStart=Ke},polygonEnd:function(){Ic.point=We,Ic.lineStart=Je,Ic.lineEnd=Ge}};ta.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),ta.geo.stream(n,o)),i.result()}function t(){return o=null,n}var e,r,u,i,o,a=4.5;return n.area=function(n){return Rc=0,ta.geo.stream(n,u(Hc)),Rc},n.centroid=function(n){return _c=wc=Sc=kc=Ec=Ac=Nc=Cc=zc=0,ta.geo.stream(n,u(Ic)),zc?[Nc/zc,Cc/zc]:Ac?[kc/Ac,Ec/Ac]:Sc?[_c/Sc,wc/Sc]:[0/0,0/0]},n.bounds=function(n){return jc=Fc=-(Pc=Uc=1/0),ta.geo.stream(n,u(Oc)),[[Pc,Uc],[jc,Fc]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||tr(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new $e:new Qe(n),"function"!=typeof a&&i.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(ta.geo.albersUsa()).context(null)},ta.geo.transform=function(n){return{stream:function(t){var e=new er(t);for(var r in n)e[r]=n[r];return e}}},er.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ta.geo.projection=ur,ta.geo.projectionMutator=ir,(ta.geo.equirectangular=function(){return ur(ar)}).raw=ar.invert=ar,ta.geo.rotation=function(n){function t(t){return t=n(t[0]*Da,t[1]*Da),t[0]*=Pa,t[1]*=Pa,t}return n=lr(n[0]%360*Da,n[1]*Da,n.length>2?n[2]*Da:0),t.invert=function(t){return t=n.invert(t[0]*Da,t[1]*Da),t[0]*=Pa,t[1]*=Pa,t},t},cr.invert=ar,ta.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=lr(-n[0]*Da,-n[1]*Da,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Pa,n[1]*=Pa}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=gr((t=+r)*Da,u*Da),n):t},n.precision=function(r){return arguments.length?(e=gr(t*Da,(u=+r)*Da),n):u},n.angle(90)},ta.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Da,u=n[1]*Da,i=t[1]*Da,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),l=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*o)*e+(e=l*s-c*f*a)*e),c*s+l*f*a)},ta.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ta.range(Math.ceil(i/d)*d,u,d).map(h).concat(ta.range(Math.ceil(l/m)*m,c,m).map(g)).concat(ta.range(Math.ceil(r/p)*p,e,p).filter(function(n){return ga(n%d)>Ca}).map(s)).concat(ta.range(Math.ceil(a/v)*v,o,v).filter(function(n){return ga(n%m)>Ca}).map(f))}var e,r,u,i,o,a,c,l,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(l).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],l=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),l>c&&(t=l,l=c,c=t),n.precision(y)):[[i,l],[u,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=vr(a,o,90),f=dr(r,e,y),h=vr(l,c,90),g=dr(i,u,y),n):y},n.majorExtent([[-180,-90+Ca],[180,90-Ca]]).minorExtent([[-180,-80-Ca],[180,80+Ca]])},ta.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=mr,u=yr;return n.distance=function(){return ta.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},ta.geo.interpolate=function(n,t){return Mr(n[0]*Da,n[1]*Da,t[0]*Da,t[1]*Da)},ta.geo.length=function(n){return Yc=0,ta.geo.stream(n,Zc),Yc};var Yc,Zc={sphere:b,point:b,lineStart:xr,lineEnd:b,polygonStart:b,polygonEnd:b},Vc=br(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ta.geo.azimuthalEqualArea=function(){return ur(Vc)}).raw=Vc;var Xc=br(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(ta.geo.azimuthalEquidistant=function(){return ur(Xc)}).raw=Xc,(ta.geo.conicConformal=function(){return Ye(_r)}).raw=_r,(ta.geo.conicEquidistant=function(){return Ye(wr)}).raw=wr;var $c=br(function(n){return 1/n},Math.atan);(ta.geo.gnomonic=function(){return ur($c)}).raw=$c,Sr.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Ra]},(ta.geo.mercator=function(){return kr(Sr)}).raw=Sr;var Bc=br(function(){return 1},Math.asin);(ta.geo.orthographic=function(){return ur(Bc)}).raw=Bc;var Wc=br(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ta.geo.stereographic=function(){return ur(Wc)}).raw=Wc,Er.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Ra]},(ta.geo.transverseMercator=function(){var n=kr(Er),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Er,ta.geom={},ta.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=Et(e),i=Et(r),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(a.sort(zr),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var l=Cr(a),s=Cr(c),f=s[0]===l[0],h=s[s.length-1]===l[l.length-1],g=[];for(t=l.length-1;t>=0;--t)g.push(n[a[l[t]][2]]);for(t=+f;t=r&&l.x<=i&&l.y>=u&&l.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[];s.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Ca)*Ca,y:Math.round(o(n,t)/Ca)*Ca,i:t}})}var r=Ar,u=Nr,i=r,o=u,a=ul;return n?t(n):(t.links=function(n){return iu(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return iu(e(n)).cells.forEach(function(e,r){for(var u,i,o=e.site,a=e.edges.sort(Yr),c=-1,l=a.length,s=a[l-1].edge,f=s.l===o?s.r:s.l;++c=l,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=su()),f?u=l:a=l,h?o=s:c=s,i(n,t,e,r,u,o,a,c)}var s,f,h,g,p,v,d,m,y,M=Et(a),x=Et(c);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)s=n[g],s.xm&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=su();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){fu(n,k,v,d,m,y)},k.find=function(n){return hu(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=cl.get(e)||al,r=ll.get(r)||y,Mu(r(e.apply(null,ea.call(arguments,1))))},ta.interpolateHcl=Lu,ta.interpolateHsl=Tu,ta.interpolateLab=Ru,ta.interpolateRound=Du,ta.transform=function(n){var t=ua.createElementNS(ta.ns.prefix.svg,"g");return(ta.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Pu(e?e.matrix:sl)})(n)},Pu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var sl={a:1,b:0,c:0,d:1,e:0,f:0};ta.interpolateTransform=Hu,ta.layout={},ta.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++ea*a/d){if(p>c){var l=t.charge/c;n.px-=i*l,n.py-=o*l}return!0}if(t.point&&c&&p>c){var l=t.pointCharge/c;n.px-=i*l,n.py-=o*l}}return!t.charge}}function t(n){n.px=ta.event.x,n.py=ta.event.y,a.resume()}var e,r,u,i,o,a={},c=ta.dispatch("start","tick","end"),l=[1,1],s=.9,f=fl,h=hl,g=-30,p=gl,v=.1,d=.64,m=[],M=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,f,h,p,d,y,x,b=m.length,_=M.length;for(e=0;_>e;++e)a=M[e],f=a.source,h=a.target,y=h.x-f.x,x=h.y-f.y,(p=y*y+x*x)&&(p=r*i[e]*((p=Math.sqrt(p))-u[e])/p,y*=p,x*=p,h.x-=y*(d=f.weight/(h.weight+f.weight)),h.y-=x*d,f.x+=y*(d=1-d),f.y+=x*d);if((d=r*v)&&(y=l[0]/2,x=l[1]/2,e=-1,d))for(;++e0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),ta.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;s>a;++a){var u=M[a];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var i,o=e[t],a=-1,l=o.length;++at;++t)(r=m[t]).index=t,r.weight=0;for(t=0;s>t;++t)r=M[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",p)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof f)for(t=0;s>t;++t)u[t]=+f.call(this,M[t],t);else for(t=0;s>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;s>t;++t)i[t]=+h.call(this,M[t],t);else for(t=0;s>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,m[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=ta.behavior.drag().origin(y).on("dragstart.force",Xu).on("drag.force",t).on("dragend.force",$u)),arguments.length?void this.on("mouseover.force",Bu).on("mouseout.force",Wu).call(e):e},ta.rebind(a,c,"on")};var fl=20,hl=1,gl=1/0;ta.layout.hierarchy=function(){function n(u){var i,o=[u],a=[];for(u.depth=0;null!=(i=o.pop());)if(a.push(i),(l=e.call(n,i,i.depth))&&(c=l.length)){for(var c,l,s;--c>=0;)o.push(s=l[c]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=l}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return Qu(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),a}var t=ei,e=ni,r=ti;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Ku(t,function(n){n.children&&(n.value=0)}),Qu(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ta.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(o=i.length)){var o,a,c,l=-1;for(r=t.value?r/t.value:0;++lf?-1:1),p=(f-c*g)/ta.sum(l),v=ta.range(c),d=[];return null!=e&&v.sort(e===pl?function(n,t){return l[t]-l[n]}:function(n,t){return e(o[n],o[t])}),v.forEach(function(n){d[n]={data:o[n],value:a=l[n],startAngle:s,endAngle:s+=a*p+g,padAngle:h}}),d}var t=Number,e=pl,r=0,u=La,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var pl={};ta.layout.stack=function(){function n(a,c){if(!(h=a.length))return a;var l=a.map(function(e,r){return t.call(n,e,r)}),s=l.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),o.call(n,t,e)]})}),f=e.call(n,s,c);l=ta.permute(l,f),s=ta.permute(s,f);var h,g,p,v,d=r.call(n,s,c),m=l[0].length;for(p=0;m>p;++p)for(u.call(n,l[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,l[g][p],v+=s[g-1][p][1],s[g][p][1]);return a}var t=y,e=ai,r=ci,u=oi,i=ui,o=ii;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:vl.get(t)||ai,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:dl.get(t)||ci,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var vl=ta.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(li),i=n.map(si),o=ta.range(r).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,l=[],s=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=i[e],l.push(e)):(c+=i[e],s.push(e));return s.reverse().concat(l)},reverse:function(n){return ta.range(n.length).reverse()},"default":ai}),dl=ta.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,o=[],a=0,c=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;i>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,u,i,o,a,c,l,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=l=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,a=f[e][0]-f[e-1][0];s>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;i+=o*n[t][e][1]}g[e]=c-=u?i/u*a:0,l>c&&(l=c)}for(e=0;h>e;++e)g[e]-=l;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,o=1/u,a=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=o}for(e=0;i>e;++e)a[e]=0;return a},zero:ci});ta.layout.histogram=function(){function n(n,i){for(var o,a,c=[],l=n.map(e,this),s=r.call(this,l,i),f=u.call(this,s,l,i),i=-1,h=l.length,g=f.length-1,p=t?1:1/h;++i0)for(i=-1;++i=s[0]&&a<=s[1]&&(o=c[ta.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,e=Number,r=pi,u=hi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=Et(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return gi(n,t)}:Et(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ta.layout.pack=function(){function n(n,i){var o=e.call(this,n,i),a=o[0],c=u[0],l=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,Qu(a,function(n){n.r=+s(n.value)}),Qu(a,Mi),r){var f=r*(t?1:Math.max(2*a.r/c,2*a.r/l))/2;Qu(a,function(n){n.r+=f}),Qu(a,Mi),Qu(a,function(n){n.r-=f})}return _i(a,c/2,l/2,t?1:1/Math.max(2*a.r/c,2*a.r/l)),o}var t,e=ta.layout.hierarchy().sort(vi),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Gu(n,e)},ta.layout.tree=function(){function n(n,u){var s=o.call(this,n,u),f=s[0],h=t(f);if(Qu(h,e),h.parent.m=-h.z,Ku(h,r),l)Ku(f,i);else{var g=f,p=f,v=f;Ku(f,function(n){n.xp.x&&(p=n),n.depth>v.depth&&(v=n)});var d=a(g,p)/2-g.x,m=c[0]/(p.x+a(p,g)/2+d),y=c[1]/(v.depth||1);Ku(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,o=0,a=i.length;a>o;++o)r.push((i[o]=u={_:i[o],parent:t,children:(u=i[o].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Ni(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+a(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,o=t,c=u.parent.children[0],l=u.m,s=i.m,f=o.m,h=c.m;o=Ei(o),u=ki(u),o&&u;)c=ki(c),i=Ei(i),i.a=n,r=o.z+f-u.z-l+a(o._,u._),r>0&&(Ai(Ci(o,n,e),n,r),l+=r,s+=r),f+=o.m,l+=u.m,h+=c.m,s+=i.m;o&&!Ei(i)&&(i.t=o,i.m+=f-s),u&&!ki(c)&&(c.t=u,c.m+=l-h,e=n)}return e}function i(n){n.x*=c[0],n.y=n.depth*c[1]}var o=ta.layout.hierarchy().sort(null).value(null),a=Si,c=[1,1],l=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(l=null==(c=t)?i:null,n):l?null:c},n.nodeSize=function(t){return arguments.length?(l=null==(c=t)?null:i,n):l?c:null},Gu(n,o)},ta.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],l=0;Qu(c,function(n){var t=n.children;t&&t.length?(n.x=qi(t),n.y=zi(t)):(n.x=o?l+=e(n,o):0,n.y=0,o=n)});var s=Li(c),f=Ti(c),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return Qu(c,u?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=ta.layout.hierarchy().sort(null).value(null),e=Si,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Gu(n,t)},ta.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++ut?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var o,a,c,l=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?l.dx:"dice"===g?l.dy:"slice-dice"===g?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(n(h,l.dx*l.dy/e.value),s.area=0;(c=h.length)>0;)s.push(o=h[c-1]),s.area+=o.area,"squarify"!==g||(a=r(s,v))<=p?(h.pop(),p=a):(s.area-=s.pop().area,u(s,v,l,!1),v=Math.min(l.dx,l.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,l,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,o=f(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,o=-1,a=n.length;++oe&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,o=n.length,a=e.x,l=e.y,s=t?c(n.area/t):0;if(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++ie.dx)&&(s=e.dx);++ie&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=ta.random.normal.apply(ta,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ta.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ta.scale={};var ml={floor:y,ceil:y};ta.scale.linear=function(){return Ii([0,1],[0,1],mu,!1)};var yl={s:1,g:1,p:1,r:1,e:1};ta.scale.log=function(){return Ji(ta.scale.linear().domain([0,1]),10,!0,[1,10])};var Ml=ta.format(".0e"),xl={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ta.scale.pow=function(){return Gi(ta.scale.linear(),1,[0,1])},ta.scale.sqrt=function(){return ta.scale.pow().exponent(.5)},ta.scale.ordinal=function(){return Qi([],{t:"range",a:[[]]})},ta.scale.category10=function(){return ta.scale.ordinal().range(bl)},ta.scale.category20=function(){return ta.scale.ordinal().range(_l)},ta.scale.category20b=function(){return ta.scale.ordinal().range(wl)},ta.scale.category20c=function(){return ta.scale.ordinal().range(Sl)};var bl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Mt),_l=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Mt),wl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Mt),Sl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Mt);ta.scale.quantile=function(){return no([],[])},ta.scale.quantize=function(){return to(0,1,[0,1])},ta.scale.threshold=function(){return eo([.5],[0,1])},ta.scale.identity=function(){return ro([0,1])},ta.svg={},ta.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),s=o.apply(this,arguments)-Ra,f=a.apply(this,arguments)-Ra,h=Math.abs(f-s),g=s>f?0:1;if(n>l&&(p=l,l=n,n=p),h>=Ta)return t(l,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,E=0,A=0,N=[];if((m=(+c.apply(this,arguments)||0)/2)&&(d=i===kl?Math.sqrt(n*n+l*l):+i.apply(this,arguments),g||(A*=-1),l&&(A=tt(d/l*Math.sin(m))),n&&(E=tt(d/n*Math.sin(m)))),l){y=l*Math.cos(s+A),M=l*Math.sin(s+A),x=l*Math.cos(f-A),b=l*Math.sin(f-A);var C=Math.abs(f-s-2*A)<=qa?0:1;if(A&&so(y,M,x,b)===g^C){var z=(s+f)/2;y=l*Math.cos(z),M=l*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-E),w=n*Math.sin(f-E),S=n*Math.cos(s+E),k=n*Math.sin(s+E);var q=Math.abs(s-f+2*E)<=qa?0:1;if(E&&so(_,w,S,k)===1-g^q){var L=(s+f)/2;_=n*Math.cos(L),w=n*Math.sin(L),S=k=null}}else _=w=0;if((p=Math.min(Math.abs(l-n)/2,+u.apply(this,arguments)))>.001){v=l>n^g?0:1;var T=null==S?[_,w]:null==x?[y,M]:Lr([y,M],[S,k],[x,b],[_,w]),R=y-T[0],D=M-T[1],P=x-T[0],U=b-T[1],j=1/Math.sin(Math.acos((R*P+D*U)/(Math.sqrt(R*R+D*D)*Math.sqrt(P*P+U*U)))/2),F=Math.sqrt(T[0]*T[0]+T[1]*T[1]);if(null!=x){var H=Math.min(p,(l-F)/(j+1)),O=fo(null==S?[_,w]:[S,k],[y,M],l,H,g),I=fo([x,b],[_,w],l,H,g);p===H?N.push("M",O[0],"A",H,",",H," 0 0,",v," ",O[1],"A",l,",",l," 0 ",1-g^so(O[1][0],O[1][1],I[1][0],I[1][1]),",",g," ",I[1],"A",H,",",H," 0 0,",v," ",I[0]):N.push("M",O[0],"A",H,",",H," 0 1,",v," ",I[0])}else N.push("M",y,",",M);if(null!=S){var Y=Math.min(p,(n-F)/(j-1)),Z=fo([y,M],[S,k],n,-Y,g),V=fo([_,w],null==x?[y,M]:[x,b],n,-Y,g);p===Y?N.push("L",V[0],"A",Y,",",Y," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^so(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",Y,",",Y," 0 0,",v," ",Z[0]):N.push("L",V[0],"A",Y,",",Y," 0 0,",v," ",Z[0])}else N.push("L",_,",",w)}else N.push("M",y,",",M),null!=x&&N.push("A",l,",",l," 0 ",C,",",g," ",x,",",b),N.push("L",_,",",w),null!=S&&N.push("A",n,",",n," 0 ",q,",",1-g," ",S,",",k);return N.push("Z"),N.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=io,r=oo,u=uo,i=kl,o=ao,a=co,c=lo;return n.innerRadius=function(t){return arguments.length?(e=Et(t),n):e},n.outerRadius=function(t){return arguments.length?(r=Et(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=Et(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==kl?kl:Et(t),n):i},n.startAngle=function(t){return arguments.length?(o=Et(t),n):o},n.endAngle=function(t){return arguments.length?(a=Et(t),n):a},n.padAngle=function(t){return arguments.length?(c=Et(t),n):c},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Ra;return[Math.cos(t)*n,Math.sin(t)*n]},n};var kl="auto";ta.svg.line=function(){return ho(y)};var El=ta.map({linear:go,"linear-closed":po,step:vo,"step-before":mo,"step-after":yo,basis:So,"basis-open":ko,"basis-closed":Eo,bundle:Ao,cardinal:bo,"cardinal-open":Mo,"cardinal-closed":xo,monotone:To});El.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Al=[0,2/3,1/3,0],Nl=[0,1/3,2/3,0],Cl=[0,1/6,2/3,1/6];ta.svg.line.radial=function(){var n=ho(Ro);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},mo.reverse=yo,yo.reverse=mo,ta.svg.area=function(){return Do(y)},ta.svg.area.radial=function(){var n=Do(Ro);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ta.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),l=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,l)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+u(l.r,l.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=a.call(n,u,r),o=c.call(n,u,r)-Ra,s=l.call(n,u,r)-Ra;return{r:i,a0:o,a1:s,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>qa)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=mr,o=yr,a=Po,c=ao,l=co;return n.radius=function(t){return arguments.length?(a=Et(t),n):a},n.source=function(t){return arguments.length?(i=Et(t),n):i},n.target=function(t){return arguments.length?(o=Et(t),n):o},n.startAngle=function(t){return arguments.length?(c=Et(t),n):c},n.endAngle=function(t){return arguments.length?(l=Et(t),n):l},n},ta.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=e.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=mr,e=yr,r=Uo;return n.source=function(e){return arguments.length?(t=Et(e),n):t},n.target=function(t){return arguments.length?(e=Et(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ta.svg.diagonal.radial=function(){var n=ta.svg.diagonal(),t=Uo,e=n.projection;return n.projection=function(n){return arguments.length?e(jo(t=n)):t},n},ta.svg.symbol=function(){function n(n,r){return(zl.get(t.call(this,n,r))||Oo)(e.call(this,n,r))}var t=Ho,e=Fo;return n.type=function(e){return arguments.length?(t=Et(e),n):t},n.size=function(t){return arguments.length?(e=Et(t),n):e},n};var zl=ta.map({circle:Oo,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Ll)),e=t*Ll;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/ql),e=t*ql/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/ql),e=t*ql/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ta.svg.symbolTypes=zl.keys();var ql=Math.sqrt(3),Ll=Math.tan(30*Da);_a.transition=function(n){for(var t,e,r=Tl||++Ul,u=Xo(n),i=[],o=Rl||{time:Date.now(),ease:Su,delay:0,duration:250},a=-1,c=this.length;++ai;i++){u.push(t=[]);for(var e=this[i],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return Yo(u,this.namespace,this.id)},Pl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Pl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Hu:mu,a=ta.ns.qualify(n);return Zo(this,"attr."+n,t,a.local?i:u)},Pl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=ta.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Pl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=mu(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var o=arguments.length;if(3>o){if("string"!=typeof n){2>o&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Zo(this,"style."+n,e,i)},Pl.styleTween=function(n,e,r){function u(u,i){var o=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return o&&function(t){this.style.setProperty(n,o(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Pl.text=function(n){return Zo(this,"text",n,Vo)},Pl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Pl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=ta.ease.apply(ta,arguments)),Y(this,function(r){r[e][t].ease=n}))},Pl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Pl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Pl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Rl,i=Tl;try{Tl=e,Y(this,function(t,u,i){Rl=t[r][e],n.call(t,t.__data__,u,i)})}finally{Rl=u,Tl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=ta.dispatch("start","end","interrupt"))).on(n,t)});return this},Pl.transition=function(){for(var n,t,e,r,u=this.id,i=++Ul,o=this.namespace,a=[],c=0,l=this.length;l>c;c++){a.push(n=[]);for(var t=this[c],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[o][u],$o(e,s,o,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Yo(a,o,i)},ta.svg.axis=function(){function n(n){n.each(function(){var n,l=ta.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):y:t,p=l.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Ca),d=ta.transition(p.exit()).style("opacity",Ca).remove(),m=ta.transition(p.order()).style("opacity",1),M=Math.max(u,0)+o,x=Ui(f),b=l.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),ta.transition(b));v.append("line"),v.append("text");var w,S,k,E,A=v.select("line"),N=m.select("line"),C=p.select("text").text(g),z=v.select("text"),q=m.select("text"),L="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=Bo,w="x",k="y",S="x2",E="y2",C.attr("dy",0>L?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+L*i+"V0H"+x[1]+"V"+L*i)):(n=Wo,w="y",k="x",S="y2",E="x2",C.attr("dy",".32em").style("text-anchor",0>L?"end":"start"),_.attr("d","M"+L*i+","+x[0]+"H0V"+x[1]+"H"+L*i)),A.attr(E,L*u),z.attr(k,L*M),N.attr(S,0).attr(E,L*u),q.attr(w,0).attr(k,L*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=ta.scale.linear(),r=jl,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Fl?t+"":jl,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var jl="bottom",Fl={top:1,right:1,bottom:1,left:1};ta.svg.brush=function(){function n(t){t.each(function(){var t=ta.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),o=t.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=t.selectAll(".resize").data(v,y);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Hl[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var c,f=ta.transition(t),h=ta.transition(o);l&&(c=Ui(l),h.attr("x",c[0]).attr("width",c[1]-c[0]),r(f)),s&&(c=Ui(s),h.attr("y",c[0]).attr("height",c[1]-c[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==ta.event.keyCode&&(C||(M=null,q[0]-=f[1],q[1]-=h[1],C=2),S())}function v(){32==ta.event.keyCode&&2==C&&(q[0]+=f[1],q[1]+=h[1],C=0,S())}function d(){var n=ta.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(ta.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),q[0]=f[+(n[0]s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?a=null:o=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),ta.select("body").style("cursor",null),L.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=ta.select(ta.event.target),w=c.of(b,arguments),k=ta.select(b),E=_.datum(),A=!/^(n|s)$/.test(E)&&l,N=!/^(e|w)$/.test(E)&&s,C=_.classed("extent"),z=W(b),q=ta.mouse(b),L=ta.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(ta.event.changedTouches?L.on("touchmove.brush",d).on("touchend.brush",y):L.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)q[0]=f[0]-q[0],q[1]=h[0]-q[1];else if(E){var T=+/w$/.test(E),R=+/^n/.test(E);x=[f[1-T]-q[0],h[1-R]-q[1]],q[0]=f[T],q[1]=h[R]}else ta.event.altKey&&(M=q.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),ta.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var o,a,c=E(n,"brushstart","brush","brushend"),l=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Ol[0];return n.event=function(n){n.each(function(){var n=c.of(this,arguments),t={x:f,y:h,i:o,j:a},e=this.__chart__||t;this.__chart__=t,Tl?ta.select(this).transition().each("start.brush",function(){o=e.i,a=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=yu(f,t.x),r=yu(h,t.y);return o=a=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=t.i,a=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(l=t,v=Ol[!l<<1|!s],n):l},n.y=function(t){return arguments.length?(s=t,v=Ol[!l<<1|!s],n):s},n.clamp=function(t){return arguments.length?(l&&s?(g=!!t[0],p=!!t[1]):l?g=!!t:s&&(p=!!t),n):l&&s?[g,p]:l?g:s?p:null},n.extent=function(t){var e,r,u,i,c;return arguments.length?(l&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),o=[e,r],l.invert&&(e=l(e),r=l(r)),e>r&&(c=e,e=r,r=c),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],l&&(u=u[1],i=i[1]),a=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(c=u,u=i,i=c),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(l&&(o?(e=o[0],r=o[1]):(e=f[0],r=f[1],l.invert&&(e=l.invert(e),r=l.invert(r)),e>r&&(c=e,e=r,r=c))),s&&(a?(u=a[0],i=a[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(c=u,u=i,i=c))),l&&s?[[e,u],[r,i]]:l?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],o=a=null),n},n.empty=function(){return!!l&&f[0]==f[1]||!!s&&h[0]==h[1]},ta.rebind(n,c,"on")};var Hl={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ol=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Il=ac.format=gc.timeFormat,Yl=Il.utc,Zl=Yl("%Y-%m-%dT%H:%M:%S.%LZ");Il.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Jo:Zl,Jo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Jo.toString=Zl.toString,ac.second=Ft(function(n){return new cc(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),ac.seconds=ac.second.range,ac.seconds.utc=ac.second.utc.range,ac.minute=Ft(function(n){return new cc(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),ac.minutes=ac.minute.range,ac.minutes.utc=ac.minute.utc.range,ac.hour=Ft(function(n){var t=n.getTimezoneOffset()/60;return new cc(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),ac.hours=ac.hour.range,ac.hours.utc=ac.hour.utc.range,ac.month=Ft(function(n){return n=ac.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),ac.months=ac.month.range,ac.months.utc=ac.month.utc.range;var Vl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Xl=[[ac.second,1],[ac.second,5],[ac.second,15],[ac.second,30],[ac.minute,1],[ac.minute,5],[ac.minute,15],[ac.minute,30],[ac.hour,1],[ac.hour,3],[ac.hour,6],[ac.hour,12],[ac.day,1],[ac.day,2],[ac.week,1],[ac.month,1],[ac.month,3],[ac.year,1]],$l=Il.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",Ne]]),Bl={range:function(n,t,e){return ta.range(Math.ceil(n/e)*e,+t,e).map(Ko)},floor:y,ceil:y};Xl.year=ac.year,ac.scale=function(){return Go(ta.scale.linear(),Xl,$l)};var Wl=Xl.map(function(n){return[n[0].utc,n[1]]}),Jl=Yl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",Ne]]);Wl.year=ac.year.utc,ac.scale.utc=function(){return Go(ta.scale.linear(),Wl,Jl)},ta.text=At(function(n){return n.responseText}),ta.json=function(n,t){return Nt(n,"application/json",Qo,t)},ta.html=function(n,t){return Nt(n,"text/html",na,t)},ta.xml=At(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(ta):"object"==typeof module&&module.exports&&(module.exports=ta),this.d3=ta}(); \ No newline at end of file diff --git a/osrframework/static/js/demo.js b/osrframework/static/js/demo.js new file mode 100644 index 0000000..8f58c8e --- /dev/null +++ b/osrframework/static/js/demo.js @@ -0,0 +1,626 @@ +;window.Modernizr=function(a,b,c){function A(a){j.cssText=a}function B(a,b){return A(m.join(a+";")+(b||""))}function C(a,b){return typeof a===b}function D(a,b){return!!~(""+a).indexOf(b)}function E(a,b){for(var d in a){var e=a[d];if(!D(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function F(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:C(f,"function")?f.bind(d||b):f}return!1}function G(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return C(b,"string")||C(b,"undefined")?E(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),F(e,b,c))}var d="2.7.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v=u.slice,w,x=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},y={}.hasOwnProperty,z;!C(y,"undefined")&&!C(y.call,"undefined")?z=function(a,b){return y.call(a,b)}:z=function(a,b){return b in a&&C(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=v.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(v.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(v.call(arguments)))};return e}),r.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:x(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},r.cssanimations=function(){return G("animationName")},r.csstransitions=function(){return G("transition")},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect},r.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==q.svg};for(var H in r)z(r,H)&&(w=H.toLowerCase(),e[w]=r[H](),u.push((e[w]?"":"no-")+w));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)z(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},A(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return E([a])},e.testAllProps=G,e.testStyles=x,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+u.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f"; +}; + +var getStateName = function(v){ + switch(v){ + case 'AL': return 'Alabama'; + case 'AK': return 'Alaska'; + case 'AZ': return 'Arizona'; + case 'AR': return 'Arkansas'; + case 'CA': return 'California'; + case 'CO': return 'Colorado'; + case 'CT': return 'Connecticut'; + case 'DE': return 'Delaware'; + case 'DC': return 'District of Columbia'; + case 'FL': return 'Florida'; + case 'GA': return 'Georgia'; + case 'HI': return 'Hawaii'; + case 'ID': return 'Idaho'; + case 'IL': return 'Illinois'; + case 'IN': return 'Indiana'; + case 'IA': return 'Iowa'; + case 'KS': return 'Kansas'; + case 'KY': return 'Kentucky'; + case 'LA': return 'Louisiana'; + case 'ME': return 'Maine'; + case 'MD': return 'Maryland'; + case 'MA': return 'Massachusetts'; + case 'MI': return 'Michigan'; + case 'MN': return 'Minnesota'; + case 'MS': return 'Mississippi'; + case 'MO': return 'Missouri'; + case 'MT': return 'Montana'; + case 'NE': return 'Nebraska'; + case 'NV': return 'Nevada'; + case 'NH': return 'New Hampshire'; + case 'NJ': return 'New Jersey'; + case 'NM': return 'New Mexico'; + case 'NY': return 'New York'; + case 'NC': return 'North Carolina'; + case 'ND': return 'North Dakota'; + case 'OH': return 'Ohio'; + case 'OK': return 'Oklahoma'; + case 'OR': return 'Oregon'; + case 'PA': return 'Pennsylvania'; + case 'RI': return 'Rhode Island'; + case 'SC': return 'South Carolina'; + case 'SD': return 'South Dakota'; + case 'TN': return 'Tennessee'; + case 'TX': return 'Texas'; + case 'UT': return 'Utah'; + case 'VT': return 'Vermont'; + case 'VA': return 'Virginia'; + case 'WA': return 'Washington'; + case 'WV': return 'West Virginia'; + case 'WI': return 'Wisconsin'; + case 'WY': return 'Wyoming'; + case 'PR': return 'Puerto-Rico'; + case 'VI': return 'Virgin Islands'; + case 'GU': return 'GUAM'; + default : return 'Unknown: '+v; + } +}; + +function getMonthNameFromNumber(v){ + switch(v){ + case 0: return "January"; + case 1: return "February"; + case 2: return "March"; + case 3: return "April"; + case 4: return "May"; + case 5: return "June"; + case 6: return "July"; + case 7: return "August"; + case 8: return "September"; + case 9: return "October"; + case 10: return "November"; + case 11: return "December"; + } + return "?"; +}; + + +function getDayNameFromNumber(v){ + switch(v){ + case 1: return "Monday"; + case 2: return "Tuesday"; + case 3: return "Wednesday"; + case 4: return "Thursday"; + case 5: return "Friday"; + case 6: return "Saturday"; + case 0: return "Sunday"; + } + return "?"; +}; + +function getMonthNumberFromName(v){ + switch(v){ + case "January" : return 0; + case "February" : return 1; + case "March" : return 2; + case "April" : return 3; + case "May" : return 4; + case "June" : return 5; + case "July" : return 6; + case "August" : return 7; + case "September": return 8; + case "October" : return 9; + case "November" : return 10; + case "December" : return 11; + default : return 12; + } +}; + +// Based on ISO_3166 codes +function getCountryName(v){ + switch(v){ + case 'AD': return "Andorra"; + case 'AE': return "United Arab Emirates"; + case 'AF': return "Afghanistan"; + case 'AG': return "Antigua and Barbuda"; + case 'AI': return "Anguilla"; + case 'AL': return "Albania"; + case 'AM': return "Armenia"; + case 'AO': return "Angola"; + case 'AQ': return "Antarctica"; + case 'AR': return "Argentina"; + case 'AS': return "American Samoa"; + case 'AT': return "Austria"; + case 'AU': return "Australia"; + case 'AW': return "Aruba"; + case 'AX': return "Åland Islands"; + case 'AZ': return "Azerbaijan"; + case 'BA': return "Bosnia and Herzegovina"; + case 'BB': return "Barbados"; + case 'BD': return "Bangladesh"; + case 'BE': return "Belgium"; + case 'BF': return "Burkina Faso"; + case 'BG': return "Bulgaria"; + case 'BH': return "Bahrain"; + case 'BI': return "Burundi"; + case 'BJ': return "Benin"; + case 'BL': return "Saint Barthélemy"; + case 'BM': return "Bermuda"; + case 'BN': return "Brunei Darussalam"; + case 'BO': return "Bolivia, Plurinational State of"; + case 'BQ': return "Bonaire, Sint Eustatius and Saba"; + case 'BR': return "Brazil"; + case 'BS': return "Bahamas"; + case 'BT': return "Bhutan"; + case 'BV': return "Bouvet Island"; + case 'BW': return "Botswana"; + case 'BY': return "Belarus"; + case 'BZ': return "Belize"; + case 'CA': return "Canada"; + case 'CC': return "Cocos (Keeling) Islands"; + case 'CD': return "Congo, the Democratic Republic of the"; + case 'CF': return "Central African Republic"; + case 'CG': return "Congo"; + case 'CH': return "Switzerland"; + case 'CI': return "Côte d'Ivoire"; + case 'CK': return "Cook Islands"; + case 'CL': return "Chile"; + case 'CM': return "Cameroon"; + case 'CN': return "China"; + case 'CO': return "Colombia"; + case 'CR': return "Costa Rica"; + case 'CU': return "Cuba"; + case 'CV': return "Cabo Verde"; + case 'CW': return "Curaçao"; + case 'CX': return "Christmas Island"; + case 'CY': return "Cyprus"; + case 'CZ': return "Czech Republic"; + case 'DE': return "Germany"; + case 'DJ': return "Djibouti"; + case 'DK': return "Denmark"; + case 'DM': return "Dominica"; + case 'DO': return "Dominican Republic"; + case 'DZ': return "Algeria"; + case 'EC': return "Ecuador"; + case 'EE': return "Estonia"; + case 'EG': return "Egypt"; + case 'EH': return "Western Sahara"; + case 'ER': return "Eritrea"; + case 'ES': return "Spain"; + case 'ET': return "Ethiopia"; + case 'FI': return "Finland"; + case 'FJ': return "Fiji"; + case 'FK': return "Falkland Islands (Malvinas)"; + case 'FM': return "Micronesia, Federated States of"; + case 'FO': return "Faroe Islands"; + case 'FR': return "France"; + case 'GA': return "Gabon"; + case 'GB': return "United Kingdom of Great Britain and Northern Ireland"; + case 'GD': return "Grenada"; + case 'GE': return "Georgia"; + case 'GF': return "French Guiana"; + case 'GG': return "Guernsey"; + case 'GH': return "Ghana"; + case 'GI': return "Gibraltar"; + case 'GL': return "Greenland"; + case 'GM': return "Gambia"; + case 'GN': return "Guinea"; + case 'GP': return "Guadeloupe"; + case 'GQ': return "Equatorial Guinea"; + case 'GR': return "Greece"; + case 'GS': return "South Georgia and the South Sandwich Islands"; + case 'GT': return "Guatemala"; + case 'GU': return "Guam"; + case 'GW': return "Guinea-Bissau"; + case 'GY': return "Guyana"; + case 'HK': return "Hong Kong"; + case 'HM': return "Heard Island and McDonald Islands"; + case 'HN': return "Honduras"; + case 'HR': return "Croatia"; + case 'HT': return "Haiti"; + case 'HU': return "Hungary"; + case 'ID': return "Indonesia"; + case 'IE': return "Ireland"; + case 'IL': return "Israel"; + case 'IM': return "Isle of Man"; + case 'IN': return "India"; + case 'IO': return "British Indian Ocean Territory"; + case 'IQ': return "Iraq"; + case 'IR': return "Iran, Islamic Republic of"; + case 'IS': return "Iceland"; + case 'IT': return "Italy"; + case 'JE': return "Jersey"; + case 'JM': return "Jamaica"; + case 'JO': return "Jordan"; + case 'JP': return "Japan"; + case 'KE': return "Kenya"; + case 'KG': return "Kyrgyzstan"; + case 'KH': return "Cambodia"; + case 'KI': return "Kiribati"; + case 'KM': return "Comoros"; + case 'KN': return "Saint Kitts and Nevis"; + case 'KP': return "Korea, Democratic People's Republic of"; + case 'KR': return "Korea, Republic of"; + case 'KW': return "Kuwait"; + case 'KY': return "Cayman Islands"; + case 'KZ': return "Kazakhstan"; + case 'LA': return "Lao People's Democratic Republic"; + case 'LB': return "Lebanon"; + case 'LC': return "Saint Lucia"; + case 'LI': return "Liechtenstein"; + case 'LK': return "Sri Lanka"; + case 'LR': return "Liberia"; + case 'LS': return "Lesotho"; + case 'LT': return "Lithuania"; + case 'LU': return "Luxembourg"; + case 'LV': return "Latvia"; + case 'LY': return "Libya"; + case 'MA': return "Morocco"; + case 'MC': return "Monaco"; + case 'MD': return "Moldova, Republic of"; + case 'ME': return "Montenegro"; + case 'MF': return "Saint Martin (French part)"; + case 'MG': return "Madagascar"; + case 'MH': return "Marshall Islands"; + case 'MK': return "Macedonia, the former Yugoslav Republic of"; + case 'ML': return "Mali"; + case 'MM': return "Myanmar"; + case 'MN': return "Mongolia"; + case 'MO': return "Macao"; + case 'MP': return "Northern Mariana Islands"; + case 'MQ': return "Martinique"; + case 'MR': return "Mauritania"; + case 'MS': return "Montserrat"; + case 'MT': return "Malta"; + case 'MU': return "Mauritius"; + case 'MV': return "Maldives"; + case 'MW': return "Malawi"; + case 'MX': return "Mexico"; + case 'MY': return "Malaysia"; + case 'MZ': return "Mozambique"; + case 'NA': return "Namibia"; + case 'NC': return "New Caledonia"; + case 'NE': return "Niger"; + case 'NF': return "Norfolk Island"; + case 'NG': return "Nigeria"; + case 'NI': return "Nicaragua"; + case 'NL': return "Netherlands"; + case 'NO': return "Norway"; + case 'NP': return "Nepal"; + case 'NR': return "Nauru"; + case 'NU': return "Niue"; + case 'NZ': return "New Zealand"; + case 'OM': return "Oman"; + case 'PA': return "Panama"; + case 'PE': return "Peru"; + case 'PF': return "French Polynesia"; + case 'PG': return "Papua New Guinea"; + case 'PH': return "Philippines"; + case 'PK': return "Pakistan"; + case 'PL': return "Poland"; + case 'PM': return "Saint Pierre and Miquelon"; + case 'PN': return "Pitcairn"; + case 'PR': return "Puerto Rico"; + case 'PS': return "Palestine, State of"; + case 'PT': return "Portugal"; + case 'PW': return "Palau"; + case 'PY': return "Paraguay"; + case 'QA': return "Qatar"; + case 'RE': return "Réunion"; + case 'RO': return "Romania"; + case 'RS': return "Serbia"; + case 'RU': return "Russian Federation"; + case 'RW': return "Rwanda"; + case 'SA': return "Saudi Arabia"; + case 'SB': return "Solomon Islands"; + case 'SC': return "Seychelles"; + case 'SD': return "Sudan"; + case 'SE': return "Sweden"; + case 'SG': return "Singapore"; + case 'SH': return "Saint Helena, Ascension and Tristan da Cunha"; + case 'SI': return "Slovenia"; + case 'SJ': return "Svalbard and Jan Mayen"; + case 'SK': return "Slovakia"; + case 'SL': return "Sierra Leone"; + case 'SM': return "San Marino"; + case 'SN': return "Senegal"; + case 'SO': return "Somalia"; + case 'SR': return "Suriname"; + case 'SS': return "South Sudan"; + case 'ST': return "Sao Tome and Principe"; + case 'SV': return "El Salvador"; + case 'SX': return "Sint Maarten (Dutch part)"; + case 'SY': return "Syrian Arab Republic"; + case 'SZ': return "Swaziland"; + case 'TC': return "Turks and Caicos Islands"; + case 'TD': return "Chad"; + case 'TF': return "French Southern Territories"; + case 'TG': return "Togo"; + case 'TH': return "Thailand"; + case 'TJ': return "Tajikistan"; + case 'TK': return "Tokelau"; + case 'TL': return "Timor-Leste"; + case 'TM': return "Turkmenistan"; + case 'TN': return "Tunisia"; + case 'TO': return "Tonga"; + case 'TR': return "Turkey"; + case 'TT': return "Trinidad and Tobago"; + case 'TV': return "Tuvalu"; + case 'TW': return "Taiwan, Province of China"; + case 'TZ': return "Tanzania, United Republic of"; + case 'UA': return "Ukraine"; + case 'UG': return "Uganda"; + case 'UM': return "United States Minor Outlying Islands"; + case 'US': return "United States of America"; + case 'UY': return "Uruguay"; + case 'UZ': return "Uzbekistan"; + case 'VA': return "Holy See"; + case 'VC': return "Saint Vincent and the Grenadines"; + case 'VE': return "Venezuela, Bolivarian Republic of"; + case 'VG': return "Virgin Islands, British"; + case 'VI': return "Virgin Islands, U.S."; + case 'VN': return "Viet Nam"; + case 'VU': return "Vanuatu"; + case 'WF': return "Wallis and Futuna"; + case 'WS': return "Samoa"; + case 'YE': return "Yemen"; + case 'YT': return "Mayotte"; + case 'ZA': return "South Africa"; + case 'ZM': return "Zambia"; + case 'ZW': return "Zimbabwe"; + default : return "Unkown: "+v; + } +} + +function writeCookie(name,value,days){ + var date, expires; + if (days) { + date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + expires = "; expires=" + date.toGMTString(); + }else{ + expires = ""; + } + document.cookie = name + "=" + value + expires + "; path=/"; +}; + +function readCookie(name){ + var i, c, ca, nameEQ = name + "="; + ca = document.cookie.split(';'); + for(i=0;i < ca.length;i++) { + c = ca[i]; + while (c.charAt(0)==' ') { + c = c.substring(1,c.length); + } + if (c.indexOf(nameEQ) == 0) { + return c.substring(nameEQ.length,c.length); + } + } + return ''; +}; + +var printPeopleIcons = function(){ + var str=""; + for(var i=0; i950) && (h>500) /* && (w>h)*/; + }, + Desktop : function(){ // skip: Android, Blackberry, iPhone, iPad, iPod, Opera Mini, IEMobile + return isMobile.any()===null; + }, + NoTouch : function(){ // skip browsers supporting touch events. + return !Modernizr.touch; + }, + setSessionID : function(t){ + if(this.Check!==undefined) return; + if(t!==undefined){ + this.dom = $(t); + } + document.getElementsByTagName("body")[0].onmousemove = null; + this.sessionID_Cookie = readCookie('sessionId'); + if(this.sessionID_Cookie === '') { + var ran = window.event.clientX*Math.random(); + var ran2 = window.event.clientY*Math.random(); + this.sessionID_Cookie = Math.floor((ran+ran2)*10000000000000); + writeCookie('sessionId', this.sessionID_Cookie, 365); + } else { + this.sessionID_Cookie = parseInt(this.sessionID_Cookie); + } + this.sessionID_Now = Math.floor(Math.random()*10000000000000); + this.All(); + }, + host : function(){ + switch(document.location.hostname){ + case "localhost": return true; + /*case "adilyalcin.github.io": return true; + case "www.cs.umd.edu": return true; + case "cs.umd.edu": return true; + case "www.keshif.me": return true; + case "keshif.me": return true;*/ + } + return false; + }, + All : function(){ + var tmp = this.Check; + this.Check = + (typeof demoID === 'number') && + this.WindowSize() && + this.Desktop() && + this.NoTouch() && + this.host()===true && + (this.sessionID_Cookie!==null) + ; + if(this.Check===true && tmp === undefined) { + this.loadTs = Date.now(); + sendLog(kshf.LOG.CONFIG, + { height:this.dom.height(),width:this.dom.width(),agent:navigator.userAgent}, this.loadTs); + } + return this.Check; + }, + dom: $(window), + sessionID_Cookie: null, + sessionID_Now: null, + Check : undefined, + loadTs: null, +}; + +var sendLog = function(actID, dt, ts){ + if(logIf.Check!==true) return; + if(ts===undefined){ ts = Date.now()-logIf.loadTs; } + var _dt = { + 'demoID': demoID, + 'actID' : actID, + 'ses_Cki' : logIf.sessionID_Cookie, + 'ses_Now': logIf.sessionID_Now, + 'ts' : ts, + }; + // custom data to be sent + if(dt){ for (var key in dt) { _dt[key]=dt[key]; } } + $.ajax({ + type: "GET", + dataType: "jsonp", + cache: true, + jsonp: false, + url: (document.location.hostname!=="localhost")?"http://keshiftracker.appspot.com":"http://localhost:9090/", + data: _dt + }); +};; + +$(window).load(function(){ + + if(document.location.hostname!=="localhost"){ + /*(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + ga('create', 'UA-54042831-2', 'auto'); + ga('send', 'pageview');*/ + } + + if(showLogo){ + /*var keshif_logo = d3.select("body").append("a").attr("class","keshif_logo") + .attr("href","http://www.keshif.me").attr("target","_blank"); + keshif_logo.append("img").attr("class","keshif_logo_img").attr("src","./img/logo.png"); + keshif_logo.append("span").attr("class","keshif_logo_content").html( + "Keshif
Data Made Explorable" + );*/ + } + + if(!noRibbon){ + /*var githubDemoRoot = "https://github.com/adilyalcin/Keshif/blob/master/demo/"; + var pageName = window.location.pathname.split("/"); + pageName = pageName[pageName.length-1]; + if(pageName.indexOf("html")===-1) pageName+=".html"; + + /*d3.select("body").append("span").attr("class","forkongithub fork-bottom fork-right") + .append("a").attr("href","http://www.keshif.me").attr("target","_blank") + .attr("class","fork-ribbon").html("More ..."); + + d3.select("body").append("span").attr("class",'forkongithub fork-bottom fork-left').html( + ""+ + //''+ + ""+ + " Open Source "+ + ""+ + "" + );*/ + } + + if(socialShare===true){ + var s = document.createElement("script"); + s.type = "text/javascript"; + s.src = "//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-534742f736ae906e"; + s.async = "async"; + $("body").append(s); + } + + d3.select("head").append("link") + .attr("rel","icon") + .attr("href","./img/favicon.png") + .attr("type","image/png"); + + + if($("body").fancybox && false){ + + var com_dom = d3.select("body").append("span").attr("class","comment_popup").attr("href", + "https://docs.google.com/forms/d/1OohNaCzV42jHFtqTxVaci3CISGiR6znYTvEozFm2z7k/viewform?embedded=true"); + + var com_dom_stack = com_dom.append("span").attr("class","fa-stack"); + com_dom_stack.append("i").attr("class","fa fa-stack-1x fa-comment"); + com_dom_stack.append("i").attr("class","fa fa-stack-1x fa-comment-o"); + com_dom.append("br"); + com_dom.append("span").attr("class","texttt").html("Share
your
feedback"); + + $(".comment_popup").fancybox({ + type: 'iframe', + width: 600, + height: 300, + closeBtn: true, + iframe: { + preload: true + } + }); + } + + if(githubButton===true){ + var s = document.createElement("script"); + s.src = "https://buttons.github.io/buttons.js"; + s.id = "github-bjs"; + s.async = "async"; + $("body").append(s); + } + + + +}); + diff --git a/osrframework/static/js/jquery.min.js b/osrframework/static/js/jquery.min.js new file mode 100644 index 0000000..006e953 --- /dev/null +++ b/osrframework/static/js/jquery.min.js @@ -0,0 +1,5 @@ +/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery.min.map +*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
a",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="
t
",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj; +return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="
",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l) +}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("
"; + creditString += ""; + creditString += "
" + creditString += ""; + creditString += "
"; + creditString += "Libraries and third-party used:
"; + creditString += " D3 -"; + creditString += " JQuery -"; + creditString += " Keshif"; + creditString += "
"; + //creditString += ""; + creditString += "
"; + creditString += "If you have questions or if you just want to know what things we do,
"; + creditString += "you can contact us in contacto@i3visio.com.
"; + //creditString += ""; + + this.panel_infobox = this.DOM.root.append("div").attr("class", "panel panel_infobox"); + this.panel_infobox.append("div").attr("class","background") + .on("click",function(){ + var activePanel = this.parentNode.getAttribute("show"); + if(activePanel==="credit" || activePanel==="itemZoom"){ + me.panel_infobox.attr("show","none"); + } + }) + ; + this.DOM.loadingBox = this.panel_infobox.append("div").attr("class","infobox_content infobox_loading"); +// this.DOM.loadingBox.append("span").attr("class","fa fa-spinner fa-spin"); + var ssdsd = this.DOM.loadingBox.append("span").attr("class","spinner"); + ssdsd.append("span").attr("class","spinner_x spinner_1"); + ssdsd.append("span").attr("class","spinner_x spinner_2"); + ssdsd.append("span").attr("class","spinner_x spinner_3"); + ssdsd.append("span").attr("class","spinner_x spinner_4"); + ssdsd.append("span").attr("class","spinner_x spinner_5"); + + var hmmm=this.DOM.loadingBox.append("div").attr("class","status_text"); + hmmm.append("span").attr("class","status_text_sub info").text(kshf.lang.cur.LoadingData); + this.DOM.status_text_sub_dynamic = hmmm.append("span").attr("class","status_text_sub dynamic"); + + var infobox_credit = this.panel_infobox.append("div").attr("class","infobox_content infobox_credit"); + infobox_credit.append("div").attr("class","infobox_close_button") + .on("click",function(){ + me.panel_infobox.attr("show","none"); + }) + .append("span").attr("class","fa fa-times"); + infobox_credit.append("div").attr("class","all-the-credits").html(creditString); + + this.insertSourceBox(); + + + this.DOM.infobox_itemZoom = this.panel_infobox.append("span").attr("class","infobox_content infobox_itemZoom"); + + this.DOM.infobox_itemZoom.append("div").attr("class","infobox_close_button") + .on("click",function(){ + me.panel_infobox.attr("show","none"); + }) + .append("span").attr("class","fa fa-times"); + + this.DOM.infobox_itemZoom_content = this.DOM.infobox_itemZoom.append("span").attr("class","content"); + }, + /** -- */ + insertSourceBox: function(){ + var me=this; + var x,y,z; + var source_type="GoogleSheet"; + var sourceURL=null, sourceSheet=""; + + var readyToLoad=function(){ + return sourceURL!==null && sourceSheet!==""; + }; + + this.DOM.infobox_source = this.panel_infobox.append("div").attr("class","infobox_content infobox_source") + .attr("selected_source_type",source_type); + + this.DOM.infobox_source.append("div").attr("class","sourceHeader").text("Where's your data?"); + + var source_wrapper = this.DOM.infobox_source.append("div").attr("class","source_wrapper"); + + x = source_wrapper.append("div").attr("class","offpoofff"); + + x.append("span").attr("class","source_from").text("Google Sheet").attr("source_type","GoogleSheet"); + x.append("span").attr("class","source_from").text("Google Drive Folder").attr("source_type","GoogleDrive"); + x.append("span").attr("class","source_from").text("Dropbox Folder").attr("source_type","Dropbox"); + x.append("span").attr("class","source_from").text("Local File").attr("source_type","LocalFile"); + + x.selectAll(".source_from").on("click",function(){ + source_type=this.getAttribute("source_type"); + me.DOM.infobox_source.attr("selected_source_type",source_type); + var placeholder; + switch(source_type){ + case "GoogleSheet": placeholder = 'https://docs.google.com/spreadsheets/d/**************'; break; + case "GoogleDrive": placeholder = 'https://******.googledrive.com/host/**************/'; break; + case "Dropbox": placeholder = "https://dl.dropboxusercontent.com/u/**************/"; + } + + gdocLink.attr("placeholder",placeholder); + }); + + x = source_wrapper.append("div"); + var gdocLink = x.append("input") + .attr("type","text") + .attr("class","gdocLink") + .attr("placeholder",'https://docs.google.com/spreadsheets/d/**************') + .on("keyup",function(){ + gdocLink_ready.style("opacity",this.value===""?"0":"1"); + var input = this.value; + if(source_type==="GoogleSheet"){ + var firstIndex = input.indexOf("docs.google.com/spreadsheets/d/"); + if(firstIndex!==-1){ + var input = input.substr(firstIndex+31); // focus after the base url + if(input.indexOf("/")!==-1){ + input = input.substr(0,input.indexOf("/")); + } + } + if(input.length===44){ + sourceURL = input; + gdocLink_ready.attr("ready",true); + } else { + sourceURL = null; + gdocLink_ready.attr("ready",false); + } + } + if(source_type==="GoogleDrive"){ + var firstIndex = input.indexOf(".googledrive.com/host/"); + if(firstIndex!==-1){ + // Make sure last character is "/" + if(input[input.length-1]!=="/") input+="/"; + sourceURL = input; + gdocLink_ready.attr("ready",true); + } else{ + sourceURL = null; + gdocLink_ready.attr("ready",false); + } + } + if(source_type==="Dropbox"){ + var firstIndex = input.indexOf("dl.dropboxusercontent.com/"); + if(firstIndex!==-1){ + // Make sure last character is "/" + if(input[input.length-1]!=="/") input+="/"; + sourceURL = input; + gdocLink_ready.attr("ready",true); + } else{ + sourceURL = null; + gdocLink_ready.attr("ready",false); + } + } + if(source_type==="LocalFile"){ + // TODO + } + actionButton.attr("disabled",!readyToLoad()); + }); + + x.append("span").attr("class","fa fa-info-circle") + .each(function(summary){ + this.tipsy = new Tipsy(this, { + gravity: 's', title: function(){ + if(source_type==="GoogleSheet") + return "The link to your Google Sheet"; + if(source_type==="GoogleDrive") + return "The link to *hosted* Google Drive folder"; + if(source_type==="Dropbox") + return "The link to your *Public* Dropbox folder"; + if(source_type==="LocalFile") + return "Select your file or drag & drop into the field"; + } + }); + }) + .on("mouseenter",function(){ this.tipsy.show(); }) + .on("mouseleave",function(){ this.tipsy.hide(); }); + + var gdocLink_ready = x.append("span").attr("class","gdocLink_ready fa").attr("ready",false); + + var sheetInfo = this.DOM.infobox_source.append("div").attr("class","sheetInfo"); + + x = sheetInfo.append("div").attr("class","sheet_wrapper") + x.append("div").attr("class","subheading tableHeader") + ; + + x = sheetInfo.append("div").attr("class","sheet_wrapper sheetName_wrapper") + x.append("span").attr("class","subheading").text("Name"); + x.append("span").attr("class","fa fa-info-circle") + .each(function(summary){ + this.tipsy = new Tipsy(this, { + //gravity: 's', title: function(){ return "Your document may have multiple sheets.
Provide the name of the main sheet"; } + gravity: 's', title: function(){ + var v; + if(source_type==="GoogleSheet") + v="The name of the data sheet in your Google Sheet."; + if(source_type==="GoogleDrive") + v="The file name in the folder."; + if(source_type==="Dropbox") + v="The file name in the folder."; + v+="
Also describes what each data row represents" + return v; + } + }); + }) + .on("mouseenter",function(){ this.tipsy.show(); }) + .on("mouseleave",function(){ this.tipsy.hide(); }); + + x.append("input").attr("type","text").attr("class","sheetName") + .on("keyup",function(){ + sourceSheet = this.value; + actionButton.attr("disabled",!readyToLoad()); + }); + z=x.append("span").attr("class","fileType_wrapper"); + z.append("span").text("."); + var DOMfileType = z.append("select").attr("class","fileType"); + DOMfileType.append("option").attr("value","csv").text("csv"); + DOMfileType.append("option").attr("value","tsv").text("tsv"); + DOMfileType.append("option").attr("value","json").text("json"); + + x = sheetInfo.append("div").attr("class","sheet_wrapper sheetColumn_ID_wrapper") + x.append("span").attr("class","subheading").text("ID column"); + x.append("span").attr("class","fa fa-info-circle") + .each(function(summary){ + this.tipsy = new Tipsy(this, { + //gravity: 's', title: function(){ return "Your document may have multiple sheets.
Provide the name of the main sheet"; } + gravity: 's', title: function(){ return "The column that uniquely identifies each item.

If no such column, skip."; } + }); + }) + .on("mouseenter",function(){ this.tipsy.show(); }) + .on("mouseleave",function(){ this.tipsy.hide(); }); + x.append("input").attr("class","sheetColumn_ID").attr("type","text").attr("placeholder","id"); + + x = sheetInfo.append("div").attr("class","sheet_wrapper sheetColumn_Split_wrapper") + x.append("span").attr("class","subheading").text("Split column"); + x.append("span").attr("class","fa fa-info-circle") + .each(function(summary){ + this.tipsy = new Tipsy(this, { + //gravity: 's', title: function(){ return "Your document may have multiple sheets.
Provide the name of the main sheet"; } + gravity: 's', title: function(){ + return "If column has multi-values
(ex: action+drama),
split values using separator"; + } + }); + }) + .on("mouseenter",function(){ this.tipsy.show(); }) + .on("mouseleave",function(){ this.tipsy.hide(); }); + x.append("input").attr("type","text").attr("class","sheetColumn_Splitter") + .on("keyup",function(){ + sheetColumn_sep_wrapper.style("display",this.value!==""?"inline-block":"none"); + }); + var sheetColumn_sep_wrapper = x.append("span").attr("class","sheetColumn_sep_wrapper"); + sheetColumn_sep_wrapper.append("span").text(" with") + sheetColumn_sep_wrapper.append("span").attr("class","fa fa-info-circle") + .each(function(summary){ + this.tipsy = new Tipsy(this, { + //gravity: 's', title: function(){ return "Your document may have multiple sheets.
Provide the name of the main sheet"; } + gravity: 's', title: function(){ + return "Separator"; + } + }); + }) + .on("mouseenter",function(){ this.tipsy.show(); }) + .on("mouseleave",function(){ this.tipsy.hide(); });; + sheetColumn_sep_wrapper.append("input").attr("class","sheetColumn_Separator").attr("type","text").attr("placeholder","+"); + + + var actionButton = this.DOM.infobox_source.append("div").attr("class","actionButton") + .html("Explore it with Keshif") + .attr("disabled",true) + .on("click",function(){ + if(!readyToLoad()){ + alert("Please input your data source link and sheet name."); + return; + } + var sheetID = me.DOM.infobox_source.select(".sheetColumn_ID")[0][0].value; + if(sheetID==="") sheetID = "id"; + var loadedCb_pre = me.loadedCb; + me.loadedCb = function(){ + var splitColumnName = me.DOM.infobox_source.select(".sheetColumn_Splitter")[0][0].value; + var splitSepName = me.DOM.infobox_source.select(".sheetColumn_Separator")[0][0].value; + if(splitColumnName){ + kshf.Util.cellToArray(this.items, [splitColumnName], splitSepName, false); + } + if(loadedCb_pre) loadedCb_pre.call(this,this); + }; + var readyCb_pre = me.readyCb; + me.readyCb = function(){ + me.showAttributes(); + if(readyCb_pre) readyCb_pre.call(this,this); + } + if(source_type==="GoogleSheet"){ + me.loadSource({ + gdocId: sourceURL, + sheets: [ {name:sourceSheet, id:sheetID} ] + }); + } + if(source_type==="GoogleDrive"){ + me.loadSource({ + dirPath: sourceURL, + fileType: DOMfileType[0][0].value, + sheets: [ {name:sourceSheet, id:sheetID} ] + }); + } + if(source_type==="Dropbox"){ + me.loadSource({ + dirPath: sourceURL, + fileType: DOMfileType[0][0].value, + sheets: [ {name:sourceSheet, id:sheetID} ] + }); + } + if(source_type==="LocalFile"){ + me.loadSource({ + dirPath: sourceURL, + fileType: DOMfileType[0][0].value, + sheets: [ {name:sourceSheet, id:sheetID} ] + }); + } + }); + }, + /** -- */ + updateItemZoomText: function(item){ + var str=""; + for(var column in item.data){ + var v=item.data[column]; + if(v===undefined || v===null) continue; + str+=""+column+": "+ v.toString()+"
"; + } + this.DOM.infobox_itemZoom_content.html(str); +// this.DOM.infobox_itemZoom_content.html(item.data.toString()); + }, + /** -- */ + showAttributes: function(v){ + if(v===undefined) v = !this.attribsShown; // if undefined, invert + this.attribsShown = v; + this.DOM.root.attr("attribsShown",this.attribsShown); + + var lastIndex = 0, me=this; + var initAttib = function(){ + var start = Date.now(); + me.summaries[lastIndex++].initializeAggregates(); + var end = Date.now(); + if(lastIndex!==me.summaries.length) + setTimeout(initAttib,end-start); + }; + setTimeout(initAttib,150); + }, + /** -- */ + showFullscreen: function(){ + this.isFullscreen = this.isFullscreen?false:true; + var elem = browser.DOM.root[0][0]; + if(this.isFullscreen){ + if (elem.requestFullscreen) { + elem.requestFullscreen(); + } else if (elem.msRequestFullscreen) { + elem.msRequestFullscreen(); + } else if (elem.mozRequestFullScreen) { + elem.mozRequestFullScreen(); + } else if (elem.webkitRequestFullscreen) { + elem.webkitRequestFullscreen(); + } + } else { + if (document.exitFullscreen) { + document.exitFullscreen(); + } else if (document.msExitFullscreen) { + document.msExitFullscreen(); + } else if (document.mozCancelFullScreen) { + document.mozCancelFullScreen(); + } else if (document.webkitExitFullscreen) { + document.webkitExitFullscreen(); + } + } + }, + /** -- */ + showInfoBox: function(){ + this.panel_infobox.attr("show","credit"); + if(sendLog) sendLog(kshf.LOG.INFOBOX); + }, + /** -- */ + loadSource: function(v){ + this.source = v; + this.panel_infobox.attr("show","loading"); + if(this.source.sheets){ + if(!Array.isArray(this.source.sheets)){ + this.source.sheets = [this.source.sheets]; + } + this.source.sheets.forEach(function(sheet, i){ + if(typeof sheet === "string"){ + this.source.sheets[i] = {name: sheet}; + } + }, this); + this.source.loadedTableCount=0; + + this.DOM.status_text_sub_dynamic + .text("("+this.source.loadedTableCount+"/"+this.source.sheets.length+")"); + + this.source.sheets[0].primary = true; + this.primaryTableName = this.source.sheets[0].name; + if(this.source.gdocId){ + if(this.source.url===undefined) + this.source.url = "https://docs.google.com/spreadsheet/ccc?key="+this.source.gdocId; + } + this.source.sheets.forEach(function(sheet){ + if(sheet.id===undefined) sheet.id="id"; // set id column + if(sheet.tableName===undefined) sheet.tableName = sheet.name; // set table name + // if this table name has been loaded, skip this one + if(kshf.dt[sheet.tableName]!==undefined){ + this.incrementLoadedSheetCount(); + return; + } + if(this.source.gdocId){ + this.loadSheet_Google(sheet); + } else if(this.source.dirPath){ + if(this.source.fileType==="json"){ + this.loadSheet_JSON(sheet); + } else if(this.source.fileType==="csv" || this.source.fileType==="tsv"){ + this.loadSheet_CSV(sheet); + } + } + },this); + } else { + if(this.source.callback){ + this.source.callback(this); + } + } + }, + loadSheet_Google: function(sheet){ + var me=this; + var headers=1; + if(sheet.headers){ + headers = sheet.headers; + } + var qString='https://docs.google.com/spreadsheet/tq?key='+this.source.gdocId+'&headers='+headers; + if(sheet.sheetID){ + qString+='&gid='+sheet.sheetID; + } else { + qString+='&sheet='+sheet.name; + } + if(sheet.range){ + qString+="&range="+sheet.range; + } + + var googleQuery = new google.visualization.Query(qString); + if(sheet.query) googleQuery.setQuery(sheet.query); + + googleQuery.send( function(response){ + if(kshf.dt[sheet.tableName]!==undefined){ + me.incrementLoadedSheetCount(); + return; + } + if(response.isError()) { + me.panel_infobox.select("div.status_text .info") + .text("Cannot load data"); + me.panel_infobox.select("span.spinner").selectAll("span").remove(); + me.panel_infobox.select("span.spinner").append('i').attr("class","fa fa-warning"); + me.panel_infobox.select("div.status_text .dynamic") + .text("("+response.getMessage()+")"); + return; + } + + var j,r,i,arr=[],idIndex=-1,itemId=0; + var dataTable = response.getDataTable(); + var numCols = dataTable.getNumberOfColumns(); + + // find the index with sheet.id (idIndex) + for(i=0; true ; i++){ + if(i===numCols || dataTable.getColumnLabel(i).trim()===sheet.id) { + idIndex = i; + break; + } + } + + var tmpTable=[]; + + // create the column name tables + for(j=0; j0){ + totalWidth-=this.panels.left.width_catLabel+kshf.scrollWidth+this.panels.left.width_catMeasureLabel; + colCount++; + } + if(this.panels.right.summaries.length>0){ + totalWidth-=this.panels.right.width_catLabel+kshf.scrollWidth+this.panels.right.width_catMeasureLabel; + colCount++; + } + if(this.panels.middle.summaries.length>0){ + totalWidth-=this.panels.middle.width_catLabel+kshf.scrollWidth+this.panels.middle.width_catMeasureLabel; + colCount++; + } + return Math.floor((totalWidth)/8); + }; + var defaultBarChartWidth = x.call(this); + + this.panels.left.setWidthCatBars(this.options.barChartWidth || defaultBarChartWidth); + this.panels.right.setWidthCatBars(this.options.barChartWidth || defaultBarChartWidth); + this.panels.middle.setWidthCatBars(this.options.barChartWidth || defaultBarChartWidth); + this.panels.bottom.updateSummariesWidth(this.options.barChartWidth || defaultBarChartWidth); + + this.updateMiddlePanelWidth(); + + this.refresh_filterClearAll(); + + this.items.forEach(function(item){item.updateWanted();}); + this.update_itemsWantedCount(); + + this.updateAfterFilter(); + + this.updateLayout_Height(); + + // hide infobox + this.panel_infobox.attr("show","none"); + + this.insertAttributeList(); + + if(this.readyCb!==undefined) this.readyCb(this); + this.finalized = true; + + setTimeout(function(){ + me.setNoAnim(false); + },10000); + }, + /** -- */ + unregisterBodyCallbacks: function(){ + // TODO: Revert to previous handlers... + d3.select("body").style('cursor','auto') + .on("mousemove",null) + .on("mouseup",null) + .on("keydown",null); + }, + /** -- */ + prepareDropZones: function(summary,source){ + this.movedSummary = summary; + this.showDropZones = true; + this.DOM.root + .attr("showdropzone",true) + .attr("dropattrtype",summary.getDataType()) + .attr("dropSource",source) + ; + this.DOM.attribDragBox.style("display","block").text(summary.summaryTitle); + if(!summary.uniqueCategories()){ + } + }, + /** -- */ + clearDropZones: function(){ + this.showDropZones = false; + this.unregisterBodyCallbacks(); + this.DOM.root.attr("showdropzone",false); + this.DOM.attribDragBox.style("display","none"); + if(this.movedSummary && !this.movedSummary.uniqueCategories()){ + // ? + } + this.movedSummary = undefined; + }, + /** -- */ + setItemName: function(){ + this.DOM.recordName.html(this.itemName); + }, + /** -- */ + insertAttributeList: function(){ + var me=this; + var x=this.DOM.attributeList; + + var newAttributes = x.selectAll(".nugget") + .data(this.summaries).enter(); + + this.attribMoved = false; + + var newSummaries = newAttributes + .append("div").attr("class","nugget editableTextContainer") + .each(function(summary){ + summary.DOM.nugget = d3.select(this); + summary.refreshNuggetDisplay(); + }) + .attr("title",function(summary){ + if(summary.summaryColumn!==undefined) return summary.summaryColumn; + }) + .attr("state",function(summary){ + if(summary.summaryColumn===null) return "custom"; // calculated + if(summary.summaryTitle===summary.summaryColumn) return "exact"; + return "edited"; + }) + .attr("datatype",function(summary){ + return summary.getDataType(); + }) + .attr("aggr_initialized",function(summary){ + return summary.aggr_initialized; + }) + .on("dblclick",function(summary){ + if(summary.uniqueCategories()){ + me.listDisplay.setRecordViewSummary(summary); + me.listDisplay.updateVisibleIndex(); + me.listDisplay.updateItemVisibility(false,true); + + if(me.listDisplay.textSearchSummary===null) + me.listDisplay.setTextSearchSummary(summary); + return; + } + + if(summary.hasTime!==undefined && summary.hasTime===true) { + summary.addToPanel(me.panels.bottom); + } else if(summary.type==='categorical') { + summary.addToPanel(me.panels.left); + summary.refreshLabelWidth(); + summary.updateBarPreviewScale2Active(); + } else if(summary.type==='interval') { + summary.addToPanel(me.panels.right); + me.listDisplay.addSortingOption(summary); + } + summary.refreshWidth(); + me.updateLayout(); + }) + .on("mousedown",function(summary){ + if(d3.event.which !== 1) return; // only respond to left-click + + var _this = this; + me.attribMoved = false; + d3.select("body") + .on("keydown", function(){ + if(event.keyCode===27){ // Escape key + _this.removeAttribute("moved"); + me.clearDropZones(); + } + }) + .on("mousemove", function(){ + if(!me.attribMoved){ + _this.setAttribute("moved",""); + me.prepareDropZones(summary,"attributePanel"); + me.attribMoved = true; + } + var mousePos = d3.mouse(me.DOM.root[0][0]); + kshf.Util.setTransform(me.DOM.attribDragBox[0][0], + "translate("+(mousePos[0]-20)+"px,"+(mousePos[1]+5)+"px)"); + d3.event.stopPropagation(); + d3.event.preventDefault(); + }) + .on("mouseup", function(){ + if(!me.attribMoved) return; + _this.removeAttribute("moved"); + me.DOM.root.attr("drag_cursor",null); + me.clearDropZones(); + d3.event.preventDefault(); + }); + d3.event.preventDefault(); + }) + .on("mouseup",function(summary){ + if(me.attribMoved===false) me.unregisterBodyCallbacks(); + }) + ; + + var nuggetViz = newSummaries.append("span").attr("class","nuggetViz") + .each(function(summary){ + this.tipsy = new Tipsy(this, { + gravity: 'e', title: function(){ + if(!summary.aggr_initialized){ + return "Click to initialize"; + } + return summary.getDataType(); + } + }) + }) + .on("mousedown",function(summary){ + if(!summary.aggr_initialized){ + // stop dragging event start + d3.event.stopPropagation(); + d3.event.preventDefault(); + } + }) + .on("click",function(summary){ + if(!summary.aggr_initialized){ + summary.initializeAggregates(); + } + }); + + nuggetViz.append("span").attr("class","nuggetInfo fa"); + var nuggetChart = nuggetViz.append("span").attr("class","nuggetChart"); + newSummaries.append("span").attr("class","summaryTitle editableText") + .attr("contenteditable",false) + .text(function(summary){ return summary.summaryTitle; }) + .on("blur",function(summary){ + this.parentNode.setAttribute("edittitle",false); + this.setAttribute("contenteditable",false); + me.changeSummaryName(summary.summaryTitle,this.textContent); + d3.event.preventDefault(); + d3.event.stopPropagation(); + }) + .on("keydown",function(summary){ + if(d3.event.keyCode===13){ // ENTER + this.parentNode.setAttribute("edittitle",false); + this.setAttribute("contenteditable",false); + me.changeSummaryName(summary.summaryTitle,this.textContent); + d3.event.preventDefault(); + d3.event.stopPropagation(); + } + }) + ; + newSummaries.append("div").attr("class","fa editTextButton") + .each(function(summary){ + this.tipsy = new Tipsy(this, { + gravity: 'w', title: function(){ + var curState=this.parentNode.getAttribute("edittitle"); + if(curState===null || curState==="false"){ + return kshf.lang.cur.EditTitle; + } else { + return "OK"; + } + } + }) + }) + .on("mouseenter",function(){ this.tipsy.show(); }) + .on("mouseleave",function(){ this.tipsy.hide(); }) + .on("mousedown",function(summary){ + d3.event.stopPropagation(); + d3.event.preventDefault(); + }) + .on("click",function(summary){ + this.tipsy.hide(); + var parentDOM = d3.select(this.parentNode); + var summaryTitle = parentDOM.select(".summaryTitle"); + var summaryTitle_DOM = parentDOM.select(".summaryTitle")[0][0]; + + var curState=this.parentNode.getAttribute("edittitle"); + if(curState===null || curState==="false"){ + this.parentNode.setAttribute("edittitle",true); + summaryTitle_DOM.setAttribute("contenteditable",true); + summaryTitle_DOM.focus(); + } else { + this.parentNode.setAttribute("edittitle",false); + summaryTitle_DOM.setAttribute("contenteditable",false); + me.changeSummaryName(summary.summaryTitle,summaryTitle_DOM.textContent); + } + // stop dragging event start + d3.event.stopPropagation(); + d3.event.preventDefault(); + }); + + newSummaries.append("div").attr("class","fa fa-code editCodeButton") + .each(function(summary){ + this.tipsy = new Tipsy(this, { + gravity: 'w', title: function(){ return "Edit Function"; } + }); + }) + .on("mouseenter",function(){ this.tipsy.show(); }) + .on("mouseleave",function(){ this.tipsy.hide(); }) + .on("mousedown",function(summary){ + d3.event.stopPropagation(); + d3.event.preventDefault(); + }) + .on("click",function(summary){ + alert("TODO: Edit this:\n"+summary.getFuncString()); + // stop dragging event start + d3.event.stopPropagation(); + d3.event.preventDefault(); + }) + ; + + this.summaries.forEach(function(summary){ + if(summary.aggr_initialized) summary.refreshViz_Nugget(); + }); + }, + /** External method - used by demos to auto-select certain features on load -- */ + filterFacetAttribute: function(facetID, itemId){ + this.summaries[facetID].filterAttrib(this.summaries[facetID]._cats[itemId],"OR"); + }, + /** -- */ + clearFilters_All: function(force){ + var me=this; + if(this.skipSortingFacet){ + // you can now sort the last filtered summary, attention is no longer there. + this.skipSortingFacet.dirtySort = false; + this.skipSortingFacet.DOM.root.attr("refreshSorting",false); + } + // clear all registered filters + this.filters.forEach(function(filter){ + filter.clearFilter(false,false,false); + }) + if(force!==false){ + this.items.forEach(function(item){ item.updateWanted_More(true); }); + this.update_itemsWantedCount(); + this.refresh_filterClearAll(); + this.updateAfterFilter(1); // more results + if(sendLog){ + sendLog(kshf.LOG.FILTER_CLEAR_ALL); + } + } + setTimeout( function(){ me.updateLayout_Height(); }, 1000); // update layout after 1.75 seconds + }, + /** -- */ + refreshActiveItemCount: function(){ + var noneSelected = (this.itemsWanted_Aggregrate_Total===0); + this.DOM.activeRecordCount + .text(!noneSelected?this.itemsWanted_Aggregrate_Total:"No") + .style("width",(noneSelected?"30":(this.itemsTotal_Aggregrate_Total.toString().length*11+5))+"px") + ; + }, + /** -- */ + update_itemsWantedCount: function(){ + this.itemsWantedCount = 0; + this.itemsWanted_Aggregrate_Total = 0; + this.items.forEach(function(item){ + if(item.isWanted){ + this.itemsWantedCount++; + this.itemsWanted_Aggregrate_Total+=item.aggregate_Self; + } + },this); + + this.refreshTotalViz(); + this.refreshActiveItemCount(); + }, + /** @arg resultChange: + * - If positive, more results are shown + * - If negative, fewer results are shown + * - Else, no info is available. */ + updateAfterFilter: function (resultChange) { + this.clearPreviewCompare(); + // basically, propogate call under every facet and listDisplay + this.summaries.forEach(function(summary){ + if(summary.inBrowser()) summary.updateAfterFilter(resultChange); + }); + this.listDisplay.updateAfterFilter(); + + if(this.updateCb) this.updateCb(this); + }, + /** -- */ + refresh_filterClearAll: function(){ + var filteredCount=0; + this.filters.forEach(function(filter){ filteredCount+=filter.isFiltered?1:0; }) + this.DOM.root.attr("isfiltered",filteredCount>0); + }, + /** Ratio mode is when glyphs scale to their max */ + setRatioMode: function(how){ + this.ratioModeActive = how; + this.DOM.root.attr("ratiomode",how); + this.setPercentMode(how); + this.summaries.forEach(function(summary){ + if(summary.inBrowser()) summary.refreshViz_All(); + }); + if(this.ratioModeCb) this.ratioModeCb.call(this,!how); + }, + /** -- */ + setPercentMode: function(how){ + this.percentModeActive = how; + this.DOM.root.attr("percentview",how); + this.summaries.forEach(function(summary){ + if(summary.inBrowser()) summary.refreshMeasureLabel(); + }); + this.summaries.forEach(function(summary){ + if(summary.inBrowser()) summary.refreshViz_Axis(); + }); + }, + /** -- */ + clearPreviewCompare: function(){ + this.vizCompareActive = false; + this.DOM.root.attr("previewcompare",false); + this.summaries.forEach(function(summary){ + if(summary.inBrowser()) summary.refreshViz_Compare(); + }); + if(this.comparedAggregate){ + this.comparedAggregate.DOM.facet.setAttribute("compare",false); + this.comparedAggregate = null; + } + if(this.previewCompareCb) this.previewCompareCb.call(this,true); + }, + /** -- */ + setPreviewCompare: function(aggregate){ + if(this.comparedAggregate){ + var a=aggregate===this.comparedAggregate; + this.clearPreviewCompare(); + if(a) return; + } + aggregate.DOM.facet.setAttribute("compare",true); + this.comparedAggregate = aggregate; + this.vizCompareActive = true; + this.DOM.root.attr("previewcompare",true); + this.summaries.forEach(function(summary){ + if(summary.inBrowser()) { + summary.cachePreviewValue(); + summary.refreshViz_Compare(); + } + }); + if(this.previewCompareCb) this.previewCompareCb.call(this,false); + }, + /** -- */ + clearResultPreviews: function(){ + this.vizPreviewActive = false; + this.DOM.root.attr("resultpreview",false); + this.items.forEach(function(item){ + item.updatePreview_Cache = false; + }); + this.itemCount_Previewed = 0; + this.summaries.forEach(function(summary){ + if(summary.inBrowser()) summary.clearViz_Preview(); + }); + this.refreshTotalViz(); + if(this.previewCb) this.previewCb.call(this,true); + }, + /** -- */ + refreshResultPreviews: function(){ + this.vizPreviewActive = true; + this.DOM.root.attr("resultpreview",true); + this.summaries.forEach(function(summary){ + if(summary.inBrowser()) summary.refreshViz_Preview(); + }); + this.refreshTotalViz(); + if(this.previewCb) this.previewCb.call(this,false); + }, + /** -- */ + checkZoomLevel: function(){ + // Using devicePixelRatio works in Chrome and Firefox, but not in Safari + // I have not tested IE yet. + if(window.devicePixelRatio!==undefined){ + if(window.devicePixelRatio!==1 && window.devicePixelRatio!==2){ + var me=this; + setTimeout(function(){ + me.showWarning("Please reset your browser zoom level for the best experience.") + },1000); + } else { + this.hideWarning(); + } + } else { + this.hideWarning(); + } + }, + /** -- */ + updateLayout: function(){ + if(this.loaded!==true) return; + this.checkZoomLevel(); + this.divWidth = this.domWidth(); + this.updateLayout_Height(); + this.updateMiddlePanelWidth(); + }, + /** -- */ + updateLayout_Height: function(){ + var me=this; + var divHeight_Total = this.domHeight(); + + var panel_Basic_height = Math.max(parseInt(this.DOM.panel_Basic.style("height")),24)+6; + + divHeight_Total-=panel_Basic_height; + + // initialize all summaries as not yet processed. + this.summaries.forEach(function(summary){ + if(summary.inBrowser()) summary.heightProcessed = false; + }) + + var bottomFacetsHeight=0; + // process bottom summary too + if(this.panels.bottom.summaries.length>0){ + var targetHeight=divHeight_Total/3; + var maxHeight=0; + // they all share the same target height + this.panels.bottom.summaries.forEach(function(summary){ + targetHeight = Math.min(summary.getHeight_RangeMax(),targetHeight); + summary.setHeight(targetHeight); + summary.heightProcessed = true; + bottomFacetsHeight += summary.getHeight(); + }); + } + + var doLayout = function(sectionHeight,summaries){ + var finalPass = false; + var processedFacets=0; + var lastRound = false; + + summaries.forEach(function(summary){ + // if it's already processed, log it + if(summary.heightProcessed) processedFacets++; + }); + + while(true){ + var remainingFacetCount = summaries.length-processedFacets; + if(remainingFacetCount===0) { + break; + } + var processedFacets_pre = processedFacets; + summaries.forEach(function(summary){ + // in last round, if you have more attribs than visible, you may increase your height! + if(lastRound===true && sectionHeight>5/*px*/ && !summary.collapsed && summary.catCount_Total!==undefined){ + if(summary.catCount_InDisplay0) { +/* if(this.showDropZones) { + bottomFacetsHeight+=(1+this.panels.bottom.summaries.length)*36; + }*/ + } + this.panels.bottom.DOM.root.style("height",bottomFacetsHeight+"px"); + + topPanelsHeight-=bottomFacetsHeight; + this.DOM.panelsTop.style("height",topPanelsHeight+"px"); + + // Left Panel + if(this.panels.left.summaries.length>0){ + doLayout.call(this,topPanelsHeight,this.panels.left.summaries); + } + // Right Panel + if(this.panels.right.summaries.length>0){ + doLayout.call(this,topPanelsHeight,this.panels.right.summaries); + } + // Middle Panel + var midPanelHeight = 0; + if(this.panels.middle.summaries.length>0){ + var panelHeight = topPanelsHeight; + if(this.listDisplay.recordViewSummary){ + panelHeight -= 200; // give 200px fo the list display + } else { + panelHeight -= this.listDisplay.DOM.root[0][0].offsetHeight; + } + midPanelHeight = panelHeight - doLayout.call(this,panelHeight, this.panels.middle.summaries); + } + + // The part where summary DOM is updated + this.summaries.forEach(function(summary){ + if(summary.inBrowser()) summary.refreshHeight(); + }); + + if(this.listDisplay){ + var listDivTop = 0; + // get height of header + var listHeaderHeight=this.listDisplay.DOM.recordViewHeader[0][0].offsetHeight; + var listDisplayHeight = divHeight_Total-listDivTop-listHeaderHeight; + if(this.panels.bottom.summaries.length>0){ + listDisplayHeight-=bottomFacetsHeight; + } + listDisplayHeight-=midPanelHeight; + if(this.showDropZones && this.panels.middle.summaries.length===0) + listDisplayHeight*=0.5; + if(this.listDisplay.recordViewSummary!==null) + this.listDisplay.DOM.listItemGroup.style("height",listDisplayHeight+"px"); + } + }, + /** -- */ + updateMiddlePanelWidth: function(){ + // for some reason, on page load, this variable may be null. urgh. + var widthMiddlePanel = this.divWidth; + var marginLeft = 0; + var marginRight = 0; + if(this.panels.left.summaries.length>0){ + marginLeft=2; + widthMiddlePanel-=this.panels.left.getWidth_Total()+2; + } + if(this.panels.right.summaries.length>0){ + marginRight=2; + widthMiddlePanel-=this.panels.right.getWidth_Total()+2; + } + this.panels.left.DOM.root.style("margin-right",marginLeft+"px") + this.panels.right.DOM.root.style("margin-left",marginRight+"px") + this.panels.middle.setTotalWidth(widthMiddlePanel); + this.panels.middle.updateSummariesWidth(); + this.panels.bottom.setTotalWidth(this.divWidth); + this.panels.bottom.updateSummariesWidth(); + }, + /** -- */ + getFilterState: function() { + var r={ + resultCt : this.itemsWantedCount, + }; + + r.filtered=""; + r.selected=""; + this.filters.forEach(function(filter){ + if(filter.isFiltered){ + // set filtered to true for this summary ID + if(r.filtered!=="") r.filtered+="x"; + r.filtered+=filter.id; + // include filteing state of summary + if(r.selected!=="") r.selected+="x"; + } + },this); + if(r.filtered==="") r.filtered=undefined; + if(r.selected==="") r.selected=undefined; + + return r; + }, + /** -- */ + getFilterSummary: function(){ + var str=""; + this.filters.forEach(function(filter,i){ + if(!filter.isFiltered) return; + if(filter.filterView_Detail){ + if(i!=0) str+=" & "; +// if(filter.summary_header) str+= filter.summary_header+": "; + str+=filter.filterView_Detail(); + } + },this); + return str; + } +}; + + + +// *********************************************************************************************************** +// *********************************************************************************************************** + +kshf.Summary_Base = function(){} +kshf.Summary_Base.prototype = { + initialize: function(browser,name,attribFunc){ + this.id = ++kshf.summaryCount; + this.browser = browser; +// this.parentFacet = options.parentFacet; + + this.summaryTitle = name; + this.summaryColumn = attribFunc?null:name; + this.summaryFunc = attribFunc || function(){ return this[name]; }; + + this.chartScale_Measure = d3.scale.linear().clamp(true); + + this.DOM = {}; + this.DOM.inited = false; + + this.items = this.browser.items; + if(this.items===undefined||this.items===null||this.items.length===0){ + alert("Error: Browser.items is not defined..."); + return; + } + + this.subFacets = []; + + this.isRecordView = false; + + // Only used when summary is inserted into browser + this.collapsed_pre = false; + this.collapsed = false; + + this.aggr_initialized = false; + + this.createSummaryFilter(); + }, + /** -- */ + setSummaryName: function(name){ + this.summaryTitle = name; + if(this.DOM.summaryTitle_text){ + this.DOM.summaryTitle_text.text(this.summaryTitle); + } + this.summaryFilter._refreshFilterSummary(); + // This summary may be used for sorting options. Refresh the list + if(this.browser.listDisplay){ + this.browser.listDisplay.refreshSortingOptions(); + } + if(this.isTextSearch){ + this.browser.listDisplay.DOM.recordTextSearch.select("input") + .attr("placeholder",kshf.lang.cur.Search+": "+this.summaryTitle); + } + if(this.sortFunc){ + this.browser.listDisplay.refreshSortingOptions(); + } + if(this.DOM.nugget){ + this.DOM.nugget.select(".summaryTitle").text(this.summaryTitle); + this.DOM.nugget.attr("state",function(summary){ + if(summary.summaryColumn===null) return "custom"; // calculated + if(summary.summaryTitle===summary.summaryColumn) return "exact"; + return "edited"; + }); + } + }, + /** -- */ + getDataType: function(){ + if(this.type==='categorical') { + var str="categorical"; + if(!this.aggr_initialized) return str+=" uninitialized"; + if(this.uniqueCategories()) str+=" unique"; + str+=this.hasMultiValueItem?" multivalue":" singlevalue"; + return str; + } + if(this.type==='interval') { + if(!this.aggr_initialized) return str+=" uninitialized"; + if(this.hasTime) return "interval time"; + return "interval numeric"; + // + if(this.hasFloat) return "floating"; + return "integer"; + } + return "?"; + }, + /** -- */ + destroy: function(){ + delete this.browser.summaries_by_name[this.summaryTitle]; + if(this.summaryColumn) + delete this.browser.summaries_by_name[this.summaryColumn]; + this.browser.removeSummary(this); + if(this.DOM.root){ + this.DOM.root[0][0].parentNode.removeChild(this.DOM.root[0][0]); + } + }, + /** -- */ + inBrowser: function(){ + return this.panel!==undefined; + }, + /** -- */ + hasEntityParent: function(){ + if(this.parentFacet===undefined) return false; + return this.parentFacet.hasCategories(); + }, + /** -- */ + hasSubFacets: function(){ + return this.subFacets.length>0; + }, + /** -- */ + clearDOM: function(){ + var dom = this.DOM.root[0][0]; + dom.parentNode.removeChild(dom); + }, + /** -- */ + getWidth: function(){ + return this.panel.getWidth_Total()-this.getWidth_LeftOffset(); + }, + /** -- */ + getWidth_LeftOffset: function(){ + return (this.parentFacet)?17:0; + }, + /** -- */ + uniqueCategories: function(){ + if(this.browser && this.browser.items[0].idIndex===this.summaryTitle){ + return true; + } + return false; + }, + /** -- */ + isFiltered: function(){ + return this.summaryFilter.isFiltered; + }, + getFuncString: function(){ + var str=this.summaryFunc.toString(); + // replace the beginning, and the end + return str.replace(/function\s*\(\w*\)\s*{\s*/,"").replace(/}$/,""); + }, + /** -- */ + addToPanel: function(panel, index){ + if(index===undefined) index = panel.summaries.length; + if(this.panel===undefined){ + this.panel = panel; + } else if(this.panel && this.panel!==panel){ + this.panel.removeSummary(this); + this.panel = panel; + } else{ // this.panel === panel + var curIndex; + // this.panel is the same as panel... + this.panel.summaries.forEach(function(s,i){ + if(s===this) curIndex = i; + },this); + // inserting the summary to the same index as current one + if(curIndex===index) return; + var toRemove=this.panel.DOM.root.selectAll(".dropZone_between_wrapper")[0][curIndex]; + toRemove.parentNode.removeChild(toRemove); + } + var beforeDOM = this.panel.DOM.root.selectAll(".dropZone_between_wrapper")[0][index]; + if(this.DOM.root){ + this.DOM.root.style("display",""); + panel.DOM.root[0][0].insertBefore(this.DOM.root[0][0],beforeDOM); + } else { + this.initDOM(beforeDOM); + } + panel.addSummary(this,index); + this.panel.refreshDropZoneIndex(); + this.refreshNuggetDisplay(); + }, + /** -- */ + refreshNuggetDisplay: function(){ + if(this.DOM.nugget===undefined) return; + var me=this; + var nuggetHidden = (this.panel||this.isRecordView); + if(nuggetHidden){ + this.DOM.nugget.attr('anim','disappear'); + setTimeout(function(){ + me.DOM.nugget.style("display","none"); + },800); + } else { + this.DOM.nugget.style("display","block"); + setTimeout(function(){ + me.DOM.nugget.attr('anim','appear'); + },300); + } + }, + /** -- */ + removeFromPanel: function(){ + if(this.panel===undefined) return; + this.panel.removeSummary(this); + this.refreshNuggetDisplay(); + }, + /** -- */ + insertRoot: function(beforeDOM){ + this.DOM.root = this.panel.DOM.root.insert("div", function(){ return beforeDOM; }); + this.DOM.root + .attr("class","kshfChart") + .attr("chart_id",this.id) + .attr("collapsed",this.collapsed) + .attr("filtered",false); + }, + /** -- */ + insertHeader: function(){ + var me = this; + + this.DOM.headerGroup = this.DOM.root.append("div").attr("class","headerGroup") + .on("mousedown", function(){ + if(d3.event.which !== 1) return; // only respond to left-click + if(!me.browser.attribsShown) { + d3.event.preventDefault(); + return; + } + var _this = this; + var _this_nextSibling = _this.parentNode.nextSibling; + var _this_previousSibling = _this.parentNode.previousSibling; + var moved = false; + d3.select("body") + .style('cursor','move') + .on("keydown", function(){ + if(event.keyCode===27){ // ESP key + _this.style.opacity = null; + me.browser.clearDropZones(); + } + }) + .on("mousemove", function(){ + if(!moved){ + _this_nextSibling.style.display = "none"; + _this_previousSibling.style.display = "none"; + _this.parentNode.style.opacity = 0.5; + me.browser.prepareDropZones(me,"browser"); + moved = true; + } + var mousePos = d3.mouse(me.browser.DOM.root[0][0]); + kshf.Util.setTransform(me.browser.DOM.attribDragBox[0][0], + "translate("+(mousePos[0]-20)+"px,"+(mousePos[1]+5)+"px)"); + d3.event.stopPropagation(); + d3.event.preventDefault(); + }) + .on("mouseup", function(){ + // Mouse up on the body + me.browser.clearDropZones(); + if(me.panel!==undefined || true) { + _this.parentNode.style.opacity = null; + _this_nextSibling.style.display = ""; + _this_previousSibling.style.display = ""; + } + d3.event.preventDefault(); + }); + d3.event.preventDefault(); + }) + ; + +// this.DOM.headerGroup.append("div").attr("class","border_line"); + + var header_display_control = this.DOM.headerGroup.append("span").attr("class","header_display_control"); + + header_display_control.append("span").attr("class","buttonSummaryCollapse fa fa-collapse") + .each(function(){ + this.tipsy = new Tipsy(this, { + gravity: function(){ return me.panelOrder!==0?'sw':'nw'; }, + title: function(){ return me.collapsed?kshf.lang.cur.OpenSummary:kshf.lang.cur.MinimizeSummary; } + }) + }) + .on("mouseover",function(){ this.tipsy.show(); }) + .on("mouseout" ,function(){ this.tipsy.hide(); }) + .on("mousedown", function(){ + d3.event.preventDefault(); + d3.event.stopPropagation(); + }) + .on("click",function(){ + this.tipsy.hide(); + me.setCollapsedAndLayout(!me.collapsed); // flip + }) + ; + header_display_control.append("span").attr("class","buttonSummaryExpand fa fa-arrows-alt") + .each(function(){ + this.tipsy = new Tipsy(this, { + gravity: function(){ return me.panelOrder!==0?'sw':'nw'; }, + title: function(){ return kshf.lang.cur.MaximizeSummary; } + }) + }) + .on("mouseover",function(){ this.tipsy.show(); }) + .on("mouseout" ,function(){ this.tipsy.hide(); }) + .on("mousedown", function(){ + d3.event.preventDefault(); + d3.event.stopPropagation(); + }) + .on("click",function(){ + me.panel.collapseAllSummaries(); + me.setCollapsedAndLayout(false); // uncollapse this one + }) + ; + header_display_control.append("span").attr("class","buttonSummaryRemove fa fa-remove") + .each(function(){ + this.tipsy = new Tipsy(this, { + gravity: function(){ return me.panelOrder!==0?'sw':'nw'; }, + title: function(){ return kshf.lang.cur.RemoveSummary; } + }) + }) + .on("mouseover",function(){ this.tipsy.show(); }) + .on("mouseout" ,function(){ this.tipsy.hide(); }) + .on("mousedown", function(){ + d3.event.preventDefault(); + d3.event.stopPropagation(); + }) + .on("click",function(){ + // Clique control + if(false){ + me.parentFacet.show_cliques = !me.parentFacet.show_cliques; + me.parentFacet.DOM.root.attr("show_cliques",me.parentFacet.show_cliques); + } else { + me.removeFromPanel(); + me.clearDOM(); + me.browser.updateLayout(); + } + }) + ; + + this.DOM.summaryTitle = this.DOM.headerGroup.append("span") + .attr("class","summaryTitle editableTextContainer") + .attr("edittitle",false) + .on("click",function(){ if(me.collapsed) me.setCollapsedAndLayout(false); }) + ; + + this.DOM.summaryTitle.append("span").attr("class","chartFilterButtonParent").append("div") + .attr("class","chartClearFilterButton rowFilter alone") + .each(function(d){ + this.tipsy = new Tipsy(this, { + gravity: function(){ return me.panelOrder!==0?'s':'n'; }, + title: function(){ return kshf.lang.cur.RemoveFilter; } + }) + }) + .on("mouseover",function(){ this.tipsy.show(); }) + .on("mouseout" ,function(){ this.tipsy.hide(); }) + .on("mousedown", function(){ + d3.event.preventDefault(); + d3.event.stopPropagation(); + }) + .on("click", function(d,i){ + this.tipsy.hide(); + me.summaryFilter.clearFilter(); + if(sendLog) sendLog(kshf.LOG.FILTER_CLEAR_X, {id:me.summaryFilter.id}); + }) + .append("span").attr("class","fa fa-times") + ; + + this.DOM.summaryTitle_text = this.DOM.summaryTitle.append("span").attr("class","summaryTitle_text editableText") + .attr("contenteditable",false) + .on("mousedown", function(){ + // stop dragging event start + d3.event.stopPropagation(); + }) + .on("blur",function(){ + this.parentNode.setAttribute("edittitle",false); + this.setAttribute("contenteditable", false); + me.browser.changeSummaryName(me.summaryTitle,this.textContent); + }) + .on("keydown",function(){ + if(event.keyCode===13){ // ENTER + this.parentNode.setAttribute("edittitle",false); + this.setAttribute("contenteditable", false); + me.browser.changeSummaryName(me.summaryTitle,this.textContent); + } + }) + .html((this.parentFacet && this.parentFacet.hasCategories())? + (" "+ + this.parentFacet.summaryTitle+": "+" "+this.summaryTitle): + this.summaryTitle + ); + + this.DOM.summaryTitle.append("span") + .attr("class","editTextButton fa") + .each(function(summary){ + this.tipsy = new Tipsy(this, { + gravity: 'w', title: function(){ + var curState=this.parentNode.getAttribute("edittitle"); + if(curState===null || curState==="false"){ + return kshf.lang.cur.EditTitle; + } else { + return "OK"; + } + } + }) + }) + .on("mouseenter",function(){ this.tipsy.show(); }) + .on("mouseleave",function(){ this.tipsy.hide(); }) + .on("mousedown", function(){ + // stop dragging event start + d3.event.stopPropagation(); + d3.event.preventDefault(); + }) + .on("click",function(){ + var curState=this.parentNode.getAttribute("edittitle"); + if(curState===null || curState==="false"){ + this.parentNode.setAttribute("edittitle",true); + var parentDOM = d3.select(this.parentNode); + var v=parentDOM.select(".summaryTitle_text")[0][0]; + v.setAttribute("contenteditable",true); + v.focus(); + } else { + this.parentNode.setAttribute("edittitle",false); + var parentDOM = d3.select(this.parentNode); + var v=parentDOM.select(".summaryTitle_text")[0][0]; + v.setAttribute("contenteditable",false); + me.browser.changeSummaryName(me.summaryTitle,v.textContent); + } + }); + + this.DOM.facetIcons = this.DOM.headerGroup.append("span").attr("class","facetIcons"); + this.DOM.facetIcons.append("span").attr("class", "hasMultiMappings fa fa-tags") + .each(function(d){ + this.tipsy = new Tipsy(this, { + gravity: 'ne', title: function(){ + return "Multiple "+me.summaryTitle+" possible.
Click to show relations."; + } + }); + }) + .on("mouseover",function(d){ + this.tipsy.show(); + }) + .on("mouseout" ,function(d){ + this.tipsy.hide(); + }) + .on("click",function(d){ + me.show_cliques = !me.show_cliques; + me.DOM.root.attr("show_cliques",me.show_cliques); + }) + ; +// this.DOM.headerGroup.append("div").attr("class","border_line border_line_bottom"); + + this.setSummaryDescription(this.summaryDescription); + }, + /** -- */ + setSummaryDescription: function(description){ + if(this.DOM.facetIcons===undefined) return; + if(description===undefined) return; + if(description===null) return; + this.DOM.facetIcons.append("span").attr("class","summaryDescription fa fa-info-circle") + .each(function(d){ + this.tipsy = new Tipsy(this, { gravity: 'ne', title: function(){ return description;} }); + }) + .on("mouseover",function(d){ this.tipsy.show(); }) + .on("mouseout" ,function(d){ this.tipsy.hide(); }); + }, + /** -- */ + insertChartAxis_Measure: function(dom, pos1, pos2){ + var me=this; + this.DOM.chartAxis_Measure = dom.append("div").attr("class","chartAxis_Measure"); + this.DOM.chartAxis_Measure.append("span").attr("class","percentSign") + .each(function(){ + this.tipsy = new Tipsy(this, { + gravity: pos1, title: function(){ + return (me.browser.percentModeActive?"# "+kshf.lang.cur.Absolute:"% "+kshf.lang.cur.Percent)+ + " "; + }, + }) + }) + .on("click",function(){ + me.browser.setPercentMode(!me.browser.percentModeActive); + this.tipsy.hide(); + }) + .on("mouseover",function(){ + me.browser.DOM.root.selectAll(".percentSign").attr("highlight",true); + this.tipsy.show(); + }) + .on("mouseout",function(){ + me.browser.DOM.root.selectAll(".percentSign").attr("highlight",false); + this.tipsy.hide(); + }); + this.DOM.chartAxis_Measure.append("span").attr("class","chartAxis_Measure_background") + .each(function(){ + this.tipsy = new Tipsy(this, { + gravity: pos2, title: function(){ + return (me.browser.ratioModeActive?kshf.lang.cur.Absolute:kshf.lang.cur.Relative)+" "+ + kshf.lang.cur.Width+ + " "; + }, + }) + }) + .on("click",function(){ me.browser.setRatioMode(!me.browser.ratioModeActive); }) + .on("mouseover",function(){ + me.browser.DOM.root.selectAll(".chartAxis_Measure_background").attr("highlight",true); + this.tipsy.show(); + }) + .on("mouseout",function(){ + me.browser.DOM.root.selectAll(".chartAxis_Measure_background").attr("highlight",false); + this.tipsy.hide(); + }); + }, + /** -- */ + setCollapsedAndLayout: function(hide){ + this.setCollapsed(hide); + this.browser.updateLayout_Height(); + if(sendLog) sendLog( (hide===true?kshf.LOG.FACET_COLLAPSE:kshf.LOG.FACET_SHOW), {id:this.id} ); + }, + /** -- */ + unrollCollapsed: function(){ + this.setCollapsed(this.collapsed_pre); + }, + /** -- */ + setCollapsed: function(v){ + this.collapsed_pre = this.collapsed; + this.collapsed = v; + if(this.DOM.root){ + this.DOM.root.attr("collapsed",this.collapsed); + if(!this.collapsed) { + this.clearViz_Preview(); + this.refreshViz_All(); + } else { + this.DOM.headerGroup.select(".buttonSummaryExpand").style("display","none"); + } + } + return this; // allow chaining + }, +}; + +kshf.Summary_Categorical = function(){}; +kshf.Summary_Categorical.prototype = new kshf.Summary_Base(); +var Summary_Categorical_functions = { + /** -- */ + initialize: function(browser,name,attribFunc){ + kshf.Summary_Base.prototype.initialize.call(this,browser,name,attribFunc); + this.type='categorical'; + + this.heightRow_category = 18; + + this.show_cliques = false; + + this.scrollTop_cache=0; + this.cat_InDisplay_First = 0; + this.configRowCount=0; + + // These settings affect the categories + this.minAggrValue=1; + this.removeInactiveCats = true; + + this.catSortBy = []; + + this.isLinked = false; // TODO: document / update + + this.setCatLabel("id"); + + if(this.items.length<=1000) this.initializeAggregates(); + }, + /** -- */ + initializeAggregates: function(){ + if(this.aggr_initialized) return; + if(this.catTableName===undefined){ + this.catTableName = this.summaryTitle+"_h_"+this.id; + this.browser.createTableFromTable(this.items, this.catTableName, this.summaryFunc); + } + if(kshf.dt[this.catTableName]===undefined){ + return false; // Cannot initialize, table not defined. + } + this.mapToAggregates(); + if(this.catSortBy.length===0) this.setSortingOpts(); + if(this.getMaxAggr_Total()!=1 && this._cats.length>1) this.sortCategories(); + + this.aggr_initialized = true; + this.refreshViz_Nugget(); + }, + /** -- */ + refreshViz_Nugget: function(){ + if(this.DOM.nugget===undefined) return; + var nuggetChart = this.DOM.nugget.select(".nuggetChart"); + + this.DOM.nugget + .attr("aggr_initialized",this.aggr_initialized) + .attr("datatype",this.getDataType()); + + if(!this.aggr_initialized) return; + + if(this.uniqueCategories()){ + this.DOM.nugget.select(".nuggetInfo").html("
Unique"); + nuggetChart.style("display",'none'); + return; + } + + var totalWidth= 25; + var maxAggregate_Total = this.getMaxAggr_Total(); + nuggetChart.selectAll(".nuggetBar").data(this._cats).enter() + .append("span").attr("class","nuggetBar") + .style("width",function(cat){ return totalWidth*(cat.items.length/maxAggregate_Total)+"px"; }); + + this.DOM.nugget.select(".nuggetInfo").html( + "
"+ + this._cats.length+"
rows
"); + }, + /** -- */ + getHeight: function(){ + if(!this.hasCategories() || this.collapsed) return this.getHeight_Header(); + return this.getHeight_Header() + this.getHeight_Content(); + }, + /** -- */ + getHeight_Header: function(){ + if(this._height_header==undefined) { + this._height_header = this.DOM.headerGroup[0][0].offsetHeight; + if(this.hasSubFacets()){ + this._height_header+=2; + } + } + return this._height_header; + }, + /** -- */ + getHeight_RangeMax: function(){ + if(!this.hasCategories()) return this.heightRow_category; + return this.getHeight_Header()+(this.configRowCount+this.catCount_Visible+1)*this.heightRow_category-1; + }, + /** -- */ + getHeight_RangeMin: function(){ + if(!this.hasCategories()) return this.getHeight_Header(); + return this.getHeight_Header()+this.getHeight_Config()+(Math.min(this.catCount_Visible,2)+1)*this.heightRow_category; + }, + /** -- */ + getHeight_Config: function(){ + var r=0; + if(this.configRowCount!=0) r+=1; // bottom border : 1 px + if(this.showTextSearch) r+=18; + if(this.catSortBy.length>1) r+=17; + return r; + }, + /** -- */ + getHeight_Bottom: function(){ + if(!this.areAllCatsInDisplay() || !this.panel.hideBarAxis || this.catCount_Total>4) return 18; + return 0; + }, + /** -- */ + getHeight_Content: function(){ + return this.attribHeight + this.getHeight_Config() + this.getHeight_Bottom(); + }, + /** -- */ + getWidth_Label: function(){ + return this.panel.width_catLabel-this.getWidth_LeftOffset(); + }, + /** -- */ + areAllCatsInDisplay: function(){ + return this.catCount_Visible===this.catCount_InDisplay; + }, + /** -- */ + hasCategories: function(){ + if(this._cats && this._cats.length===0) return false; + return this.summaryFunc!==undefined; + }, + /** -- */ + uniqueCategories: function(){ + return this.getMaxAggr_Total()===1; + }, + /** -- */ + insertSortingOption: function(opt){ + this.catSortBy.push( this.prepareSortingOption(opt) ); + }, + /** -- */ + prepareSortingOption: function(opt){ + opt.inverse = opt.inverse || false; // Default is false + if(opt.value){ + if(typeof(opt.value)==="string"){ + opt.name = x; + var x = opt.value; + opt.value = function(){ return this[x]; } + } else if(typeof(opt.value)==="function"){ + if(opt.name===undefined) opt.name = "custom" + } + if(opt.no_resort===undefined) opt.no_resort = true; + } else { + opt.name = opt.name || "# of Active"; + } + if(opt.no_resort===undefined) opt.no_resort = (this.catCount_Total<=4); + return opt; + }, + /** -- */ + setSortingOpts: function(opts){ + this.catSortBy = opts || {}; + if(!Array.isArray(this.catSortBy)){ + this.catSortBy = [this.catSortBy]; + } + + this.catSortBy.forEach(function(opt,i){ + if(typeof opt==="string" || typeof opt==="function"){ + this.catSortBy[i] = {value: opt}; + } + },this); + + this.catSortBy.forEach(function(opt){ + this.prepareSortingOption(opt); + },this); + + this.catSortBy_Active = this.catSortBy[0]; + + this.updateCatSorting(0,true,true); + this.refreshSortOptions(); + this.refreshSortButton(); + }, + /** -- */ + setCatLabel: function( catLabel ){ + if(typeof(catLabel)==="function"){ + this.catLabel = catLabel; + } else if(typeof(catLabel)==="string" || typeof(catLabel)=="number"){ + var x = catLabel; + this.catLabel = function(){ return this[x]; }; + } else { + return; + } + var me=this; + if(this.DOM.theLabel) + this.DOM.theLabel.html(function(cat){ return me.catLabel.call(cat.data); }); + }, + /** -- */ + setCatTooltip: function( catTooltip ){ + if(typeof(catTooltip)==="function"){ + this.catTooltip = catTooltip; + } else if(typeof(catTooltip)==="string"){ + var x = catTooltip; + this.catTooltip = function(){ return this[x]; }; + } else { + return; + } + if(this.DOM.cats) + this.DOM.cats.attr("title",function(cat){ return me.catTooltip.call(cat.data); }); + }, + /** -- */ + setCatTable: function(tableName){ + this.catTableName = tableName; + if(tableName===""){ + this.catTableName = this.summaryTitle+"_h_"+this.id; + } else { + if(this.catTableName===this.browser.primaryTableName){ + this.isLinked=true; + //this.browser.listDef.hasLinkedItems = true; + this.catTableName = this.summaryTitle+"_h_"+this.id; + kshf.dt_id[this.catTableName] = kshf.dt_id[this.browser.primaryTableName]; + kshf.dt[this.catTableName] = this.items.slice(); + } + } + if(this.aggr_initialized){ + this.mapToAggregates(); + this.updateCats(); + } + }, + /** -- */ + createSummaryFilter: function(){ + var me=this; + this.summaryFilter = this.browser.createFilter({ + parentSummary: this, + onClear: function(summary){ + summary.clearCatTextSearch(); + summary.unselectAllAttribs(); + summary._update_Selected(); + }, + onFilter: function(summary){ + // at least one category is selected in some modality (and/ or/ not) + summary._update_Selected(); + + var filterId = this.id; + + summary.items.forEach(function(item){ + var recordVal_s=item.mappedDataCache[filterId]; + + if(recordVal_s===null){ + // survives if AND and OR is not selected + item.setFilterCache(filterId, this.selected_AND.length===0 && this.selected_OR.length===0 ); + return; + } + + // Check NOT selections - If any mapped item is NOT, return false + // Note: no other filtering depends on NOT state. + // This is for ,multi-level filtering using not query + /* if(this.selected_NOT.length>0){ + if(!recordVal_s.every(function(item){ + return !item.is_NOT() && item.isWanted; + })){ + item.setFilterCache(filterId,false); return; + } + }*/ + + // If any of the record values are selected with NOT, the item will be removed + if(this.selected_NOT.length>0){ + if(!recordVal_s.every(function(val){ return !val.is_NOT(); })){ + item.setFilterCache(filterId,false); return; + } + } + // All AND selections must be among the record values + if(this.selected_AND.length>0){ + // Compute the number of record values selected with AND. + var t=0; + recordVal_s.forEach(function(m){ if(m.is_AND()) t++; }) + if(t!==this.selected_AND.length){ + item.setFilterCache(filterId,false); return; + } + } + // One of the OR selections must be among the item values + // Check OR selections - If any mapped item is OR, return true + if(this.selected_OR.length>0){ + item.setFilterCache(filterId, recordVal_s.some(function(d){return (d.is_OR());}) ); + return; + } + // only NOT selection + item.setFilterCache(filterId,true); + }, this); + }, + filterView_Detail: function(){ + // 'this' is the Filter + // go over all items and prepare the list + var selectedItemsText=""; + var catTooltip = me.catTooltip; + + var totalSelectionCount = this.selectedCount_Total(); + + if(me.subFacets.some(function(summary){ return summary.isFiltered();})){ + return " ";; + } + + var query_and = " "+kshf.lang.cur.And+" "; + var query_or = " "+kshf.lang.cur.Or+" "; + var query_not = " "+kshf.lang.cur.Not+" "; + + if(totalSelectionCount>4 || this.linkFilterSummary){ + selectedItemsText = ""+totalSelectionCount+" selected"; + // Note: Using selected because selections can include not, or,and etc (a variety of things) + } else { + var selectedItemsCount=0; + + // OR selections + if(this.selected_OR.length>0){ + var useBracket_or = this.selected_AND.length>0 || this.selected_NOT.length>0; + if(useBracket_or) selectedItemsText+="["; + // X or Y or .... + this.selected_OR.forEach(function(attrib,i){ + selectedItemsText+=((i!==0 || selectedItemsCount>0)?query_or:"")+"" + +me.catLabel.call(attrib.data)+""; + selectedItemsCount++; + }); + if(useBracket_or) selectedItemsText+="]"; + } + // AND selections + this.selected_AND.forEach(function(attrib,i){ + selectedItemsText+=((selectedItemsText!=="")?query_and:"") + +""+me.catLabel.call(attrib.data)+""; + selectedItemsCount++; + }); + // NOT selections + this.selected_NOT.forEach(function(attrib,i){ + selectedItemsText+=query_not+""+me.catLabel.call(attrib.data)+""; + selectedItemsCount++; + }); + } + if(this.linkFilterSummary){ + selectedItemsText+= "
["+this.linkFilterSummary+"]"; + } + + return selectedItemsText; + } + }); + + this.summaryFilter.selected_AND = []; + this.summaryFilter.selected_OR = []; + this.summaryFilter.selected_NOT = []; + this.summaryFilter.selectedCount_Total = function(){ + return this.selected_AND.length + this.selected_OR.length + this.selected_NOT.length; + }; + this.summaryFilter.selected_Any = function(){ + return this.selected_AND.length>0 || this.selected_OR.length>0 || this.selected_NOT.length>0; + }; + this.summaryFilter.selected_All_clear = function(){ + kshf.Util.clearArray(this.selected_AND); + kshf.Util.clearArray(this.selected_OR); + kshf.Util.clearArray(this.selected_NOT); + }; + }, + /** -- */ + insertSubFacets: function(){ + this.DOM.subFacets=this.DOM.root.append("div").attr("class","subFacets"); + + this.DOM.subFacets.append("span").attr("class","facetGroupBar").append("span").attr("class","facetGroupBarSub"); + + if(!this.hasCategories()){ + this.options.facets.forEach(function(facetDescr){ + facetDescr.parentFacet = this; + facetDescr.panel = this.panel; + var fct=this.browser.addFacet(facetDescr,this.browser.primaryTableName); + this.subFacets.push(fct); + },this); + } else { + this.options.facets.forEach(function(facetDescr){ + facetDescr.parentFacet = this; + facetDescr.panel = this.panel; + facetDescr.items = this._cats; + var fct=this.browser.addFacet(facetDescr,this.catTableName); + this.subFacets.push(fct); + },this); + } + + // Init facet DOMs after all facets are added / data mappings are completed + this.subFacets.forEach(function(summary){ summary.initDOM(); }); + }, + /** -- + * Note: accesses summaryFilter, summaryFunc + */ + mapToAggregates: function(){ + var filterId = this.summaryFilter.id, me=this; + + var targetTable_id = {}; + var targetTable = []; + kshf.dt[this.catTableName].forEach(function(srcI){ + var i = new kshf.Item(srcI.data,srcI.idIndex); + targetTable_id[i.id()] = i; + targetTable.push(i); + }); + this.catTable = targetTable; + var maxDegree = 0; + this.items.forEach(function(item){ + item.mappedDataCache[filterId] = null; // default mapping to null + + var mapping = this.summaryFunc.call(item.data,item); + if(mapping===undefined || mapping==="" || mapping===null) + return; + if(mapping instanceof Array){ + var found = {}; + mapping = mapping.filter(function(e){ + if(e===undefined || e==="" || e===null) return false; // remove invalid values + if(found[e]===undefined){ found[e] = true; return true; } // remove duplicate values + return false; + }); + if(mapping.length===0) return; // empty array - checked after removing invalid/duplicates + } else { + mapping = [mapping]; + } + maxDegree = Math.max(maxDegree, mapping.length); + + item.mappedDataCache[filterId] = []; + mapping.forEach(function(a){ + var m=targetTable_id[a]; + if(m==undefined) return; + item.mappedDataCache[filterId].push(m); + m.addItem(item); + }); + }, this); + + this.hasMultiValueItem = maxDegree>1; + + // TODO: Fix!!!! + // add degree filter if attrib has multi-value items and set-vis is enabled + if(this.hasMultiValueItem && this.enableSetVis){ + var fscale; + if(maxDegree>100) fscale = 'log'; + else if(maxDegree>10) fscale = 'linear'; + else fscale = 'step'; + // TODO: FIX!!! + var facetDescr = { + title:" # of "+this.summaryTitle, + value: function(d){ + var arr=d.mappedDataCache[filterId]; + if(arr==null) return 0; + return arr.length; + }, + parentFacet: this.parentFacet, + collapsed: true, + type: 'interval', + intervalScale: fscale, + layout: this.panel + }; + this.browser.addFacet(facetDescr,this.browser.primaryTableName); + } + + this.updateCats(); + + this.unselectAllAttribs(); + }, + // TODO: Check how isLinked and dataMap (old variable) affected this calculations... + // Modified internal dataMap function - Skip rows with 0 active item count + setMinAggrValue: function(v){ + this.minAggrValue = Math.max(1,v); + this.updateCats(); + }, + /** -- */ + updateCats: function(){ + this._cats = this.catTable.filter(function(cat){ + return cat.items.length>=this.minAggrValue; + },this); + this.updateCatCount_Total(); + this.updateCatCount_Visible(); + }, + /** -- */ + updateCatCount_Total: function(){ + this.catCount_Total = this._cats.length; + this.catCount_Wanted = this.catCount_Total; + if(this.catCount_Total===1){ + this.catBarScale = "scale_frequency"; + } + if(this.catCount_Total<=4) { + this.catSortBy.forEach(function(opt){ opt.no_resort=true; }); + } + this.showTextSearch = this.catCount_Total>=20; + }, + /** -- */ + updateCatCount_Wanted: function(){ + this.catCount_Wanted = 0; + this._cats.forEach(function(cat){ if(cat.isWanted) this.catCount_Wanted++; },this); + }, + /** -- */ + updateCatCount_Visible: function(){ + this.catCount_Visible = 0; + this.catCount_NowVisible = 0; + this.catCount_NowInvisible = 0; + this._cats.forEach(function(cat){ + v = this.isAttribVisible(cat); + cat.isVisible_before = cat.isVisible; + cat.isVisible = v; + if(!cat.isVisible && cat.isVisible_before) this.catCount_NowInvisible++; + if(cat.isVisible && !cat.isVisible_before) this.catCount_NowVisible++; + if(cat.isVisible) this.catCount_Visible++; + },this); + }, + /** -- */ + initDOM: function(beforeDOM){ + this.initializeAggregates(); + + if(this.DOM.inited===true) return; + var me = this; + + this.insertRoot(beforeDOM); + + this.DOM.root + .attr("filtered_or",0) + .attr("filtered_and",0) + .attr("filtered_not",0) + .attr("filtered_total",0) + .attr("hasMultiValueItem",this.hasMultiValueItem) + .attr("refreshSorting",false) + ; + + this.insertHeader(); + + if(this.hasCategories()) this.init_DOM_Cat(); + + // TODO: Insert subfacets here + if(this.facets){ + this.DOM.root.attr("hasFacets",true); + this.insertSubFacets(); + // no-attrib facets (hierarchy parents) still need to adjust their header position + this.refreshLabelWidth(); + } + + this.setCollapsed(this.collapsed); + + this.DOM.inited = true; + }, + /** -- */ + refreshConfigRowCount: function(){ + this.configRowCount = 0; + if(this.showTextSearch){ + this.configRowCount++; + } + if(this.catSortBy.length>1) { + this.configRowCount++; + } + if(this.configRowCount>0){ + this.DOM.facetControls.style("display","block"); + } + }, + /** -- */ + init_DOM_Cat: function(){ + var me=this; + this.DOM.wrapper = this.DOM.root.append("div").attr("class","wrapper"); + + this.DOM.facetCategorical = this.DOM.wrapper.append("div").attr("class","facetCategorical") + ; + + // create config row(s) if needed + this.DOM.facetControls = this.DOM.facetCategorical.append("div").attr("class","facetControls"); + this.initDOM_CatTextSearch(); + this.initDOM_CatSortButton(); + this.initDOM_CatSortOpts(); + + if(this.showTextSearch){ + this.DOM.attribTextSearch.style("display","block"); + } + this.refreshConfigRowCount(); + + this.DOM.scrollToTop = this.DOM.facetCategorical.append("div").attr("class","scrollToTop fa fa-arrow-up") + .each(function(){ + this.tipsy = new Tipsy(this, {gravity: 'e', title: function(){ return kshf.lang.cur.ScrollToTop; }}); + }) + .on("mouseover",function(){ this.tipsy.show(); }) + .on("mouseout" ,function(){ this.tipsy.hide(); }) + .on("click",function(d){ + this.tipsy.hide(); + kshf.Util.scrollToPos_do(me.DOM.attribGroup[0][0],0); + if(sendLog) sendLog(kshf.LOG.FACET_SCROLL_TOP, {id:me.id} ); + }) + ; + + this.DOM.attribGroup = this.DOM.facetCategorical.append("div").attr("class","attribGroup") + .on("mousedown",function(){ + d3.event.stopPropagation(); + d3.event.preventDefault(); + }) + .on("scroll",function(d){ + if(kshf.Util.ignoreScrollEvents===true) return; + me.scrollTop_cache = me.DOM.attribGroup[0][0].scrollTop; + + me.DOM.scrollToTop.style("visibility", me.scrollTop_cache>0?"visible":"hidden"); + + me.cat_InDisplay_First = Math.floor(me.scrollTop_cache/me.heightRow_category); + me.refreshScrollDisplayMore(me.cat_InDisplay_First+me.catCount_InDisplay); + me.updateAttribCull(); + me.cullAttribs(); + me.refreshMeasureLabel(); + + me.browser.pauseResultPreview = true; + if(this.pauseTimer) clearTimeout(this.pauseTimer); + this.pauseTimer = setTimeout(function(){me.browser.pauseResultPreview=false;}, 200); + }); + // with this, I make sure that the (scrollable) div height is correctly set to visible number of categories + this.DOM.chartBackground = this.DOM.attribGroup.append("span").attr("class","chartBackground"); + + this.DOM.chartCatLabelResize = this.DOM.attribGroup.append("span").attr("class","chartCatLabelResize dragWidthHandle") + .on("mousedown", function (d, i) { + var resizeDOM = this; + me.panel.DOM.root.attr("catLabelDragging",true); + + me.browser.DOM.pointerBlock.attr("active",""); + me.browser.DOM.root.style('cursor','col-resize'); + me.browser.setNoAnim(true); + var mouseDown_x = d3.mouse(d3.select("body")[0][0])[0]; + var initWidth = me.panel.width_catLabel; + + d3.select("body").on("mousemove", function() { + var mouseDown_x_diff = d3.mouse(d3.select("body")[0][0])[0]-mouseDown_x; + me.panel.setWidthCatLabel(initWidth+mouseDown_x_diff); + }).on("mouseup", function(){ + me.panel.DOM.root.attr("catLabelDragging",false); + me.browser.DOM.pointerBlock.attr("active",null); + me.browser.DOM.root.style('cursor','default'); + me.browser.setNoAnim(false); + d3.select("body").on("mousemove", null).on("mouseup", null); + }); + d3.event.preventDefault(); + }); + + this.DOM.belowAttribs = this.DOM.facetCategorical.append("div").attr("class","belowAttribs"); + this.DOM.belowAttribs.append("div").attr("class", "border_line"); + + this.insertChartAxis_Measure(this.DOM.belowAttribs,'e','e'); + + this.DOM.scroll_display_more = this.DOM.belowAttribs.append("div").attr("class","hasLabelWidth") + .append("span").attr("class","scroll_display_more") + .on("click",function(){ + kshf.Util.scrollToPos_do( + me.DOM.attribGroup[0][0],me.DOM.attribGroup[0][0].scrollTop+me.heightRow_category); + if(sendLog) sendLog(kshf.LOG.FACET_SCROLL_MORE, {id:me.id}); + }); + + this.insertCategories(); + + this.refreshLabelWidth(); + + this.updateCatSorting(0,true,true); + }, + /** -- */ + initDOM_CatSortButton: function(){ + var me=this; + this.DOM.catSortButton = this.DOM.facetControls.append("span").attr("class","catSortButton sortButton fa") + .on("click",function(d){ + if(me.dirtySort){ + me.dirtySort = false; + me.DOM.root.attr("refreshSorting",false); + } else{ + me.catSortBy_Active.inverse = me.catSortBy_Active.inverse?false:true; + me.refreshSortButton(); + } + me.updateCatSorting(0,true); + }) + .each(function(){ + this.tipsy = new Tipsy(this, { + gravity: 'w', title: function(){ + return me.dirtySort?kshf.lang.cur.Reorder:kshf.lang.cur.ReverseOrder; + } + }) + }) + .on("mouseover",function(){ this.tipsy.show(); }) + .on("mouseout" ,function(){ this.tipsy.hide(); }); + this.refreshSortButton(); + }, + /** -- */ + initDOM_CatSortOpts: function(){ + var me=this; + var x = this.DOM.facetControls.append("span").attr("class","sortOptionSelectGroup hasLabelWidth"); + + this.DOM.optionSelect = x.append("select").attr("class","optionSelect") + .on("change", function(){ + me.catSortBy_Active = me.catSortBy[this.selectedIndex]; + me.refreshSortButton(); + me.updateCatSorting(0,true); + if(sendLog) sendLog(kshf.LOG.FACET_SORT, {id:me.id, info:this.selectedIndex}); + }) + + this.refreshSortOptions(); + }, + /** -- */ + refreshSortButton: function(){ + if(this.DOM.catSortButton===undefined) return; + this.DOM.catSortButton + //.style("display",(this.catSortBy_Active.no_resort?"none":"inline-block")) + .style("display","inline-block") + .attr("inverse",this.catSortBy_Active.inverse); + }, + /** -- */ + refreshSortOptions: function(){ + if(this.DOM.optionSelect===undefined) return; + + this.refreshConfigRowCount(); + + this.DOM.optionSelect.style("display", (this.catSortBy.length>1)?"block":"none" ); + + this.DOM.optionSelect.selectAll(".sort_label").data([]).exit().remove(); // remove all existing options + + var x= this.DOM.optionSelect.selectAll(".sort_label") + .data(this.catSortBy) + .enter().append("option").attr("class", "sort_label").text(function(d){ return d.name; }); + }, + /** -- */ + initDOM_CatTextSearch: function(){ + var me=this; + this.DOM.attribTextSearch = this.DOM.facetControls.append("div").attr("class","attribTextSearch hasLabelWidth"); + this.DOM.attribTextSearchControl = this.DOM.attribTextSearch.append("span") + .attr("class","attribTextSearchControl fa") + .on("click",function() { me.summaryFilter.clearFilter(); }); + this.DOM.attribTextSearchInput = this.DOM.attribTextSearch.append("input") + .attr("class","attribTextSearchInput") + .attr("type","text") + .attr("placeholder",kshf.lang.cur.Search) +// .on("mousedown",function(){alert('sdsdd');}) + .on("input",function(){ + if(this.timer){ + clearTimeout(this.timer); + } + var x = this; + this.timer = setTimeout( function(){ + var v=x.value.toLowerCase(); + if(v===""){ + me.summaryFilter.clearFilter(); + } else { + me.DOM.attribTextSearchControl.attr("showClear",true); + me.summaryFilter.selected_All_clear(); + me._cats.forEach(function(attrib){ + if(me.catLabel.call(attrib.data).toString().toLowerCase().indexOf(v)!==-1){ + attrib.set_OR(me.summaryFilter.selected_OR); + } else { + // search in tooltiptext + if(me.catTooltip){ + var tooltipText = me.catTooltip.call(attrib.data); + if(tooltipText && tooltipText.toLowerCase().indexOf(v)!==-1) { + attrib.set_OR(me.summaryFilter.selected_OR); + } + } else{ + attrib.set_NONE(); + } + } + }); + if(me.summaryFilter.selectedCount_Total()===0){ + me.summaryFilter.clearFilter(); + } else { + me.summaryFilter.how = "All"; + me.summaryFilter.addFilter(true); + me.summaryFilter.linkFilterSummary = ""; + if(sendLog) sendLog(kshf.LOG.FILTER_TEXTSEARCH, {id:me.summaryFilter.id, info:v}); + } + } + }, 750); + }) + ; + }, + /** returns the maximum active aggregate value per row in chart data */ + getMaxAggr_Active: function(){ + return d3.max(this._cats, function(cat){ return cat.aggregate_Active; }); + }, + /** returns the maximum total aggregate value stored per row in chart data */ + getMaxAggr_Total: function(){ + if(this._cats===undefined) return 0; + var subMax=0; + // recurse + if(this.subFacets.length>0){ + subMax = d3.max(this.subFacets, function(f){ return f.getMaxAggr_Total(v); }); + } + if(!this.hasCategories()) return subMax; + if(this._maxBarValueMaxPerAttrib) return this._maxBarValueMaxPerAttrib; + this._maxBarValueMaxPerAttrib = d3.max(this._cats, function(d){ return d.aggregate_Total;}); + return this._maxBarValueMaxPerAttrib; + }, + /** -- */ + _update_Selected: function(){ + if(this.DOM.root) { + this.DOM.root + .attr("filtered",this.isFiltered()) + .attr("filtered_or",this.summaryFilter.selected_OR.length) + .attr("filtered_and",this.summaryFilter.selected_AND.length) + .attr("filtered_not",this.summaryFilter.selected_NOT.length) + .attr("filtered_total",this.summaryFilter.selectedCount_Total()) + ; + } + var show_box = (this.summaryFilter.selected_OR.length+this.summaryFilter.selected_AND.length)>1; + this.summaryFilter.selected_OR.forEach(function(attrib){ + attrib.DOM.facet.setAttribute("show-box",show_box); + },this); + this.summaryFilter.selected_AND.forEach(function(attrib){ + attrib.DOM.facet.setAttribute("show-box",show_box); + },this); + this.summaryFilter.selected_NOT.forEach(function(attrib){ + attrib.DOM.facet.setAttribute("show-box","true"); + },this); + }, + /** -- */ + unselectAllAttribs: function(){ + this._cats.forEach(function(cat){ + if(cat.f_selected() && cat.DOM.facet) cat.DOM.facet.setAttribute("highlight",false); + cat.set_NONE(); + }); + this.summaryFilter.selected_All_clear(); + }, + /** -- */ + selectAllAttribsButton: function(){ + this._cats.forEach(function(attrib){ + if(!attrib.selectedForLink) return; + attrib.set_OR(this.summaryFilter.selected_OR); + },this); + this._update_Selected(); + this.summaryFilter.how="All"; + this.summaryFilter.addFilter(true); + if(sendLog) sendLog(kshf.LOG.FILTER_ATTR_ADD_OR_ALL, {id: this.summaryFilter.id} ); + }, + /** -- */ + setCollapsed: function(v){ + kshf.Summary_Base.prototype.setCollapsed.call(this,v); + // collapse children only if this is a hierarchy, not sub-filtering + if(this.hasSubFacets() && !this.hasCategories()){ + this.subFacets.forEach(function(f){ f.setCollapsed(v); }); + } + return this; // allow chaining + }, + /** -- */ + clearCatTextSearch: function(){ + if(!this.showTextSearch) return; + this.DOM.attribTextSearchControl.attr("showClear",false); + this.DOM.attribTextSearchInput[0][0].value = ''; + }, + /** -- */ + scrollBarShown: function(){ + return this.attribHeightthis.catCount_Visible) c=this.catCount_Visible; + if(this.catCount_Visible<=2){ + c = this.catCount_Visible; + } else { + c = Math.max(c,2); + } + this.catCount_InDisplay = c+1; + this.catCount_InDisplay = Math.min(this.catCount_InDisplay,this.catCount_Visible); + + this.refreshScrollDisplayMore(this.cat_InDisplay_First+this.catCount_InDisplay); + + this.updateAttribCull(); + this.cullAttribs(); + + this.DOM.headerGroup.select(".buttonSummaryExpand").style("display", + (this.panel.getNumOfOpenSummaries()<=1||this.areAllCatsInDisplay())? + "none": + "inline-block" + ); + + this.updateBarPreviewScale2Active(); + + if(this.cbSetHeight && attribHeight_old!==attribHeight_new) this.cbSetHeight(this); + }, + /** -- */ + updateAfterFilter: function(resultChange){ + if(!this.hasCategories()) return; + this.refreshMeasureLabel(); + this.updateBarPreviewScale2Active(); + + if(this.show_cliques) { + this.dirtySort = true; + this.DOM.root.attr("refreshSorting",true); + } + + if(!this.dirtySort) { + this.updateCatSorting(); + } else { + this.refreshViz_All(); + this.refreshViz_Active(); + } + }, + /** -- */ + refreshWidth: function(){ + if(this.DOM.facetCategorical){ + this.DOM.facetCategorical.style("width",this.getWidth()+"px"); + this.DOM.summaryTitle.style("max-width",(this.getWidth()-40)+"px"); + this.DOM.chartAxis_Measure.select(".chartAxis_Measure_background") + .style("width",(this.getWidth()-this.panel.width_catMeasureLabel-this.getWidth_Label())+"px"); + this.refreshViz_Axis(); + } + }, + /** -- */ + refreshMeasureLabel: function(){ + if(!this.hasCategories()) return; + if(this.browser.previewedSelectionSummary===this && !this.hasMultiValueItem) return; + + var me=this; + + this.DOM.cats.attr("noitems",function(aggr){ return !me.isAttribSelectable(aggr); }); + + this.DOM.measureLabel.each(function(attrib){ + if(attrib.isCulled) return; + var p=attrib.aggregate_Preview; + if(me.browser.vizPreviewActive){ + if(me.browser.preview_not) + p = attrib.aggregate_Active-attrib.aggregate_Preview; + else + p = attrib.aggregate_Preview; + } else { + p = attrib.aggregate_Active; + } + if(me.browser.percentModeActive){ + if(attrib.aggregate_Active===0){ + this.textContent = ""; + } else { + if(me.browser.ratioModeActive){ + if(!me.browser.vizPreviewActive){ + this.textContent = ""; + return; + } + p = 100*p/attrib.aggregate_Active; + } else { + p = 100*p/me.browser.itemsWanted_Aggregrate_Total; + } + if(p<0) p=0; + this.textContent = p.toFixed(0)+"%"; + } + } else { + if(p<0) p=0; + this.textContent = kshf.Util.formatForItemCount(p); + } + }); + }, + /** -- */ + refreshViz_All: function(){ + if(!this.hasCategories() || this.collapsed) return; + var me=this; + this.refreshViz_Total(); + this.refreshViz_Active(); + + this.DOM.aggr_Preview.attr("fast",null); // take it slow for result preview animations + this.refreshViz_Preview(); + setTimeout(function(){ me.DOM.aggr_Preview.attr("fast",true); },800); + + this.refreshViz_Compare(); + this.refreshMeasureLabel(); + this.refreshViz_Axis(); + }, + /** -- */ + refreshViz_Total: function(){ + if(!this.hasCategories() || this.collapsed) return; + var me = this; + // Do not need to update total. Total value is invisible. Percent view is based on active count. + if(!this.browser.ratioModeActive){ + this.DOM.aggr_Total.each(function(attrib){ + kshf.Util.setTransform(this, + "scaleX("+me.chartScale_Measure(attrib.aggregate_Total)+")"); + }); + this.DOM.aggr_TotalTip.each(function(attrib){ + kshf.Util.setTransform(this, + "translateX("+me.chartScale_Measure(attrib.aggregate_Total)+"px)"); + }).style("opacity",function(attrib){ + return (attrib.aggregate_Total>me.chartScale_Measure.domain()[1])?1:0; + }); + } else { + this.DOM.aggr_TotalTip.style("opacity",0); + } + }, + /** -- */ + refreshViz_Active: function(){ + if(!this.hasCategories() || this.collapsed) return; + var me=this, ratioMode=this.browser.ratioModeActive, maxWidth = this.chartScale_Measure.range()[1]; + var width_Text = this.getWidth_Label()+this.panel.width_catMeasureLabel; + this.DOM.aggr_Active.each(function(category){ + kshf.Util.setTransform(this,"scaleX("+(ratioMode? + ((category.aggregate_Active===0)?0:maxWidth): + me.chartScale_Measure(category.aggregate_Active) + )+")"); + }); + var func_clickAreaScale=function(category){ + return width_Text+(ratioMode? + ((category.aggregate_Active===0)?0:maxWidth): + me.chartScale_Measure(category.aggregate_Active) + )+"px"; + }; + this.DOM.attribClickArea.style("width",func_clickAreaScale); + this.DOM.compareButton + .style("left",func_clickAreaScale) + .attr("inside",function(category){ + if(ratioMode) return ""; + if(maxWidth-me.chartScale_Measure(category.aggregate_Active)<10) return ""; + }); + }, + /** -- */ + refreshViz_Preview: function(){ + if(!this.hasCategories() || this.collapsed) return; + var me=this, ratioMode=this.browser.ratioModeActive, maxWidth = this.chartScale_Measure.range()[1]; + this.DOM.aggr_Preview.each(function(aggr){ + var p=aggr.aggregate_Preview; + if(me.browser.preview_not) p = aggr.aggregate_Active-p; + kshf.Util.setTransform(this,"scaleX("+( + ratioMode ? ((p/aggr.aggregate_Active)*maxWidth ) : me.chartScale_Measure(p) + )+")"); + }); + this.refreshMeasureLabel(); + }, + /** Gets the active previewed value, and stores it in the cache */ + cachePreviewValue: function(){ + if(!this.hasCategories() || this.collapsed) return; + var preview_not=this.browser.preview_not; + this.DOM.aggr_Preview.each(function(aggr){ + aggr.aggregate_Compare = aggr.aggregate_Preview; + if(preview_not) { + aggr.aggregate_Compare = aggr.aggregate_Active-aggr.aggregate_Compare; + } + }); + }, + /** -- */ + refreshViz_Compare: function(){ + if(!this.hasCategories() || this.collapsed) return; + if(!this.browser.vizCompareActive) return; + var me=this, ratioMode=this.browser.ratioModeActive, maxWidth = this.chartScale_Measure.range()[1]; + if(this.browser.vizCompareActive){ + this.DOM.aggr_Compare.each(function(cat){ + kshf.Util.setTransform(this,"scaleX("+( + ratioMode ? ((cat.aggregate_Compare/cat.aggregate_Active)*maxWidth) : me.chartScale_Measure(cat.aggregate_Compare) + )+")"); + }); + } + }, + /** -- */ + clearViz_Preview: function(){ + if(!this.hasCategories()) return; + this._cats.forEach(function(cat){ + cat.updatePreview_Cache = false; + }); + if(this.collapsed) return; + this.DOM.aggr_Preview.each(function(cat){ + cat.aggregate_Preview=0; + if(cat.aggregate_Compare===0) return; + kshf.Util.setTransform(this,"scaleX(0)"); + }); + this.refreshMeasureLabel(); + }, + /** -- */ + refreshViz_Axis: function(){ + if(!this.hasCategories()) return; + var me=this; + + var tickValues; + var transformFunc; + + var maxValue; + + var chartWidth = this.getWidth_CatChart(); + + if(this.browser.ratioModeActive) { + maxValue = 100; + tickValues = d3.scale.linear() + .rangeRound([0, chartWidth]) + .nice(this.chartAxis_Measure_TickSkip()) + .clamp(true) + .domain([0,100]) + .ticks(this.chartAxis_Measure_TickSkip()); + } else { + if(this.browser.percentModeActive) { + maxValue = Math.round(100*me.getMaxAggr_Active()/me.browser.itemsWantedCount); + tickValues = d3.scale.linear() + .rangeRound([0, chartWidth]) + .nice(this.chartAxis_Measure_TickSkip()) + .clamp(true) + .domain([0,maxValue]) + .ticks(this.chartAxis_Measure_TickSkip()); + } else { + tickValues = this.chartScale_Measure.ticks(this.chartAxis_Measure_TickSkip()) + } + } + + // remove non-integer values & 0... + tickValues = tickValues.filter(function(d){return d%1===0&&d!==0;}); + + var tickDoms = this.DOM.chartAxis_Measure.selectAll("span.tick").data(tickValues,function(i){return i;}); + + if(this.browser.ratioModeActive){ + transformFunc=function(d){ + kshf.Util.setTransform(this,"translateX("+(d*chartWidth/100-0.5)+"px)"); + }; + } else { + if(this.browser.percentModeActive) { + transformFunc=function(d){ + kshf.Util.setTransform(this,"translateX("+((d/maxValue)*chartWidth-0.5)+"px)"); + }; + } else { + transformFunc=function(d){ + kshf.Util.setTransform(this,"translateX("+(me.chartScale_Measure(d)-0.5)+"px)"); + }; + } + } + + var x=this.browser.noAnim; + + if(x===false) this.browser.setNoAnim(true); + var tickData_new=tickDoms.enter().append("span").attr("class","tick").each(transformFunc); + if(x===false) this.browser.setNoAnim(false); + + // translate the ticks horizontally on scale + tickData_new.append("span").attr("class","line") + .style("top","-"+(this.attribHeight+3)+"px") + .style("height",(this.attribHeight-1)+"px"); + + if(this.browser.ratioModeActive){ + tickData_new.append("span").attr("class","text").text(function(d){return d;}); + } else { + tickData_new.append("span").attr("class","text").text(function(d){return d3.format("s")(d);}); + } + if(this.configRowCount>0){ + var h=this.attribHeight; + var hm=tickData_new.append("span").attr("class","text text_upper").style("top",(-h-19)+"px"); + if(this.browser.ratioModeActive){ + hm.text(function(d){return d;}); + } else { + hm.text(function(d){return d3.format("s")(d);}); + } + } + + setTimeout(function(){ + me.DOM.chartAxis_Measure.selectAll("span.tick").style("opacity",1).each(transformFunc); + }); + + tickDoms.exit().remove(); + }, + /** -- */ + refreshLabelWidth: function(){ + if(!this.hasCategories()) return; + if(this.DOM.facetCategorical===undefined) return; + var labelWidth = this.getWidth_Label(); + var barChartMinX = labelWidth + this.panel.width_catMeasureLabel; + + this.DOM.chartCatLabelResize.style("left",(labelWidth+1)+"px"); + this.DOM.facetCategorical.selectAll(".hasLabelWidth").style("width",labelWidth+"px"); + this.DOM.item_count_wrapper + .style("left",labelWidth+"px") + .style("width",this.panel.width_catMeasureLabel+"px") + ; + this.DOM.chartAxis_Measure.each(function(d){ + kshf.Util.setTransform(this,"translateX("+barChartMinX+"px)"); + }); + this.DOM.catSortButton.style("left",labelWidth+"px"); + this.DOM.aggr_Group.style("left",barChartMinX+"px"); + if(this.DOM.catSortButton) + this.DOM.catSortButton.style("width",this.panel.width_catMeasureLabel+"px"); + }, + /** -- */ + refreshScrollDisplayMore: function(bottomItem){ + if(this.catCount_Total<=4) { + this.DOM.scroll_display_more.style("display","none"); + return; + } + var moreTxt = ""+this.catCount_Visible+" "+kshf.lang.cur.Rows; + var below = this.catCount_Visible-bottomItem; + if(below>0) moreTxt+=", "+below+" "+kshf.lang.cur.More; + this.DOM.scroll_display_more.html(moreTxt); + }, + /** -- */ + refreshHeight: function(){ + // Note: if this has attributes, the total height is computed from height of the children by html layout engine. + // So far, should be pretty nice. + if(!this.hasCategories()) return; + + this.DOM.wrapper.style("height",(this.collapsed?"0":this.getHeight_Content())+"px"); + this.DOM.attribGroup.style("height",this.attribHeight+"px"); // 1 is for borders... + this.DOM.root.style("max-height",(this.getHeight()+1)+"px"); + + var h=this.attribHeight; + this.DOM.chartAxis_Measure.selectAll(".line").style("top",(-h+1)+"px").style("height",(h-2)+"px"); + this.DOM.chartAxis_Measure.selectAll(".text_upper").style("top",(-h-19)+"px"); + }, + /** -- */ + setHeightRow_attrib: function(h){ + var me=this; + if(this.heightRow_category===h) return; + this.heightRow_category = h; + + this.browser.setNoAnim(true); + + this.browser.updateLayout(); + + this.DOM.cats.each(function(attrib){ + kshf.Util.setTransform(this, + "translate("+attrib.posX+"px,"+(me.heightRow_category*attrib.orderIndex)+"px)"); + this.style.marginTop = ((me.heightRow_category-18)/2)+"px"; + }); + this.DOM.chartBackground.style("height",this.getTotalAttribHeight()+"px"); + this.DOM.chartCatLabelResize.style("height",this.getTotalAttribHeight()+"px"); + + setTimeout(function(){ me.browser.setNoAnim(false); },100); + }, + /** -- */ + isAttribVisible: function(attrib){ + if(this.isLinked){ + if(attrib.selectedForLink===false) return false; + return true; + } + + // Show selected attribute always + if(attrib.f_selected()) return true; + // Show if number of active items is not zero + if(attrib.aggregate_Active!==0) return true; + // Show if item has been "isWanted" by some active sub-filtering + if(this.catCount_Wanted < this.catCount_Total && attrib.isWanted) return true; + // if inactive attributes are not removed, well, don't remove them... + if(this.removeInactiveCats===false) return true; + // summary is not filtered yet, cannot click on 0 items + if(!this.isFiltered()) return attrib.aggregate_Active!==0; + // Hide if multiple options are selected and selection is and +// if(this.summaryFilter.selecttype==="SelectAnd") return false; + // TODO: Figuring out non-selected, zero-active-item attribs under "SelectOr" is tricky! + +// if(attrib.orderIndex===this.catCount_Total) return true; + + if(attrib.isWanted===false) return false; + return true; + }, + /** -- */ + isAttribSelectable: function(attrib){ + // Show selected attribute always + if(attrib.f_selected()) return true; + // Show if number of active items is not zero + if(attrib.aggregate_Active!==0) return true; + // Show if multiple attributes are selected and the summary does not include multi value items + if(this.isFiltered() && !this.hasMultiValueItem) return true; + // Hide + return false; + }, + /** When clicked on an attribute ... */ + /* what: AND / OR / NOT */ + filterAttrib: function(attrib, what, how){ + if(this.browser.skipSortingFacet){ + // you can now sort the last filtered summary, attention is no longer there. + this.browser.skipSortingFacet.dirtySort = false; + this.browser.skipSortingFacet.DOM.root.attr("refreshSorting",false); + } + this.browser.skipSortingFacet=this; + this.browser.skipSortingFacet.dirtySort = true; + this.browser.skipSortingFacet.DOM.root.attr("refreshSorting",true); + + var i=0; + + var preTest = (this.summaryFilter.selected_OR.length>0 && (this.summaryFilter.selected_AND.length>0 || + this.summaryFilter.selected_NOT.length>0)); + + // if selection is in same mode, "undo" to NONE. + if(what==="NOT" && attrib.is_NOT()) what = "NONE"; + if(what==="AND" && attrib.is_AND()) what = "NONE"; + if(what==="OR" && attrib.is_OR() ) what = "NONE"; + + if(what==="NONE"){ + if(attrib.is_AND() || attrib.is_NOT()){ + this.summaryFilter.how = "MoreResults"; + } + if(attrib.is_OR()){ + this.summaryFilter.how = this.summaryFilter.selected_OR.length===0?"MoreResults":"LessResults"; + } + attrib.set_NONE(); + if(this.summaryFilter.selected_OR.length===1 && this.summaryFilter.selected_AND.length===0){ + this.summaryFilter.selected_OR.forEach(function(a){ + a.set_NONE(); + a.set_AND(this.summaryFilter.selected_AND); + },this); + } + if(!this.summaryFilter.selected_Any()){ + this.dirtySort = false; + this.DOM.root.attr("refreshSorting",false); + } + if(sendLog) sendLog(kshf.LOG.FILTER_ATTR_UNSELECT, {id:this.summaryFilter.id, info:attrib.id()}); + } + if(what==="NOT"){ + if(attrib.is_NONE()){ + if(attrib.aggregate_Active===this.browser.itemsWantedCount){ + alert("Removing this category will create an empty result list, so it is not allowed."); + return; + } + this.summaryFilter.how = "LessResults"; + } else { + this.summaryFilter.how = "All"; + } + attrib.set_NOT(this.summaryFilter.selected_NOT); + if(sendLog) sendLog(kshf.LOG.FILTER_ATTR_ADD_NOT, {id:this.summaryFilter.id, info:attrib.id()}); + } + if(what==="AND"){ + attrib.set_AND(this.summaryFilter.selected_AND); + this.summaryFilter.how = "LessResults"; + if(sendLog) sendLog(kshf.LOG.FILTER_ATTR_ADD_AND, {id:this.summaryFilter.id, info:attrib.id()}); + } + if(what==="OR"){ + if(!this.hasMultiValueItem && this.summaryFilter.selected_NOT.length>0){ + var temp = []; + this.summaryFilter.selected_NOT.forEach(function(a){ temp.push(a); }); + temp.forEach(function(a){ a.set_NONE(); }); + } + if(this.summaryFilter.selected_OR.length===0 && this.summaryFilter.selected_AND.length===1){ + this.summaryFilter.selected_AND.forEach(function(a){ + a.set_NONE(); + a.set_OR(this.summaryFilter.selected_OR); + },this); + } + attrib.set_OR(this.summaryFilter.selected_OR); + this.summaryFilter.how = "MoreResults"; + if(sendLog) sendLog(kshf.LOG.FILTER_ATTR_ADD_OR, {id:this.summaryFilter.id, info:attrib.id()}); + } + if(how) this.summaryFilter.how = how; + + if(preTest){ + this.summaryFilter.how = "All"; + } + if(this.summaryFilter.selected_OR.length>0 && (this.summaryFilter.selected_AND.length>0 || + this.summaryFilter.selected_NOT.length>0)){ + this.summaryFilter.how = "All"; + } + + if(this.summaryFilter.selectedCount_Total()===0){ + this.summaryFilter.clearFilter(); + return; + } + this.clearCatTextSearch(); + this.summaryFilter.linkFilterSummary = ""; + this.summaryFilter.addFilter(true); + }, + /** -- */ + cbAttribEnter: function(attrib){ + this.browser.previewedSelectionSummary = this; + + var me=this; + + if(attrib.cliqueRow) + attrib.cliqueRow.setAttribute("highlight","selected"); + + if(this.isAttribSelectable(attrib)) { + attrib.DOM.facet.setAttribute("selecttype","and"); + attrib.DOM.facet.setAttribute("highlight","selected"); + if(!this.hasMultiValueItem && this.summaryFilter.selected_AND.length!==0) { + return; + } + attrib.highlightAll(true); + var timeoutTime = kshf.previewTimeoutMS; + if(this.browser.vizCompareActive) timeoutTime = 0; +// this.resultPreviewShowTimeout = setTimeout(function(){ + if(!me.browser.pauseResultPreview && + (me.hasMultiValueItem || me.summaryFilter.selected_AND.length===0) && + (!attrib.is_NOT()) ){ + // calculate the preview + attrib.items.forEach(function(item){item.updatePreview(me.parentFacet);},me); + me.browser.itemCount_Previewed = attrib.aggregate_Preview; + attrib.DOM.facet.setAttribute("showlock",true); + me.browser.refreshResultPreviews(attrib); + if(sendLog) { + if(me.resultPreviewLogTimeout) clearTimeout(me.resultPreviewLogTimeout); + me.resultPreviewLogTimeout = setTimeout(function(){ + sendLog(kshf.LOG.FILTER_PREVIEW, {id:me.summaryFilter.id, info: attrib.id()}); + }, 1000); // wait 1 second to see the update fully + } + } +// },timeoutTime); + } else { + if(this.tipsy_title===undefined) return; + } + }, + /** -- */ + cbAttribLeave: function(attrib){ + this.browser.previewedSelectionSummary = null; + + if(attrib.skipMouseOut !==undefined && attrib.skipMouseOut===true){ + attrib.skipMouseOut = false; + return; + } + + if(attrib.cliqueRow) + attrib.cliqueRow.setAttribute("highlight",false); + + if(!this.isAttribSelectable(attrib)) return; + attrib.nohighlightAll(true); + + if(this.resultPreviewLogTimeout){ + clearTimeout(this.resultPreviewLogTimeout); + } + this.browser.items.forEach(function(item){ + if(item.DOM.record) item.DOM.record.setAttribute("highlight",false); + },this); + + if(!this.browser.pauseResultPreview){ + attrib.DOM.facet.setAttribute("showlock",false); + this.browser.clearResultPreviews(); + } + + if(this.resultPreviewShowTimeout){ + clearTimeout(this.resultPreviewShowTimeout); + this.resultPreviewShowTimeout = null; + } + }, + /** - */ + insertCategories: function(){ + var me = this; + this.resultPreviewLogTimeout = null; + + var DOM_cats_new = this.DOM.attribGroup.selectAll(".attrib") + .data(this._cats, function(category){ return category.id(); }) + .enter().append("span").attr("class","attrib") + .attr("highlight",false) + .attr("showlock" ,false) + .attr("selected",0) + .each(function(category){ + category.facet = me; + category.DOM.facet = this; + category.isVisible = true; + this.isLinked = me.isLinked; + + category.pos_y = 0; + kshf.Util.setTransform(this,"translateY(0px)"); + }) + .on("mouseover",function(category){ me.cbAttribEnter(category);}) + .on("mouseleave",function(category){ me.cbAttribLeave(category);}) + .attr("title",me.catTooltip?function(cat){ return me.catTooltip.call(cat.data); }:null); + ; + this.updateAttribCull(); + + var cbAttribClick = function(attrib){ + if(!me.isAttribSelectable(attrib)) return; + + if(this.timer){ // double click + if(!me.hasMultiValueItem) return; + me.unselectAllAttribs(); + me.filterAttrib("AND","All"); + if(sendLog) sendLog(kshf.LOG.FILTER_ATTR_EXACT,{id: me.summaryFilter.id, info: attrib.id()}); + return; + } else { + if(attrib.is_NOT()){ + me.filterAttrib(attrib,"NOT"); + } else if(attrib.is_AND()){ + me.filterAttrib(attrib,"AND"); + } else if(attrib.is_OR()){ + me.filterAttrib(attrib,"OR"); + } else { + // remove the single selection if it is defined with OR + if(!me.hasMultiValueItem && me.summaryFilter.selected_Any()){ + if(me.summaryFilter.selected_OR.indexOf(attrib)<0){ + var temp = []; + me.summaryFilter.selected_OR.forEach(function(a){ temp.push(a); }); + temp.forEach(function(a){ a.set_NONE(); }); + } + if(me.summaryFilter.selected_AND.indexOf(attrib)<0){ + var temp = []; + me.summaryFilter.selected_AND.forEach(function(a){ temp.push(a); }); + temp.forEach(function(a){ a.set_NONE(); }); + } + if(me.summaryFilter.selected_NOT.indexOf(attrib)<0){ + var temp = []; + me.summaryFilter.selected_NOT.forEach(function(a){ temp.push(a); }); + temp.forEach(function(a){ a.set_NONE(); }); + } + me.filterAttrib(attrib,"AND","All"); + } else { + me.filterAttrib(attrib,"AND"); + } + } + } + if(me.hasMultiValueItem){ + var x = this; + this.timer = setTimeout(function() { x.timer = null; }, 500); + } + }; + + var dragged; + var draggedAttrib = null; + var attribDrag = function(d){ + this.addEventListener("dragstart", function( event ) { + // store a ref. on the dragged elem + dragged = event.target; + draggedAttrib = d; + // make it half transparent + event.target.style.opacity = .5; + }, false); + this.addEventListener("dragend", function( event ) { + // reset the transparency + event.target.style.opacity = ""; + draggedAttrib = null; + }, false); + this.addEventListener("dragover", function( event ) { + // prevent default to allow drop + event.preventDefault(); + }, false); + this.addEventListener("dragenter", function( event ) { + // highlight potential drop target when the draggable element enters it + if(draggedAttrib) { + event.target.style.background = "rgba(0,0,150,0.5)"; + } + }, false); + this.addEventListener("dragleave", function( event ) { + // reset background of potential drop target when the draggable element leaves it + if(draggedAttrib) { + event.target.style.background = ""; + } + }, false); + this.addEventListener("drop", function( event ) { + // prevent default action (open as link for some elements) + event.preventDefault(); + // move dragged elem to the selected drop target + if ( event.target.className == "clickArea" ) { + event.target.style.background = ""; + var item1 = dragged.__data__; + var item2 = event.target.__data__; + me._cats[item2.orderIndex] = item1; + me._cats[item1.orderIndex] = item2; + var tmp = item2.orderIndex + item2.orderIndex = item1.orderIndex; + item1.orderIndex = tmp; + + item1.DOM.facet.tipsy.hide(); + item2.DOM.facet.tipsy.hide(); + item2.DOM.facet.setAttribute("highlight",false); + item2.DOM.facet.setAttribute("highlight",false); + + me.DOM.cats.each(function(attrib){ + if(attrib.isVisible){ + attrib.posX = 0; + attrib.posY = me.heightRow_category*attrib.orderIndex; + attrib.posY = me.heightRow_category*attrib.orderIndex; + kshf.Util.setTransform(this,"translate("+attrib.posX+"px,"+attrib.posY+"px)"); + } + }); + + if(me.cbFacetSort) me.cbFacetSort.call(me); + } + }, false); + }; + + var cbOrEnter = function(attrib){ + me.browser.clearResultPreviews(); + attrib.DOM.facet.setAttribute("selecttype","or"); + if(me.summaryFilter.selected_OR.length>0) + me.browser.clearResultPreviews(); + d3.event.stopPropagation(); + }; + var cbOrLeave = function(attrib){ + attrib.DOM.facet.setAttribute("selecttype","and"); + }; + var cbOrClick = function(attrib){ + me.filterAttrib(attrib,"OR"); + d3.event.stopPropagation(); + d3.event.preventDefault(); + }; + + var cbNotEnter = function(attrib){ + attrib.DOM.facet.setAttribute("selecttype","not"); + me.browser.preview_not = true; + me.browser.refreshResultPreviews(attrib); + d3.event.stopPropagation(); + }; + var cbNotLeave = function(attrib){ + attrib.DOM.facet.setAttribute("selecttype","and"); + me.browser.preview_not = false; + me.browser.clearResultPreviews(); + }; + var cbNotClick = function(attrib){ + me.browser.preview_not = true; + me.filterAttrib(attrib,"NOT"); + setTimeout(function(){ me.browser.preview_not = false; }, 1000); + d3.event.stopPropagation(); + d3.event.preventDefault(); + }; + + var domAttrLabel = DOM_cats_new.append("span").attr("class", "attribLabel hasLabelWidth"); + + var filterButtons = domAttrLabel.append("span").attr("class", "filterButtons"); + filterButtons.append("span").attr("class","filterButton notButton") + .text(kshf.lang.cur.Not) + .on("mouseover",cbNotEnter) + .on("mouseout",cbNotLeave) + .on("click",cbNotClick); + filterButtons.append("span").attr("class","filterButton orButton") + .text(kshf.lang.cur.Or) + .on("mouseover",cbOrEnter) + .on("mouseout",cbOrLeave) + .on("click",cbOrClick) + ; + + this.DOM.theLabel = domAttrLabel.append("span").attr("class","theLabel").html(function(category){ + return me.catLabel.call(category.data); + }); + + DOM_cats_new.append("span").attr("class", "item_count_wrapper") + .append("span").attr("class","measureLabel"); + + var domBarGroup = DOM_cats_new.append("span").attr("class","aggr_Group"); + domBarGroup.append("span").attr("class", "aggr total"); + domBarGroup.append("span").attr("class", "aggr total_tip"); + domBarGroup.append("span").attr("class", "aggr active"); + domBarGroup.append("span").attr("class", "aggr preview").attr("fast",true); + domBarGroup.append("span").attr("class", "aggr compare").attr("hidden",true); + + DOM_cats_new.append("span").attr("class", "clickArea") + .attr("draggable",true) + .on("click", cbAttribClick) + .each(attribDrag) + ; + + DOM_cats_new.append("span").attr("class","compareButton fa") + .each(function(category){ + this.tipsy = new Tipsy(this, { + gravity: 'w', + title: function(){ + return (me.browser.comparedAggregate!==category)? + kshf.lang.cur.LockToCompare:kshf.lang.cur.Unlock; + } + }); + }) + .on("mouseenter",function(){ this.tipsy.show(); }) + .on("mouseleave",function(){ this.tipsy.hide(); }) + .on("click",function(attrib){ + this.tipsy.hide(); + me.browser.setPreviewCompare(attrib); + d3.event.stopPropagation(); + }) + ; + + this.DOM.cats = this.DOM.attribGroup.selectAll(".attrib") + this.DOM.attribClickArea = this.DOM.cats.selectAll(".clickArea"); + this.DOM.compareButton = this.DOM.cats.selectAll(".compareButton"); + this.DOM.item_count_wrapper = this.DOM.cats.selectAll(".item_count_wrapper"); + this.DOM.measureLabel = this.DOM.cats.selectAll(".item_count_wrapper > .measureLabel"); + + this.DOM.aggr_Group = this.DOM.cats.selectAll(".aggr_Group"); + this.DOM.aggr_Total = this.DOM.aggr_Group.selectAll(".total"); + this.DOM.aggr_TotalTip = this.DOM.aggr_Group.selectAll(".total_tip"); + this.DOM.aggr_Active = this.DOM.aggr_Group.selectAll(".active"); + this.DOM.aggr_Preview = this.DOM.aggr_Group.selectAll(".preview"); + this.DOM.aggr_Compare = this.DOM.aggr_Group.selectAll(".compare"); + }, + /** -- */ + sortCategories: function(){ + var me = this; + var inverse = this.catSortBy_Active.inverse; + // Prepare sorting callback + if(this.catSortBy_Active.prep) this.catSortBy_Active.prep.call(this); + + // idCompareFunc can be based on integer or string comparison + var idCompareFunc = function(a,b){return b.id()-a.id();}; + if(typeof(this._cats[0].id())==="string") + idCompareFunc = function(a,b){return b.id().localeCompare(a.id());}; + + var theSortFunc; + var sortV = this.catSortBy_Active.value; + // sortV can only be function. Just having the check for sanity + if(sortV && typeof sortV==="function"){ + // valueCompareFunc can be based on integer or string comparison + var valueCompareFunc = function(a,b){return a-b;}; + if(typeof(sortV.call(this._cats[0].data, this._cats[0]))==="string") + valueCompareFunc = function(a,b){return a.localeCompare(b);}; + + // Of the value is a 2-parameter function, we'll expect that it defines a sorting order + if(sortV.length===2){ + theSortFunc = sortV; + } else { + // The value is a custom value that returns an integer + theSortFunc = function(a,b){ + var x = valueCompareFunc(sortV.call(a.data,a),sortV.call(b.data,b)); + if(x===0) x=idCompareFunc(a,b); + if(inverse) x=-x; + return x; + }; + } + } else { + var sortFunc = function(a,b){ + var dif=b.aggregate_Active - a.aggregate_Active; + if(dif===0) { return b.aggregate_Total-a.aggregate_Total; } + return dif; + }; + + theSortFunc = function(a,b){ + // linked items... + if(a.selectedForLink && !b.selectedForLink) return -1; + if(b.selectedForLink && !a.selectedForLink) return 1; + + // selected on top of the list + if(!a.f_selected() && b.f_selected()) return 1; + if( a.f_selected() && !b.f_selected()) return -1; + + // put the items with zero active items to the end of list (may not be displayed) + if(a.aggregate_Active===0 && b.aggregate_Active!==0) return 1; + if(b.aggregate_Active===0 && a.aggregate_Active!==0) return -1; + + var x=sortFunc(a,b); + if(x===0) x=idCompareFunc(a,b); // stable sorting. ID's would be string most probably. + if(inverse) x=-x; + return x; + }; + } + this._cats.sort(theSortFunc); + this._cats.forEach(function(cat,i){ cat.orderIndex=i; }); + }, + /** -- */ + updateAttribCull: function(){ + var me=this; + this._cats.forEach(function(attrib,i){ + attrib.isCulled_before = attrib.isCulled; + // not visible if it is not within visible range... + if(attrib.orderIndexme.cat_InDisplay_First+me.catCount_InDisplay) { + attrib.isCulled=true; + } else { + attrib.isCulled=false; + } + }); + }, + /** -- */ + updateCatSorting: function(sortDelay,force,noAnim){ + if(this._cats===undefined) return; + if(this._cats.length===0) return; + if(this.uniqueCategories()) return; // Nothing to sort... + if(this.catSortBy_Active.no_resort===true && force!==true) return; + if(this.removeInactiveCats){ + this.updateCatCount_Visible(); + } + + var me = this; + if(sortDelay===undefined) sortDelay = 1000; + this.sortCategories(); + + if(this.panel===undefined) return; // The rest deals with updating UI + if(this.DOM.cats===undefined) return; + + this.updateAttribCull(); + + var xRemoveOffset = -100; + if(this.panel.name==='right') xRemoveOffset *= -1; // disappear to the other edge + if(this.cbFacetSort) this.cbFacetSort.call(this); + + // filler is used to insert the scroll bar. + // Items outside the view are not visible, something needs to expand the box + this.DOM.chartBackground.style("height",this.getTotalAttribHeight()+"px"); + this.DOM.chartCatLabelResize.style("height",this.getTotalAttribHeight()+"px"); + + var attribGroupScroll = me.DOM.attribGroup[0][0]; + // always scrolls to top row automatically when re-sorted + if(this.scrollTop_cache!==0) kshf.Util.scrollToPos_do(attribGroupScroll,0); + this.refreshScrollDisplayMore(this.cat_InDisplay_First+this.catCount_InDisplay); + + if(noAnim){ + this.DOM.cats.each(function(attrib){ + var x = 0; + var y = me.heightRow_category*attrib.orderIndex; + attrib.posX = x; + attrib.posY = y; + kshf.Util.setTransform(this,"translate("+x+"px,"+y+"px)"); + }); + return; + } + + setTimeout(function(){ + // 1. Make items disappear + // Note: do not cull with number of items made visible. + // We are applying visible and block to ALL attributes as we animate the change + me.DOM.cats.each(function(ctgry){ + if(ctgry.isVisible_before && !ctgry.isVisible){ + // disappear into left panel... + this.style.opacity = 0; + ctgry.posX = xRemoveOffset; + ctgry.posY = ctgry.posY; + kshf.Util.setTransform(this,"translate("+ctgry.posX+"px,"+ctgry.posY+"px)"); + } + if(!ctgry.isVisible_before && ctgry.isVisible){ + // will be made visible... + ctgry.posY = me.heightRow_category*ctgry.orderIndex; + kshf.Util.setTransform(this,"translate("+xRemoveOffset+"px,"+ctgry.posY+"px)"); + } + if(ctgry.isVisible || ctgry.isVisible_before){ + this.style.visibility = "visible"; + this.style.display = "block"; + } + }); + + // 2. Re-sort + setTimeout(function(){ + me.DOM.cats.each(function(ctgry){ + if(ctgry.isVisible && ctgry.isVisible_before){ + ctgry.posX = 0; + ctgry.posY = me.heightRow_category*ctgry.orderIndex; + kshf.Util.setTransform(this,"translate("+ctgry.posX+"px,"+ctgry.posY+"px)"); + } + }); + + // 3. Make items appear + setTimeout(function(){ + me.DOM.cats.each(function(ctgry){ + if(!ctgry.isVisible_before && ctgry.isVisible){ + this.style.opacity = 1; + ctgry.posX = 0; + ctgry.posY = me.heightRow_category*ctgry.orderIndex; + kshf.Util.setTransform(this, + "translate("+ctgry.posX+"px,"+ctgry.posY+"px)"); + } + }); + // 4. Apply culling + setTimeout(function(){ me.cullAttribs();} , 700); + },(me.catCount_NowVisible>0)?300:0); + + },(me.catCount_NowInvisible>0)?300:0); + + },sortDelay); + }, + /** -- */ + getTotalAttribHeight: function(){ + return this.catCount_Visible*this.heightRow_category; + }, + /** -- */ + cullAttribs: function(){ + this.DOM.cats + .style("visibility",function(attrib){ + return (attrib.isCulled || !attrib.isVisible)?"hidden":"visible"; + }).style("display",function(attrib){ + return (attrib.isCulled || !attrib.isVisible)?"none":"block"; + }); + + if(this.cbCatCulled) this.cbCatCulled.call(this); + }, + /** -- */ + chartAxis_Measure_TickSkip: function(){ + var width = this.chartScale_Measure.range()[1]; + var ticksSkip = width/25; + if(this.getMaxAggr_Active()>100000){ + ticksSkip = width/30; + } + if(this.browser.percentModeActive){ + ticksSkip /= 1.1; + } + return ticksSkip; + } +}; + +for(var index in Summary_Categorical_functions){ + kshf.Summary_Categorical.prototype[index] = Summary_Categorical_functions[index]; +} + + + +/** + * KESHIF FACET - Categorical + * @constructor + */ +kshf.Summary_Interval = function(){}; +kshf.Summary_Interval.prototype = new kshf.Summary_Base(); +var Summary_Interval_functions = { + initialize: function(browser,name,attribFunc){ + kshf.Summary_Base.prototype.initialize.call(this,browser,name,attribFunc); + this.type='interval'; + + // Call the parent's constructor + var me = this; + + // pixel width settings... + this.height_hist = 1; // Initial width (will be updated later...) + this.height_hist_min = 20; // Minimum possible histogram height + this.height_hist_max = 100; // Maximim possible histogram height + this.height_slider = 12; // Slider height + this.height_labels = 13; // Height for labels + this.height_percentile = 16; // Height for percentile chart + this.height_hist_topGap = 12; // Height for histogram gap on top. + + this.width_barGap = 2; // The width between neighboring histgoram bars + this.width_histMargin = 17; // .. + this.width_vertAxisLabel = 23; // .. + + this.optimumTickWidth = 50; + + this.scaleType = 'linear'; // 'time', 'step', 'log' + this.hasFloat = false; + this.hasTime = false; + + this.unitName = undefined; // the text appended to the numeric value (TODO: should not apply to time) + this.showPercentile = false; // Percentile chart is a 1-line chart which shows %10-%20-%30-%40-%50 percentiles + this.zoomed = false; + + this.histBins = []; + this.intervalTicks = []; + this.intervalRange = {}; + this.intervalTickFormat = function(v){ + if(!me.hasFloat) return d3.format("s")(v); + return d3.format(".2f")(v); + }; + + if(this.items.length<=1000) this.initializeAggregates(); + }, + /** -- */ + initializeAggregates: function(){ + if(this.aggr_initialized) return; + var me=this; + var filterId = this.summaryFilter.id; + this.itemV = function(item){ return item.mappedDataCache[filterId].v; }; + + this.items.forEach(function(item){ + var v=this.summaryFunc.call(item.data,item); + if(isNaN(v)) v=null; + if(v===undefined) v=null; + if(v!==null){ + if(v instanceof Date){ + this.hasTime = true; + } else { + if(typeof v!=='number'){ + v = null; + } else{ + this.hasFloat = this.hasFloat || v%1!==0; + } + } + } + item.mappedDataCache[filterId] = { + v: v, + h: this, + }; + },this); + if(this.hasTime) this.setScaleType('time'); + + // remove items that map to null / undefined + this.filteredItems = this.items.filter(function(item){ + var v = me.itemV(item); + return (v!==undefined && v!==null); + }); + + // Sort the items by their attribute value + var sortValue = this.hasTime? + function(a){ return me.itemV(a).getTime(); }: + function(a){ return me.itemV(a); }; + this.filteredItems.sort(function(a,b){ return sortValue(a)-sortValue(b);}); + + this.updateIntervalRangeMinMax(); + + this.detectLogScale(); + + // The default is for nugget viz... + this.updateScaleAndBins(30,10); + + this.aggr_initialized = true; + + this.refreshViz_Nugget(); + }, + /** -- */ + detectLogScale: function(){ + if(this.scaleType==='time') return; + var me = this; + var filterId = this.summaryFilter.id; + var activeItemV = function(item){ + // decide based on whether the items are in the visible range + var v = item.mappedDataCache[filterId].v; + if(v>=me.intervalRange.active.min && v <= me.intervalRange.active.max) return v; + }; + var deviation = d3.deviation(this.filteredItems, activeItemV); + var activeRange = this.intervalRange.active.max-this.intervalRange.active.min; + if(deviation/activeRange<0.12 && this.intervalRange.active.min>=0){ + this.setScaleType('log'); + } else{ + if(this.scaleType==='log'){ + this.setScaleType("linear"); + } + } + }, + /** -- */ + createSummaryFilter: function(){ + var me=this; + this.summaryFilter = this.browser.createFilter({ + parentSummary: this, + onClear: function(summary){ + if(this.filteredBin){ + this.filteredBin.setAttribute("filtered",false); + this.filteredBin = undefined; + } + summary.DOM.root.attr("filtered",false); + if(summary.zoomed){ + summary.setZoomed(false); + } + summary.resetIntervalFilterActive(); + summary.refreshIntervalSlider(); + }, + onFilter: function(summary){ + summary.DOM.root.attr("filtered",true); + + var i_min = this.active.min; + var i_max = this.active.max; + + var isFilteredCb; + if(summary.isFiltered_min() && summary.isFiltered_max()){ + if(this.max_inclusive) + isFilteredCb = function(v){ return v>=i_min && v<=i_max; }; + else + isFilteredCb = function(v){ return v>=i_min && v=i_min; }; + } else { + if(this.max_inclusive) + isFilteredCb = function(v){ return v<=i_max; }; + else + isFilteredCb = function(v){ return v"+minValue+""; + } + if(summary.scaleType==='time'){ + return ""+summary.intervalTickFormat(minValue)+ + " to "+summary.intervalTickFormat(maxValue)+""; + } + if(summary.hasFloat){ + minValue = minValue.toFixed(2); + maxValue = maxValue.toFixed(2); + } + if(summary.isFiltered_min() && summary.isFiltered_max()){ + return ""+minValue+" to "+maxValue+""; + } else if(summary.isFiltered_min()){ + return "at least "+minValue+""; + } else { + return "at most "+maxValue+""; + } + }, + }); + }, + /** -- */ + refreshViz_Nugget: function(){ + if(this.DOM.nugget===undefined) return; + + var nuggetChart = this.DOM.nugget.select(".nuggetChart"); + + this.DOM.nugget + .attr("aggr_initialized",this.aggr_initialized) + .attr("datatype",this.getDataType()); + + if(!this.aggr_initialized) return; + + if(this.uniqueCategories()){ + this.DOM.nugget.select(".nuggetInfo").html("
Unique"); + nuggetChart.style("display",'none'); + return; + } + + var maxAggregate_Total = this.getMaxAggr_Total(); + + if(this.intervalRange.min===this.intervalRange.max){ + this.DOM.nugget.select(".nuggetInfo").html("only
"+this.intervalRange.min); + nuggetChart.style("display",'none'); + return; + } + + var totalHeight = 17; + nuggetChart.selectAll(".nuggetBar").data(this.histBins).enter() + .append("span").attr("class","nuggetBar") + .style("height",function(aggr){ + return totalHeight*(aggr.length/maxAggregate_Total)+"px"; + }) + ; + + this.DOM.nugget.select(".nuggetInfo").html( + ""+this.intervalTickFormat(this.intervalRange.min)+""+ + ""+this.intervalTickFormat(this.intervalRange.max)+""); + }, + /** -- */ + updateIntervalRangeMinMax: function(){ + this.intervalRange.min = d3.min(this.filteredItems,this.itemV); + this.intervalRange.max = d3.max(this.filteredItems,this.itemV); + this.intervalRange.active = { + min: this.intervalRange.min, + max: this.intervalRange.max + }; + this.isEmpty = this.intervalRange.min===undefined; + if(this.isEmpty) this.setCollapsed(true); + this.resetIntervalFilterActive(); + }, + /** -- */ + resetIntervalFilterActive: function(){ + this.summaryFilter.active = { + min: this.intervalRange.min, + max: this.intervalRange.max + }; + }, + /** -- */ + setScaleType: function(t){ + if(this.scaleType===t) return; + var me=this; + this.scaleType=t; + + if(this.DOM.facetInterval) this.DOM.facetInterval.attr("scaleType",this.scaleType); + + // remove items with value:0 (because log(0) is invalid) + if(this.scaleType==='log' && (this.intervalRange.min===0 || this.intervalRange.max===0)) { + this.filteredItems = this.filteredItems.filter(function(item){ return me.itemV(item)!==0; }); + this.updateIntervalRangeMinMax(); + if(this.panel===undefined){ + this.updateScaleAndBins(30,10); + } else { + var _width_ = this.getWidth()-this.width_histMargin-this.width_vertAxisLabel; + this.updateScaleAndBins( _width_, Math.ceil(_width_/this.optimumTickWidth)); + } + } + }, + /** -- */ + getHeight: function(){ + if(this.collapsed) return this.getHeight_Header(); + // Note: I don't know why I need -2 to match real dom height. + return this.getHeight_Header()+this.getHeight_Wrapper(); + }, + /** -- */ + getHeight_Wrapper: function(){ + return this.height_hist+this.getHeight_Extra(); + }, + /** -- */ + getHeight_Header: function(){ + return this.DOM.headerGroup[0][0].offsetHeight; + }, + /** -- */ + getHeight_Extra: function(){ + return 7+this.height_hist_topGap+this.height_labels+this.height_slider+ + (this.showPercentile?this.height_percentile:0); + }, + /** -- */ + getHeight_RangeMax: function(){ + return this.getHeight_Header()+this.height_hist_max+this.getHeight_Extra(); + }, + /** -- */ + getHeight_RangeMin: function(){ + return this.getHeight_Header()+this.height_hist_min+this.getHeight_Extra(); + }, + /** -- */ + isFiltered_min: function(){ + // the active min is different from intervalRange min. + if(this.summaryFilter.active.min!==this.intervalRange.min) return true; + // if using log scale, assume min is also filtered when max is filtered. + if(this.scaleType==='log') return this.isFiltered_max(); + return false; + }, + /** -- */ + isFiltered_max: function(){ + return this.summaryFilter.active.max!==this.intervalRange.max; + }, + /** -- */ + getMaxAggr_Total: function(){ + return d3.max(this.histBins,function(aggr){ return aggr.length; }); + }, + /** -- */ + getMaxAggr_Active: function(){ + return d3.max(this.histBins,function(aggr){ return aggr.aggregate_Active; }); + }, + /** -- */ + initDOM: function(beforeDOM){ + this.initializeAggregates(); + if(this.isEmpty) return; + if(this.DOM.inited===true) return; + var me = this; + + this.insertRoot(beforeDOM); + + this.DOM.root + .attr("hasMultiValueItem",false); + + this.insertHeader(); + + this.DOM.wrapper = this.DOM.root.append("div").attr("class","wrapper"); + this.DOM.facetInterval = this.DOM.wrapper.append("div") + .attr("class","facetInterval") + .attr("scaleType",this.scaleType) + .attr("zoomed",this.zoomed) + .on("mousedown",function(){ + d3.event.stopPropagation(); + d3.event.preventDefault(); + }); + + this.DOM.histogram = this.DOM.facetInterval.append("div").attr("class","histogram"); + this.DOM.histogram_bins = this.DOM.histogram.append("div").attr("class","bins") + .style("margin-left",(this.width_vertAxisLabel)+"px"); + + if(this.scaleType==='time'){ + this.DOM.timeSVG = this.DOM.histogram.append("svg").attr("class","timeSVG") + .attr("xmlns","http://www.w3.org/2000/svg") + .style("margin-left",(this.width_vertAxisLabel+this.width_barGap)+"px"); + } + + this.insertChartAxis_Measure(this.DOM.histogram, 'w', 'nw'); + this.DOM.chartAxis_Measure.style("padding-left",(this.width_vertAxisLabel-2)+"px") + + this.initDOM_Slider(); + + if(this.showPercentile===true){ + this.initDOM_Percentile(); + } + + var _width_ = this.getWidth()-this.width_histMargin-this.width_vertAxisLabel; + this.updateScaleAndBins( _width_, Math.ceil(_width_/this.optimumTickWidth)); + + this.setCollapsed(this.collapsed); + this.setUnitName(this.unitName); + + this.DOM.inited=true; + }, + /** -- */ + setZoomed: function(v){ + this.zoomed = v; + this.DOM.facetInterval.attr("zoomed",this.zoomed); + if(this.zoomed){ + this.intervalRange.active.min = this.summaryFilter.active.min; + this.intervalRange.active.max = this.summaryFilter.active.max; + this.DOM.zoomControl.attr("sign","minus"); + } else { + this.intervalRange.active.min = this.intervalRange.min; + this.intervalRange.active.max = this.intervalRange.max; + this.DOM.zoomControl.attr("sign","plus"); + } + // TODO: enable this once all else is working... + this.detectLogScale(); + var _width_ = this.getWidth()-this.width_histMargin-this.width_vertAxisLabel; + this.updateScaleAndBins( _width_, Math.ceil(_width_/this.optimumTickWidth)); + }, + /** -- */ + setUnitName: function(v){ + this.unitName = v; + this.refreshTickLabels(); + }, + /** -- */ + initDOM_Percentile: function(){ + var me=this; + if(this.DOM.facetInterval===undefined) return; + this.DOM.percentileGroup = this.DOM.facetInterval.append("div").attr("class","percentileGroup") + .style('margin-left',this.width_vertAxisLabel+"px");; + this.DOM.percentileGroup.append("span").attr("class","percentileTitle").html(kshf.lang.cur.Percentiles); + + this.DOM.quantile = {}; + + [[10,90],[20,80],[30,70],[40,60]].forEach(function(qb){ + this.DOM.quantile[""+qb[0]+"_"+qb[1]] = this.DOM.percentileGroup.append("span") + .attr("class","quantile q_range q_"+qb[0]+"_"+qb[1]) + .each(function(){ + this.tipsy = new Tipsy(this, { + gravity: 's', + title: function(){ + return "%"+qb[0]+" - %"+qb[1]+" Percentile: "+ + me.quantile_val[qb[0]]+" - "+me.quantile_val[qb[1]]+"" + ; + } + }) + }) + .on("mouseover",function(){ this.tipsy.show(); }) + .on("mouseout" ,function(){ this.tipsy.hide(); }) + ; + },this); + + [10,20,30,40,50,60,70,80,90].forEach(function(q){ + this.DOM.quantile[q] = this.DOM.percentileGroup.append("span") + .attr("class","quantile q_pos q_"+q) + .each(function(){ + this.tipsy = new Tipsy(this, { + gravity: 's', + title: function(){ + return "Median: "+ me.quantile_val[q]; + } + }) + }) + .on("mouseover",function(){ this.tipsy.show(); }) + .on("mouseout" ,function(){ this.tipsy.hide(); }) + ; + },this); + }, + /** -- */ + updateDOMwidth: function(){ + if(this.DOM.inited===false) return; + var chartWidth = this.getWidth()-this.width_histMargin-this.width_vertAxisLabel; + this.DOM.facetInterval.style("width",this.getWidth()+"px"); + this.DOM.summaryTitle.style("max-width",(this.getWidth()-40)+"px"); + if(this.DOM.timeSVG) + this.DOM.timeSVG.style("width",(chartWidth+2)+"px") + }, + /** -- + Uses + - this.scaleType + - this.intervalRange min & max + Updates + - this.intervalTickFormat + - this.valueScale.nice() + Return + - the tick values in an array + */ + getValueTicks: function(optimalTickCount){ + var me=this; + var ticks; + + // HANDLE TIME CAREFULLY + if(this.scaleType==='time') { + // 1. Find the appropriate aggregation interval (day, month, etc) + var timeRange_ms = this.intervalRange.active.max-this.intervalRange.active.min; // in milliseconds + var timeInterval; + var timeIntervalStep = 1; + if((timeRange_ms/1000) < optimalTickCount){ + timeInterval = d3.time.second.utc; + this.intervalTickFormat = d3.time.format.utc("%S"); + } else if((timeRange_ms/(1000*5)) < optimalTickCount){ + timeInterval = d3.time.second.utc; + timeIntervalStep = 5; + this.intervalTickFormat = d3.time.format.utc("%-S"); + } else if((timeRange_ms/(1000*15)) < optimalTickCount){ + timeInterval = d3.time.second.utc; + timeIntervalStep = 15; + this.intervalTickFormat = d3.time.format.utc("%-S"); + } else if((timeRange_ms/(1000*60)) < optimalTickCount){ + timeInterval = d3.time.minute.utc; + timeIntervalStep = 1; + this.intervalTickFormat = d3.time.format.utc("%-M"); + } else if((timeRange_ms/(1000*60*5)) < optimalTickCount){ + timeInterval = d3.time.minute.utc; + timeIntervalStep = 5; + this.intervalTickFormat = d3.time.format.utc("%-M"); + } else if((timeRange_ms/(1000*60*15)) < optimalTickCount){ + timeInterval = d3.time.minute.utc; + timeIntervalStep = 15; + this.intervalTickFormat = d3.time.format.utc("%-M"); + } else if((timeRange_ms/(1000*60*60)) < optimalTickCount){ + timeInterval = d3.time.hour.utc; + timeIntervalStep = 1; + this.intervalTickFormat = d3.time.format.utc("%-H"); + } else if((timeRange_ms/(1000*60*60*6)) < optimalTickCount){ + timeInterval = d3.time.hour.utc; + timeIntervalStep = 6; + this.intervalTickFormat = d3.time.format.utc("%-H"); + } else if((timeRange_ms/(1000*60*60*24)) < optimalTickCount){ + timeInterval = d3.time.day.utc; + timeIntervalStep = 1; + this.intervalTickFormat = d3.time.format.utc("%-e"); + // TODO: kshf.Util.ordinal_suffix_of(); + } else if((timeRange_ms/(1000*60*60*24*7)) < optimalTickCount){ + timeInterval = d3.time.week.utc; + timeIntervalStep = 1; + this.intervalTickFormat = function(v){ + var suffix = kshf.Util.ordinal_suffix_of(v.getUTCDate()); + var first=d3.time.format.utc("%-b")(v); + return suffix+"
"+first; + }; + this.height_labels = 28; + } else if((timeRange_ms/(1000*60*60*24*30)) < optimalTickCount){ + timeInterval = d3.time.month.utc; + timeIntervalStep = 1; + this.intervalTickFormat = function(v){ + var threeMonthsLater = timeInterval.offset(v, 3); + var first=d3.time.format.utc("%-b")(v); + var s=first; + if(first==="Jan") s+="
"+(d3.time.format("%Y")(threeMonthsLater)); + return s; + }; + this.height_labels = 28; + } else if((timeRange_ms/(1000*60*60*24*30*3)) < optimalTickCount){ + timeInterval = d3.time.month.utc; + timeIntervalStep = 3; + this.intervalTickFormat = function(v){ + var threeMonthsLater = timeInterval.offset(v, 3); + var first=d3.time.format.utc("%-b")(v); + var s=first; + if(first==="Jan") s+="
"+(d3.time.format("%Y")(threeMonthsLater)); + return s; + }; + this.height_labels = 28; + } else if((timeRange_ms/(1000*60*60*24*30*6)) < optimalTickCount){ + timeInterval = d3.time.month.utc; + timeIntervalStep = 6; + this.intervalTickFormat = function(v){ + var threeMonthsLater = timeInterval.offset(v, 6); + var first=d3.time.format.utc("%-b")(v); + var s=first; + if(first==="Jan") s+="
"+(d3.time.format("%Y")(threeMonthsLater)); + return s; + }; + this.height_labels = 28; + } else if((timeRange_ms/(1000*60*60*24*365)) < optimalTickCount){ + timeInterval = d3.time.year.utc; + timeIntervalStep = 1; + this.intervalTickFormat = d3.time.format.utc("%Y"); + } else if((timeRange_ms/(1000*60*60*24*365*2)) < optimalTickCount){ + timeInterval = d3.time.year.utc; + timeIntervalStep = 2; + this.intervalTickFormat = d3.time.format.utc("%Y"); + } else if((timeRange_ms/(1000*60*60*24*365*3)) < optimalTickCount){ + timeInterval = d3.time.year.utc; + timeIntervalStep = 3; + this.intervalTickFormat = d3.time.format.utc("%Y"); + } else if((timeRange_ms/(1000*60*60*24*365*4)) < optimalTickCount){ + timeInterval = d3.time.year.utc; + timeIntervalStep = 4; + this.intervalTickFormat = d3.time.format.utc("%Y"); + } else if((timeRange_ms/(1000*60*60*24*365*5)) < optimalTickCount){ + timeInterval = d3.time.year.utc; + timeIntervalStep = 5; + this.intervalTickFormat = function(v){ + var later = timeInterval.offset(v, 4); + return d3.time.format.utc("%Y")(v); + }; + this.height_labels = 28; + } else if((timeRange_ms/(1000*60*60*24*365*25)) < optimalTickCount){ + timeInterval = d3.time.year.utc; + timeIntervalStep = 25; + this.intervalTickFormat = d3.time.format.utc("%Y"); + } else if((timeRange_ms/(1000*60*60*24*365*100)) < optimalTickCount){ + timeInterval = d3.time.year.utc; + timeIntervalStep = 100; + this.intervalTickFormat = d3.time.format.utc("%Y"); + } else { + timeInterval = d3.time.year.utc; + timeIntervalStep = 500; + this.intervalTickFormat = d3.time.format.utc("%Y"); + } + + this.valueScale.nice(timeInterval, timeIntervalStep); + ticks = this.valueScale.ticks(timeInterval, timeIntervalStep); + } else if(this.scaleType==='step'){ + ticks = []; + for(var i=this.intervalRange.active.min ; i<=this.intervalRange.active.max; i++){ + ticks.push(i); + } + this.intervalTickFormat = d3.format("d"); + } else if(this.scaleType==='log'){ + this.valueScale.nice(optimalTickCount); + // Generate ticks + ticks = this.valueScale.ticks(optimalTickCount); + while(ticks.length > optimalTickCount*1.6){ + ticks = ticks.filter(function(d,i){return i%2===0;}); + } + if(!this.hasFloat) + ticks = ticks.filter(function(d){return d%1===0;}); + this.intervalTickFormat = d3.format(".1s"); + } else { + this.valueScale.nice(optimalTickCount); + this.valueScale.nice(optimalTickCount); + ticks = this.valueScale.ticks(optimalTickCount); + this.valueScale.nice(optimalTickCount); + ticks = this.valueScale.ticks(optimalTickCount); + + if(!this.hasFloat) ticks = ticks.filter(function(d){return d===0||d%1===0;}); + + var d3Formating = d3.format(this.hasFloat?".2f":".2s"); + this.intervalTickFormat = function(d){ + if(!me.hasFloat && d<10) return d; + if(!me.hasFloat && Math.abs(ticks[1]-ticks[0])<1000) return d; + var x= d3Formating(d); + if(x.indexOf(".00")!==-1) x = x.replace(".00",""); + if(x.indexOf(".0")!==-1) x = x.replace(".0",""); + return x; + } + } + + return ticks; + }, + /** + Uses + - optimumTickWidth + - this.intervalRang + Updates: + - scaleType (if steps is more appropriate) + - valueScale + - intervalTickFormat + */ + updateScaleAndBins: function(_width_,optimalTickCount){ + if(this.isEmpty) return; + var me=this; + + // Check if you can use a ste-scale instead + var stepRange=(this.intervalRange.active.max-this.intervalRange.active.min)+1; + var stepWidth=_width_/stepRange; + if(!this.hasFloat && (this.scaleType==='step' || this.scaleType==='linear')) { + if(optimalTickCount>=stepRange){ + this.setScaleType('step'); + } else { + this.setScaleType('linear'); + } + } + + // UPDATE intervalScale + switch(this.scaleType){ + case 'linear': case 'step': + this.valueScale = d3.scale.linear(); break; + case 'log': + this.valueScale = d3.scale.log().base(2); break; + case 'time': + this.valueScale = d3.time.scale.utc(); break; + } + + this.valueScale + .domain([this.intervalRange.active.min, this.intervalRange.active.max]) + .range([0, _width_]); + + if(this.scaleType==='step'){ + this.valueScale.range([stepWidth/2, _width_-stepWidth/2]); + } + + var ticks = this.getValueTicks(optimalTickCount); + + // Sometimes, the number of bins generated is larger than the optimal + // In some cases, the ticks become suitable for step-scale. Detect it here. + if(!this.hasFloat && (this.scaleType==='step' || this.scaleType==='linear')){ + if(ticks.length===stepRange){ + this.setScaleType('step'); + this.valueScale.range([stepWidth/2, _width_-stepWidth/2]); + } + } + + if(this.scaleType!=='step'){ + this.aggrWidth = this.valueScale(ticks[1])-this.valueScale(ticks[0]); + } else { + this.aggrWidth = _width_/stepRange; + } + + var ticksChanged = (this.intervalTicks.length!==ticks.length) || + this.intervalTicks[0]!==ticks[0] || + this.intervalTicks[this.intervalTicks.length-1] !== ticks[ticks.length-1] + ; + + if(ticksChanged){ + this.intervalTicks = ticks; + var filterId = this.summaryFilter.id; + + var itemV = function(item){ + // if(item.isWanted) // Include all items - Aggregate also shows the "total" viz + return item.mappedDataCache[filterId].v; + }; + if(this.zoomed===false){ + itemV = this.itemV; + } + if(this.scaleType!=='step'){ + this.histBins = d3.layout.histogram().bins(this.intervalTicks).value(itemV)(this.filteredItems); + } else { + // I'll do the bins myself, d3 just messes it up when I need a simple step scale + this.histBins = []; + for(var bin=this.intervalRange.active.min; bin<=this.intervalRange.active.max; bin++){ + var d = []; + d.x = bin; + d.y = 0; + d.dx = 0; + this.histBins.push(d); + } + this.filteredItems.forEach(function(item){ + var v = itemV(item); + if(v===null || v===undefined) return; + if(vthis.intervalRange.active.max) return; + var bin = this.histBins[v-this.intervalRange.active.min]; + bin.push(item); + bin.y++; + },this); + } + + this.updateAggregate_Active(); + this.updateBarScale2Active(); + + if(this.DOM.root){ + this.insertVizDOM(); + } + + if(this.showPercentile) this.updatePercentiles(); + } + if(this.DOM.root){ + if(this.DOM.aggr_Group===undefined){ + this.insertVizDOM(); + } + this.refreshBins_Translate(); + this.refreshViz_Scale(); + + this.DOM.labelGroup.selectAll(".tick").style("left",function(d){ + return (me.valueScale(d))+"px"; + }); + this.refreshIntervalSlider(); + } + }, + /** -- */ + insertVizDOM: function(){ + if(this.scaleType==='time' && this.DOM.root) { + // delete existing DOM: + // TODO: Find a way to avoid this? + this.DOM.timeSVG.select(".lineTrend.total").remove(); + this.DOM.timeSVG.select(".lineTrend.active").remove(); + this.DOM.timeSVG.select(".lineTrend.preview").remove(); + this.DOM.timeSVG.select(".lineTrend.compare").remove(); + this.DOM.timeSVG.selectAll("line.activeLine").remove(); + this.DOM.timeSVG.selectAll("line.previewLine").remove(); + this.DOM.timeSVG.selectAll("line.compareLine").remove(); + + this.DOM.lineTrend_Total = this.DOM.timeSVG.append("path").attr("class","lineTrend total") + .datum(this.histBins); + this.DOM.lineTrend_Active = this.DOM.timeSVG.append("path").attr("class","lineTrend active") + .datum(this.histBins); + this.DOM.lineTrend_ActiveLine = this.DOM.timeSVG.selectAll("line.activeLine") + .data(this.histBins, function(d,i){ return i; }) + .enter().append("line").attr("class","lineTrend activeLine"); + this.DOM.lineTrend_Preview = this.DOM.timeSVG.append("path").attr("class","lineTrend preview") + .datum(this.histBins); + this.DOM.lineTrend_PreviewLine = this.DOM.timeSVG.selectAll("line.previewLine") + .data(this.histBins, function(d,i){ return i; }) + .enter().append("line").attr("class","lineTrend previewLine"); + this.DOM.lineTrend_Compare = this.DOM.timeSVG.append("path").attr("class","lineTrend compare") + .datum(this.histBins); + this.DOM.lineTrend_CompareLine = this.DOM.timeSVG.selectAll("line.compareLine") + .data(this.histBins, function(d,i){ return i; }) + .enter().append("line").attr("class","lineTrend compareLine"); + } + + this.insertBins(); + this.refreshViz_Axis(); + //this.refreshViz_Preview(); + this.refreshMeasureLabel(); + this.updateTicks(); + }, + /** -- */ + updateTicks: function(){ + this.DOM.labelGroup.selectAll(".tick").data([]).exit().remove(); // remove all existing ticks + var ddd = this.DOM.labelGroup.selectAll(".tick").data(this.intervalTicks); + var ddd_enter = ddd.enter().append("span").attr("class","tick"); + ddd_enter.append("span").attr("class","line"); + ddd_enter.append("span").attr("class","text"); + this.refreshTickLabels(); + }, + /** -- */ + getBarWidth: function(){ + return this.aggrWidth - this.width_barGap*2; + }, + /** -- */ + refreshTickLabels: function(){ + var me=this; + if(this.DOM.labelGroup===undefined) return; + this.DOM.labelGroup.selectAll(".tick .text").html(function(d){ + if(me.scaleType==='time'){ + return me.intervalTickFormat(d); + } else { + var v; + if(d<1 && d!==0) v=d.toFixed(1); + else v=me.intervalTickFormat(d); + + if(me.unitName) v+=""+me.unitName+""; + return v; + } + }); + }, + /** -- */ + insertBins: function(){ + var me=this; + var resultPreviewLogTimeout = null; + + var filterId = this.summaryFilter.id; + + // just remove everything that was in the histogram_bins befoe + this.DOM.histogram_bins + .selectAll(".aggr_Group").data([]).exit().remove(); + + var activeBins = this.DOM.histogram_bins + .selectAll(".aggr_Group").data(this.histBins, function(d,i){ return i; }); + + var newBins=activeBins.enter().append("span").attr("class","aggr_Group") + .each(function(aggr){ + aggr.aggregate_Preview=0; + aggr.forEach(function(item){ + item.mappedDataCache[filterId].b = aggr; + },this); + aggr.DOM = {} + aggr.DOM.facet = this; + }) + .on("mouseenter",function(aggr){ + var thiss=this; + + me.browser.previewedSelectionSummary = me; + + if(!me.browser.pauseResultPreview){ + var timeoutTime = kshf.previewTimeoutMS; + if(me.browser.vizCompareActive) timeoutTime = 0; +// this.resultPreviewShowTimeout = setTimeout(function(){ + aggr.forEach(function(item){item.updatePreview(me.parentFacet);}); + me.browser.itemCount_Previewed = aggr.aggregate_Preview; + // Histograms cannot have sub-facets, so don't iterate over mappedDOMs... + thiss.setAttribute("highlight","selected"); + thiss.setAttribute("showlock",true); + me.browser.refreshResultPreviews(); + if(sendLog) { + if(resultPreviewLogTimeout){ + clearTimeout(resultPreviewLogTimeout); + } + resultPreviewLogTimeout = setTimeout(function(){ + sendLog(kshf.LOG.FILTER_PREVIEW, {id:me.summaryFilter.id, info: aggr.x+"x"+aggr.dx}); + }, 1000); // wait 1 second to see the update fully + } +// },timeoutTime); + } + }) + .on("mouseleave",function(aggr){ + me.browser.previewedSelectionSummary = null; + + if(resultPreviewLogTimeout){ + clearTimeout(resultPreviewLogTimeout); + } + if(this.resultPreviewShowTimeout){ + clearTimeout(this.resultPreviewShowTimeout); + this.resultPreviewShowTimeout = null; + } + if(!me.browser.pauseResultPreview){ + this.setAttribute("highlight",false); + this.setAttribute("showlock",false); + + me.browser.items.forEach(function(item){ + if(item.DOM.record) item.DOM.record.setAttribute("highlight",false); + }) + me.browser.clearResultPreviews(); + } + }) + .on("click",function(aggr){ + if(me.summaryFilter.filteredBin===this){ + me.summaryFilter.clearFilter(); + return; + } + this.setAttribute("filtered","true"); + + // store histogram state + me.summaryFilter.dom_HistogramBar = this; + if(me.scaleType!=='time'){ + me.summaryFilter.active = { + min: aggr.x, + max: aggr.x+aggr.dx + }; + } else { + me.summaryFilter.active = { + min: aggr.x, + max: new Date(aggr.x.getTime()+aggr.dx) + }; + } + // if we are filtering the last aggr, make max_score inclusive + me.summaryFilter.max_inclusive = (aggr.x+aggr.dx)===me.intervalRange.active.max; + if(me.scaleType==='step'){ + me.summaryFilter.max_inclusive = true; + } + + me.summaryFilter.filteredBin=this; + me.summaryFilter.addFilter(true); + if(sendLog) sendLog(kshf.LOG.FILTER_INTRVL_BIN, + {id:me.summaryFilter.id, info:me.summaryFilter.active.min+"x"+me.summaryFilter.active.max} ); + }); + + newBins.append("span").attr("class","aggr total"); + newBins.append("span").attr("class","aggr total_tip"); + newBins.append("span").attr("class","aggr active"); + newBins.append("span").attr("class","aggr preview").attr("fast",true); + newBins.append("span").attr("class","aggr compare").attr("hidden",true); + + newBins.append("span").attr("class","compareButton fa") + .each(function(aggr){ + this.tipsy = new Tipsy(this, { + gravity: 's', + title: function(){ + return (me.browser.comparedAggregate!==aggr)? + kshf.lang.cur.LockToCompare:kshf.lang.cur.Unlock; + } + }); + }) + .on("click",function(aggr){ + this.tipsy.hide(); + me.browser.setPreviewCompare(aggr); + d3.event.stopPropagation(); + }) + .on("mouseenter",function(aggr){ + this.tipsy.options.className = "tipsyFilterLock"; + this.tipsy.hide(); + this.tipsy.show(); + d3.event.stopPropagation(); + }) + .on("mouseleave",function(aggr){ + this.tipsy_title = undefined; + this.tipsy.hide(); + d3.event.stopPropagation(); + }) + ; + + newBins.append("span").attr("class","measureLabel").each(function(bar){ + kshf.Util.setTransform(this,"translateY("+me.height_hist+"px)"); + }); + + this.DOM.aggr_Group = this.DOM.histogram_bins.selectAll(".aggr_Group"); + this.DOM.aggr_Total = this.DOM.aggr_Group.selectAll(".total"); + this.DOM.aggr_TotalTip = this.DOM.aggr_Group.selectAll(".total_tip"); + this.DOM.aggr_Active = this.DOM.aggr_Group.selectAll(".active"); + this.DOM.aggr_Preview = this.DOM.aggr_Group.selectAll(".preview"); + this.DOM.aggr_Compare = this.DOM.aggr_Group.selectAll(".compare"); + + this.DOM.compareButton = this.DOM.aggr_Group.selectAll(".compareButton"); + this.DOM.measureLabel = this.DOM.aggr_Group.selectAll(".measureLabel"); + }, + /** --- */ + roundFilterRange: function(){ + // Make sure the range is within the visible limits: + this.summaryFilter.active.min = Math.max( + this.intervalTicks[0], this.summaryFilter.active.min); + this.summaryFilter.active.max = Math.min( + this.intervalTicks[this.intervalTicks.length-1], this.summaryFilter.active.max); + + if(this.scaleType==='time'){ + // TODO: Round to meaningful dates + return; + } + if(this.scaleType==='log' || this.scaleType==='step' || (!this.hasFloat) ){ + this.summaryFilter.active.min=Math.round(this.summaryFilter.active.min); + this.summaryFilter.active.max=Math.round(this.summaryFilter.active.max); + } + }, + /** -- */ + initDOM_Slider: function(){ + var me=this; + + this.DOM.intervalSlider = this.DOM.facetInterval.append("div").attr("class","intervalSlider") + .style('margin-left',(this.width_vertAxisLabel)+"px"); + + this.DOM.zoomControl = this.DOM.intervalSlider.append("span").attr("class","zoomControl fa") + .attr("sign","plus") + .each(function(d){ + this.tipsy = new Tipsy(this, { + gravity: 'w', title: function(){ + return (this.getAttribute("sign")==="plus")?"Zoom into range":"Zoom out"; + } + }); + }) + .on("mouseenter",function(){ this.tipsy.show(); }) + .on("mouseleave",function(){ this.tipsy.hide(); }) + .on("click",function(){ + this.tipsy.hide(); + me.setZoomed(this.getAttribute("sign")==="plus"); + }) + ; + + var controlLine = this.DOM.intervalSlider.append("div").attr("class","controlLine") + .on("mousedown", function(){ + if(d3.event.which !== 1) return; // only respond to left-click + me.browser.setNoAnim(true); + var e=this.parentNode; + var initPos = me.valueScale.invert(d3.mouse(e)[0]); + d3.select("body").style('cursor','ew-resize') + .on("mousemove", function() { + var targetPos = me.valueScale.invert(d3.mouse(e)[0]); + me.summaryFilter.active.min=d3.min([initPos,targetPos]); + me.summaryFilter.active.max=d3.max([initPos,targetPos]); + me.roundFilterRange(); + me.refreshIntervalSlider(); + // wait half second to update + if(this.timer){ + clearTimeout(this.timer); + this.timer = null; + } + me.summaryFilter.filteredBin=this; + this.timer = setTimeout(function(){ + if(me.isFiltered_min() || me.isFiltered_max()){ + me.summaryFilter.addFilter(true); + if(sendLog) sendLog(kshf.LOG.FILTER_INTRVL_HANDLE, + { id: me.summaryFilter.id, + info: me.summaryFilter.active.min+"x"+me.summaryFilter.active.m}); + } else { + me.summaryFilter.clearFilter(); + } + },250); + }).on("mouseup", function(){ + me.browser.setNoAnim(false); + d3.select("body").style('cursor','auto').on("mousemove",null).on("mouseup",null); + }); + d3.event.preventDefault(); + }); + + controlLine.append("span").attr("class","base total"); + controlLine.append("span").attr("class","base active") + .each(function(){ + this.tipsy = new Tipsy(this, { + gravity: "s", + title: function(){ return kshf.lang.cur.DragToFilter; } + }) + }) + // TODO: The problem is, the x-position (left-right) of the tooltip is not correctly calculated + // because the size of the bar is set by scaling, not through width.... + //.on("mouseover",function(){ this.tipsy.show(); }) + .on("mouseout" ,function(){ this.tipsy.hide(); }) + .on("mousedown", function(){ + this.tipsy.hide(); + if(d3.event.which !== 1) return; // only respond to left-click + if(me.scaleType==='time') return; // time is not supported for now. + me.browser.setNoAnim(true); + var e=this.parentNode; + var initMin = me.summaryFilter.active.min; + var initMax = me.summaryFilter.active.max; + var initRange= initMax - initMin; + var initPos = d3.mouse(e)[0]; + + d3.select("body").style('cursor','ew-resize') + .on("mousemove", function() { + if(me.scaleType==='log'){ + var targetDif = d3.mouse(e)[0]-initPos; + me.summaryFilter.active.min = + me.valueScale.invert(me.valueScale(initMin)+targetDif); + me.summaryFilter.active.max = + me.valueScale.invert(me.valueScale(initMax)+targetDif); + + } else { + var targetPos = me.valueScale.invert(d3.mouse(e)[0]); + var targetDif = targetPos-me.valueScale.invert(initPos); + + me.summaryFilter.active.min = initMin+targetDif; + me.summaryFilter.active.max = initMax+targetDif; + if(me.summaryFilter.active.minme.intervalRange.active.max){ + me.summaryFilter.active.max=me.intervalRange.active.max; + me.summaryFilter.active.min=me.intervalRange.active.max-initRange; + } + } + + me.roundFilterRange(); + me.refreshIntervalSlider(); + + // wait half second to update + if(this.timer){ + clearTimeout(this.timer); + this.timer = null; + } + me.summaryFilter.filteredBin = this; + this.timer = setTimeout(function(){ + if(me.isFiltered_min() || me.isFiltered_max()){ + me.summaryFilter.addFilter(true); + if(sendLog) sendLog(kshf.LOG.FILTER_INTRVL_HANDLE, + { id: me.summaryFilter.id, + info: me.summaryFilter.active.min+"x"+me.summaryFilter.active.max}); + } else{ + me.summaryFilter.clearFilter(); + } + },200); + }).on("mouseup", function(){ + me.browser.setNoAnim(false); + d3.select("body").style('cursor','auto').on("mousemove",null).on("mouseup",null); + }); + d3.event.preventDefault(); + d3.event.stopPropagation(); + }); + + var handle_cb = function (d, i) { + var mee = this; + if(d3.event.which !== 1) return; // only respond to left-click + me.browser.setNoAnim(true); + var e=this.parentNode; + d3.select("body").style('cursor','ew-resize') + .on("mousemove", function() { + mee.dragging = true; + me.browser.pauseResultPreview = true; + var targetPos = me.valueScale.invert(d3.mouse(e)[0]); + me.summaryFilter.active[d] = targetPos; + // Swap is min > max + if(me.summaryFilter.active.min>me.summaryFilter.active.max){ + var t=me.summaryFilter.active.min; + me.summaryFilter.active.min = me.summaryFilter.active.max; + me.summaryFilter.active.max = t; + if(d==='min') d='max'; else d='min'; + } + me.roundFilterRange(); + me.refreshIntervalSlider(); + // wait half second to update + if(this.timer){ + clearTimeout(this.timer); + this.timer = null; + } + me.summaryFilter.filteredBin=this; + this.timer = setTimeout( function(){ + if(me.isFiltered_min() || me.isFiltered_max()){ + if(sendLog) sendLog(kshf.LOG.FILTER_INTRVL_HANDLE, + { id: me.summaryFilter.id, + info: me.summaryFilter.active.min+"x"+me.summaryFilter.active.max }); + me.summaryFilter.addFilter(true); + } else { + me.summaryFilter.clearFilter(); + } + },200); + }).on("mouseup", function(){ + mee.dragging = false; + me.browser.pauseResultPreview = false; + me.browser.setNoAnim(false); + d3.select("body").style('cursor','auto').on("mousemove",null).on("mouseup",null); + }); + d3.event.preventDefault(); + d3.event.stopPropagation(); + }; + + controlLine.selectAll(".handle").data(['min','max']).enter() + .append("span").attr("class",function(d){ return "handle "+d; }) + .each(function(d,i){ + this.tipsy = new Tipsy(this, { + gravity: i==0?"e":"w", title: function(){ return kshf.lang.cur.DragToFilter } + }) + }) + .on("mouseover",function(){ if(this.dragging!==true) this.tipsy.show(); }) + .on("mouseout" ,function(){ this.tipsy.hide(); }) + .on("mousedown", function(d,i){ + this.tipsy.hide(); + handle_cb.call(this,d,i); + }) + .append("span").attr("class","rangeLimitOnChart"); + + this.DOM.selectedItemValue = controlLine.append("div").attr("class","selectedItemValue"); + this.DOM.selectedItemValue.append("span").attr("class","circlee"); + this.DOM.selectedItemValueText = this.DOM.selectedItemValue + .append("span").attr("class","selected-item-value-text") + .append("span").attr("class","selected-item-value-text-v"); + + this.DOM.labelGroup = this.DOM.intervalSlider.append("div").attr("class","labelGroup"); + }, + /** -- */ + updateBarScale2Total: function(){ + this.chartScale_Measure + .domain([0, this.getMaxAggr_Total()]) + .range ([0, this.height_hist]); + }, + /** -- */ + updateBarScale2Active: function(){ + this.chartScale_Measure + .domain([0, this.getMaxAggr_Active()]) + .range ([0, this.height_hist]); + }, + /** -- */ + updateAggregate_Active: function(){ + this.histBins.forEach(function(aggr){ aggr.aggregate_Active = 0; }); + + if(this.parentFacet && this.parentFacet.hasCategories()){ + this.histBins.forEach(function(aggr){ + aggr.forEach(function(item){ + if(item.aggregate_Active>0) aggr.aggregate_Active+=item.aggregate_Self; + }); + }); + } else { + this.histBins.forEach(function(aggr){ + aggr.forEach(function(item){ if(item.isWanted) aggr.aggregate_Active+=item.aggregate_Self; }); + }); + } + }, + /** -- */ + refreshBins_Translate: function(){ + var me=this; + var offset = 0; + if(this.scaleType==='step') offset = this.width_barGap-this.aggrWidth/2; + if(this.scaleType==='time') offset = this.width_barGap; + this.DOM.aggr_Group + .style("width",this.getBarWidth()+"px") + .each(function(aggr){ + kshf.Util.setTransform(this,"translateX("+(me.valueScale(aggr.x)+offset)+"px)"); + }); + }, + /** -- Note: Same as the function used for categorical facet */ + refreshViz_All: function(){ + if(this.isEmpty || this.collapsed) return; + var me=this; + this.refreshViz_Total(); + this.refreshViz_Active(); + + this.DOM.aggr_Preview.attr("fast",null); // take it slow for result preview animations + this.refreshViz_Preview(); + setTimeout(function(){ me.DOM.aggr_Preview.attr("fast",true); },800); + + this.refreshViz_Compare(); + this.refreshMeasureLabel(); + this.refreshViz_Axis(); + }, + /** -- */ + refreshViz_Scale: function(){ + this.refreshViz_Total(); + this.refreshViz_Active(); + }, + /** -- */ + refreshViz_Total: function(){ + if(this.isEmpty || this.collapsed) return; + var me=this; + var width=this.getBarWidth(); + + var heightTotal = function(aggr){ + if(aggr.length===0) return 0; + if(me.browser.ratioModeActive) return me.height_hist; + return me.chartScale_Measure(aggr.length); + }; + + if(this.scaleType==='time'){ + var durationTime=this.browser.noAnim?0:700; + this.timeSVGLine = d3.svg.area() + .x(function(aggr){ + return me.valueScale(aggr.x)+width/2; + }) + .y0(me.height_hist) + .y1(function(aggr){ + if(aggr.aggregate_Total===0) return me.height_hist+3; + return me.height_hist-heightTotal(aggr); + }); + this.DOM.lineTrend_Total + .transition().duration(durationTime) + .attr("d", this.timeSVGLine); + } else { + this.DOM.aggr_Total.each(function(aggr){ + kshf.Util.setTransform(this, + "translateY("+me.height_hist+"px) scale("+width+","+heightTotal(aggr)+")"); + }); + if(!this.browser.ratioModeActive){ + this.DOM.aggr_TotalTip + .style("opacity",function(aggr){ + return (aggr.length>me.chartScale_Measure.domain()[1])?1:0; + }) + .style("width",width+"px"); + } else { + this.DOM.aggr_TotalTip.style("opacity",0); + } + } + }, + /** -- */ + refreshViz_Active: function(){ + if(this.isEmpty || this.collapsed) return; + var me=this; + var width = this.getBarWidth(); + + var heightActive = function(aggr){ + if(aggr.aggregate_Active===0) return 0; + if(me.browser.ratioModeActive) return me.height_hist; + return me.chartScale_Measure(aggr.aggregate_Active); + }; + + if(!this.isFiltered() || this.scaleType==='step'){ + this.DOM.aggr_Active.each(function(aggr){ + kshf.Util.setTransform(this, + "translateY("+me.height_hist+"px) scale("+width+","+heightActive(aggr)+")"); + }); + } else { + // is filtered & not step scale + var filter_min = this.summaryFilter.active.min; + var filter_max = this.summaryFilter.active.max; + var minPos = this.valueScale(filter_min); + var maxPos = this.valueScale(filter_max); + this.DOM.aggr_Active.each(function(aggr){ + var translateX = ""; + var width_self=width; + var aggr_min = aggr.x; + var aggr_max = aggr.x + aggr.dx; + if(aggr.aggregate_Active>0){ + // it is within the filtered range + if(aggr_minfilter_max){ + var lostWidth = me.valueScale(aggr_max)-maxPos-me.width_barGap*2; + //translateX = " translateX("+lostWidth+"px)"; + width_self -= lostWidth; + } + } + kshf.Util.setTransform(this, + "translateY("+me.height_hist+"px) "+translateX+"scale("+width_self+","+heightActive(aggr)+")"); + }); + } + + this.DOM.compareButton + .each(function(aggr){ + kshf.Util.setTransform(this,"translateY("+(me.height_hist-heightActive(aggr)-9)+"px)"); + }) + .attr("inside",function(aggr){ + if(me.browser.ratioModeActive) return ""; + if(me.height_hist-heightActive(aggr)<6) return ""; + }); + + if(this.scaleType==='time'){ + var durationTime=this.browser.noAnim?0:700; + this.timeSVGLine = d3.svg.area() + .x(function(aggr){ + return me.valueScale(aggr.x)+width/2; + }) + .y0(me.height_hist+2) + .y1(function(aggr){ + if(aggr.aggregate_Active===0) return me.height_hist+3; + return me.height_hist-heightActive(aggr); + }); + + this.DOM.lineTrend_Active + .transition().duration(durationTime) + .attr("d", this.timeSVGLine); + + this.DOM.lineTrend_ActiveLine.transition().duration(durationTime) + .attr("y1",function(aggr){ return me.height_hist+3; }) + .attr("y2",function(aggr){ + if(aggr.aggregate_Active===0) return me.height_hist+3; + return me.height_hist-heightActive(aggr); + }) + .attr("x1",function(aggr){ + return me.valueScale(aggr.x)+width/2; + }) + .attr("x2",function(aggr){ return me.valueScale(aggr.x)+width/2; }); + } + }, + /** Gets the active previewed value, and stores it in the cache */ + cachePreviewValue: function(){ + if(this.isEmpty || this.collapsed) return; + var preview_not=this.browser.preview_not; + this.histBins.forEach(function(aggr){ + aggr.aggregate_Compare = aggr.aggregate_Preview; + if(preview_not) { + aggr.aggregate_Compare = aggr.aggregate_Active-aggr.aggregate_Preview; + } + }); + }, + /** -- */ + refreshViz_Compare: function(){ + if(this.isEmpty || this.collapsed) return; + if(!this.browser.vizCompareActive) return; + + var me=this; + var width = this.getBarWidth(); + + var heightCompare = function(aggr){ + if(aggr.aggregate_Compare===0) return 0; + if(me.browser.ratioModeActive) + return (aggr.aggregate_Compare/aggr.aggregate_Active)*me.height_hist; + return me.chartScale_Measure(aggr.aggregate_Compare); + }; + + if(!this.isFiltered() || this.scaleType==='step'){ + this.DOM.aggr_Compare.each(function(aggr){ + kshf.Util.setTransform(this, + "translateY("+me.height_hist+"px) scale("+(width/2)+","+heightCompare(aggr)+")"); + }); + } else { + // is filtered & not step scale + var filter_min = this.summaryFilter.active.min; + var filter_max = this.summaryFilter.active.max; + var minPos = this.valueScale(filter_min); + var maxPos = this.valueScale(filter_max); + this.DOM.aggr_Compare.each(function(aggr){ + var translateX = ""; + var width_self=width; + var aggr_min = aggr.x; + var aggr_max = aggr.x + aggr.dx; + if(aggr.aggregate_Active>0){ + // it is within the filtered range + if(aggr_minfilter_max){ + var lostWidth = me.valueScale(aggr_max)-maxPos-me.width_barGap*2; + //translateX = " translateX("+lostWidth+"px)"; + width_self -= lostWidth; + } + } + kshf.Util.setTransform(this, + "translateY("+me.height_hist+"px) "+translateX+"scale("+(width_self/2)+","+heightCompare(aggr)+")"); + }); + } + + if(this.scaleType==='time'){ + this.timeSVGLine = d3.svg.line() + .x(function(aggr){ return me.valueScale(aggr.x)+width/2; }) + .y(function(aggr){ + if(aggr.aggregate_Compare===0) return me.height_hist+3; + return me.height_hist-heightCompare(aggr); + }); + + var durationTime=0; + if(this.browser.vizCompareActive){ + durationTime=200; + } + + this.DOM.lineTrend_Compare + .transition() + .duration(durationTime) + .attr("d", this.timeSVGLine); + + this.DOM.lineTrend_CompareLine.transition().duration(durationTime) + .attr("y1",function(aggr){ return me.height_hist+3; }) + .attr("y2",function(aggr){ + if(aggr.aggregate_Compare===0) return me.height_hist+3; + return me.height_hist-heightCompare(aggr); + }) + .attr("x1",function(aggr){ + return me.valueScale(aggr.x)+width/2+1; + }) + .attr("x2",function(aggr){ return me.valueScale(aggr.x)+width/2+1; }); + } + }, + /** -- */ + refreshViz_Preview: function(){ + if(this.isEmpty || this.collapsed) return; + var me=this; + var width = this.getBarWidth(); + + var getAggrHeight_Preview = function(aggr){ + var p=aggr.aggregate_Preview; + if(me.browser.preview_not) p = aggr.aggregate_Active-aggr.aggregate_Preview; + if(me.browser.ratioModeActive){ + if(aggr.aggregate_Active===0) return 0; + return (p / aggr.aggregate_Active)*me.height_hist; + } else { + return me.chartScale_Measure(p); + } + }; + + if(!this.isFiltered() || this.scaleType==='step'){ + this.DOM.aggr_Preview.each(function(aggr){ + kshf.Util.setTransform(this, + "translateY("+me.height_hist+"px) scale("+width+","+getAggrHeight_Preview(aggr)+")"); + }); + } else { + // is filtered & not step scale + var filter_min = this.summaryFilter.active.min; + var filter_max = this.summaryFilter.active.max; + var minPos = this.valueScale(filter_min); + var maxPos = this.valueScale(filter_max); + this.DOM.aggr_Preview.each(function(aggr){ + var translateX = ""; + var width_self=width; + var aggr_min = aggr.x; + var aggr_max = aggr.x + aggr.dx; + if(aggr.aggregate_Active>0){ + // it is within the filtered range + if(aggr_minfilter_max){ + var lostWidth = me.valueScale(aggr_max)-maxPos-me.width_barGap*2; + //translateX = " translateX("+lostWidth+"px)"; + width_self -= lostWidth; + } + } + kshf.Util.setTransform(this, + "translateY("+me.height_hist+"px) "+translateX+"scale("+width_self+","+getAggrHeight_Preview(aggr)+")"); + }); + } + + this.refreshMeasureLabel(); + + if(this.scaleType==='time'){ + var durationTime=200; + this.timeSVGLine = d3.svg.area() + .x(function(aggr){ + return me.valueScale(aggr.x)+width/2; + }) + .y0(me.height_hist+2) + .y1(function(aggr){ + if(aggr.aggregate_Preview===0) return me.height_hist+3; + return me.height_hist-getAggrHeight_Preview(aggr); + }); + + this.DOM.lineTrend_Preview + .transition().duration(durationTime) + .attr("d", this.timeSVGLine); + + this.DOM.lineTrend_PreviewLine.transition().duration(durationTime) + .attr("y1",function(aggr){ return me.height_hist+3; }) + .attr("y2",function(aggr){ + if(aggr.aggregate_Preview===0) return me.height_hist+3; + return me.height_hist-getAggrHeight_Preview(aggr); + }) + .attr("x1",function(aggr){ + return me.valueScale(aggr.x)+width/2-1; + }) + .attr("x2",function(aggr){ return me.valueScale(aggr.x)+width/2-1; }); + } + }, + /** -- */ + clearViz_Preview: function(){ + if(this.isEmpty || this.collapsed) return; + if(this.DOM.aggr_Preview===undefined) return; + var me=this; + var width = this.getBarWidth(); + var transform="translateY("+this.height_hist+"px) "+"scale("+this.getBarWidth()+",0)"; + this.DOM.aggr_Preview.each(function(bar){ + bar.aggregate_Preview=0; + kshf.Util.setTransform(this,transform); + }); + this.refreshMeasureLabel(); + + if(this.scaleType==='time'){ + var durationTime=200; + this.timeSVGLine = d3.svg.line() + .x(function(aggr){ + return me.valueScale(aggr.x)+width/2; + }) + .y(function(aggr){ + return me.height_hist; + }); + + this.DOM.lineTrend_Preview + .transition().duration(durationTime) + .attr("d", this.timeSVGLine); + } + }, + /** -- */ + refreshViz_Axis: function(){ + if(this.isEmpty || this.collapsed) return; + var me = this, tickValues, maxValue; + + var chartAxis_Measure_TickSkip = me.height_hist/17; + + if(this.browser.ratioModeActive) { + maxValue = 100; + tickValues = d3.scale.linear() + .rangeRound([0, this.height_hist]) + .domain([0,100]) + .ticks(chartAxis_Measure_TickSkip) + .filter(function(d){return d!==0;}); + } else { + if(this.browser.percentModeActive) { + maxValue = Math.round(100*me.getMaxAggr_Active()/me.browser.itemsWantedCount); + tickValues = d3.scale.linear() + .rangeRound([0, this.height_hist]) + .nice(chartAxis_Measure_TickSkip) + .clamp(true) + .domain([0,maxValue]) + .ticks(chartAxis_Measure_TickSkip); + } else { + tickValues = this.chartScale_Measure.ticks(chartAxis_Measure_TickSkip); + } + } + + // remove non-integer values & 0... + tickValues = tickValues.filter(function(d){return d%1===0&&d!==0;}); + + var tickDoms = this.DOM.chartAxis_Measure.selectAll("span.tick") + .data(tickValues,function(i){return i;}); + tickDoms.exit().remove(); + var tickData_new=tickDoms.enter().append("span").attr("class","tick"); + + // translate the ticks horizontally on scale + tickData_new.append("span").attr("class","line"); + + // Place the doms at the bottom of the histogram, so their animation is in the right direction + tickData_new.each(function(){ + kshf.Util.setTransform(this,"translateY("+me.height_hist+"px)"); + }); + + if(this.browser.ratioModeActive){ + tickData_new.append("span").attr("class","text").text(function(d){return d;}); + } else { + tickData_new.append("span").attr("class","text").text(function(d){return d3.format("s")(d);}); + } + + setTimeout(function(){ + var transformFunc; + if(me.browser.ratioModeActive){ + transformFunc=function(d){ + kshf.Util.setTransform(this,"translateY("+ + (me.height_hist-d*me.height_hist/100)+"px)"); + }; + } else { + if(me.browser.percentModeActive){ + transformFunc=function(d){ + kshf.Util.setTransform(this,"translateY("+ + (me.height_hist-(d/maxValue)*me.height_hist)+"px)"); + }; + } else { + transformFunc=function(d){ + kshf.Util.setTransform(this,"translateY("+ + (me.height_hist-me.chartScale_Measure(d))+"px)"); + }; + } + } + var x = me.browser.noAnim; + if(x===false) me.browser.setNoAnim(true); + me.DOM.chartAxis_Measure.selectAll(".tick").style("opacity",1).each(transformFunc); + if(x===false) me.browser.setNoAnim(false); + }); + }, + /** -- */ + refreshMeasureLabel: function(){ + var me=this; + if(this.browser.previewedSelectionSummary===this) return; + + this.DOM.aggr_Group.attr("noitems",function(aggr){ return aggr.aggregate_Active===0; }); + + this.DOM.measureLabel.each(function(aggr){ + var p=aggr.aggregate_Preview; + if(me.browser.vizPreviewActive){ + if(me.browser.preview_not) + p = aggr.aggregate_Active-aggr.aggregate_Preview; + else + p = aggr.aggregate_Preview; + } else { + p = aggr.aggregate_Active; + } + if(me.browser.percentModeActive){ + if(me.browser.ratioModeActive){ + p = 100*p/aggr.aggregate_Active; + if(!me.browser.vizPreviewActive){ + this.textContent = ""; + return; + } + } else { + p = 100*p/me.browser.itemsWanted_Aggregrate_Total; + } + if(p<0) p=0; + this.textContent = p.toFixed(0)+"%"; + } else { + if(p<0) p=0; + this.textContent = kshf.Util.formatForItemCount(p); + } + }); + }, + /** -- */ + refreshIntervalSlider: function(){ + var minPos = this.valueScale(this.summaryFilter.active.min); + var maxPos = this.valueScale(this.summaryFilter.active.max); + // Adjusting min/max position is important because if it is not adjusted, the + // tips of the filtering range may not appear at the bar limits, which looks distracting. + if(this.summaryFilter.active.min===this.intervalRange.min){ + minPos = this.valueScale.range()[0]; + } + if(this.summaryFilter.active.max===this.intervalRange.max){ + maxPos = this.valueScale.range()[1]; + } + if(this.scaleType==='step'){ + minPos-=this.aggrWidth/2; + maxPos+=this.aggrWidth/2; + } + + this.DOM.intervalSlider.select(".base.active") + .attr("filtered",this.isFiltered()) + .each(function(d){ + kshf.Util.setTransform(this,"translateX("+minPos+"px) scaleX("+(maxPos-minPos)+")"); + }); + this.DOM.intervalSlider.selectAll(".handle") + .each(function(d){ + kshf.Util.setTransform(this,"translateX("+((d==="min")?minPos:maxPos)+"px)"); + }); + }, + /** -- */ + refreshHeight: function(){ + this.DOM.histogram.style("height",(this.height_hist+this.height_hist_topGap)+"px") + this.DOM.wrapper.style("height",(this.collapsed?"0":this.getHeight_Wrapper())+"px"); + this.DOM.root.style("max-height",(this.getHeight()+1)+"px"); + + var labelTranslate ="translateY("+this.height_hist+"px)"; + if(this.DOM.measureLabel) + this.DOM.measureLabel.each(function(bar){ kshf.Util.setTransform(this,labelTranslate); }); + if(this.DOM.timeSVG) + this.DOM.timeSVG.style("height",(this.height_hist+2)+"px"); + }, + /** -- */ + refreshWidth: function(){ + var _width_ = this.getWidth()-this.width_histMargin-this.width_vertAxisLabel; + this.updateScaleAndBins( _width_, Math.ceil(_width_/this.optimumTickWidth)); + this.updateDOMwidth(); + }, + /** -- */ + setHeight: function(targetHeight){ + if(this.histBins===undefined) return; + var c = targetHeight-this.getHeight_Header()-this.getHeight_Extra(); + c = Math.min(c,100); + if(this.height_hist===c) return; + this.height_hist = c; + this.updateBarScale2Active(); + this.refreshBins_Translate(); + + this.refreshViz_Scale(); + this.refreshViz_Preview(); + this.refreshViz_Compare(); + this.refreshViz_Axis(); + this.refreshHeight(); + + this.DOM.labelGroup.style("height",this.height_labels+"px"); + this.DOM.intervalSlider.selectAll(".rangeLimitOnChart") + .style("height",this.height_hist+"px") + .style("top",(-this.height_hist-13)+"px") + }, + /** -- */ + updateAfterFilter: function(resultChange){ + if(this.isEmpty) return; + this.updateAggregate_Active(); + this.refreshMeasureLabel(); + this.updateBarPreviewScale2Active(); + if(this.showPercentile) this.updatePercentiles(); + }, + /** -- */ + updateBarPreviewScale2Active: function(){ + var me=this; + this.updateBarScale2Active(); + this.refreshBins_Translate(); + this.refreshViz_Scale(); + this.refreshViz_Compare(); + + this.DOM.aggr_Preview.attr("fast",null); // take it slow for result preview animations + this.refreshViz_Preview(); + this.refreshViz_Axis(); + + setTimeout(function(){ me.DOM.aggr_Preview.attr("fast",true); },800); + }, + /** -- */ + setSelectedPosition: function(v){ + if(!this.inBrowser()) return; + if(this.DOM.inited===false) return; + if(v===null) return; + if(this.valueScale===undefined) return; + + var t="translateX("+(this.valueScale(v))+"px)"; + this.DOM.selectedItemValue + .each(function(){ kshf.Util.setTransform(this,t); }) + .style("display","block"); + + this.DOM.selectedItemValueText.html( + this.intervalTickFormat(v)+(this.unitName?(""+this.unitName+""):"") + ); + }, + /** -- */ + hideSelectedPosition: function(){ + if(this.inBrowser()) this.DOM.selectedItemValue.style("display",null); + }, + /** -- */ + updatePercentiles: function(){ + var me=this; + // get active values into an array + // the items are already sorted by their numeric value, it's just a linear pass. + var values = []; + if(!this.hasEntityParent()){ + this.filteredItems.forEach(function(item){ + if(item.isWanted) values.push(me.itemV(item)); + }); + } else { + this.filteredItems.forEach(function(item){ + if(item.aggregate_Active>0) values.push(me.itemV(item)); + }); + } + + this.quantile_val = {}; + this.quantile_pos = {}; + [10,20,30,40,50,60,70,80,90].forEach(function(q){ + this.quantile_val[q] = d3.quantile(values,q/100); + this.quantile_pos[q] = this.valueScale(this.quantile_val[q]); + kshf.Util.setTransform(this.DOM.quantile[q][0][0],"translateX("+this.quantile_pos[q]+"px)"); + },this); + + [[10,90],[20,80],[30,70],[40,60]].forEach(function(qb){ + kshf.Util.setTransform(this.DOM.quantile[""+qb[0]+"_"+qb[1]][0][0], + "translateX("+(this.quantile_pos[qb[0]])+"px) "+ + "scaleX("+(this.quantile_pos[qb[1]]-this.quantile_pos[qb[0]])+") "); + },this); + }, +}; + +for(var index in Summary_Interval_functions){ + kshf.Summary_Interval.prototype[index] = Summary_Interval_functions[index]; +} diff --git a/osrframework/static/js/kickstart.js b/osrframework/static/js/kickstart.js new file mode 100644 index 0000000..72c3787 --- /dev/null +++ b/osrframework/static/js/kickstart.js @@ -0,0 +1,424 @@ +/* + 99Lime.com HTML KickStart by Joshua Gatcke + kickstart.js +*/ + +jQuery(document).ready(function($){ + + /*--------------------------------- + MENU Dropdowns + -----------------------------------*/ + $('ul.menu').each(function(){ + // add the menu toggle + $(this).prepend(''); + + // find menu items with children. + $(this).find('li').has('ul').addClass('has-menu') + .find('a:first').append(' '); + }); + + $('ul.menu li').hover(function(){ + $(this).find('ul:first').stop(true, true).fadeIn('fast'); + $(this).addClass('hover'); + }, + function(){ + $(this).find('ul').stop(true, true).fadeOut('slow'); + $(this).removeClass('hover'); + }); + + /*--------------------------------- + Slideshow + -----------------------------------*/ + $('.slideshow').bxSlider({ + mode: 'horizontal', // 'horizontal', 'vertical', 'fade' + video: true, + useCSS: true, + pager: true, + speed: 500, // transition time + startSlide: 0, + infiniteLoop: true, + captions: true, + adaptiveHeight: false, + touchEnabled: true, + pause: 4000, + autoControls: false, + controls: false, + autoStart: true, + auto: true + }); + + /*--------------------------------- + Fancybox Lightbox + -----------------------------------*/ + $('.gallery').each(function(i){ + $(this).find('a').attr('rel', 'gallery'+i) + .fancybox({ + overlayOpacity: 0.2, + overlayColor: '#000' + }); + }); + + // lightbox links + $('a.lightbox').fancybox({ + overlayOpacity: 0.2, + overlayColor: '#000' + }); + + /*--------------------------------- + Tabs + -----------------------------------*/ + // tab setup + $('.tab-content').addClass('clearfix').not(':first').hide(); + $('ul.tabs').each(function(){ + var current = $(this).find('li.current'); + if(current.length < 1) { $(this).find('li:first').addClass('current'); } + current = $(this).find('li.current a').attr('href'); + $(current).show(); + }); + + // tab click + $(document).on('click', 'ul.tabs a[href^="#"]', function(e){ + e.preventDefault(); + var tabs = $(this).parents('ul.tabs').find('li'); + var tab_next = $(this).attr('href'); + var tab_current = tabs.filter('.current').find('a').attr('href'); + $(tab_current).hide(); + tabs.removeClass('current'); + $(this).parent().addClass('current'); + $(tab_next).show(); + history.pushState( null, null, window.location.search + $(this).attr('href') ); + return false; + }); + + // tab hashtag identification and auto-focus + var wantedTag = window.location.hash; + if (wantedTag != "") + { + // This code can and does fail, hard, killing the entire app. + // Esp. when used with the jQuery.Address project. + try { + var allTabs = $("ul.tabs a[href^=" + wantedTag + "]").parents('ul.tabs').find('li'); + var defaultTab = allTabs.filter('.current').find('a').attr('href'); + $(defaultTab).hide(); + allTabs.removeClass('current'); + $("ul.tabs a[href^=" + wantedTag + "]").parent().addClass('current'); + $("#" + wantedTag.replace('#','')).show(); + } catch(e) { + // I have no idea what to do here, so I'm leaving this for the maintainer. + } + } + + /*--------------------------------- + Image Caption + -----------------------------------*/ + $('img.caption').each(function(){ + $(this).wrap('
'); + $(this).parents('div.caption') + .attr('class', 'img-wrap '+$(this).attr('class')); + if($(this).attr('title')){ + $(this).parents('div.caption') + .append(''+$(this).attr('title')+''); + } + }); + + /*--------------------------------- + Notice + -----------------------------------*/ + $(document).on('click', '.notice a[class^="icon-remove"]', function(e){ + e.preventDefault(); + var notice = $(this).parents('.notice'); + $(this).hide(); + notice.fadeOut('slow'); + }); + + /*--------------------------------- + ToolTip - TipTip + -----------------------------------*/ + + // Standard tooltip + $('.tooltip, .tooltip-top, .tooltip-bottom, .tooltip-right, .tooltip-left').each(function(){ + // variables + var tpos = 'top'; + var content = $(this).attr('title'); + var dataContent = $(this).attr('data-content'); + var keepAlive = false; + var action = 'hover'; + var delay = $(this).attr('data-delay'); + if (delay === undefined) {delay = 1000;} + + // position + if($(this).hasClass('tooltip-top')) { tpos = 'top'; } + if($(this).hasClass('tooltip-right')) { tpos = 'right'; } + if($(this).hasClass('tooltip-bottom')) { tpos = 'bottom'; } + if($(this).hasClass('tooltip-left')) { tpos = 'left'; } + + // content + $('.tooltip-content').removeClass('hide').wrap('
'); + if(dataContent) { content = $(dataContent).html(); keepAlive = true; } + + // action (hover or click) defaults to hover + if($(this).attr('data-action') == 'click') { action = 'click'; } + + // tooltip + $(this).attr('title','') + .tipTip({defaultPosition: tpos, content: content, keepAlive: keepAlive, activation: action, delay: delay}); + }); + + /*--------------------------------- + Table Sort + -----------------------------------*/ + // init + var aAsc = []; + $('table.sortable').each(function(){ + $(this).find('thead th').each(function(index){$(this).attr('rel', index);}); + $(this).find('th,td').each(function(){$(this).attr('value', $(this).text());}); + }); + + // table click + $(document).on('click', 'table.sortable thead th', function(e){ + // update arrow icon + $(this).parents('table.sortable').find('span.arrow').remove(); + $(this).append(''); + + // sort direction + var nr = $(this).attr('rel'); + aAsc[nr] = aAsc[nr]=='asc'?'desc':'asc'; + if(aAsc[nr] == 'desc'){ $(this).find('span.arrow').addClass('up'); } + + // sort rows + var rows = $(this).parents('table.sortable').find('tbody tr'); + rows.tsort('td:eq('+nr+')',{order:aAsc[nr],attr:'value'}); + + // fix row classes + rows.removeClass('alt first last'); + var table = $(this).parents('table.sortable'); + table.find('tr:even').addClass('alt'); + table.find('tr:first').addClass('first'); + table.find('tr:last').addClass('last'); + }); + + /*--------------------------------- + CSS Helpers + -----------------------------------*/ + $('input[type=checkbox]').addClass('checkbox'); + $('input[type=radio]').addClass('radio'); + $('input[type=file]').addClass('file'); + $('[disabled=disabled]').addClass('disabled'); + $('table').find('tr:even').addClass('alt'); + $('table').find('tr:first-child').addClass('first'); + $('table').find('tr:last-child').addClass('last'); + $('ul').find('li:first-child').addClass('first'); + $('ul').find('li:last-child').addClass('last'); + $('hr').before('
 
'); + $('[class*="col_"]').addClass('column'); + $('pre').addClass('prettyprint');prettyPrint(); + +}); + +/* + * FancyBox - jQuery Plugin + * Simple and fancy lightbox alternative + * + * Examples and documentation at: http://fancybox.net + * + * Copyright (c) 2008 - 2010 Janis Skarnelis + * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. + * + * Version: 1.3.4 (11/11/2010) + * Requires: jQuery v1.3+ + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ +(function(a){var p,u,v,e,B,m,C,j,y,z,s=0,d={},q=[],r=0,c={},k=[],E=null,n=new Image,H=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,S=/[^\.]\.(swf)\s*$/i,I,J=1,x=0,w="",t,g,l=!1,A=a.extend(a("
")[0],{prop:0}),K=navigator.userAgent.match(/msie [6]/i)&&!window.XMLHttpRequest,L=function(){u.hide();n.onerror=n.onload=null;E&&E.abort();p.empty()},M=function(){!1===d.onError(q,s,d)?(u.hide(),l=!1):(d.titleShow=!1,d.width="auto",d.height="auto",p.html('

The requested content cannot be loaded.
Please try again later.

'), +D())},G=function(){var b=q[s],c,f,e,g,k,j;L();d=a.extend({},a.fn.fancybox.defaults,"undefined"==typeof a(b).data("fancybox")?d:a(b).data("fancybox"));j=d.onStart(q,s,d);if(!1===j)l=!1;else{"object"==typeof j&&(d=a.extend(d,j));e=d.title||(b.nodeName?a(b).attr("title"):b.title)||"";b.nodeName&&!d.orig&&(d.orig=a(b).children("img:first").length?a(b).children("img:first"):a(b));""===e&&(d.orig&&d.titleFromAlt)&&(e=d.orig.attr("alt"));c=d.href||(b.nodeName?a(b).attr("href"):b.href)||null;if(/^(?:javascript)/i.test(c)|| +"#"==c)c=null;d.type?(f=d.type,c||(c=d.content)):d.content?f="html":c&&(f=c.match(H)?"image":c.match(S)?"swf":a(b).hasClass("iframe")?"iframe":0===c.indexOf("#")?"inline":"ajax");if(f)switch("inline"==f&&(b=c.substr(c.indexOf("#")),f=0').hide().insertBefore(a(b)).bind("fancybox-cleanup",function(){a(this).replaceWith(m.children())}).bind("fancybox-cancel", +function(){a(this).replaceWith(p.children())});a(b).appendTo(p);D();break;case "image":l=!1;a.fancybox.showActivity();n=new Image;n.onerror=function(){M()};n.onload=function(){l=!0;n.onerror=n.onload=null;d.width=n.width;d.height=n.height;a("").attr({id:"fancybox-img",src:n.src,alt:d.title}).appendTo(p);N()};n.src=c;break;case "swf":d.scrolling="no";g=''; +k="";a.each(d.swf,function(a,b){g+='';k+=" "+a+'="'+b+'"'});g+='";p.html(g);D();break;case "ajax":l=!1;a.fancybox.showActivity();d.ajax.win=d.ajax.success;E=a.ajax(a.extend({},d.ajax,{url:c,data:d.ajax.data||{},error:function(a){0
');d.width=p.width();d.height=p.height();N()},N=function(){var b,h;u.hide();if(e.is(":visible")&&!1===c.onCleanup(k,r,c))a.event.trigger("fancybox-cancel"),l=!1;else{l=!0;a(m.add(v)).unbind();a(window).unbind("resize.fb scroll.fb");a(document).unbind("keydown.fb");e.is(":visible")&&"outside"!==c.titlePosition&&e.css("height",e.height());k=q;r=s;c=d;if(c.overlayShow){if(v.css({"background-color":c.overlayColor,opacity:c.overlayOpacity, +cursor:c.hideOnOverlayClick?"pointer":"auto",height:a(document).height()}),!v.is(":visible")){if(K)a("select:not(#fancybox-tmp select)").filter(function(){return"hidden"!==this.style.visibility}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});v.show()}}else v.hide();b=O();var f={},F=c.autoScale,n=2*c.padding;f.width=-1b[0]||f.height>b[1]))"image"==d.type||"swf"==d.type?(F=c.width/c.height,f.width>b[0]&&(f.width=b[0],f.height=parseInt((f.width-n)/F+n,10)),f.height>b[1]&&(f.height=b[1],f.width=parseInt((f.height-n)*F+n,10))):(f.width=Math.min(f.width,b[0]),f.height=Math.min(f.height,b[1]));f.top=parseInt(Math.max(b[3]-20,b[3]+0.5*(b[1]-f.height-40)),10);f.left=parseInt(Math.max(b[2]-20,b[2]+0.5*(b[0]-f.width-40)),10);g=f;w=c.title||"";x=0;j.empty().removeAttr("style").removeClass(); +if(!1!==c.titleShow&&(w=a.isFunction(c.titleFormat)?c.titleFormat(w,k,r,c):w&&w.length?"float"==c.titlePosition?'
'+w+'
':'
'+w+"
":!1)&&""!==w)switch(j.addClass("fancybox-title-"+c.titlePosition).html(w).appendTo("body").show(),c.titlePosition){case "inside":j.css({width:g.width- +2*c.padding,marginLeft:c.padding,marginRight:c.padding});x=j.outerHeight(!0);j.appendTo(B);g.height+=x;break;case "over":j.css({marginLeft:c.padding,width:g.width-2*c.padding,bottom:c.padding}).appendTo(B);break;case "float":j.css("left",-1*parseInt((j.width()-g.width-40)/2,10)).appendTo(e);break;default:j.css({width:g.width-2*c.padding,paddingLeft:c.padding,paddingRight:c.padding}).appendTo(e)}j.hide();e.is(":visible")?(a(C.add(y).add(z)).hide(),b=e.position(),t={top:b.top,left:b.left,width:e.width(), +height:e.height()},h=t.width==g.width&&t.height==g.height,m.fadeTo(c.changeFade,0.3,function(){var b=function(){m.html(p.contents()).fadeTo(c.changeFade,1,P)};a.event.trigger("fancybox-change");m.empty().removeAttr("filter").css({"border-width":c.padding,width:g.width-2*c.padding,height:d.autoDimensions?"auto":g.height-x-2*c.padding});h?b():(A.prop=0,a(A).animate({prop:1},{duration:c.changeSpeed,easing:c.easingChange,step:Q,complete:b}))})):(e.removeAttr("style"),m.css("border-width",c.padding),"elastic"== +c.transitionIn?(t=R(),m.html(p.contents()),e.show(),c.opacity&&(g.opacity=0),A.prop=0,a(A).animate({prop:1},{duration:c.speedIn,easing:c.easingIn,step:Q,complete:P})):("inside"==c.titlePosition&&0').appendTo(m);e.show();l=!1;a.fancybox.center();c.onComplete(k,r,c);var b,h;k.length-1>r&&(b=k[r+1].href,"undefined"!==typeof b&&b.match(H)&&(h=new Image,h.src=b));0b?0.5:b);e.css(a);m.css({width:a.width-2*c.padding,height:a.height-x*b-2*c.padding})},O=function(){return[a(window).width()-2*c.margin,a(window).height()-2*c.margin,a(document).scrollLeft()+c.margin,a(document).scrollTop()+c.margin]},R=function(){var b=d.orig?a(d.orig):!1,h={};b&&b.length?(h=b.offset(),h.top+=parseInt(b.css("paddingTop"),10)||0,h.left+=parseInt(b.css("paddingLeft"),10)||0,h.top+=parseInt(b.css("border-top-width"),10)||0,h.left+= +parseInt(b.css("border-left-width"),10)||0,h.width=b.width(),h.height=b.height(),h={width:h.width+2*c.padding,height:h.height+2*c.padding,top:h.top-c.padding-20,left:h.left-c.padding-20}):(b=O(),h={width:2*c.padding,height:2*c.padding,top:parseInt(b[3]+0.5*b[1],10),left:parseInt(b[2]+0.5*b[0],10)});return h},T=function(){u.is(":visible")?(a("div",u).css("top",-40*J+"px"),J=(J+1)%12):clearInterval(I)};a.fn.fancybox=function(b){if(!a(this).length)return this;a(this).data("fancybox",a.extend({},b,a.metadata? +a(this).metadata():{})).unbind("click.fb").bind("click.fb",function(b){b.preventDefault();l||(l=!0,a(this).blur(),q=[],s=0,b=a(this).attr("rel")||"",!b||""==b||"nofollow"===b?q.push(this):(q=a("a[rel="+b+"], area[rel="+b+"], img[rel="+b+"]"),s=q.index(this)),G())});return this};a.fancybox=function(b,c){var d;if(!l){l=!0;d="undefined"!==typeof c?c:{};q=[];s=parseInt(d.index,10)||0;if(a.isArray(b)){for(var e=0,g=b.length;eq.length||0>s)s=0;G()}};a.fancybox.showActivity=function(){clearInterval(I);u.show();I=setInterval(T,66)};a.fancybox.hideActivity=function(){u.hide()};a.fancybox.next=function(){return a.fancybox.pos(r+1)};a.fancybox.prev=function(){return a.fancybox.pos(r-1)};a.fancybox.pos=function(b){l||(b=parseInt(b), +q=k,-1=k.length?0:k.length-1,G()))};a.fancybox.cancel=function(){l||(l=!0,a.event.trigger("fancybox-cancel"),L(),d.onCancel(q,s,d),l=!1)};a.fancybox.close=function(){function b(){v.fadeOut("fast");j.empty().hide();e.hide();a.event.trigger("fancybox-cleanup");m.empty();c.onClosed(k,r,c);k=d=[];r=s=0;c=d={};l=!1}if(!l&&!e.is(":hidden"))if(l=!0,c&&!1===c.onCleanup(k,r,c))l=!1;else if(L(),a(C.add(y).add(z)).hide(),a(m.add(v)).unbind(),a(window).unbind("resize.fb scroll.fb"), +a(document).unbind("keydown.fb"),m.find("iframe").attr("src",K&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank"),"inside"!==c.titlePosition&&j.empty(),e.stop(),"elastic"==c.transitionOut){t=R();var h=e.position();g={top:h.top,left:h.left,width:e.width(),height:e.height()};c.opacity&&(g.opacity=1);j.empty().hide();A.prop=1;a(A).animate({prop:0},{duration:c.speedOut,easing:c.easingOut,step:Q,complete:b})}else e.fadeOut("none"==c.transitionOut?0:c.speedOut,b)};a.fancybox.resize= +function(){v.is(":visible")&&v.css("height",a(document).height());a.fancybox.center(!0)};a.fancybox.center=function(b){var a,d;if(!l&&(d=!0===b?1:0,a=O(),d||!(e.width()>a[0]||e.height()>a[1])))e.stop().animate({top:parseInt(Math.max(a[3]-20,a[3]+0.5*(a[1]-m.height()-40)-c.padding)),left:parseInt(Math.max(a[2]-20,a[2]+0.5*(a[0]-m.width()-40)-c.padding))},"number"==typeof b?b:200)};a.fancybox.init=function(){a("#fancybox-wrap").length||(a("body").append(p=a('
'),u=a('
'), +v=a('
'),e=a('
')),B=a('
').append('
').appendTo(e), +B.append(m=a('
'),C=a(''),j=a('
'),y=a(''),z=a('')),C.click(a.fancybox.close),u.click(a.fancybox.cancel),y.click(function(b){b.preventDefault();a.fancybox.prev()}),z.click(function(b){b.preventDefault();a.fancybox.next()}), +a.fn.mousewheel&&e.bind("mousewheel.fb",function(b,c){if(l)b.preventDefault();else if(0==a(b.target).get(0).clientHeight||a(b.target).get(0).scrollHeight===a(b.target).get(0).clientHeight)b.preventDefault(),a.fancybox[0').prependTo(B)))}; +a.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!1,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:0.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0, +showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};a(document).ready(function(){a.fancybox.init()})})(jQuery); + + + /* + * TipTip + * Copyright 2010 Drew Wilson + * www.drewwilson.com + * code.drewwilson.com/entry/tiptip-jquery-plugin + * + * Version 1.3 - Updated: Mar. 23, 2010 + * + * This Plug-In will create a custom tooltip to replace the default + * browser tooltip. It is extremely lightweight and very smart in + * that it detects the edges of the browser window and will make sure + * the tooltip stays within the current window size. As a result the + * tooltip will adjust itself to be displayed above, below, to the left + * or to the right depending on what is necessary to stay within the + * browser window. It is completely customizable as well via CSS. + * + * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ +(function($){$.fn.tipTip=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){}};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('
');var tiptip_content=$('
');var tiptip_arrow=$('
');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('
')))}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow")}return this.each(function(){var org_elem=$(this);if(opts.content){var org_title=opts.content}else{var org_title=org_elem.attr(opts.attribute)}if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute)}var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip()},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip()}).blur(function(){deactive_tiptip()})}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom"}else if(opts.defaultPosition=="top"){t_class="_top"}else if(opts.defaultPosition=="left"){t_class="_left"}else if(opts.defaultPosition=="right"){t_class="_right"}var right_compare=(w_compare+left)parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare)}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare)}var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top"}else{t_class=t_class+"_top"}arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset))}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom"}else{t_class=t_class+"_bottom"}arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset)}if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5}if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5}tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn)},opts.delay)}function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout)}tiptip_holder.fadeOut(opts.fadeOut)}}})}})(jQuery); + +/* TINY SORT */ +(function(e){var a=false,g=null,f=parseFloat,b=/(\d+\.?\d*)$/g;e.tinysort={id:"TinySort",version:"1.2.18",copyright:"Copyright (c) 2008-2012 Ron Valstar",uri:"http://tinysort.sjeiti.com/",licenced:{MIT:"http://www.opensource.org/licenses/mit-license.php",GPL:"http://www.gnu.org/licenses/gpl.html"},defaults:{order:"asc",attr:g,data:g,useVal:a,place:"start",returns:a,cases:a,forceStrings:a,sortFunction:g}};e.fn.extend({tinysort:function(m,h){if(m&&typeof(m)!="string"){h=m;m=g}var n=e.extend({},e.tinysort.defaults,h),s,B=this,x=e(this).length,C={},p=!(!m||m==""),q=!(n.attr===g||n.attr==""),w=n.data!==g,j=p&&m[0]==":",k=j?B.filter(m):B,r=n.sortFunction,v=n.order=="asc"?1:-1,l=[];if(!r){r=n.order=="rand"?function(){return Math.random()<0.5?1:-1}:function(F,E){var i=!n.cases?d(F.s):F.s,K=!n.cases?d(E.s):E.s;if(!n.forceStrings){var H=i.match(b),G=K.match(b);if(H&&G){var J=i.substr(0,i.length-H[0].length),I=K.substr(0,K.length-G[0].length);if(J==I){i=f(H[0]);K=f(G[0])}}}return v*(iK?1:0))}}B.each(function(G,H){var I=e(H),E=p?(j?k.filter(H):I.find(m)):I,J=w?E.data(n.data):(q?E.attr(n.attr):(n.useVal?E.val():E.text())),F=I.parent();if(!C[F]){C[F]={s:[],n:[]}}if(E.length>0){C[F].s.push({s:J,e:I,n:G})}else{C[F].n.push({e:I,n:G})}});for(s in C){C[s].s.sort(r)}for(s in C){var y=C[s],A=[],D=x,u=[0,0],z;switch(n.place){case"first":e.each(y.s,function(E,F){D=Math.min(D,F.n)});break;case"org":e.each(y.s,function(E,F){A.push(F.n)});break;case"end":D=y.n.length;break;default:D=0}for(z=0;z=D&&z
').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); + $this.removeAttr('height').removeAttr('width'); + }); + }); + }; +})( jQuery ); + + +/** + * BxSlider v4.0 - Fully loaded, responsive content slider + * http://bxslider.com + * + * Copyright 2012, Steven Wanderski - http://stevenwanderski.com - http://bxcreative.com + * Written while drinking Belgian ales and listening to jazz + * + * Released under the WTFPL license - http://sam.zoy.org/wtfpl/ + */ +(function(t){var e={},n={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,touchEnabled:!0,swipeThreshold:50,video:!1,useCSS:!0,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){}};t.fn.bxSlider=function(s){if(0!=this.length){if(this.length>1)return this.each(function(){t(this).bxSlider(s)}),this;var o={},r=this;e.el=this;var a=t(window).width(),l=t(window).height(),d=function(){o.settings=t.extend({},n,s),o.children=r.children(o.settings.slideSelector),o.children.length1||o.settings.maxSlides>1,o.minThreshold=o.settings.minSlides*o.settings.slideWidth+(o.settings.minSlides-1)*o.settings.slideMargin,o.maxThreshold=o.settings.maxSlides*o.settings.slideWidth+(o.settings.maxSlides-1)*o.settings.slideMargin,o.working=!1,o.controls={},o.interval=null,o.animProp="vertical"==o.settings.mode?"top":"left",o.usingCSS=o.settings.useCSS&&"fade"!=o.settings.mode&&function(){var t=document.createElement("div"),e=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i in e)if(void 0!==t.style[e[i]])return o.cssPrefix=e[i].replace("Perspective","").toLowerCase(),o.animProp="-"+o.cssPrefix+"-transform",!0;return!1}(),"vertical"==o.settings.mode&&(o.settings.maxSlides=o.settings.minSlides),c()},c=function(){if(r.wrap('
'),o.viewport=r.parent(),o.loader=t('
'),o.viewport.prepend(o.loader),r.css({width:"horizontal"==o.settings.mode?215*o.children.length+"%":"auto",position:"relative"}),o.usingCSS&&o.settings.easing?r.css("-"+o.cssPrefix+"-transition-timing-function",o.settings.easing):o.settings.easing||(o.settings.easing="swing"),o.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),o.children.css({"float":"horizontal"==o.settings.mode?"left":"none",listStyle:"none",position:"relative"}),o.children.width(h()),"horizontal"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginRight",o.settings.slideMargin),"vertical"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginBottom",o.settings.slideMargin),"fade"==o.settings.mode&&(o.children.css({position:"absolute",zIndex:0,display:"none"}),o.children.eq(o.settings.startSlide).css({zIndex:50,display:"block"})),o.controls.el=t('
'),o.settings.captions&&T(),o.settings.infiniteLoop&&"fade"!=o.settings.mode&&!o.settings.ticker){var e="vertical"==o.settings.mode?o.settings.minSlides:o.settings.maxSlides,i=o.children.slice(0,e).clone().addClass("bx-clone"),n=o.children.slice(-e).clone().addClass("bx-clone");r.append(i).prepend(n)}o.active.last=o.settings.startSlide==v()-1,o.settings.video&&r.fitVids(),o.settings.ticker||(o.settings.pager&&S(),o.settings.controls&&b(),o.settings.auto&&o.settings.autoControls&&w(),(o.settings.controls||o.settings.autoControls||o.settings.pager)&&o.viewport.after(o.controls.el)),r.children().imagesLoaded(function(){o.loader.remove(),f(),"vertical"==o.settings.mode&&(o.settings.adaptiveHeight=!0),o.viewport.height(g()),o.settings.onSliderLoad(o.active.index),o.initialized=!0,t(window).bind("resize",O),o.settings.auto&&o.settings.autoStart&&L(),o.settings.ticker&&D(),o.settings.pager&&y(o.settings.startSlide),o.settings.controls&&q(),o.settings.touchEnabled&&!o.settings.ticker&&H()})},g=function(){var e=0,n=t();if("vertical"==o.settings.mode||o.settings.adaptiveHeight)if(o.carousel){var s=1==o.settings.moveSlides?o.active.index:o.active.index*p();for(n=o.children.eq(s),i=1;o.settings.maxSlides-1>=i;i++)n=s+i>=o.children.length?n.add(o.children.eq(i-1)):n.add(o.children.eq(s+i))}else n=o.children.eq(o.active.index);else n=o.children;return"vertical"==o.settings.mode?(n.each(function(){e+=t(this).outerHeight()}),o.settings.slideMargin>0&&(e+=o.settings.slideMargin*(o.settings.minSlides-1))):e=Math.max.apply(Math,n.map(function(){return t(this).outerHeight(!1)}).get()),e},h=function(){var t=o.settings.slideWidth,e=o.viewport.width();return 0==o.settings.slideWidth?t=e:e>o.maxThreshold?t=(e-o.settings.slideMargin*(o.settings.maxSlides-1))/o.settings.maxSlides:o.minThreshold>e&&(t=(e-o.settings.slideMargin*(o.settings.minSlides-1))/o.settings.minSlides),t},u=function(){var t=1;if("horizontal"==o.settings.mode)if(o.viewport.width()o.maxThreshold)t=o.settings.maxSlides;else{var e=o.children.first().width();t=Math.floor(o.viewport.width()/e)}else"vertical"==o.settings.mode&&(t=o.settings.minSlides);return t},v=function(){var t=0;if(o.settings.moveSlides>0)if(o.settings.infiniteLoop)t=o.children.length/p();else for(var e=0,i=0;o.children.length>e;)++t,e=i+u(),i+=o.settings.moveSlides<=u()?o.settings.moveSlides:u();else t=Math.ceil(o.children.length/u());return t},p=function(){return o.settings.moveSlides>0&&o.settings.moveSlides<=u()?o.settings.moveSlides:u()},f=function(){if(o.active.last&&!o.settings.infiniteLoop){if("horizontal"==o.settings.mode){var t=o.children.last(),e=t.position();x(-(e.left-(o.viewport.width()-t.width())),"reset",0)}else if("vertical"==o.settings.mode){var i=o.children.length-o.settings.minSlides,e=o.children.eq(i).position();x(-e.top,"reset",0)}}else{var e=o.children.eq(o.active.index*p()).position();o.active.index==v()-1&&(o.active.last=!0),void 0!=e&&("horizontal"==o.settings.mode?x(-e.left,"reset",0):"vertical"==o.settings.mode&&x(-e.top,"reset",0))}},x=function(t,e,i,n){if(o.usingCSS){var s="vertical"==o.settings.mode?"translate3d(0, "+t+"px, 0)":"translate3d("+t+"px, 0, 0)";r.css("-"+o.cssPrefix+"-transition-duration",i/1e3+"s"),"slide"==e?(r.css(o.animProp,s),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),z()})):"reset"==e?r.css(o.animProp,s):"ticker"==e&&(r.css("-"+o.cssPrefix+"-transition-timing-function","linear"),r.css(o.animProp,s),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),x(n.resetValue,"reset",0),I()}))}else{var a={};a[o.animProp]=t,"slide"==e?r.animate(a,i,o.settings.easing,function(){z()}):"reset"==e?r.css(o.animProp,t):"ticker"==e&&r.animate(a,speed,"linear",function(){x(n.resetValue,"reset",0),I()})}},m=function(){var e="";pagerQty=v();for(var i=0;pagerQty>i;i++){var n="";o.settings.buildPager&&t.isFunction(o.settings.buildPager)?(n=o.settings.buildPager(i),o.pagerEl.addClass("bx-custom-pager")):(n=i+1,o.pagerEl.addClass("bx-default-pager")),e+='"}o.pagerEl.html(e)},S=function(){o.settings.pagerCustom?o.pagerEl=t(o.settings.pagerCustom):(o.pagerEl=t('
'),o.settings.pagerSelector?t(o.settings.pagerSelector).html(o.pagerEl):o.controls.el.addClass("bx-has-pager").append(o.pagerEl),m()),o.pagerEl.delegate("a","click",k)},b=function(){o.controls.next=t(''+o.settings.nextText+""),o.controls.prev=t(''+o.settings.prevText+""),o.controls.next.bind("click",C),o.controls.prev.bind("click",E),o.settings.nextSelector&&t(o.settings.nextSelector).append(o.controls.next),o.settings.prevSelector&&t(o.settings.prevSelector).append(o.controls.prev),o.settings.nextSelector||o.settings.prevSelector||(o.controls.directionEl=t('
'),o.controls.directionEl.append(o.controls.prev).append(o.controls.next),o.controls.el.addClass("bx-has-controls-direction").append(o.controls.directionEl))},w=function(){o.controls.start=t('"),o.controls.stop=t('"),o.controls.autoEl=t('
'),o.controls.autoEl.delegate(".bx-start","click",A),o.controls.autoEl.delegate(".bx-stop","click",P),o.settings.autoControlsCombine?o.controls.autoEl.append(o.controls.start):o.controls.autoEl.append(o.controls.start).append(o.controls.stop),o.settings.autoControlsSelector?t(o.settings.autoControlsSelector).html(o.controls.autoEl):o.controls.el.addClass("bx-has-controls-auto").append(o.controls.autoEl),M(o.settings.autoStart?"stop":"start")},T=function(){o.children.each(function(){var e=t(this).find("img:first").attr("title");void 0!=e&&t(this).append('
'+e+"
")})},C=function(t){o.settings.auto&&r.stopAuto(),r.goToNextSlide(),t.preventDefault()},E=function(t){o.settings.auto&&r.stopAuto(),r.goToPrevSlide(),t.preventDefault()},A=function(t){r.startAuto(),t.preventDefault()},P=function(t){r.stopAuto(),t.preventDefault()},k=function(e){o.settings.auto&&r.stopAuto();var i=t(e.currentTarget),n=parseInt(i.attr("data-slide-index"));n!=o.active.index&&r.goToSlide(n),e.preventDefault()},y=function(e){return"short"==o.settings.pagerType?(o.pagerEl.html(e+1+o.settings.pagerShortSeparator+o.children.length),void 0):(o.pagerEl.find("a").removeClass("active"),o.pagerEl.each(function(i,n){t(n).find("a").eq(e).addClass("active")}),void 0)},z=function(){if(o.settings.infiniteLoop){var t="";0==o.active.index?t=o.children.eq(0).position():o.active.index==v()-1&&o.carousel?t=o.children.eq((v()-1)*p()).position():o.active.index==o.children.length-1&&(t=o.children.eq(o.children.length-1).position()),"horizontal"==o.settings.mode?x(-t.left,"reset",0):"vertical"==o.settings.mode&&x(-t.top,"reset",0)}o.working=!1,o.settings.onSlideAfter(o.children.eq(o.active.index),o.oldIndex,o.active.index)},M=function(t){o.settings.autoControlsCombine?o.controls.autoEl.html(o.controls[t]):(o.controls.autoEl.find("a").removeClass("active"),o.controls.autoEl.find("a:not(.bx-"+t+")").addClass("active"))},q=function(){!o.settings.infiniteLoop&&o.settings.hideControlOnEnd&&(0==o.active.index?(o.controls.prev.addClass("disabled"),o.controls.next.removeClass("disabled")):o.active.index==v()-1?(o.controls.next.addClass("disabled"),o.controls.prev.removeClass("disabled")):(o.controls.prev.removeClass("disabled"),o.controls.next.removeClass("disabled")))},L=function(){o.settings.autoDelay>0?setTimeout(r.startAuto,o.settings.autoDelay):r.startAuto(),o.settings.autoHover&&r.hover(function(){o.interval&&(r.stopAuto(!0),o.autoPaused=!0)},function(){o.autoPaused&&(r.startAuto(!0),o.autoPaused=null)})},D=function(){var e=0;if("next"==o.settings.autoDirection)r.append(o.children.clone().addClass("bx-clone"));else{r.prepend(o.children.clone().addClass("bx-clone"));var i=o.children.first().position();e="horizontal"==o.settings.mode?-i.left:-i.top}x(e,"reset",0),o.settings.pager=!1,o.settings.controls=!1,o.settings.autoControls=!1,o.settings.tickerHover&&!o.usingCSS&&o.viewport.hover(function(){r.stop()},function(){var e=0;o.children.each(function(){e+="horizontal"==o.settings.mode?t(this).outerWidth(!0):t(this).outerHeight(!0)});var i=o.settings.speed/e,n="horizontal"==o.settings.mode?"left":"top",s=i*(e-Math.abs(parseInt(r.css(n))));I(s)}),I()},I=function(t){speed=t?t:o.settings.speed;var e={left:0,top:0},i={left:0,top:0};"next"==o.settings.autoDirection?e=r.find(".bx-clone").first().position():i=o.children.first().position();var n="horizontal"==o.settings.mode?-e.left:-e.top,s="horizontal"==o.settings.mode?-i.left:-i.top,a={resetValue:s};x(n,"ticker",speed,a)},H=function(){o.touch={start:{x:0,y:0},end:{x:0,y:0}},o.viewport.bind("touchstart",W)},W=function(t){if(o.working)t.preventDefault();else{o.touch.originalPos=r.position();var e=t.originalEvent;o.touch.start.x=e.changedTouches[0].pageX,o.touch.start.y=e.changedTouches[0].pageY,o.viewport.bind("touchmove",N),o.viewport.bind("touchend",B)}},N=function(t){if(t.preventDefault(),"fade"!=o.settings.mode){var e=t.originalEvent,i=0;if("horizontal"==o.settings.mode){var n=e.changedTouches[0].pageX-o.touch.start.x;i=o.touch.originalPos.left+n}else{var n=e.changedTouches[0].pageY-o.touch.start.y;i=o.touch.originalPos.top+n}x(i,"reset",0)}},B=function(t){o.viewport.unbind("touchmove",N);var e=t.originalEvent,i=0;if(o.touch.end.x=e.changedTouches[0].pageX,o.touch.end.y=e.changedTouches[0].pageY,"fade"==o.settings.mode){var n=Math.abs(o.touch.start.x-o.touch.end.x);n>=o.settings.swipeThreshold&&(o.touch.start.x>o.touch.end.x?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto())}else{var n=0;"horizontal"==o.settings.mode?(n=o.touch.end.x-o.touch.start.x,i=o.touch.originalPos.left):(n=o.touch.end.y-o.touch.start.y,i=o.touch.originalPos.top),!o.settings.infiniteLoop&&(0==o.active.index&&n>0||o.active.last&&0>n)?x(i,"reset",200):Math.abs(n)>=o.settings.swipeThreshold?(0>n?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto()):x(i,"reset",200)}o.viewport.unbind("touchend",B)},O=function(){var e=t(window).width(),i=t(window).height();(a!=e||l!=i)&&(a=e,l=i,o.children.add(r.find(".bx-clone")).width(h()),o.viewport.css("height",g()),o.active.last&&(o.active.index=v()-1),o.active.index>=v()&&(o.active.last=!0),o.settings.pager&&!o.settings.pagerCustom&&(m(),y(o.active.index)),o.settings.ticker||f())};return r.goToSlide=function(e,i){if(!o.working&&o.active.index!=e)if(o.working=!0,o.oldIndex=o.active.index,o.active.index=0>e?v()-1:e>=v()?0:e,o.settings.onSlideBefore(o.children.eq(o.active.index),o.oldIndex,o.active.index),"next"==i?o.settings.onSlideNext(o.children.eq(o.active.index),o.oldIndex,o.active.index):"prev"==i&&o.settings.onSlidePrev(o.children.eq(o.active.index),o.oldIndex,o.active.index),o.active.last=o.active.index>=v()-1,o.settings.pager&&y(o.active.index),o.settings.controls&&q(),"fade"==o.settings.mode)o.settings.adaptiveHeight&&o.viewport.height()!=g()&&o.viewport.animate({height:g()},o.settings.adaptiveHeightSpeed),o.children.filter(":visible").fadeOut(o.settings.speed).css({zIndex:0}),o.children.eq(o.active.index).css("zIndex",51).fadeIn(o.settings.speed,function(){t(this).css("zIndex",50),z()});else{o.settings.adaptiveHeight&&o.viewport.height()!=g()&&o.viewport.animate({height:g()},o.settings.adaptiveHeightSpeed);var n=0,s={left:0,top:0};if(!o.settings.infiniteLoop&&o.carousel&&o.active.last)if("horizontal"==o.settings.mode){var a=o.children.eq(o.children.length-1);s=a.position(),n=o.viewport.width()-a.width()}else{var l=o.children.length-o.settings.minSlides;s=o.children.eq(l).position()}else if(o.carousel&&o.active.last&&"prev"==i){var d=1==o.settings.moveSlides?o.settings.maxSlides-p():(v()-1)*p()-(o.children.length-o.settings.maxSlides),a=r.children(".bx-clone").eq(d);s=a.position()}else if("next"==i&&0==o.active.index)s=r.find(".bx-clone").eq(o.settings.maxSlides).position(),o.active.last=!1;else if(e>=0){var c=e*p();s=o.children.eq(c).position()}var h="horizontal"==o.settings.mode?-(s.left-n):-s.top;x(h,"slide",o.settings.speed)}},r.goToNextSlide=function(){if(o.settings.infiniteLoop||!o.active.last){var t=o.active.index+1;r.goToSlide(t,"next")}},r.goToPrevSlide=function(){if(o.settings.infiniteLoop||0!=o.active.index){var t=o.active.index-1;r.goToSlide(t,"prev")}},r.startAuto=function(t){o.interval||(o.interval=setInterval(function(){"next"==o.settings.autoDirection?r.goToNextSlide():r.goToPrevSlide()},o.settings.pause),o.settings.autoControls&&1!=t&&M("stop"))},r.stopAuto=function(t){o.interval&&(clearInterval(o.interval),o.interval=null,o.settings.autoControls&&1!=t&&M("start"))},r.getCurrentSlide=function(){return o.active.index},r.getSlideCount=function(){return o.children.length},r.destroySlider=function(){o.initialized&&(o.initialized=!1,t(".bx-clone",this).remove(),o.children.removeAttr("style"),this.removeAttr("style").unwrap().unwrap(),o.controls.el&&o.controls.el.remove(),o.controls.next&&o.controls.next.remove(),o.controls.prev&&o.controls.prev.remove(),o.pagerEl&&o.pagerEl.remove(),t(".bx-caption",this).remove(),o.controls.autoEl&&o.controls.autoEl.remove(),clearInterval(o.interval),t(window).unbind("resize",O))},r.reloadSlider=function(t){void 0!=t&&(s=t),r.destroySlider(),d()},d(),this}}})(jQuery),function(t,e){var i="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";t.fn.imagesLoaded=function(n){function s(){var e=t(g),i=t(h);a&&(h.length?a.reject(d,e,i):a.resolve(d)),t.isFunction(n)&&n.call(r,d,e,i)}function o(e,n){e.src===i||-1!==t.inArray(e,c)||(c.push(e),n?h.push(e):g.push(e),t.data(e,"imagesLoaded",{isBroken:n,src:e.src}),l&&a.notifyWith(t(e),[n,d,t(g),t(h)]),d.length===c.length&&(setTimeout(s),d.unbind(".imagesLoaded")))}var r=this,a=t.isFunction(t.Deferred)?t.Deferred():0,l=t.isFunction(a.notify),d=r.find("img").add(r.filter("img")),c=[],g=[],h=[];return t.isPlainObject(n)&&t.each(n,function(t,e){"callback"===t?n=e:a&&a[t](e)}),d.length?d.bind("load.imagesLoaded error.imagesLoaded",function(t){o(t.target,"error"===t.type)}).each(function(n,s){var r=s.src,a=t.data(s,"imagesLoaded");a&&a.src===r?o(s,a.isBroken):s.complete&&s.naturalWidth!==e?o(s,0===s.naturalWidth||0===s.naturalHeight):(s.readyState||s.complete)&&(s.src=i,s.src=r)}):s(),a?a.promise(r):r}}(jQuery); + + +/* + Prettify JS +*/ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}particle,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}"; +c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| +"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2pre",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment(); +for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d0;var i=!(t[0]instanceof Array);if(r){for(var s=0;s0)n+=o;n+=c(e[s],s)}if(t.length>0)n+=u}for(var a=0;a0)n+=o;var h=r&&i?e[l]:l;n+=c(t[a][h],l)}if(a-1||t.charAt(0)==" "||t.charAt(t.length-1)==" ";return r?'"'+t+'"':t}function h(e,t){for(var n=0;n-1)return true;return false}var r="";var i=[];var s=false;var o=",";var u="\r\n";a();if(typeof t==="string")t=JSON.parse(t);if(t instanceof Array){if(!t.length||t[0]instanceof Array)return l(null,t);else if(typeof t[0]==="object")return l(f(t[0]),t)}else if(typeof t==="object"){if(typeof t.data==="string")t.data=JSON.parse(t.data);if(t.data instanceof Array){if(!t.fields)t.fields=t.data[0]instanceof Array?t.fields:f(t.data[0]);if(!(t.data[0]instanceof Array)&&typeof t.data[0]!=="object")t.data=[t.data]}return l(t.fields||[],t.data||[])}throw"exception: Unable to serialize unrecognized input"}function f(n){function r(e){var t=E(e);t.chunkSize=parseInt(t.chunkSize);this._handle=new p(t);this._handle.streamer=this;this._config=t}this._handle=null;this._paused=false;this._finished=false;this._input=null;this._baseIndex=0;this._partialLine="";this._rowCount=0;this._start=0;this._nextChunk=null;r.call(this,n);this.parseChunk=function(n){var r=this._partialLine+n;this._partialLine="";var i=this._handle.parse(r,this._baseIndex,!this._finished);if(this._handle.paused())return;var s=i.meta.cursor;if(!this._finished){this._partialLine=r.substring(s-this._baseIndex);this._baseIndex=s}if(i&&i.data)this._rowCount+=i.data.length;var o=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(t){e.postMessage({results:i,workerId:Papa.WORKER_ID,finished:o})}else if(x(this._config.chunk)){this._config.chunk(i,this._handle);if(this._paused)return;i=undefined}if(o&&x(this._config.complete)&&(!i||!i.meta.aborted))this._config.complete(i);if(!o&&(!i||!i.meta.paused))this._nextChunk();return i};this._sendError=function(n){if(x(this._config.error))this._config.error(n);else if(t&&this._config.error){e.postMessage({workerId:Papa.WORKER_ID,error:n,finished:false})}}}function l(e){function r(e){var t=e.getResponseHeader("Content-Range");return parseInt(t.substr(t.lastIndexOf("/")+1))}e=e||{};if(!e.chunkSize)e.chunkSize=Papa.RemoteChunkSize;f.call(this,e);var n;if(t){this._nextChunk=function(){this._readChunk();this._chunkLoaded()}}else{this._nextChunk=function(){this._readChunk()}}this.stream=function(e){this._input=e;this._nextChunk()};this._readChunk=function(){if(this._finished){this._chunkLoaded();return}n=new XMLHttpRequest;if(!t){n.onload=S(this._chunkLoaded,this);n.onerror=S(this._chunkError,this)}n.open("GET",this._input,!t);if(this._config.step||this._config.chunk){var e=this._start+this._config.chunkSize-1;n.setRequestHeader("Range","bytes="+this._start+"-"+e);n.setRequestHeader("If-None-Match","webkit-no-cache")}try{n.send()}catch(r){this._chunkError(r.message)}if(t&&n.status==0)this._chunkError();else this._start+=this._config.chunkSize};this._chunkLoaded=function(){if(n.readyState!=4)return;if(n.status<200||n.status>=400){this._chunkError();return}this._finished=!this._config.step&&!this._config.chunk||this._start>r(n);this.parseChunk(n.responseText)};this._chunkError=function(e){var t=n.statusText||e;this._sendError(t)}}function c(e){e=e||{};if(!e.chunkSize)e.chunkSize=Papa.LocalChunkSize;f.call(this,e);var t,n;var r=typeof FileReader!=="undefined";this.stream=function(e){this._input=e;n=e.slice||e.webkitSlice||e.mozSlice;if(r){t=new FileReader;t.onload=S(this._chunkLoaded,this);t.onerror=S(this._chunkError,this)}else t=new FileReaderSync;this._nextChunk()};this._nextChunk=function(){if(!this._finished&&(!this._config.preview||this._rowCount=this._input.size;this.parseChunk(e.target.result)};this._chunkError=function(){this._sendError(t.error)}}function h(e){e=e||{};f.call(this,e);var t;var n;this.stream=function(e){t=e;n=e;return this._nextChunk()};this._nextChunk=function(){if(this._finished)return;var e=this._config.chunkSize;var t=e?n.substr(0,e):n;n=e?n.substr(e):"";this._finished=!n;return this.parseChunk(t)}}function p(e){function c(){if(f&&u){b("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+Papa.DefaultDelimiter+"'");u=false}if(e.skipEmptyLines){for(var t=0;t=a.length){if(!n["__parsed_extra"])n["__parsed_extra"]=[];n["__parsed_extra"].push(f.data[t][r])}else n[a[r]]=f.data[t][r]}}if(e.header){f.data[t]=n;if(r>a.length)b("FieldMismatch","TooManyFields","Too many fields: expected "+a.length+" fields but parsed "+r,t);else if(r1){a+=Math.abs(h-s);s=h}}f/=l.data.length;if((typeof i==="undefined"||a1.99){i=a;r=u}}e.delimiter=r;return{successful:!!r,bestDelimiter:r}}function g(e){e=e.substr(0,1024*1024);var t=e.split("\r");if(t.length==1)return"\n";var n=0;for(var r=0;r=t.length/2?"\r\n":"\r"}function y(e){var n=t.test(e);return n?parseFloat(e):e}function b(e,t,n,r){f.errors.push({type:e,code:t,message:n,row:r})}var t=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i;var n=this;var r=0;var i;var s;var o=false;var u;var a=[];var f={data:[],errors:[],meta:{}};if(x(e.step)){var l=e.step;e.step=function(t){f=t;if(h())c();else{c();if(f.data.length==0)return;r+=t.data.length;if(e.preview&&r>e.preview)s.abort();else l(f,n)}}}this.parse=function(t,n,r){if(!e.newline)e.newline=g(t);u=false;if(!e.delimiter){var a=m(t);if(a.successful)e.delimiter=a.bestDelimiter;else{u=true;e.delimiter=Papa.DefaultDelimiter}f.meta.delimiter=e.delimiter}var l=E(e);if(e.preview&&e.header)l.preview++;i=t;s=new d(l);f=s.parse(i,n,r);c();return o?{meta:{paused:true}}:f||{meta:{paused:false}}};this.paused=function(){return o};this.pause=function(){o=true;s.abort();i=i.substr(s.getCharIndex())};this.resume=function(){o=false;n.streamer.parseChunk(i)};this.abort=function(){s.abort();if(x(e.complete))e.complete(f);i=""}}function d(e){e=e||{};var t=e.delimiter;var n=e.newline;var r=e.comments;var i=e.step;var s=e.preview;var o=e.fastMode;if(typeof t!=="string"||t.length!=1||Papa.BAD_DELIMITERS.indexOf(t)>-1)t=",";if(r===t)throw"Comment character same as delimiter";else if(r===true)r="#";else if(typeof r!=="string"||Papa.BAD_DELIMITERS.indexOf(r)>-1)r=false;if(n!="\n"&&n!="\r"&&n!="\r\n")n="\n";var u=0;var a=false;this.parse=function(e,f,l){function C(e){m.push(e);b=u}function k(t){if(l)return A();if(!t)t=e.substr(u);y.push(t);u=c;C(y);if(v)O();return A()}function L(t){u=t;C(y);y=[];x=e.indexOf(n,u)}function A(e){return{data:m,errors:g,meta:{delimiter:t,linebreak:n,aborted:a,truncated:!!e,cursor:b+(f||0)}}}function O(){i(A());m=[],g=[]}if(typeof e!=="string")throw"Input must be a string";var c=e.length,h=t.length,p=n.length,d=r.length;var v=typeof i==="function";u=0;var m=[],g=[],y=[],b=0;if(!e)return A();if(o||o!==false&&e.indexOf('"')===-1){var w=e.split(n);for(var E=0;E=s){m=m.slice(0,s);return A(true)}}return A()}var S=e.indexOf(t,u);var x=e.indexOf(n,u);for(;;){if(e[u]=='"'){var T=u;u++;for(;;){var T=e.indexOf('"',T+1);if(T===-1){if(!l){g.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:m.length,index:u})}return k()}if(T===c-1){var N=e.substring(u,T).replace(/""/g,'"');return k(N)}if(e[T+1]=='"'){T++;continue}if(e[T+1]==t){y.push(e.substring(u,T).replace(/""/g,'"'));u=T+1+h;S=e.indexOf(t,u);x=e.indexOf(n,u);break}if(e.substr(T+1,p)===n){y.push(e.substring(u,T).replace(/""/g,'"'));L(T+1+p);S=e.indexOf(t,u);if(v){O();if(a)return A()}if(s&&m.length>=s)return A(true);break}}continue}if(r&&y.length===0&&e.substr(u,d)===r){if(x==-1)return A();u=x+p;x=e.indexOf(n,u);S=e.indexOf(t,u);continue}if(S!==-1&&(S=s)return A(true);continue}break}return k()};this.abort=function(){a=true};this.getCharIndex=function(){return u}}function v(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}function m(){if(!Papa.WORKERS_SUPPORTED)return false;if(!n&&Papa.SCRIPT_PATH===null)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. "+"You need to set Papa.SCRIPT_PATH manually.");var t=new e.Worker(Papa.SCRIPT_PATH||r);t.onmessage=g;t.id=s++;i[t.id]=t;return t}function g(e){var t=e.data;var n=i[t.workerId];var r=false;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var s=function(){r=true;y(t.workerId,{data:[],errors:[],meta:{aborted:true}})};var o={abort:s,pause:b,resume:b};if(x(n.userStep)){for(var u=0;u diff --git a/osrframework/templates/_footer.html b/osrframework/templates/_footer.html new file mode 100644 index 0000000..67cf0a6 --- /dev/null +++ b/osrframework/templates/_footer.html @@ -0,0 +1,15 @@ + +
+ +
+ OSRFramework Server | + This program is licensed as GNU AGPLv3+ +
+ +
+ Copyright (C) i3visio, 2017: + · + Issues and bugs +
+
+
diff --git a/osrframework/templates/_keshif-headers.html b/osrframework/templates/_keshif-headers.html new file mode 100644 index 0000000..82d9b9b --- /dev/null +++ b/osrframework/templates/_keshif-headers.html @@ -0,0 +1,404 @@ + + + + + + + + + + + + + + + + + diff --git a/osrframework/templates/_menu-launcher.html b/osrframework/templates/_menu-launcher.html new file mode 100644 index 0000000..e37b760 --- /dev/null +++ b/osrframework/templates/_menu-launcher.html @@ -0,0 +1,4 @@ + diff --git a/osrframework/templates/_menu-research.html b/osrframework/templates/_menu-research.html new file mode 100644 index 0000000..9088f36 --- /dev/null +++ b/osrframework/templates/_menu-research.html @@ -0,0 +1,8 @@ + diff --git a/osrframework/templates/_menu-top.html b/osrframework/templates/_menu-top.html new file mode 100644 index 0000000..8675fd2 --- /dev/null +++ b/osrframework/templates/_menu-top.html @@ -0,0 +1,21 @@ + diff --git a/osrframework/templates/_options-export.html b/osrframework/templates/_options-export.html new file mode 100644 index 0000000..1be9a54 --- /dev/null +++ b/osrframework/templates/_options-export.html @@ -0,0 +1,11 @@ +
+ Export options +

These parameters are optional. If none is selected, the default options will be chosen.

+ +
+
+
+
+
+
+
diff --git a/osrframework/templates/_options-other.html b/osrframework/templates/_options-other.html new file mode 100644 index 0000000..3f6ff24 --- /dev/null +++ b/osrframework/templates/_options-other.html @@ -0,0 +1,7 @@ +
+ Other options +

These parameters are optional. If none is selected, the default options will be chosen.

+ +
+
+
diff --git a/osrframework/templates/_options-platforms.html b/osrframework/templates/_options-platforms.html new file mode 100644 index 0000000..62a3061 --- /dev/null +++ b/osrframework/templates/_options-platforms.html @@ -0,0 +1,10 @@ +
+ Platforms + +
+ +
diff --git a/osrframework/templates/_research-terminal.html b/osrframework/templates/_research-terminal.html new file mode 100644 index 0000000..06d897d --- /dev/null +++ b/osrframework/templates/_research-terminal.html @@ -0,0 +1,16 @@ + +{% if text_results is defined %} +
+ +
The command launched is: {{ command }}
+
+ + Results collected +
{{ text_results }}
+
+
+{% endif %} diff --git a/osrframework/templates/_shared-headers.html b/osrframework/templates/_shared-headers.html new file mode 100644 index 0000000..dc8a1ee --- /dev/null +++ b/osrframework/templates/_shared-headers.html @@ -0,0 +1,20 @@ + + + +Explorify - A GUI for i3visio's OSRFramework + + + + + + + + + + + + + + + + diff --git a/osrframework/templates/error.html b/osrframework/templates/error.html new file mode 100644 index 0000000..4439a2c --- /dev/null +++ b/osrframework/templates/error.html @@ -0,0 +1,40 @@ + + +{% include '_banner.html' %} + + + + + {% include '_shared-headers.html' %} + + + + + + {% include '_menu-top.html' %} + +
+ +
+ +
+
+ +
+
+ +
+
HTTP Status Code: {{ errorCode }}
+

{{ errorDescription }}

+

Please, check the parameters provided.

+

If the error persists, post an issue on the Github's repository to keep track of it.

+
+
+
+ + {% include '_footer.html' %} + + + diff --git a/osrframework/templates/explore.html b/osrframework/templates/explore.html new file mode 100644 index 0000000..77a522a --- /dev/null +++ b/osrframework/templates/explore.html @@ -0,0 +1,79 @@ + + +{% include '_banner.html' %} + + + + + {% include '_keshif-headers.html' %} + {% include '_shared-headers.html' %} + + + + + + {% include '_menu-top.html' %} + +
+ + +
+

Explore the data

+ +
+ In the following tabs you can choose different ways of exploring the data collected. But first, you will have to load it from your hard drive. +
+ +
+ {% if alert is defined %} +
+ +
+ {{ alert['message'] }} +
+
+ {% endif %} + +
+ + +
+ + + +
+
+
+ + {% if csvData is defined %} +
+ {% else %} + +
No data has been loaded yet.
+ {% endif %} +
+
+
+
+
{% if csvData is defined %}{{ csvData }}{% else %}No data found.{% endif %}
+
+ +
+
+ + {% include '_footer.html' %} + + + diff --git a/osrframework/templates/home.html b/osrframework/templates/home.html new file mode 100644 index 0000000..832b529 --- /dev/null +++ b/osrframework/templates/home.html @@ -0,0 +1,51 @@ + + +{% include '_banner.html' %} + + + + + {% include '_shared-headers.html' %} + + + + + + {% include '_menu-top.html' %} + +
+ +
+
+

Hi! This is... Explorify!

+ + +

Explorify wouldn't be what it is without OSRFramework. As a GNU AGPLv3+ set of libraries, it has been by us (we use the shared name of i3visio) to perform Open Source Intelligence tasks that we (like maybe you) face everyday. They include references to a bunch of different applications related to username checking, DNS lookups, information leaks research, deep web search, regular expressions extraction and many others.

+

In OSRFramework you can use usufy.py to look for the existence of a given alias in different platforms, domainfy.py to check whether certain domains are registered or mailfy.py to check the existence of an email address. We know that privacy matters and you don't have to trust us: you can always check what the application does in the Github repo because it is free software. Help is always welcome there but, in any case, you can always invite us for a beer !

+ +
+ Start researching now! +
+ +
OSRFramework status
+ + +
+ {{ notice['message'] }} +
+ +
+
+
+ +
+
+
+
+ + {% include '_footer.html' %} + + + diff --git a/osrframework/templates/research-domainfy.html b/osrframework/templates/research-domainfy.html new file mode 100644 index 0000000..b76f87d --- /dev/null +++ b/osrframework/templates/research-domainfy.html @@ -0,0 +1,78 @@ + + +{% include '_banner.html' %} + + + + + {% include '_shared-headers.html' %} + + + + + + {% include '_menu-top.html' %} + +
+ +
+ +
+ {% include '_menu-research.html' %} +
+ +
+
Domainfy: Looking for domains
+

In the case of having an alias or a trademark and wanting to know if there exist any active registered domains, you can use domainfy.py to automatically grab that information.

+ + {% include '_menu-launcher.html' %} + +
+
+
+ Manual configuration + + + + + + +
+
+
+ +
+
+
+ Selecting targets + + + + + +
+
+ Other options +
+ {% include '_options-platforms.html' %} +
+
+ {% include '_options-export.html' %} + {% include '_options-other.html' %} +
+
+
+
+
+ + {% include '_research-terminal.html' %} + +
+
+ + {% include '_footer.html' %} + + + diff --git a/osrframework/templates/research-mailfy.html b/osrframework/templates/research-mailfy.html new file mode 100644 index 0000000..35c42bc --- /dev/null +++ b/osrframework/templates/research-mailfy.html @@ -0,0 +1,78 @@ + + +{% include '_banner.html' %} + + + + + {% include '_shared-headers.html' %} + + + + + + {% include '_menu-top.html' %} + +
+ +
+ +
+ {% include '_menu-research.html' %} +
+ +
+
Mailfy: Looking for email addresses
+

Some email providers still mantain the (bad) custom of letting users verify if an email address exist. Using mailfy.py you can check if they exist.

+ + {% include '_menu-launcher.html' %} + +
+
+
+ Manual configuration + + + + + + +
+
+
+ +
+
+
+ Selecting targets + + + + + +
+
+ Other options +
+ {% include '_options-platforms.html' %} +
+
+ {% include '_options-export.html' %} + {% include '_options-other.html' %} +
+
+
+
+
+ + {% include '_research-terminal.html' %} + +
+
+ + {% include '_footer.html' %} + + + diff --git a/osrframework/templates/research-phonefy.html b/osrframework/templates/research-phonefy.html new file mode 100644 index 0000000..ad0e05a --- /dev/null +++ b/osrframework/templates/research-phonefy.html @@ -0,0 +1,77 @@ + + +{% include '_banner.html' %} + + + + + {% include '_shared-headers.html' %} + + + + + + {% include '_menu-top.html' %} + +
+ +
+ +
+ {% include '_menu-research.html' %} +
+ +
+
Phonefy: Looking for phone numbers in spam lists
+

In the case of researching about a phone number, you may want to check if it has been linked to any known practice. You can check about it using phonefy.py.

+ + {% include '_menu-launcher.html' %} + +
+
+
+ Manual configuration + + + + + + +
+
+
+ +
+
+
+ Selecting targets + + + + + +
+
+ Other options +
+ {% include '_options-platforms.html' %} +
+
+ {% include '_options-export.html' %} + {% include '_options-other.html' %} +
+
+
+
+ + {% include '_research-terminal.html' %} + +
+
+ + {% include '_footer.html' %} + + + diff --git a/osrframework/templates/research-searchfy.html b/osrframework/templates/research-searchfy.html new file mode 100644 index 0000000..e1243d0 --- /dev/null +++ b/osrframework/templates/research-searchfy.html @@ -0,0 +1,78 @@ + + +{% include '_banner.html' %} + + + + + {% include '_shared-headers.html' %} + + + + + + {% include '_menu-top.html' %} + +
+ +
+ +
+ {% include '_menu-research.html' %} +
+ +
+
Searchfy: Looking for text
+

If you don't have an alias, you may want to search for them in several networks. In this case, searchfy.py is a tool that will help you to identify potentially interesting profiles.

+ + {% include '_menu-launcher.html' %} + +
+
+
+ Manual configuration + + + + + + +
+
+
+ +
+
+
+ Selecting targets + + + + + +
+
+ Other options +
+ {% include '_options-platforms.html' %} +
+
+ {% include '_options-export.html' %} + {% include '_options-other.html' %} +
+
+
+
+
+ + {% include '_research-terminal.html' %} + +
+
+ + {% include '_footer.html' %} + + + diff --git a/osrframework/templates/research-usufy.html b/osrframework/templates/research-usufy.html new file mode 100644 index 0000000..d4c3227 --- /dev/null +++ b/osrframework/templates/research-usufy.html @@ -0,0 +1,84 @@ + + +{% include '_banner.html' %} + + + + + {% include '_shared-headers.html' %} + + + + + + {% include '_menu-top.html' %} + +
+ +
+ +
+ {% include '_menu-research.html' %} +
+ +
+
Usufy: Looking for usernames
+

Users tend to get registered in several platform using the same alias. If you come across one of them and you want to check if it exists in several platforms you can use usufy.py.

+ + {% include '_menu-launcher.html' %} + +

+
+
+ Manual configuration + + + + + + +
+
+
+ +
+
+
+ Selecting targets + + + + + +
+
+ Other options +
+ {% include '_options-platforms.html' %} +
+
+ {% include '_options-export.html' %} + {% include '_options-other.html' %} +
+
+
+
+
+ + {% include '_research-terminal.html' %} + +
+
+ + {% include '_footer.html' %} + + + diff --git a/osrframework/templates/research.html b/osrframework/templates/research.html new file mode 100644 index 0000000..c8e2fb2 --- /dev/null +++ b/osrframework/templates/research.html @@ -0,0 +1,43 @@ + + +{% include '_banner.html' %} + + + + + {% include '_shared-headers.html' %} + + + + + + {% include '_menu-top.html' %} + +
+ +
+ +
+ {% include '_menu-research.html' %} +
+ +
+

In this section you will be able to launch the different tools in the framework. Choose the one you need depending on the type of information you already have:

+
    +
  • If you want to check if an alias is registered in several platforms, you can use usufy.py.
  • +
  • When you need to find if there exist some domains registered using a given alias, you can use domainfy.py.
  • +
  • If you want to check if an email address exists, you can use mailfy.py.
  • +
  • If you are investigating a mobile phone that may be linked to spam, opt for phonefy.py.
  • +
  • If you want to find users searching by any text in several platforms, you might like searchfy.py.
  • +
+

Remember that you can always use the command line applications to automate certain tasks as well as osrfconsole.py as an alternative UI.

+
+
+
+ + {% include '_footer.html' %} + + + diff --git a/osrframework/thirdparties/__init__.py b/osrframework/thirdparties/__init__.py new file mode 100644 index 0000000..ed043d7 --- /dev/null +++ b/osrframework/thirdparties/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This file is part of OSRFramework. +# +# OSRFramework is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import osrframework.utils.logger +# Calling the logger when being imported +osrframework.utils.logger.setupLogger(loggerName="osrframework.thirdparties") diff --git a/osrframework/thirdparties/blockchain_info/__init__.py b/osrframework/thirdparties/blockchain_info/__init__.py new file mode 100644 index 0000000..19dfdfe --- /dev/null +++ b/osrframework/thirdparties/blockchain_info/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This file is part of OSRFramework. +# +# OSRFramework is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import osrframework.utils.logger +# Calling the logger when being imported +osrframework.utils.logger.setupLogger(loggerName="osrframework.thirdparties.blockchain_info") diff --git a/osrframework/thirdparties/blockchain_info/getBitcoinAddressDetails.py b/osrframework/thirdparties/blockchain_info/getBitcoinAddressDetails.py new file mode 100644 index 0000000..d0dff8b --- /dev/null +++ b/osrframework/thirdparties/blockchain_info/getBitcoinAddressDetails.py @@ -0,0 +1,69 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import sys +import urllib2 + +def getBitcoinAddressDetails(address=None): + ''' + Method that checks the presence of a Bitcoin Address in blockchain.info: +{ + "total_sent": 41301084, + "total_received": 52195147, + "final_balance": 10894063, + "address": "1APKyS2TEdFMjXjJfMCgavFtoWuv2QNXTw", + "hash160": "66f21efc754af07e87913db46bf24df2eb0d5075", +... +} + + :param address: Bitcoin address to verify. + + :return: Python structure for the json received. If nothing was found, it will return an empty dictionary. + ''' + try: + apiURL = "https://blockchain.info/rawaddr/" + str(address) + + # Accessing the HIBP API + data = urllib2.urlopen(apiURL).read() + + # Reading the text data onto python structures + jsonData = json.loads(data) + return jsonData + except: + # No information was found, then we return a null entity + return {} + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='A library that wraps the search about a Bitcoin address in blockchain.info.', prog='getBitcoinAddressDetails.py', epilog="", add_help=False) + # Adding the main options + # Defining the mutually exclusive group for the main options + parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to blockchain.info.', required=True) + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') + + args = parser.parse_args() + + print json.dumps(getBitcoinAddressDetails(address=args.query), indent=2) + + diff --git a/osrframework/thirdparties/checkIfEmailWasHacked.py b/osrframework/thirdparties/checkIfEmailWasHacked.py new file mode 100644 index 0000000..37c6394 --- /dev/null +++ b/osrframework/thirdparties/checkIfEmailWasHacked.py @@ -0,0 +1,43 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json + +import osrframework.thirdparties.haveibeenpwned_com.checkIfEmailWasHacked as HIBP + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='A library that wraps an account search onto haveibeenpwned.com.', prog='checkIfEmailWasHacked.py', epilog="", add_help=False) + # Adding the main options + # Defining the mutually exclusive group for the main options + parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to haveibeenpwned.com.', required=True) + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') + + args = parser.parse_args() + + print json.dumps(HIBP.checkIfEmailWasHacked(email=args.query), indent=2) + + + diff --git a/osrframework/thirdparties/checkIfHashIsCracked.py b/osrframework/thirdparties/checkIfHashIsCracked.py new file mode 100644 index 0000000..df8567e --- /dev/null +++ b/osrframework/thirdparties/checkIfHashIsCracked.py @@ -0,0 +1,42 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse + +import osrframework.thirdparties.md5crack_com.checkIfHashIsCracked as md5crack_com + +if __name__ == "__main__": + 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) + # Adding the main options + # Defining the mutually exclusive group for the main options + parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to md5crack.com.', required=True) + parser.add_argument('-a', '--api_key', action='store', help='API key in md5crack.com to be used.', required=False, default=None) + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') + + args = parser.parse_args() + + print json.dumps(md5crack_com.checkIfHashIsCracked(hash=args.query, api_key=args.api_key), indent=2) + + diff --git a/osrframework/thirdparties/checkInSkype.py b/osrframework/thirdparties/checkInSkype.py new file mode 100644 index 0000000..eec7f6f --- /dev/null +++ b/osrframework/thirdparties/checkInSkype.py @@ -0,0 +1,58 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json + +import osrframework.thirdparties.skype.checkInSkype as skype + +def checkInSkype(args): + ''' + ''' + if args.query != None: + return skype.checkInSkype(args.query) + elif args.file != None: + results = [] + with open(args.file, "r") as iF: + queries = iF.read().splitlines() + + for q in queries: + print "Performing query:\t"+q + results += skype.checkInSkype(args.query) + return results + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='A library that wraps a search onto Skype4Py.', prog='checkInSkype.py', epilog="NOTE: you must be logged in into Skype to use this program.", add_help=False) + + # Adding the main options + # Defining the mutually exclusive group for the main options + general = parser.add_mutually_exclusive_group(required=True) + general.add_argument('-q', '--query', metavar='', action='store', help='query to be launched.') + general.add_argument('-f', '--file', metavar='', action='store', help='path to the search file.') + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') + + args = parser.parse_args() + + print json.dumps(checkInSkype(args), indent = 2) diff --git a/osrframework/thirdparties/checkIpDetails.py b/osrframework/thirdparties/checkIpDetails.py new file mode 100644 index 0000000..8fc98df --- /dev/null +++ b/osrframework/thirdparties/checkIpDetails.py @@ -0,0 +1,43 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json + +import osrframework.thirdparties.ip_api_com.checkIpDetails as ip_api_com + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='A library that wraps a search onto ip-api.com.', prog='checkIpDetails.py', epilog="", add_help=False) + # Adding the main options + # Defining the mutually exclusive group for the main options + general = parser.add_mutually_exclusive_group(required=True) + general.add_argument('-q', '--query', metavar='', action='store', help='query to be resolved by ip-api.com.') + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.2.0', help='shows the version of the program and exists.') + + args = parser.parse_args() + + print json.dumps(ip_api_com.checkIpDetails(query=args.query), indent=2) + + diff --git a/osrframework/thirdparties/checkIpFromAlias.py b/osrframework/thirdparties/checkIpFromAlias.py new file mode 100644 index 0000000..ec35dcb --- /dev/null +++ b/osrframework/thirdparties/checkIpFromAlias.py @@ -0,0 +1,40 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json + +import osrframework.thirdparties.resolvethem_com.processing as resolvethem_com + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='A library that wraps a search onto resolvethem.com.', prog='checkIPFromAlias.py', epilog="", add_help=False) + # Adding the main options + # Defining the mutually exclusive group for the main options + parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to resolvethem.com.', required=True) + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') + + args = parser.parse_args() + + print json.dumps(resolvethem_com.checkIPFromAlias(alias=args.query), indent=2) \ No newline at end of file diff --git a/osrframework/thirdparties/checkPhoneDetails.py b/osrframework/thirdparties/checkPhoneDetails.py new file mode 100644 index 0000000..643109c --- /dev/null +++ b/osrframework/thirdparties/checkPhoneDetails.py @@ -0,0 +1,44 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import sys +import urllib2 + +import osrframework.thirdparties.infobel_com.checkPhoneDetails as infobel_com + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='A library that wraps a search onto infobel.com via Google.', prog='checkPhoneDetails.py', add_help=False) + # Adding the main options + # Defining the mutually exclusive group for the main options + parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to infobel.com.', required=True) + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') + + args = parser.parse_args() + + print json.dumps(infobel_com.checkPhoneDetails(query=args.query), indent=2) + + diff --git a/osrframework/thirdparties/getBitcoinAddressDetails.py b/osrframework/thirdparties/getBitcoinAddressDetails.py new file mode 100644 index 0000000..e9b4f6c --- /dev/null +++ b/osrframework/thirdparties/getBitcoinAddressDetails.py @@ -0,0 +1,42 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json + +import osframework.thirdparties.blockchain_info as blockchain_info + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='A library that wraps the search about a Bitcoin address in blockchain.info.', prog='getBitcoinAddressDetails.py', epilog="", add_help=False) + # Adding the main options + # Defining the mutually exclusive group for the main options + parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to blockchain.info.', required=True) + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') + + args = parser.parse_args() + + print json.dumps(blockchain_info.getBitcoinAddressDetails(address=args.query), indent=2) + + diff --git a/osrframework/thirdparties/haveibeenpwned_com/__init__.py b/osrframework/thirdparties/haveibeenpwned_com/__init__.py new file mode 100644 index 0000000..5a33d26 --- /dev/null +++ b/osrframework/thirdparties/haveibeenpwned_com/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This file is part of OSRFramework. +# +# OSRFramework is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import osrframework.utils.logger +# Calling the logger when being imported +osrframework.utils.logger.setupLogger(loggerName="osrframework.thirdparties.haveibeenpwned_com") diff --git a/osrframework/thirdparties/haveibeenpwned_com/hibp.py b/osrframework/thirdparties/haveibeenpwned_com/hibp.py new file mode 100644 index 0000000..3c82454 --- /dev/null +++ b/osrframework/thirdparties/haveibeenpwned_com/hibp.py @@ -0,0 +1,94 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import requests +import sys +import time + +def checkIfEmailWasHacked(email=None, sleepSeconds=1.5): + """ + Method that checks if the given email is stored in the HIBP website. + + This function automatically waits a second to avoid problems with the API + rate limit. An example of the json received: + ``` + [{"Title":"Adobe","Name":"Adobe","Domain":"adobe.com","BreachDate":"2013-10-4","AddedDate":"2013-12-04T00:12Z","PwnCount":152445165,"Description":"The big one. In October 2013, 153 million Adobe accounts were breached with each containing an internal ID, username, email, encrypted password and a password hint in plain text. The password cryptography was poorly done and many were quickly resolved back to plain text. The unencrypted hints also disclosed much about the passwords adding further to the risk that hundreds of millions of Adobe customers already faced.","DataClasses":["Email addresses","Password hints","Passwords","Usernames"]}] + ``` + + Args: + ----- + email: Email to verify in HIBP. + + Returns: + -------- + A python structure for the json received. If nothing was found, it will + return an empty list. + """ + # Sleeping a second + time.sleep(sleepSeconds) + + # Building API query + apiURL= "https://haveibeenpwned.com/api/v2/breachedaccount/" + email + # Accessing the HIBP API + try: + data = requests.get(apiURL).text + + # Reading the text data onto python structures + jsonData = json.loads(data) + + leaks = [] + + # Building the i3visio like structure + for e in jsonData: + new = {} + new["value"] = e["Name"] + new["type"] = "i3visio.platform_leaked" + new["attributes"] = [ + { + "value": "i3visio_uri", + "type": apiURL, + "attributes": [] + } + ] + + leaks.append(new) + + return leaks + + except: + # No information was found, then we return a null entity + return [] + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='A library that wraps an account search onto haveibeenpwned.com.', prog='checkIfEmailWasHacked.py', epilog="", add_help=False) + # Adding the main options + # Defining the mutually exclusive group for the main options + parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to haveibeenpwned.com.', required=True) + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') + + args = parser.parse_args() + print("Results found for " + args.query + ":\n") + print(json.dumps(checkIfEmailWasHacked(email=args.query), indent=2)) diff --git a/osrframework/thirdparties/infobel_com/__init__.py b/osrframework/thirdparties/infobel_com/__init__.py new file mode 100644 index 0000000..8b12493 --- /dev/null +++ b/osrframework/thirdparties/infobel_com/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# OSRFramework is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import osrframework.utils.logger + +# Calling the logger when being imported +osrframework.utils.logger.setupLogger(loggerName="osrframework.thirdparties.infobel_com") diff --git a/osrframework/thirdparties/infobel_com/checkPhoneDetails.py b/osrframework/thirdparties/infobel_com/checkPhoneDetails.py new file mode 100644 index 0000000..c6e126a --- /dev/null +++ b/osrframework/thirdparties/infobel_com/checkPhoneDetails.py @@ -0,0 +1,97 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import sys +import urllib2 + +import osrframework.searchengines.google as google +import osrframework.thirdparties.infobel_com.processing as processing + +def checkPhoneDetails(query=None): + ''' + Method that checks if the given hash is stored in the md5crack.com website. + + :param query: query to verify. + + :return: Python structure. + ''' + results = [] + + #TO-DO executing the query against Google and grab the results + # The query should be something like " site:infobel.com" + search = query + " site:infobel.com" + + # This will return a list of i3visio.uri objects + uriObjects = google.processSearch(search) + + #TO-DO: grabbing the phone details for the QUERY + for uri in uriObjects: + # Recovering the website + # Accessing the resources + textResults = processing.getResults(uri["value"]) + # Iterating over every result to process it and recover a person object + for r in textResults: + person = {} + fullname = "" + person["type"]="i3visio.person" + person["value"] = "FULLNAME_NOT_FOUND" + person["attributes"] = processing.extractFieldsFromResult(r) + + for entity in person["attributes"]: + if entity["type"] == "i3visio.fullname": + person["value"] = entity["value"] + break + + # Appending the Uri of the infobel record: + aux = {} + aux["type"]= "i3visio.uri" + aux["value"] = uri["value"] + aux["attributes"] = [] + person["attributes"].append(aux) + + # Appending the platform of the infobel record: + aux = {} + aux["type"]= "i3visio.platform" + aux["value"] = "Infobel" + aux["attributes"] = [] + person["attributes"].append(aux) + + # Appending to the results + results.append(person) + + return results + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='A library that wraps a search onto infobel.com via Google.', prog='checkPhoneDetails.py', add_help=False) + # Adding the main options + # Defining the mutually exclusive group for the main options + parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to infobel.com.', required=True) + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') + + args = parser.parse_args() + + print json.dumps(checkPhoneDetails(query=args.query), indent=2) + + diff --git a/osrframework/thirdparties/infobel_com/processing.py b/osrframework/thirdparties/infobel_com/processing.py new file mode 100644 index 0000000..65b3355 --- /dev/null +++ b/osrframework/thirdparties/infobel_com/processing.py @@ -0,0 +1,76 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys + +import osrframework.utils.browser as browser + +def extractFieldsFromResult(data): + ''' + Method that parses Infobel textual information to return a series of attributes. + + :return: a list of i3visio-like objects. + ''' + + entities = [] + + # Defining the objects to extract + fieldsRegExp = {} + fieldsRegExp["i3visio.fullname"] = "([^<]*)" + fieldsRegExp["i3visio.name"] = " por [^ ]* ([^<]*)" + fieldsRegExp["i3visio.surname"] = " por ([^ ]*) " + fieldsRegExp["i3visio.location.address"] = "itemprop=\"streetAddress\">([^<]*)" + fieldsRegExp["i3visio.location.city"] = "addressLocality\">([^<]*)" + fieldsRegExp["i3visio.location.postalcode"] = "postalCode\">([^<]*)" + fieldsRegExp["i3visio.phone"] = "document.write\('([0-9]+)'" + + for field in fieldsRegExp.keys(): + listRecovered = re.findall(fieldsRegExp[field], data) + if len(listRecovered) >0: + aux = {} + aux["type"]= field + aux["value"] = listRecovered[0].replace('\xa0', ' ') + aux["attributes"] = [] + entities.append(aux) + + return entities + +def getResults(uri): + ''' + Method that recovers the text for each result in infobel.com + + :param uri: Infobel uri + + :return: A list of textual information to be processed + ''' + # Using i3visio browser to avoid certain issues... + i3Browser = browser.Browser() + + data = i3Browser.recoverURL(uri) + + # Strings to be searched + regExp = "(.*)" + # re.DOTALL is needed to match any character INCLUDING \n + results = re.findall(regExp, data, re.DOTALL) + + return results diff --git a/osrframework/thirdparties/ip_api_com/__init__.py b/osrframework/thirdparties/ip_api_com/__init__.py new file mode 100644 index 0000000..6bcb227 --- /dev/null +++ b/osrframework/thirdparties/ip_api_com/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This file is part of OSRFramework. +# +# OSRFramework is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import osrframework.utils.logger + +# Calling the logger when being imported +osrframework.utils.logger.setupLogger(loggerName="osrframework.thirdparties.ip_api_com") diff --git a/osrframework/thirdparties/ip_api_com/checkIpDetails.py b/osrframework/thirdparties/ip_api_com/checkIpDetails.py new file mode 100644 index 0000000..4233d09 --- /dev/null +++ b/osrframework/thirdparties/ip_api_com/checkIpDetails.py @@ -0,0 +1,176 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import sys +import urllib2 + +def checkIpDetails(query=None): + ''' + Method that checks if the given hash is stored in the md5crack.com website. An example of the json received: + { + "as": "AS8560 1\u00261 Internet AG", + "city": "", + "country": "Germany", + "countryCode": "DE", + "isp": "1\u00261 Internet AG", + "lat": 51, + "lon": 9, + "org": "1\u00261 Internet AG", + "query": "217.160.251.126", + "region": "", + "regionName": "", + "status": "success", + "timezone": "", + "zip": "" + } + + :param query: Query to verify. It can be either a domain or an IPv4 address. + + :return: Python structure for the json received. If nothing was found, it will return an empty dictionary. + [ + { + "attributes": [ + { + "attributes": [], + "type": "i3visio.text", + "value": "DE" + } + ], + "type": "i3visio.location.country", + "value": "Germany" + }, + { + "attributes": [], + "type": "i3visio.text", + "value": "1&1 Internet AG" + }, + { + "attributes": [], + "type": "i3visio.ipv4", + "value": "217.160.129.99" + }, + { + "attributes": [], + "type": "i3visio.location.geo", + "value": "51, 9" + } + ] + ''' + try: + apiURL = "http://ip-api.com/json/" + query + + + # Accessing the ip-api.com RESTful API + data = urllib2.urlopen(apiURL).read() + + # Reading the text data onto python structures + apiData = json.loads(data) + + # i3visio structure to be returned + jsonData = [] + + if apiData["status"] == "success": + for key in apiData: + value = apiData[key] + if value != "": + aux = {} + if key == "city": + aux["type"] = "i3visio.location." + key + aux["value"] = value + aux["attributes"] = [] + # Appending to the list of results + jsonData.append(aux) + elif key == "country": + aux["type"] = "i3visio.location." + key + aux["value"] = value + # Adding a new attribute + att ={} + att["type"] = "i3visio.text" + att["value"] = apiData["countryCode"] + att["attributes"] = [] + aux["attributes"] = [att] + # Appending to the list of results + jsonData.append(aux) + elif key == "isp": + aux["type"] = "i3visio.text" + aux["value"] = value + aux["attributes"] = [] + # Appending to the list of results + jsonData.append(aux) + elif key == "lat": + aux["type"] = "i3visio.location.geo" + aux["value"] = str(apiData["lat"]) + ", " + str(apiData["lon"]) + aux["attributes"] = [] + # Appending to the list of results + jsonData.append(aux) + elif key == "region": + aux["type"] = "i3visio.location.province" + aux["value"] = value + # Adding a new attribute + att ={} + att["type"] = "i3visio.text" + att["value"] = apiData["regionName"] + att["attributes"] = [] + aux["attributes"] = [att] + # Appending to the list of results + jsonData.append(aux) + elif key == "timezone": + aux["type"] = "i3visio.text" + aux["value"] = value + aux["attributes"] = [] + # Appending to the list of results + jsonData.append(aux) + elif key == "zip": + aux["type"] = "i3visio.location.postalcode" + aux["value"] = value + aux["attributes"] = [] + # Appending to the list of results + jsonData.append(aux) + elif key == "query": + aux["type"] = "i3visio.ipv4" + aux["value"] = value + aux["attributes"] = [] + # Appending to the list of results + jsonData.append(aux) + + #print json.dumps(jsonData, indent = 2) + return jsonData + except: + # No information was found, then we return a null entity + return {} + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='A library that wraps a search onto ip-api.com.', prog='checkIPDetails.py', epilog="", add_help=False) + # Adding the main options + # Defining the mutually exclusive group for the main options + general = parser.add_mutually_exclusive_group(required=True) + general.add_argument('-q', '--query', metavar='', action='store', help='query to be resolved by ip-api.com.') + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.2.0', help='shows the version of the program and exists.') + + args = parser.parse_args() + + print json.dumps(checkIpDetails(query=args.query), indent=2) + + diff --git a/osrframework/thirdparties/md5crack_com/__init__.py b/osrframework/thirdparties/md5crack_com/__init__.py new file mode 100644 index 0000000..0f6efac --- /dev/null +++ b/osrframework/thirdparties/md5crack_com/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This file is part of OSRFramework. +# +# OSRFramework is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import osrframework.utils.logger + +# Calling the logger when being imported +osrframework.utils.logger.setupLogger(loggerName="osrframework.thirdparties.md5crack_com") diff --git a/osrframework/thirdparties/md5crack_com/checkIfHashIsCracked.py b/osrframework/thirdparties/md5crack_com/checkIfHashIsCracked.py new file mode 100644 index 0000000..3f942f7 --- /dev/null +++ b/osrframework/thirdparties/md5crack_com/checkIfHashIsCracked.py @@ -0,0 +1,80 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import osrframework.utils.config_api_keys as config_api_keys +import sys +import urllib2 + +def checkIfHashIsCracked(hash=None, api_key=None): + ''' + Method that checks if the given hash is stored in the md5crack.com website. + + :param hash: hash to verify. + :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. + + :return: Python structure for the Json received. It has the following structure: + { + "phrase": "4d186321c1a7f0f354b297e8914ab240", + "code": 6, + "parsed": "hola", + "response": "The MD5 hash was cracked." + } + ''' + # This is for i3visio + if api_key==None: + #api_key = raw_input("Insert the API KEY here:\t") + allKeys = config_api_keys.returnListOfAPIKeys() + try: + api_key_data = allKeys["md5crack_com"] + api_key = api_key_data["api_key"] + except: + # API_Key not found + return {} + + apiURL = "http://api.md5crack.com/crack/"+ api_key +"/" + hash + + # Accessing the HIBP API + data = urllib2.urlopen(apiURL).read() + if "\"parsed\":null" in data: + data = data.replace("\"parsed\":null", "\"parsed\":\"\"") + + # Reading the text data onto python structures + jsonData = json.loads(data) + #print json.dumps(jsonData, indent = 2) + return jsonData + +if __name__ == "__main__": + 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) + # Adding the main options + # Defining the mutually exclusive group for the main options + parser.add_argument('-q', '--query', metavar='', action='store', help='query to be performed to md5crack.com.', required=True) + parser.add_argument('-a', '--api_key', action='store', help='API key in md5crack.com to be used.', required=False, default=None) + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') + + args = parser.parse_args() + + print json.dumps(checkIfHashIsCracked(hash=args.query, api_key=args.api_key), indent=2) + + diff --git a/osrframework/thirdparties/pipl_com/__init__.py b/osrframework/thirdparties/pipl_com/__init__.py new file mode 100644 index 0000000..9578dc7 --- /dev/null +++ b/osrframework/thirdparties/pipl_com/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This file is part of OSRFramework. +# +# OSRFramework is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import osrframework.utils.logger + +# Calling the logger when being imported +osrframework.utils.logger.setupLogger(loggerName="osrframework.thirdparties.pipl_com") diff --git a/osrframework/thirdparties/pipl_com/checkInfo.py b/osrframework/thirdparties/pipl_com/checkInfo.py new file mode 100644 index 0000000..4663fc6 --- /dev/null +++ b/osrframework/thirdparties/pipl_com/checkInfo.py @@ -0,0 +1,116 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import osrframework.utils.config_api_keys as config_api_keys +import sys +import urllib2 + +from osrframework.thirdparties.pipl_com.lib.search import SearchAPIRequest, SearchAPIError +from osrframework.thirdparties.pipl_com.lib import Person, Name, Address, Job + +def checkInfo(email=None, username=None, api_key=None): + ''' + Method that checks if the given hash is stored in the pipl.com website. + + :param email: queries to be launched. + :param api_key: api_key to be used in pipl.com. If not provided, the API key will be searched in the config_api_keys.py file. + + :return: Python structure for the Json received. It has the following structure: + ''' + # This is for i3visio + if api_key==None: + #api_key = raw_input("Insert the API KEY here:\t") + allKeys = config_api_keys.returnListOfAPIKeys() + try: + api_key = allKeys["pipl_com"] + except: + # API_Key not found. The samplekey will be used but it has a limit of 10 queries/day. + api_key = "samplekey" + + results = {} + results["person"] = [] + results["records"] = [] + + if username != None: + request = SearchAPIRequest( username=username, api_key=api_key) + person, records = launchRequest(request) + # Appending the results + results["person"].append(person) + results["records"].append(records) + if email != None: + request = SearchAPIRequest( email=email, api_key=api_key) + person, records = launchRequest(request) + # Appending the results + results["person"].append(person) + results["records"].append(records) + return results + + +def launchRequest(request): + ''' + Method to launch a given request. + + :param request: The request object. + + :return: A dictionary containinf the results of the person and a list of dicts containing the references for the record. + ''' + person = {} + records = [] + + try: + response = request.send() + # Trying to recover a person object. This is a dict: + try: + person = (response.person).to_dict() + except: + pass + # Trying to recover a list of record objects. This is a list dicts + try: + aux = response.records + records = [r.to_dict() for r in aux] + except: + pass + except SearchAPIError as e: + print e.http_status_code, e + + return person, records + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='A library that wraps a search onto pipl.com API.', prog='checkInfo.py', epilog="NOTE: if not provided, the API key will be searched in the config_api_keys.py file.", add_help=False) + # Adding the main options + + parser.add_argument('-a', '--api_key', action='store', help='API key in pipl.com to be used.', required=False) + + # Defining the mutually exclusive group for the main options + groupQueries = parser.add_mutually_exclusive_group(required=True) + groupQueries.add_argument('-e', '--email', metavar='', action='store', help='query to be performed to pipl.com.') + groupQueries.add_argument('-u', '--username', metavar='', action='store', help='query to be performed to pipl.com.') + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') + + args = parser.parse_args() + + print json.dumps(checkInfo(email=args.email, username=args.username, api_key=args.api_key), indent=2) + + diff --git a/osrframework/thirdparties/pipl_com/lib/__init__.py b/osrframework/thirdparties/pipl_com/lib/__init__.py new file mode 100644 index 0000000..cb0d6bb --- /dev/null +++ b/osrframework/thirdparties/pipl_com/lib/__init__.py @@ -0,0 +1,43 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This file is part of OSRFramework. +# +# OSRFramework is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +import osrframework.utils.logger + +# Calling the logger when being imported +osrframework.utils.logger.setupLogger(loggerName="osrframework.thirdparties.pipl_com.lib") + + +__version__ = '1.0' +"""Python implementation of Pipl's data model. +The data model is basically Record/Person objects (avaialable in +osrframework.thirdparties.pipl_com.lib.containers) with their source (available in osrframework.thirdparties.pipl_com.lib.source) +and their fields (available in osrframework.thirdparties.pipl_com.lib.fields). +Importing can be done either with: +from osrframework.thirdparties.pipl_com.lib.containers import Record, Person +from osrframework.thirdparties.pipl_com.lib.fields import Name, Address +from osrframework.thirdparties.pipl_com.lib.source import Source +or simply with: +from osrframework.thirdparties.pipl_com.lib import Record, Person, Name, Address, Source +""" +from osrframework.thirdparties.pipl_com.lib.containers import Record, Person +from osrframework.thirdparties.pipl_com.lib.source import Source +from osrframework.thirdparties.pipl_com.lib.fields import * diff --git a/osrframework/thirdparties/pipl_com/lib/containers.py b/osrframework/thirdparties/pipl_com/lib/containers.py new file mode 100644 index 0000000..e5d7023 --- /dev/null +++ b/osrframework/thirdparties/pipl_com/lib/containers.py @@ -0,0 +1,264 @@ +from osrframework.thirdparties.pipl_com.lib.fields import * +from osrframework.thirdparties.pipl_com.lib.source import Source +from osrframework.thirdparties.pipl_com.lib.utils import * + + +__all__ = ['Record', 'Person'] + + +class FieldsContainer(object): + + """The base class of Record and Person, made only for inheritance.""" + + class_container = { + Name: 'names', + Address: 'addresses', + Phone: 'phones', + Email: 'emails', + Job: 'jobs', + Education: 'educations', + Image: 'images', + Username: 'usernames', + UserID: 'user_ids', + DOB: 'dobs', + RelatedURL: 'related_urls', + Relationship: 'relationships', + Tag: 'tags', + } + + def __init__(self, fields=None): + """`fields` is an iterable of field objects from + osrframework.thirdparties.pipl_com.lib.fields.""" + self.names = [] + self.addresses = [] + self.phones = [] + self.emails = [] + self.jobs = [] + self.educations = [] + self.images = [] + self.usernames = [] + self.user_ids = [] + self.dobs = [] + self.related_urls = [] + self.relationships = [] + self.tags = [] + + self.add_fields(fields or []) + + def add_fields(self, fields): + """Add the fields to their corresponding container. + + `fields` is an iterable of field objects from osrframework.thirdparties.pipl_com.lib.fields. + + """ + for field in fields: + cls = field.__class__ + try: + container = FieldsContainer.class_container[cls] + except KeyError: + raise ValueError('Object of type %s is an invalid field' % cls) + getattr(self, container).append(field) + + @property + def all_fields(self): + """A list with all the fields contained in this object.""" + return [field + for container in FieldsContainer.class_container.values() + for field in getattr(self, container)] + + @staticmethod + def fields_from_dict(d): + """Load the fields from the dict, return a list with all the fields.""" + class_container = FieldsContainer.class_container + fields = [field_cls.from_dict(field_dict) + for field_cls, container in class_container.iteritems() + for field_dict in d.get(container, [])] + return fields + + def fields_to_dict(self): + """Transform the object to a dict and return the dict.""" + d = {} + for container in FieldsContainer.class_container.values(): + fields = getattr(self, container) + if fields: + d[container] = [field.to_dict() for field in fields] + return d + + +class Record(Serializable, FieldsContainer): + + """A record is all the data available in a specific source. + + Every record object is based on a source which is basically the URL of the + page where the data is available, and the data itself that comes as field + objects (Name, Address, Email etc. see osrframework.thirdparties.pipl_com.lib.fields). + + Each type of field has its own container (note that Record is a subclass + of FieldsContainer). + For example: + + >>> from osrframework.thirdparties.pipl_com.lib import Record, Email, Phone + >>> fields = [Email(address='eric@cartman.com'), Phone(number=999888777)] + >>> record = Record(fields=fields) + >>> record.emails + [Email(address=u'eric@cartman.com')] + >>> record.phones + [Phone(number=999888777)] + + Records come as results for a query and therefore they have attributes that + indicate if and how much they match the query. They also have a validity + timestamp available as an attribute. + + """ + + def __init__(self, fields=None, source=None, query_params_match=None, + query_person_match=None, valid_since=None): + """Extend FieldsContainer.__init__ and set the record's source + and attributes. + + Args: + + fields -- An iterable of fields (from osrframework.thirdparties.pipl_com.lib.fields). + source -- A Source object (osrframework.thirdparties.pipl_com.lib.source.Source). + query_params_match -- A bool value that indicates whether the record + contains all the params from the query or not. + query_person_match -- A float between 0.0 and 1.0 that indicates how + likely it is that this record holds data about + the person from the query. + Higher value means higher likelihood, value + of 1.0 means "this is definitely him". + This value is based on Pipl's statistical + algorithm that takes into account many parameters + like the popularity of the name/address (if there + was a name/address in the query) etc. + valid_since -- A datetime.datetime object, this is the first time + Pipl's crawlers saw this record. + + """ + FieldsContainer.__init__(self, fields) + self.source = source or Source() + self.query_params_match = query_params_match + self.query_person_match = query_person_match + self.valid_since = valid_since + + @staticmethod + def from_dict(d): + """Transform the dict to a record object and return the record.""" + query_params_match = d.get('@query_params_match') + query_person_match = d.get('@query_person_match') + valid_since = d.get('@valid_since') + if valid_since: + valid_since = str_to_datetime(valid_since) + source = Source.from_dict(d.get('source', {})) + fields = Record.fields_from_dict(d) + return Record(source=source, fields=fields, + query_params_match=query_params_match, + query_person_match=query_person_match, + valid_since=valid_since) + + def to_dict(self): + """Return a dict representation of the record.""" + d = {} + if self.query_params_match is not None: + d['@query_params_match'] = self.query_params_match + if self.query_person_match is not None: + d['@query_person_match'] = self.query_person_match + if self.valid_since is not None: + d['@valid_since'] = datetime_to_str(self.valid_since) + if self.source is not None: + d['source'] = self.source.to_dict() + d.update(self.fields_to_dict()) + return d + + +class Person(Serializable, FieldsContainer): + + """A Person object is all the data available on an individual. + + The Person object is essentially very similar in its structure to the + Record object, the main difference is that data about an individual can + come from multiple sources while a record is data from one source. + + The person's data comes as field objects (Name, Address, Email etc. see + osrframework.thirdparties.pipl_com.lib.fields). + Each type of field has its on container (note that Person is a subclass + of FieldsContainer). + For example: + + >>> from osrframework.thirdparties.pipl_com.lib import Person, Email, Phone + >>> fields = [Email(address='eric@cartman.com'), Phone(number=999888777)] + >>> person = Person(fields=fields) + >>> person.emails + [Email(address=u'eric@cartman.com')] + >>> person.phones + [Phone(number=999888777)] + + Note that a person object is used in the Search API in two ways: + - It might come back as a result for a query (see SearchResponse). + - It's possible to build a person object with all the information you + already have about the person you're looking for and send this object as + the query (see SearchRequest). + + """ + + def __init__(self, fields=None, sources=None, query_params_match=None): + """Extend FieldsContainer.__init__ and set the record's sources + and query_params_match attribute. + + Args: + + fields -- An iterable of fields (from osrframework.thirdparties.pipl_com.lib.fields). + sources -- A list of Source objects (osrframework.thirdparties.pipl_com.lib.source.Source). + query_params_match -- A bool value that indicates whether the record + contains all the params from the query or not. + + """ + + FieldsContainer.__init__(self, fields) + self.sources = sources or [] + self.query_params_match = query_params_match + + @property + def is_searchable(self): + """A bool value that indicates whether the person has enough data and + can be sent as a query to the API.""" + filter_func = lambda field: field.is_searchable + return bool(filter(filter_func, self.names) or + filter(filter_func, self.emails) or + filter(filter_func, self.phones) or + filter(filter_func, self.usernames)) + + @property + def unsearchable_fields(self): + """A list of all the fields that can't be searched by. + + For example: names/usernames that are too short, emails that are + invalid etc. + + """ + filter_func = lambda field: not field.is_searchable + return filter(filter_func, self.names) + \ + filter(filter_func, self.emails) + \ + filter(filter_func, self.phones) + \ + filter(filter_func, self.usernames) + \ + filter(filter_func, self.addresses) + \ + filter(filter_func, self.dobs) + + @staticmethod + def from_dict(d): + """Transform the dict to a person object and return the person.""" + query_params_match = d.get('@query_params_match') + sources = [Source.from_dict(source) for source in d.get('sources', [])] + fields = Person.fields_from_dict(d) + return Person(fields=fields, sources=sources, + query_params_match=query_params_match) + + def to_dict(self): + """Return a dict representation of the person.""" + d = {} + if self.query_params_match is not None: + d['@query_params_match'] = self.query_params_match + if self.sources: + d['sources'] = [source.to_dict() for source in self.sources] + d.update(self.fields_to_dict()) + return d diff --git a/osrframework/thirdparties/pipl_com/lib/error.py b/osrframework/thirdparties/pipl_com/lib/error.py new file mode 100644 index 0000000..9c37bdc --- /dev/null +++ b/osrframework/thirdparties/pipl_com/lib/error.py @@ -0,0 +1,33 @@ +from osrframework.thirdparties.pipl_com.lib.utils import Serializable + + +class APIError(Exception, Serializable): + + """An exception raised when the response from the API contains an error.""" + + def __init__(self, error, http_status_code): + """Extend Exception.__init___ and set two extra attributes - + error (unicode) and http_status_code (int).""" + Exception.__init__(self, error) + self.error = error + self.http_status_code = http_status_code + + @property + def is_user_error(self): + """A bool that indicates whether the error is on the user's side.""" + return 400 <= self.http_status_code < 500 + + @property + def is_pipl_error(self): + """A bool that indicates whether the error is on Pipl's side.""" + return not self.is_user_error + + @classmethod + def from_dict(cls, d): + """Transform the dict to a error object and return the error.""" + return cls(d.get('error'), d.get('@http_status_code')) + + def to_dict(self): + """Return a dict representation of the error.""" + return {'error': self.error, '@http_status_code': self.http_status_code} + diff --git a/osrframework/thirdparties/pipl_com/lib/fields.py b/osrframework/thirdparties/pipl_com/lib/fields.py new file mode 100644 index 0000000..4149d89 --- /dev/null +++ b/osrframework/thirdparties/pipl_com/lib/fields.py @@ -0,0 +1,870 @@ +import re +import datetime + +from osrframework.thirdparties.pipl_com.lib.utils import * + + +__all__ = ['Name', 'Address', 'Phone', 'Email', 'Job', 'Education', 'Image', + 'Username', 'UserID', 'DOB', 'RelatedURL', 'Relationship', 'Tag', + 'DateRange'] + + +class Field(Serializable): + + """Base class of all data fields, made only for inheritance.""" + + attributes = () + children = ('content',) + + def __init__(self, valid_since=None): + self.valid_since = valid_since + + def __setattr__(self, attr, value): + """Extend the default object.__setattr___ and make sure that str values + are converted to unicode and that assigning to the `type` attribute is + only from the allowed values. + + Setting an str value for an attribute is impossible, if an str is + provided then it must be in utf8 encoding and it will be automatically + converted to a unicode object. + + Example: + >>> from osrframework.thirdparties.pipl_com.lib.data import Name + >>> name = Name(first='eric') + >>> name.first + u'eric' + + """ + if isinstance(value, str): + try: + value = value.decode('utf8') + except UnicodeDecodeError: + raise ValueError('Tried to assign a non utf8 string to ' + attr) + if attr == 'type': + self.validate_type(value) + object.__setattr__(self, attr, value) + + def __unicode__(self): + """Return the unicode representation of the object.""" + children = list(self.children) + if 'raw' in children: + children.remove('raw') + values = [getattr(self, child) for child in children] + return u' '.join([unicode(val) for val in values if val is not None]) + + def __str__(self): + """Return the str representation of the object (encoded with utf8).""" + return unicode(self).encode('utf8') + + def __repr__(self): + """Return a representation of the object (a valid value for eval()).""" + attrs = list(self.attributes + self.children) + attrs.append('valid_since') + attrs_values = [(attr, getattr(self, attr)) for attr in attrs] + attrs_values = [(attr, value) if attr != 'type' else ('type_', value) + for attr, value in attrs_values] + args = ['%s=%s' % (attr, repr(value)) + for attr, value in attrs_values if value is not None] + return '%s(%s)' % (self.__class__.__name__, ', '.join(args)) + + def __eq__(self, other): + """Bool, indicates whether `self` and `other` have exactly the same + data.""" + return repr(self) == repr(other) + + def validate_type(self, type_): + """Take an str/unicode `type_` and raise a ValueError if it's not + a valid type for the object. + + A valid type for a field is a value from the types_set attribute of + that field's class. + + """ + if type_ is not None and type_ not in self.types_set: + raise ValueError('Invalid type for %s:%s' % (self.__class__, type_)) + + @classmethod + def from_dict(cls, d): + """Transform the dict to a field object and return the field.""" + kwargs = {} + for key, val in d.iteritems(): + if key.startswith('display'): # includes phone.display_international + continue + if key.startswith('@'): + key = key[1:] + if key == 'type': + key = 'type_' + elif key == 'valid_since': + val = str_to_datetime(val) + elif key == 'date_range': + val = DateRange.from_dict(val) + kwargs[key.encode('ascii')] = val + return cls(**kwargs) + + def to_dict(self): + """Return a dict representation of the field.""" + d = {} + if self.valid_since is not None: + d['@valid_since'] = datetime_to_str(self.valid_since) + for attr_list, prefix in [(self.attributes, '@'), (self.children, '')]: + for attr in attr_list: + value = getattr(self, attr) + if isinstance(value, Serializable): + value = value.to_dict() + if value or isinstance(value, (bool, int, long)): + d[prefix + attr] = value + if hasattr(self, 'display') and self.display: + d['display'] = self.display + return d + + +class Name(Field): + + """A name of a person.""" + + attributes = ('type',) + children = ('prefix', 'first', 'middle', 'last', 'suffix', 'raw') + types_set = set(['present', 'maiden', 'former', 'alias']) + + def __init__(self, prefix=None, first=None, middle=None, last=None, + suffix=None, raw=None, type_=None, valid_since=None): + """`prefix`, `first`, `middle`, `last`, `suffix`, `raw`, `type_`, + should all be unicode objects or utf8 encoded strs (will be decoded + automatically). + + `raw` is an unparsed name like "Eric T Van Cartman", usefull when you + want to search by name and don't want to work hard to parse it. + Note that in response data there's never name.raw, the names in + the response are always parsed, this is only for querying with + an unparsed name. + + `type_` is one of Name.types_set. + + `valid_since` is a datetime.datetime object, it's the first time Pipl's + crawlers found this data on the page. + + """ + Field.__init__(self, valid_since) + self.prefix = prefix + self.first = first + self.middle = middle + self.last = last + self.suffix = suffix + self.raw = raw + self.type = type_ + + @property + def display(self): + """A unicode value with the object's data, to be used for displaying + the object in your application.""" + return unicode(self) + + @property + def is_searchable(self): + """A bool value that indicates whether the name is a valid name to + search by.""" + first = alpha_chars(self.first or u'') + last = alpha_chars(self.last or u'') + raw = alpha_chars(self.raw or u'') + return (len(first) >= 2 and len(last) >= 2) or len(raw) >= 4 + + +class Address(Field): + + """An address of a person.""" + + attributes = ('type',) + children = ('country', 'state', 'city', 'po_box', + 'street', 'house', 'apartment', 'raw') + types_set = set(['home', 'work', 'old']) + + def __init__(self, country=None, state=None, city=None, po_box=None, + street=None, house=None, apartment=None, raw=None, type_=None, + valid_since=None): + """`country`, `state`, `city`, `po_box`, `street`, `house`, `apartment`, + `raw`, `type_`, should all be unicode objects or utf8 encoded strs + (will be decoded automatically). + + `country` and `state` are country code (like "US") and state code + (like "NY"), note that the full value is available as + address.country_full and address.state_full. + + `raw` is an unparsed address like "123 Marina Blvd, San Francisco, + California, US", usefull when you want to search by address and don't + want to work hard to parse it. + Note that in response data there's never address.raw, the addresses in + the response are always parsed, this is only for querying with + an unparsed address. + + `type_` is one of Address.types_set. + + `valid_since` is a datetime.datetime object, it's the first time Pipl's + crawlers found this data on the page. + + """ + Field.__init__(self, valid_since) + self.country = country + self.state = state + self.city = city + self.po_box = po_box + self.street = street + self.house = house + self.apartment = apartment + self.raw = raw + self.type = type_ + + @property + def display(self): + """A unicode value with the object's data, to be used for displaying + the object in your application.""" + country = self.country if self.state else self.country_full + state = self.state if self.city else self.state_full + vals = (self.street, self.city, state, country) + disp = u', '.join(filter(None, vals)) + if self.street and (self.house or self.apartment): + prefix = u'-'.join([val for val in (self.house, self.apartment) + if val]) + disp = prefix + u' ' + (disp or u'') + if self.po_box and not self.street: + disp = u' '.join([u'P.O. Box', self.po_box, (disp or u'')]) + return disp + + @property + def is_searchable(self): + """A bool value that indicates whether the address is a valid address + to search by.""" + return self.raw or (self.is_valid_country and + (not self.state or self.is_valid_state)) + + @property + def is_valid_country(self): + """A bool value that indicates whether the object's country is a valid + country code.""" + return self.country is not None and self.country.upper() in COUNTRIES + + @property + def is_valid_state(self): + """A bool value that indicates whether the object's state is a valid + state code.""" + return self.is_valid_country and self.country.upper() in STATES and \ + self.state is not None and \ + self.state.upper() in STATES[self.country.upper()] + + @property + def country_full(self): + """unicode, the full name of the object's country. + + >>> address = Address(country='FR') + >>> address.country + u'FR' + >>> address.country_full + u'France' + + """ + if self.country: + return COUNTRIES.get(self.country.upper()) + + @property + def state_full(self): + """unicode, the full name of the object's state. + + >>> address = Address(country='US', state='CO') + >>> address.state + u'CO' + >>> address.state_full + u'Colorado' + + """ + + if self.is_valid_state: + return STATES[self.country.upper()].get(self.state.upper()) + + +class Phone(Field): + + """A phone number of a person.""" + + attributes = ('type',) + children = ('country_code', 'number', 'extension') + types_set = set(['mobile', 'home_phone', 'home_fax', 'work_phone', + 'work_fax', 'pager']) + + def __init__(self, country_code=None, number=None, extension=None, + type_=None, valid_since=None): + """`country_code`, `number` and `extension` should all be int/long. + + `type_` is one of Phone.types_set. + + `valid_since` is a datetime.datetime object, it's the first time Pipl's + crawlers found this data on the page. + + """ + Field.__init__(self, valid_since) + self.country_code = country_code + self.number = number + self.extension = extension + self.type = type_ + # The two following display attributes are available when working with + # a response from the API, both hold unicode values that can be used to + # display the phone in your application. + # Note that in other fields the display attribute is a property, this + # is not the case here since generating the display for a phone is + # country specific and requires a special library. + self.display = u'' + self.display_international = u'' + + @property + def is_searchable(self): + """A bool value that indicates whether the phone is a valid phone + to search by.""" + return self.number is not None and \ + (not self.country_code or self.country_code == 1) + + @staticmethod + def from_text(text): + """Strip `text` (unicode/str) from all non-digit chars and return a new + Phone object with the number from text. + + >>> phone = Phone.from_text('(888) 777-666') + >>> phone.number + 888777666 + + """ + number = int(filter(unicode.isdigit, unicode(text))) + return Phone(number=number) + + @classmethod + def from_dict(cls, d): + """Extend Field.from_dict, set display/display_international + attributes.""" + phone = super(cls, cls).from_dict(d) + phone.display = d.get('display', u'') + phone.display_international = d.get('display_international', u'') + return phone + + def to_dict(self): + """Extend Field.to_dict, take the display_international attribute.""" + d = Field.to_dict(self) + if self.display_international: + d['display_international'] = self.display_international + return d + + +class Email(Field): + + """An email address of a person with the md5 of the address, might come + in some cases without the address itself and just the md5 (for privacy + reasons). + + """ + + attributes = ('type',) + children = ('address', 'address_md5') + types_set = set(['personal', 'work']) + re_email = re.compile('^[\w.%\-+]+@[\w.%\-]+\.[a-zA-Z]{2,6}$') + + def __init__(self, address=None, address_md5=None, type_=None, + valid_since=None): + """`address`, `address_md5`, `type_` should be unicode objects or utf8 + encoded strs (will be decoded automatically). + + `type_` is one of Email.types_set. + + `valid_since` is a datetime.datetime object, it's the first time Pipl's + crawlers found this data on the page. + + """ + Field.__init__(self, valid_since) + self.address = address + self.address_md5 = address_md5 + self.type = type_ + + @property + def is_valid_email(self): + """A bool value that indicates whether the address is a valid + email address. + + Note that the check is done be matching to the regular expression + at Email.re_email which is very basic and far from covering end-cases... + + """ + return bool(self.address and Email.re_email.match(self.address)) + + @property + def is_searchable(self): + """A bool value that indicates whether the email is a valid email + to search by.""" + return self.is_valid_email + + @property + def username(self): + """unicode, the username part of the email or None if the email is + invalid. + + >>> email = Email(address='eric@cartman.com') + >>> email.username + u'eric' + + """ + if not self.is_valid_email: + return + return self.address.split('@')[0] + + @property + def domain(self): + """unicode, the domain part of the email or None if the email is + invalid. + + >>> email = Email(address='eric@cartman.com') + >>> email.domain + u'cartman.com' + + """ + if not self.is_valid_email: + return + return self.address.split('@')[1] + + +class Job(Field): + + """Job information of a person.""" + + children = ('title', 'organization', 'industry', 'date_range') + + def __init__(self, title=None, organization=None, industry=None, + date_range=None, valid_since=None): + """`title`, `organization`, `industry`, should all be unicode objects + or utf8 encoded strs (will be decoded automatically). + + `date_range` is A DateRange object (osrframework.thirdparties.pipl_com.lib.fields.DateRange), + that's the time the person held this job. + + `valid_since` is a datetime.datetime object, it's the first time Pipl's + crawlers found this data on the page. + + """ + Field.__init__(self, valid_since) + self.title = title + self.organization = organization + self.industry = industry + self.date_range = date_range + + @property + def display(self): + """A unicode value with the object's data, to be used for displaying + the object in your application.""" + if self.title and self.organization: + disp = self.title + u' at ' + self.organization + else: + disp = self.title or self.organization or None + if disp and self.industry: + if self.date_range is not None: + disp += u' (%s, %d-%d)' % ((self.industry,) + \ + self.date_range.years_range) + else: + disp += u' (%s)' % self.industry + else: + disp = ((disp or u'') + u' ' + (self.industry or u'')).strip() + if disp and self.date_range is not None: + disp += u' (%d-%d)' % self.date_range.years_range + return disp + + +class Education(Field): + + """Education information of a person.""" + + children = ('degree', 'school', 'date_range') + + def __init__(self, degree=None, school=None, date_range=None, + valid_since=None): + """`degree` and `school` should both be unicode objects or utf8 encoded + strs (will be decoded automatically). + + `date_range` is A DateRange object (osrframework.thirdparties.pipl_com.lib.fields.DateRange), + that's the time the person was studying. + + `valid_since` is a datetime.datetime object, it's the first time Pipl's + crawlers found this data on the page. + + """ + Field.__init__(self, valid_since) + self.degree = degree + self.school = school + self.date_range = date_range + + @property + def display(self): + """A unicode value with the object's data, to be used for displaying + the object in your application.""" + if self.degree and self.school: + disp = self.degree + u' from ' + self.school + else: + disp = self.degree or self.school or None + if disp is not None and self.date_range is not None: + disp += u' (%d-%d)' % self.date_range.years_range + return disp or u'' + + +class Image(Field): + + """A URL of an image of a person.""" + + children = ('url',) + + def __init__(self, url=None, valid_since=None): + """`url` should be a unicode object or utf8 encoded str (will be decoded + automatically). + + `valid_since` is a datetime.datetime object, it's the first time Pipl's + crawlers found this data on the page. + + """ + Field.__init__(self, valid_since) + self.url = url + + @property + def is_valid_url(self): + """A bool value that indicates whether the image URL is a valid URL.""" + return bool(self.url and is_valid_url(self.url)) + + +class Username(Field): + + """A username/screen-name associated with the person. + + Note that even though in many sites the username uniquely identifies one + person it's not guarenteed, some sites allow different people to use the + same username. + + """ + + def __init__(self, content=None, valid_since=None): + """`content` is the username itself, it should be a unicode object or + a utf8 encoded str (will be decoded automatically). + + `valid_since` is a datetime.datetime object, it's the first time Pipl's + crawlers found this data on the page. + + """ + Field.__init__(self, valid_since) + self.content = content + + @property + def is_searchable(self): + """A bool value that indicates whether the username is a valid username + to search by.""" + return len(alnum_chars(self.content or u'')) >= 4 + + +class UserID(Field): + + """An ID associated with a person. + + The ID is a string that's used by the site to uniquely identify a person, + it's guaranteed that in the site this string identifies exactly one person. + + """ + + def __init__(self, content=None, valid_since=None): + """`content` is the ID itself, it should be a unicode object or a utf8 + encoded str (will be decoded automatically). + + `valid_since` is a datetime.datetime object, it's the first time Pipl's + crawlers found this data on the page. + + """ + Field.__init__(self, valid_since) + self.content = content + + +class DOB(Field): + + """Date-of-birth of A person. + Comes as a date-range (the exact date is within the range, if the exact + date is known the range will simply be with start=end). + + """ + + children = ('date_range',) + + def __init__(self, date_range=None, valid_since=None): + """`date_range` is A DateRange object (osrframework.thirdparties.pipl_com.lib.fields.DateRange), + the date-of-birth is within this range. + + `valid_since` is a datetime.datetime object, it's the first time Pipl's + crawlers found this data on the page. + + """ + Field.__init__(self, valid_since) + self.date_range = date_range + + @property + def display(self): + """A unicode value with the object's data, to be used for displaying + the object in your application. + + Note: in a DOB object the display is the estimated age. + + """ + if self.age is None: + return u'' + return unicode(self.age) + + @property + def is_searchable(self): + return self.date_range is not None + + @property + def age(self): + """int, the estimated age of the person. + + Note that A DOB object is based on a date-range and the exact date is + usually unknown so for age calculation the the middle of the range is + assumed to be the real date-of-birth. + + """ + if self.date_range is None: + return + dob = self.date_range.middle + today = datetime.date.today() + if (today.month, today.day) < (dob.month, dob.day): + return today.year - dob.year - 1 + else: + return today.year - dob.year + + @property + def age_range(self): + """A tuple of two ints - the minimum and maximum age of the person.""" + if self.date_range is None: + return None, None + start_date = DateRange(self.date_range.start, self.date_range.start) + end_date = DateRange(self.date_range.end, self.date_range.end) + start_age = DOB(date_range=end_date).age + end_age = DOB(date_range=start_date).age + return start_age, end_age + + @staticmethod + def from_birth_year(birth_year): + """Take a person's birth year (int) and return a new DOB object + suitable for him.""" + if birth_year <= 0: + raise ValueError('birth_year must be positive') + date_range = DateRange.from_years_range(birth_year, birth_year) + return DOB(date_range=date_range) + + @staticmethod + def from_birth_date(birth_date): + """Take a person's birth date (datetime.date) and return a new DOB + object suitable for him.""" + if birth_date > datetime.date.today(): + raise ValueError('birth_date can\'t be in the future') + date_range = DateRange(birth_date, birth_date) + return DOB(date_range=date_range) + + @staticmethod + def from_age(age): + """Take a person's age (int) and return a new DOB object + suitable for him.""" + return DOB.from_age_range(age, age) + + @staticmethod + def from_age_range(start_age, end_age): + """Take a person's minimal and maximal age and return a new DOB object + suitable for him.""" + if start_age < 0 or end_age < 0: + raise ValueError('start_age and end_age can\'t be negative') + + if start_age > end_age: + start_age, end_age = end_age, start_age + + today = datetime.date.today() + + try: + start_date = today.replace(year=today.year - end_age - 1) + except ValueError: # February 29 + start_date = today.replace(year=today.year - end_age - 1, day=28) + start_date += datetime.timedelta(days=1) + + try: + end_date = today.replace(year=today.year - start_age) + except ValueError: # February 29 + end_date = today.replace(year=today.year - start_age, day=28) + + date_range = DateRange(start_date, end_date) + return DOB(date_range=date_range) + + +class RelatedURL(Field): + + """A URL that's related to a person (blog, personal page in the work + website, profile in some other website). + + IMPORTANT: This URL is NOT the origin of the data about the person, it's + just an extra piece of information available on him. + + """ + + attributes = ('type',) + types_set = set(['personal', 'work', 'blog']) + + def __init__(self, content=None, type_=None, valid_since=None): + """`content` is the URL address itself, both content and type_ should + be unicode objects or utf8 encoded strs (will be decoded automatically). + + `type_` is one of RelatedURL.types_set. + + `valid_since` is a datetime.datetime object, it's the first time Pipl's + crawlers found this data on the page. + + """ + Field.__init__(self, valid_since) + self.content = content + self.type = type_ + + @property + def is_valid_url(self): + """A bool value that indicates whether the URL is a valid URL.""" + return bool(self.content and is_valid_url(self.content)) + + +class Relationship(Field): + + """Name of another person related to this person.""" + + attributes = ('type', 'subtype') + children = ('name',) + types_set = set(['friend', 'family', 'work', 'other']) + + def __init__(self, name=None, type_=None, subtype=None, + valid_since=None): + """`name` is a Name object (osrframework.thirdparties.pipl_com.lib.fields.Name). + + `type_` and `subtype` should both be unicode objects or utf8 encoded + strs (will be decoded automatically). + + `type_` is one of RelatedURL.types_set. + + `subtype` is not restricted to a specific list of possible values (for + example, if type_ is "family" then subtype can be "Father", "Mother", + "Son" and many other things). + + `valid_since` is a datetime.datetime object, it's the first time Pipl's + crawlers found this data on the page. + + """ + Field.__init__(self, valid_since) + self.name = name + self.type = type_ + self.subtype = subtype + + @classmethod + def from_dict(cls, d): + """Extend Field.from_dict and also load the name from the dict.""" + relationship = super(cls, cls).from_dict(d) + if relationship.name is not None: + relationship.name = Name.from_dict(relationship.name) + return relationship + + +class Tag(Field): + + """A general purpose element that holds any meaningful string that's + related to the person. + Used for holding data about the person that either couldn't be clearly + classified or was classified as something different than the available + data fields. + + """ + + attributes = ('classification',) + + def __init__(self, content=None, classification=None, valid_since=None): + """`content` is the tag itself, both `content` and `classification` + should be unicode objects or utf8 encoded strs (will be decoded + automatically). + + `valid_since` is a datetime.datetime object, it's the first time Pipl's + crawlers found this data on the page. + + """ + Field.__init__(self, valid_since) + self.content = content + self.classification = classification + + +class DateRange(Serializable): + + """A time intervel represented as a range of two dates. + + DateRange objects are used inside DOB, Job and Education objects. + + """ + + def __init__(self, start, end): + """`start` and `end` are datetime.date objects, both are required. + + For creating a DateRange object for an exact date (like if exact + date-of-birth is known) just pass the same value for `start` and `end`. + + """ + if start > end: + start, end = end, start + self.start = start + self.end = end + + def __unicode__(self): + """Return the unicode representation of the object.""" + return u' - '.join([unicode(self.start), unicode(self.end)]) + + def __repr__(self): + """Return a representation of the object (a valid value for eval()).""" + return 'DateRange(%s, %s)' % (repr(self.start), repr(self.end)) + + def __eq__(self, other): + """Bool, indicates whether `self` and `other` have exactly the same + start date and end date.""" + return repr(self) == repr(other) + + @property + def is_exact(self): + """True if the object holds an exact date (start=end), + False otherwise.""" + return self.start == self.end + + @property + def middle(self): + """The middle of the date range (a datetime.date object).""" + return self.start + (self.end - self.start) / 2 + + @property + def years_range(self): + """A tuple of two ints - the year of the start date and the year of the + end date.""" + return self.start.year, self.end.year + + @staticmethod + def from_years_range(start_year, end_year): + """Transform a range of years (two ints) to a DateRange object.""" + start = datetime.date(start_year, 1 , 1) + end = datetime.date(end_year, 12 , 31) + return DateRange(start, end) + + @staticmethod + def from_dict(d): + """Transform the dict to a DateRange object.""" + start = d.get('start') + end = d.get('end') + if not (start and end): + raise ValueError('DateRange must have both start and end') + start = str_to_date(start) + end = str_to_date(end) + return DateRange(start, end) + + def to_dict(self): + """Transform the date-range to a dict.""" + d = {} + d['start'] = date_to_str(self.start) + d['end'] = date_to_str(self.end) + return d + diff --git a/osrframework/thirdparties/pipl_com/lib/search.py b/osrframework/thirdparties/pipl_com/lib/search.py new file mode 100644 index 0000000..f03e76a --- /dev/null +++ b/osrframework/thirdparties/pipl_com/lib/search.py @@ -0,0 +1,618 @@ +"""Python wrapper for easily making calls to Pipl's Search API. + +Pipl's Search API allows you to query with the information you have about +a person (his name, address, email, phone, username and more) and in response +get all the data available on him on the web. + +The classes contained in this module are: +- SearchAPIRequest -- Build your request and send it. +- SearchAPIResponse -- Holds the response from the API in case it contains data. +- SearchAPIError -- An exception raised when the API response is an error. + +The classes are based on the person data-model that's implemented here in the +sub-package osrframework.thirdparties.pipl_com.lib. + +""" +import urllib +import urllib2 +import itertools +import threading + +import osrframework.thirdparties.pipl_com +from osrframework.thirdparties.pipl_com.lib.error import APIError +from osrframework.thirdparties.pipl_com.lib import * +from osrframework.thirdparties.pipl_com.lib.utils import Serializable + + +# Default API key value, you can set your key globally in this variable instead +# of passing it to each request object. +# >>> import osrframework.thirdparties.pipl_com.lib.search +# >>> osrframework.thirdparties.pipl_com.lib.search.default_api_key = '' +default_api_key = None + + +class SearchAPIRequest(object): + + """A request to Pipl's Search API. + + Building the request from the query parameters can be done in two ways: + + Option 1 - directly and quickly (for simple requests with only few + parameters): + + >>> from osrframework.thirdparties.pipl_com.lib.search import SearchAPIRequest + >>> request = SearchAPIRequest(api_key='samplekey', + email='eric@cartman.com') + >>> response = request.send() + + Option 2 - using the data-model (useful for more complex queries; for + example, when there are multiple parameters of the same type + such as few phones or a few addresses or when you'd like to use + information beyond the usual identifiers such as name or email, + information like education, job, relationships etc): + + >>> from osrframework.thirdparties.pipl_com.lib.search import SearchAPIRequest + >>> from osrframework.thirdparties.pipl_com.lib import Person, Name, Address, Job + >>> fields = [Name(first='Eric', last='Cartman'), + Address(country='US', state='CO', city='South Park'), + Address(country='US', state='NY'), + Job(title='Actor')] + >>> request = SearchAPIRequest(api_key='samplekey', + person=Person(fields=fields)) + >>> response = request.send() + + The request also supports prioritizing/filtering the type of records you + prefer to get in the response (see the append_priority_rule and + add_records_filter methods). + + Sending the request and getting the response is very simple and can be done + by either making a blocking call to request.send() or by making + a non-blocking call to request.send_async(callback) which sends the request + asynchronously. + + """ + + HEADERS = {'User-Agent': 'osrframework.thirdparties.pipl_com/python/%s' % osrframework.thirdparties.pipl_com.lib.__version__} + BASE_URL = 'http://api.pipl.com/search/v3/json/?' + # HTTPS is also supported: + #BASE_URL = 'https://api.pipl.com/search/v3/json/?' + + def __init__(self, api_key=None, first_name=None, middle_name=None, + last_name=None, raw_name=None, email=None, phone=None, + username=None, country=None, state=None, city=None, + raw_address=None, from_age=None, to_age=None, person=None, + query_params_mode='and', exact_name=False): + """Initiate a new request object with given query params. + + Each request must have at least one searchable parameter, meaning + a name (at least first and last name), email, phone or username. + Multiple query params are possible (for example querying by both email + and phone of the person). + + Args: + + api_key -- str, a valid API key (use "samplekey" for experimenting). + Note that you can set a default API key + (osrframework.thirdparties.pipl_com.lib.search.default_api_key = '') instead of + passing it to each request object. + first_name -- unicode, minimum 2 chars. + middle_name -- unicode. + last_name -- unicode, minimum 2 chars. + raw_name -- unicode, an unparsed name containing at least a first name + and a last name. + email -- unicode. + phone -- int/long. If a unicode/str is passed instead then it'll be + striped from all non-digit characters and converted to int. + IMPORTANT: Currently only US/Canada phones can be searched by + so country code is assumed to be 1, phones with different + country codes are considered invalid and will be ignored. + username -- unicode, minimum 4 chars. + country -- unicode, a 2 letter country code from: + http://en.wikipedia.org/wiki/ISO_3166-2 + state -- unicode, a state code from: + http://en.wikipedia.org/wiki/ISO_3166-2%3AUS + http://en.wikipedia.org/wiki/ISO_3166-2%3ACA + city -- unicode. + raw_address -- unicode, an unparsed address. + from_age -- int. + to_age -- int. + person -- A Person object (available at osrframework.thirdparties.pipl_com.lib.Person). + The person can contain every field allowed by the data-model + (see osrframework.thirdparties.pipl_com.lib.fields) and can hold multiple fields of + the same type (for example: two emails, three addresses etc.) + query_params_mode -- str, one of "and"/"or" (default "and"). + Advanced parameter, use only if you care about the + value of record.query_params_match in the response + records. + Each record in the response has an attribute + "query_params_match" which indicates whether the + record has the all fields from the query or not. + When set to "and" all query params are required in + order to get query_params_match=True, when set to + "or" it's enough that the record has at least one + of each field type (so if you search with a name + and two addresses, a record with the name and one + of the addresses will have query_params_match=True) + exact_name -- bool (default False). + If set to True the names in the query will be matched + "as is" without compensating for nicknames or multiple + family names. For example "Jane Brown-Smith" won't return + results for "Jane Brown" in the same way "Alexandra Pitt" + won't return results for "Alex Pitt". + + Each of the arguments that should have a unicode value accepts both + unicode objects and utf8 encoded str (will be decoded automatically). + + """ + if person is None: + person = Person() + if first_name or middle_name or last_name: + name = Name(first=first_name, middle=middle_name, last=last_name) + person.add_fields([name]) + if raw_name: + person.add_fields([Name(raw=raw_name)]) + if email: + person.add_fields([Email(address=email)]) + if phone: + if isinstance(phone, basestring): + person.add_fields([Phone.from_text(phone)]) + else: + person.add_fields([Phone(number=phone)]) + if username: + person.add_fields([Username(content=username)]) + if country or state or city: + address = Address(country=country, state=state, city=city) + person.add_fields([address]) + if raw_address: + person.add_fields([Address(raw=raw_address)]) + if from_age is not None or to_age is not None: + dob = DOB.from_age_range(from_age or 0, to_age or 1000) + person.add_fields([dob]) + + self.api_key = api_key + self.person = person + self.query_params_mode = query_params_mode + self.exact_name = exact_name + self._filter_records_by = [] + self._prioritize_records_by = [] + + @staticmethod + def _prepare_filtering_params(domain=None, category=None, + sponsored_source=None, has_field=None, + has_fields=None, query_params_match=None, + query_person_match=None, **kwargs): + """Transform the params to the API format, return a list of params.""" + if query_params_match not in (None, True): + raise ValueError('query_params_match can only be `True`') + if query_person_match not in (None, True): + raise ValueError('query_person_match can only be `True`') + + params = [] + if domain is not None: + params.append('domain:%s' % domain) + if category is not None: + Source.validate_categories([category]) + params.append('category:%s' % category) + if sponsored_source is not None: + params.append('sponsored_source:%s' % sponsored_source) + if query_params_match is not None: + params.append('query_params_match') + if query_person_match is not None: + params.append('query_person_match') + has_fields = has_fields or [] + if has_field is not None: + has_fields.append(has_field) + for has_field in has_fields: + params.append('has_field:%s' % has_field.__name__) + return params + + def add_records_filter(self, domain=None, category=None, + sponsored_source=None, has_fields=None, + query_params_match=None, query_person_match=None): + """Add a new "and" filter for the records returned in the response. + + IMPORTANT: This method can be called multiple times per request for + adding multiple "and" filters, each of these "and" filters is + interpreted as "or" with the other filters. + For example: + + >>> from osrframework.thirdparties.pipl_com.lib.search import SearchAPIRequest + >>> from osrframework.thirdparties.pipl_com.lib import Phone, Job + >>> request = SearchAPIRequest('samplekey', username='eric123') + >>> request.add_records_filter(domain='linkedin', has_fields=[Phone]) + >>> request.add_records_filter(has_fields=[Phone, Job]) + + The above request is only for records that are: + (from LinkedIn AND has a phone) OR (has a phone AND has a job). + Records that don't match this rule will not come back in the response. + + Please note that in case there are too many results for the query, + adding filters to the request can significantly improve the number of + useful results; when you define which records interest you, you'll + get records that would have otherwise be cut-off by the limit on the + number of records per query. + + Args: + + domain -- str, for example "linkedin.com", you may also use "linkedin" + but note that it'll match "linkedin.*" and "*.linkedin.*" + (any sub-domain and any TLD). + category -- str, any one of the categories defined in + osrframework.thirdparties.pipl_com.lib.source.Source.categories. + sponsored_source -- bool, True means you want just the records that + come from a sponsored source and False means you + don't want these records. + has_fields -- A list of fields classes from osrframework.thirdparties.pipl_com.lib.fields, + records must have content in all these fields. + For example: [Name, Phone] means you only want records + that has at least one name and at least one phone. + query_params_match -- True is the only possible value and it means you + want records that match all the params you passed + in the query. + query_person_match -- True is the only possible value and it means you + want records that are the same person you + queried by (only records with + query_person_match == 1.0, see the documentation + of record.query_person_match for more details). + + ValueError is raised in any case of an invalid parameter. + + """ + params = SearchAPIRequest._prepare_filtering_params(**locals()) + if params: + self._filter_records_by.append(' AND '.join(params)) + + def append_priority_rule(self, domain=None, category=None, + sponsored_source=None, has_field=None, + query_params_match=None, query_person_match=None): + """Append a new priority rule for the records returned in the response. + + IMPORTANT: This method can be called multiple times per request for + adding multiple priority rules, each call can be with only one argument + and the order of the calls matter (the first rule added is the highest + priority, the second is second priority etc). + For example: + + >>> from osrframework.thirdparties.pipl_com.lib.search import SearchAPIRequest + >>> from osrframework.thirdparties.pipl_com.lib import Phone + >>> request = SearchAPIRequest('samplekey', username='eric123') + >>> request.append_priority_rule(domain='linkedin') + >>> request.append_priority_rule(has_field=Phone) + + In the response to the above request records from LinkedIn will be + returned before records that aren't from LinkedIn and records with + phone will be returned before records without phone. + + Please note that in case there are too many results for the query, + adding priority rules to the request does not only affect the order + of the records but can significantly improve the number of useful + results; when you define which records interest you, you'll get records + that would have otherwise be cut-off by the limit on the number + of records per query. + + Args: + + domain -- str, for example "linkedin.com", "linkedin" is also possible + and it'll match "linkedin.*". + category -- str, any one of the categories defined in + osrframework.thirdparties.pipl_com.lib.source.Source.categories. + sponsored_source -- bool, True will bring the records that + come from a sponsored source first and False + will bring the non-sponsored records first. + has_fields -- A field class from osrframework.thirdparties.pipl_com.lib.fields. + For example: has_field=Phone means you want to give + a priority to records that has at least one phone. + query_params_match -- True is the only possible value and it means you + want to give a priority to records that match all + the params you passed in the query. + query_person_match -- True is the only possible value and it means you + want to give a priority to records with higher + query_person_match (see the documentation of + record.query_person_match for more details). + + ValueError is raised in any case of an invalid parameter. + + """ + params = SearchAPIRequest._prepare_filtering_params(**locals()) + if len(params) > 1: + raise ValueError('The function should be called with one argument') + if params: + self._prioritize_records_by.append(params[0]) + + def validate_query_params(self, strict=True): + """Check if the request is valid and can be sent, raise ValueError if + not. + + `strict` is a boolean argument that defaults to True which means an + exception is raised on every invalid query parameter, if set to False + an exception is raised only when the search request cannot be performed + because required query params are missing. + + """ + if not (self.api_key or default_api_key): + raise ValueError('API key is missing') + if strict and self.query_params_mode not in (None, 'and', 'or'): + raise ValueError('query_params_match should be one of "and"/"or"') + if not self.person.is_searchable: + raise ValueError('No valid name/username/phone/email in request') + if strict and self.person.unsearchable_fields: + raise ValueError('Some fields are unsearchable: %s' + % self.person.unsearchable_fields) + + @property + def url(self): + """The URL of the request (str).""" + query = { + 'key': self.api_key or default_api_key, + 'person': self.person.to_json(), + 'query_params_mode': self.query_params_mode, + 'exact_name': self.exact_name, + 'prioritize_records_by': ','.join(self._prioritize_records_by), + 'filter_records_by': self._filter_records_by, + } + return SearchAPIRequest.BASE_URL + urllib.urlencode(query, doseq=True) + + def send(self, strict_validation=True): + """Send the request and return the response or raise SearchAPIError. + + Calling this method blocks the program until the response is returned, + if you want the request to be sent asynchronously please refer to the + send_async method. + + The response is returned as a SearchAPIResponse object. + + `strict_vailidation` is a bool argument that's passed to the + validate_query_params method. + + Raises ValueError (raised from validate_query_params), + HttpError/URLError and SearchAPIError (when the response is returned + but contains an error). + + Example: + + >>> from osrframework.thirdparties.pipl_com.lib.search import SearchAPIRequest, SearchAPIError + >>> request = SearchAPIRequest('samplekey', email='eric@cartman.com') + >>> try: + ... response = request.send() + ... except SearchAPIError as e: + ... print e.http_status_code, e + + """ + self.validate_query_params(strict=strict_validation) + query = { + 'key': self.api_key or default_api_key, + 'person': self.person.to_json(), + 'query_params_mode': self.query_params_mode, + 'exact_name': self.exact_name, + 'prioritize_records_by': ','.join(self._prioritize_records_by), + 'filter_records_by': self._filter_records_by, + } + request = urllib2.Request(url=SearchAPIRequest.BASE_URL, data=urllib.urlencode(query, True), headers=SearchAPIRequest.HEADERS) + try: + json_response = urllib2.urlopen(request).read() + except urllib2.HTTPError as e: + json_error = e.read() + if not json_error: + raise e + try: + raise SearchAPIError.from_json(json_error) + except ValueError: + raise e + return SearchAPIResponse.from_json(json_response) + + def send_async(self, callback, strict_validation=True): + """Same as send() but in a non-blocking way. + + Use this method if you want to send the request asynchronously so your + program can do other things while waiting for the response. + + `callback` is a function (or other callable) with the following + signature: + callback(response=None, error=None) + + Example: + + >>> from osrframework.thirdparties.pipl_com.lib.search import SearchAPIRequest + >>> + >>> def my_callback(response=None, error=None): + ... print response or error + ... + >>> request = SearchAPIRequest('samplekey', email='eric@cartman.com') + >>> request.send_async(my_callback) + >>> do_other_things() + + """ + def target(): + try: + response = self.send(strict_validation) + callback(response=response) + except Exception as e: + callback(error=e) + threading.Thread(target=target).start() + + +class SearchAPIResponse(Serializable): + + """A response from Pipl's Search API. + + A response comprises the two things returned as a result to your query: + + - A person (osrframework.thirdparties.pipl_com.lib.containers.Person) that is the deta object + representing all the information available for the person you were + looking for. + This object will only be returned when our identity-resolution engine is + convinced that the information is of the person represented by your query. + Obviously, if the query was for "John Smith" there's no way for our + identity-resolution engine to know which of the hundreds of thousands of + people named John Smith you were referring to, therefore you can expect + that the response will not contain a person object. + On the other hand, if you search by a unique identifier such as email or + a combination of identifiers that only lead to one person, such as + "Eric Cartman, Age 22, From South Park, CO, US", you can expect to get + a response containing a single person object. + + - A list of records (osrframework.thirdparties.pipl_com.lib.containers.Record) that fully/partially + match the person from your query, if the query was for "Eric Cartman from + Colorado US" the response might also contain records of "Eric Cartman + from US" (without Colorado), if you need to differentiate between records + with full match to the query and partial match or if you want to get a + score on how likely is that record to be related to the person you are + searching please refer to the record's attributes + record.query_params_match and record.query_person_match. + + The response also contains the query as it was interpreted by Pipl. This + part is useful for verification and debugging, if some query parameters + were invalid you can see in response.query that they were ignored, you can + also see how the name/address from your query were parsed in case you + passed raw_name/raw_address in the query. + + In some cases when the query isn't focused enough and can't be matched to + a specific person, such as "John Smith from US", the response also contains + a list of suggested searches. This is a list of Record objects, each of + these is an expansion of the original query, giving additional query + parameters so the you can zoom in on the right person. + + """ + + def __init__(self, query=None, person=None, records=None, + suggested_searches=None, warnings_=None): + """Args: + + query -- A Person object with the query as interpreted by Pipl. + person -- A Person object with data about the person in the query. + records -- A list of Record objects with full/partial match to the + query. + suggested_searches -- A list of Record objects, each of these is an + expansion of the original query, giving additional + query parameters to zoom in on the right person. + warnings_ -- A list of unicodes. A warning is returned when the query + contains a non-critical error and the search can still run. + + """ + self.query = query + self.person = person + self.records = records or [] + self.suggested_searches = suggested_searches or [] + self.warnings = warnings_ or [] + + @property + def query_params_matched_records(self): + """Records that match all the params in the query.""" + return [rec for rec in self.records if rec.query_params_match] + + @property + def query_person_matched_records(self): + """Records that match the person from the query. + + Note that the meaning of "match the person from the query" means "Pipl + is convinced that these records hold data about the person you're + looking for". + Remember that when Pipl is convinced about which person you're looking + for, the response also contains a Person object. This person is + created by merging all the fields and sources of these records. + + """ + return [rec for rec in self.records if rec.query_person_match == 1.] + + def group_records(self, key_function): + """Return a dict with the records grouped by the key returned by + `key_function`. + + `key_function` takes a record and returns the value from the record to + group by (see examples in the group_records_by_* methods below). + + The return value is a dict, a key in this dict is a key returned by + `key_function` and the value is a list of all the records with this key. + + """ + sorted_records = sorted(self.records, key=key_function) + grouped_records = itertools.groupby(sorted_records, key=key_function) + return dict([(key, list(group)) for key, group in grouped_records]) + + def group_records_by_domain(self): + """Return the records grouped by the domain they came from. + + The return value is a dict, a key in this dict is a domain + and the value is a list of all the records with this domain. + + """ + key_function = lambda record: record.source.domain + return self.group_records(key_function) + + def group_records_by_category(self): + """Return the records grouped by the category of their source. + + The return value is a dict, a key in this dict is a category + and the value is a list of all the records with this category. + + """ + Source.validate_categories(categories) + key_function = lambda record: record.source.category + return self.group_records(key_function) + + def group_records_by_query_params_match(self): + """Return the records grouped by their query_params_match attribute. + + The return value is a dict, a key in this dict is a query_params_match + bool (so the keys can be just True or False) and the value is a list + of all the records with this query_params_match value. + + """ + key_function = lambda record: record.query_params_match + return self.group_records(key_function) + + def group_records_by_query_person_match(self): + """Return the records grouped by their query_person_match attribute. + + The return value is a dict, a key in this dict is a query_person_match + float and the value is a list of all the records with this + query_person_match value. + + """ + key_function = lambda record: record.query_person_match + return self.group_records(key_function) + + @staticmethod + def from_dict(d): + """Transform the dict to a response object and return the response.""" + warnings_ = d.get('warnings', []) + query = d.get('query') or None + if query: + query = Person.from_dict(query) + person = d.get('person') or None + if person: + person = Person.from_dict(person) + records = d.get('records') + if records: + records = [Record.from_dict(record) for record in records] + suggested_searches = d.get('suggested_searches') + if suggested_searches: + suggested_searches = [Record.from_dict(record) + for record in suggested_searches] + return SearchAPIResponse(query=query, person=person, records=records, + suggested_searches=suggested_searches, + warnings_=warnings_) + + def to_dict(self): + """Return a dict representation of the response.""" + d = {} + if self.warnings: + d['warnings'] = self.warnings + if self.query is not None: + d['query'] = self.query.to_dict() + if self.person is not None: + d['person'] = self.person.to_dict() + if self.records: + d['records'] = [record.to_dict() for record in self.records] + if self.suggested_searches: + d['suggested_searches'] = [record.to_dict() + for record in self.suggested_searches] + return d + + +class SearchAPIError(APIError): + + """An exception raised when the response from the search API contains an + error.""" + + pass diff --git a/osrframework/thirdparties/pipl_com/lib/source.py b/osrframework/thirdparties/pipl_com/lib/source.py new file mode 100644 index 0000000..6e93200 --- /dev/null +++ b/osrframework/thirdparties/pipl_com/lib/source.py @@ -0,0 +1,56 @@ +from osrframework.thirdparties.pipl_com.lib.fields import Field +from osrframework.thirdparties.pipl_com.lib.utils import is_valid_url + + +class Source(Field): + + """A source of data that's available in a Record/Person object. + + The source is simply the URL of the page where the data was found, for + convenience it also contains some meta-data about the data-source (like + its full name and the category it belongs to). + + Note that this class is a subclass of Field even though a source is not + exactly a data field, it's just because the functionality implemented in + Field is usefull here too. + + """ + + attributes = ('is_sponsored',) + children = ('name', 'category', 'url', 'domain') + categories = set(['background_reports', 'contact_details', + 'email_address', 'media', 'personal_profiles', + 'professional_and_business', 'public_records', + 'publications', 'school_and_classmates', 'web_pages']) + + def __init__(self, name=None, category=None, url=None, domain=None, + is_sponsored=None): + """`name`, `category`, `url` and `domain` should all be unicode or utf8 + encoded strs (will be decoded automatically). + + `is_sponsored` is a bool value that indicates whether the source is from + one of Pipl's sponsored sources. + + `category` is one of Source.categories. + + """ + Field.__init__(self) + self.name = name + self.category = category + self.url = url + self.domain = domain + self.is_sponsored = is_sponsored + + @property + def is_valid_url(self): + """A bool that indicates whether the URL is valid.""" + return bool(self.url and is_valid_url(self.url)) + + @staticmethod + def validate_categories(categories): + """Take an iterable of source categories and raise ValueError if some + of them are invalid.""" + if not set(categories) <= Source.categories: + invalid = list(set(categories) - Source.categories) + raise ValueError('Invalid categories: %s' % invalid) + diff --git a/osrframework/thirdparties/pipl_com/lib/thumbnail.py b/osrframework/thirdparties/pipl_com/lib/thumbnail.py new file mode 100644 index 0000000..0cdfa86 --- /dev/null +++ b/osrframework/thirdparties/pipl_com/lib/thumbnail.py @@ -0,0 +1,100 @@ +"""Python wrapper for Pipl's Thumbnail API. + +Pipl's thumbnail API provides a thumbnailing service for presenting images in +your application. The images can be from the results you got from our Search +API but it can also be any web URI of an image. + +The thumbnails returned by the API are in the height/width defined in the +request. Additional features of the API are: +- Detect and Zoom-in on human faces (in case there's a human face in the image). +- Optionally adding to the thumbnail the favicon of the website where the image + is from (for attribution, recommended for copyright reasons). + +This module contains only one function - generate_thumbnail_url() that can be +used for transforming an image URL into a thumbnail API URL. + +""" +import urllib + +from osrframework.thirdparties.pipl_com.lib import Image +from osrframework.thirdparties.pipl_com.lib.utils import to_utf8 + + +BASE_URL = 'http://api.pipl.com/thumbnail/v2/?' +# HTTPS is also supported: +#BASE_URL = 'https://api.pipl.com/thumbnail/v2/?' + +MAX_PIXELS = 500 + + +# Default API key value, you can set your key globally in this variable instead +# of passing it in each call to generate_thumbnail_url(). +# >>> import osrframework.thirdparties.pipl_com.lib.thumbnail +# >>> osrframework.thirdparties.pipl_com.lib.thumbnail.default_api_key = '' +default_api_key = None + + +def generate_thumbnail_url(image_url, height, width, favicon_domain=None, + zoom_face=True, api_key=None): + """Take an image URL and generate a thumbnail URL for that image. + + Args: + + image_url -- unicode (or utf8 encoded str), URL of the image you want to + thumbnail. + height -- int, requested thumbnail height in pixels, maximum 500. + width -- int, requested thumbnail width in pixels, maximum 500. + favicon_domain -- unicode (or utf8 encoded str), optional, the domain of + the website where the image came from, the favicon will + be added to the corner of the thumbnail, recommended for + copyright reasones. + IMPORTANT: Don't assume that the domain of the website is + the domain from `image_url`, it's possible that + domain1.com hosts its images on domain2.com. + zoom_face -- bool, indicates whether you want the thumbnail to zoom on the + face in the image (in case there is a face) or not. + api_key -- str, a valid API key (use "samplekey" for experimenting). + Note that you can set a default API key + (osrframework.thirdparties.pipl_com.lib.thumbnail.default_api_key = '') instead of + passing your key in each call. + + ValueError is raised in case of illegal parameters. + + Example (thumbnail URL from an image URL): + + >>> from osrframework.thirdparties.pipl_com.lib.thumbnail import generate_thumbnail_url + >>> image_url = 'http://a7.twimg.com/a/ab76f.jpg' + >>> generate_thumbnail_url(image_url, 100, 100, + favicon_domain='twitter.com', + api_key='samplekey') + 'http://api.pipl.com/thumbnail/v2/?key=samplekey& + favicon_domain=twitter.com&height=100&width=100&zoom_face=True& + image_url=http%3A%2F%2Fa7.twimg.com%2Fa%2Fab76f.jpg' + + Example (thumbnail URL from a record that came in the response of our + Search API): + + >>> from osrframework.thirdparties.pipl_com.lib.thumbnail import generate_thumbnail_url + >>> generate_thumbnail_url(record.images[0].url, 100, 100, + favicon_domain=record.source.domain, + api_key='samplekey') + 'http://api.pipl.com/thumbnail/v2/?key=samplekey& + favicon_domain=twitter.com&height=100&width=100&zoom_face=True& + image_url=http%3A%2F%2Fa7.twimg.com%2Fa%2Fab76f.jpg' + + """ + if not (api_key or default_api_key): + raise ValueError('A valid API key is required') + if not Image(url=image_url).is_valid_url: + raise ValueError('image_url is not a valid URL') + if not (0 < height <= MAX_PIXELS and 0 < width <= MAX_PIXELS): + raise ValueError('height/width must be between 0 and %d' % MAX_PIXELS) + query = { + 'key': to_utf8(api_key or default_api_key), + 'image_url': urllib.unquote(to_utf8(image_url)), + 'height': height, + 'width': width, + 'favicon_domain': to_utf8(favicon_domain or ''), + 'zoom_face': zoom_face, + } + return BASE_URL + urllib.urlencode(query) diff --git a/osrframework/thirdparties/pipl_com/lib/utils.py b/osrframework/thirdparties/pipl_com/lib/utils.py new file mode 100644 index 0000000..a7656ce --- /dev/null +++ b/osrframework/thirdparties/pipl_com/lib/utils.py @@ -0,0 +1,92 @@ +import re +import json +import datetime + + +STATES = { + u'US': {u'WA': u'Washington', u'VA': u'Virginia', u'DE': u'Delaware', u'DC': u'District Of Columbia', u'WI': u'Wisconsin', u'WV': u'West Virginia', u'HI': u'Hawaii', u'FL': u'Florida', u'YT': u'Yukon', u'WY': u'Wyoming', u'PR': u'Puerto Rico', u'NJ': u'New Jersey', u'NM': u'New Mexico', u'TX': u'Texas', u'LA': u'Louisiana', u'NC': u'North Carolina', u'ND': u'North Dakota', u'NE': u'Nebraska', u'FM': u'Federated States Of Micronesia', u'TN': u'Tennessee', u'NY': u'New York', u'PA': u'Pennsylvania', u'CT': u'Connecticut', u'RI': u'Rhode Island', u'NV': u'Nevada', u'NH': u'New Hampshire', u'GU': u'Guam', u'CO': u'Colorado', u'VI': u'Virgin Islands', u'AK': u'Alaska', u'AL': u'Alabama', u'AS': u'American Samoa', u'AR': u'Arkansas', u'VT': u'Vermont', u'IL': u'Illinois', u'GA': u'Georgia', u'IN': u'Indiana', u'IA': u'Iowa', u'MA': u'Massachusetts', u'AZ': u'Arizona', u'CA': u'California', u'ID': u'Idaho', u'PW': u'Palau', u'ME': u'Maine', u'MD': u'Maryland', u'OK': u'Oklahoma', u'OH': u'Ohio', u'UT': u'Utah', u'MO': u'Missouri', u'MN': u'Minnesota', u'MI': u'Michigan', u'MH': u'Marshall Islands', u'KS': u'Kansas', u'MT': u'Montana', u'MP': u'Northern Mariana Islands', u'MS': u'Mississippi', u'SC': u'South Carolina', u'KY': u'Kentucky', u'OR': u'Oregon', u'SD': u'South Dakota'}, + u'CA': {u'AB': u'Alberta', u'BC': u'British Columbia', u'MB': u'Manitoba', u'NB': u'New Brunswick', u'NT': u'Northwest Territories', u'NS': u'Nova Scotia', u'NU': u'Nunavut', u'ON': u'Ontario', u'PE': u'Prince Edward Island', u'QC': u'Quebec', u'SK': u'Saskatchewan', u'YU': u'Yukon', u'NL': u'Newfoundland and Labrador'}, + u'AU': {u'WA': u'State of Western Australia', u'SA': u'State of South Australia', u'NT': u'Northern Territory', u'VIC': u'State of Victoria', u'TAS': u'State of Tasmania', u'QLD': u'State of Queensland', u'NSW': u'State of New South Wales', u'ACT': u'Australian Capital Territory'}, + u'GB': {u'WLS': u'Wales', u'SCT': u'Scotland', u'NIR': u'Northern Ireland', u'ENG': u'England'}, +} +COUNTRIES = {u'BD': u'Bangladesh', u'WF': u'Wallis And Futuna Islands', u'BF': u'Burkina Faso', u'PY': u'Paraguay', u'BA': u'Bosnia And Herzegovina', u'BB': u'Barbados', u'BE': u'Belgium', u'BM': u'Bermuda', u'BN': u'Brunei Darussalam', u'BO': u'Bolivia', u'BH': u'Bahrain', u'BI': u'Burundi', u'BJ': u'Benin', u'BT': u'Bhutan', u'JM': u'Jamaica', u'BV': u'Bouvet Island', u'BW': u'Botswana', u'WS': u'Samoa', u'BR': u'Brazil', u'BS': u'Bahamas', u'JE': u'Jersey', u'BY': u'Belarus', u'BZ': u'Belize', u'RU': u'Russian Federation', u'RW': u'Rwanda', u'LT': u'Lithuania', u'RE': u'Reunion', u'TM': u'Turkmenistan', u'TJ': u'Tajikistan', u'RO': u'Romania', u'LS': u'Lesotho', u'GW': u'Guinea-bissau', u'GU': u'Guam', u'GT': u'Guatemala', u'GS': u'South Georgia And South Sandwich Islands', u'GR': u'Greece', u'GQ': u'Equatorial Guinea', u'GP': u'Guadeloupe', u'JP': u'Japan', u'GY': u'Guyana', u'GG': u'Guernsey', u'GF': u'French Guiana', u'GE': u'Georgia', u'GD': u'Grenada', u'GB': u'Great Britain', u'GA': u'Gabon', u'GN': u'Guinea', u'GM': u'Gambia', u'GL': u'Greenland', u'GI': u'Gibraltar', u'GH': u'Ghana', u'OM': u'Oman', u'TN': u'Tunisia', u'JO': u'Jordan', u'HR': u'Croatia', u'HT': u'Haiti', u'SV': u'El Salvador', u'HK': u'Hong Kong', u'HN': u'Honduras', u'HM': u'Heard And Mcdonald Islands', u'AD': u'Andorra', u'PR': u'Puerto Rico', u'PS': u'Palestine', u'PW': u'Palau', u'PT': u'Portugal', u'SJ': u'Svalbard And Jan Mayen Islands', u'VG': u'Virgin Islands, British', u'AI': u'Anguilla', u'KP': u'North Korea', u'PF': u'French Polynesia', u'PG': u'Papua New Guinea', u'PE': u'Peru', u'PK': u'Pakistan', u'PH': u'Philippines', u'PN': u'Pitcairn', u'PL': u'Poland', u'PM': u'Saint Pierre And Miquelon', u'ZM': u'Zambia', u'EH': u'Western Sahara', u'EE': u'Estonia', u'EG': u'Egypt', u'ZA': u'South Africa', u'EC': u'Ecuador', u'IT': u'Italy', u'AO': u'Angola', u'KZ': u'Kazakhstan', u'ET': u'Ethiopia', u'ZW': u'Zimbabwe', u'SA': u'Saudi Arabia', u'ES': u'Spain', u'ER': u'Eritrea', u'ME': u'Montenegro', u'MD': u'Moldova', u'MG': u'Madagascar', u'MA': u'Morocco', u'MC': u'Monaco', u'UZ': u'Uzbekistan', u'MM': u'Myanmar', u'ML': u'Mali', u'MO': u'Macau', u'MN': u'Mongolia', u'MH': u'Marshall Islands', u'US': u'United States', u'UM': u'United States Minor Outlying Islands', u'MT': u'Malta', u'MW': u'Malawi', u'MV': u'Maldives', u'MQ': u'Martinique', u'MP': u'Northern Mariana Islands', u'MS': u'Montserrat', u'NA': u'Namibia', u'IM': u'Isle Of Man', u'UG': u'Uganda', u'MY': u'Malaysia', u'MX': u'Mexico', u'IL': u'Israel', u'BG': u'Bulgaria', u'FR': u'France', u'AW': u'Aruba', u'AX': u'\xc3\x85land', u'FI': u'Finland', u'FJ': u'Fiji', u'FK': u'Falkland Islands', u'FM': u'Micronesia', u'FO': u'Faroe Islands', u'NI': u'Nicaragua', u'NL': u'Netherlands', u'NO': u'Norway', u'SO': u'Somalia', u'NC': u'New Caledonia', u'NE': u'Niger', u'NF': u'Norfolk Island', u'NG': u'Nigeria', u'NZ': u'New Zealand', u'NP': u'Nepal', u'NR': u'Nauru', u'NU': u'Niue', u'MR': u'Mauritania', u'CK': u'Cook Islands', u'CI': "C\xc3\xb4te D'ivoire", 'CH': u'Switzerland', u'CO': u'Colombia', u'CN': u'China', u'CM': u'Cameroon', u'CL': u'Chile', u'CC': u'Cocos (keeling) Islands', u'CA': u'Canada', u'CG': u'Congo (brazzaville)', u'CF': u'Central African Republic', u'CD': u'Congo (kinshasa)', u'CZ': u'Czech Republic', u'CY': u'Cyprus', u'CX': u'Christmas Island', u'CS': u'Serbia', u'CR': u'Costa Rica', u'HU': u'Hungary', u'CV': u'Cape Verde', u'CU': u'Cuba', u'SZ': u'Swaziland', u'SY': u'Syria', u'KG': u'Kyrgyzstan', u'KE': u'Kenya', u'SR': u'Suriname', u'KI': u'Kiribati', u'KH': u'Cambodia', u'KN': u'Saint Kitts And Nevis', u'KM': u'Comoros', u'ST': u'Sao Tome And Principe', u'SK': u'Slovakia', u'KR': u'South Korea', u'SI': u'Slovenia', u'SH': u'Saint Helena', u'KW': u'Kuwait', u'SN': u'Senegal', u'SM': u'San Marino', u'SL': u'Sierra Leone', u'SC': u'Seychelles', u'SB': u'Solomon Islands', u'KY': u'Cayman Islands', u'SG': u'Singapore', u'SE': u'Sweden', u'SD': u'Sudan', u'DO': u'Dominican Republic', u'DM': u'Dominica', u'DJ': u'Djibouti', u'DK': u'Denmark', u'DE': u'Germany', u'YE': u'Yemen', u'AT': u'Austria', u'DZ': u'Algeria', u'MK': u'Macedonia', u'UY': u'Uruguay', u'YT': u'Mayotte', u'MU': u'Mauritius', u'TZ': u'Tanzania', u'LC': u'Saint Lucia', u'LA': u'Laos', u'TV': u'Tuvalu', u'TW': u'Taiwan', u'TT': u'Trinidad And Tobago', u'TR': u'Turkey', u'LK': u'Sri Lanka', u'LI': u'Liechtenstein', u'LV': u'Latvia', u'TO': u'Tonga', u'TL': u'Timor-leste', u'LU': u'Luxembourg', u'LR': u'Liberia', u'TK': u'Tokelau', u'TH': u'Thailand', u'TF': u'French Southern Lands', u'TG': u'Togo', u'TD': u'Chad', u'TC': u'Turks And Caicos Islands', u'LY': u'Libya', u'VA': u'Vatican City', u'AC': u'Ascension Island', u'VC': u'Saint Vincent And The Grenadines', u'AE': u'United Arab Emirates', u'VE': u'Venezuela', u'AG': u'Antigua And Barbuda', u'AF': u'Afghanistan', u'IQ': u'Iraq', u'VI': u'Virgin Islands, U.s.', u'IS': u'Iceland', u'IR': u'Iran', u'AM': u'Armenia', u'AL': u'Albania', u'VN': u'Vietnam', u'AN': u'Netherlands Antilles', u'AQ': u'Antarctica', u'AS': u'American Samoa', u'AR': u'Argentina', u'AU': u'Australia', u'VU': u'Vanuatu', u'IO': u'British Indian Ocean Territory', u'IN': u'India', u'LB': u'Lebanon', u'AZ': u'Azerbaijan', u'IE': u'Ireland', u'ID': u'Indonesia', u'PA': u'Panama', u'UA': u'Ukraine', u'QA': u'Qatar', u'MZ': u'Mozambique'} + +TIMESTAMP_FORMAT = '%Y-%m-%dT%H:%M:%S' +DATE_FORMAT = '%Y-%m-%d' + +VALID_URL_REGEX = re.compile('^(?#Protocol)(?:(?:ht|f)tp(?:s?)\:\/\/|~\/|\/)?(?#Username:Password)(?:\w+:\w+@)?(?#Subdomains)(?:(?:[-\w]+\.)+(?#TopLevel Domains)(?:com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum|travel|[a-z]{2}))(?#Port)(?::[\d]{1,5})?(?#Directories)(?:(?:(?:\/(?:[-\w~!$+|.,=]|%[a-f\d]{2})+)+|\/)+|\?|#)?(?#Query)(?:(?:\?(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)(?:&(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)*)*(?#Anchor)(?:#(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)?$') + + + +class Serializable(object): + + """The base class of every class in the library that needs the ability to + be serialized/deserialized to/from a JSON string. + + Every inherited class must implement its own to_dict method that transforms + an object to a dict and from_dict method that transforms a dict to + an object. + + """ + + @classmethod + def from_json(cls, json_str): + """Deserialize the object from a JSON string.""" + d = json.loads(json_str) + return cls.from_dict(d) + + def to_json(self): + """Serialize the object to a JSON string.""" + d = self.to_dict() + return json.dumps(d) + + +def str_to_datetime(s): + """Transform an str object to a datetime object.""" + return datetime.datetime.strptime(s, TIMESTAMP_FORMAT) + + +def datetime_to_str(dt): + """Transform a datetime object to an str object.""" + return dt.isoformat() + + +def str_to_date(s): + """Transform an str object to a date object.""" + return datetime.datetime.strptime(s, DATE_FORMAT).date() + + +def date_to_str(d): + """Transform a date object to an str object.""" + return d.isoformat() + + +def is_valid_url(url): + """Return True if `url` (str/unicode) is a valid URL, False otherwise.""" + return bool(VALID_URL_REGEX.search(url)) + + +def alpha_chars(s): + """Strip all non alphabetic characters from the str/unicode `s`.""" + return ''.join([c for c in s if c.isalpha()]) + + +def alnum_chars(s): + """Strip all non alphanumeric characters from the str/unicode `s`.""" + return ''.join([c for c in s if c.isalnum()]) + + +def to_utf8(obj): + """Return str representation of obj, if s is a unicode object it's encoded + with utf8.""" + if isinstance(obj, unicode): + return obj.encode('utf8') + return str(obj) + + +def to_unicode(obj): + """Return unicode representation of obj, if s is an str object it's decoded + with utf8.""" + if isinstance(obj, str): + return obj.decode('utf8') + return unicode(obj) diff --git a/osrframework/thirdparties/resolvethem_com/__init__.py b/osrframework/thirdparties/resolvethem_com/__init__.py new file mode 100644 index 0000000..5b6280f --- /dev/null +++ b/osrframework/thirdparties/resolvethem_com/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This file is part of OSRFramework. +# +# OSRFramework is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import osrframework.utils.logger +# Calling the logger when being imported +osrframework.utils.logger.setupLogger(loggerName="osrframework.thirdparties.resolvethem.com") diff --git a/osrframework/thirdparties/resolvethem_com/processing.py b/osrframework/thirdparties/resolvethem_com/processing.py new file mode 100644 index 0000000..0999abb --- /dev/null +++ b/osrframework/thirdparties/resolvethem_com/processing.py @@ -0,0 +1,68 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import re +import requests +import urllib + +def checkIPFromAlias(alias=None): + ''' + Method that checks if the given alias is currently connected to Skype and returns its IP address. + + :param alias: Alias to be searched. + + :return: Python structure for the Json received. It has the following structure: + { + "type": "i3visio.ip", + "value": "1.1.1.1", + "attributes" : [] + } + ''' + headers = { + "Content-type": "text/html", + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", + "Accept-Encoding": " gzip, deflate", + "Accept-Language": " es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3", + "Connection": "keep-alive", + "DNT": "1", + "Host": "www.resolvethem.com", + "Referer": "http://www.resolvethem.com/index.php", + "User-Agent": "Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Firefox/38.0", + "Content-Length": "26", + "Content-Type": "application/x-www-form-urlencoded", + } + + req = requests.post("http://www.resolvethem.com/index.php",headers=headers,data={'skypeUsername': alias,'submit':''}) + # Data returned + data = req.content + # Compilation of the regular expression + p = re.compile("class='alert alert-success'>([0-9\.]*)<") + allMatches = p.findall(data) + if len(allMatches)> 0: + jsonData = {} + jsonData["type"]="i3visio.ip" + jsonData["value"]=allMatches[0] + jsonData["attributes"]=[] + return jsonData + return {} + + + diff --git a/osrframework/thirdparties/skype/__init__.py b/osrframework/thirdparties/skype/__init__.py new file mode 100644 index 0000000..ed92358 --- /dev/null +++ b/osrframework/thirdparties/skype/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This file is part of OSRFramework. +# +# OSRFramework is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import osrframework.utils.logger +# Calling the logger when being imported +osrframework.utils.logger.setupLogger(loggerName="osrframework.thirdparties.skype") diff --git a/osrframework/thirdparties/skype/checkInSkype.py b/osrframework/thirdparties/skype/checkInSkype.py new file mode 100644 index 0000000..6f88d89 --- /dev/null +++ b/osrframework/thirdparties/skype/checkInSkype.py @@ -0,0 +1,168 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This program is part of apify. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import codecs +import json +import os +import Skype4Py +import sys + +def checkInSkype(query=None): + ''' + Method that checks if the given email is associated to any Skype account using the Skype4Py API. + + :param query: query to be performed to verify. + + :return: a Python structure for the Json received. If nothing was found, it will return an empty dictionary. + ''' + jsonData = [] + try: + # Instantianting Skype object, all further actions are done + # using this object. + skype = Skype4Py.Skype() + + # Start Skype if it's not already running. + try: + # Checking if Skype is running... + if not skype.Client.IsRunning: + print(general.warning("[!] Skype is NOT running... Open it and try again.\n")) + # Commented to avoid messages. Users should manually open the app + #skype.Client.Start() + return jsonData + + # Set our application name. + skype.FriendlyName = 'OSRFramework - Skype' + + # Attach to Skype. This may cause Skype to open a confirmation + # dialog. + try: + # Attaching the session + skype.Attach() + + # Set up an event handler. + def new_skype_status(status): + # If Skype is closed and reopened, it informs us about it + # so we can reattach. + print(general.warning("[!] Trying to reattach the handler...")) + if status == Skype4Py.apiAttachAvailable: + skype.Attach() + skype.OnAttachmentStatus = new_skype_status + + #print "[*] We will try to perform the Skype searches now..." + try: + # Search for users and display their Skype name, full name + # and country. + + resultados = skype.SearchForUsers(query) + + #print "[*] Results found: " + str(len(resultados)) + for user in resultados: + userData = {} + + userData ["type"] = "i3visio.profile" + userData ["value"] = "Skype - " + user.Handle + userData ["attributes"] = [] + atts = {} + atts ["i3visio.platform"] = "Skype" + atts ["i3visio.search"] = query + try: + if str(user.Handle) != "": + atts ["i3visio.alias"] = str(user.Handle) + if str(user.Aliases) != "[]": + atts ["i3visio.aliases"] = str(user.Aliases) + if str(user.Homepage) != "": + atts ["i3visio.uri.homepage"] = str(user.Homepage) + if str(user.Birthday) != "None": + atts ["i3visio.birthday"] = str(user.Birthday) + if str(user.PhoneHome) != "": + atts ["i3visio.phone.home"] = str(user.PhoneHome) + if str(user.PhoneMobile) != "": + atts ["i3visio.phone.mobile"] = str(user.PhoneMobile) + if str(user.PhoneOffice) != "": + atts ["i3visio.phone.office"] = str(user.PhoneOffice) + if str(user.LastOnline) != "0.0": + atts ["i3visio.lastonline"] = str(user.LastOnline) + if str(user.OnlineStatus) != "": + atts ["i3visio.online"] = str(user.OnlineStatus) + if str(user.MoodText) != "": + atts ["i3visio.text"] = str(user.MoodText) + if str(user.FullName) != "": + atts ["i3visio.fullname"] = str(user.FullName) + if str(user.Country) != "": + atts ["i3visio.location.country"] = str(user.Country) + if str(user.Province) != "": + atts ["i3visio.location.province"] = str(user.Province) + if str(user.City) != "": + atts ["i3visio.location.city"] = str(user.City) + + except: + # Sth happened when parsing + #print "WARNING: something happened when parsing the attributes in Skype. A problem with The program will continue with the execution..." + pass + for key in atts.keys(): + aux = {} + aux["type"] = key + aux["value"] = atts[key] + aux["attributes"] = [] + userData ["attributes"].append(aux) + jsonData.append(userData) + #print "[* ] We are in checkInSkype.py: " + str(jsonData) + + except Exception as e: + print(general.warning("[!] WARNING. Something happened when performing the search in Skype.")) + print(general.warning( "[!] Exception grabbed: " + str(e))) + print + + except Exception as e: + print(general.warning( "[!] WARNING. Something happened when trying to attach OSRFramework to a valid Skype session.")) + print(general.warning( "[!] Exception grabbed: " + str(e))) + print(general.warning( "[!] Are you logged in?\n")) + + except Exception as e: + print(general.warning("[!] WARNING. Something happened when trying to create a valid Skype session.")) + print(general.warning("[!] Exception grabbed: " + str(e))) + print(general.warning("[!] This usually happens when you do NOT have any version of Skype installed in this machine.\n")) + + except Exception as e: + print(general.warning("WARNING. Something happened when trying to link to a valid Skype session.")) + print(general.warning("Exception grabbed: " + str(e))) + print(general.warning("This usually happens when you do NOT have any version of Skype logged in in this machine. Although you may omit this message, you can also fix it by: ")) + print(general.warning("\ta) Install any version of Skype and log in")) + print(general.warning("\tb) If Skype is installed, the log in window will be appearing. You will need to log in and perform the search again (or run it with '-p skype' only) to get results from Skype.")) + print(general.warning("In spite of this message, execution is going on.\n")) + + return jsonData + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='A library that wraps a search onto Skype4Py.', prog='checkInSkype.py', epilog="NOTE: you must be logged in into Skype to use this program.", add_help=False) + + # Adding the main options + # Defining the mutually exclusive group for the main options + general = parser.add_mutually_exclusive_group(required=True) + general.add_argument('-q', '--query', metavar='', action='store', help='query to be launched.') + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version='%(prog)s 0.1.0', help='shows the version of the program and exists.') + + args = parser.parse_args() + + print(general.success(json.dumps(checkInSkype(args.query), indent = 2))) diff --git a/osrframework/transforms/__init__.py b/osrframework/transforms/__init__.py new file mode 100644 index 0000000..5cfa1ba --- /dev/null +++ b/osrframework/transforms/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import osrframework.utils.logger as logger + +# Calling the logger when being imported +logger.setupLogger(loggerName="osrframework.transforms") diff --git a/osrframework/transforms/aliasToFamousPlatforms.py b/osrframework/transforms/aliasToFamousPlatforms.py new file mode 100644 index 0000000..7e85ae1 --- /dev/null +++ b/osrframework/transforms/aliasToFamousPlatforms.py @@ -0,0 +1,73 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +import sys +import json +from osrframework.transforms.lib.maltego import * +import osrframework.thirdparties.skype.checkInSkype as skype + +def aliasToSkypeAccounts(query=None): + ''' + Method that checks if a given alias appears in Skype. + + :param query: query to verify. + + ''' + me = MaltegoTransform() + + jsonData = skype.checkInSkype(query=query) + + # This returns a dictionary like: + # [{}] + + #print json.dumps(entities, indent=2) + for user in jsonData: + newEnt = me.addEntity("i3visio.profile","Skype - " +str(user["i3visio.alias"])) + aliasEnt = me.addEntity("i3visio.alias",user["i3visio.alias"]) + + newEnt.setDisplayInformation("

" + user["i3visio.alias"] +"

");# + json.dumps(user, sort_keys=True, indent=2) + "!

"); + newEnt.addAdditionalFields("i3visio.platform","i3visio.platform",True,"Skype") + for field in user.keys(): + #if field != "i3visio.alias": + # [TO-DO] Appending all the information from the json: + #if field == "i3visio.aliases": + # listAliases = [user["i3visio.alias"]] + # listAliases += user[field] + # # in this case, this is a list + # for alias in user[field]: + # aliasEnt = me.addEntity("i3visio.alias",alias.encode('utf-8')) + #elif user[field] != None: + if user[field] != None: + try: + newEnt.addAdditionalFields(field,field,True,str(user[field]).encode('utf-8')) + except: + # Something passed... + pass + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + aliasToSkypeAccounts(query=sys.argv[1]) + + diff --git a/osrframework/transforms/aliasToKnownDomains.py b/osrframework/transforms/aliasToKnownDomains.py new file mode 100644 index 0000000..b07102b --- /dev/null +++ b/osrframework/transforms/aliasToKnownDomains.py @@ -0,0 +1,57 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +import sys +import json +from osrframework.transforms.lib.maltego import * +from osrframework import domainfy + +def aliasToKnownEmails(query=None, parType="global"): + ''' + Method that checks if there exist domains for a given a alias. + + :param query: alias to verify. + + ''' + me = MaltegoTransform() + + + # Processing the options returned to remove the "all" option + tlds = [] + for typeTld in domainfy.TLD.keys(): + if typeTld == parType: + for tld in domainfy.TLD[typeTld]: + tlds.append({ "tld" : tld, "type" : typeTld }) + + domains = domainfy.createDomains(tlds, nicks = [query]) + + jsonData = domainfy.performSearch(domains) + #print json.dumps(jsonData, indent=2) + me.addListOfEntities(jsonData) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + # We avoi using additional parameters + aliasToKnownEmails(parType=sys.argv[1], query=sys.argv[2]) diff --git a/osrframework/transforms/aliasToKnownEmails.py b/osrframework/transforms/aliasToKnownEmails.py new file mode 100644 index 0000000..0f20848 --- /dev/null +++ b/osrframework/transforms/aliasToKnownEmails.py @@ -0,0 +1,47 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +import sys +import json +from osrframework.transforms.lib.maltego import * +from osrframework import mailfy + +def aliasToKnownEmails(query=None): + ''' + Method that checks if there exist emails for a given a alias. + + :param query: email to verify. + + ''' + me = MaltegoTransform() + emails = mailfy.grabEmails(nicks = [query]) + + jsonData = mailfy.performSearch(emails) + + me.addListOfEntities(jsonData) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + aliasToKnownEmails(query=sys.argv[1]) diff --git a/osrframework/transforms/aliasToSkypeAccounts.py b/osrframework/transforms/aliasToSkypeAccounts.py new file mode 100644 index 0000000..018b7f8 --- /dev/null +++ b/osrframework/transforms/aliasToSkypeAccounts.py @@ -0,0 +1,83 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +import sys +import json +from osrframework.transforms.lib.maltego import * +import osrframework.thirdparties.skype.checkInSkype as skype + +def aliasToSkypeAccounts(query=None): + ''' + Method that checks if a given alias appears in Skype. + + :param query: query to verify. + + ''' + me = MaltegoTransform() + + jsonData = skype.checkInSkype(query=query) + + # This returns a dictionary like: + # [{}] + newEntities = [] + + #print json.dumps(entities, indent=2) + for user in jsonData: + # Defining the main entity + aux ={} + aux["type"] = "i3visio.profile" + aux["value"] = "Skype - " + str(user["i3visio.alias"]) + aux["attributes"] = [] + + # Defining the attributes recovered + att ={} + att["type"] = "i3visio.platform" + att["value"] = str("Skype") + att["attributes"] = [] + aux["attributes"].append(att) + + for field in user.keys(): + # [TO-DO] Appending all the information from the json: + if user[field] != None: + try: + att ={} + att["type"] = field + att["value"] = str(user[field]).encode('utf-8') + att["attributes"] = [] + aux["attributes"].append(att) + except: + # Something passed... + pass + # Appending the entity + newEntities.append(aux) + + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + + +if __name__ == "__main__": + aliasToSkypeAccounts(query=sys.argv[1]) + + diff --git a/osrframework/transforms/aliasToSkypeIP.py b/osrframework/transforms/aliasToSkypeIP.py new file mode 100644 index 0000000..abcf21d --- /dev/null +++ b/osrframework/transforms/aliasToSkypeIP.py @@ -0,0 +1,53 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +import sys +import json +from osrframework.transforms.lib.maltego import * +import osrframework.thirdparties.resolvethem_com.processing as resolvethem_com + +def aliasToSkypeIP(query=None): + ''' + Method that checks if a given alias appears in Skype. + + :param query: query to verify. + + ''' + me = MaltegoTransform() + + jsonData = resolvethem_com.checkIPFromAlias(alias=query) + + newEntities = [] + + # Checking if something has been found + if jsonData != {}: + newEntities.append(jsonData) + + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + aliasToSkypeIP(query=sys.argv[1]) + diff --git a/osrframework/transforms/bitcoinAddressToBlockchainDetails.py b/osrframework/transforms/bitcoinAddressToBlockchainDetails.py new file mode 100644 index 0000000..0c26fc1 --- /dev/null +++ b/osrframework/transforms/bitcoinAddressToBlockchainDetails.py @@ -0,0 +1,84 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import json +import sys +import urllib2 + +from osrframework.transforms.lib.maltego import * +import osrframework.thirdparties.blockchain_info.getBitcoinAddressDetails as blockchain + +def bitcoinAddressToBlockchainDetails(bitcoinAddress=None): + ''' + Method that checks if the given bitcoinAddress is stored in the HIBP website. + + :param bitcoinAddress: bitcoinAddress to verify. + + ''' + + jsonData = blockchain.getBitcoinAddressDetails(address=bitcoinAddress) + + me = MaltegoTransform() + + newEntities = [] + + aux = {} + aux["type"] = "i3visio.bitcoin.address" + aux["value"] = bitcoinAddress + aux["attributes"] = [] + + att ={} + att["type"] = "@final_balance" + att["value"] = str(jsonData["final_balance"]) + att["attributes"] = [] + aux["attributes"].append(att) + + att ={} + att["type"] = "@number_transactions" + att["value"] = str(jsonData["n_tx"]) + att["attributes"] = [] + aux["attributes"].append(att) + + att ={} + att["type"] = "@total_received" + att["value"] = str(jsonData["total_received"]) + att["attributes"] = [] + aux["attributes"].append(att) + + att ={} + att["type"] = "@total_sent" + att["value"] = str(jsonData["total_sent"]) + att["attributes"] = [] + aux["attributes"].append(att) + + newEntities.append(aux) + + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + + +if __name__ == "__main__": + bitcoinAddressToBlockchainDetails(bitcoinAddress=sys.argv[1]) + + diff --git a/osrframework/transforms/coordinatesToGoogleMapsBrowser.py b/osrframework/transforms/coordinatesToGoogleMapsBrowser.py new file mode 100644 index 0000000..a12d8c9 --- /dev/null +++ b/osrframework/transforms/coordinatesToGoogleMapsBrowser.py @@ -0,0 +1,46 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import webbrowser as wb + +from osrframework.transforms.lib.maltego import * + +def coordinatesToGoogleMapsBrowser(coord=None): + ''' + Method that launches the URI in the default browser of the system for the Google Maps Browser. This returns no new entity. + + :param coord: uri to open. + ''' + me = MaltegoTransform() + + # Building Google Maps coordinates + uri = "https://www.google.es/maps/place/"+coord.replace(' ','') + + wb.open(uri, new=2) + + me.returnOutput() + + +if __name__ == "__main__": + coordinatesToGoogleMapsBrowser(coord=sys.argv[1]) + + diff --git a/osrframework/transforms/coordinatesToTwitterBrowser.py b/osrframework/transforms/coordinatesToTwitterBrowser.py new file mode 100644 index 0000000..62366a0 --- /dev/null +++ b/osrframework/transforms/coordinatesToTwitterBrowser.py @@ -0,0 +1,48 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import webbrowser as wb + +from osrframework.transforms.lib.maltego import * + +def coordinatesToTwitterBrowser(coord=None, proximity="20km"): + ''' + Method that launches the URI in the default browser of the system with all the tweets in a given location. This returns no new entity. + + :param coord: coordinates in which the lookup will be done. + ''' + me = MaltegoTransform() + + # Building Google Maps coordinates + coord = coord.replace(' ','') + coord = coord.replace(',','%2C') + uri = "https://twitter.com/search?q=geocode%3A"+coord+"%2C"+proximity+"&src=typd" + + wb.open(uri, new=2) + + me.returnOutput() + + +if __name__ == "__main__": + coordinatesToTwitterBrowser(coord=sys.argv[1], proximity="20km") + + diff --git a/osrframework/transforms/domainToGoogleSearchUriWithEmails.py b/osrframework/transforms/domainToGoogleSearchUriWithEmails.py new file mode 100644 index 0000000..7a482fa --- /dev/null +++ b/osrframework/transforms/domainToGoogleSearchUriWithEmails.py @@ -0,0 +1,83 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import json +import sys + +from osrframework.transforms.lib.maltego import * +import osrframework.searchengines.google as google + +def domainToGoogleSearchUriWithEmails(argv): + ''' + List of URI entities corresponding to the results of a Google Search that tries to find emails from a domain. + + :param argv: the parameters to be searched. + + :return: Nothing is returned but the code of the entities is created. + ''' + me = MaltegoTransform(argv) + + """entity = me.getVar("@serialized") + jsonData = json.loads(entity) """ + + # Recovering the Uri value + try: + domain = me.getVar("@value") + except: + domain = me.getValue() + + query = "\"*@" + domain + "\"" + + # Loading onto the Json data the information + #jsonData["attributes"] = google.processSearch(query) + newEntities = google.processSearch(query) + # This returns a dictionary like the following: + """ + [{ + 'attributes': [], + 'type': 'i3visio.uri', + 'value': 'http://foo.com' + }, { + 'attributes': [], + 'type': 'i3visio.uri', + 'value': 'http://bar.com' + }, + ... + ] + """ + me.addListOfEntities(newEntities) + #me.createAndShowListOfEntities(jsonData) + + #print json.dumps(entities, indent=2) + #for uri in uriList: + # newEnt = me.addEntity(uri["type"],uri["value"]) + # newEnt.setDisplayInformation("

" + uri["value"] +"

"+str(uri["attributes"])+"

") + # for extraAtt in uri["attributes"]: + # newEnt.addAdditionalFields(str(extraAtt['type']), str(extraAtt['type']), True, str(extraAtt['value'])) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + domainToGoogleSearchUriWithEmails(argv =sys.argv) + + diff --git a/osrframework/transforms/domainToTld.py b/osrframework/transforms/domainToTld.py new file mode 100644 index 0000000..cecf4b5 --- /dev/null +++ b/osrframework/transforms/domainToTld.py @@ -0,0 +1,62 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import json +import sys + +from osrframework.transforms.lib.maltego import * + +def domainToTld(argv=None): + ''' + Method that extract the TLD from a domain. + + :param argv: the serialized entity. + + ''' + me = MaltegoTransform(argv) + + # Recovering the domain value + try: + domain = me.getVar("@value") + except: + domain = me.getValue() + + tld = domain.split('.')[-1] + + newEntities = [] + + # Creation of a temp entity + aux = {} + aux["type"] = "i3visio.tld" + aux["value"] = tld + aux["attributes"] = [] + newEntities.append(aux) + + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + domainToTld(argv=sys.argv) + + diff --git a/osrframework/transforms/emailToAlias.py b/osrframework/transforms/emailToAlias.py new file mode 100644 index 0000000..7a2192a --- /dev/null +++ b/osrframework/transforms/emailToAlias.py @@ -0,0 +1,48 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +from osrframework.transforms.lib.maltego import * + +def emailToAlias(email=None): + ''' + Method that recovers the alias of the given email. + + :param email: email to extract the alias from. + + ''' + me = MaltegoTransform() + + aux = {} + aux["type"] = "i3visio.alias" + aux["value"] = email.split('@')[0] + aux["attributes"] = [] + + me.addListOfEntities([aux]) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + emailToAlias(email=sys.argv[1]) + + diff --git a/osrframework/transforms/emailToBreachedAccounts.py b/osrframework/transforms/emailToBreachedAccounts.py new file mode 100644 index 0000000..1aff041 --- /dev/null +++ b/osrframework/transforms/emailToBreachedAccounts.py @@ -0,0 +1,95 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import json +import sys +import urllib2 + +from osrframework.transforms.lib.maltego import * +import osrframework.thirdparties.haveibeenpwned_com.checkIfEmailWasHacked as HIBP + +def emailToBreachedAccounts(email=None): + ''' + Method that checks if the given email is stored in the HIBP website. + + :param email: email to verify. + + ''' + me = MaltegoTransform() + + jsonData = HIBP.checkIfEmailWasHacked(email=email) + + # This returns a dictionary like: + # [{"Title":"Adobe","Name":"Adobe","Domain":"adobe.com","BreachDate":"2013-10-4","AddedDate":"2013-12-04T00:12Z","PwnCount":152445165,"Description":"The big one. In October 2013, 153 million Adobe accounts were breached with each containing an internal ID, username, email, encrypted password and a password hint in plain text. The password cryptography was poorly done and many were quickly resolved back to plain text. The unencrypted hints also disclosed much about the passwords adding further to the risk that hundreds of millions of Adobe customers already faced.","DataClasses":["Email addresses","Password hints","Passwords","Usernames"]}] + + newEntities = [] + + for breach in jsonData: + # Defining the main entity + aux ={} + aux["type"] = "i3visio.breach" + aux["value"] = str(breach["Title"]) + aux["attributes"] = [] + + # Defining the attributes recovered + att ={} + att["type"] = "i3visio.domain" + att["value"] = str(breach["Domain"]) + att["attributes"] = [] + aux["attributes"].append(att) + + att ={} + att["type"] = "@added_date" + att["value"] = str(breach["AddedDate"]) + att["attributes"] = [] + aux["attributes"].append(att) + + att ={} + att["type"] = "@breach_date" + att["value"] = str(breach["BreachDate"]) + att["attributes"] = [] + aux["attributes"].append(att) + + att ={} + att["type"] = "@total_pwned" + att["value"] = str(breach["PwnCount"]) + att["attributes"] = [] + aux["attributes"].append(att) + + att ={} + att["type"] = "@description" + att["value"] = str(breach["Description"]) + att["attributes"] = [] + aux["attributes"].append(att) + + # Appending the entity + newEntities.append(aux) + + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + emailToBreachedAccounts(email=sys.argv[1]) + + diff --git a/osrframework/transforms/emailToDomain.py b/osrframework/transforms/emailToDomain.py new file mode 100644 index 0000000..90e4633 --- /dev/null +++ b/osrframework/transforms/emailToDomain.py @@ -0,0 +1,51 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import json +import sys +import urllib2 + +from osrframework.transforms.lib.maltego import * + +def emailToDomain(email=None): + ''' + Method that recovers the entity of the domain of the given mail. + + :param email: email to verify. + + ''' + me = MaltegoTransform() + + aux = {} + aux["type"] = "i3visio.domain" + aux["value"] = email.split('@')[1] + aux["attributes"] = [] + + me.addListOfEntities([aux]) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + emailToDomain(email=sys.argv[1]) + + diff --git a/osrframework/transforms/emailToSkypeAccounts.py b/osrframework/transforms/emailToSkypeAccounts.py new file mode 100644 index 0000000..fbcea73 --- /dev/null +++ b/osrframework/transforms/emailToSkypeAccounts.py @@ -0,0 +1,74 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import json +import sys + +from osrframework.transforms.lib.maltego import * +import osrframework.thirdparties.skype.checkInSkype as skype + +def emailToSkypeAccount(query=None): + ''' + Method that checks if the given email is appears in Skype. + + :param query: query to verify. + + ''' + me = MaltegoTransform() + + jsonData = skype.checkInSkype(query=query) + + # This returns a dictionary like: + # [{}] + newEntities = [] + + for user in jsonData: + # Defining the main entity + aux ={} + aux["type"] = user["type"] + aux["value"] = user["value"] + aux["attributes"] = [] + + for field in user.keys(): + # [TO-DO] Appending all the information from the json: + if user[field] != None: + try: + att ={} + att["type"] = field + att["value"] = str(user[field]).encode('utf-8') + att["attributes"] = [] + aux["attributes"].append(att) + except: + # Something passed... + pass + # Appending the entity + newEntities.append(aux) + + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + emailToSkypeAccount(query=sys.argv[1]) + + diff --git a/osrframework/transforms/expandPropertiesFromI3visioEntity.py b/osrframework/transforms/expandPropertiesFromI3visioEntity.py new file mode 100644 index 0000000..ce5ad7c --- /dev/null +++ b/osrframework/transforms/expandPropertiesFromI3visioEntity.py @@ -0,0 +1,77 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +from osrframework.transforms.lib.maltego import * +import sys +import json +import osrframework.transforms.lib.constants as constants + +def expandPropertiesFromI3visioEntity(argv): + ''' + Method that expands the properties from a given i3visio entity. It is useful to create new Entities based on the contents of the properties. + :param argv: the serialized entity. + + :return: Nothing is returned but the code of the entities is created. + ''' + me = MaltegoTransform(argv) + newEntities = [] + + try: + # Trying to recover pending entities if they exist. + # If so, it means that it is NOT the first time that this info is recovered + if str(me.getVar("@number_pending")) != "0" and me.getVar("@number_pending") != None: + entitiesToShow = me.getVar("@pending") + #print entitiesToShow + newEntities = json.loads(entitiesToShow) + me.addListOfEntities(newEntities) + else: + # We will try to expand the rest of the attributes + for field in constants.I3VISIO_FIELDS: + value = me.getVar(field) + #print field, value + + if value != None and value != " " and value != "": + aux = {} + aux["type"] = field + aux["value"] = value + aux["attributes"] = [] + newEntities.append(aux) + except: + # In case of errors, we will try to expand the rest of the attributes + for field in constants.I3VISIO_FIELDS: + value = me.getVar(field) + #print field, value + + if value != None and value != " " and value != "": + aux = {} + aux["type"] = field + aux["value"] = value + aux["attributes"] = [] + newEntities.append(aux) + me.addListOfEntities(newEntities) + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + expandPropertiesFromI3visioEntity(sys.argv) + + diff --git a/osrframework/transforms/hashToMD5crackDotCom.py b/osrframework/transforms/hashToMD5crackDotCom.py new file mode 100644 index 0000000..e6429c0 --- /dev/null +++ b/osrframework/transforms/hashToMD5crackDotCom.py @@ -0,0 +1,90 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +import json +import sys +import urllib2 + +from osrframework.transforms.lib.maltego import * +import osrframework.thirdparties.md5crack_com.checkIfHashIsCracked as md5crack + +def hashToMD5crackDotCom(argv=None): + ''' + Method that checks if the given hash is stored in the md5crack.com. + + :param argv: hash to verify. + + ''' + me = MaltegoTransform(argv) + + # Recovering the phone value + try: + query = me.getVar("@value") + except: + query = me.getValue() + + newEntities = md5crack.checkIfHashIsCracked(hash=query) + + # This returns a dictionary like: + """ + [ + { + "attributes": [ + { + "attributes": [], + "type": "i3visio.text", + "value": "DE" + } + ], + "type": "i3visio.location.country", + "value": "Germany" + }, + { + "attributes": [], + "type": "i3visio.text", + "value": "1&1 Internet AG" + }, + { + "attributes": [], + "type": "i3visio.ipv4", + "value": "217.160.129.99" + }, + { + "attributes": [], + "type": "i3visio.location.geo", + "value": "51, 9" + } + ] + """ + + # Adding the new entities + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + + +if __name__ == "__main__": + hashToMD5crackDotCom(argv=sys.argv) + + diff --git a/osrframework/transforms/ipToIp_ApiInformation.py b/osrframework/transforms/ipToIp_ApiInformation.py new file mode 100644 index 0000000..5fc4109 --- /dev/null +++ b/osrframework/transforms/ipToIp_ApiInformation.py @@ -0,0 +1,85 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +import json +import sys +import urllib2 + +from osrframework.transforms.lib.maltego import * +import osrframework.thirdparties.ip_api_com.checkIpDetails as ip_api + +def getIp_ApiInformation(argv=None): + ''' + Method that checks if the given email is stored in the md5crack.com. + + :param argv: query to be executed. Note that if the query is a domain, this will be resolved. + ''' + me = MaltegoTransform(argv) + + # Recovering the phone value + try: + query = me.getVar("@value") + except: + query = me.getValue() + + newEntities = ip_api.checkIpDetails(query=query) + """ + [ + { + "attributes": [ + { + "attributes": [], + "type": "i3visio.text", + "value": "DE" + } + ], + "type": "i3visio.location.country", + "value": "Germany" + }, + { + "attributes": [], + "type": "i3visio.text", + "value": "1&1 Internet AG" + }, + { + "attributes": [], + "type": "i3visio.ipv4", + "value": "217.160.129.99" + }, + { + "attributes": [], + "type": "i3visio.location.geo", + "value": "51, 9" + } + ] + """ + # Adding the new entities + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + getIp_ApiInformation(argv=sys.argv) + + diff --git a/osrframework/transforms/lib/TUTORIAL-MALTEGO.txt b/osrframework/transforms/lib/TUTORIAL-MALTEGO.txt new file mode 100644 index 0000000..853c644 --- /dev/null +++ b/osrframework/transforms/lib/TUTORIAL-MALTEGO.txt @@ -0,0 +1,149 @@ +So here is a small python lib for creating your own transforms, just takes out some of the hassle Smiley + +Basic Examples: (will create a Person Entity with a value of "Andrew MacPherson") + +Hello World + +This transform merely returns "hello world" as a phrase, it doesn't depend on the input entity at all +from MaltegoTransform import * +me = MaltegoTransform() +me.addEntity("maltego.Phrase","hello world"); +me.returnOutput() + +Reading Input + +This is simple transform to show reading input from an entity and returning it to the graph (in this case working with a domain and returning a phrase with that domain in it): +from MaltegoTransform import * +import sys + +domain = sys.argv[1] + +me = MaltegoTransform() +me.addEntity("maltego.Phrase","hello + domain) +me.returnOutput() + +Reading Entity Properties + +This example simply illustrates using the library to read the properties of an entity and printing them out *note* this is just a snippet, not a transform! +from MaltegoTransform import * +import sys + +me = MaltegoTransform() +me.parseArguments(sys.argv); + +longitude = me.getVar("longitude") +latitude = me.getVar("latitude") + +print longitude +print latitude + +Returning a complex entity + +This transform example shows reading an entity in as well as setting properties, additional fields, a UI message and the weight of the entity (run on a domain): +from MaltegoTransform import * +import sys + +me = MaltegoTransform() +domain = sys.argv[1] + +thisent = me.addEntity("maltego.Domain","hello " + domain) + +thisent.setType("maltego.Domain") +thisent.setValue("Complex." + domain) +thisent.setWeight(200) + +thisent.setDisplayInformation("

Heading

content here about" + domain + "!

"); +thisent.addAdditionalFields("variable","Display Value",True,domain) + +me.addUIMessage("completed!") +me.returnOutput() + + +Available Functions: + +Maltego Transform: +============== +addEntity(enType,enValue): +enType: Entity Type +enValue: Entity Value + +addEntityToMessage(maltegoEntity): +maltegoEntity: MaltegoEntity Object to be added to the outputted "message" + +addUIMessage(message,messageType="Inform"): +message: The Message to be displayed +messageType: FatalError/PartialError/Inform/Debug - note this defaults to "Inform" see documentation for additional information + +addException(exceptionString): +exceptionString: Exception message to be thrown (eg "Error! Could not connect to 10.4.0.1") + +throwExceptions(): +Simply return exception XML to the application + +returnOutput(): +Function to return all the added entities as well as the UI Messages + +writeSTDERR(msg): +Function to write msg to STDErr + +heartbeat(): +Function to produce a "heartbeat" + +progress(percent): +Function to output progress, eg MaltegoTransform.progress(20); #20% done + +debug(msg) +msg: Debug message to be sent out + + +Maltego Entity +=========== + +__init__(eT,v) +eT: Entity Type (eg. Person,IPAddress) +v: Value for this entity + +setType(type) +Setter for the entity Type property + +setValue(value) +Setter for the entity Value property + +setWeight(weight) +Setter for the entity Weight property + +setDisplayInformation(displayinformation) +Setter for the entity Display Information property + +addAdditionalFields(fieldName=None,displayName=None,matchingRule=False,value=None) +Set additional fields for the entity +fieldName: Name used on the code side, eg displayName may be "Age of Person", but the app and your transform will see it as the fieldName variable +displayName: display name of the field shown within the entity properties +matchingRule: either "strict" for strict matching on this specific field or false +value: The additional fields value + +setIconURL(iconURL) +Setter for the entity Icon URL (entity Icon) property + +returnEntity() +Prints the entity with the correct XML formatting + + + +UPDATE: +def parseArguments(self,argv): +*This function will parse the system arguments for you so that you dont have to!* +usage example: myMaltegoTransform.parseArguments(sys.argv); + +These can then be called with the following: + +def getValue(self): +*This function will return the value parameter, ie the value displayed on the graph* +usage example: theValue = myMaltegoTransform.getValue() + +def getVar(self,varName): +*This function will return the entity property value for the variable given in varName* +usage example: entityValue = myMaltegoTransform.getVar("ESSID") + + +If you have any issues feel free to contact me -- andrewmohawk@gmail.com \ No newline at end of file diff --git a/osrframework/transforms/lib/__init__.py b/osrframework/transforms/lib/__init__.py new file mode 100644 index 0000000..dd630c3 --- /dev/null +++ b/osrframework/transforms/lib/__init__.py @@ -0,0 +1,27 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify + +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import osrframework.utils.logger as logger + +# Calling the logger when being imported +logger.setupLogger(loggerName="osrframework.transforms.lib") diff --git a/osrframework/transforms/lib/configure_maltego.py b/osrframework/transforms/lib/configure_maltego.py new file mode 100644 index 0000000..1b5bfae --- /dev/null +++ b/osrframework/transforms/lib/configure_maltego.py @@ -0,0 +1,168 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import os +import zipfile +import argparse +import shutil, errno + +import osrframework +import osrframework.utils.configuration as configuration + +VERSION = "v0.11" + +def copyAnything(src="./osrframework-maltego-settings", dst=os.path.join("./", "tmp", "osrframework-maltego-settings") ): + ''' + :param src: Source folder. + :param dst: Destination folder. + ''' + # first of all trying to delete the folder + try: + shutil.rmtree(dst) + except: + pass + + try: + shutil.copytree(src, dst) + except OSError as exc: # python >2.5 + if exc.errno == errno.ENOTDIR: + shutil.copy(src, dst) + else: raise + +def setNewPath(iPath=None, dst=None): + ''' + :param iPath: The new installation path where the transforms will be searched. Concretely, the configuration folder. + :param dst: Path where the files have been copied. + ''' + pathFolder = dst + "/TransformRepositories/Local" + for file in os.listdir( pathFolder): + if file.endswith("transformsettings") or file.endswith("transform"): + cont = "" + # reading the contents of such file + with open(os.path.join(pathFolder, file), "r") as iF: + cont = iF.read() + # replacing the working directory + cont = cont.replace("", iPath) + # Writing the output + with open(os.path.join(pathFolder, file), "w") as oF: + oF.write(cont) + +def setDebugMode(dst=None, debug="false"): + ''' + :param dst: Path where the files have been copied. + :param debug: Whether the transforms will be launched in debug mode. + ''' + pathFolder = dst + "/TransformRepositories/Local" + for file in os.listdir( pathFolder): + if file.endswith("transformsettings") or file.endswith("transform"): + cont = "" + # reading the contents of such file + with open(os.path.join(pathFolder, file), "r") as iF: + cont = iF.read() + # replacing the working directory + cont = cont.replace('',''+ debug + '') + # Writing the output + with open(os.path.join(pathFolder, file), "w") as oF: + oF.write(cont) + +def zip(pathFolder=None): + ''' + Zipping a file onto a mtz file. + + :param pathFolder: Source folder or files. + ''' + filePath = "%s.mtz" % (pathFolder) + + zf = zipfile.ZipFile(filePath, "w", zipfile.ZIP_DEFLATED) + + abs_src = os.path.abspath(pathFolder) + for dirname, subdirs, files in os.walk(pathFolder): + for filename in files: + absname = os.path.abspath(os.path.join(dirname, filename)) + arcname = absname[len(abs_src) + 1:] + #print 'zipping %s as %s' % (os.path.join(dirname, filename), arcname) + zf.write(absname, arcname) + zf.close() + + # After everything, deleting the previously created folder + try: + shutil.rmtree(pathFolder) + except: + pass + + return filePath + +def configureMaltego(transformsConfigFolder=None, base=None, wFolder=None, debug=False, mainPath=os.path.expanduser('~/'), backupPath=None): + ''' + ''' + # Defining the name of the output file + settingsFile = "osrframework-maltego-settings" + "_" + VERSION + + # Defining the full path to the folder in which the configuration files will be created + dst=os.path.join("./", "tmp", settingsFile) + + # copying anything in the config folder + copyAnything(src=base, dst=dst) + + print "Configuring OSRFramework working directory for Maltego..." + # Setting the new path for + setNewPath(iPath = transformsConfigFolder, dst=dst) + + # Setting the new path for + setDebugMode(dst=dst, debug=str(debug).lower()) + + print "Building the .mtz file." + # Zipping the new configuration + filePath = zip(pathFolder=dst) + + folder, fileName = os.path.split(filePath) + + # Make copies of the file + if mainPath != None: + print "Moving the .mtz file to the following folder: " + os.path.join(mainPath, fileName) + shutil.copy2(filePath, mainPath) + + if backupPath != None: + print "Moving the .mtz file to the backup folder: " + os.path.join(backupPath, fileName) + shutil.copy2(filePath, backupPath) + + # Remove tmp files. + shutil.rmtree(os.path.join("./", "tmp")) + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='configure_maltego.py - A function to automatically generate Maltego configuration files.', prog='configure_maltego.py', epilog="", add_help=False) + # Adding the main options + # Defining the mutually exclusive group for the main options + parser.add_argument('-b', '--base', metavar='', action='store', help="name of the base folder.", required=False, default="./osrframework-maltego-settings[Base]") + parser.add_argument('-d', '--debug', action='store_true', help="storing the value of whether the transforms will be displaying a debug window when launched.", default=False, required=False) + parser.add_argument('-o', '--output', action='store_true', help="Path where the files will be copied.", default=False, required=False) + + groupAbout = parser.add_argument_group('About arguments', 'Showing additional information about this program.') + groupAbout.add_argument('-h', '--help', action='help', help='shows this help and exists.') + groupAbout.add_argument('--version', action='version', version=VERSION, help='shows the version of the program and exists.') + + args = parser.parse_args() + + # Creating the application paths + paths = configuration.getConfigPath() + + configureMaltego(transformsConfigFolder=paths["appPathTransforms"], base=args.base, debug=args.debug, mainPath=paths["appPath"], backupPath=paths["appPathDefaults"]) diff --git a/osrframework/transforms/lib/constants.py b/osrframework/transforms/lib/constants.py new file mode 100644 index 0000000..a53ef4e --- /dev/null +++ b/osrframework/transforms/lib/constants.py @@ -0,0 +1,63 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +I3VISIO_FIELDS = [ + "i3visio.alias", + "i3visio.bitcoin.address", + "i3visio.breach", + "i3visio.dni", + "i3visio.document", + "i3visio.dogecoin.address", + "i3visio.domain", + "i3visio.email", + "i3visio.file", + "i3visio.fullname", + "i3visio.hash", + "i3visio.litecoin.address", + "i3visio.location", + "i3visio.location.address", + "i3visio.location.city", + "i3visio.location.country", + "i3visio.location.postalcode", + "i3visio.location.province", + "i3visio.md5", + "i3visio.name", + "i3visio.object", + "i3visio.namecoin.address", + "i3visio.peercoin.address", + "i3visio.phone", + "i3visio.phone.home", + "i3visio.phone.mobile", + "i3visio.phone.office", + "i3visio.platform", + "i3visio.port", + "i3visio.profile", + "i3visio.protocol", + "i3visio.sha1", + "i3visio.sha256", + "i3visio.surname1", + "i3visio.surname2", + "i3visio.tag", + "i3visio.text", + "i3visio.tld", + "i3visio.uri", + ] diff --git a/osrframework/transforms/lib/maltego.py b/osrframework/transforms/lib/maltego.py new file mode 100644 index 0000000..6e82b5a --- /dev/null +++ b/osrframework/transforms/lib/maltego.py @@ -0,0 +1,372 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- + +################################################################################ +# +# Copyright 2015-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the Affero GNU General Public License +# along with this program. If not, see . +# +################################################################################ + +############################################################# +# The code is based on an unlicensed Paterva's development. # +# The only disclaimer of this code is below. # +############################################################# +# Maltego Python Local Transform Helper # +# Version 0.2 # +# # +# Local transform specification can be found at: # +# http://ctas.paterva.com/view/Specification # +# # +# For more help and other local transforms # +# try the forum or mail me: # +# # +# http://www.paterva.com/forum # +# # +# Andrew MacPherson [ andrew <> Paterva.com ] # +# # +############################################################# + +import sys +import json +import yaml + + +class MaltegoEntity(object): + value = "" + weight = 100 + displayInformation = None + additionalFields = [] + iconURL = "" + entityType = "Phrase" + + def __init__(self, eT=None, v=None): + if (eT is not None): + self.entityType = eT + if (v is not None): + self.value = sanitise(v) + self.additionalFields = [] + self.displayInformation = None + self.bookmarks = 4 + + def setType(self, eT=None): + if (eT is not None): + self.entityType = eT + + def setValue(self, eV=None): + if (eV is not None): + self.value = sanitise(eV) + + def setWeight(self, w=None): + if (w is not None): + self.weight = w + + def setDisplayInformation(self, di=None): + if (di is not None): + self.displayInformation = di + + def addAdditionalFields(self, fieldName=None, displayName=None, matchingRule=False, value=None): + self.additionalFields.append([sanitise(fieldName),sanitise(displayName),matchingRule,sanitise(value)]) + + def setIconURL(self, iU=None): + if (iU is not None): + self.iconURL = iU + + def returnEntity(self): + """Method to print the XML information that Maltego will be reading. + """ + print self.getEntityText() + + def getEntityText(self): + """Generating the Entity Type text based on the parameters of the entity. + + :return: The entity text. + """ + entityOutput = "" + entityOutput += "" + entityOutput += "" + stringify(self.value) + "" + entityOutput += "" + stringify(self.weight) + "" + if (self.displayInformation is not None): + entityOutput += "" + if (len(self.additionalFields) > 0): + entityOutput += "" + for i in range(len(self.additionalFields)): + if (stringify(self.additionalFields[i][2]) <> "strict"): + entityOutput += "" + stringify(self.additionalFields[i][3]) + "" + else: + entityOutput += "" + stringify(self.additionalFields[i][3]) + "" + entityOutput += "" + if (len(self.iconURL) > 0): + entityOutput += "" + self.iconURL + "" + entityOutput += "" + + return entityOutput + +class MaltegoTransform(object): + entities = [] + exceptions = [] + UIMessages = [] + values = {} + + def __init__(self, argv = ""): + """The initialization will automatically perform the parameter parsing. + + :param argv: Parameters passed by Maltego. + """ + values = {} + value = None + self.parseArguments(argv) + + + def parseArguments(self, argv): + try: + if (argv[1] is not None): + self.value = argv[1] + except: + # If no info was provided + self.value = self.getVar("@value") + if (len(argv) > 2): + if (argv[2] is not None): + vars = argv[2].split('#') + for x in range(0, len(vars)): + vars_values = vars[x].split('=') + if (len(vars_values) == 2): + self.values[vars_values[0]] = vars_values[1] + + def getValue(self): + if (self.value is not None): + return self.value + + + def getVar(self, varName): + if (varName in self.values.keys()): + if (self.values[varName] is not None): + return self.values[varName] + + + def getFatherEntity(self): + """Method that returns the i3visio-like entity + + :param argv: Parameters transferred, + + :return: An i3visio-like dictionary as the following: + { + "type": "i3visio.object", + "value": "example", + "attributes": [] + } + """ + try: + # Trying to load the full json object onto a new dictionary + temp = json.loads(self.getVar("@serialized")) + except: + # If the information is NOT found, it may be because the entity was created by the user... + temp = {} + # We will have to save the entity type to pass it even when + aux = self.getVar("@entity_type") + if aux != None: + temp["type"] = aux + else: + # If by any circumsntance, the @entity_type is NOT passed, we will create an i3visio.object + temp["type"] = "i3visio.object" + #return {} + temp["value"] = self.getValue() + temp["attributes"] = [] + return temp + + + def addEntity(self, enType, enValue): + values = yaml.safe_load(enValue) + + self.addUIMessage("Value: " + enValue) + + if type(values) is not list: + values = [values] + + for val in values: + self.addUIMessage("Value: " + val.decode("utf-8")) + me = MaltegoEntity(enType, val.decode("utf-8")) + self.addEntityToMessage(me) + + return self.entities[len(self.entities)-len(values):] + + + def displayNewEntity(self, ent, pendingEntities=[]): + """Method that receives an i3visio-like object and build an entity from it. + + :param ent: the dict object containing the i3visio-like entity. + :param pendingEntities: list of entities which are to be shown in future executions of the transforms. + """ + # Creating the new entities + newEnts = self.addEntity(ent["type"], ent["value"]) + + for newEnt in newEnts: + # Establishing the new value for the entity.. + newEnt.addAdditionalFields("@value", "@value", True, stringify(ent["value"])) + + # Establishing the new entity type. + newEnt.addAdditionalFields("@entity_type", "@entity_type", True, stringify(ent["type"])) + + # This field will contain the number of entities yet to be shown in the GUI + newEnt.addAdditionalFields("@number_pending", "@number_pending", True, stringify(len(pendingEntities))) + + # This field will contain the entities that have not been shown yet in the GUI in its attribute field. + newEnt.addAdditionalFields("@pending", "@pending", True, json.dumps(pendingEntities)) + + # Creating the _serialized field containing a string representation of the object. + newEnt.addAdditionalFields("@serialized", "@serialized", True, json.dumps(ent)) + + # Iterating to create the new fields based on the attributes. + for att in ent["attributes"]: + newEnt.addAdditionalFields(att["type"], att["type"], True, att["value"]) + + # Displaying the full information in the tab... + newEnt.setDisplayInformation("

" + stringify(ent["value"]) +"

" + json.dumps(ent, indent=2) + "

") + newEnt.setDisplayInformation(json.dumps(ent, indent=2)) + + + def addListOfEntities(self, newEntities): + """Method to display a series of entities in a transform. Usable when the transform is expected to recover more than one entity to capture all the results. + + :param newEntities: it is always a list containing the dicts representing the new entities to be added. + """ + # Reviewed entities + reviewedEntities =[] + # Defining a list to include the already added entities. + addedEntities = [] + + nextID = 0 + # Generating up to 11 new entities + for new in newEntities: + # Increasing the iterating factor of the NEXT entity + nextID+=1 + reviewedEntities.append(new) + # We do this to avoid processing attributes which will start with '@' + if new["value"][0] != "@": + addedEntities.append(new) + if len(addedEntities) >= 12: + # We stop, as Maltego in the Community edition does NOT show more than 12 entities per transform. THIS WILL BE CHANGED IN FUTURE VERSIONS TO LET UPDATE THE PROPERTY NUM_PNEDING OF THE CURRENT ENTITY. + self.addException("The entities to be shown is greater than 12, so not all entities can be shown in Community version.") + break + + # Creating the addedEntities + for ent in addedEntities: + self.displayNewEntity(ent) + + if len(addedEntities) <= len(newEntities): + self.addUIMessage("All the entities have been displayed!") + else: + self.addUIMessage("Ooops! Too many entities to display!") + self.addUIMessage("The following entities could not be added because of the limits in Maltego Community Edition:\n"+json.dumps(json.dumps(newEntities, indent=2))) + + # Now, we are updating some information in the father entity. To display these updates, the father entity needs to be recreated to represent these updates + # First of all, we recover the information of the transform that was called. + ####fatherEnt = self.getFatherEntity() + + # Now, we want to collect all those entities which have not been displayed. + ####pending = [ x for x in newEntities if x not in reviewedEntities ] + # These entities will be stored in the father entity which will need to be recreated to store in a new variable "@pending" + ####self.displayNewEntity(fatherEnt, pendingEntities = pending) + + + def addEntityToMessage(self, maltegoEntity): + self.entities.append(maltegoEntity) + + + def addUIMessage(self, message, messageType="Inform"): + # changed added to avoid problems when displaying messages that last more than one line + lines = message.splitlines() + for line in lines: + # we add a just to make the texts more readable + self.UIMessages.append([messageType, line.ljust(80, ".")]) + + + def addException(self, exceptionString): + self.exceptions.append(exceptionString) + + + def throwExceptions(self): + print "" + print "" + print "" + + for i in range(len(self.exceptions)): + print "" + self.exceptions[i] + "" + print "" + print "" + print "" + exit() + + + def returnOutput(self): + """Method that print the output text to let Maltego operate with it. + """ + print self.getOutput() + + + def getOutput(self): + """Returning a the Output text. + + :return : Textual output to be displayed. + """ + maltegoOutput = "" + maltegoOutput += "" + maltegoOutput += "" + + maltegoOutput += "" + for i in range(len(self.entities)): + maltegoOutput += self.entities[i].getEntityText() + maltegoOutput += "" + + maltegoOutput += "" + for i in range(len(self.UIMessages)): + maltegoOutput += "" + self.UIMessages[i][1] + "" + maltegoOutput += "" + + maltegoOutput += "" + maltegoOutput += "" + return maltegoOutput + + + def writeSTDERR(self, msg): + sys.stderr.write(stringify(msg)) + + + def heartbeat(self): + self.writeSTDERR("+") + + + def progress(self, percent): + self.writeSTDERR("%" + stringify(percent)) + + + def debug(self, msg): + self.writeSTDERR("D:" + stringify(msg)) + + +def stringify(value): + try: + return sanitise(json.dumps(value)[1:-1]) + except: + return sanitise(value) + + +def sanitise(value): + replace_these = ["&", ">", "<", '\\"', "\\"] + replace_with = ["&", ">", "<", "", ""] + tempvalue = value + for i in range(0, len(replace_these)): + tempvalue = tempvalue.replace(replace_these[i], replace_with[i]) + return tempvalue diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.alias.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.alias.entity new file mode 100644 index 0000000..cb06400 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.alias.entity @@ -0,0 +1,30 @@ + + + i3visio.text + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.bitcoin.address.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.bitcoin.address.entity new file mode 100644 index 0000000..d590b2f --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.bitcoin.address.entity @@ -0,0 +1,29 @@ + + + i3visio.text + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.breach.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.breach.entity new file mode 100644 index 0000000..b18455a --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.breach.entity @@ -0,0 +1,30 @@ + + + i3visio.object + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.dni.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.dni.entity new file mode 100644 index 0000000..811fc3c --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.dni.entity @@ -0,0 +1,29 @@ + + + i3visio.text + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.dogecoin.address.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.dogecoin.address.entity new file mode 100644 index 0000000..678ccb9 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.dogecoin.address.entity @@ -0,0 +1,29 @@ + + + i3visio.text + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.domain.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.domain.entity new file mode 100644 index 0000000..52151b2 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.domain.entity @@ -0,0 +1,29 @@ + + + i3visio.text + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.email.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.email.entity new file mode 100644 index 0000000..70e7a1f --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.email.entity @@ -0,0 +1,30 @@ + + + i3visio.object + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.file.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.file.entity new file mode 100644 index 0000000..ab36703 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.file.entity @@ -0,0 +1,30 @@ + + + i3visio.object + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.fullname.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.fullname.entity new file mode 100644 index 0000000..512a1f7 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.fullname.entity @@ -0,0 +1,29 @@ + + + i3visio.text + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.hash.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.hash.entity new file mode 100644 index 0000000..34d7822 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.hash.entity @@ -0,0 +1,30 @@ + + + i3visio.object + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.ipv4.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.ipv4.entity new file mode 100644 index 0000000..1cff8d6 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.ipv4.entity @@ -0,0 +1,30 @@ + + + i3visio.object + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.litecoin.address.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.litecoin.address.entity new file mode 100644 index 0000000..e67b1cf --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.litecoin.address.entity @@ -0,0 +1,30 @@ + + + i3visio.text + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.address.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.address.entity new file mode 100644 index 0000000..898f870 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.address.entity @@ -0,0 +1,30 @@ + + + i3visio.location + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.city.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.city.entity new file mode 100644 index 0000000..2689a06 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.city.entity @@ -0,0 +1,30 @@ + + + i3visio.location + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.country.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.country.entity new file mode 100644 index 0000000..dceac4c --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.country.entity @@ -0,0 +1,30 @@ + + + i3visio.location + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.entity new file mode 100644 index 0000000..86d5aae --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.entity @@ -0,0 +1,30 @@ + + + i3visio.text + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.geo.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.geo.entity new file mode 100644 index 0000000..b2a3137 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.geo.entity @@ -0,0 +1,30 @@ + + + i3visio.location + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.postalcode.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.postalcode.entity new file mode 100644 index 0000000..631348d --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.postalcode.entity @@ -0,0 +1,30 @@ + + + i3visio.location + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.province.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.province.entity new file mode 100644 index 0000000..0da5372 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.location.province.entity @@ -0,0 +1,30 @@ + + + i3visio.location + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.md5.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.md5.entity new file mode 100644 index 0000000..e2786b7 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.md5.entity @@ -0,0 +1,30 @@ + + + i3visio.hash + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.name.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.name.entity new file mode 100644 index 0000000..0363923 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.name.entity @@ -0,0 +1,30 @@ + + + i3visio.text + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.namecoin.address.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.namecoin.address.entity new file mode 100644 index 0000000..8655be2 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.namecoin.address.entity @@ -0,0 +1,30 @@ + + + i3visio.text + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.object.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.object.entity new file mode 100644 index 0000000..8a5c1c5 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.object.entity @@ -0,0 +1,27 @@ + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.peercoin.address.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.peercoin.address.entity new file mode 100644 index 0000000..3684438 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.peercoin.address.entity @@ -0,0 +1,30 @@ + + + i3visio.text + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.person.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.person.entity new file mode 100644 index 0000000..b6bcb9c --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.person.entity @@ -0,0 +1,68 @@ + + + i3visio.object + + + + + + + + + + + + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.phone.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.phone.entity new file mode 100644 index 0000000..e8d80c8 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.phone.entity @@ -0,0 +1,30 @@ + + + i3visio.text + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.phone.home.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.phone.home.entity new file mode 100644 index 0000000..2771e9c --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.phone.home.entity @@ -0,0 +1,30 @@ + + + i3visio.phone + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.phone.mobile.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.phone.mobile.entity new file mode 100644 index 0000000..af838c7 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.phone.mobile.entity @@ -0,0 +1,30 @@ + + + i3visio.phone + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.phone.office.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.phone.office.entity new file mode 100644 index 0000000..56db919 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.phone.office.entity @@ -0,0 +1,30 @@ + + + i3visio.phone + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.platform.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.platform.entity new file mode 100644 index 0000000..2964cd6 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.platform.entity @@ -0,0 +1,30 @@ + + + i3visio.object + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.port.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.port.entity new file mode 100644 index 0000000..89328b7 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.port.entity @@ -0,0 +1,30 @@ + + + i3visio.text + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.profile.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.profile.entity new file mode 100644 index 0000000..29fe99d --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.profile.entity @@ -0,0 +1,30 @@ + + + i3visio.object + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.protocol.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.protocol.entity new file mode 100644 index 0000000..9412f51 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.protocol.entity @@ -0,0 +1,30 @@ + + + i3visio.text + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.result.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.result.entity new file mode 100644 index 0000000..4c6be49 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.result.entity @@ -0,0 +1,30 @@ + + + i3visio.object + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.sha1.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.sha1.entity new file mode 100644 index 0000000..d7a7a21 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.sha1.entity @@ -0,0 +1,30 @@ + + + i3visio.hash + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.sha256.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.sha256.entity new file mode 100644 index 0000000..70954a9 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.sha256.entity @@ -0,0 +1,30 @@ + + + i3visio.hash + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.surname1.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.surname1.entity new file mode 100644 index 0000000..3f77bcf --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.surname1.entity @@ -0,0 +1,30 @@ + + + i3visio.text + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.surname2.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.surname2.entity new file mode 100644 index 0000000..d0ae19b --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.surname2.entity @@ -0,0 +1,30 @@ + + + i3visio.text + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.tag.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.tag.entity new file mode 100644 index 0000000..1b3c124 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.tag.entity @@ -0,0 +1,30 @@ + + + i3visio.object + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.text.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.text.entity new file mode 100644 index 0000000..e0db6fc --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.text.entity @@ -0,0 +1,30 @@ + + + i3visio.object + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.tld.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.tld.entity new file mode 100644 index 0000000..50ef23a --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.tld.entity @@ -0,0 +1,30 @@ + + + i3visio.domain + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.uri.entity b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.uri.entity new file mode 100644 index 0000000..7fffd25 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Entities/i3visio.uri.entity @@ -0,0 +1,30 @@ + + + i3visio.object + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.category b/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.category new file mode 100644 index 0000000..ebdd108 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.category @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.currencies.category b/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.currencies.category new file mode 100644 index 0000000..df4db20 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.currencies.category @@ -0,0 +1 @@ + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.hash.category b/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.hash.category new file mode 100644 index 0000000..df4db20 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.hash.category @@ -0,0 +1 @@ + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.location.category b/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.location.category new file mode 100644 index 0000000..df4db20 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.location.category @@ -0,0 +1 @@ + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.person.entity b/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.person.entity new file mode 100644 index 0000000..12b6bcd --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.person.entity @@ -0,0 +1 @@ + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.web.category b/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.web.category new file mode 100644 index 0000000..31c8dc3 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/EntityCategories/i3visio.web.category @@ -0,0 +1 @@ + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/Servers/Local.tas b/osrframework/transforms/lib/osrframework-maltego-settings/Servers/Local.tas new file mode 100644 index 0000000..a11f2c3 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/Servers/Local.tas @@ -0,0 +1,41 @@ + + 2015-1-14 7:00:00.000 CET + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToAllKnownDomains.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToAllKnownDomains.transform new file mode 100644 index 0000000..a8676d8 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToAllKnownDomains.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToAllKnownDomains.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToAllKnownDomains.transformsettings new file mode 100644 index 0000000..dab950d --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToAllKnownDomains.transformsettings @@ -0,0 +1,8 @@ + + + python + aliasToKnownDomains.py all + / + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToAllProfiles.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToAllProfiles.transform new file mode 100644 index 0000000..3621113 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToAllProfiles.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToAllProfiles.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToAllProfiles.transformsettings new file mode 100644 index 0000000..96c1f1f --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToAllProfiles.transformsettings @@ -0,0 +1,8 @@ + + + python + usufy.py -p all --maltego -T 12 -n + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToFamousPlatforms.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToFamousPlatforms.transform new file mode 100644 index 0000000..a88c51d --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToFamousPlatforms.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToFamousPlatforms.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToFamousPlatforms.transformsettings new file mode 100644 index 0000000..6d660af --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToFamousPlatforms.transformsettings @@ -0,0 +1,8 @@ + + + python + usufy.py -p badoo facebook forocoches github googleplus kali linkedin pastebin twitter youtube --maltego -T 12 -n + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToGlobalKnownDomains.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToGlobalKnownDomains.transform new file mode 100644 index 0000000..1268149 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToGlobalKnownDomains.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToGlobalKnownDomains.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToGlobalKnownDomains.transformsettings new file mode 100644 index 0000000..d780ad9 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToGlobalKnownDomains.transformsettings @@ -0,0 +1,8 @@ + + + python + aliasToKnownDomains.py global + / + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToKnownEmails.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToKnownEmails.transform new file mode 100644 index 0000000..cf86cf1 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToKnownEmails.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToKnownEmails.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToKnownEmails.transformsettings new file mode 100644 index 0000000..6be0ccb --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToKnownEmails.transformsettings @@ -0,0 +1,8 @@ + + + python + aliasToKnownEmails.py + / + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToSelectedPlatforms.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToSelectedPlatforms.transform new file mode 100644 index 0000000..85c7a55 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToSelectedPlatforms.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToSelectedPlatforms.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToSelectedPlatforms.transformsettings new file mode 100644 index 0000000..6354ed7 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToSelectedPlatforms.transformsettings @@ -0,0 +1,8 @@ + + + python + usufy.py -p INSERT_YOUR_PLATFORMS_HERE -T 12 --maltego -n + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToSkypeAccounts.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToSkypeAccounts.transform new file mode 100644 index 0000000..64bb80c --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToSkypeAccounts.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToSkypeAccounts.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToSkypeAccounts.transformsettings new file mode 100644 index 0000000..a24ac0d --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.aliasToSkypeAccounts.transformsettings @@ -0,0 +1,8 @@ + + + python + aliasToSkypeIP.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.bitcoinAddressToBlockchainDetails.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.bitcoinAddressToBlockchainDetails.transform new file mode 100644 index 0000000..81322ed --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.bitcoinAddressToBlockchainDetails.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.bitcoinAddressToBlockchainDetails.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.bitcoinAddressToBlockchainDetails.transformsettings new file mode 100644 index 0000000..10d781f --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.bitcoinAddressToBlockchainDetails.transformsettings @@ -0,0 +1,8 @@ + + + python + bitcoinAddressToBlockchainDetails.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.coordinatesToGoogleMapsBrowser.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.coordinatesToGoogleMapsBrowser.transform new file mode 100644 index 0000000..7ade562 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.coordinatesToGoogleMapsBrowser.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.coordinatesToGoogleMapsBrowser.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.coordinatesToGoogleMapsBrowser.transformsettings new file mode 100644 index 0000000..b947a16 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.coordinatesToGoogleMapsBrowser.transformsettings @@ -0,0 +1,8 @@ + + + python + coordinatesToGoogleMapsBrowser.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.coordinatesToTwitterBrowser.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.coordinatesToTwitterBrowser.transform new file mode 100644 index 0000000..a80b218 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.coordinatesToTwitterBrowser.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.coordinatesToTwitterBrowser.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.coordinatesToTwitterBrowser.transformsettings new file mode 100644 index 0000000..d8debc8 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.coordinatesToTwitterBrowser.transformsettings @@ -0,0 +1,8 @@ + + + python + coordinatesToTwitterBrowser.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToGoogleSearchUriWithEmails.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToGoogleSearchUriWithEmails.transform new file mode 100644 index 0000000..046e132 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToGoogleSearchUriWithEmails.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToGoogleSearchUriWithEmails.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToGoogleSearchUriWithEmails.transformsettings new file mode 100644 index 0000000..ceeef58 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToGoogleSearchUriWithEmails.transformsettings @@ -0,0 +1,8 @@ + + + python + domainToGoogleSearchUriWithEmails.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToIp_ApiInformation.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToIp_ApiInformation.transform new file mode 100644 index 0000000..d958dd7 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToIp_ApiInformation.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToIp_ApiInformation.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToIp_ApiInformation.transformsettings new file mode 100644 index 0000000..601e7f0 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToIp_ApiInformation.transformsettings @@ -0,0 +1,8 @@ + + + python + ipToIp_ApiInformation.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToTld.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToTld.transform new file mode 100644 index 0000000..fee47cb --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToTld.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToTld.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToTld.transformsettings new file mode 100644 index 0000000..013ef54 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.domainToTld.transformsettings @@ -0,0 +1,8 @@ + + + python + domainToTld.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToAlias.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToAlias.transform new file mode 100644 index 0000000..6044ec3 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToAlias.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToAlias.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToAlias.transformsettings new file mode 100644 index 0000000..0ca24a9 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToAlias.transformsettings @@ -0,0 +1,8 @@ + + + python + emailToAlias.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToBreachedAccounts.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToBreachedAccounts.transform new file mode 100644 index 0000000..b9f4590 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToBreachedAccounts.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToBreachedAccounts.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToBreachedAccounts.transformsettings new file mode 100644 index 0000000..b45ed08 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToBreachedAccounts.transformsettings @@ -0,0 +1,8 @@ + + + python + emailToBreachedAccounts.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToDomain.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToDomain.transform new file mode 100644 index 0000000..2092261 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToDomain.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToDomain.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToDomain.transformsettings new file mode 100644 index 0000000..f77d0b0 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToDomain.transformsettings @@ -0,0 +1,8 @@ + + + python + emailToDomain.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToSkypeAccounts.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToSkypeAccounts.transform new file mode 100644 index 0000000..dc0bf26 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToSkypeAccounts.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToSkypeAccounts.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToSkypeAccounts.transformsettings new file mode 100644 index 0000000..b6f1b48 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.emailToSkypeAccounts.transformsettings @@ -0,0 +1,8 @@ + + + python + emailToSkypeAccounts.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.expandPropertiesFromI3visioEntity.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.expandPropertiesFromI3visioEntity.transform new file mode 100644 index 0000000..8956f29 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.expandPropertiesFromI3visioEntity.transform @@ -0,0 +1,26 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.expandPropertiesFromI3visioEntity.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.expandPropertiesFromI3visioEntity.transformsettings new file mode 100644 index 0000000..3f8c272 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.expandPropertiesFromI3visioEntity.transformsettings @@ -0,0 +1,8 @@ + + + python + expandPropertiesFromI3visioEntity.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.hashToMD5crackDotCom.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.hashToMD5crackDotCom.transform new file mode 100644 index 0000000..59e8d4e --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.hashToMD5crackDotCom.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.hashToMD5crackDotCom.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.hashToMD5crackDotCom.transformsettings new file mode 100644 index 0000000..e75fe29 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.hashToMD5crackDotCom.transformsettings @@ -0,0 +1,8 @@ + + + python + hashToMD5crackDotCom.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.ipToIp_ApiInformation.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.ipToIp_ApiInformation.transform new file mode 100644 index 0000000..dc9b8ef --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.ipToIp_ApiInformation.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.ipToIp_ApiInformation.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.ipToIp_ApiInformation.transformsettings new file mode 100644 index 0000000..601e7f0 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.ipToIp_ApiInformation.transformsettings @@ -0,0 +1,8 @@ + + + python + ipToIp_ApiInformation.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.phoneToMoreInfoListspam.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.phoneToMoreInfoListspam.transform new file mode 100644 index 0000000..b271226 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.phoneToMoreInfoListspam.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.phoneToMoreInfoListspam.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.phoneToMoreInfoListspam.transformsettings new file mode 100644 index 0000000..6b114b9 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.phoneToMoreInfoListspam.transformsettings @@ -0,0 +1,8 @@ + + + python + phoneToMoreInfo.py listspam + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToAllEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToAllEntities.transform new file mode 100644 index 0000000..d209a4b --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToAllEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToAllEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToAllEntities.transformsettings new file mode 100644 index 0000000..077252c --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToAllEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + textToEntities.py all + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToBitcoinAddressEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToBitcoinAddressEntities.transform new file mode 100644 index 0000000..68a7f0d --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToBitcoinAddressEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToBitcoinAddressEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToBitcoinAddressEntities.transformsettings new file mode 100644 index 0000000..de09000 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToBitcoinAddressEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + textToEntities.py i3visio.bitcoin.address + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDeepWebSearch.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDeepWebSearch.transform new file mode 100644 index 0000000..9a61efa --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDeepWebSearch.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDeepWebSearch.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDeepWebSearch.transformsettings new file mode 100644 index 0000000..3d982ca --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDeepWebSearch.transformsettings @@ -0,0 +1,8 @@ + + + python + textToDeepWebSearch.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDniEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDniEntities.transform new file mode 100644 index 0000000..046ab50 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDniEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDniEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDniEntities.transformsettings new file mode 100644 index 0000000..250379a --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDniEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + textToEntities.py i3visio.dni + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDogecoinAddressEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDogecoinAddressEntities.transform new file mode 100644 index 0000000..def09ab --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDogecoinAddressEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDogecoinAddressEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDogecoinAddressEntities.transformsettings new file mode 100644 index 0000000..fae18c4 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToDogecoinAddressEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + textToEntities.py i3visio.dogecoin.address + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToEmailEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToEmailEntities.transform new file mode 100644 index 0000000..1659f78 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToEmailEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToEmailEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToEmailEntities.transformsettings new file mode 100644 index 0000000..2c1a620 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToEmailEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + textToEntities.py i3visio.email + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToFacebookProfiles.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToFacebookProfiles.transform new file mode 100644 index 0000000..947aae4 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToFacebookProfiles.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToFacebookProfiles.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToFacebookProfiles.transformsettings new file mode 100644 index 0000000..c358a24 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToFacebookProfiles.transformsettings @@ -0,0 +1,8 @@ + + + python + searchfy.py -p facebook --maltego -q + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToGoogleSearchUri.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToGoogleSearchUri.transform new file mode 100644 index 0000000..6945df6 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToGoogleSearchUri.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToGoogleSearchUri.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToGoogleSearchUri.transformsettings new file mode 100644 index 0000000..2bc709d --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToGoogleSearchUri.transformsettings @@ -0,0 +1,8 @@ + + + python + textToGoogleSearchUri.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToIPv4Entities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToIPv4Entities.transform new file mode 100644 index 0000000..50ebcc5 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToIPv4Entities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToIPv4Entities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToIPv4Entities.transformsettings new file mode 100644 index 0000000..13878fe --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToIPv4Entities.transformsettings @@ -0,0 +1,8 @@ + + + python + textToEntities.py i3visio.ipv4 + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToLitecoinAddressEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToLitecoinAddressEntities.transform new file mode 100644 index 0000000..07f3600 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToLitecoinAddressEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToLitecoinAddressEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToLitecoinAddressEntities.transformsettings new file mode 100644 index 0000000..9165dbc --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToLitecoinAddressEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + textToEntities.py i3visio.litecoin.address + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToMD5Entities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToMD5Entities.transform new file mode 100644 index 0000000..5af43ee --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToMD5Entities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToMD5Entities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToMD5Entities.transformsettings new file mode 100644 index 0000000..87e4d82 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToMD5Entities.transformsettings @@ -0,0 +1,8 @@ + + + python + textToEntities.py i3visio.md5 + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToNamecoinAddressEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToNamecoinAddressEntities.transform new file mode 100644 index 0000000..b8ea3b1 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToNamecoinAddressEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToNamecoinAddressEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToNamecoinAddressEntities.transformsettings new file mode 100644 index 0000000..1289df5 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToNamecoinAddressEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + textToEntities.py i3visio.namecoin.address + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPeercoinAddressEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPeercoinAddressEntities.transform new file mode 100644 index 0000000..15374e6 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPeercoinAddressEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPeercoinAddressEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPeercoinAddressEntities.transformsettings new file mode 100644 index 0000000..be6ca86 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPeercoinAddressEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + textToEntities.py i3visio.peercoin.address + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPhoneDetails.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPhoneDetails.transform new file mode 100644 index 0000000..ecdd058 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPhoneDetails.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPhoneDetails.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPhoneDetails.transformsettings new file mode 100644 index 0000000..4ec88d7 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPhoneDetails.transformsettings @@ -0,0 +1,8 @@ + + + python + phoneToPerson.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPlatformSearch.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPlatformSearch.transform new file mode 100644 index 0000000..68d01a3 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPlatformSearch.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPlatformSearch.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPlatformSearch.transformsettings new file mode 100644 index 0000000..1282582 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToPlatformSearch.transformsettings @@ -0,0 +1,8 @@ + + + python + textToPlatformSearch.py + / + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToProfiles.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToProfiles.transform new file mode 100644 index 0000000..411f75c --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToProfiles.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToProfiles.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToProfiles.transformsettings new file mode 100644 index 0000000..90612a5 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToProfiles.transformsettings @@ -0,0 +1,8 @@ + + + python + searchfy.py -p twitter --maltego -q + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSHA1Entities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSHA1Entities.transform new file mode 100644 index 0000000..273610a --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSHA1Entities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSHA1Entities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSHA1Entities.transformsettings new file mode 100644 index 0000000..97392e2 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSHA1Entities.transformsettings @@ -0,0 +1,8 @@ + + + python + textToEntities.py i3visio.sha1 + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSHA256Entities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSHA256Entities.transform new file mode 100644 index 0000000..42e8a7a --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSHA256Entities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSHA256Entities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSHA256Entities.transformsettings new file mode 100644 index 0000000..e82cc4d --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSHA256Entities.transformsettings @@ -0,0 +1,8 @@ + + + python + textToEntities.py i3visio.sha256 + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSkypeProfiles.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSkypeProfiles.transform new file mode 100644 index 0000000..e894e1a --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSkypeProfiles.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSkypeProfiles.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSkypeProfiles.transformsettings new file mode 100644 index 0000000..8dd0e13 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToSkypeProfiles.transformsettings @@ -0,0 +1,8 @@ + + + python + searchfy.py -p skype --maltego -q + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToTwitterProfiles.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToTwitterProfiles.transform new file mode 100644 index 0000000..411f75c --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToTwitterProfiles.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToTwitterProfiles.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToTwitterProfiles.transformsettings new file mode 100644 index 0000000..9f55831 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToTwitterProfiles.transformsettings @@ -0,0 +1,8 @@ + + + python + searchfy.py -p twitter --maltego -q + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToUriEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToUriEntities.transform new file mode 100644 index 0000000..0596a28 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToUriEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToUriEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToUriEntities.transformsettings new file mode 100644 index 0000000..d0a93f3 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.textToUriEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + textToEntities.py i3visio.uri + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToAllEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToAllEntities.transform new file mode 100644 index 0000000..af48832 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToAllEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToAllEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToAllEntities.transformsettings new file mode 100644 index 0000000..2895c75 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToAllEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToEntities.py all + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToBitcoinAddressEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToBitcoinAddressEntities.transform new file mode 100644 index 0000000..3960d82 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToBitcoinAddressEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToBitcoinAddressEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToBitcoinAddressEntities.transformsettings new file mode 100644 index 0000000..360ca13 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToBitcoinAddressEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToEntities.py i3visio.bitcoin.address + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToBrowser.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToBrowser.transform new file mode 100644 index 0000000..b9d94b1 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToBrowser.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToBrowser.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToBrowser.transformsettings new file mode 100644 index 0000000..ea6dac2 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToBrowser.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToBrowser.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDniEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDniEntities.transform new file mode 100644 index 0000000..e257783 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDniEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDniEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDniEntities.transformsettings new file mode 100644 index 0000000..24a1015 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDniEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToEntities.py i3visio.dni + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDogecoinAddressEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDogecoinAddressEntities.transform new file mode 100644 index 0000000..e1cd98f --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDogecoinAddressEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDogecoinAddressEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDogecoinAddressEntities.transformsettings new file mode 100644 index 0000000..216c62b --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDogecoinAddressEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToEntities.py i3visio.dogecoin.address + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDomain.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDomain.transform new file mode 100644 index 0000000..4441fd2 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDomain.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDomain.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDomain.transformsettings new file mode 100644 index 0000000..41beec0 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToDomain.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToDomain.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToEmailEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToEmailEntities.transform new file mode 100644 index 0000000..f9e43ff --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToEmailEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToEmailEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToEmailEntities.transformsettings new file mode 100644 index 0000000..1dd7609 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToEmailEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToEntities.py i3visio.email + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToGoogleCacheUri.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToGoogleCacheUri.transform new file mode 100644 index 0000000..444accf --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToGoogleCacheUri.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToGoogleCacheUri.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToGoogleCacheUri.transformsettings new file mode 100644 index 0000000..2b8c2ff --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToGoogleCacheUri.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToGoogleCacheUri.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToIPv4Entities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToIPv4Entities.transform new file mode 100644 index 0000000..74fd8fe --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToIPv4Entities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToIPv4Entities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToIPv4Entities.transformsettings new file mode 100644 index 0000000..e7fe541 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToIPv4Entities.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToEntities.py i3visio.ipv4 + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToLitecoinAddressEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToLitecoinAddressEntities.transform new file mode 100644 index 0000000..6cab655 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToLitecoinAddressEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToLitecoinAddressEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToLitecoinAddressEntities.transformsettings new file mode 100644 index 0000000..8161008 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToLitecoinAddressEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToEntities.py i3visio.litecoin.address + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToMD5Entities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToMD5Entities.transform new file mode 100644 index 0000000..a24c663 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToMD5Entities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToMD5Entities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToMD5Entities.transformsettings new file mode 100644 index 0000000..7e812da --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToMD5Entities.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToEntities.py i3visio.md5 + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToNamecoinAddressEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToNamecoinAddressEntities.transform new file mode 100644 index 0000000..f33949a --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToNamecoinAddressEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToNamecoinAddressEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToNamecoinAddressEntities.transformsettings new file mode 100644 index 0000000..00da765 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToNamecoinAddressEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToEntities.py i3visio.namecoin.address + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToPeercoinAddressEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToPeercoinAddressEntities.transform new file mode 100644 index 0000000..834d72f --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToPeercoinAddressEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToPeercoinAddressEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToPeercoinAddressEntities.transformsettings new file mode 100644 index 0000000..a654cb9 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToPeercoinAddressEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToEntities.py i3visio.peercoin.address + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToPort.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToPort.transform new file mode 100644 index 0000000..c8b2632 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToPort.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToPort.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToPort.transformsettings new file mode 100644 index 0000000..b1788d4 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToPort.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToPort.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToProtocol.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToProtocol.transform new file mode 100644 index 0000000..4e6defe --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToProtocol.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToProtocol.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToProtocol.transformsettings new file mode 100644 index 0000000..3bea85c --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToProtocol.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToProtocol.py + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToSHA1Entities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToSHA1Entities.transform new file mode 100644 index 0000000..0d1dfe5 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToSHA1Entities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToSHA1Entities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToSHA1Entities.transformsettings new file mode 100644 index 0000000..e9d2b60 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToSHA1Entities.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToEntities.py i3visio.sha1 + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToSHA256Entities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToSHA256Entities.transform new file mode 100644 index 0000000..701a176 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToSHA256Entities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToSHA256Entities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToSHA256Entities.transformsettings new file mode 100644 index 0000000..ff44767 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToSHA256Entities.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToEntities.py i3visio.sha256 + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToUriEntities.transform b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToUriEntities.transform new file mode 100644 index 0000000..f34bd92 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToUriEntities.transform @@ -0,0 +1,28 @@ + + com.paterva.maltego.transform.protocol.v2api.LocalTransformAdapterV2 + + + + + + + + + + + + + + + + 0 + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToUriEntities.transformsettings b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToUriEntities.transformsettings new file mode 100644 index 0000000..c53e6f4 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformRepositories/Local/i3visio.uriToUriEntities.transformsettings @@ -0,0 +1,8 @@ + + + python + uriToEntities.py i3visio.uri + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.cryptocurrencies.set b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.cryptocurrencies.set new file mode 100644 index 0000000..af73a92 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.cryptocurrencies.set @@ -0,0 +1,5 @@ + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.domainfy.set b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.domainfy.set new file mode 100644 index 0000000..0cf24e9 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.domainfy.set @@ -0,0 +1,7 @@ + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.entify.set b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.entify.set new file mode 100644 index 0000000..447e66d --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.entify.set @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.network.set b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.network.set new file mode 100644 index 0000000..857b664 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.network.set @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.phonespam.set b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.phonespam.set new file mode 100644 index 0000000..579ec32 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.phonespam.set @@ -0,0 +1,5 @@ + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.searchengines.set b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.searchengines.set new file mode 100644 index 0000000..b277e86 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.searchengines.set @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.searchfy.set b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.searchfy.set new file mode 100644 index 0000000..fe79b8f --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.searchfy.set @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.set b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.set new file mode 100644 index 0000000..2a6f785 --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.set @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.usufy.set b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.usufy.set new file mode 100644 index 0000000..e82707b --- /dev/null +++ b/osrframework/transforms/lib/osrframework-maltego-settings/TransformSets/i3visio.usufy.set @@ -0,0 +1,7 @@ + + + + + + + diff --git a/osrframework/transforms/phoneToMoreInfo.py b/osrframework/transforms/phoneToMoreInfo.py new file mode 100644 index 0000000..0a05ad8 --- /dev/null +++ b/osrframework/transforms/phoneToMoreInfo.py @@ -0,0 +1,116 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import json +import sys + +import osrframework.utils.platform_selection as platform_selection +import osrframework.phonefy as phonefy +#import osframework.transforms.lib.constants as constants +from osrframework.transforms.lib.maltego import * + + +def phoneToMoreInfo(argv ): + ''' + Method that obtains all the entities in a given profile. + + :param argv: the serialized entity. First parameter is always the platform and the second parameter is always the phone. + + :return: Nothing is returned but the code of the entities is created. + ''' + me = MaltegoTransform(argv) + #me.parseArguments(argv); + platform = argv[1] + platforms = platform_selection.getPlatformsByName([platform]) + + phone = argv[2] + numbers = [phone] + + # Trying to recover all the possible i3visio entities + results = phonefy.processPhoneList(platforms=platforms, numbers=numbers) + + newEntities = [] + + # Getting the first and unique object retrieved + if len(results) >0: + entities = results[0]["attributes"] + # This returns a dictionary like the following: + """ + [ + { + "attributes": [], + "type": "i3visio.location.country", + "value": "Espa\u00f1a" + }, + { + "attributes": [], + "type": "i3visio.location.province", + "value": "Sevilla" + }, + { + "attributes": [], + "type": "i3visio.text", + "value": "Por An\u00f3nimo hace 2 meses

Gentuza. se vayan mirando esto http://ccaa.elpais.com/ccaa/2013/11/ + 20/madrid/1384983847 + _570086.html" + }, + { + "attributes": [], + "type": "i3visio.text", + "value": "Por An\u00f3nimo hace 5 meses

Los mejores clientes de todas las telefonicas son los centros de ll + amadas,hay mucho dinero en juego." + } + ] + """ + + #print json.dumps(entities, indent=2) + for elem in entities: + newEntities.append(elem) + + """ + newEnt = me.addEntity(elem["type"],elem["value"]) + + otherIssues = [] + + for att in elem["attributes"]: + # This will create new entities linked to the telephone + if att["type"] == "i3visio.location.country" or att["type"] == "i3visio.location.province": + me.addEntity(att["type"],att["value"]) + if att: + otherIssues.append(att) + + newEnt.setDisplayInformation("

" + elem["value"] +"

" + json.dumps(elem["attributes"], sort_keys=True, indent=2) + "!

"); """ + + # Adding the new entities + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + + + +if __name__ == "__main__": + phoneToMoreInfo(sys.argv) + + diff --git a/osrframework/transforms/phoneToPerson.py b/osrframework/transforms/phoneToPerson.py new file mode 100644 index 0000000..4db4d18 --- /dev/null +++ b/osrframework/transforms/phoneToPerson.py @@ -0,0 +1,99 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import json +import sys + +import osrframework.thirdparties.infobel_com.checkPhoneDetails as infobel_com +from osrframework.transforms.lib.maltego import * + + +def phoneToPerson(argv ): + ''' + Method that obtains all the entities in a given profile. + + :param argv: the serialized entity. First parameter is always the platform and the second parameter is always the phone. + + :return: Nothing is returned but the code of the entities is created. + ''' + me = MaltegoTransform(argv) + + # Recovering the phone value + try: + phone = me.getVar("@value") + except: + phone = me.getValue() + + # Trying to recover all the possible i3visio entities + newEntities = infobel_com.checkPhoneDetails(phone) + # This returns a dictionary like the following: + """ + [ + { + "attributes": [ + { + "attributes": [], + "type": "i3visio.fullname", + "value": "-----" + }, + { + "attributes": [], + "type": "i3visio.location.postalcode", + "value": "-----" + }, + { + "attributes": [], + "type": "i3visio.location.city", + "value": "-----" + }, + { + "attributes": [], + "type": "i3visio.location.address", + "value": "-----" + }, + { + "attributes": [], + "type": "i3visio.uri", + "value": "-----" + }, + { + "attributes": [], + "type": "i3visio.platform", + "value": "Infobel" + } + ], + "type": "i3visio.person", + "value": "-----" + } + ] + """ + # Adding the new entities + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + + +if __name__ == "__main__": + phoneToPerson(sys.argv) + + diff --git a/osrframework/transforms/textToEntities.py b/osrframework/transforms/textToEntities.py new file mode 100644 index 0000000..d22bbd7 --- /dev/null +++ b/osrframework/transforms/textToEntities.py @@ -0,0 +1,81 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import json +import sys + + +from osrframework.transforms.lib.maltego import * +import osrframework.transforms.lib.constants as constants +#import osrframework.thirdparties.blockchain_info.getBitcoinAddressDetails as blockchain +import osrframework.entify as entify +import osrframework.utils.regexp_selection as regexp_selection + +def textToI3visioEntities(argv, platform='all'): + ''' + Method that obtains all the entities in a given i3visio.text entity. + + :param argv: the uri to be received. + :param platform: a platform string representing the regular expression to be used. + + :return: Nothing is returned but the code of the entities is created. + ''' + me = MaltegoTransform(argv) + + # Trying to recover all the possible i3visio entities + found_fields = {} + + # Getting the list of objects from entify + lRegexp = regexp_selection.getRegexpsByName([platform]) + + newEntities = entify.getEntitiesByRegexp(data=data, listRegexp = lRegexp) + # This returns a dictionary like the following: + """ + [{ + 'attributes': [], + 'type': 'i3visio.sha256', + 'value': 'a9b8c5d848205db514d4097d2b78f4528d01a79f39601e0f9c5c40ed689471' + }, { + 'attributes': [], + 'type': 'i3visio.sha256', + 'value': 'b28b896e6eeb8d651cacd5f4a4d1490fbe9d05dbc92221609350b0ce7a68e9' + }, { + 'attributes': [], + 'type': 'i3visio.sha256', + 'value': 'd727fed4d969b14b28165c75ad12d7dddd56c0198fa70cedc3fdad7ac395b2' + }, { + 'attributes': [], + 'type': 'i3visio.sha256', + 'value': '3e9a2204fcfc6f7dde250e61ca35353411880024102cba14a0bd45f05f1e74' + }] + """ + + # Adding the new entities + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + textToI3visioEntities(argv=sys.argv[2], platform = sys.argv[1]) + + diff --git a/osrframework/transforms/textToGoogleSearchUri.py b/osrframework/transforms/textToGoogleSearchUri.py new file mode 100644 index 0000000..ec4bd8a --- /dev/null +++ b/osrframework/transforms/textToGoogleSearchUri.py @@ -0,0 +1,69 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import json +import sys + +from osrframework.transforms.lib.maltego import * +import osrframework.searchengines.google as google + +def textToGoogleSearchUri(argv): + ''' + List of URI entities corresponding to the results of a Google Search. + + :param argv: the text to be searched. + + :return: Nothing is returned but the code of the entities is created. + ''' + me = MaltegoTransform(argv) + + # Recovering the text value + try: + text = me.getVar("@value") + except: + text = me.getValue() + + newEntities = google.processSearch(text) + # This returns a dictionary like the following: + """ + [{ + 'attributes': [], + 'type': 'i3visio.uri', + 'value': 'http://foo.com' + }, { + 'attributes': [], + 'type': 'i3visio.uri', + 'value': 'http://bar.com' + }, + ... + ] + """ + # Adding the new entities + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + textToGoogleSearchUri(sys.argv) + + diff --git a/osrframework/transforms/textToPlatformSearch.py b/osrframework/transforms/textToPlatformSearch.py new file mode 100644 index 0000000..6c3c191 --- /dev/null +++ b/osrframework/transforms/textToPlatformSearch.py @@ -0,0 +1,55 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +import sys +import json +from osrframework.transforms.lib.maltego import * +from osrframework import searchfy + +def textToPlatformSearch(query=None, platformNames = ["all"]): + ''' + Method that checks if there exist emails for a given a alias. + + :param query: query to be done. + :param platformNames: names of the platforms to be searched + + ''' + me = MaltegoTransform() + + jsonData = searchfy.performSearch(platformNames = platformNames, queries = [query]) + + # This returns a dictionary like: + # [{}] + + me.addListOfEntities(jsonData) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + # Grabbing the parameters + q=sys.argv[1] + #pN=sys.argv[2:] + + # Performing the search + textToPlatformSearch(query=q) #, platformNames = pN) diff --git a/osrframework/transforms/textToProfiles.py b/osrframework/transforms/textToProfiles.py new file mode 100644 index 0000000..7e85ae1 --- /dev/null +++ b/osrframework/transforms/textToProfiles.py @@ -0,0 +1,73 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +import sys +import json +from osrframework.transforms.lib.maltego import * +import osrframework.thirdparties.skype.checkInSkype as skype + +def aliasToSkypeAccounts(query=None): + ''' + Method that checks if a given alias appears in Skype. + + :param query: query to verify. + + ''' + me = MaltegoTransform() + + jsonData = skype.checkInSkype(query=query) + + # This returns a dictionary like: + # [{}] + + #print json.dumps(entities, indent=2) + for user in jsonData: + newEnt = me.addEntity("i3visio.profile","Skype - " +str(user["i3visio.alias"])) + aliasEnt = me.addEntity("i3visio.alias",user["i3visio.alias"]) + + newEnt.setDisplayInformation("

" + user["i3visio.alias"] +"

");# + json.dumps(user, sort_keys=True, indent=2) + "!

"); + newEnt.addAdditionalFields("i3visio.platform","i3visio.platform",True,"Skype") + for field in user.keys(): + #if field != "i3visio.alias": + # [TO-DO] Appending all the information from the json: + #if field == "i3visio.aliases": + # listAliases = [user["i3visio.alias"]] + # listAliases += user[field] + # # in this case, this is a list + # for alias in user[field]: + # aliasEnt = me.addEntity("i3visio.alias",alias.encode('utf-8')) + #elif user[field] != None: + if user[field] != None: + try: + newEnt.addAdditionalFields(field,field,True,str(user[field]).encode('utf-8')) + except: + # Something passed... + pass + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + aliasToSkypeAccounts(query=sys.argv[1]) + + diff --git a/osrframework/transforms/uriToBrowser.py b/osrframework/transforms/uriToBrowser.py new file mode 100644 index 0000000..53392dd --- /dev/null +++ b/osrframework/transforms/uriToBrowser.py @@ -0,0 +1,47 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import webbrowser as wb + +from osrframework.transforms.lib.maltego import * + +def uriToBrowser(uri=None): + ''' + Method that launches the URI in the default browser of the system. This returns no new entity. + + :param uri: uri to open. + ''' + me = MaltegoTransform() + + # Opening the Tor URI using onion.cab proxy + if ".onion" in uri: + wb.open(uri.replace(".onion", ".onion.cab"), new=2) + else: + wb.open(uri, new=2) + + me.returnOutput() + + +if __name__ == "__main__": + uriToBrowser(uri=sys.argv[1]) + + diff --git a/osrframework/transforms/uriToDomain.py b/osrframework/transforms/uriToDomain.py new file mode 100644 index 0000000..315caab --- /dev/null +++ b/osrframework/transforms/uriToDomain.py @@ -0,0 +1,68 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import json +import sys +import re + +from osrframework.transforms.lib.maltego import * + +def uriToDomain(argv=None): + ''' + Method that recovers the domain from a URI. + + :param argv: the serialized entity. + + ''' + me = MaltegoTransform(argv) + + # Recovering the Uri value + try: + uri = me.getVar("@value") + except: + uri = me.getValue() + + # We add a trailing '/' to the uri if there is not a trailing one + if uri.count('/') == 2: + uri+='/' + + domainRegExp = "(?:https?|s?ftp)://([a-zA-Z0-9\_\.\-]+)(?:\:|/)" + found = re.findall(domainRegExp, uri) + + newEntities = [] + + if len(found) > 0: + aux = {} + aux["type"] = "i3visio.domain" + aux["value"] = found[0] + aux["attributes"] = [] + newEntities.append(aux) + + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + uriToDomain(sys.argv) + + diff --git a/osrframework/transforms/uriToEntities.py b/osrframework/transforms/uriToEntities.py new file mode 100644 index 0000000..3161188 --- /dev/null +++ b/osrframework/transforms/uriToEntities.py @@ -0,0 +1,108 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import json +import sys + +import osrframework.utils.browser as browser + +from osrframework.transforms.lib.maltego import * +import osrframework.transforms.lib.constants as constants +#import osrframework.thirdparties.blockchain_info.getBitcoinAddressDetails as blockchain +import osrframework.entify as entify +import osrframework.utils.regexp_selection as regexp_selection + +def uriToI3visioEntities(argv, platform='all'): + ''' + Method that obtains all the entities in a given profile. + + :param argv: the uri to be received. + :param platform: a platform string representing the regular expression to be used. + + :return: Nothing is returned but the code of the entities is created. + ''' + me = MaltegoTransform(argv) + + # Recovering the Uri value + try: + uri = argv + except: + uri = me.getVar("@value") + + + #print uri + newEntities = [] + + # Defining the main entity + aux ={} + aux["type"] = "i3visio.uri" + aux["value"] = uri + aux["attributes"] = [] + newEntities.append(aux) + + # Using i3visio browser to avoid certain issues... + i3Browser = browser.Browser() + # Accessing the resources + data = i3Browser.recoverURL(uri) + + # Getting the list of objects from entify + lRegexp = regexp_selection.getRegexpsByName([platform]) + + newEntities = entify.getEntitiesByRegexp(data=data, listRegexp = lRegexp) + # This returns a dictionary like the following: + """ + [{ + 'attributes': [], + 'type': 'i3visio.sha256', + 'value': 'a9b8c5d848205db514d4097d2b78f4528d01a79f39601e0f9c5c40ed689471' + }, { + 'attributes': [], + 'type': 'i3visio.sha256', + 'value': 'b28b896e6eeb8d651cacd5f4a4d1490fbe9d05dbc92221609350b0ce7a68e9' + }, { + 'attributes': [], + 'type': 'i3visio.sha256', + 'value': 'd727fed4d969b14b28165c75ad12d7dddd56c0198fa70cedc3fdad7ac395b2' + }, { + 'attributes': [], + 'type': 'i3visio.sha256', + 'value': '3e9a2204fcfc6f7dde250e61ca35353411880024102cba14a0bd45f05f1e74' + }] + """ + # Adding list of entities to be displayed + me.addListOfEntities(newEntities) + #print json.dumps(entities, indent=2) + #for elem in entities: + # newEnt = me.addEntity(elem["type"],elem["value"]) + # newEnt.setDisplayInformation("

" + elem["value"] +"

"+str(elem["attributes"])+"

") + # for extraAtt in elem["attributes"]: + # newEnt.addAdditionalFields(str(extraAtt['type']), str(extraAtt['type']), True, str(extraAtt['value'])) + + # Returning the output text... + me.returnOutput() + + +if __name__ == "__main__": + args = sys.argv + uriToI3visioEntities(args[2], platform = args[1]) + + diff --git a/osrframework/transforms/uriToGoogleCacheUri.py b/osrframework/transforms/uriToGoogleCacheUri.py new file mode 100644 index 0000000..89efb8f --- /dev/null +++ b/osrframework/transforms/uriToGoogleCacheUri.py @@ -0,0 +1,67 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import json +import sys +import re + +from osrframework.transforms.lib.maltego import * + +def uriToGoogleCacheUri(argv=None): + ''' + Method that recovers the domain from a URI. + + :param argv: the serialized entity. + + ''' + me = MaltegoTransform(argv) + + # Recovering the Uri value + try: + uri = me.getVar("@value") + except: + uri = me.getValue() + + # We add a trailing '/' to the uri if there is not a trailing one + if uri.count('/') == 2: + uri+='/' + + newEntities = [] + + # Google Cache Base URI + baseCacheURI = "http://webcache.googleusercontent.com/search?q=cache:" + + aux = {} + aux["type"] = "i3visio.uri" + aux["value"] = baseCacheURI + uri + aux["attributes"] = [] + newEntities.append(aux) + + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + uriToGoogleCacheUri(sys.argv) + + diff --git a/osrframework/transforms/uriToPort.py b/osrframework/transforms/uriToPort.py new file mode 100644 index 0000000..564dc18 --- /dev/null +++ b/osrframework/transforms/uriToPort.py @@ -0,0 +1,68 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import json +import sys +import re + +from osrframework.transforms.lib.maltego import * + +def uriToPort(argv=None): + ''' + Method that recovers the port from a URI. + + :param argv: the serialized entity. + + ''' + me = MaltegoTransform(argv) + + # Recovering the Uri value + try: + uri = me.getVar("@value") + except: + uri = me.getValue() + + # We add a trailing '/' to the uri if there is not a trailing one + if uri.count('/') == 2: + uri+='/' + + portRegExp = "(?:https?|s?ftp)://[a-zA-Z0-9\_\.\-]+:([0-9]{1,5})/" + found = re.findall(portRegExp, uri) + + newEntities = [] + + if len(found) > 0: + aux = {} + aux["type"] = "i3visio.port" + aux["value"] = found[0] + aux["attributes"] = [] + newEntities.append(aux) + + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + uriToPort(sys.argv) + + diff --git a/osrframework/transforms/uriToProtocol.py b/osrframework/transforms/uriToProtocol.py new file mode 100644 index 0000000..6f39175 --- /dev/null +++ b/osrframework/transforms/uriToProtocol.py @@ -0,0 +1,68 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import json +import sys +import re + +from osrframework.transforms.lib.maltego import * + +def uriToProtocol(argv=None): + ''' + Method that recovers the protocol from a URI. + + :param argv: the serialized entity. + + ''' + me = MaltegoTransform(argv) + + # Recovering the Uri value + try: + uri = me.getVar("@value") + except: + uri = me.getValue() + + # We add a trailing '/' to the uri if there is not a trailing one + if uri.count('/') == 2: + uri+='/' + + protocolRegExp = "((?:https?|s?ftp|file))://" + found = re.findall(protocolRegExp, uri) + + newEntities = [] + + if len(found) > 0: + aux = {} + aux["type"] = "i3visio.protocol" + aux["value"] = found[0] + aux["attributes"] = [] + newEntities.append(aux) + + me.addListOfEntities(newEntities) + + # Returning the output text... + me.returnOutput() + +if __name__ == "__main__": + uriToProtocol(sys.argv) + + diff --git a/osrframework/usufy.py b/osrframework/usufy.py new file mode 100644 index 0000000..b56f6b9 --- /dev/null +++ b/osrframework/usufy.py @@ -0,0 +1,636 @@ +#!/usr/bin/env python2 +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2014-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +__author__ = "Felix Brezo, Yaiza Rubio " +__copyright__ = "Copyright 2014-2017, i3visio" +__credits__ = ["Felix Brezo", "Yaiza Rubio"] +__license__ = "AGPLv3+" +__version__ = "v6.0" +__maintainer__ = "Felix Brezo, Yaiza Rubio" +__email__ = "contacto@i3visio.com" + + +import argparse +import colorama +import datetime as dt +import json +import logging +import os +# Preparing to capture interruptions smoothly +import signal +import traceback + +colorama.init(autoreset=True) + +# global issues for multiprocessing +from multiprocessing import Process, Queue, Pool + +# configuration and utils +import osrframework.utils.platform_selection as platform_selection +import osrframework.utils.configuration as configuration +import osrframework.utils.banner as banner +import osrframework.utils.benchmark as benchmark +import osrframework.utils.browser as browser +import osrframework.utils.general as general + +from osrframework.utils.general import error, warning, success, info, title, emphasis + +# logging imports +import osrframework.utils.logger + + +def fuzzUsufy(fDomains = None, fFuzzStruct = None): + """ + Method to guess the usufy path against a list of domains or subdomains. + + Args: + ----- + fDomains: A list to strings containing the domains and (optionally) a + nick. + fFuzzStruct: A list to strings containing the transforms to be + performed. + + Returns: + -------- + dict: A dictionary of the form of `{"domain": "url"}`. + """ + logger = logging.getLogger("osrframework.usufy") + + if fFuzzStruct == None: + # Loading these structures by default + fuzzingStructures = [ + "http:///", + "http:///~", + "http:///?action=profile;user=", + "http:///causes/author/", + "http:///channel/", + "http:///community/profile/", + "http:///component/comprofiler/userprofiler/", + "http:///details/@", + "http:///foros/member.php?username=", + "http:///forum/member/", + "http:///forum/member.php?username=", + "http:///forum/profile.php?mode=viewprofile&u=", + "http:///home/", + "http:///index.php?action=profile;user=", + "http:///member_profile.php?u=", + "http:///member.php?username=", + "http:///members/?username=", + "http:///members/", + "http:///members/view/", + "http:///mi-espacio/", + "http:///u", + "http:///u/", + "http:///user-", + "http:///user/", + "http:///user/.html", + "http:///users/", + "http:///usr/", + "http:///usuario/", + "http:///usuarios/", + "http:///en/users/", + "http:///people/", + "http:///profil/", + "http:///profile/", + "http:///profile/page/", + "http:///rapidforum/index.php?action=profile;user=", + "http:///social/usuarios/", + "http://.", + "http://./user/" + ] + else: + try: + fuzzingStructures = fFuzzStruct.read().splitlines() + except: + logger.error("Usufy could NOT open the following file: " + fFuzzStruct ) + + res = {} + + lines = fDomains.read().splitlines() + + # Going through all the lines + for l in lines: + domain = l.split()[0] + print("Performing tests for" + domain + "...") + + # selecting the number of nicks to be tested in this domain + nick = l.split()[1] + + # Choosing the errors from the input file + #errors = l.split('\t')[2:] + + # possibleURLs found + possibleURL = [] + + for struct in fuzzingStructures: + # initiating list + urlToTry = struct.replace("", domain) + test = urlToTry.replace("", nick.lower()) + print("Processing "+ test + "...") + i3Browser = browser.Browser() + try: + html = i3Browser.recoverURL(test) + if nick in html: + possibleURL.append(test) + print(general.success("\tPossible usufy found!!!\n")) + except: + logger.error("The resource could not be downloaded.") + + res[domain] = possibleURL + + print(json.dumps(res, indent = 2)) + return res + + +def getPageWrapper(p, nick, rutaDescarga, avoidProcessing = True, avoidDownload = True, outQueue=None): + """ + Method that wraps the call to the getInfo. Before it was getUserPage. + + Args: + ----- + pName: Platform where the information is stored. It is a string. + nick: Nick to be searched. + rutaDescarga: Local file where saving the obtained information. + avoidProcessing: Boolean var that defines whether the profiles will NOT + be processed (stored in this version). + avoidDownload: Boolean var that defines whether the profiles will NOT be + downloaded (stored in this version). + outQueue: Queue where the information will be stored. + maltego: Parameter to tell usufy.py that he has been invoked by Malego. + + Returns: + -------- + None if a queue is provided. Note that the values will be stored in the + outQueue or a dictionary is returned. + """ + logger = logging.getLogger("osrframework.usufy") + + logger.debug("\tLooking for profiles in " + str(p) + "...") + #res = p.getUserPage(nick, rutaDescarga, avoidProcessing = avoidProcessing, avoidDownload = avoidDownload) + try: + res = p.getInfo(query=nick, mode="usufy", process=True)#rutaDescarga, avoidProcessing = avoidProcessing, avoidDownload = avoidDownload) + + if res != []: + if outQueue != None: + # Storing in the output queue the values + outQueue.put((res)) + else: + # If no queue was given, return the value normally + return res + else: + logger.debug("\t" + str(p) +" - User profile not found...") + return [] + except: + print(general.error("ERROR: something happened when processing " + str(p) +". You may like to deactivate this wrapper if the error persist.")) + return [] + + +def pool_function(p, nick, rutaDescarga, avoidProcessing = True, avoidDownload = True, outQueue=None): + """ + Wrapper for being able to launch all the threads of getPageWrapper. + + Args: + ----- + args: We receive the parameters for getPageWrapper as a tuple. + """ + try: + res = getPageWrapper(p, nick, rutaDescarga, avoidProcessing, avoidDownload, outQueue) + return {"platform" : str(p), "status": "DONE", "data": res} + except Exception as e: + print(general.error("\tERROR: " + str(p))) + return {"platform" : str(p), "status": "ERROR", "data": []} + + +def processNickList(nicks, platforms=None, rutaDescarga="./", avoidProcessing=True, avoidDownload=True, nThreads=12, maltego=False, verbosity=1, logFolder="./logs"): + """ + Process a list of nicks to check whether they exist. + + This method receives as a parameter a series of nicks and verifies whether + those nicks have a profile associated in different social networks. + + Args: + ----- + nicks: List of nicks to process. + platforms: List of objects to be processed. + rutaDescarga: Local file where saving the obtained information. + avoidProcessing: A boolean var that defines whether the profiles will + NOT be processed. + avoidDownload: A boolean var that defines whether the profiles will NOT + be downloaded. + maltego: A parameter to tell usufy.py that he has been invoked by Malego. + verbosity: The level of verbosity to be used. + logFolder: The path to the log folder. + + Returns: + -------- + A dictionary where the key is the nick and the value another dictionary + where the keys are the social networks and the value is the + corresponding URL. + """ + osrframework.utils.logger.setupLogger(loggerName="osrframework.usufy", verbosity=verbosity, logFolder=logFolder) + logger = logging.getLogger("osrframework.usufy") + + if platforms == None: + platforms = platform_selection.getAllPlatformNames("usufy") + + # Defining the output results variable + res = [] + # Processing the whole list of terms... + for nick in nicks: + logger.info("Looking for '" + nick + "' in " + str(len(platforms)) + " different platforms:\n" +str( [ str(plat) for plat in platforms ] ) ) + + # If the process is executed by the current app, we use the Processes. It is faster than pools. + if nThreads <= 0 or nThreads > len(platforms): + nThreads = len(platforms) + logger.info("Launching " + str(nThreads) + " different threads...") + + # Using threads in a pool if we are not running the program in main + # Example catched from: https://stackoverflow.com/questions/11312525/catch-ctrlc-sigint-and-exit-multiprocesses-gracefully-in-python + try: + original_sigint_handler = signal.signal(signal.SIGINT, signal.SIG_IGN) + pool = Pool(nThreads) + signal.signal(signal.SIGINT, original_sigint_handler) + except ValueError: + # To avoid: ValueError: signal only works in main thread + pool = Pool(nThreads) + + poolResults = [] + try: + def log_result(result): + # This is called whenever foo_pool(i) returns a result. + # result_list is modified only by the main process, not the pool workers. + poolResults.append(result) + + for plat in platforms: + # We need to create all the arguments that will be needed + parameters = ( plat, nick, rutaDescarga, avoidProcessing, avoidDownload, ) + pool.apply_async (pool_function, args= parameters, callback = log_result ) + + # Waiting for results to be finished + while len(poolResults) < len(platforms): + pass + + # Closing normal termination + pool.close() + except KeyboardInterrupt: + print(general.warning("\n[!] Process manually stopped by the user. Terminating workers.\n")) + pool.terminate() + print(general.warning("[!] The following platforms were not processed:")) + pending = "" + for p in platforms: + processed = False + for processedPlatform in poolResults: + if str(p) == processedPlatform["platform"]: + processed = True + break + if not processed: + print("\t- " + str(p)) + pending += " " + str(p).lower() + print("\n") + print(general.warning("If you want to relaunch the app with these platforms you can always run the command with: ")) + print("\t usufy.py ... -p " + general.emphasis(pending)) + print("\n") + print(general.warning("If you prefer to avoid these platforms you can manually evade them for whatever reason with: ")) + print("\t usufy.py ... -x " + general.emphasis(pending)) + print("\n") + pool.join() + + profiles = [] + + # Processing the results + # ---------------------- + for serArray in poolResults: + data = serArray["data"] + # We need to recover the results and check if they are not an empty json or None + if data != None: + array = json.loads(data) + for r in array: + if r != "{}": + profiles.append(r) + res+=profiles + return res + + +def main(args): + """ + Main function to launch usufy. + + The function is created in this way so as to let other applications make + use of the full configuration capabilities of the application. The + parameters received are used as parsed by this modules `getParser()`. + + Args: + ----- + args: The parameters as processed by this modules `getParser()`. + + Returns: + -------- + dict: A Json representing the matching results. + """ + # Recovering the logger + # Calling the logger when being imported + osrframework.utils.logger.setupLogger(loggerName="osrframework.usufy", verbosity=args.verbose, logFolder=args.logfolder) + # From now on, the logger can be recovered like this: + logger = logging.getLogger("osrframework.usufy") + + if not args.maltego: + print(general.title(banner.text)) + + sayingHello = """ +usufy.py Copyright (C) F. Brezo and Y. Rubio (i3visio) 2014-2017 + +This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you +are welcome to redistribute it under certain conditions. For additional info, +visit """ + general.LICENSE_URL + "\n" + logger.info(sayingHello) + print(general.title(sayingHello)) + logger.info("Starting usufy.py...") + + if args.license: + general.showLicense() + elif args.fuzz: + logger.info("Performing the fuzzing tasks...") + res = fuzzUsufy(args.fuzz, args.fuzz_config) + logger.info("Recovered platforms:\n" + str(res)) + else: + logger.debug("Recovering the list of platforms to be processed...") + # Recovering the list of platforms to be launched + listPlatforms = platform_selection.getPlatformsByName(platformNames=args.platforms, tags=args.tags, mode="usufy", excludePlatformNames=args.exclude) + logger.debug("Platforms recovered.") + + if args.info: + # Information actions... + if args.info == 'list_platforms': + infoPlatforms="Listing the platforms:\n" + for p in listPlatforms: + infoPlatforms += "\t\t" + (str(p) + ": ").ljust(16, ' ') + str(p.tags)+"\n" + logger.info(infoPlatforms) + return infoPlatforms + elif args.info == 'list_tags': + logger.info("Listing the tags:") + tags = {} + # Going through all the selected platforms to get their tags + for p in listPlatforms: + for t in p.tags: + if t not in tags.keys(): + tags[t] = 1 + else: + tags[t] += 1 + infoTags = "List of tags:\n" + # Displaying the results in a sorted list + for t in tags.keys(): + infoTags += "\t\t" + (t + ": ").ljust(16, ' ') + str(tags[t]) + " time(s)\n" + logger.info(infoTags) + return infoTags + else: + pass + + # performing the test + elif args.benchmark: + logger.warning("The benchmark mode may last some minutes as it will be performing similar queries to the ones performed by the program in production. ") + logger.info("Launching the benchmarking tests...") + platforms = platform_selection.getAllPlatformNames("usufy") + res = benchmark.doBenchmark(platforms) + strTimes = "" + for e in sorted(res.keys()): + strTimes += str(e) + "\t" + str(res[e]) + "\n" + logger.info(strTimes) + return strTimes + + # showing the tags of the usufy platforms + elif args.show_tags: + logger.info("Collecting the list of tags...") + tags = platform_selection.getAllPlatformNamesByTag("usufy") + logger.info(json.dumps(tags, indent=2)) + print(general.info("This is the list of platforms grouped by tag.\n")) + print(json.dumps(tags, indent=2, sort_keys=True)) + print(general.info("[Tip] Remember that you can always launch the platform using the -t option followed by any of the aforementioned.\n")) + return tags + + # Executing the corresponding process... + else: + # Showing the execution time... + if not args.maltego: + startTime= dt.datetime.now() + print(str(startTime) + "\tStarting search in " + general.emphasis(str(len(listPlatforms))) + " platform(s)... Relax!\n") + print(general.emphasis("\tPress to stop...\n")) + + # Defining the list of users to monitor + nicks = [] + logger.debug("Recovering nicknames to be processed...") + if args.nicks: + for n in args.nicks: + # TO-DO + # A trick to avoid having the processing of the properties when being queried by Maltego + if "properties.i3visio" not in n: + nicks.append(n) + else: + # Reading the nick files + try: + nicks = args.list.read().splitlines() + except: + logger.error("ERROR: there has been an error when opening the file that stores the nicks.\tPlease, check the existence of this file.") + + # Definning the results + res = [] + + if args.output_folder != None: + # if Verifying an output folder was selected + logger.debug("Preparing the output folder...") + if not args.maltego: + if not os.path.exists(args.output_folder): + logger.warning("The output folder \'" + args.output_folder + "\' does not exist. The system will try to create it.") + os.makedirs(args.output_folder) + # Launching the process... + res = processNickList(nicks, listPlatforms, args.output_folder, avoidProcessing = args.avoid_processing, avoidDownload = args.avoid_download, nThreads=args.threads, verbosity= args.verbose, logFolder=args.logfolder) + + else: + try: + res = processNickList(nicks, listPlatforms, nThreads=args.threads, verbosity= args.verbose, logFolder=args.logfolder) + except Exception as e: + print(general.error("Exception grabbed when processing the nicks: " + str(e))) + print(general.error(traceback.print_stack())) + + logger.info("Listing the results obtained...") + # We are going to iterate over the results... + strResults = "\t" + + # Structure returned + """ + [ + { print + + "attributes": [ + { + "attributes": [], + "type": "i3visio.uri", + "value": "http://twitter.com/i3visio" + }, + { + "attributes": [], + "type": "i3visio.alias", + "value": "i3visio" + }, + { + "attributes": [], + "type": "i3visio.platform", + "value": "Twitter" + } + ], + "type": "i3visio.profile", + "value": "Twitter - i3visio" + } + , + ... + ] + """ + for r in res: + # The format of the results (attributes) for a given nick is a list as follows: + + for att in r["attributes"]: + # iterating through the attributes + platform = "" + uri = "" + for details in att["attributes"]: + if details["type"] == "i3visio.platform": + platform = details["value"] + if details["type"] == "i3visio.uri": + uri = details["value"] + try: + strResults+= (str(platform) + ":").ljust(16, ' ')+ " "+ str(uri)+"\n\t\t" + except: + pass + + logger.info(strResults) + + # Generating summary files for each ... + if args.extension: + # Storing the file... + logger.info("Creating output files as requested.") + if not args.maltego: + # Verifying if the outputPath exists + if not os.path.exists (args.output_folder): + logger.warning("The output folder \'" + args.output_folder + "\' does not exist. The system will try to create it.") + os.makedirs(args.output_folder) + + # Grabbing the results + fileHeader = os.path.join(args.output_folder, args.file_header) + + # Iterating through the given extensions to print its values + for ext in args.extension: + # Generating output files + general.exportUsufy(res, ext, fileHeader) + + # Generating the Maltego output + if args.maltego: + general.listToMaltego(res) + # Printing the results if requested + else: + now = dt.datetime.now() + print(str(now) + "\tA summary of the results obtained are shown in the following table:\n") + print(general.success(general.usufyToTextExport(res))) + + if args.web_browser: + general.openResultsInBrowser(res) + + now = dt.datetime.now() + print("\n" + str(now) + "\tYou can find all the information collected in the following files:") + for ext in args.extension: + # Showing the output files + print("\t" + general.emphasis(fileHeader + "." + ext)) + + # Showing the execution time... + endTime= dt.datetime.now() + print("\n" + str(endTime) +"\tFinishing execution...\n") + print("Total time consumed:\t" + general.emphasis(str(endTime-startTime))) + print("Average seconds/query:\t" + general.emphasis(str((endTime-startTime).total_seconds()/len(listPlatforms))) +" seconds\n") + + # Urging users to place an issue on Github... + print(banner.footer) + + return res + + +def getParser(): + DEFAULT_VALUES = configuration.returnListOfConfigurationValues("usufy") + # Capturing errors just in case the option is not found in the configuration + try: + excludeList = [DEFAULT_VALUES["exclude_platforms"]] + except: + excludeList = [] + + # Recovering all the possible options + platOptions = platform_selection.getAllPlatformNames("usufy") + + parser = argparse.ArgumentParser(description= colorama.Style.BRIGHT + 'usufy.py - Piece of software that checks the existence of a profile for a given user in up to ' + str(len(platOptions)-1)+ ' different platforms.', prog='usufy.py', epilog='Check the README.md file for further details on the usage of this program or follow us on Twitter in .', add_help=False) + parser._optionals.title = "Input options (one required)" + + # Defining the mutually exclusive group for the main options + groupMainOptions = parser.add_mutually_exclusive_group(required=True) + # Adding the main options + groupMainOptions.add_argument('--info', metavar='', choices=['list_platforms', 'list_tags'], action='store', help='select the action to be performed amongst the following: list_platforms (list the details of the selected platforms), list_tags (list the tags of the selected platforms). Afterwards, it exists.') + groupMainOptions.add_argument('--license', required=False, action='store_true', default=False, help='shows the AGPLv3+ license and exists.') + groupMainOptions.add_argument('-b', '--benchmark', action='store_true', default=False, help='perform the benchmarking tasks.') + groupMainOptions.add_argument('-f', '--fuzz', metavar='', action='store', type=argparse.FileType('r'), help='this option will try to find usufy-like URLs. The list of fuzzing platforms in the file should be (one per line): \t') + groupMainOptions.add_argument('-l', '--list', metavar='', action='store', type=argparse.FileType('r'), help='path to the file where the list of nicks to verify is stored (one per line).') + groupMainOptions.add_argument('-n', '--nicks', metavar='', nargs='+', action='store', help = 'the list of nicks to process (at least one is required).') + groupMainOptions.add_argument('--show_tags', action='store_true', default=False, help='it will show the platforms grouped by tags.') + + # Selecting the platforms where performing the search + groupPlatforms = parser.add_argument_group('Platform selection arguments', 'Criteria for selecting the platforms where performing the search.') + groupPlatforms.add_argument('-p', '--platforms', metavar='', choices=platOptions, nargs='+', required=False, default=DEFAULT_VALUES["platforms"], action='store', help='select the platforms where you want to perform the search amongst the following: ' + str(platOptions) + '. More than one option can be selected.') + groupPlatforms.add_argument('-t', '--tags', metavar='', default = [], nargs='+', required=False, action='store', help='select the list of tags that fit the platforms in which you want to perform the search. More than one option can be selected.') + groupPlatforms.add_argument('-x', '--exclude', metavar='', choices=platOptions, nargs='+', required=False, default=excludeList, action='store', help='select the platforms that you want to exclude from the processing.') + + # Configuring the processing options + groupProcessing = parser.add_argument_group('Processing arguments', 'Configuring the way in which usufy will process the identified profiles.') + groupProcessing.add_argument('--avoid_download', required=False, action='store_true', default=False, help='argument to force usufy NOT to store the downloadable version of the profiles.') + groupProcessing.add_argument('--avoid_processing', required=False, action='store_true', default=False, help='argument to force usufy NOT to perform any processing task with the valid profiles.') + groupProcessing.add_argument('--fuzz_config', metavar='', action='store', type=argparse.FileType('r'), help='path to the fuzzing config details. Wildcards such as the domains or the nicknames should come as: , .') + groupProcessing.add_argument('--nonvalid', metavar='', required=False, default = '\\|<>=', action='store', help="string containing the characters considered as not valid for nicknames." ) + groupProcessing.add_argument('-e', '--extension', metavar='', nargs='+', choices=['csv', 'gml', 'json', 'mtz', 'ods', 'png', 'txt', 'xls', 'xlsx' ], required=False, default=DEFAULT_VALUES["extension"], action='store', help='output extension for the summary files. Default: xls.') + groupProcessing.add_argument('-L', '--logfolder', metavar='. +# +################################################################################## + + +import logger + +# Calling the logger when being imported +logger.setupLogger(loggerName="osrframework.utils") diff --git a/osrframework/utils/banner.py b/osrframework/utils/banner.py new file mode 100644 index 0000000..6b35278 --- /dev/null +++ b/osrframework/utils/banner.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2015-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +import colorama + +import osrframework + +colorama.init(autoreset=True) + +text = colorama.Fore.BLUE + colorama.Style.BRIGHT + """ + ___ ____ ____ _____ _ + / _ \/ ___|| _ \| ___| __ __ _ _ __ ___ _____ _____ _ __| | __ +| | | \___ \| |_) | |_ | '__/ _` | '_ ` _ \ / _ \ \ /\ / / _ \| '__| |/ / +| |_| |___) | _ <| _|| | | (_| | | | | | | __/\ V V / (_) | | | < + \___/|____/|_| \_\_| |_| \__,_|_| |_| |_|\___| \_/\_/ \___/|_| |_|\_\ + + + Version: OSRFramework """ + osrframework.__version__ + """ + Created by: Felix Brezo and Yaiza Rubio, (i3visio) + +""" + +footer = """Did something go wrong? Is a platform reporting false positives? Do you need to +integrate a new one and you don't know how to start? Then, you can always place +an issue in the Github project: + https://github.com/i3visio/osrframework/issues +Note that otherwise, we won't know about it! +""" diff --git a/osrframework/utils/benchmark.py b/osrframework/utils/benchmark.py new file mode 100644 index 0000000..e5cefe6 --- /dev/null +++ b/osrframework/utils/benchmark.py @@ -0,0 +1,90 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import time +# global issues +from multiprocessing import Pool + +import logging +import urllib2 + +def testFunctionWeb(): + ''' + Benchmarcking function... + ''' + #print p + resp = urllib2.urlopen('http://www.i3visio.com') + html = resp.read() + return + +def testFunction2(): + ''' + Benchmarcking function... + ''' + a = 1 + for i in range(1000): + a+=1 + return + +def multi_run_wrapper(args): + ''' + Wrapper for being able to launch all the threads of getPageWrapper. + Parameters: + We receive the parameters for getPageWrapper as a tuple. + ''' + #print args + return testFunctionWeb(*args) + +def doBenchmark(plats): + ''' + Perform the benchmark... + ''' + logger = logging.getLogger("osrframework.utils") + # defining the results dict + res = {} + + # args + args = [] + + #for p in plats: + # args.append( (str(p),) ) + + # selecting the number of tries to be performed + tries = [1, 4, 8 ,16, 24, 32, 40, 48, 56, 64] + + #for i in range(1, len(plats)/10): + # tries.append(i*10) + + logger.info("The test is starting recovering webpages by creating the following series of threads: " + str(tries)) + + for i in tries: + print "Testing creating " + str(i) + " simultaneous threads..." + # starting + t0 = time.clock() + pool = Pool(i) + # We call the wrapping function with all the args previously generated + poolResults = pool.map(multi_run_wrapper, args) + + t1 = time.clock() + # storing the results + res[i] = t1 - t0 + print str(i) + "\t" + str(res[i]) + "\n" + + return res diff --git a/osrframework/utils/browser.py b/osrframework/utils/browser.py new file mode 100644 index 0000000..f102d3b --- /dev/null +++ b/osrframework/utils/browser.py @@ -0,0 +1,230 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +# Required libraries +import mechanize +import cookielib +import ConfigParser +import random +import os + + +import osrframework.utils.configuration as configuration + +# logging imports +import logging + +class Browser(): + """ + Utility used to code a Browser. + """ + def __init__(self): + """ + Recovering an instance of a new Browser. + """ + + # Browser + self.br = mechanize.Browser() + + # Cookie Jar + self.cj = cookielib.LWPCookieJar() + self.br.set_cookiejar(self.cj) + + # Browser options + self.br.set_handle_equiv(True) + self.br.set_handle_gzip(False) + self.br.set_handle_redirect(True) + self.br.set_handle_referer(False) + self.br.set_handle_robots(False) + self.br.set_handled_schemes(['http', 'https']) + + # Follows refresh 0 but not hangs on refresh > 0 + self.br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1) + + # Defining User Agents + self.userAgents = [] + + # Handling proxies + self.proxies = {} + self.timeout = 2 + + # Want debugging messages? + #self.br.set_debug_http(True) + #self.br.set_debug_redirects(True) + #self.br.set_debug_responses(True) + + # Trying to read the configuration + # -------------------------------- + # If a current.cfg has not been found, creating it by copying from default + configPath = configuration.getConfigPath("browser.cfg") + configPath = os.path.join(configuration.getConfigPath()["appPath"], "browser.cfg") + + # Checking if the configuration file exists + if not os.path.exists(configPath): + try: + # Copy the data from the default folder + defaultConfigPath = os.path.join(configuration.getConfigPath()["appPathDefaults"], "browser.cfg") + + with open(defaultConfigPath) as iF: + cont = iF.read() + with open(configPath, "w") as oF: + oF.write(cont) + except Exception, e: + print "WARNING. No configuration file could be found and the default file was not found either, so configuration will be set as default." + print str(e) + print + # Storing configuration as default + self.userAgents = ['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'] + self.proxies = {} + + return None + + # Reading the configuration file + config = ConfigParser.ConfigParser() + config.read(configPath) + + proxy = {} + + # Iterating through all the sections, which contain the platforms + for conf in config.sections(): + if conf == "Browser": + # Iterating through parametgers + for (param, value) in config.items(conf): + if param == "user_agent": + if value != '': + self.userAgents.append(value) + else: + self.userAgents = ['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'] + if param == "timeout": + try: + self.timeout = int(value) + except: + self.timeout = 2 + else: + proxy[conf] = {} + # Iterating through parametgers + for (param, value) in config.items(conf): + if value != '': + proxy[conf][param] = value + + # Configuring the proxy as it will be used by br.set_proxies + for p in proxy.keys(): + # p ~= ProxyHTTP --> Protocol = p.lower()[5:] + #print p, p.lower()[5:], proxy[p] + try: + # Adding credentials if they exist + self.proxies[ p.lower()[5:] ] = proxy[p]["username"] + ":" + proxy[p]["password"] + "@" + proxy[p]["host"] + ":" + proxy[p]["port"] + except: + try: + self.proxies[ p.lower()[5:] ] = proxy[p]["host"] + ":" + proxy[p]["port"] + except: + # We are not adding this protocol to be proxied + pass + + def recoverURL(self,url): + """ + Public method to recover a resource. + url + Platform + + Returns: + Returns a resource that has to be read, for instance, with html = self.br.read() + """ + + logger = logging.getLogger("osrframework.utils") + + # Configuring user agents... + self.setUserAgent() + + # Configuring proxies + if "https://" in url: + self.setProxy(protocol = "https") + else: + self.setProxy(protocol = "http") + + # Giving special treatment for .onion platforms + if ".onion" in url: + try: + # TODO: configuring manually the tor bundle + pass + except: + # TODO: capturing the error and eventually trying the tor2web approach + #url = url.replace(".onion", ".tor2web.org") + pass + url = url.replace(".onion", ".onion.cab") + + logger.debug("Retrieving the resource: " + url) + # Opening the resource + recurso = self.br.open(url, timeout=self.timeout) + + logger.debug("Reading html code from: " + url) + # [TO-DO] + # Additional things may be done here to load javascript. + html = recurso.read() + + return html + + def setNewPassword(self, url, username, password): + """ + Public method to manually set the credentials for a url in the browser. + """ + self.br.add_password(url, username, password) + + def setProxy(self, protocol="http"): + """ + Public method to set a proxy for the browser. + """ + # Setting proxy + try: + new = { protocol: self.proxies[protocol]} + self.br.set_proxies( new ) + except: + # No proxy defined for that protocol + pass + + def setUserAgent(self, uA=None): + """ + This method will be called whenever a new query will be executed. + + :param uA: Any User Agent that was needed to be inserted. This parameter is optional. + + :return: Returns True if a User Agent was inserted and False if no User Agent could be inserted. + """ + logger = logging.getLogger("osrframework.utils") + + if not uA: + # Setting the User Agents + if self.userAgents: + # User-Agent (this is cheating, ok?) + logger = logging.debug("Selecting a new random User Agent.") + uA = random.choice(self.userAgents) + else: + logger = logging.debug("No user agent was inserted.") + return False + + #logger.debug("Setting the user agent:\t" + str(uA)) + + self.br.addheaders = [ ('User-agent', uA), ] + #self.br.addheaders = [('User-Agent', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11'), ('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'), ('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.3'), ('Accept-Encoding', 'none'), ('Accept-Language', 'es-es,es;q=0.8'), ('Connection', 'keep-alive')] + #self.br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1) + + return True diff --git a/osrframework/utils/config_api_keys.py b/osrframework/utils/config_api_keys.py new file mode 100644 index 0000000..094143b --- /dev/null +++ b/osrframework/utils/config_api_keys.py @@ -0,0 +1,75 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import ConfigParser +import os + +import osrframework.utils.configuration as configuration +import osrframework.utils.errors as errors + +def returnListOfAPIKeys(): + ''' + :return: A dictionary containing the API Keys stored in a dictionary depending on the information required by each platform + ''' + + dictAPIKeys = {} + + # If a api_keys.cfg has not been found, creating it by copying from default + configPath = os.path.join(configuration.getConfigPath()["appPath"], "api_keys.cfg") + + # Checking if the configuration file exists + if not os.path.exists(configPath): + # Copy the data from the default folder + defaultConfigPath = os.path.join(configuration.getConfigPath()["appPathDefaults"], "api_keys.cfg") + + try: + with open(defaultConfigPath) as iF: + cont = iF.read() + with open(configPath, "w") as oF: + oF.write(cont) + except Exception, e: + raise errors.ConfigurationFileNotFoundError(configPath, defaultConfigPath); + return dictAPIKeys + + # Reading the configuration file + config = ConfigParser.ConfigParser() + config.read(configPath) + + # Iterating through all the sections, which contain the platforms + for platform in config.sections(): + # Initializing values + platform_api = {} + + incomplete = False + + # Iterating through parametgers + for (param, value) in config.items(platform): + if value == '': + incomplete = True + break + platform_api[param] = value + + # Loading the info in the dict + if not incomplete: + dictAPIKeys[platform] = platform_api + + return dictAPIKeys diff --git a/osrframework/utils/config_credentials.py b/osrframework/utils/config_credentials.py new file mode 100644 index 0000000..1d3f047 --- /dev/null +++ b/osrframework/utils/config_credentials.py @@ -0,0 +1,80 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import ConfigParser +import os + +import osrframework.utils.configuration as configuration +import osrframework.utils.errors as errors + +def returnListOfCreds(): + ''' + :return: + A list of tuples containing in the first the name of the platform, + as read from the accounts.cfg file in the application folder. E. g.: + + listCreds.append(("", "", "")) + ''' + listCreds = [] + # If a accounts.cfg has not been found, creating it by copying from default + configPath = os.path.join(configuration.getConfigPath()["appPath"], "accounts.cfg") + + # Checking if the configuration file exists + if not os.path.exists(configPath): + # Copy the data from the default folder + defaultConfigPath = os.path.join(configuration.getConfigPath()["appPathDefaults"], "accounts.cfg") + + try: + with open(defaultConfigPath) as iF: + cont = iF.read() + with open(configPath, "w") as oF: + oF.write(cont) + except Exception, e: + raise errors.ConfigurationFileNotFoundError(configPath, defaultConfigPath); + return listCreds + + # Reading the configuration file + config = ConfigParser.ConfigParser() + config.read(configPath) + + # Iterating through all the sections, which contain the platforms + for platform in config.sections(): + # Initializing values + creds = {} + + incomplete = False + + # Iterating through parametgers + for (param, value) in config.items(platform): + if value == '': + incomplete = True + break + creds[param] = value + + # Appending credentials if possible + try: + if not incomplete: + listCreds.append((platform, creds["login"], creds["password"])) + except: + pass + + return listCreds diff --git a/osrframework/utils/configuration.py b/osrframework/utils/configuration.py new file mode 100644 index 0000000..d2bac20 --- /dev/null +++ b/osrframework/utils/configuration.py @@ -0,0 +1,174 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import os +import sys +import osrframework.utils.errors as errors + +def changePermissionsRecursively(path, uid, gid): + """ + Function to recursively change the user id and group id. It sets 700 + permissions. + """ + os.chown(path, uid, gid) + for item in os.listdir(path): + itempath = os.path.join(path, item) + if os.path.isfile(itempath): + # Setting owner + try: + os.chown(itempath, uid, gid) + except Exception, e: + # If this crashes it may be because we are running the + # application in Windows systems, where os.chown does NOT work. + pass + # Setting permissions + os.chmod(itempath, 0600) + elif os.path.isdir(itempath): + # Setting owner + try: + os.chown(itempath, uid, gid) + except Exception, e: + # If this crashes it may be because we are running the + # application in Windows systems, where os.chown does NOT work. + pass + # Setting permissions + os.chmod(itempath, 6600) + # Recursive function to iterate the files + changePermissionsRecursively(itempath, uid, gid) + +def getConfigPath(configFileName = None): + """ Auxiliar function to get the configuration paths depending on the system. + + Returns a dictionary with the following keys: appPath, appPathDefaults, appPathTransforms, appPathPlugins, appPathPatterns, appPathPatterns. + """ + paths = {} + applicationPath = "./" + + # Returning the path of the configuration folder + if sys.platform == 'win32': + applicationPath = os.path.expanduser(os.path.join('~\\', 'OSRFramework')) + else: + applicationPath = os.path.expanduser(os.path.join('~/', '.config', 'OSRFramework')) + + # Defining additional folders + paths = { + "appPath": applicationPath, + "appPathData": os.path.join(applicationPath, "data"), + "appPathServer": os.path.join(applicationPath, "server"), + "appPathServerStatic": os.path.join(applicationPath, "server", "static"), + "appPathServerTemplates": os.path.join(applicationPath, "server", "templates"), + "appPathDefaults": os.path.join(applicationPath, "default"), + "appPathTransforms": os.path.join(applicationPath, "transforms"), + "appPathPlugins": os.path.join(applicationPath, "plugins"), + "appPathWrappers": os.path.join(applicationPath, "plugins", "wrappers"), + "appPathPatterns": os.path.join(applicationPath, "plugins", "patterns"), + } + + # Creating them if they don't exist + for path in paths.keys(): + if not os.path.exists(paths[path]): + os.makedirs(paths[path]) + + return paths + +# Getting default configuration info +import ConfigParser + +def returnListOfConfigurationValues(util): + ''' Method that recovers the configuration information about each and every program. + :param util: Any of the utils that are contained in the framework: domainfy, entify, mailfy, phonefy, searchfy, usufy. + :return: A dictionary containing the default configuration. + ''' + + VALUES = {} + + # If a api_keys.cfg has not been found, creating it by copying from default + configPath = os.path.join(getConfigPath()["appPath"], "general.cfg") + + # Checking if the configuration file exists + if not os.path.exists(configPath): + # Copy the data from the default folder + defaultConfigPath = os.path.join(getConfigPath()["appPathDefaults"], "general.cfg") + + try: + # Recovering default file + with open(defaultConfigPath) as iF: + cont = iF.read() + # Moving its contents as the default values + with open(configPath, "w") as oF: + oF.write(cont) + except Exception, e: + raise errors.DefaultConfigurationFileNotFoundError(configPath, defaultConfigPath); + + # Reading the configuration file + config = ConfigParser.ConfigParser() + config.read(configPath) + + LISTS = ["tlds", "domains", "platforms", "extension", "exclude_platforms", "exclude_domains"] + + # Iterating through all the sections, which contain the platforms + for section in config.sections(): + incomplete = False + if section.lower() == util.lower(): + # Iterating through parameters + for (param, value) in config.items(section): + if value == '': + # Manually setting an empty value + if param in LISTS: + value = [] + else: + value = "" + # Splitting the parameters to create the arrays when needed + elif param in LISTS: + value = value.split(' ') + # Converting threads to int + elif param == "threads": + try: + value = int(value) + except Exception as err: + raise errors.ConfigurationParameterNotValidError(configPath, section, param, value) + elif param == "debug": + try: + if int(value) == 0: + value = False + else: + value = True + except Exception as err: + print "Something happened when processing this debug option. Resetting to default." + # Copy the data from the default folder + defaultConfigPath = os.path.join(getConfigPath()["appPathDefaults"], "general.cfg") + + try: + # Recovering default file + with open(defaultConfigPath) as iF: + cont = iF.read() + # Moving its contents as the default values + with open(configPath, "w") as oF: + oF.write(cont) + except Exception, e: + raise errors.DefaultConfigurationFileNotFoundError(configPath, defaultConfigPath); + + #raise errors.ConfigurationParameterNotValidError(configPath, section, param, value) + VALUES[param] = value + break + + return VALUES diff --git a/osrframework/utils/credentials.py b/osrframework/utils/credentials.py new file mode 100644 index 0000000..49677e7 --- /dev/null +++ b/osrframework/utils/credentials.py @@ -0,0 +1,70 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import os +import logging +import osrframework.utils.config_credentials as c_creds + +class Credential(): + """ + Class to match the credentials needed by a platform. + """ + def __init__(self, user, password): + """ + Creation of the credentials. + + :param user: Login name. + :param password: Password. + """ + self.user = user + self.password = password + + +def getCredentials(): + ''' + Recovering the credentials from a file with the following structure: + + :return: A dictionary with the following struture: + { "platform1": [C1, C2], "platform2": [C3]} + ''' + logger = logging.getLogger("osrframework.utils") + # Dictionary of lists: + # {'Twitter': {cred1, cred2, ...}} + creds = {} + try: + credsTuples = c_creds.returnListOfCreds() + + for cTuple in credsTuples: + plat, user, password = cTuple + + c = Credential(user, password) + + if plat not in creds.keys(): + creds[plat] = [c] + else: + creds[plat] = creds[plat].append(c) + logger.info(str(len(credsTuples)) + " credentials have been loaded.") + return creds + except Exception, e: + logger.error("WARNING. Something happened when loading credentials.") + logger.error(str(e)) + logger.debug("No credentials were loaded.") + return {} + diff --git a/osrframework/utils/errors.py b/osrframework/utils/errors.py new file mode 100644 index 0000000..35b8398 --- /dev/null +++ b/osrframework/utils/errors.py @@ -0,0 +1,64 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +class Error(Exception): + """Base class for exceptions in this module. + + Attributes: + reason -- Defines what has just happened + steps -- Defines what the user can do to solve this + post -- Additional information on how to report the bug + """ + + def __init__(self, reason="OSRFramework Generic Error.", steps = "No more information here. Just have a look at the code :(."): + self.reason = reason + self.steps = steps + self.post = "If you need more information on how to solve this, copy this information and ask us by placing an issue at ." + + def __str__(self): + 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 + +class DefaultConfigurationFileNotFoundError(Error): + """Exception raised when a given configuration file is not found. + + Attributes: + fileName -- input expression in which the error occurred + defaultPath -- the path where the default files should be found + """ + def __init__(self, fileName, defaultPath): + 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." + 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." + Error.__init__(self, reason, steps) + +class ConfigurationParameterNotValidError(Error): + """Exception raised when a given parameter is not valid for this option. + + Attributes: + configurationFilePath -- path to the configuration file + application -- the application that had the problem + parameter -- the parameter that was not properly configured + value -- the value to be changed + """ + def __init__(self, configurationFilePath, application, parameter, value): + reason = "The following parameter in " + application + " was misconfigured: " + parameter + " = " + str(value) + 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." + Error.__init__(self, reason, steps) diff --git a/osrframework/utils/general.py b/osrframework/utils/general.py new file mode 100644 index 0000000..63ac61e --- /dev/null +++ b/osrframework/utils/general.py @@ -0,0 +1,942 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################ +# +# Copyright 2014-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ + + +import colorama +colorama.init(autoreset=True) + +import datetime +import hashlib +import json +import logging +import networkx as nx +import os +import urllib +import webbrowser as wb + +from osrframework.transforms.lib.maltego import MaltegoEntity, MaltegoTransform + + +LICENSE_URL = "https://www.gnu.org/licenses/agpl-3.0.txt" + + +def exportUsufy(data, ext, fileH): + """ + Method that exports the different structures onto different formats. + + Args: + ----- + data: Data to export. + ext: One of the following: csv, excel, json, ods. + fileH: Fileheader for the output files. + + Returns: + -------- + Performs the export as requested by parameter. + """ + if ext == "csv": + usufyToCsvExport(data, fileH+"."+ext) + elif ext == "gml": + usufyToGmlExport(data, fileH+"."+ext) + elif ext == "json": + usufyToJsonExport(data, fileH+"."+ext) + elif ext == "mtz": + usufyToMaltegoExport(data, fileH+"."+ext) + elif ext == "ods": + usufyToOdsExport(data, fileH+"."+ext) + elif ext == "png": + usufyToPngExport(data, fileH+"."+ext) + elif ext == "txt": + usufyToTextExport(data, fileH+"."+ext) + elif ext == "xls": + usufyToXlsExport(data, fileH+"."+ext) + elif ext == "xlsx": + usufyToXlsxExport(data, fileH+"."+ext) + + +def _generateTabularData(res, oldTabularData = {}, isTerminal=False, canUnicode=True): + """ + Method that recovers the values and columns from the current structure + + This method is used by: + - usufyToCsvExport + - usufyToOdsExport + - usufyToXlsExport + - usufyToXlsxExport + + Args: + ----- + res: New data to export. + oldTabularData: The previous data stored. + { + "OSRFramework": [ + [ + "i3visio.alias", + "i3visio.platform", + "i3visio.uri" + ], + [ + "i3visio", + "Twitter", + "https://twitter.com/i3visio", + ] + ] + } + isTerminal: If isTerminal is activated, only information related to + i3visio.alias, i3visio.platform and i3visio.uri will be displayed + in the terminal. + canUnicode: Variable that stores if the printed output can deal with + Unicode characters. + + Returns: + -------- + The values, as a dictionary containing all the information stored. + Values is like: + { + "OSRFramework": [ + [ + "i3visio.alias", + "i3visio.platform", + "i3visio.uri" + ], + [ + "i3visio", + "Twitter", + "https://twitter.com/i3visio", + ], + [ + "i3visio", + "Github", + "https://github.com/i3visio", + ] + ] + } + """ + def _grabbingNewHeader(h): + """ + Updates the headers to be general. + + Changing the starting @ for a '_' and changing the "i3visio." for + "i3visio_". Changed in 0.9.4+. + + Args: + ----- + h: A header to be sanitised. + + Returns: + -------- + string: The modified header. + """ + if h[0] == "@": + h = h.replace("@","_") + elif "i3visio." in h: + h = h.replace("i3visio.", "i3visio_") + return h + + # Entities allowed for the output in terminal + allowedInTerminal = ["i3visio_alias", "i3visio_uri", "i3visio_platform", "i3visio_email", "i3visio_ipv4", "i3visio_phone", "i3visio_dni", "i3visio_domain", "i3visio_platform_leaked"] + # List of profiles found + values = {} + headers = ["_id"] + try: + if not isTerminal: + # Recovering the headers in the first line of the old Data + headers = oldTabularData["OSRFramework"][0] + else: + # Recovering only the printable headers if in Terminal mode + oldHeaders = oldTabularData["OSRFramework"][0] + headers = [] + for h in oldHeaders: + if h == "i3visio_domain" or h == "i3visio.domain": + print h + h = _grabbingNewHeader(h) + if h in allowedInTerminal: + headers.append(h) + # Changing the starting @ for a '_' and changing the "i3visio." for "i3visio_". Changed in 0.9.4+ + for i, h in enumerate(headers): + h = _grabbingNewHeader(h) + # Replacing the header + headers[i] = h + except: + # No previous files... Easy... + headers = ["_id"] + + # We are assuming that we received a list of profiles. + for p in res: + # Creating the dictionaries + values[p["value"]] = {} + attributes = p["attributes"] + # Processing all the attributes found + for a in attributes: + # Grabbing the type in the new format + h = _grabbingNewHeader(a["type"]) + + # Default behaviour for the output methods + if not isTerminal: + values[p["value"]][h] = a["value"] + # Appending the column if not already included + if str(h) not in headers: + headers.append(str(h)) + # Specific table construction for the terminal output + else: + if h in allowedInTerminal: + values[p["value"]][h] = a["value"] + # Appending the column if not already included + if str(h) not in headers: + headers.append(str(h)) + + data = {} + # Note that each row should be a list! + workingSheet = [] + + # Appending the headers + workingSheet.append(headers) + + # First, we will iterate through the previously stored values + try: + for dataRow in oldTabularData["OSRFramework"][1:]: + # Recovering the previous data + newRow = [] + for cell in dataRow: + newRow.append(cell) + + # Now, we will fill the rest of the cells with "N/A" values + for i in range(len(headers)-len(dataRow)): + # Printing a Not Applicable value + newRow.append("[N/A]") + + # Appending the newRow to the data structure + workingSheet.append(newRow) + except Exception, e: + # No previous value found! + pass + + # After having all the previous data stored an updated... We will go through the rest: + for prof in values.keys(): + # Creating an empty structure + newRow = [] + for i, col in enumerate(headers): + try: + if col == "_id": + newRow.append(len(workingSheet)) + else: + if canUnicode: + newRow.append(unicode(values[prof][col])) + else: + newRow.append(str(values[prof][col])) + except UnicodeEncodeError as e: + # Printing that an error was found + newRow.append("[WARNING: Unicode Encode]") + except: + # Printing that this is not applicable value + newRow.append("[N/A]") + # Appending the newRow to the data structure + workingSheet.append(newRow) + + # Storing the workingSheet onto the data structure to be stored + data.update({"OSRFramework": workingSheet}) + + return data + + +def usufyToJsonExport(d, fPath): + """ + Workaround to export to a json file. + + Args: + ----- + d: Data to export. + fPath: File path for the output file. + """ + oldData = [] + try: + with open (fPath) as iF: + oldText = iF.read() + if oldText != "": + oldData = json.loads(oldText) + except: + # No file found, so we will create it... + pass + + jsonText = json.dumps(oldData+d, indent=2, sort_keys=True) + + with open (fPath, "w") as oF: + oF.write(jsonText) + + +def usufyToTextExport(d, fPath=None): + """ + Workaround to export to a .txt file or to show the information. + + Args: + ----- + d: Data to export. + fPath: File path for the output file. If None was provided, it will + assume that it has to print it. + + Returns: + -------- + unicode: It sometimes returns a unicode representation of the Sheet + received. + """ + # Manual check... + if d == []: + return "+------------------+\n| No data found... |\n+------------------+" + + import pyexcel as pe + import pyexcel.ext.text as text + + if fPath == None: + isTerminal = True + else: + isTerminal = False + + try: + oldData = get_data(fPath) + except: + # No information has been recovered + oldData = {"OSRFramework":[]} + + # Generating the new tabular data + tabularData = _generateTabularData(d, {"OSRFramework":[[]]}, True, canUnicode=False) + + # The tabular data contains a dict representing the whole book and we need only the sheet!! + sheet = pe.Sheet(tabularData["OSRFramework"]) + sheet.name = "Profiles recovered (" + getCurrentStrDatetime() +")." + # Defining the headers + sheet.name_columns_by_row(0) + text.TABLEFMT = "grid" + try: + with open(fPath, "w") as oF: + oF.write(str(sheet)) + except Exception as e: + # If a fPath was not provided... We will only print the info: + return unicode(sheet) + + +def usufyToCsvExport(d, fPath): + """ + Workaround to export to a CSV file. + + Args: + ----- + d: Data to export. + fPath: File path for the output file. + """ + + from pyexcel_io import get_data + try: + oldData = {"OSRFramework": get_data(fPath) } + except: + # No information has been recovered + oldData = {"OSRFramework":[]} + + # Generating the new tabular data. + tabularData = _generateTabularData(d, oldData) + + from pyexcel_io import save_data + # Storing the file + # NOTE: when working with CSV files it is no longer a dict because it is a one-sheet-format + save_data(fPath, tabularData["OSRFramework"]) + + +def usufyToOdsExport(d, fPath): + """ + Workaround to export to a .ods file. + + Args: + ----- + d: Data to export. + fPath: File path for the output file. + """ + from pyexcel_ods import get_data + try: + #oldData = get_data(fPath) + # A change in the API now returns only an array of arrays if there is only one sheet. + oldData = {"OSRFramework": get_data(fPath) } + except: + # No information has been recovered + oldData = {"OSRFramework":[]} + + # Generating the new tabular data + tabularData = _generateTabularData(d, oldData) + + from pyexcel_ods import save_data + # Storing the file + save_data(fPath, tabularData) + + +def usufyToXlsExport(d, fPath): + """ + Workaround to export to a .xls file. + + Args: + ----- + d: Data to export. + fPath: File path for the output file. + """ + from pyexcel_xls import get_data + try: + #oldData = get_data(fPath) + # A change in the API now returns only an array of arrays if there is only one sheet. + oldData = {"OSRFramework": get_data(fPath) } + except: + # No information has been recovered + oldData = {"OSRFramework":[]} + + # Generating the new tabular data + tabularData = _generateTabularData(d, oldData) + from pyexcel_xls import save_data + # Storing the file + save_data(fPath, tabularData) + + +def usufyToXlsxExport(d, fPath): + """ + Workaround to export to a .xlsx file. + + Args: + ----- + d: Data to export. + fPath: File path for the output file. + """ + from pyexcel_xlsx import get_data + try: + #oldData = get_data(fPath) + # A change in the API now returns only an array of arrays if there is only one sheet. + oldData = {"OSRFramework": get_data(fPath) } + except: + # No information has been recovered + oldData = {"OSRFramework":[]} + + # Generating the new tabular data + tabularData = _generateTabularData(d, oldData) + + from pyexcel_xlsx import save_data + # Storing the file + save_data(fPath, tabularData) + + +def _generateGraphData(data, oldData=nx.Graph()): + """ + Processing the data from i3visio structures to generate nodes and edges + + This function uses the networkx graph library. It will create a new node + for each and i3visio. entities while it will add properties for + all the attribute starting with "@". + + Args: + ----- + d: The i3visio structures containing a list of + oldData: A graph structure representing the previous information. + + Returns: + -------- + A graph structure representing the updated information. + """ + def _addNewNode(ent, g): + """ + ent: The hi3visio-like entities to be used as the identifier. + ent = { + "value":"i3visio", + "type":"i3visio.alias, + } + g: The graph in which the entity will be stored. + :return: newAtts, newEntties + """ + # Serialized entity + serEnt = json.dumps(ent) + + # Calculating the hash + h = hashlib.new('md5') + h.update(serEnt) + hashLabel = h.hexdigest() + + # Adding the node + g.add_node(hashLabel) + + # Creating the main attributes such as the type and value + g.node[hashLabel]["type"] = ent["type"] + try: + g.node[hashLabel]["value"] = unicode(ent["value"]) + except UnicodeEncodeError as e: + # Printing that an error was found + g.node[hashLabel]["value"] = "[WARNING: Unicode Encode]" + except: + # Printing that this is not applicable value + g.node[hashLabel]["value"] = "[N/A]" + + return hashLabel + + def _processAttributes(elems, g): + """ + Function that processes a list of elements to obtain new attributes. + + Args: + ----- + elems: List of i3visio-like entities. + g: The graph in which the entity will be stored. + + Returns: + -------- + newAtts: Dict of attributes (to be stored as attributes for the + given entity). + newEntities: List of new Entities (to be stored as attributes for + the given entity). + """ + newAtts = {} + newEntities= [] + + for att in elems: + # If it is an attribute + if att["type"][0] == "@": + # Removing the @ and the _ of the attributes + attName = str(att["type"][1:]).replace('_', '') + try: + newAtts[attName] = int(att["value"]) + except: + newAtts[attName] = att["value"] + elif att["type"][:8] == "i3visio.": + # Creating a dict to represent the pair: type, value entity. + ent = { + "value":att["value"], + "type":att["type"].replace("i3visio.", "i3visio_"), + } + # Appending the new Entity to the entity list + newEntities.append(ent) + + # Appending the new node + hashLabel = _addNewNode(ent, g) + + # Make this recursive to link the attributes in each and every att + newAttsInAttributes, newEntitiesInAttributes = _processAttributes(att["attributes"], g) + + # Updating the attributes to the current entity + g.node[hashLabel].update(newAttsInAttributes) + + # Creating the edges (the new entities have also been created in the _processAttributes + for new in newEntitiesInAttributes: + graphData.add_edge(hashLabel, json.dumps(new)) + try: + # Here, we would add the properties of the edge + #graphData.edge[hashLabel][json.dumps(new)]["@times_seen"] +=1 + pass + except: + # If the attribute does not exist, we would initialize it + #graphData.edge[hashLabel][json.dumps(new)]["@times_seen"] = 1 + pass + else: + # An unexpected type + pass + + return newAtts, newEntities + + graphData = oldData + # Iterating through the results + for elem in data: + # Creating a dict to represent the pair: type, value entity. + ent = { + "value":elem["value"], + "type":elem["type"], + } + + # Appending the new node + hashLabel = _addNewNode(ent, graphData) + + # Processing the attributes to grab the attributes (starting with "@..." and entities) + newAtts, newEntities = _processAttributes(elem["attributes"], graphData) + + # Updating the attributes to the current entity + graphData.node[hashLabel].update(newAtts) + + # Creating the edges (the new entities have also been created in the _processAttributes + for new in newEntities: + # Serializing the second entity + serEnt = json.dumps(new) + + # Calculating the hash of the second entity + h = hashlib.new('md5') + h.update(serEnt) + hashLabelSeconds = h.hexdigest() + + # Adding the edge + graphData.add_edge(hashLabel, hashLabelSeconds) + try: + # Here, we would add the properties of the edge + #graphData.edge[hashLabel][hashLabelSeconds]["times_seen"] +=1 + pass + except: + # If the attribute does not exist, we would initialize it + #graphData.edge[hashLabel][hashLabelSeconds]["times_seen"] = 1 + pass + + return graphData + + +def usufyToGmlExport(d, fPath): + """ + Workaround to export data to a .gml file. + + Args: + ----- + d: Data to export. + fPath: File path for the output file. + """ + # Reading the previous gml file + try: + oldData=nx.read_gml(fPath) + except UnicodeDecodeError as e: + print "UnicodeDecodeError:\t" + str(e) + print "Something went wrong when reading the .gml file relating to the decoding of UNICODE." + import time as time + fPath+="_" +str(time.time()) + print "To avoid losing data, the output file will be renamed to use the timestamp as:\n" + fPath + "_" + str(time.time()) + print + # No information has been recovered + oldData = nx.Graph() + except Exception as e: + # No information has been recovered + oldData = nx.Graph() + + newGraph = _generateGraphData(d, oldData) + + # Writing the gml file + nx.write_gml(newGraph,fPath) + + +def usufyToPngExport(d, fPath): + """ + Workaround to export to a png file. + + Args: + ----- + d: Data to export. + fPath: File path for the output file. + """ + newGraph = _generateGraphData(d) + + import matplotlib.pyplot as plt + # Writing the png file + nx.draw(newGraph) + plt.savefig(fPath) + + +def usufyToMaltegoExport(profiles, fPath): + """ + Workaround to export to a Maltego file. + + Args: + ----- + d: Data to export. + fPath: File path for the output file. + """ + me = MaltegoTransform() + # A dictionary with the structure: + + newEntities = [] + for profile in profiles: + # Defining the main entity + """aux ={} + aux["type"] = "i3visio.profile" + aux["value"] = "Skype - " + str(user["i3visio.alias"]) + aux["attributes"] = [] + + # Creation of a temp entity + aux = {} + aux["type"] = profile["value"] + aux["value"] = profile["type"] + aux["attributes"] = []""" + newEntities.append(profile) + + me.addListOfEntities(newEntities) + + # Storing the file + with open (fPath, "w") as oF: + oF.write(me.getOutput()) + + +def listToMaltego(profiles): + """ + Method to generate the text to be appended to a Maltego file. + + May need to be revisited. + + Args: + ----- + profiles: A list of dictionaries with the information of the profiles + in the following format: `{"a_nick": []}`. An + example is shown below: + ``` + [ + { + "attributes": [ + { + "attributes": [], + "type": "i3visio.uri", + "value": "http://twitter.com/i3visio" + }, + { + "attributes": [], + "type": "i3visio.alias", + "value": "i3visio" + }, + { + "attributes": [], + "type": "i3visio.platform", + "value": "Twitter" + } + ], + "type": "i3visio.profile", + "value": "Twitter - i3visio" + } + , + ... + ] + ``` + + Returns: + -------- + string: The .xml text to be written for a Maltego file. + """ + logger = logging.getLogger("osrframework.utils") + logger.info( "Generating Maltego File...") + + maltegoText = "" + logger.debug("Going through all the keys in the dictionary...") + me = MaltegoTransform() + # A dictionary with the structure: + + newEntities = [] + for profile in profiles: + # Defining the main entity + """aux ={} + aux["type"] = "i3visio.profile" + aux["value"] = "Skype - " + str(user["i3visio.alias"]) + aux["attributes"] = [] + + # Creation of a temp entity + aux = {} + aux["type"] = profile["value"] + aux["value"] = profile["type"] + aux["attributes"] = []""" + newEntities.append(profile) + + me.addListOfEntities(newEntities) + + # Getting the output text + me.addUIMessage("Process completed!") + if len(newEntities)<=11: + me.addUIMessage("All the entities have been displayed!") + else: + me.addUIMessage("Ooops! Too many entities to display!") + me.addUIMessage("The following entities could not be added because of the limits in Maltego Community Edition:\n"+json.dumps(newEntities, indent=2)) + + # Returning the output text... + me.returnOutput() + return me.getOutput() + + +def fileToMD5(filename, block_size=256*128, binary=False): + """ + A function that calculates the MD5 hash of a file. + + Args: + ----- + filename: Path to the file. + block_size: Chunks of suitable size. Block size directly depends on + the block size of your filesystem to avoid performances issues. + Blocks of 4096 octets (Default NTFS). + binary: A boolean representing whether the returned info is in binary + format or not. + Returns: + -------- + string: The MD5 hash of the file. + """ + md5 = hashlib.md5() + with open(filename,'rb') as f: + for chunk in iter(lambda: f.read(block_size), b''): + md5.update(chunk) + if not binary: + return md5.hexdigest() + return md5.digest() + + +def getCurrentStrDatetime(): + """ + Generating the current Datetime with a given format. + + Returns: + -------- + string: The string of a date. + """ + # Generating current time + i = datetime.datetime.now() + strTime = "%s-%s-%s_%sh%sm" % (i.year, i.month, i.day, i.hour, i.minute) + return strTime + + +def getFilesFromAFolder(path): + """ + Getting all the files in a folder. + + Args: + ----- + path: The path in which looking for the files. + + Returns: + -------- + list: The list of filenames found. + """ + from os import listdir + from os.path import isfile, join + #onlyfiles = [ f for f in listdir(path) if isfile(join(path,f)) ] + onlyFiles = [] + for f in listdir(path): + if isfile(join(path, f)): + onlyFiles.append(f) + return onlyFiles + + +def uriToBrowser(uri=None): + """ + Method that launches the URI in the default browser of the system. + + This function temporally deactivates the standard ouptut and errors to + prevent the system to show unwanted messages. This method is based on this + question from Stackoverflow. + https://stackoverflow.com/questions/2323080/how-can-i-disable-the-webbrowser-message-in-python + + Args: + ----- + uri: The string representing the URI to be opened in the browser. + """ + + # Cloning stdout (1) and stderr (2) + savout1 = os.dup(1) + savout2 = os.dup(2) + + # Closing them + os.close(1) + os.close(2) + os.open(os.devnull, os.O_RDWR) + + try: + # Opening the Tor URI using onion.cab proxy + if ".onion" in uri: + wb.get().open(uri.replace(".onion", ".onion.cab"), new=2) + else: + wb.get().open(uri, new=2) + finally: + # Reopening them... + os.dup2(savout1, 1) + os.dup2(savout2, 2) + + +def openResultsInBrowser(res): + """ + Method that collects the URI from a list of entities and opens them. + + Args: + ----- + res: A list containing several i3visio entities. + """ + print(emphasis("\n\tOpening URIs in the default web browser...")) + + for r in res: + for att in r["attributes"]: + if att["type"] == "i3visio.uri": + uriToBrowser(att["value"]) + + +def colorize(text, messageType=None): + """ + Function that colorizes a message. + + Args: + ----- + text: The string to be colorized. + messageType: Possible options include "ERROR", "WARNING", "SUCCESS", + "INFO" or "BOLD". + + Returns: + -------- + string: Colorized if the option is correct, including a tag at the end + to reset the formatting. + """ + formattedText = text + # Set colors + if "ERROR" in messageType: + formattedText = colorama.Fore.RED + formattedText + elif "WARNING" in messageType: + formattedText = colorama.Fore.YELLOW + formattedText + elif "SUCCESS" in messageType: + formattedText = colorama.Fore.GREEN + formattedText + elif "INFO" in messageType: + formattedText = colorama.Fore.BLUE + formattedText + + # Set emphashis mode + if "BOLD" in messageType: + formattedText = colorama.Style.BRIGHT + formattedText + + return formattedText + colorama.Style.RESET_ALL + + +def error(text): + return colorize(text, ["ERROR", "BOLD"]) + + +def warning(text): + return colorize(text, ["WARNING"]) + + +def success(text): + return colorize(text, ["SUCCESS", "BOLD"]) + + +def info(text): + return colorize(text, ["INFO"]) + + +def title(text): + return colorize(text, ["INFO", "BOLD"]) + + +def emphasis(text): + return colorize(text, ["BOLD"]) + + +def showLicense(): + """ + Method that prints the license if requested. + + It tries to find the license online and manually download it. This method + only prints its contents in plain text. + """ + print("Trying to recover the contents of the license...\n") + try: + # Grab the license online and print it. + text = urllib.urlopen(LICENSE_URL).read() + print("License retrieved from " + emphasis(LICENSE_URL) + ".") + raw_input("\n\tPress " + emphasis("") + " to print it.\n") + print(text) + except: + print(warning("The license could not be downloaded and printed.")) diff --git a/osrframework/utils/global_api.py b/osrframework/utils/global_api.py new file mode 100644 index 0000000..cc478e2 --- /dev/null +++ b/osrframework/utils/global_api.py @@ -0,0 +1,70 @@ +#!/usr/bin/env python +# encoding: utf-8 +# +################################################################################## +# +# Copyright 2015 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import csv + +import osrframework.utils.config_api_keys as api_keys + +class APIWrapper(): + ''' + Global API wrapper. + ''' + + def __init__(self, api_data=None): + ''' + :param api_data: dictionary containing the credentials for the given platform. + ''' + pass + + def get_user(self, screen_name): + ''' + Method to perform the usufy searches. + + :param screen_name: nickname to be searched. + + :return: User. + ''' + return {} + + def search_users(self, query, n=20, maxUsers=60): + ''' + Method to perform the searchfy searches. + + :param query: Query to be performed. + :param n: Number of results per query. + :param maxUsers: Max. number of users to be recovered. + + :return: List of users. + ''' + return [] + + + def get_all_docs(self, screen_name): + ''' + :param screen_name: nick from which we will try to recover the docs, i. e., tweets, publications, etc. + + :return: List of publications, i. e., tweets, publications, etc. + ''' + return [] + diff --git a/osrframework/utils/logger.py b/osrframework/utils/logger.py new file mode 100644 index 0000000..dc645fd --- /dev/null +++ b/osrframework/utils/logger.py @@ -0,0 +1,75 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This file is part of OSRFramework. +# +# OSRFramework is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import logging +import os + +def setupLogger(loggerName="osrframework", logFolder="./logs", verbosity=0): + """ + Returns the logger to be used for the whole app. This method may be invoked if required by the launcher to update the verbosity syntax. + + :param loggerName: Name of the package or app that is going to use this logger. + :param logFolder: Path to the folder where the information will be logged. + :param verbosity: Level of verbosity to be used: + - 0: Only errors. + - 1: Standard output. + - 2: Verbose level with rich outputs. + + :return: The logger already created. + """ + logger = logging.getLogger(loggerName) + + # create a logging format + loginFormat = '%(asctime)s [%(filename)s] - %(levelname)s:\n\t%(message)s\n' + + formatter = logging.Formatter(loginFormat) + + # first, defining the type of standard output and verbosity + if verbosity == 0: + logging.basicConfig(level=logging.ERROR, format=loginFormat) + elif verbosity == 1: + logging.basicConfig(level=logging.INFO, format=loginFormat) + elif verbosity == 2: + logging.basicConfig(level=logging.DEBUG, format=loginFormat) + + # trying to store the logfile + try: + # verifying if the logs folder exist + logFolder = os.path.join(os.path.dirname(os.path.realpath(__file__)), logFolder) + if not os.path.exists(logFolder): + os.makedirs(logFolder) + # create a file handler + logFile = os.path.join(logFolder, loggerName+".log") + + # This adds a handler to write on a file + handler = logging.FileHandler(logFile) + handler.setLevel(logging.DEBUG) + formatterLogFile = logging.Formatter(loginFormat) + handler.setFormatter(formatterLogFile) + + # add the handlers to the logger + logger.addHandler(handler) + except: + logger.warning("The log file could not be created. No log will be stored for this session.") + + # Notifying correctly import + #logger.debug(loggerName+ " successfully imported.") + return logger diff --git a/osrframework/utils/platform_selection.py b/osrframework/utils/platform_selection.py new file mode 100644 index 0000000..4aef8a4 --- /dev/null +++ b/osrframework/utils/platform_selection.py @@ -0,0 +1,256 @@ +# -*- coding: utf-8 -*- +# +################################################################################ +# +# Copyright 2014-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ + +import os +import sys + +import pkgutil +import importlib +import inspect +import osrframework.wrappers + +import osrframework.utils.credentials as credentials +import osrframework.utils.configuration as configuration +import osrframework + + +def getAllPlatformNames(mode): + """Method that defines the whole list of available parameters. + + :param mode: The mode of the search. The following can be chosen: ["phonefy", "usufy", "searchfy"]. + + Return values: + Returns a list [] of strings for the platform objects. + """ + # Recovering all the possible platforms installed + platOptions = [] + if mode in ["phonefy", "usufy", "searchfy"]: + allPlatforms = getAllPlatformObjects(mode=mode) + # Defining the platOptions + for p in allPlatforms: + try: + # E. g.: to use wikipedia instead of wikipedia_ca and so on + parameter = p.parameterName + except: + parameter = p.platformName.lower() + + if parameter not in platOptions: + platOptions.append(parameter) + elif mode == "domainfy": + platOptions = osrframework.domainfy.TLD.keys() + elif mode == "mailfy": + platOptions = osrframework.mailfy.EMAIL_DOMAINS + + platOptions = sorted(set(platOptions)) + platOptions.insert(0, 'all') + return platOptions + + +def getPlatformsByName(platformNames=['all'], mode=None, tags=[], excludePlatformNames=[]): + """Method that recovers the names of the in a given list. + + :param platformNames: List of strings containing the possible platforms. + :param mode: The mode of the search. The following can be chosen: ["phonefy", "usufy", "searchfy"]. + :param tags: Just in case the method to select the candidates is a series of tags. + :param excludePlatformNames: List of strings to be excluded from the search. + :return: Array of classes. + """ + + allPlatformsList = getAllPlatformObjects(mode) + + platformList = [] + + # Tags has priority over platform + if "all" in platformNames and len(tags) == 0: + # Last condition: checking if "all" has been provided + for plat in allPlatformsList: + if str(plat.platformName).lower() not in excludePlatformNames: + platformList.append(plat) + return platformList + else: + # going through the regexpList + for name in platformNames: + if name not in excludePlatformNames: + for plat in allPlatformsList: + # Verifying if the parameter was provided + if name == str(plat.platformName).lower(): + platformList.append(plat) + break + + # We need to perform additional checks to verify the Wikipedia platforms, which are called with a single parameter + try: + if name == str(plat.parameterName).lower(): + platformList.append(plat) + break + except: + pass + + # Verifying if any of the platform tags match the original tag + for t in plat.tags: + if t in tags: + platformList.append(plat) + break + # If the platformList is empty, we will return all + if platformList == []: + return allPlatformsList + else: + return platformList + +def getAllPlatformNamesByTag (mode = None): + """Returns the platforms in the framework grouped by tags. + :param mode: The mode of the search. The following can be chosen: ["phonefy", "usufy", "searchfy"]. + """ + tags = {} + + allPlatformsList = getAllPlatformObjects(mode) + + # Iterating the list of platforms to collect the tags + for plat in allPlatformsList: + # Grabbing the tags and providing them + for t in plat.tags: + if t not in tags.keys(): + tags[t] = [str(plat)] + else: + tags[t].append(str(plat)) + + return tags + + +def getAllPlatformObjects(mode = None): + """Method that recovers ALL the list of classes to be processed.... + + :param mode: The mode of the search. The following can be chosen: ["phonefy", "usufy", "searchfy"]. + + :return: Returns a list [] of objects. + """ + + listAll = [] + + ############################################################################ + ############################################################################ + + # -------------------------------------------------------------------------- + # Dinamically collecting all the "official" modules + # -------------------------------------------------------------------------- + + # A list that will contain all of the module names + all_modules = [] + + # Grabbing all the module names + for _, name, _ in pkgutil.iter_modules(osrframework.wrappers.__path__): + all_modules.append("osrframework.wrappers." + name) + + # Iterating through all the module names to grab them + for moduleName in all_modules: + # Importing the module + my_module = importlib.import_module(moduleName) + + # Getting all the classNames. + classNames = [m[0] for m in inspect.getmembers(my_module, inspect.isclass) if m[1].__module__ == moduleName] + + # Dinamically grabbing the first class of the module. IT SHOULD BE ALONE! + MyClass = getattr(my_module, classNames[0]) + + # Instantiating the object + newInstance = MyClass() + + # Adding to the list! + listAll.append(newInstance) + + # -------------------------------------------------------------------------- + # Loading user-defined wrappers under [OSRFrameworkHOME]/plugins/wrappers/ + # -------------------------------------------------------------------------- + + # Creating the application paths + paths = configuration.getConfigPath() + + newPath = os.path.abspath(paths["appPathWrappers"]) + + # Inserting in the System Path + if not newPath in sys.path: + sys.path.append(newPath) + + userImportedModules = {} + + for module in os.listdir(newPath): + if module[-3:] == '.py': + current = module.replace('.py', '') + userImportedModules[current] = __import__(current) + + del newPath + + userClasses = [] + + # Iterating through all the files + for userModule in userImportedModules.keys(): + + my_module = userImportedModules[userModule] + # Getting all the classNames. + classNames = [m[0] for m in inspect.getmembers(my_module, inspect.isclass) if m[1].__module__ == userModule] + + # Dinamically grabbing the first class of the module. IT SHOULD BE ALONE! + MyClass = getattr(my_module, classNames[0]) + + # Instantiating the object + newInstance = MyClass() + + # Adding to the list! + userClasses.append(newInstance) + + # -------------------------------------------------------------------------- + # Overwriting original modules with the user plugins + # -------------------------------------------------------------------------- + listToAdd = [] + for userClass in userClasses: + overwritten = False + for i, officialClass in enumerate(listAll): + # Checking if the name is the same + if str(userClass) == str(officialClass): + # Replacing the official module if a user module exists for it + listAll[i] = userClass + # We stop iterating this loop + overwritten = True + break + if not overwritten: + # Appending the new class + listToAdd.append(userClass) + + # Merging listAll and listToAdd + listAll = listAll + listToAdd + ############################################################################ + ############################################################################ + + creds = credentials.getCredentials() + + for p in listAll: + # Verify if there are credentials to be loaded + if p.platformName.lower() in creds.keys(): + p.setCredentials(creds[p.platformName.lower()]) + + if mode == None: + return listAll + else: + # We are returning only those platforms which are required by the mode. + selected = [] + for p in listAll: + if p.isValidMode[mode]: + selected.append(p) + return selected diff --git a/osrframework/utils/platforms.py b/osrframework/utils/platforms.py new file mode 100644 index 0000000..07942dc --- /dev/null +++ b/osrframework/utils/platforms.py @@ -0,0 +1,581 @@ +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2014-207 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import os +import random +import re +import sys +import urllib +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.credentials import Credential +import osrframework.utils.general as general +import osrframework.entify as entify +import osrframework.utils.config_api_keys as api_keys + +# logging imports +import logging + +class Platform(): + ''' + class. + ''' + def __init__(self): + ''' + Constructor without parameters... + ''' + pass + + def __init__(self, pName, tags): + ''' + Constructor with parameters. This method permits the developer to instantiate dinamically Platform objects. + ''' + self.platformName = pName + # These tags will be the one used to label this platform + self.tags = tags + + # Base URL + self.baseURL = "http://plataform.com" + + # Trying to find an API... This line should be added in every platform for which we have defined an API. + # DO NOT FORGET TO IMPORT THE APIWRAPPER, i. e.: + # from osrframework.api import TwitterAPIWrapper as TwitterAPIWrapper + self.wrapperAPI = None + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = False + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + #self.url["usufy"] = "http://anyurl.com/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + self.needsCredentials["searchfy"] = False + + # Array of credentials to be used + self.creds = [] + + ################### + # Valid queries # + ################### + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.*' will match any query. + self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".*" + self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + #self.notFoundText["usufy"] = [] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + #self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + def createURL(self, word, mode="phonefy"): + ''' + Method to create the URL replacing the word in the appropriate URL. + + :param word: Word to be searched. + :param mode: Mode to be executed. + + :return: The URL to be queried. + ''' + try: + if mode == "base": + if word[0] == "/": + return self.baseURL+word[1:], word + else: + return self.baseURL+word, word + else: + try: + return self.url[mode].replace("<"+mode+">", urllib.pathname2url(word)), word + except: + pass + except: + pass + # TO-DO: BaseURLNotFoundExceptionThrow base URL not found for the mode. + + def getInfo(self, query=None, process = False, mode="phonefy", qURI=None): + ''' + Method that checks the presence of a given query and recovers the first list of complains. + + :param query: Query to verify. + :param proces: Calling the processing function. + :param mode: Mode to be executed. + :param qURI: A query to be checked + + :return: Python structure for the html processed. + ''' + # Defining variables for this process + results = [] + data = "" + if not self.modeIsValid(mode=mode): + # TO-DO: InvalidModeException + return json.dumps(results) + + # Verrifying if the mode is valid + if not self._isValidQuery(query, mode=mode): + # TO-DO: InvalidQueryException + return json.dumps(results) + + # Verifying if the platform has an API defined + try: + if type(self.wrapperAPI) != "": + if mode == "phonefy": + pass + elif mode == "usufy": + results = self.wrapperAPI.get_user(query) + # Manually appending the URL + for r in results: + aux = {} + aux["type"]="i3visio.uri" + alias=r["value"].split(' - ')[1] + qURL, query = self.createURL(word=alias, mode="usufy") + aux["value"]= qURL + aux["attributes"]= [] + r["attributes"].append(aux) + + elif mode == "searchfy": + results = self.wrapperAPI.search_users(query) + # Manually appending the URL + for r in results: + aux = {} + aux["type"]="i3visio.uri" + alias=r["value"].split(' - ')[1] + qURL, query = self.createURL(word=alias, mode="usufy") + aux["value"]= qURL + aux["attributes"]= [] + r["attributes"].append(aux) + else: + # NoneType returned + pass + # The platform does not have a Wrapper defined for its API... Then we will use the traditional approach... + except: + # Creating the query URL for that mode + if qURI != None: + qURL = qURI + else: + qURL, query = self.createURL(word=query, mode=mode) + i3Browser = browser.Browser() + try: + # check if it needs creds + if self.needsCredentials[mode]: + authenticated = self._getAuthenticated(i3Browser) + if authenticated: + # Accessing the resources + data = i3Browser.recoverURL(qURL) + else: + # Accessing the resources + data = i3Browser.recoverURL(qURL) + except: + # No information was found, then we return a null entity + # TO-DO: i3BrowserException + return json.dumps(results) + + # Verifying if the platform exists + if self.somethingFound(data, mode=mode): + + if mode == "phonefy": + r = {} + r["type"] = "i3visio.phone" + r["value"] = self.platformName + " - " + query + r["attributes"] = [] + + # Appending platform URI + aux = {} + aux["type"] = "i3visio.uri" + aux["value"] = qURL + aux["attributes"] = [] + r["attributes"].append(aux) + + # Appending platform name + aux = {} + aux["type"] = "i3visio.platform" + aux["value"] = self.platformName + aux["attributes"] = [] + r["attributes"].append(aux) + + # Iterating if requested to extract more entities from the URI + if process: + # This function returns a json text! + r["attributes"] += json.loads(self.processData(data=data, mode=mode)) + # Appending the result to results: in this case only one profile will be grabbed + results.append(r) + + elif mode == "usufy": + r = {} + r["type"] = "i3visio.profile" + r["value"] = self.platformName + " - " + query + r["attributes"] = [] + + # Appending platform URI + aux = {} + aux["type"] = "i3visio.uri" + aux["value"] = qURL + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending the alias + aux = {} + aux["type"] = "i3visio.alias" + aux["value"] = query + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending platform name + aux = {} + aux["type"] = "i3visio.platform" + aux["value"] = self.platformName + aux["attributes"] = [] + r["attributes"].append(aux) + + + # Iterating if requested to extract more entities from the URI + if process: + # This function returns a json text! + r["attributes"] += json.loads(self.processData(data=data, mode=mode)) + + # Appending the result to results: in this case only one profile will be grabbed + results.append(r) + + elif mode == "searchfy": + # Recovering all the found aliases... + ids = re.findall(self.searchfyAliasRegexp, data, re.DOTALL) + + for j, i in enumerate(ids): + r = {} + r["type"] = "i3visio.profile" + r["value"] = self.platformName + " - " + i + r["attributes"] = [] + + # Appending platform URI + aux = {} + aux["type"] = "i3visio.uri" + # Creating the URI based on the base URL for the new profiles... + uri, alias = self.createURL(word=i, mode="base") + #uri=self.baseURL+i + + aux["value"] = uri + + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending the alias + aux = {} + aux["type"] = "i3visio.alias" + aux["value"] = alias + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending platform name + aux = {} + aux["type"] = "i3visio.platform" + aux["value"] = self.platformName + aux["attributes"] = [] + r["attributes"].append(aux) + # Appending the query performed to grab this items + aux = {} + aux["type"] = "i3visio.search" + aux["value"] = query + aux["attributes"] = [] + r["attributes"].append(aux) + + # TO-DO: + # Perform additional procesing + # Iterating the requested profiles to extract more entities from the URI would be slow! + """if process: + # This function returns a json text in usufy format for the returned objects. + r["attributes"] += json.loads(self.getInfo(process = True, mode="usufy", qURI=uri, query=i)) + # Appending the result to results: in this case only one profile will be grabbed""" + results.append(r) + return json.dumps(results) + + def modeIsValid(self, mode): + ''' + Verification of whether the mode is a correct option to be used. + + :param mode: Mode to be executed. + + :return: True if the mode exists in the three main folders. + ''' + if mode in self.isValidMode.keys(): + if mode in self.isValidMode.keys(): + return True + return False + + def processData(self, uri=None, data = None, mode=None): + ''' + Method to process and extract the entities of a URL of this type. + + :param uri: The URI of this platform to be processed. + :param data: The information from which the info will be extracted. This way, info will not be downloaded twice. + :param mode: Mode to be executed. + + :return: A list of the entities found. + ''' + if data == None: + # Accessing the resource + i3Browser = browser.Browser() + try: + # check if it needs creds + if self.needsCredentials[mode]: + authenticated = self._getAuthenticated(i3Browser) + if authenticated: + # Accessing the resources + data = i3Browser.recoverURL(uri) + else: + # Accessing the resources + data = i3Browser.recoverURL(uri) + except: + # No information was found, then we return a null entity + # TO-DO: i3BrowserException + return json.dumps({}) + #else: + # return json.dumps({}) + info = [] + + # Searchfy needs an special treatment to recover the results + if mode != "searchfy": + # Iterating through all the type of fields + for field in self.fieldsRegExp[mode].keys(): + # Recovering the RegularExpression + try: + # Using the old approach of "Start" + "End" + regexp = self.fieldsRegExp[mode][field]["start"]+"([^\)]+)"+self.fieldsRegExp[mode][field]["end"] + + tmp = re.findall(regexp, data) + + # Now we are performing an operation just in case the "end" tag is found in the results, which would mean that the tag selected matches something longer in the data. + values = [] + for t in tmp: + if self.fieldsRegExp[mode][field]["end"] in t: + + values.append(t.split(self.fieldsRegExp[mode][field]["end"])[0]) + else: + values.append(t) + + except: + # Using the compact approach if start and end tags do not exist. + regexp = self.fieldsRegExp[mode][field] + + values = re.findall(regexp, data) + + for val in values: + aux = {} + aux["type"] = field + aux["value"] = val + aux["attributes"] = [] + if aux not in info: + info.append(aux) + # Searchfy results + else: + # Grabbing the results for the search + resultText = re.findall(searchfyAliasRegexp, data) + # Analysing each and every result to parse it... + for resURI in resultText: + r = {} + r["type"] = "i3visio.uri" + r["value"] = resURI + r["attributes"] = [] + """# Iterating through all the type of fields + i3Browser = browser.Browser() + try: + # check if the profile needs credentials in usufy mode + if self.needsCredentials["usufy"]: + authenticated = self._getAuthenticated(i3Browser) + if authenticated: + # Accessing the resources + data = i3Browser.recoverURL(resURI) + else: + # Accessing the resources + data = i3Browser.recoverURL(resURI) + except: + data = "" + for field in self.fieldsRegExp["usufy"].keys(): + # Building the regular expression if the format is a "start" and "end" approach... Easier to understand but less compact. + try: + # Using the old approach of "Start" + "End" + regexp = self.fieldsRegExp["usufy"][field]["start"]+"([^\)]+)"+self.fieldsRegExp["usufy"][field]["end"] + + # Parsing the result for the text + tmp = re.findall(regexp, data) + + # Now we are performing an operation just in case the "end" tag is found in the results, which would mean that the tag selected matches something longer in the data. + values = [] + for t in tmp: + if self.fieldsRegExp["usufy"][field]["end"] in t: + + values.append(t.split(self.fieldsRegExp["usufy"][field]["end"])[0]) + else: + values.append(t) + # In the case of a compact approach being used. This would happen if start and end tags do not exist, but the expected behaviour is the same. + except: + regexp = self.fieldsRegExp["usufy"][field] + + values = re.findall(regexp, data) + + if field == "i3visio.uri": + for val in values: + r["value"] = val + else: + for val in values: + aux = {} + aux["type"] = field + aux["value"] = val + aux["attributes"] = [] + if aux not in r["attributes"]: + r["attributes"].append(aux) """ + r["attributes"] = json.loads(self.getInfo(process = True, mode="usufy", qURI=resURI)) + info.append(r) + return json.dumps(info) + + def somethingFound(self,data,mode="phonefy"): + ''' + Verifying if something was found. + + :param data: Data where the self.notFoundText will be searched. + :param mode: Mode to be executed. + + :return: Returns True if exists. + ''' + #try: + for text in self.notFoundText[mode]: + if text in data: + return False + return True + #except: + # pass + # # TO-DO: Throw notFoundText not found for this mode. + + def __str__(self): + ''' + Function to represent the text when printing the object + + :return: self.platformName + ''' + try: + return self.parameterName + except: + return self.platformName + + def __eq__(self, obj): + ''' + Function to check if two wrappers are the same based on the convention. + + :return: True or False + ''' + return self.platformName == obj.platformName + + def _getAuthenticated(self, browser): + ''' + Getting authenticated. This method will be overwritten. + + :param browser: The browser in which the user will be authenticated. + ''' + # check if we have creds + if len(self.creds) > 0: + # choosing a cred + c = random.choice(self.creds) + # adding the credential + browser.setNewPassword(url, c.user, c.password) + return True + else: + logger.debug("No credentials have been added and this platform needs them.") + return False + + def _isValidQuery(self, query, mode="phonefy"): + ''' + Method to verify if a given query is processable by the platform. The system looks for the forbidden characters in self.Forbidden list. + + :param query: + :param mode: To be chosen amongst phonefy, usufy and searchfy. + :return: True | False + ''' + # Verifying if the mode supports such a query + try: + # Checking if the query matched the compiled regexp + compiledRegexp = re.compile("^" + self.validQuery[mode] + "$") + if compiledRegexp.match(query): + """print "VALID query:" + print "\tmode: ", mode + print "\tquery: ", query""" + return True + else: + # The query would have returned a bigger array + """print "Invalid query:" + print "\tMode: ", mode + print "\tQuery: ", query""" + return False + except Exception as e: + # If something happened... just returning True + print "Oops. Something happened when validating the query:" + print "\tError: ", str(e) + print "\tMode: ", mode + print "\tQuery: ", query + print "\tPlatform: ", self.platformName + return True + + + def setCredentials(self, cred): + """ + Getting the credentials and appending it to self.creds. + """ + try: + self.creds.append(cred) + except: + pass diff --git a/osrframework/utils/regexp.py b/osrframework/utils/regexp.py new file mode 100644 index 0000000..50dfeab --- /dev/null +++ b/osrframework/utils/regexp.py @@ -0,0 +1,170 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This file is part of OSRFramework. +# +# OSRFramework is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + + +import os +import re +import copy +# logging imports +import logging + +class RegexpObject(): + ''' + class. + ''' + def __init__(self): + ''' + Constructor without parameters... + Most of the times, this will be the ONLY method needed to be overwritten. + ''' + # This is the tag of the regexp + self.name = "" + # This is the string containing the regexp to be seeked + self.reg_exp = [] + + + def __init__(self, name, reg_exp): + ''' + Constructor with parameters. This method permits the developer to instantiate dinamically objects. + + :param name: string containing the name of the regular expression. + :param reg_exp: list of strings containing the regular expresion. + ''' + # This is the tag of the regexp + self.name = name + # This is the string containing the reg_exp to be seeked + self.reg_exp = [reg_exp] + + + def __str__(self): + ''' + Function to obtain the text that represents this object. + + :return: str(self.getJson()) + ''' + return str(self.getResults()) + + def getAttributes(self, found = None): + ''' + Method to extract additional attributes from a given expression (i. e.: domains and ports from URL and so on). This method may be overwritten in certain child classes. + :param found: expression to be processed. + :return: The output format will be like: + [{"type" : "i3visio.email", "value": "foo@bar.com", "attributes": [] }, {"type" : "i3visio.email", "value": "bar@foo.com", "attributes": [] }] + ''' + return [] + + def getEntityType(self, found = None): + ''' + Method to recover the value of the entity in case it may vary. By default this method does nothing but returning the entity type. However, some plugins may have to choose the entity type. This method may be overwritten in certain child classes. + :param found: The expression to be analysed. + :return: The entity type to be provided. + ''' + return self.name + + def getValue(self, found = None): + ''' + Method to recover the value of the entity in case it needs any kind of processing. By default this method does nothing but returning the value. However, some plugins may need transformations such as the foo[at]bar[dot]com to be foo@bar.com. This method may be overwritten in certain child classes. + :param found: The expression to be analysed. + :return: Any kind of transformed value. + ''' + return found + + def getResults(self, parFound = None): + ''' + Function to obtain the Dictionarythat represents this object. + + :param parFound: values to return. + + :return: The output format will be like: + [{"type" : "i3visio.email", "value": "foo@bar.com", "attributes": [] }, {"type" : "i3visio.email", "value": "bar@foo.com", "attributes": [] }] + ''' + # Defining a dictionary + results = [] + # Defining a dictionary inside with a couple of fields: reg_exp for the regular expression and found_exp for the expressions found. + #results[self.name] = {"reg_exp" : self.reg_exp, "found_exp" : parFound} + #results[self.name] = parFound + if len(parFound ) >0: + for found in parFound: + aux = {} + aux["type"] = self.getEntityType(found) + aux["value"] = self.getValue(found) + aux["attributes"] = self.getAttributes(found) + results.append(aux) + return results + + def isValidExp(self, exp): + ''' + Method to verify if a given expression is correct just in case the used regular expression needs additional processing to verify it. + This method will be overwritten when necessary. + + :param exp: Expression to verify. + + :return: True | False + ''' + return True + + + def findExp(self, data): + ''' + Method to look for the current regular expression in the provided string. + + :param data: string containing the text where the expressions will be looked for. + + :return: a list of verified regular expressions. + ''' + temp = [] + for r in self.reg_exp: + try: + temp += re.findall(r, data) + except: + print self.name + print r + print "CABOOOOM!" + + verifiedExp = [] + # verification + for t in temp: + # Remember: the regexps include two extra charactes (before and later) that should be removed now. + if self.isValidExp(t): + if t not in verifiedExp: + verifiedExp.append(t) + + return self.getResults(verifiedExp) + + + def __str__(self): + ''' + Function to represent the text when printing the object + + :return: self.platformName + ''' + try: + return self.name + except: + return "UNKNOWN_NAME" + + def __eq__(self, obj): + ''' + Function to check if two wrappers are the same based on the convention. + + :return: True or False + ''' + return self.name == obj.name diff --git a/osrframework/utils/regexp_selection.py b/osrframework/utils/regexp_selection.py new file mode 100644 index 0000000..2243eeb --- /dev/null +++ b/osrframework/utils/regexp_selection.py @@ -0,0 +1,171 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import os +import sys + +import pkgutil +import importlib +import inspect + +import copy + +import osrframework.patterns +import osrframework.utils.configuration as configuration + +def getAllRegexp(): + ''' + Method that recovers ALL the list of classes to be processed.... + + :return: Returns a list [] of classes. + ''' + + listAll = [] + + ############################################################################ + ############################################################################ + + # -------------------------------------------------------------------------- + # Dinamically collecting all the "official" modules + # -------------------------------------------------------------------------- + + # A list that will contain all of the module names + all_modules = [] + + # Grabbing all the module names + for _, name, _ in pkgutil.iter_modules(osrframework.patterns.__path__): + all_modules.append("osrframework.patterns." + name) + + # Iterating through all the module names to grab them + for moduleName in all_modules: + # Importing the module + my_module = importlib.import_module(moduleName) + + # Getting all the classNames. + classNames = [m[0] for m in inspect.getmembers(my_module, inspect.isclass) if m[1].__module__ == moduleName] + + # Dinamically grabbing the first class of the module. IT SHOULD BE ALONE! + MyClass = getattr(my_module, classNames[0]) + + # Instantiating the object + newInstance = MyClass() + + # Adding to the list! + listAll.append(newInstance) + + # -------------------------------------------------------------------------- + # Loading user-defined wrappers under [OSRFrameworkHOME]/plugins/patterns/ + # -------------------------------------------------------------------------- + + # Creating the application paths + paths = configuration.getConfigPath() + + newPath = os.path.abspath(paths["appPathPatterns"]) + + # Inserting in the System Path + if not newPath in sys.path: + sys.path.append(newPath) + + userImportedModules = {} + + for module in os.listdir(newPath): + if module[-3:] == '.py': + current = module.replace('.py', '') + userImportedModules[current] = __import__(current) + + del newPath + + userClasses = [] + + # Iterating through all the files + for userModule in userImportedModules.keys(): + + my_module = userImportedModules[userModule] + # Getting all the classNames. + classNames = [m[0] for m in inspect.getmembers(my_module, inspect.isclass) if m[1].__module__ == userModule] + + # Dinamically grabbing the first class of the module. IT SHOULD BE ALONE! + MyClass = getattr(my_module, classNames[0]) + + # Instantiating the object + newInstance = MyClass() + + # Adding to the list! + userClasses.append(newInstance) + + # -------------------------------------------------------------------------- + # Overwriting original modules with the user plugins + # -------------------------------------------------------------------------- + listToAdd = [] + for userClass in userClasses: + for i, officialClass in enumerate(listAll): + # Checking if the name is the same + if str(userClass) == str(officialClass): + # Replacing the official module if a user module exists for it + listAll[i] = userClass + else: + if userClass not in listToAdd: + # Appending the new class + listToAdd.append(userClass) + + # Merging listAll and listToAdd + listAll = listAll + listToAdd + ############################################################################ + ############################################################################ + + return listAll + +def getAllRegexpNames(regexpList = None): + ''' + Method that recovers the names of the in a given list. + + :param regexpList: list of . If None, all the available will be recovered. + + :return: Array of strings containing the available regexps. + ''' + if regexpList == None: + regexpList = getAllRegexp() + listNames = ['all'] + # going through the regexpList + for r in regexpList: + listNames.append(r.name) + return listNames + +def getRegexpsByName(regexpNames = ['all']): + ''' + Method that recovers the names of the in a given list. + + :param regexpNames: list of strings containing the possible regexp. + + :return: Array of classes. + ''' + + allRegexpList = getAllRegexp() + if 'all' in regexpNames: + return allRegexpList + + regexpList = [] + # going through the regexpList + for name in regexpNames: + for r in allRegexpList: + if name == r.name: + regexpList.append(r) + return regexpList diff --git a/osrframework/utils/updates.py b/osrframework/utils/updates.py new file mode 100644 index 0000000..de45015 --- /dev/null +++ b/osrframework/utils/updates.py @@ -0,0 +1,50 @@ +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2014-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This file is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +import xmlrpclib +import pip + + +def hasUpdatesOnPypi(packageName="osrframework"): + installedPackage = None + for dist in pip.get_installed_distributions(): + if dist.project_name == packageName: + installedPackage = dist + break + + pypi = xmlrpclib.ServerProxy('https://pypi.python.org/pypi') + # This is an array + version_available = pypi.package_releases(packageName) + try: + if version_available[0] == installedPackage.version: + # No updates available + return False, installedPackage.version + else: + # There are updates available! + return True, version_available[0] + except IndexError as e: + if not installedPackage: + # Yes, the package has no version on Pypi + return False, "No version found" + + +if __name__ == "__main__": + print hasUpdatesOnPypi() diff --git a/osrframework/wrappers/__init__.py b/osrframework/wrappers/__init__.py new file mode 100644 index 0000000..e162617 --- /dev/null +++ b/osrframework/wrappers/__init__.py @@ -0,0 +1,24 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import osrframework.utils.logger + +# Calling the logger when being imported +osrframework.utils.logger.setupLogger(loggerName="osrframework.wrappers") diff --git a/osrframework/wrappers/abou.py b/osrframework/wrappers/abou.py new file mode 100644 index 0000000..1a59204 --- /dev/null +++ b/osrframework/wrappers/abou.py @@ -0,0 +1,121 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Abou(Platform): + """ + A object for Abou. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Abou" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://abou.to/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

404

","

Oops, the page you're looking for does not exist.

"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": '

', "end": "

"} + self.fieldsRegExp["usufy"]["i3visio.alias.youtube"] = {"start": ''} + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/about.py b/osrframework/wrappers/about.py new file mode 100644 index 0000000..1d71db3 --- /dev/null +++ b/osrframework/wrappers/about.py @@ -0,0 +1,117 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class About(Platform): + """ + A object for About. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "About" + self.tags = ["blog"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://about.me/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["about.me | your personal homepage"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": "", "end": " | about.me"} + self.fieldsRegExp["usufy"]["i3visio.description"] = {"start": '

', "end": "

"} + self.fieldsRegExp["usufy"]["i3visio.alias.twitter"] = {"start": 'title="Visit me on Twitter" href="https://www.twitter.com/', "end": '" target="_blank"'} + self.fieldsRegExp["usufy"]["i3visio.alias.linkedin"] = {"start": 'title="Visit me on LinkedIn" href="http://www.linkedin.com/in/', "end": '" target="_blank"'} + self.fieldsRegExp["usufy"]["i3visio.interests"] = {"start": ''} + self.fieldsRegExp["usufy"]["i3visio.personal_website"] = {"start": '"text":"Visit my website","url":"', "end": '"'} + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/affilorama.py b/osrframework/wrappers/affilorama.py new file mode 100644 index 0000000..07778b4 --- /dev/null +++ b/osrframework/wrappers/affilorama.py @@ -0,0 +1,120 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Affilorama(Platform): + """ + A object for Affilorama. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Affilorama" + self.tags = ["e-commerce"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.affilorama.com/member/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Member profile unavailable | Affilorama"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.uri_image_profile"] = {"start": ''} + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": 'content="', "end": 'on Affilorama.'} + self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": '', "end": ''} + self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": '', "end": ''} + self.fieldsRegExp["usufy"]["i3visio.twitter"] = {"start": 'data-name="data[Member][twitter]">
. +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Ahmia(Platform): + """ + A object for Ahmia. + """ + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Ahmia" + self.tags = ["tor", "search"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = False + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + #self.url["usufy"] = "http://anyurl.com/user/" + "" + self.url["searchfy"] = "https://ahmia.fi/search/?q=" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + #self.needsCredentials["usufy"] = False + self.needsCredentials["searchfy"] = False + + ################### + # Valid queries # + ################### + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + #self.validQuery["usufy"] = ".*" + self.validQuery["searchfy"] = ".+" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + #self.notFoundText["usufy"] = [] + self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + #self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + self.fieldsRegExp["searchfy"] = {} + # Example of fields: + self.delimiters = {} + # These two fields are REQUIRED to grab the results + self.searchfyDelimiterStart = "
  • " + self.searchfyDelimiterEnd = "
  • " + # These rest of fields to extract + self.fieldsRegExp["searchfy"]["i3visio.date"] = {"start": "

    ", "end": "

    "} + self.fieldsRegExp["searchfy"]["i3visio.text"] = {"start": "
    ", "end": "
    "} + self.fieldsRegExp["searchfy"]["i3visio.title"] = {"start": "

    ", "end": "

    "} + #self.fieldsRegExp["searchfy"]["i3visio.uri"] = {"start": "

    Access without Tor Browser: "} + self.fieldsRegExp["searchfy"]["i3visio.uri"] = {"start": "redirect_url=", "end": "\">"} + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/anarchy101.py b/osrframework/wrappers/anarchy101.py new file mode 100644 index 0000000..76620d1 --- /dev/null +++ b/osrframework/wrappers/anarchy101.py @@ -0,0 +1,132 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Anarchy101(Platform): + """ + A object for Anarchy101. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Anarchy101" + # Add the tags for the platform + self.tags = ["activism"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.anarchy101.org/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["User not found", "Could not establish database connection. Please check the username", "Page not found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + # User + self.fieldsRegExp["usufy"]["i3visio.profile.anarchy101"] = {"start": "var qa_request='user/", "end": "';"} + # Member for + self.fieldsRegExp["usufy"]["@member_for"] = {"start": "Member for:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@type"] = {"start": "Type:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": "Full name:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": "Location:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["i3visio.uri.home"] = {"start": "Website:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t", "end": ""} + # About + self.fieldsRegExp["usufy"]["i3visio.text"] = {"start": "About:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@score"] = {"start": "Score:\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@questions"] = {"start": "Questions:\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@answers"] = {"start": "Answers:\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@¢omments"] = {"start": "Comments:\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@voted_on"] = {"start": "Voted on:\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@gave_out"] = {"start": "Gave out:\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@received"] = {"start": "Received:\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t", "end": ""} + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + + diff --git a/osrframework/wrappers/angel.py b/osrframework/wrappers/angel.py new file mode 100644 index 0000000..1c59b1c --- /dev/null +++ b/osrframework/wrappers/angel.py @@ -0,0 +1,118 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Angel(Platform): + """ + A object for Angel. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Angel" + self.tags = ["jobs", "e-commerce"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://angel.co/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ['Page not found - 404 - AngelList', 'IP Blocked'] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = "(.+) - AngelList" + self.fieldsRegExp["usufy"]["i3visio.domain"] = {"start": 'rel="nofollow noopener noreferrer me" target="_blank">. +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Archive(Platform): + """ + A object for Archive. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Archive" + self.tags = ["blog"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://archive.org/details/@" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["cannot find account"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.uri_image_profile"] = {"start": 'Posts by ', "end": ''} + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/arduino.py b/osrframework/wrappers/arduino.py new file mode 100644 index 0000000..346f266 --- /dev/null +++ b/osrframework/wrappers/arduino.py @@ -0,0 +1,131 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Arduino(Platform): + """ + A object for Arduino. + """ + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Arduino" + self.tags = ["development", "hardware"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forum.arduino.cc/index.php?action=profile;user=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["The user whose profile you are trying to view does not exist."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": "Name: \n\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@total_posts"] = {"start": "Posts: \n\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@position"] = {"start": "Posts: \n\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@karma"] = {"start": "Karma: \n\t\t\t\t\t\n\t\t\t\t\t\t", "end": "\n\t\t\t\t\t"} + self.fieldsRegExp["usufy"]["i3visio.date"] = {"start": "Date Registered: \n\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@last_active"] = {"start": "Last Active: \n\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@ICQ"] = {"start": "ICQ:\n\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@AIM"] = {"start": "AIM: \n\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@MSN"] = {"start": "MSN: \n\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@YIM"] = {"start": "YIM: \n\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["i3visio.email"] = {"start": "Email: \n\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["i3visio.uri.homepage"] = {"start": "Website: \n\t\t\t\t\tCurrent Status: \n\t\t\t\t\t\n\t\t\t\t\t\t\"Offline\"", "end": ""} + self.fieldsRegExp["usufy"]["@gender"] = {"start": "Gender: \n\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@age"] = {"start": "Age:\n\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": "Location:\n\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@local_time"] = {"start": "Local Time:\n\t\t\t\t\t", "end": ""} + self.fieldsRegExp["usufy"]["@language"] = {"start": "Language:\n\t\t\t\t\t", "end": ""} + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + diff --git a/osrframework/wrappers/ariva.py b/osrframework/wrappers/ariva.py new file mode 100644 index 0000000..2d522f5 --- /dev/null +++ b/osrframework/wrappers/ariva.py @@ -0,0 +1,129 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Ariva(Platform): + """ + A object for Ariva. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Ariva" + + self.tags = ["opinions", "professional"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.ariva.de/profil/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Fehler (404)"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["@profil"] = {"start": ""} + self.fieldsRegExp["usufy"]["@image"] = {"start": "solid #FFFFFF\" src=\"", "end": "\""} + self.fieldsRegExp["usufy"]["@clearfloat"] = {"start": "

    ", "end": "
    "} + self.fieldsRegExp["usufy"]["@mitgl. seit, Sterne"] = {"start": "Mitgl. seit, Sterne \n\n\t\t\t\t\t", "end": " \n\n\t\t\t\t\t", "end": "\n"} + self.fieldsRegExp["usufy"]["@alter"] = {"start": "
    . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Armorgames(Platform): + """ + A object for Armorgames. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Armorgames" + self.tags = ["gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://armorgames.com/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^@]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Ooops! | Armor Games"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": '', "end": 'Profile | Armor Games'} + self.fieldsRegExp["usufy"]["@created_at"] = {"start": '
  • Member since:', "end": '
  • '} + self.fieldsRegExp["usufy"]["i3visio.uri_image_profile"] = {"start": ''} + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/askfm.py b/osrframework/wrappers/askfm.py new file mode 100644 index 0000000..31e9ec8 --- /dev/null +++ b/osrframework/wrappers/askfm.py @@ -0,0 +1,116 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Askfm(Platform): + """ + A object for Askfm. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Askfm" + self.tags = ["opinions", "social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://ask.fm/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^@\.]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Page not found | Ask.fm"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": 'class="blockLink">', "end": ''} + self.fieldsRegExp["usufy"]["i3visio.uri_image_profile"] = {"start": ''} + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + + diff --git a/osrframework/wrappers/audiob.py b/osrframework/wrappers/audiob.py new file mode 100644 index 0000000..bbdeb47 --- /dev/null +++ b/osrframework/wrappers/audiob.py @@ -0,0 +1,122 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Audiob(Platform): + """ + A object for Audiob. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Audiob" + self.tags = ["audio"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forum.audiob.us/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^@]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Audiobus Forum"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": '', "end": '- Audiobus Forum'} + self.fieldsRegExp["usufy"]["i3visio.uri_image_profile"] = {"start": '
    \n'} + self.fieldsRegExp["usufy"]["@created_at"] = {"start": '
    '} + self.fieldsRegExp["usufy"]["@last_activity"] = {"start": '
    '} + + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + + + diff --git a/osrframework/wrappers/audioboo.py b/osrframework/wrappers/audioboo.py new file mode 100644 index 0000000..b243a37 --- /dev/null +++ b/osrframework/wrappers/audioboo.py @@ -0,0 +1,118 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Audioboo(Platform): + """ + A object for Audioboo. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Audioboo" + self.tags = ["audio"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://audioboo.fm/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^@]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Audioboo / Not Found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": '
    avatar'} + self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": "

    ", "end": '

    '} + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + + + diff --git a/osrframework/wrappers/authorstream.py b/osrframework/wrappers/authorstream.py new file mode 100644 index 0000000..0fdb2ad --- /dev/null +++ b/osrframework/wrappers/authorstream.py @@ -0,0 +1,121 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Authorstream(Platform): + """ + A object for Authorstream. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Authorstream" + self.tags = ["professional"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.authorstream.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^@]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [" We apologize for this inconvenience. "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = {"start": '', "end": ''} + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": '', "end": ''} + #self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": '

    \n ', "end": ', '} + self.fieldsRegExp["usufy"]["i3visio.uri_image_profile"] = {"start": '\n', "end": '\n

    \n'} + self.fieldsRegExp["usufy"]["@created_at"] = {"start": '', "end": '
    '} + self.fieldsRegExp["usufy"]["i3visio.domain"] = {"start": 'Website: '} + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + + diff --git a/osrframework/wrappers/autospies.py b/osrframework/wrappers/autospies.py new file mode 100644 index 0000000..f4e1d6a --- /dev/null +++ b/osrframework/wrappers/autospies.py @@ -0,0 +1,115 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Autospies(Platform): + """ + A object for Autospies. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Autospies" + self.tags = ["e-commerce", "opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.autospies.com/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^@]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ['\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tMy'] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + #self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + + diff --git a/osrframework/wrappers/badoo.py b/osrframework/wrappers/badoo.py new file mode 100644 index 0000000..8f1445d --- /dev/null +++ b/osrframework/wrappers/badoo.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Badoo(Platform): + """ + A object for Badoo. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Badoo" + self.tags = ["contact"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://badoo.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["https://badoocdn.com/v2/-/-/i/hotornot_v2/blocker/blocker-error.7.svg"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": '', "end": ''} + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/bandcamp.py b/osrframework/wrappers/bandcamp.py new file mode 100644 index 0000000..797652e --- /dev/null +++ b/osrframework/wrappers/bandcamp.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Bandcamp(Platform): + """ + A object for Bandcamp. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Bandcamp" + self.tags = ["music"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://bandcamp.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Sign Up for an Artist Account

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": '\n
    . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Bebee(Platform): + """ + A object for Bebee. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Bebee" + self.tags = ["jobs"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://bebee.com/bee/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [''] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": '', "end": '- beBee'} + self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": '', "end": ''} + self.fieldsRegExp["usufy"]["i3visio.alias.googleplus"] = {"start": '
    . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Behance(Platform): + """ + A object for Behance. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Behance" + self.tags = ["image"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.behance.net/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Behance :: This page cannot be found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": 'href="/search?content=users&sort=appreciations&country=', "end": '&'} + self.fieldsRegExp["usufy"]["i3visio.domain"] = {"start": 'href="" href="', "end": '"'} + self.fieldsRegExp["usufy"]["i3visio.alias.twitter"] = {"start": 'href="http://twitter.com/', "end": '"'} + self.fieldsRegExp["usufy"]["i3visio.alias.facebook"] = {"start": 'href="http://facebook.com/', "end": '"'} + self.fieldsRegExp["usufy"]["i3visio.alias.pinterest"] = {"start": 'href="http://pinterest.com/', "end": '"'} + self.fieldsRegExp["usufy"]["i3visio.alias.vimeo"] = {"start": 'href="http://vimeo.com/', "end": '"'} + self.fieldsRegExp["usufy"]["i3visio.alias.instagram"] = {"start": 'href="http://instagram.com/', "end": '"'} + self.fieldsRegExp["usufy"]["i3visio.alias.wacom"] = {"start": 'href="http://gallery.wacom.com/', "end": '"'} + self.fieldsRegExp["usufy"]["i3visio.alias.pantone"] = {"start": 'href="http://canvas.pantone.com/', "end": '"'} + self.fieldsRegExp["usufy"]["i3visio.i3visio.uri_image_profile"] = {"start": 'id="profile-image" src="', "end": '"'} + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/bennugd.py b/osrframework/wrappers/bennugd.py new file mode 100644 index 0000000..4d9b026 --- /dev/null +++ b/osrframework/wrappers/bennugd.py @@ -0,0 +1,118 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Bennugd(Platform): + """ + A object for Bennugd. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Bennugd" + self.tags = ["gaming", "development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forum.bennugd.org/index.php?action=profile;user=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["El usuario cuyo perfil estás intentando editar no existe."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": '

    ', "end": 'Sexo: \n\t\t\t\t\t
    ', "end": '
    '} + self.fieldsRegExp["usufy"]["@age"] = {"start": '
    Edad:
    \n\t\t\t\t\t
    ', "end": '
    '} + self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": '
    Ubicación:
    \n\t\t\t\t\t
    ', "end": '
    '} + self.fieldsRegExp["usufy"]["@last_active"] = {"start": '
    \xe9ltima vez activo:
    \n\t\t\t\t\t
    ', "end": '
    '} + self.fieldsRegExp["usufy"]["@created_at"] = {"start": '
    Fecha de registro:
    \n\t\t\t\t\t
    ', "end": '
    '} + self.fieldsRegExp["usufy"]["@language"] = {"start": '
    Idioma:
    \n\t\t\t\t\t
    ', "end": '
    '} + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/betblog.py b/osrframework/wrappers/betblog.py new file mode 100644 index 0000000..efbe343 --- /dev/null +++ b/osrframework/wrappers/betblog.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Betblog(Platform): + """ + A object for Betblog. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Betblog" + self.tags = ["betting"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.betblog.com/tipster/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404. Page not found."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/bitbucket.py b/osrframework/wrappers/bitbucket.py new file mode 100644 index 0000000..92e46dd --- /dev/null +++ b/osrframework/wrappers/bitbucket.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Bitbucket(Platform): + """ + A object for Bitbucket. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Bitbucket" + self.tags = ["development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://bitbucket.org/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Oops, you've found a dead link"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": '<h1>\n \n ', "end": '\n \n <span class="username">'} + self.fieldsRegExp["usufy"]["i3visio.domain"] = {"start": 'rel="me nofollow">', "end": "</a>"} + self.fieldsRegExp["usufy"]["@created_at"] = {"start": 'data-format="mmmm yyyy">', "end": "</time>"} + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/bitcointa.py b/osrframework/wrappers/bitcointa.py new file mode 100644 index 0000000..5c4fc6b --- /dev/null +++ b/osrframework/wrappers/bitcointa.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Bitcointa(Platform): + """ + A <Platform> object for Bitcointa. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Bitcointa" + self.tags = ["cryptocurrencies"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "<phonefy>" + self.url["usufy"] = "http://bitcointa.lk/members/?username=" + "<usufy>" + #self.url["searchfy"] = "http://anyurl.com/search/" + "<searchfy>" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["<title>Notable Members | Bitcointa.lk"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/bitcointalk.py b/osrframework/wrappers/bitcointalk.py new file mode 100644 index 0000000..1232dea --- /dev/null +++ b/osrframework/wrappers/bitcointalk.py @@ -0,0 +1,125 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Bitcointalk(Platform): + """ + A object for Bitcointalk. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Bitcointalk" + self.tags = ["cryptocurrencies"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://bitcointalk.org/index.php?action=profile;user=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["The user whose profile you are trying to view does not exist."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": 'Name: \n\t\t\t\t\t', "end": ""} + self.fieldsRegExp["usufy"]["@created_at"] = {"start": 'Date Registered: \n\t\t\t\t\t', "end": ""} + self.fieldsRegExp["usufy"]["@last_activity"] = {"start": 'Last Active: \n\t\t\t\t\t', "end": ""} + self.fieldsRegExp["usufy"]["@ICQ"] = {"start": 'ICQ:\n\t\t\t\t\t', "end": ""} + self.fieldsRegExp["usufy"]["@AIM"] = {"start": 'AIM:\n\t\t\t\t\t', "end": ""} + self.fieldsRegExp["usufy"]["@MSN"] = {"start": 'AIM:\n\t\t\t\t\t', "end": ""} + self.fieldsRegExp["usufy"]["@YIM"] = {"start": 'AIM:\n\t\t\t\t\t', "end": ""} + self.fieldsRegExp["usufy"]["@Email"] = {"start": 'AIM:\n\t\t\t\t\t', "end": ""} + self.fieldsRegExp["usufy"]["i3visio.domain"] = {"start": 'AIM:\n\t\t\t\t\t
    Gender:\n\t\t\t\t\t', "end": ""} + self.fieldsRegExp["usufy"]["@age"] = {"start": 'Gender:\n\t\t\t\t\t', "end": ""} + self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": 'Location:\n\t\t\t\t\t', "end": ""} + self.fieldsRegExp["usufy"]["@local_time"] = {"start": 'Local Time:\n\t\t\t\t\t', "end": ""} + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/bitly.py b/osrframework/wrappers/bitly.py new file mode 100644 index 0000000..70d1824 --- /dev/null +++ b/osrframework/wrappers/bitly.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Bitly(Platform): + """ + A object for Bitly. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Bitly" + self.tags = ["tools"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://bitly.com/u/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["bitly | Page Not Found | 404"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/bitrated.py b/osrframework/wrappers/bitrated.py new file mode 100644 index 0000000..195f43d --- /dev/null +++ b/osrframework/wrappers/bitrated.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Bitrated(Platform): + """ + A object for Bitrated. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Bitrated" + self.tags = ["cryptocurrencies"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.bitrated.com/" + "" + ".json" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ['{"message":"Page not found"}'] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = "\"full_name\":\"([^\"]+)\",\"title" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/blackplanet.py b/osrframework/wrappers/blackplanet.py new file mode 100644 index 0000000..a5a3c3d --- /dev/null +++ b/osrframework/wrappers/blackplanet.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Blackplanet(Platform): + """ + A object for Blackplanet. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Blackplanet" + self.tags = ["contact"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.blackplanet.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Page not found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/blip.py b/osrframework/wrappers/blip.py new file mode 100644 index 0000000..582c526 --- /dev/null +++ b/osrframework/wrappers/blip.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Blip(Platform): + """ + A <Platform> object for Blip. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Blip" + self.tags = ["audio"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "<phonefy>" + self.url["usufy"] = "http://blip.fm/" + "<usufy>" + #self.url["searchfy"] = "http://anyurl.com/search/" + "<searchfy>" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Sorry, but the page you are trying to view does not exist."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/blogmarks.py b/osrframework/wrappers/blogmarks.py new file mode 100644 index 0000000..dae3097 --- /dev/null +++ b/osrframework/wrappers/blogmarks.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Blogmarks(Platform): + """ + A <Platform> object for Blogmarks. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Blogmarks" + self.tags = ["blog"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "<phonefy>" + self.url["usufy"] = "http://blogmarks.net/user/" + "<usufy>" + #self.url["searchfy"] = "http://anyurl.com/search/" + "<searchfy>" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["<p>Sorry, this user does not exist.</p>"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/blogspot.py b/osrframework/wrappers/blogspot.py new file mode 100644 index 0000000..70d6bbd --- /dev/null +++ b/osrframework/wrappers/blogspot.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Blogspot(Platform): + """ + A <Platform> object for Blogspot. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Blogspot" + self.tags = ["blog", "opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "<phonefy>" + self.url["usufy"] = "http://" + "<usufy>" + ".blogspot.com.es/" + #self.url["searchfy"] = "http://anyurl.com/search/" + "<searchfy>" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["<title>No se ha encontrado el blog."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/bookofmatches.py b/osrframework/wrappers/bookofmatches.py new file mode 100644 index 0000000..50ebc5a --- /dev/null +++ b/osrframework/wrappers/bookofmatches.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Bookofmatches(Platform): + """ + A object for Bookofmatches. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Bookofmatches" + self.tags = ["contact"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.bookofmatches.com/profile/page/" + "" + ".html" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["BookofMatches.com"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/boonex.py b/osrframework/wrappers/boonex.py new file mode 100644 index 0000000..901f9ee --- /dev/null +++ b/osrframework/wrappers/boonex.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Boonex(Platform): + """ + A <Platform> object for Boonex. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Boonex" + self.tags = ["development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "<phonefy>" + self.url["usufy"] = "http://www.boonex.com/" + "<usufy>" + #self.url["searchfy"] = "http://anyurl.com/search/" + "<searchfy>" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Requested profile is not available"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/bordom.py b/osrframework/wrappers/bordom.py new file mode 100644 index 0000000..b92d70d --- /dev/null +++ b/osrframework/wrappers/bordom.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Bordom(Platform): + """ + A <Platform> object for Bordom. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Bordom" + self.tags = ["image"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "<phonefy>" + self.url["usufy"] = "http://www.bordom.net/user/" + "<usufy>" + #self.url["searchfy"] = "http://anyurl.com/search/" + "<searchfy>" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["No such user by that name"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/boxedup.py b/osrframework/wrappers/boxedup.py new file mode 100644 index 0000000..9a30dd7 --- /dev/null +++ b/osrframework/wrappers/boxedup.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Boxedup(Platform): + """ + A <Platform> object for Boxedup. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Boxedup" + self.tags = ["e-commerce", "tools"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "<phonefy>" + self.url["usufy"] = "http://www.boxedup.com/" + "<usufy>" + #self.url["searchfy"] = "http://anyurl.com/search/" + "<searchfy>" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["<title>boxedup | People"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/breakcom.py b/osrframework/wrappers/breakcom.py new file mode 100644 index 0000000..1cce738 --- /dev/null +++ b/osrframework/wrappers/breakcom.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the Affero GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.1" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Breakcom(Platform): + """ + A object for Breakcom. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Breakcom" + self.tags = ["video"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.break.com/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Break.com"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/bubok.py b/osrframework/wrappers/bubok.py new file mode 100644 index 0000000..5132101 --- /dev/null +++ b/osrframework/wrappers/bubok.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Bubok(Platform): + """ + A object for Bubok. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Bubok" + self.tags = ["books"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.bubok.es/autores/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["PRESENTACIONES Y EVENTOS"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/bucketlistly.py b/osrframework/wrappers/bucketlistly.py new file mode 100644 index 0000000..0982c1a --- /dev/null +++ b/osrframework/wrappers/bucketlistly.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Bucketlistly(Platform): + """ + A object for Bucketlistly. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Bucketlistly" + self.tags = ["trips"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.bucketlistly.com/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^0-9][^\.]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Sorry, the page you are looking for doesn't exist. (404) - Bucketlistly"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/buddypic.py b/osrframework/wrappers/buddypic.py new file mode 100644 index 0000000..d616afd --- /dev/null +++ b/osrframework/wrappers/buddypic.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Buddypic(Platform): + """ + A object for Buddypic. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Buddypic" + self.tags = ["dating"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.buddypic.com/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [" am sorry but that username cannot be found. Please check the spelling and try again."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/burbuja.py b/osrframework/wrappers/burbuja.py new file mode 100644 index 0000000..6242c32 --- /dev/null +++ b/osrframework/wrappers/burbuja.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Burbuja(Platform): + """ + A object for Burbuja. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Burbuja.info" + # Add the tags for the platform + self.tags = ["opinions", "activism"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.burbuja.info/inmobiliaria/member-" + "" + ".html" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Este usuario no se ha registrado y por lo tanto no tiene un perfil para ver.", "Burbuja.info - Foro de economía"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/burdastyle.py b/osrframework/wrappers/burdastyle.py new file mode 100644 index 0000000..20f6f64 --- /dev/null +++ b/osrframework/wrappers/burdastyle.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Burdastyle(Platform): + """ + A object for Burdastyle. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Burdastyle" + self.tags = ["opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.burdastyle.com/profiles/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^\.]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    404 Error

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/buzznet.py b/osrframework/wrappers/buzznet.py new file mode 100644 index 0000000..11f76b5 --- /dev/null +++ b/osrframework/wrappers/buzznet.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Buzznet(Platform): + """ + A object for Buzznet. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Buzznet" + self.tags = ["audio"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.buzznet.com/author/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^\.]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["The page you requested was not found."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/cafemom.py b/osrframework/wrappers/cafemom.py new file mode 100644 index 0000000..c85cf04 --- /dev/null +++ b/osrframework/wrappers/cafemom.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Cafemom(Platform): + ''' + A object for Cafemom. + ''' + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Cafemom" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.cafemom.com/home/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["is not a CafeMom member.

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + diff --git a/osrframework/wrappers/canva.py b/osrframework/wrappers/canva.py new file mode 100644 index 0000000..219528a --- /dev/null +++ b/osrframework/wrappers/canva.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Canva(Platform): + """ + A object for Canva. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Canva" + self.tags = ["image"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.canva.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["(404)

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/carbonmade.py b/osrframework/wrappers/carbonmade.py new file mode 100644 index 0000000..e4d9059 --- /dev/null +++ b/osrframework/wrappers/carbonmade.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Carbonmade(Platform): + """ + A object for Carbonmade. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Carbonmade" + self.tags = ["image", "tools"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://" + "" + ".carbonmade.com" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404!"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/cardinghispano.py b/osrframework/wrappers/cardinghispano.py new file mode 100644 index 0000000..d613a48 --- /dev/null +++ b/osrframework/wrappers/cardinghispano.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Cardinghispano(Platform): + """ + A object for Cardinghispano. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Cardinghispano" + self.tags = ["carding"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://cardinghispano.net/members/?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["El miembro específicado no pudo ser encontrado. Por favor ingrese el nombre completo del miembro."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/cardingmx.py b/osrframework/wrappers/cardingmx.py new file mode 100644 index 0000000..92fd03f --- /dev/null +++ b/osrframework/wrappers/cardingmx.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Cardingmx(Platform): + """ + A object for Cardingmx. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Cardingmx" + self.tags = ["carding"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://cardingmx.mforos.com/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Usuarios - El usuario no existe"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/cardomain.py b/osrframework/wrappers/cardomain.py new file mode 100644 index 0000000..7e4ed03 --- /dev/null +++ b/osrframework/wrappers/cardomain.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Cardomain(Platform): + """ + A object for Cardomain. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Cardomain" + self.tags = ["e-commerce"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.cardomain.com/member/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["href=\"/css/pag-info-404.css\""] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/care2.py b/osrframework/wrappers/care2.py new file mode 100644 index 0000000..7f5e5b6 --- /dev/null +++ b/osrframework/wrappers/care2.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Care2(Platform): + """ + A object for Care2. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Care2" + self.tags = ["activism"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.care2.com/causes/author/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Nothing found for Causes Author"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/cartodb.py b/osrframework/wrappers/cartodb.py new file mode 100644 index 0000000..95f9187 --- /dev/null +++ b/osrframework/wrappers/cartodb.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the Affero GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.1" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class CartoDB(Platform): + """ + A object for CartoDB. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "CartoDB" + self.tags = ["education", "maps"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://" + "" + ".cartodb.com" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^_]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404 Error — CartoDB"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/cash.py b/osrframework/wrappers/cash.py new file mode 100644 index 0000000..5d94b5d --- /dev/null +++ b/osrframework/wrappers/cash.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Cash(Platform): + """ + A object for Cash. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Cash" + self.tags = ["payments"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://cash.me/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    The page you are looking for can't be found.

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/castroller.py b/osrframework/wrappers/castroller.py new file mode 100644 index 0000000..0f14c6d --- /dev/null +++ b/osrframework/wrappers/castroller.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Castroller(Platform): + """ + A object for Castroller. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Castroller" + self.tags = ["audio", "video"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://castroller.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404 - File or directory not found."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/causes.py b/osrframework/wrappers/causes.py new file mode 100644 index 0000000..5b822c5 --- /dev/null +++ b/osrframework/wrappers/causes.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Causes(Platform): + """ + A object for Causes. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Causes" + self.tags = ["activism"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.causes.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^\.]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Not Found (404)"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/ccm.py b/osrframework/wrappers/ccm.py new file mode 100644 index 0000000..92a7323 --- /dev/null +++ b/osrframework/wrappers/ccm.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Ccm(Platform): + """ + A object for Ccm. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Ccm" + self.tags = ["tech"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://es.ccm.net/profile/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["¡Uy! ¡La página solicitada no se encuentra!"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/ccsinfo.py b/osrframework/wrappers/ccsinfo.py new file mode 100644 index 0000000..9d1f6d1 --- /dev/null +++ b/osrframework/wrappers/ccsinfo.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Ccsinfo(Platform): + """ + A object for Ccsinfo. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Ccsinfo" + self.tags = ["e-commerce"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.ccsinfo.com/forum/profile.php?mode=viewprofile&u=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Sorry, but that user does not exist"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/chess.py b/osrframework/wrappers/chess.py new file mode 100644 index 0000000..0009e01 --- /dev/null +++ b/osrframework/wrappers/chess.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Chess(Platform): + """ + A object for Chess. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Chess" + self.tags = ["gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.chess.com/members/view/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["href=\"/members/search?allnew=1\">"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/cockos.py b/osrframework/wrappers/cockos.py new file mode 100644 index 0000000..bb11dd7 --- /dev/null +++ b/osrframework/wrappers/cockos.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Cockos(Platform): + """ + A object for Cockos. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Cockos" + self.tags = ["development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forum.cockos.com/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This user has not registered and therefore does not have a profile to view."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/codecademy.py b/osrframework/wrappers/codecademy.py new file mode 100644 index 0000000..24ebeb6 --- /dev/null +++ b/osrframework/wrappers/codecademy.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Codecademy(Platform): + """ + A object for Codecademy. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Codecademy" + self.tags = ["education", "development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.codecademy.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Page Not Found | Codecademy"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/codementor.py b/osrframework/wrappers/codementor.py new file mode 100644 index 0000000..8a6aa92 --- /dev/null +++ b/osrframework/wrappers/codementor.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Codementor(Platform): + """ + A object for Codementor. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Codementor" + self.tags = ["development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://codementor.io/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Codementor – Hire Expert Developers for On-Demand Mentorship & Freelance Projects"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/coderwall.py b/osrframework/wrappers/coderwall.py new file mode 100644 index 0000000..851dd92 --- /dev/null +++ b/osrframework/wrappers/coderwall.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Coderwall(Platform): + """ + A object for Coderwall. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Coderwall" + self.tags = ["developement", "education"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://coderwall.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404 : Unable to handle that url"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/coinbase.py b/osrframework/wrappers/coinbase.py new file mode 100644 index 0000000..288621c --- /dev/null +++ b/osrframework/wrappers/coinbase.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Coinbase(Platform): + """ + A object for Demo. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Coinbase" + self.tags = ["cryptocurrencies", "payments"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://coinbase.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Coinbase — 404 Not Found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/colourlovers.py b/osrframework/wrappers/colourlovers.py new file mode 100644 index 0000000..c480393 --- /dev/null +++ b/osrframework/wrappers/colourlovers.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Colourlovers(Platform): + """ + A object for Colourlovers. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Colourlovers" + self.tags = ["art"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.colourlovers.com/lover/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    No one's home

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/connectingsingles.py b/osrframework/wrappers/connectingsingles.py new file mode 100644 index 0000000..8f52361 --- /dev/null +++ b/osrframework/wrappers/connectingsingles.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Connectingsingles(Platform): + """ + A object for Connectingsingles. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Connectingsingles" + self.tags = ["contact"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.connectingsingles.com/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Profile"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/contently.py b/osrframework/wrappers/contently.py new file mode 100644 index 0000000..97f5013 --- /dev/null +++ b/osrframework/wrappers/contently.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Contently(Platform): + """ + A object for Contently. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Contently" + self.tags = ["e-commerce"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://" + "" + ".contently.com" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Oops, Page Not Found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/couchsurfing.py b/osrframework/wrappers/couchsurfing.py new file mode 100644 index 0000000..499edcc --- /dev/null +++ b/osrframework/wrappers/couchsurfing.py @@ -0,0 +1,125 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +############################################################## +# Not working. Need a fix. # +############################################################## + +class Couchsurfing(Platform): + """ + A object for Coachsurfing. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Couchsurfing" + self.tags = ["e-commerce"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.couchsurfing.org/people/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    404: not found

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + # While the issue cannot be solved on this platform + def _doesTheUserExist(self, html): + ''' + Method that performs the verification of the existence or not of a given profile. This is a reimplementation of the method found in all the objects. In this case, this will return ALWAYS None because the platform is no longer available. + + :param html: The html text in which the self.notFoundText + :return : None if the user was not found in the html text and the html text if the user DOES exist. + ''' + return None diff --git a/osrframework/wrappers/crokes.py b/osrframework/wrappers/crokes.py new file mode 100644 index 0000000..afdcc8e --- /dev/null +++ b/osrframework/wrappers/crokes.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Crokes(Platform): + """ + A object for Crokes. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Crokes" + self.tags = ["development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.crokes.com/" + "" + "/" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404 Error"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/crowdin.py b/osrframework/wrappers/crowdin.py new file mode 100644 index 0000000..82e702a --- /dev/null +++ b/osrframework/wrappers/crowdin.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Crowdin(Platform): + """ + A object for Crowdin. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Crowdin" + self.tags = ["translation"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://crowdin.com/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Seems you got in the wrong place...

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/cryptofresh.py b/osrframework/wrappers/cryptofresh.py new file mode 100644 index 0000000..4db40a2 --- /dev/null +++ b/osrframework/wrappers/cryptofresh.py @@ -0,0 +1,112 @@ +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Cryptofresh(Platform): + """ + A object for Cryptofresh. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Cryptofresh" + self.tags = ["cryptocurrencies"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://cryptofresh.com/u/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ['Cryptofresh'] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/dailymotion.py b/osrframework/wrappers/dailymotion.py new file mode 100644 index 0000000..c075f9b --- /dev/null +++ b/osrframework/wrappers/dailymotion.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Dailymotion(Platform): + """ + A object for Dailymotion. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Dailymotion" + self.tags = ["video"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.dailymotion.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["No encontramos la página que buscas."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/datpiff.py b/osrframework/wrappers/datpiff.py new file mode 100644 index 0000000..87b7c11 --- /dev/null +++ b/osrframework/wrappers/datpiff.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Datpiff(Platform): + """ + A object for Datpiff. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Datpiff" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.datpiff.com/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["DatPiff :: Community - Coming Soon"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/deviantart.py b/osrframework/wrappers/deviantart.py new file mode 100644 index 0000000..4a2a328 --- /dev/null +++ b/osrframework/wrappers/deviantart.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Deviantart(Platform): + """ + A object for Deviantart. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Deviantart" + self.tags = ["opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://" + "" + ".deviantart.com" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["The page you were looking for doesn't exist."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/digitalspy.py b/osrframework/wrappers/digitalspy.py new file mode 100644 index 0000000..383aed6 --- /dev/null +++ b/osrframework/wrappers/digitalspy.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Digitalspy(Platform): + """ + A object for Digitalspy. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Digitalspy" + self.tags = ["gaming", "opinions", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forums.digitalspy.co.uk/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This user has not registered and therefore does not have a profile to view"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/disqus.py b/osrframework/wrappers/disqus.py new file mode 100644 index 0000000..daf6962 --- /dev/null +++ b/osrframework/wrappers/disqus.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Disqus(Platform): + """ + A object for Disqus. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Disqus" + self.tags = ["tools", "opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://disqus.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Page not found (404) - Disqus"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/doodle.py b/osrframework/wrappers/doodle.py new file mode 100644 index 0000000..0d22822 --- /dev/null +++ b/osrframework/wrappers/doodle.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Doodle(Platform): + """ + A object for Doodle. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Doodle" + self.tags = ["tools"] + + self.forbiddenList = ['.'] + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://doodle.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["It appears the page you were looking for doesn't exist."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/douban.py b/osrframework/wrappers/douban.py new file mode 100644 index 0000000..528f571 --- /dev/null +++ b/osrframework/wrappers/douban.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Douban(Platform): + """ + A object for Douban. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Douban" + self.tags = ["social", "opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://site.douban.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["http://img3.douban.com/pics/douban_error.gif"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/dreamstime.py b/osrframework/wrappers/dreamstime.py new file mode 100644 index 0000000..53e6c0e --- /dev/null +++ b/osrframework/wrappers/dreamstime.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Félix Brezo, Yaiza Rubio " +__version__ = "1.1" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Dreamstime(Platform): + """ + A object for Dreamstime. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Dreamstime" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://es.dreamstime.com/" + "" + "_info" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ['
    '] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/dribbble.py b/osrframework/wrappers/dribbble.py new file mode 100644 index 0000000..5ee9931 --- /dev/null +++ b/osrframework/wrappers/dribbble.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Dribbble(Platform): + """ + A object for Dribbble. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Dribbble" + self.tags = ["image"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://dribbble.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Sorry, the page you were looking for doesn't exist. (404)"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/drugbuyersforum.py b/osrframework/wrappers/drugbuyersforum.py new file mode 100644 index 0000000..8617ccf --- /dev/null +++ b/osrframework/wrappers/drugbuyersforum.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Drugbuyersforum(Platform): + """ + A object for Drugbuyersforum. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Drugbuyersforum" + self.tags = ["e-commerce"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://drugbuyersforum.org/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This user has not registered and therefore does not have a profile to view."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/drupal.py b/osrframework/wrappers/drupal.py new file mode 100644 index 0000000..c5cf017 --- /dev/null +++ b/osrframework/wrappers/drupal.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Drupal(Platform): + """ + A object for Drupal. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Drupal" + self.tags = ["development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.drupal.org/u/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Page not found | Drupal.org"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/dzone.py b/osrframework/wrappers/dzone.py new file mode 100644 index 0000000..9ed76e7 --- /dev/null +++ b/osrframework/wrappers/dzone.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Dzone(Platform): + """ + A object for Dzone. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Dzone" + self.tags = ["development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://dzone.com/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    We can't find the page you're looking for.

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/ebay.py b/osrframework/wrappers/ebay.py new file mode 100644 index 0000000..5bc516d --- /dev/null +++ b/osrframework/wrappers/ebay.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Ebay(Platform): + """ + A object for Ebay. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Ebay" + self.tags = ["e-commerce"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.ebay.com/usr/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["The User ID you entered was not found. Please check the User ID and try again"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/echatta.py b/osrframework/wrappers/echatta.py new file mode 100644 index 0000000..710f3c9 --- /dev/null +++ b/osrframework/wrappers/echatta.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Echatta(Platform): + """ + A object for Echatta. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Echatta" + self.tags = ["conversation"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.echatta.net/component/comprofiler/userprofile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Effettua il login o registrati per visualizzare o modificare il tuo profilo."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/ehow.py b/osrframework/wrappers/ehow.py new file mode 100644 index 0000000..ffac86d --- /dev/null +++ b/osrframework/wrappers/ehow.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Ehow(Platform): + """ + A object for Ehow. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Ehow" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.ehow.com/contributor/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Sorry, The page you were looking for could not be found - error | eHow | eHow"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/eightbitme.py b/osrframework/wrappers/eightbitme.py new file mode 100644 index 0000000..b478772 --- /dev/null +++ b/osrframework/wrappers/eightbitme.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class EightBitMe(Platform): + """ + A object for EightBitMe. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "EightBitMe" + self.tags = ["gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://eightbit.me/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["EightBit: 404 Error"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/ello.py b/osrframework/wrappers/ello.py new file mode 100644 index 0000000..224db32 --- /dev/null +++ b/osrframework/wrappers/ello.py @@ -0,0 +1,112 @@ +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio " +__version__ = "1.1" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Ello(Platform): + """ + A object for Ello. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Ello" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://ello.co/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["| [404] Not Found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/elmundo.py b/osrframework/wrappers/elmundo.py new file mode 100644 index 0000000..9ad0335 --- /dev/null +++ b/osrframework/wrappers/elmundo.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Elmundo(Platform): + """ + A object for El Mundo. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "ElMundo" + self.tags = ["news", "opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.elmundo.es/social/usuarios/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Error 404

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + diff --git a/osrframework/wrappers/emoneyspace.py b/osrframework/wrappers/emoneyspace.py new file mode 100644 index 0000000..e4bdeca --- /dev/null +++ b/osrframework/wrappers/emoneyspace.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Emoneyspace(Platform): + """ + A object for Emoneyspace. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Emoneyspace" + self.tags = ["online"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.emoneyspace.com/forum/index.php?action=profile;user=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["The user whose profile you are trying to view does not exist"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/enfemenino.py b/osrframework/wrappers/enfemenino.py new file mode 100644 index 0000000..34293db --- /dev/null +++ b/osrframework/wrappers/enfemenino.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Enfemenino(Platform): + ''' + A object for Enfemenino. + ''' + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Enfemenino" + self.tags = ["opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.enfemenino.com/mi-espacio/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Perfil - enfemenino"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + diff --git a/osrframework/wrappers/ethereum.py b/osrframework/wrappers/ethereum.py new file mode 100644 index 0000000..f9a8553 --- /dev/null +++ b/osrframework/wrappers/ethereum.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Ethereum(Platform): + """ + A object for Ethereum. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Ethereum" + self.tags = ["cryptocurrencies", "development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://forum.ethereum.org/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["ethereum"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/etsy.py b/osrframework/wrappers/etsy.py new file mode 100644 index 0000000..7b016e4 --- /dev/null +++ b/osrframework/wrappers/etsy.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Etsy(Platform): + """ + A object for Etsy. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Etsy" + self.tags = ["e-commerce"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.etsy.com/people/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Etsy - Your place to buy and sell all things handmade, vintage, and supplies"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + diff --git a/osrframework/wrappers/eyeem.py b/osrframework/wrappers/eyeem.py new file mode 100644 index 0000000..5d3a52f --- /dev/null +++ b/osrframework/wrappers/eyeem.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Eyeem(Platform): + """ + A object for Eyeem. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Eyeem" + self.tags = ["photos"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.eyeem.com/u/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Not Found (404) | EyeEm"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/f6s.py b/osrframework/wrappers/f6s.py new file mode 100644 index 0000000..7171b3d --- /dev/null +++ b/osrframework/wrappers/f6s.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class F6s(Platform): + """ + A object for F6s. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "F6s" + self.tags = ["jobs"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://f6s.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404 - Page Not Found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/facebook.py b/osrframework/wrappers/facebook.py new file mode 100644 index 0000000..d34a6db --- /dev/null +++ b/osrframework/wrappers/facebook.py @@ -0,0 +1,116 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Facebook(Platform): + """ + A object for Facebook. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Facebook" + self.tags = ["social", "contact"] + + # Base URL + self.baseURL = "http://facebook.com/" + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = True + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.facebook.com/" + "" + self.url["searchfy"] = "https://www.facebook.com/public?query=" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + self.validQuery["searchfy"] = ".+" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Esta página no está disponible", "This content is currently unavailable", "Sorry, this page isn't available"] + self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + self.fieldsRegExp["searchfy"] = {} + self.searchfyAliasRegexp = "lfloat _ohe\" href=\"https://www.facebook.com/([^\"]+)\" aria-hidden=\"true\"" + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/facesaerch.py b/osrframework/wrappers/facesaerch.py new file mode 100644 index 0000000..9ea4f83 --- /dev/null +++ b/osrframework/wrappers/facesaerch.py @@ -0,0 +1,118 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Facesaerch(Platform): + """ + A object for Facesaerch. + """ + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Facesaerch" + self.tags = ["image", "search"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = False + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + #self.url["usufy"] = "http://anyurl.com/user/" + "" + self.url["searchfy"] = "https://facesaerch.com/f/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + #self.needsCredentials["usufy"] = False + self.needsCredentials["searchfy"] = False + + ################### + # Valid queries # + ################### + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + #self.validQuery["usufy"] = ".*" + self.validQuery["searchfy"] = ".+" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + #self.notFoundText["usufy"] = [] + self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + #self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + self.fieldsRegExp["searchfy"] = {} + # Example of fields: + self.delimiters = {} + # These two fields are REQUIRED to grab the results + self.searchfyDelimiterStart = "
    ' + # These rest of fields to extract + self.fieldsRegExp["searchfy"]["i3visio.uri"] = {"start": '" href="', "end": '"'} + self.fieldsRegExp["searchfy"]["i3visio.text"] = {"start": 'alt="', "end": '"'} + self.fieldsRegExp["searchfy"]["i3visio.image"] = {"start": 'src="', "end": '"'} + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/fanpop.py b/osrframework/wrappers/fanpop.py new file mode 100644 index 0000000..7485713 --- /dev/null +++ b/osrframework/wrappers/fanpop.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Fanpop(Platform): + """ + A object for Fanpop. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Fanpop" + self.tags = ["social", "opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.fanpop.com/fans/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Fanpop - Fan clubs for everything. What are you a fan of?", "

    Browse Content

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/fark.py b/osrframework/wrappers/fark.py new file mode 100644 index 0000000..7431108 --- /dev/null +++ b/osrframework/wrappers/fark.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Fark(Platform): + """ + A object for Fark. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Fark" + self.tags = ["news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.fark.com/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["FARK.com: User profiles: view"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/favstar.py b/osrframework/wrappers/favstar.py new file mode 100644 index 0000000..75b5f54 --- /dev/null +++ b/osrframework/wrappers/favstar.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Favstar(Platform): + """ + A object for Favstar. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Favstar" + # Add the tags for the platform + self.tags = ["social", "tools", "microblogging"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://favstar.fm/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[a-zA-Z0-9_]{1,19}" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Discover New Tweets"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/fiverr.py b/osrframework/wrappers/fiverr.py new file mode 100644 index 0000000..2b11b69 --- /dev/null +++ b/osrframework/wrappers/fiverr.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Fiverr(Platform): + """ + A object for Fiverr. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Fiverr" + self.tags = ["jobs"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://forum.fiverr.com/users/" + "" + "/" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    ¡Ups! Esa página no existe o es privada.

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/flickr.py b/osrframework/wrappers/flickr.py new file mode 100644 index 0000000..01e297d --- /dev/null +++ b/osrframework/wrappers/flickr.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Flickr(Platform): + """ + A object for Flickr. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Flickr" + self.tags = ["image", "social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.flickr.com/photos/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/flixster.py b/osrframework/wrappers/flixster.py new file mode 100644 index 0000000..78fdea0 --- /dev/null +++ b/osrframework/wrappers/flixster.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Flixster(Platform): + """ + A object for Flixster. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Flixster" + self.tags = ["opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://community.flixster.com/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = True + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Oops!"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/foodspotting.py b/osrframework/wrappers/foodspotting.py new file mode 100644 index 0000000..4390bfb --- /dev/null +++ b/osrframework/wrappers/foodspotting.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Foodspotting(Platform): + """ + A object for Foodspotting. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Foodspotting" + self.tags = ["opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.foodspotting.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = re.compile(".*") + self.validQuery["usufy"] = "[^0-9].+" + #self.validQuery["searchfy"] = re.compile(".*") + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["The page you were looking for doesn't exist (404)"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/forobtc.py b/osrframework/wrappers/forobtc.py new file mode 100644 index 0000000..7c8fca8 --- /dev/null +++ b/osrframework/wrappers/forobtc.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Forobtc(Platform): + """ + A object for Forobtc. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Forobtc" + self.tags = ["cryptocurrencies"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.forobtc.com/index.php?action=profile;user=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Un error ha ocurrido!"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/forocoches.py b/osrframework/wrappers/forocoches.py new file mode 100644 index 0000000..bc12187 --- /dev/null +++ b/osrframework/wrappers/forocoches.py @@ -0,0 +1,115 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Forocoches(Platform): + """ + A object for Forocoches. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Forocoches" + self.tags = ["opinions", "activism"] + + # Add the URL for enumeration below + #self.urlEnumeration = "http://www.forocoches.com/foro/member.php?u=" + "" + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.forocoches.com/foro/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Usuario no registrado, por lo que no tiene un perfil.

    ","
    Usuario especificado inv"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/foroptc.py b/osrframework/wrappers/foroptc.py new file mode 100644 index 0000000..8ffc0c7 --- /dev/null +++ b/osrframework/wrappers/foroptc.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Foroptc(Platform): + """ + A object for Foroptc. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Foroptc" + self.tags = ["tech"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://foro-ptc.com/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Este usuario no se ha registrado y por lo tanto no tiene un perfil para ver."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/foros24h.py b/osrframework/wrappers/foros24h.py new file mode 100644 index 0000000..878a4ba --- /dev/null +++ b/osrframework/wrappers/foros24h.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Foros24h(Platform): + """ + A object for Foros24h. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Foros24h" + self.tags = ["opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.foros24h.com/members/" + "" + ".html" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Este usuario no se ha registrado y por lo tanto no tiene un perfil para ver."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/forosperu.py b/osrframework/wrappers/forosperu.py new file mode 100644 index 0000000..6aca31a --- /dev/null +++ b/osrframework/wrappers/forosperu.py @@ -0,0 +1,115 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Forosperu(Platform): + """ + A object for Forosperu. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Forosperu" + self.tags = ["opinions", "activism"] + + # Add the URL for enumeration below + #self.urlEnumeration = "http://www.forocoches.com/foro/member.php?u=" + "" + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forosperu.net/members/?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["No se encontró el usuario especificado."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/forospyware.py b/osrframework/wrappers/forospyware.py new file mode 100644 index 0000000..0c1e8e3 --- /dev/null +++ b/osrframework/wrappers/forospyware.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Forospyware(Platform): + """ + A object for Forospyware. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Forospyware" + self.tags = ["hacking"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forospyware.com/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Este usuario no se ha registrado y por lo tanto no tiene un perfil para ver."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/fotolog.py b/osrframework/wrappers/fotolog.py new file mode 100644 index 0000000..f0fa759 --- /dev/null +++ b/osrframework/wrappers/fotolog.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Fotolog(Platform): + """ + A object for Fotolog. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Fotolog" + self.tags = ["photos"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.fotolog.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Error 404 : No fue posible encontrar la página solicitada

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/foursquare.py b/osrframework/wrappers/foursquare.py new file mode 100644 index 0000000..d6cfd2e --- /dev/null +++ b/osrframework/wrappers/foursquare.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Foursquare(Platform): + """ + A object for Badoo. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Foursquare" + self.tags = ["social", "trips", "opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://foursquare.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["We couldn't find the page you're looking for."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/freelancer.py b/osrframework/wrappers/freelancer.py new file mode 100644 index 0000000..9ba7f56 --- /dev/null +++ b/osrframework/wrappers/freelancer.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Freelancer(Platform): + """ + A object for Freelancer. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Freelancer" + self.tags = ["jobs"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.freelancer.com/u/" + "" + ".html" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404 - Page can not be found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/freerepublic.py b/osrframework/wrappers/freerepublic.py new file mode 100644 index 0000000..1db7b74 --- /dev/null +++ b/osrframework/wrappers/freerepublic.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Freerepublic(Platform): + """ + A object for Freerepublic. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Freerepublic" + self.tags = ["activism"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.freerepublic.com/~" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Error"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/gamesheep.py b/osrframework/wrappers/gamesheep.py new file mode 100644 index 0000000..3b7ac55 --- /dev/null +++ b/osrframework/wrappers/gamesheep.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Gamesheep(Platform): + """ + A object for Gamesheep. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Gamesheep" + self.tags = ["gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.gamesheep.com/member_profile.php?u=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Member not found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/gametracker.py b/osrframework/wrappers/gametracker.py new file mode 100644 index 0000000..4e73c1c --- /dev/null +++ b/osrframework/wrappers/gametracker.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Gametracker(Platform): + """ + A object for Gametracker. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Gametracker" + self.tags = ["gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.gametracker.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["GameTracker.com : Profile Not Found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/gapyear.py b/osrframework/wrappers/gapyear.py new file mode 100644 index 0000000..a76ea0f --- /dev/null +++ b/osrframework/wrappers/gapyear.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Gapyear(Platform): + """ + A object for Gapyear. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Gapyear" + self.tags = ["trips"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.gap-year.com/en/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Welcome to gap-year.com!"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/gather.py b/osrframework/wrappers/gather.py new file mode 100644 index 0000000..37d0d00 --- /dev/null +++ b/osrframework/wrappers/gather.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Gather(Platform): + """ + A object for Gather. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Gather" + self.tags = ["social", "activism", "opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://" + "" + ".gather.com" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Group or Member Unavailable | Gather"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/geeksphone.py b/osrframework/wrappers/geeksphone.py new file mode 100644 index 0000000..6132d73 --- /dev/null +++ b/osrframework/wrappers/geeksphone.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Geeksphone(Platform): + """ + A object for Geeksphone. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Geeksphone" + self.tags = ["opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forum.geeksphone.com/index.php?action=profile;user=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["El usuario cuyo perfil estás intentando editar no existe.", "An Error Has Occurred!"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/genspot.py b/osrframework/wrappers/genspot.py new file mode 100644 index 0000000..5c00f34 --- /dev/null +++ b/osrframework/wrappers/genspot.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Genspot(Platform): + """ + A object for Genspot. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Genspot" + self.tags = ["e-commerce", "opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.genspot.com/u/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["was removed from GenSpot."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/getlocalization.py b/osrframework/wrappers/getlocalization.py new file mode 100644 index 0000000..a7a9e8e --- /dev/null +++ b/osrframework/wrappers/getlocalization.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the Affero GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Getlocalization(Platform): + """ + A object for Getlocalization. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Getlocalization" + self.tags = ["translation", "development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.getlocalization.com/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/getsatisfaction.py b/osrframework/wrappers/getsatisfaction.py new file mode 100644 index 0000000..6cfa0d1 --- /dev/null +++ b/osrframework/wrappers/getsatisfaction.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Getsatisfaction(Platform): + """ + A object for Flickr. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "GetSatisfaction" + self.tags = ["professional", "tools"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://getsatisfaction.com/people/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Page not found :(

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/github.py b/osrframework/wrappers/github.py new file mode 100644 index 0000000..cb9cb23 --- /dev/null +++ b/osrframework/wrappers/github.py @@ -0,0 +1,117 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Github(Platform): + """ + A object for Github. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Github" + self.tags = ["development"] + + # Base URL + self.baseURL = "http://github.com/" + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = True + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://github.com/" + "" + self.url["searchfy"] = "https://github.com/search?utf8=%E2%9C%93&q=&type=Users&ref=searchresults" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + self.validQuery["searchfy"] = ".+" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This is not the web page you are looking for"] + self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + self.fieldsRegExp["searchfy"] = {} + self.searchfyAliasRegexp = "\"@([^\"]+)\"". +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Goblinrefuge(Platform): + """ + A object for Goblinrefuge. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Goblinrefuge" + self.tags = ["video", "audio", "image"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://goblinrefuge.com/mediagoblin/u/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Parece que no hay ninguna página en esta dirección. ¡Lo sentimos!

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/goodreads.py b/osrframework/wrappers/goodreads.py new file mode 100644 index 0000000..4052421 --- /dev/null +++ b/osrframework/wrappers/goodreads.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Goodreads(Platform): + """ + A object for Goodreads. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Goodreads" + self.tags = ["social", "opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.goodreads.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Goodreads - Page Not Found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/googleplus.py b/osrframework/wrappers/googleplus.py new file mode 100644 index 0000000..a72912f --- /dev/null +++ b/osrframework/wrappers/googleplus.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class GooglePlus(Platform): + """ + A object for Google Plus. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "GooglePlus" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://plus.google.com/+" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404. That’s an error."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/gravatar.py b/osrframework/wrappers/gravatar.py new file mode 100644 index 0000000..4324cd8 --- /dev/null +++ b/osrframework/wrappers/gravatar.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Gravatar(Platform): + """ + A object for Gravatar. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Gravatar" + self.tags = ["identity"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://es.gravatar.com/" + "" + ".json" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ['"User not found"'] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = '
    ([^<]+)
    ' + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/gsmspain.py b/osrframework/wrappers/gsmspain.py new file mode 100644 index 0000000..73d7131 --- /dev/null +++ b/osrframework/wrappers/gsmspain.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Gsmspain(Platform): + """ + A object for Gsmspain. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Gsmspain" + self.tags = ["opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.gsmspain.com/foros/member.php?s=&action=getinfo&username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Perfil del usuario en los foros de gsmspain.com"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/hi5.py b/osrframework/wrappers/hi5.py new file mode 100644 index 0000000..30c910d --- /dev/null +++ b/osrframework/wrappers/hi5.py @@ -0,0 +1,116 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Hi5(Platform): + """ + A object for Hi5. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Hi5" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.hi5.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = True + #self.needsCredentials["searchfy"] = False + + # Array of credentials to be used + self.creds = [] + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["hi5"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/houzz.py b/osrframework/wrappers/houzz.py new file mode 100644 index 0000000..3e3fafb --- /dev/null +++ b/osrframework/wrappers/houzz.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Houzz(Platform): + """ + A object for Houzz. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Houzz" + self.tags = ["jobs"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.houzz.es/pro/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    La página solicitada no existe.

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/htcmania.py b/osrframework/wrappers/htcmania.py new file mode 100644 index 0000000..b48aac5 --- /dev/null +++ b/osrframework/wrappers/htcmania.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Htcmania(Platform): + """ + A object for Htcmania. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Htcmania" + self.tags = ["tech"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://htcmania.com/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Este usuario no está registrado y por lo tanto no tiene ningún perfil el cual poder ver."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/hubpages.py b/osrframework/wrappers/hubpages.py new file mode 100644 index 0000000..301d9de --- /dev/null +++ b/osrframework/wrappers/hubpages.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Hubpages(Platform): + """ + A object for Hubpages. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Hubpages" + self.tags = ["blog"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://hubpages.com/@" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404. That page doesn't exist."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/ibosocial.py b/osrframework/wrappers/ibosocial.py new file mode 100644 index 0000000..7ae1b5b --- /dev/null +++ b/osrframework/wrappers/ibosocial.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Ibosocial(Platform): + """ + A object for Ibosocial. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Ibosocial" + self.tags = ["social", "professional", "tools"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.ibosocial.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["IBOsocial - 404 Error"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/identica.py b/osrframework/wrappers/identica.py new file mode 100644 index 0000000..3793767 --- /dev/null +++ b/osrframework/wrappers/identica.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Identica(Platform): + """ + A object for Identica. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Identica" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://identi.ca/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Error 404

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/ifunny.py b/osrframework/wrappers/ifunny.py new file mode 100644 index 0000000..9fb2a71 --- /dev/null +++ b/osrframework/wrappers/ifunny.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class IFunny(Platform): + """ + A object for IFunny. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "IFunny" + self.tags = ["image"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://ifunny.co/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404 - page not found - iFunny :)"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/imgur.py b/osrframework/wrappers/imgur.py new file mode 100644 index 0000000..f89c989 --- /dev/null +++ b/osrframework/wrappers/imgur.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Imgur(Platform): + """ + A object for Imgur. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Imgur" + self.tags = ["image"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://imgur.com/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [" imgur: the simple 404 page"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/infotelefonica.py b/osrframework/wrappers/infotelefonica.py new file mode 100644 index 0000000..15d7507 --- /dev/null +++ b/osrframework/wrappers/infotelefonica.py @@ -0,0 +1,109 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Infotelefonica(Platform): + ''' + A object for Infotelefonica. + ''' + def __init__(self): + ''' + Consstructor... + ''' + self.platformName = "Infotelefonica" + self.tags = ["phone"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = True + self.isValidMode["usufy"] = False + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + self.url = {} + self.url["phonefy"] = "http://www.infotelefonica.es/" + "" + #self.url["usufy"] = "http://anyurl.com/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + self.validQuery["phonefy"] = ".+" + self.validQuery["usufy"] = ".+" + self.validQuery["searchfy"] = ".+" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the phone number is not appearing + self.notFoundText = {} + self.notFoundText["phonefy"] = ["Al dejar el primer comentario procederás a registrar este número de teléfono en en nuestro foro."] + #self.notFoundText["usufy"] = [] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + # Definition of regular expressions to be searched in phonefy mode + self.fieldsRegExp["phonefy"] = {} + self.fieldsRegExp["phonefy"]["i3visio.fullname"] = 'Titular: ([^<]+)
    ' + #self.fieldsRegExp["phonefy"]["i3visio.fullname"] = 'Titular: ([^<]+)
    ' + + # Definition of regular expressions to be searched in usufy mode + #self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/inkonsky.py b/osrframework/wrappers/inkonsky.py new file mode 100644 index 0000000..6b780aa --- /dev/null +++ b/osrframework/wrappers/inkonsky.py @@ -0,0 +1,115 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Inkonsky(Platform): + """ + A object for Inkonsky. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Inkonsky" + self.tags = ["e-commerce", "art"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://inkonsky.co/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Tatuajes y tatuadores de Colombia"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = "(.+) - Tatuajes" + self.fieldsRegExp["usufy"]["i3visio.location"] = 'class="location">([^<]+)
    ' + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/instagram.py b/osrframework/wrappers/instagram.py new file mode 100644 index 0000000..a2471ae --- /dev/null +++ b/osrframework/wrappers/instagram.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Instagram(Platform): + """ + A object for Instagram. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Instagram" + self.tags = ["image", "social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.instagram.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Página no encontrada"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/instructables.py b/osrframework/wrappers/instructables.py new file mode 100644 index 0000000..33b71f0 --- /dev/null +++ b/osrframework/wrappers/instructables.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Instructables(Platform): + """ + A object for Instructables. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Instructables" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.instructables.com/member/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["ERROR 400: no member:"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/intfiction.py b/osrframework/wrappers/intfiction.py new file mode 100644 index 0000000..14525e2 --- /dev/null +++ b/osrframework/wrappers/intfiction.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Intfiction(Platform): + """ + A object for Intfiction. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Intfiction" + self.tags = ["opinions", "social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.intfiction.org/forum/memberlist.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["No members found for this search criterion."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/islamicawakening.py b/osrframework/wrappers/islamicawakening.py new file mode 100644 index 0000000..393a10c --- /dev/null +++ b/osrframework/wrappers/islamicawakening.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Islamicawakening(Platform): + """ + A object for Islamicawakening. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Islamicawakening" + self.tags = ["activism"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.islamicawakening.com/members/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This user has not registered and therefore does not have a profile to view.", "

    Account Suspended

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/issuu.py b/osrframework/wrappers/issuu.py new file mode 100644 index 0000000..5a0b36a --- /dev/null +++ b/osrframework/wrappers/issuu.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Issuu(Platform): + """ + A object for Issuu. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Issuu" + self.tags = ["tools"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.issuu.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["We can't find what you're looking for."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/ivoox.py b/osrframework/wrappers/ivoox.py new file mode 100644 index 0000000..a7f00e6 --- /dev/null +++ b/osrframework/wrappers/ivoox.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Ivoox(Platform): + ''' + A object for Ivoox. + ''' + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Ivoox" + self.tags = ["opinions", "contact"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://" + "" + ".ivoox.com" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["El contenido que estás buscando no existe."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/jamiiforums.py b/osrframework/wrappers/jamiiforums.py new file mode 100644 index 0000000..723a294 --- /dev/null +++ b/osrframework/wrappers/jamiiforums.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Jamiiforums(Platform): + ''' + A object for Jamiiforums. + ''' + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Jamiiforums" + self.tags = ["opinions", "contact"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://jamiiforums.com/members/?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["The specified member cannot be found. Please enter a member's entire name."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/kali.py b/osrframework/wrappers/kali.py new file mode 100644 index 0000000..e5ee5fd --- /dev/null +++ b/osrframework/wrappers/kali.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Kali(Platform): + """ + A object for Kali. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Kali" + self.tags = ["hacking"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://forums.kali.org/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Kali Linux Forums"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/kanogames.py b/osrframework/wrappers/kanogames.py new file mode 100644 index 0000000..2af7c39 --- /dev/null +++ b/osrframework/wrappers/kanogames.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Kanogames(Platform): + """ + A object for Kanogames. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Kanogames" + self.tags = ["gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.kanogames.com/profile/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Sorry, Sorry, the page youre looking for cant be found."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/karmacracy.py b/osrframework/wrappers/karmacracy.py new file mode 100644 index 0000000..bce7392 --- /dev/null +++ b/osrframework/wrappers/karmacracy.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Karmacracy(Platform): + """ + A object for Karmacracy. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Karmacracy" + self.tags = ["social", "tools"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://karmacracy.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["page not found", "404 error"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/keybase.py b/osrframework/wrappers/keybase.py new file mode 100644 index 0000000..7db9f51 --- /dev/null +++ b/osrframework/wrappers/keybase.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Keybase(Platform): + """ + A object for Keybase. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Keybase" + self.tags = ["pgp", "identity"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://keybase.io/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Sorry, what you are looking for...it does not exist."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/kickstarter.py b/osrframework/wrappers/kickstarter.py new file mode 100644 index 0000000..ef38022 --- /dev/null +++ b/osrframework/wrappers/kickstarter.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Kickstarter(Platform): + """ + A object for Kickstarter. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Kickstarter" + self.tags = ["e-commerce", "professional"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.kickstarter.com/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Oh my goodness

    ", "

    404

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/kimatel.py b/osrframework/wrappers/kimatel.py new file mode 100644 index 0000000..878f9cf --- /dev/null +++ b/osrframework/wrappers/kimatel.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Kimatel(Platform): + ''' + A object for Infotelefonica. + ''' + def __init__(self): + ''' + Consstructor... + ''' + self.platformName = "Kimatel" + self.tags = ["phone"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = True + self.isValidMode["usufy"] = False + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + self.url = {} + self.url["phonefy"] = "http://www.quienera.es/numero/n/" + "" + #self.url["usufy"] = "http://anyurl.com/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + self.validQuery["phonefy"] = ".+" + self.validQuery["usufy"] = ".+" + self.validQuery["searchfy"] = ".+" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the phone number is not appearing + self.notFoundText = {} + self.notFoundText["phonefy"] = [""" + + + + + """] + #self.notFoundText["usufy"] = [] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + # Definition of regular expressions to be searched in phonefy mode + self.fieldsRegExp["phonefy"] = {} + self.fieldsRegExp["phonefy"]["i3visio.fullname"] = 'Titular: ([^<]+)
    ' + #self.fieldsRegExp["phonefy"]["i3visio.fullname"] = 'Titular: ([^<]+)
    ' + + # Definition of regular expressions to be searched in usufy mode + #self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/kinja.py b/osrframework/wrappers/kinja.py new file mode 100644 index 0000000..d21b056 --- /dev/null +++ b/osrframework/wrappers/kinja.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Kinja(Platform): + """ + A object for Kinja. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Kinja" + self.tags = ["news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://" + "" + ".kinja.com" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Kinja"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/kiwi.py b/osrframework/wrappers/kiwi.py new file mode 100644 index 0000000..a5f0741 --- /dev/null +++ b/osrframework/wrappers/kiwi.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Yaiza Rubio and Félix Brezo " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Kiwi(Platform): + """ + A object for Kiwi. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "kiwi" + self.tags = ["social", "teenagers"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://kiwi.qa/" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^\.]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["ga('send', 'event', 'ERROR',"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": 'Location: "', "end": '"'} + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/klout.py b/osrframework/wrappers/klout.py new file mode 100644 index 0000000..38d3368 --- /dev/null +++ b/osrframework/wrappers/klout.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform +class Klout(Platform): + """ + A object for Klout. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Klout" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.klout.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["klout.com/static/images/sasquatch2.png"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/kongregate.py b/osrframework/wrappers/kongregate.py new file mode 100644 index 0000000..171e7ac --- /dev/null +++ b/osrframework/wrappers/kongregate.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Kongregate(Platform): + """ + A object for Kongregate. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Kongregate" + self.tags = ["e-commerce", "gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.kongregate.com/accounts/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Sorry, no account with that name was found.

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/kupika.py b/osrframework/wrappers/kupika.py new file mode 100644 index 0000000..d55f76d --- /dev/null +++ b/osrframework/wrappers/kupika.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Kupika(Platform): + """ + A object for Kupika. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Kupika" + self.tags = ["contact", "social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://kupika.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Page Not Found - Kupika.com"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/lastfm.py b/osrframework/wrappers/lastfm.py new file mode 100644 index 0000000..6f06edb --- /dev/null +++ b/osrframework/wrappers/lastfm.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Lastfm(Platform): + """ + A object for Lastfm. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Lastfm" + self.tags = ["audio"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.lastfm.es/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["No se ha encontrado al usuario"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/leakforums.py b/osrframework/wrappers/leakforums.py new file mode 100644 index 0000000..c660f87 --- /dev/null +++ b/osrframework/wrappers/leakforums.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Leakforums(Platform): + """ + A object for Leakforums. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Leakforums" + self.tags = ["leaks", "carding"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://leakforums.net/u/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ['[{"u":"-1","n":"Bad Input"}]', '[]'] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/linkedin.py b/osrframework/wrappers/linkedin.py new file mode 100644 index 0000000..887e3a4 --- /dev/null +++ b/osrframework/wrappers/linkedin.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Linkedin(Platform): + """ + A object for Linkedin. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Linkedin" + self.tags = ["professional", "contact"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.linkedin.com/in/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Perfil no encontrado"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/listaspam.py b/osrframework/wrappers/listaspam.py new file mode 100644 index 0000000..ce58b12 --- /dev/null +++ b/osrframework/wrappers/listaspam.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Listaspam(Platform): + ''' + A object for Listaspam. + ''' + def __init__(self): + ''' + Consstructor... + ''' + self.platformName = "Listaspam" + self.tags = ["phone"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = True + self.isValidMode["usufy"] = False + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + self.url = {} + self.url["phonefy"] = "http://www.listaspam.com/busca.php?Telefono=" + "" + #self.url["usufy"] = "http://anyurl.com/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + self.validQuery["phonefy"] = ".+" + self.validQuery["usufy"] = ".+" + self.validQuery["searchfy"] = ".+" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the phone number is not appearing + self.notFoundText = {} + self.notFoundText["phonefy"] = ["No te quedes sin saber quien te llama por teléfono."] + #self.notFoundText["usufy"] = [] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + # Definition of regular expressions to be searched in phonefy mode + self.fieldsRegExp["phonefy"] = {} + self.fieldsRegExp["phonefy"]["i3visio.location.province"] = "(.*)," + self.fieldsRegExp["phonefy"]["i3visio.location.country"] = "class='country_located' alt='([a-zA-Zñ]*)'" + self.fieldsRegExp["phonefy"]["i3visio.text"] = '

    (.*)

    ' + + # Definition of regular expressions to be searched in usufy mode + #self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/livejournal.py b/osrframework/wrappers/livejournal.py new file mode 100644 index 0000000..dc73748 --- /dev/null +++ b/osrframework/wrappers/livejournal.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Livejournal(Platform): + """ + A object for Livejournal. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Livejournal" + self.tags = ["social", "opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://" + "" + "." + "livejournal.com" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["
    is not currently registered."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/looki.py b/osrframework/wrappers/looki.py new file mode 100644 index 0000000..644a042 --- /dev/null +++ b/osrframework/wrappers/looki.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Looki(Platform): + ''' + A object for Looki. + ''' + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Looki" + self.tags = ["gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.looki.es/usuario/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^ ]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Looki - "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + diff --git a/osrframework/wrappers/losviajeros.py b/osrframework/wrappers/losviajeros.py new file mode 100644 index 0000000..1af1e00 --- /dev/null +++ b/osrframework/wrappers/losviajeros.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Losviajeros(Platform): + """ + A <Platform> object for Losviajeros. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Losviajeros" + self.tags = ["trips"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "<phonefy>" + self.url["usufy"] = "http://www.losviajeros.com/index.php?name=Your_Account&op=userinfo&username=" + "<usufy>" + #self.url["searchfy"] = "http://anyurl.com/search/" + "<searchfy>" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["¡El Usuario No Existe!"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/marca.py b/osrframework/wrappers/marca.py new file mode 100644 index 0000000..9765c4a --- /dev/null +++ b/osrframework/wrappers/marca.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Marca(Platform): + """ + A <Platform> object for Marca. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Marca" + self.tags = ["news", "opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "<phonefy>" + self.url["usufy"] = "http://www.marca.com/social/usuarios/" + "<usufy>" + "/" + #self.url["searchfy"] = "http://anyurl.com/search/" + "<searchfy>" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["<h4>Error 404</h4>"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/matchdoctor.py b/osrframework/wrappers/matchdoctor.py new file mode 100644 index 0000000..6be162d --- /dev/null +++ b/osrframework/wrappers/matchdoctor.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Matchdoctor(Platform): + """ + A <Platform> object for Matchdoctor. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Matchdoctor" + self.tags = ["contact"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "<phonefy>" + self.url["usufy"] = "http://www.instagram.com/" + "<usufy>" + ".html" + #self.url["searchfy"] = "http://anyurl.com/search/" + "<searchfy>" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["<title>404 - File or directory not found."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/mcneel.py b/osrframework/wrappers/mcneel.py new file mode 100644 index 0000000..e6f4eb7 --- /dev/null +++ b/osrframework/wrappers/mcneel.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Mcneel(Platform): + """ + A object for Mcneel. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Mcneel" + self.tags = ["professional"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://discourse.mcneel.com/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [">The page you requested doesn't exist or is private.

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/mediavida.py b/osrframework/wrappers/mediavida.py new file mode 100644 index 0000000..a22a4fe --- /dev/null +++ b/osrframework/wrappers/mediavida.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Mediavida(Platform): + """ + A object for Mediavida. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Mediavida" + self.tags = ["opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.mediavida.com/id/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    ERROR

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/medium.py b/osrframework/wrappers/medium.py new file mode 100644 index 0000000..07f2da9 --- /dev/null +++ b/osrframework/wrappers/medium.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Medium(Platform): + """ + A object for Medium. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Medium" + self.tags = ["opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://medium.com/@" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404 Error - Medium"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/meneame.py b/osrframework/wrappers/meneame.py new file mode 100644 index 0000000..c0b2176 --- /dev/null +++ b/osrframework/wrappers/meneame.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Meneame(Platform): + """ + A object for Meneame. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Meneame" + self.tags = ["opinions", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.meneame.net/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["usuario inexistente"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/mercadolibre.py b/osrframework/wrappers/mercadolibre.py new file mode 100644 index 0000000..5bb499d --- /dev/null +++ b/osrframework/wrappers/mercadolibre.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Lucas Sánchez" +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class MercadoLibre(Platform): + """ + A object for MercadoLibre. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "MercadoLibre" + self.tags = ["e-commerce"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://perfil.mercadolibre.com.ar/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Usuario no encontrado

    ", "

    Usuário não encontrado

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/metacafe.py b/osrframework/wrappers/metacafe.py new file mode 100644 index 0000000..d78da7c --- /dev/null +++ b/osrframework/wrappers/metacafe.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Metacafe(Platform): + """ + A object for Metacafe. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Metacafe" + self.tags = ["video"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.metacafe.com/channels/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Channel is temporarily not available

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/meteor.py b/osrframework/wrappers/meteor.py new file mode 100644 index 0000000..2090b2f --- /dev/null +++ b/osrframework/wrappers/meteor.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Meteor(Platform): + """ + A object for Meteor. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Meteor" + self.tags = ["development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://forums.meteor.com/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Oops! That page doesn’t exist or is private."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/mig.py b/osrframework/wrappers/mig.py new file mode 100644 index 0000000..207e4ec --- /dev/null +++ b/osrframework/wrappers/mig.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Mig(Platform): + """ + A object for Mig. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Mig" + self.tags = ["gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://new.mig.me/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Oops, how'd you get here?!"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/migente.py b/osrframework/wrappers/migente.py new file mode 100644 index 0000000..440f6ba --- /dev/null +++ b/osrframework/wrappers/migente.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Migente(Platform): + """ + A object for Migente. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Migente" + self.tags = ["social", "contact"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.migente.com/" + "" + "/?tracking=new_friend_center" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Página no encontrada"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/miiverse.py b/osrframework/wrappers/miiverse.py new file mode 100644 index 0000000..c153fc8 --- /dev/null +++ b/osrframework/wrappers/miiverse.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Miiverse(Platform): + """ + A object for Miiverse. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Miiverse" + self.tags = ["gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://miiverse.nintendo.net/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["No se ha encontrado al usuario."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/minecraft.py b/osrframework/wrappers/minecraft.py new file mode 100644 index 0000000..00e3ce9 --- /dev/null +++ b/osrframework/wrappers/minecraft.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Minecraft(Platform): + """ + A object for Minecraft. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Minecraft" + self.tags = ["gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.minecraftforum.net/members/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Not found - Minecraft Forum "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/moneymaker.py b/osrframework/wrappers/moneymaker.py new file mode 100644 index 0000000..7632fd0 --- /dev/null +++ b/osrframework/wrappers/moneymaker.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Moneymaker(Platform): + """ + A object for Moneymaker. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Moneymaker" + self.tags = ["e-commerce"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.moneymakerdiscussion.com/forum/members/" + "" + ".html" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Notable Members | Money Maker Discussion"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/mozilla.py b/osrframework/wrappers/mozilla.py new file mode 100644 index 0000000..6fead93 --- /dev/null +++ b/osrframework/wrappers/mozilla.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Mozilla(Platform): + """ + A object for Mozilla. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Mozilla" + self.tags = ["development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://addons.mozilla.org/en-US/firefox/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    We're sorry, but we can't find what you're looking for.. +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Musicasacra(Platform): + """ + A object for Musicasacra. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Musicasacra" + self.tags = ["opinions", "audio"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forum.musicasacra.com/forum/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["MusicaSacra Church Music Forum"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/myeloma.py b/osrframework/wrappers/myeloma.py new file mode 100644 index 0000000..e7c25b5 --- /dev/null +++ b/osrframework/wrappers/myeloma.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Myeloma(Platform): + """ + A object for Myeloma. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Myeloma" + self.tags = ["opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.myeloma.org.uk/members/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    File Not Found

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/myfitnesspal.py b/osrframework/wrappers/myfitnesspal.py new file mode 100644 index 0000000..7b5a387 --- /dev/null +++ b/osrframework/wrappers/myfitnesspal.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class MyFitnessPal(Platform): + """ + A object for MyFitnessPal. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "MyFitnessPal" + self.tags = ["sports"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.myfitnesspal.com/user/" + "" + "/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["_gaq.push(['_trackPageview', '/404.html']);"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/myspace.py b/osrframework/wrappers/myspace.py new file mode 100644 index 0000000..ab4b318 --- /dev/null +++ b/osrframework/wrappers/myspace.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Myspace(Platform): + """ + A object for Myspace. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Myspace" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://myspace.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Page Not Found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/nairaland.py b/osrframework/wrappers/nairaland.py new file mode 100644 index 0000000..53cd4d9 --- /dev/null +++ b/osrframework/wrappers/nairaland.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Nairaland(Platform): + """ + A object for Nairaland. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Nairaland" + self.tags = ["forum"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://nairaland.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404: Page Not Found."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/netlog.py b/osrframework/wrappers/netlog.py new file mode 100644 index 0000000..e100cca --- /dev/null +++ b/osrframework/wrappers/netlog.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Netlog(Platform): + """ + A object for Netlog. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Netlog" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://nl.netlog.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["werd niet teruggevonden op Netlog"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/netvibes.py b/osrframework/wrappers/netvibes.py new file mode 100644 index 0000000..724ed0c --- /dev/null +++ b/osrframework/wrappers/netvibes.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Netvibes(Platform): + """ + A object for Netvibes. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Netvibes" + self.tags = ["tools"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.netvibes.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Netvibes: universe not found - Netvibes"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/newgrounds.py b/osrframework/wrappers/newgrounds.py new file mode 100644 index 0000000..986abd9 --- /dev/null +++ b/osrframework/wrappers/newgrounds.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Newgrounds(Platform): + """ + A object for Newgrounds. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Newgrounds" + self.tags = ["gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://" + "" + ".newgrounds.com/" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Oops!

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/notablug.py b/osrframework/wrappers/notablug.py new file mode 100644 index 0000000..4783d6a --- /dev/null +++ b/osrframework/wrappers/notablug.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Notabug(Platform): + """ + A object for Notabug. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Notabug" + self.tags = ["development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://notabug.org/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    If you think this is an error, please open an issue on GitHub.

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/occupywallst.py b/osrframework/wrappers/occupywallst.py new file mode 100644 index 0000000..70558c4 --- /dev/null +++ b/osrframework/wrappers/occupywallst.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Occupywallst(Platform): + """ + A object for Occupywallst. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Occupywallst" + self.tags = ["activism"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://occupywallst.org/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    404 – Page Not Found

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/odnoklassniki.py b/osrframework/wrappers/odnoklassniki.py new file mode 100644 index 0000000..51e5cc1 --- /dev/null +++ b/osrframework/wrappers/odnoklassniki.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Odnoklassniki(Platform): + """ + A object for Vine. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Odnoklassniki" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://odnoklassniki.ru/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Odnoklassniki"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/okcupid.py b/osrframework/wrappers/okcupid.py new file mode 100644 index 0000000..687ab92 --- /dev/null +++ b/osrframework/wrappers/okcupid.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Okcupid(Platform): + """ + A object for Okcupid. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Okcupid" + self.tags = ["dating"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.okcupid.com/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Free Online Dating | OkCupid"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/onename.py b/osrframework/wrappers/onename.py new file mode 100644 index 0000000..57da682 --- /dev/null +++ b/osrframework/wrappers/onename.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Onename(Platform): + """ + A object for Onename. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Onename" + self.tags = ["cryptocurrencies", "identity"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://onename.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["User doesn't seem to exist"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/openbugbounty.py b/osrframework/wrappers/openbugbounty.py new file mode 100644 index 0000000..d828da6 --- /dev/null +++ b/osrframework/wrappers/openbugbounty.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class OpenBugBounty(Platform): + """ + A object for OpenBugBounty. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "OpenBugBounty" + self.tags = ["hacking"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.openbugbounty.org/researchers/" + "" + "/" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [ "

    404 Error: Page Not found

    " ] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/openframeworks.py b/osrframework/wrappers/openframeworks.py new file mode 100644 index 0000000..a4378f7 --- /dev/null +++ b/osrframework/wrappers/openframeworks.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Openframeworks(Platform): + """ + A object for Openframeworks. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Openframeworks" + self.tags = ["development", "tools"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forum.openframeworks.cc/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [">The page you requested doesn't exist or is private.

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/openstreetmap.py b/osrframework/wrappers/openstreetmap.py new file mode 100644 index 0000000..921f352 --- /dev/null +++ b/osrframework/wrappers/openstreetmap.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Openstreetmap(Platform): + """ + A object for Openstreetmap. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Openstreetmap" + self.tags = ["maps", "wiki"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.openstreetmap.org/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^\.]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [ 'OpenStreetMap | No such user' ] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/papaly.py b/osrframework/wrappers/papaly.py new file mode 100644 index 0000000..55884d1 --- /dev/null +++ b/osrframework/wrappers/papaly.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Papaly(Platform): + """ + A object for Papaly. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Papaly" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://papaly.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Page not found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/pastebin.py b/osrframework/wrappers/pastebin.py new file mode 100644 index 0000000..d24e6e9 --- /dev/null +++ b/osrframework/wrappers/pastebin.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Pastebin(Platform): + """ + A object for Pastebin. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Pastebin" + self.tags = ["tools"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://pastebin.com/u/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Optional Paste Settings"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/patreon.py b/osrframework/wrappers/patreon.py new file mode 100644 index 0000000..aad14a3 --- /dev/null +++ b/osrframework/wrappers/patreon.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Patreon(Platform): + """ + A object for Patreon. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Patreon" + self.tags = ["video"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.patreon.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Patreon: Page Not Found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/pearltrees.py b/osrframework/wrappers/pearltrees.py new file mode 100644 index 0000000..51cee6e --- /dev/null +++ b/osrframework/wrappers/pearltrees.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Pearltrees(Platform): + """ + A object for Pearltrees. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Pearltrees" + self.tags = ["tools"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.pearltrees.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Sorry, this page no longer exists..."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/peerbackers.py b/osrframework/wrappers/peerbackers.py new file mode 100644 index 0000000..3bcc59c --- /dev/null +++ b/osrframework/wrappers/peerbackers.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Peerbackers(Platform): + """ + A object for Peerbackers. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Peerbackers" + self.tags = ["e-commerce"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://peerbackers.com/members/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["peerbackers - Your Path To Capital - Crowdfunding Consulting"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/periscope.py b/osrframework/wrappers/periscope.py new file mode 100644 index 0000000..87309e1 --- /dev/null +++ b/osrframework/wrappers/periscope.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Periscope(Platform): + """ + A object for Periscope. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Periscope" + self.tags = ["gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.periscope.tv/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ['Sorry, this page doesn\'t exist!'] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/pgpmit.py b/osrframework/wrappers/pgpmit.py new file mode 100644 index 0000000..a8aacf0 --- /dev/null +++ b/osrframework/wrappers/pgpmit.py @@ -0,0 +1,116 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class PGPMIT(Platform): + """ + A object for the MIT PGP public keys repository. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "PGPMIT" + self.tags = ["mails", "cryptography"] + + # Base URL + self.baseURL = "http://pgp.mit.edu/pks/lookup?search=" + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = False + self.isValidMode["searchfy"] = True + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + #self.url["usufy"] = "https://github.com/" + "" + self.url["searchfy"] = "http://pgp.mit.edu/pks/lookup?search=" +"" +"&op=index" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + #self.needsCredentials["usufy"] = False + self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + #self.validQuery["usufy"] = ".*" + self.validQuery["searchfy"] = ".+" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This is not the web page you are looking for"] + self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + #self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + self.fieldsRegExp["searchfy"] = {} + self.searchfyAliasRegexp = "<([^\&]+)>" + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/phishtank.py b/osrframework/wrappers/phishtank.py new file mode 100644 index 0000000..23cd3d9 --- /dev/null +++ b/osrframework/wrappers/phishtank.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Phishtank(Platform): + """ + A object for Phishtank. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Phishtank" + self.tags = ["phishing"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.phishtank.com/user.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["PhishTank | Join the fight against phishing"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/photobucket.py b/osrframework/wrappers/photobucket.py new file mode 100644 index 0000000..1b7695a --- /dev/null +++ b/osrframework/wrappers/photobucket.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Photobucket(Platform): + """ + A object for Photobucket. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Photobucket" + self.tags = ["image"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://smg.photobucket.com/user/" + "" + "/library/?sort=3&page=1" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Sorry, the requested page does not exist.

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/pixinsight.py b/osrframework/wrappers/pixinsight.py new file mode 100644 index 0000000..68509dd --- /dev/null +++ b/osrframework/wrappers/pixinsight.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Pixinsight(Platform): + """ + A object for Pixinsight. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Pixinsight" + self.tags = ["image"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://pixinsight.com/forum/index.php?action=profile;user=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["The user whose profile you are trying to view does not exist."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/pixls.py b/osrframework/wrappers/pixls.py new file mode 100644 index 0000000..6734ff3 --- /dev/null +++ b/osrframework/wrappers/pixls.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Pixls(Platform): + """ + A object for Pixls. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Pixls" + self.tags = ["image", "professional", "development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://discuss.pixls.us/users/" + "" + "/activity" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["The page you requested doesn't exist or is private."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + diff --git a/osrframework/wrappers/pjrc.py b/osrframework/wrappers/pjrc.py new file mode 100644 index 0000000..7b192ec --- /dev/null +++ b/osrframework/wrappers/pjrc.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Pjrc(Platform): + """ + A object for Pjrc. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Pjrc" + self.tags = ["development", "e-commerce"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forum.pjrc.com/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This user has not registered and therefore does not have a profile to view."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/pokerred.py b/osrframework/wrappers/pokerred.py new file mode 100644 index 0000000..c3a78af --- /dev/null +++ b/osrframework/wrappers/pokerred.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Pokerred(Platform): + ''' + A object for Pokerred. + ''' + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Pokerred" + self.tags = ["gaming", "adult"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.poker-red.com/foros/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["
    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/pokerstrategy.py b/osrframework/wrappers/pokerstrategy.py new file mode 100644 index 0000000..1fe6825 --- /dev/null +++ b/osrframework/wrappers/pokerstrategy.py @@ -0,0 +1,116 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Pokerstrategy(Platform): + """ + A object for Pokerstrategy. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Pokerstrategy" + self.tags = ["gaming", "adult"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://es.pokerstrategy.com/community/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = True + #self.needsCredentials["searchfy"] = False + + # Array of credentials to be used + self.creds = [] + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Disculpa, ¡la página no se ha encontrado!"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/pornhub.py b/osrframework/wrappers/pornhub.py new file mode 100644 index 0000000..31376ff --- /dev/null +++ b/osrframework/wrappers/pornhub.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Pornhub(Platform): + """ + A object for Pornhub. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Pornhub" + self.tags = ["adult", "video", "contact"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.pornhub.com/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Error Page Not Found

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/proboards.py b/osrframework/wrappers/proboards.py new file mode 100644 index 0000000..c2e87b7 --- /dev/null +++ b/osrframework/wrappers/proboards.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Proboards(Platform): + """ + A object for Proboards. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Proboards" + self.tags = ["opinions", "development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://petsnails.proboards.com/username/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["The member profile you are attempting to access cannot be found."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/px500.py b/osrframework/wrappers/px500.py new file mode 100644 index 0000000..5bcb77d --- /dev/null +++ b/osrframework/wrappers/px500.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Px500(Platform): + """ + A object for 500px. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "500px" + self.tags = ["professional", "image"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://500px.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["500px / Not found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/pz.py b/osrframework/wrappers/pz.py new file mode 100644 index 0000000..2925b92 --- /dev/null +++ b/osrframework/wrappers/pz.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Pz(Platform): + """ + A object for Pz. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Pz" + self.tags = ["opinions", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.pz-news.de/forum/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Dieser Benutzer hat sich nicht registriert und somit auch kein Profil, das man ansehen kann."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/qq.py b/osrframework/wrappers/qq.py new file mode 100644 index 0000000..490da54 --- /dev/null +++ b/osrframework/wrappers/qq.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Qq(Platform): + """ + A object for QQ. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "QQ" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://bbs.map.qq.com/space-username-" + "" + ".html" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["
    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/quartermoonsaloon.py b/osrframework/wrappers/quartermoonsaloon.py new file mode 100644 index 0000000..fd378fc --- /dev/null +++ b/osrframework/wrappers/quartermoonsaloon.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Quartermoonsaloon(Platform): + """ + A object for Quartermoonsaloon. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Quartermoonsaloon" + self.tags = ["opinions", "activism"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://quartermoonsaloon.com/forum/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This user has not registered and therefore does not have a profile to view."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/rankia.py b/osrframework/wrappers/rankia.py new file mode 100644 index 0000000..fd6fa4b --- /dev/null +++ b/osrframework/wrappers/rankia.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Rankia(Platform): + """ + A object for Rankia. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Rankia" + self.tags = ["contact", "professional"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.rankia.com/usuarios/"+ "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^\.]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["La página que estás buscando no existe (404)"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/rapid7.py b/osrframework/wrappers/rapid7.py new file mode 100644 index 0000000..d672a61 --- /dev/null +++ b/osrframework/wrappers/rapid7.py @@ -0,0 +1,112 @@ +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Rapid7(Platform): + """ + A object for Rapid7. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Rapid7" + self.tags = ["hacking", "development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://community.rapid7.com/people/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ['Error | Rapid7 Community and Blog'] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/rapid_i.py b/osrframework/wrappers/rapid_i.py new file mode 100644 index 0000000..41bad31 --- /dev/null +++ b/osrframework/wrappers/rapid_i.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio " +__version__ = "1.1" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +import random + +import logging + +class Rapid_i(Platform): + """ + A object for Rapid-i. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Rapid-i" + self.tags = ["trips"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://rapid-i.com/rapidforum/index.php?action=profile;user=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = True + #self.needsCredentials["searchfy"] = False + + # Array of credentials to be used + self.creds = [] + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["The user whose profile you are trying to view does not exist."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/ratemypoo.py b/osrframework/wrappers/ratemypoo.py new file mode 100644 index 0000000..14eb02e --- /dev/null +++ b/osrframework/wrappers/ratemypoo.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Ratemypoo(Platform): + """ + A object for Ratemypoo. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Ratemypoo" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.ratemypoo.com/pictures/" + "" + "/" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["FILE NOT FOUND"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + diff --git a/osrframework/wrappers/realcarders.py b/osrframework/wrappers/realcarders.py new file mode 100644 index 0000000..1f6eeb8 --- /dev/null +++ b/osrframework/wrappers/realcarders.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Realcarders(Platform): + """ + A object for Realcarders. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Realcarders" + self.tags = ["carding"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://realcarders.us/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This user has not registered and therefore does not have a profile to view."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/rebelmouse.py b/osrframework/wrappers/rebelmouse.py new file mode 100644 index 0000000..4fedf58 --- /dev/null +++ b/osrframework/wrappers/rebelmouse.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Rebelmouse(Platform): + """ + A object for Rebelmouse. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Rebelmouse" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.rebelmouse.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404 Error"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + diff --git a/osrframework/wrappers/reddit.py b/osrframework/wrappers/reddit.py new file mode 100644 index 0000000..b1cd541 --- /dev/null +++ b/osrframework/wrappers/reddit.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Reddit(Platform): + """ + A object for Reddit. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Reddit" + self.tags = ["forum"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://en.reddit.com/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["reddit.com: page not found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/redtube.py b/osrframework/wrappers/redtube.py new file mode 100644 index 0000000..fb74a5a --- /dev/null +++ b/osrframework/wrappers/redtube.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Redtube(Platform): + """ + A object for Redtube. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Redtube" + self.tags = ["video", "adult"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.redtube.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [">Error Page Not Found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + diff --git a/osrframework/wrappers/researchgate.py b/osrframework/wrappers/researchgate.py new file mode 100644 index 0000000..1d7791d --- /dev/null +++ b/osrframework/wrappers/researchgate.py @@ -0,0 +1,115 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Researchgate(Platform): + """ + A object for Researchgate. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Researchgate" + self.tags = ["science"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.researchgate.net/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = True + #self.needsCredentials["searchfy"] = False + + # Array of credentials to be used + self.creds = [] + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Browse researchers alphabetically by name

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/reverbnation.py b/osrframework/wrappers/reverbnation.py new file mode 100644 index 0000000..59ed4cc --- /dev/null +++ b/osrframework/wrappers/reverbnation.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Reverbnation(Platform): + """ + A object for Reverbnation. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Reverbnation" + self.tags = ["music"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.reverbnation.com/" + "" + "/" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Sorry, we couldn't find that page

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/ripenear.py b/osrframework/wrappers/ripenear.py new file mode 100644 index 0000000..05fe52f --- /dev/null +++ b/osrframework/wrappers/ripenear.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Ripenear(Platform): + """ + A object for Ripenear. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Ripenear" + self.tags = ["nature"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.ripenear.me/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Page not found | RipeNear.Me"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = "

    ([^<]+)

    " + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/rojadirecta.py b/osrframework/wrappers/rojadirecta.py new file mode 100644 index 0000000..e06b808 --- /dev/null +++ b/osrframework/wrappers/rojadirecta.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Rojadirecta(Platform): + """ + A object for Rojadirecta. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Rojadirecta" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forum.rojadirecta.es/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This user has not registered and therefore does not have a profile to view."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/ruby.py b/osrframework/wrappers/ruby.py new file mode 100644 index 0000000..7919cda --- /dev/null +++ b/osrframework/wrappers/ruby.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Ruby(Platform): + """ + A object for Ruby. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Ruby" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.ruby-forum.com/user/show/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["User not found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + diff --git a/osrframework/wrappers/sarahah.py b/osrframework/wrappers/sarahah.py new file mode 100644 index 0000000..f18a7b7 --- /dev/null +++ b/osrframework/wrappers/sarahah.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Yaiza Rubio and Félix Brezo " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Sarahah(Platform): + """ + A object for Sarahah. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "sarahah" + self.tags = ["social", "teenagers"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://.sarahah.com" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ['

    User Not Found

    '] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": 'Location: "', "end": '"'} + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/scribd.py b/osrframework/wrappers/scribd.py new file mode 100644 index 0000000..68f741d --- /dev/null +++ b/osrframework/wrappers/scribd.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Scribd(Platform): + """ + A object for Scribd. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Scribd" + self.tags = ["file-sharing"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://es.scribd.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Oops, page not found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/seatwish.py b/osrframework/wrappers/seatwish.py new file mode 100644 index 0000000..d2a72fd --- /dev/null +++ b/osrframework/wrappers/seatwish.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class SeatWish(Platform): + """ + A object for SeatWish. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "SeatWish" + self.tags = ["e-commerce"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://seatwish.com/us/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Not Found (#404)"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/sencha.py b/osrframework/wrappers/sencha.py new file mode 100644 index 0000000..75116b5 --- /dev/null +++ b/osrframework/wrappers/sencha.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Sencha(Platform): + """ + A object for Sencha. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Sencha" + self.tags = ["forum", "development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.sencha.com/forum/member.php?username="+ "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Sencha Forum"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/sidereel.py b/osrframework/wrappers/sidereel.py new file mode 100644 index 0000000..2d5557b --- /dev/null +++ b/osrframework/wrappers/sidereel.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Sidereel(Platform): + """ + A object for Sidereel. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Sidereel" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.sidereel.com/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Page Not Found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/singletrackworld.py b/osrframework/wrappers/singletrackworld.py new file mode 100644 index 0000000..7b70485 --- /dev/null +++ b/osrframework/wrappers/singletrackworld.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Singletrackworld(Platform): + """ + A object for Singletrackworld. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Singletrackworld" + self.tags = ["sports"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://singletrackworld.com/members/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["The page you were looking for was not found."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/skype.py b/osrframework/wrappers/skype.py new file mode 100644 index 0000000..674c70c --- /dev/null +++ b/osrframework/wrappers/skype.py @@ -0,0 +1,193 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import logging +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +import osrframework.utils.general as general +import osrframework.thirdparties.skype.checkInSkype as skype +from osrframework.utils.platforms import Platform + +import Skype4Py + +class Skype(Platform): + """ + A object for Skype. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Skype" + self.tags = ["conversation"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = True + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "" + self.url["searchfy"] = "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + self.validQuery["searchfy"] = ".+" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [] # N/A in Skype + self.notFoundText["searchfy"] = [] # N/A in Skype + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + def processData(self, uri=None, data=None, mode=None): + ''' + Method that process the data in a Skype User. + + :return: A i3visio-like object. + ''' + info = [] + + # splitting info + pairs = data.split('; ') + + for p in pairs: + parts = p.split(':') + + aux = {} + aux["type"] = parts[0] + aux["value"] = parts[1] + aux["attributes"] = {} + + info.append(aux) + return json.dumps(info) + + def getInfo(self, query=None, process = False, mode="usufy"): + ''' + Method that checks the presence of a given query and recovers the first list of complains. + + :param query: Phone number to verify. + :param proces: Calling the processing function. + :param mode: Mode to be executed. + + :return: Python structure for the html processed. + ''' + # Defining variables for this process + results = [] + data = "" + if not self.modeIsValid(mode=mode): + # TO-DO: InvalidModeException + return json.dumps(results) + + try: + logger = logging.getLogger("osrframework.wrappers") + # Verifying if the nick is a correct nick + if self._isValidQuery(query, mode): + logger.debug("Starting Skype client...") + + logger.warning("A Skype client must be set up... Note that the program will need a valid session of Skype having been started. If you were performing too many searches, the server may block or ban your account depending on the ToS. Please run this program under your own responsibility.") + # Instantiate Skype object, all further actions are done + # using this object. + + # Dealing with UTF8 + import codecs + import sys + + UTF8Writer = codecs.getwriter('utf8') + sys.stdout = UTF8Writer(sys.stdout) + + # Search for users and display their Skype name, full name + # and country. + #print "In skype.py, before sending the query: '" + query + "'" + data = skype.checkInSkype(query) + #print "In skype.py, printing the 'data' variable:\n" + json.dumps(data, indent=2) + except Exception as e: + print(general.warning("[!] In skype.py, exception caught when checking information in Skype!\n")) + # No information was found, then we return a null entity + return json.dumps(results) + + # Verifying if the platform exists + if mode == "usufy": + for user in data: + if user["value"] == "Skype - " + query.lower(): + results.append(user) + elif mode == "searchfy": + results = data + + #print "In skype.py, printing the 'results' variable:\n" + json.dumps(results, indent=2) + return json.dumps(results) diff --git a/osrframework/wrappers/slashdot.py b/osrframework/wrappers/slashdot.py new file mode 100644 index 0000000..ff7fa30 --- /dev/null +++ b/osrframework/wrappers/slashdot.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Slashdot(Platform): + """ + A object for Slashdot. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Slashdot" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://slashdot.org/~" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["- Slashdot User\t\t", "The user you requested does not exist, no matter how much you wish this might be the case."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/slideshare.py b/osrframework/wrappers/slideshare.py new file mode 100644 index 0000000..fec6c1c --- /dev/null +++ b/osrframework/wrappers/slideshare.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Slideshare(Platform): + """ + A object for Slideshare. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Slideshare" + self.tags = ["social", "microblogging"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.slideshare.net/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["is still available"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/smartcitizen.py b/osrframework/wrappers/smartcitizen.py new file mode 100644 index 0000000..78f9a54 --- /dev/null +++ b/osrframework/wrappers/smartcitizen.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Smartcitizen(Platform): + """ + A object for Smartcitizen. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Smartcitizen" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forum.smartcitizen.me/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Page Not Found

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/smugmug.py b/osrframework/wrappers/smugmug.py new file mode 100644 index 0000000..58bcb2d --- /dev/null +++ b/osrframework/wrappers/smugmug.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.1" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Smugmug(Platform): + """ + A object for Smugmug. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Smugmug" + self.tags = ["photos"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://" + "" + ".smugmug.com/" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^\.]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Page Not Found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/soundcloud.py b/osrframework/wrappers/soundcloud.py new file mode 100644 index 0000000..a5e9750 --- /dev/null +++ b/osrframework/wrappers/soundcloud.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Soundcloud(Platform): + """ + A object for Soundcloud. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Soundcloud" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://soundcloud.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["SoundCloud - Hear the world’s sounds"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/soup.py b/osrframework/wrappers/soup.py new file mode 100644 index 0000000..6290eab --- /dev/null +++ b/osrframework/wrappers/soup.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Soup(Platform): + """ + A object for Soup. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Soup" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://" + "" + ".soup.io" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Happy happy joy joy! A new user!

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/sourceforge.py b/osrframework/wrappers/sourceforge.py new file mode 100644 index 0000000..0f21e79 --- /dev/null +++ b/osrframework/wrappers/sourceforge.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Sourceforge(Platform): + """ + A object for Sourceforge. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Sourceforge" + self.tags = ["development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://sourceforge.net/u/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["We're sorry but we weren't able to process this request."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/spaniards.py b/osrframework/wrappers/spaniards.py new file mode 100644 index 0000000..c43cc78 --- /dev/null +++ b/osrframework/wrappers/spaniards.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Spaniards(Platform): + """ + A object for Spaniards. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Spaniards" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.spaniards.es/usuarios/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Page not found | Spaniards.es, la Comunidad de Españoles en el Mundo"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/spoj.py b/osrframework/wrappers/spoj.py new file mode 100644 index 0000000..c3748ed --- /dev/null +++ b/osrframework/wrappers/spoj.py @@ -0,0 +1,132 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Spoj(Platform): + """ + A object for Spoj. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Spoj" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] ="http://www.spoj.com/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [">History of submissions"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + def somethingFound(self,data,mode="phonefy"): + ''' + Verifying if something was found. Note that this method needed to be rewritten as in Spoj we need to look for a text which APPEARS instead of looking for a text that does NOT appear. + + :param data: Data where the self.notFoundText will be searched. + :param mode: Mode to be executed. + + :return: Returns True if exists. + ''' + #try: + for text in self.notFoundText[mode]: + if text in data: + # This is the change with regards to the standard behaviour! + return True + return False + #except: + # pass + # # TO-DO: Throw notFoundText not found for this mode. + + diff --git a/osrframework/wrappers/spotify.py b/osrframework/wrappers/spotify.py new file mode 100644 index 0000000..89bf63d --- /dev/null +++ b/osrframework/wrappers/spotify.py @@ -0,0 +1,127 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Spotify(Platform): + """ + A object for Spotify. + """ + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Spotify" + self.tags = ["social", "music"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://open.spotify.com/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = True + #self.needsCredentials["searchfy"] = False + + # Array of credentials to be used + self.creds = [] + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Página no encontrada"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + def _doesTheUserExist(self, html): + ''' + Method that performs the verification of the existence or not of a given profile. This method has been rewritten as the standard notFoundText approach is not possible and we have to look for text that appears on VALID profiles. + ''' + # this platform requires a special treatment, as we have been able to identify only characterized text that appears when a user exists + userExistsText = ["

    Top Tracks

    "] + # the traditional function is rewritten... + for t in userExistsText: + if t in html: + return html + return None + diff --git a/osrframework/wrappers/spreaker.py b/osrframework/wrappers/spreaker.py new file mode 100644 index 0000000..be676f7 --- /dev/null +++ b/osrframework/wrappers/spreaker.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Spreaker(Platform): + """ + A object for Spreaker. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Spreaker" + self.tags = ["podcast", "audio"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.spreaker.com/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Página no encontrada", "Page not found", "Pagina non trovata"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/squidoo.py b/osrframework/wrappers/squidoo.py new file mode 100644 index 0000000..4551b1a --- /dev/null +++ b/osrframework/wrappers/squidoo.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Squidoo(Platform): + """ + A object for Squidoo. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Squidoo" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.squidoo.com/lensmasters/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [">Squidoo : Burp!"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/steamcommunity.py b/osrframework/wrappers/steamcommunity.py new file mode 100644 index 0000000..c9ea2c5 --- /dev/null +++ b/osrframework/wrappers/steamcommunity.py @@ -0,0 +1,116 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Steamcommunity(Platform): + """ + A object for Steamcommunity. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Steamcommunity" + self.tags = ["social", "news"] + + # Base URL + self.baseURL = "https://steamcommunity.com" + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://steamcommunity.com/id/" + "" + #self.url["searchfy"] = "http://steamcommunity.com/search/?text=" + "" + "&x=0&y=0#filter=users&text=" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [":: Error"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": "", "end": ""}#\n\t\t\t\t\t\t\t\t\t\t\t"}#\t", "end": "r"}#\n\t\t\t\t\t\t\t\t\t\t\t"}#\t\t\t\t\t\t\t\t\t\t\t\t\t\t", "end": "\t\t\t\t\t
    \t\t\t\t\t\t\t\t\t\t
    "} + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + #self.searchfyAliasRegexp = '. +# +################################################################################## + +__author__ = "i3visio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Steemit(Platform): + """A object for Steemit. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Steemit" + self.tags = ["cryptocurrencies", "blog"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://steemit.com/@" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ['User Not Found - Steemit'] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/steinberg.py b/osrframework/wrappers/steinberg.py new file mode 100644 index 0000000..b27fe86 --- /dev/null +++ b/osrframework/wrappers/steinberg.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Steinberg(Platform): + """ + A object for Steinberg. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Steinberg" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.steinberg.net/forums/memberlist.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["No members found for this search criterion."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/streakgaming.py b/osrframework/wrappers/streakgaming.py new file mode 100644 index 0000000..c7eefb0 --- /dev/null +++ b/osrframework/wrappers/streakgaming.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Streakgaming(Platform): + """ + A object for Streakgaming. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Streakgaming" + self.tags = ["social", "news", "gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.streakgaming.com/forum/members/" + "" + ".html" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This user has not registered and therefore does not have a profile to view."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/taringa.py b/osrframework/wrappers/taringa.py new file mode 100644 index 0000000..8a8a708 --- /dev/null +++ b/osrframework/wrappers/taringa.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Taringa(Platform): + """ + A object for Taringa. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Taringa" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.taringa.net/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [ '' ] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/teamtreehouse.py b/osrframework/wrappers/teamtreehouse.py new file mode 100644 index 0000000..bc45b62 --- /dev/null +++ b/osrframework/wrappers/teamtreehouse.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Teamtreehouse(Platform): + """ + A object for Teamtreehouse. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Teamtreehouse" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://teamtreehouse.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Sorry, we can't find the page you are looking for"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/techcrunch.py b/osrframework/wrappers/techcrunch.py new file mode 100644 index 0000000..3615b2c --- /dev/null +++ b/osrframework/wrappers/techcrunch.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform +class Techcrunch(Platform): + """ + A object for Techcrunch. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Techcrunch" + self.tags = ["professional", "development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://techcrunch.com/author/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["TechCrunch - The latest technology news and information on startups"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/technorati.py b/osrframework/wrappers/technorati.py new file mode 100644 index 0000000..93d6c63 --- /dev/null +++ b/osrframework/wrappers/technorati.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Technorati(Platform): + """ + A object for Technorati. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Technorati" + self.tags = ["development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://technorati.com/author/" + "" + "/" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404 Not found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/thehoodup.py b/osrframework/wrappers/thehoodup.py new file mode 100644 index 0000000..d209bc4 --- /dev/null +++ b/osrframework/wrappers/thehoodup.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Thehoodup(Platform): + ''' + A object for Thehoodup. + ''' + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Thehoodup" + self.tags = ["forum", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://thehoodup.com/board/memberlist.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = True + #self.needsCredentials["searchfy"] = False + + # Array of credentials to be used + self.creds = [] + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["No members found for this search criterion."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/thesims.py b/osrframework/wrappers/thesims.py new file mode 100644 index 0000000..3b0ee26 --- /dev/null +++ b/osrframework/wrappers/thesims.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform +class Thesims(Platform): + """ + A object for Thesims. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Thesims" + self.tags = ["gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://mypage.thesims3.com/mypage/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [" - Community - The Sims 3"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/thestudentroom.py b/osrframework/wrappers/thestudentroom.py new file mode 100644 index 0000000..245f597 --- /dev/null +++ b/osrframework/wrappers/thestudentroom.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform +class Thestudentroom(Platform): + """ + A object for Thestudentroom. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Thestudentroom" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.thestudentroom.co.uk/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This user has not registered and therefore does not have a profile to view."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/theverge.py b/osrframework/wrappers/theverge.py new file mode 100644 index 0000000..423cec5 --- /dev/null +++ b/osrframework/wrappers/theverge.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Theverge(Platform): + """ + A object for Theverge. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Theverge" + self.tags = ["news", "tech"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.theverge.com/users/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [ '404 Not found' ] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/tipme.py b/osrframework/wrappers/tipme.py new file mode 100644 index 0000000..d4a87f5 --- /dev/null +++ b/osrframework/wrappers/tipme.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Tipme(Platform): + """ + A object for Tipme. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Tipme" + self.tags = ["cryptocurrencies", "payments"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.changetip.com/tipme/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Uh oh / ChangeTip"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/tradimo.py b/osrframework/wrappers/tradimo.py new file mode 100644 index 0000000..d8ca335 --- /dev/null +++ b/osrframework/wrappers/tradimo.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform +class Tradimo(Platform): + """ + A object for Tradimo. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Tradimo" + self.tags = ["e-commerce", "adult"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://en.tradimo.com/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    We are sorry, the page you requested cannot be found

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/trakt.py b/osrframework/wrappers/trakt.py new file mode 100644 index 0000000..8a41733 --- /dev/null +++ b/osrframework/wrappers/trakt.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Trakt(Platform): + """ + A object for Trakt. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Trakt" + self.tags = ["video"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://trakt.tv/people/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["The page you were looking for doesn't exist (404) - Trakt.tv"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/translate_hola.py b/osrframework/wrappers/translate_hola.py new file mode 100644 index 0000000..82bd594 --- /dev/null +++ b/osrframework/wrappers/translate_hola.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class TranslateHola(Platform): + """ + A object for Typepad. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Translate_Hola" + self.tags = ["translation"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://translate.hola.org/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["The page you are looking for was not found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/trip.py b/osrframework/wrappers/trip.py new file mode 100644 index 0000000..6913062 --- /dev/null +++ b/osrframework/wrappers/trip.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + + +class Trip(Platform): + """ + A object for Trip. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Trip" + self.tags = ["trips"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.trip.com/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^\.]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Brittney Mauck Travel Tips & Activities - Trip.com"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/tripadvisor.py b/osrframework/wrappers/tripadvisor.py new file mode 100644 index 0000000..9da695a --- /dev/null +++ b/osrframework/wrappers/tripadvisor.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Tripadvisor(Platform): + """ + A object for Tripadvisor. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Tripadvisor" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.tripadvisor.es/members/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["No se ha encontrado la página."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/tripit.py b/osrframework/wrappers/tripit.py new file mode 100644 index 0000000..b88c723 --- /dev/null +++ b/osrframework/wrappers/tripit.py @@ -0,0 +1,117 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +# CHANGE: the name of the object +class Tripit(Platform): + """ + A object for Demo using Tripit. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Tripit" + self.tags = ["social", "trips"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.tripit.com/people/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = True + #self.needsCredentials["searchfy"] = False + + # Array of credentials to be used + self.creds = [] + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^ ]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Page Not Found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + diff --git a/osrframework/wrappers/trulia.py b/osrframework/wrappers/trulia.py new file mode 100644 index 0000000..8be0a2a --- /dev/null +++ b/osrframework/wrappers/trulia.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Trulia(Platform): + """ + A object for Trulia. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Trulia" + self.tags = ["contact", "professional", "social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://activerain.trulia.com/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Welcome to the ActiveRain Real Estate Community!"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/tumblr.py b/osrframework/wrappers/tumblr.py new file mode 100644 index 0000000..7386a0a --- /dev/null +++ b/osrframework/wrappers/tumblr.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Tumblr(Platform): + """ + A object for Tumblr. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Tumblr" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://" + "" + ".tumblr.com" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^\.]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Untitled"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/tune.py b/osrframework/wrappers/tune.py new file mode 100644 index 0000000..5ef5f9d --- /dev/null +++ b/osrframework/wrappers/tune.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Tune(Platform): + """ + A object for Tune. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Tune" + self.tags = ["social", "video"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://tune.pk/user/" + "" + "/about/" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    User does not exist!

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.location.country"] = {"start": " "} + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/tuporno.py b/osrframework/wrappers/tuporno.py new file mode 100644 index 0000000..f75d22c --- /dev/null +++ b/osrframework/wrappers/tuporno.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Tuporno(Platform): + """ + A object for Tuporno. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Tuporno" + self.tags = ["adult"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://tuporno.tv/usuario/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Tuporno.tv - Videos Porno"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/twicsy.py b/osrframework/wrappers/twicsy.py new file mode 100644 index 0000000..16c4ce7 --- /dev/null +++ b/osrframework/wrappers/twicsy.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Twicsy(Platform): + """ + A <Platform> object for Twicsy. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Twicsy" + self.tags = ["social", "photos"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "<phonefy>" + self.url["usufy"] = "http://twicsy.com/u/" + "<usufy>" + #self.url["searchfy"] = "http://anyurl.com/search/" + "<searchfy>" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["No pics found!"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/twitch.py b/osrframework/wrappers/twitch.py new file mode 100644 index 0000000..4043b7a --- /dev/null +++ b/osrframework/wrappers/twitch.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Twitch(Platform): + ''' + A <Platform> object for Twitch. + ''' + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Twitch" + self.tags = ["social", "video"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "<phonefy>" + self.url["usufy"] = "http://www.twitch.tv/" + "<usufy>" + "/profile" + #self.url["searchfy"] = "http://anyurl.com/search/" + "<searchfy>" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["<title>Twitch"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + + diff --git a/osrframework/wrappers/twitter.py b/osrframework/wrappers/twitter.py new file mode 100644 index 0000000..13aef6b --- /dev/null +++ b/osrframework/wrappers/twitter.py @@ -0,0 +1,133 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform +# Importing the API Wrapper +from osrframework.api.twitter_api import TwitterAPIWrapper as TwitterAPIWrapper + +class Twitter(Platform): + """ + A object for Twitter. + """ + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Twitter" + self.tags = ["contact", "microblogging", "social"] + + # Base URL + self.baseURL = "http://twitter.com/" + + # Trying to find an API... This line should be added in every platform for which we have defined an API. + # DO NOT FORGET TO IMPORT THE APIWRAPPER, i. e.: + # from osrframework.api import TwitterAPIWrapper as TwitterAPIWrapper + try: + self.wrapperAPI = TwitterAPIWrapper() + except Exception, e: + self.wrapperAPI = None + + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = True + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://twitter.com/" + "" + self.url["searchfy"] = "https://twitter.com/search?f=users&vertical=default&q=\"" + "" + "\"" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[a-zA-Z0-9_]+" + self.validQuery["searchfy"] = ".+" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["
    \n ", "end": "\n "} + #self.fieldsRegExp["usufy"]["ProfileHeaderCard-bio"] = {"start": "

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": "\n ", "end": "\n \n
    \n\n
    Se uni"} + self.fieldsRegExp["usufy"]["i3visio.uri.homepage"] = {"start": ""} + #self.fieldsRegExp["usufy"]["PhotoRail-headingText"] = {"start": "class=\"js-nav\">\n \n ", "end": " "} + + # Definition of regular expressions to be searched in searchfy mode + self.fieldsRegExp["searchfy"] = {} + self.searchfyAliasRegexp = "data-screen-name=\"([^\"]+)\"" + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/twoplustwo.py b/osrframework/wrappers/twoplustwo.py new file mode 100644 index 0000000..f545b28 --- /dev/null +++ b/osrframework/wrappers/twoplustwo.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Twoplustwo(Platform): + """ + A object for Twoplustwo. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Twoplustwo" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forumserver.twoplustwo.com/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This user has not registered and therefore does not have a profile to view."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/typepad.py b/osrframework/wrappers/typepad.py new file mode 100644 index 0000000..657adbc --- /dev/null +++ b/osrframework/wrappers/typepad.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Typepad(Platform): + """ + A object for Typepad. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Typepad" + self.tags = ["education"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://profile.typepad.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["doesn't exist or it could have been mistyped.

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/unioncarder.py b/osrframework/wrappers/unioncarder.py new file mode 100644 index 0000000..59cc2ef --- /dev/null +++ b/osrframework/wrappers/unioncarder.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Fran Gomez @ffranz " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Unioncarder(Platform): + """ + A object for Unioncarder. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Unioncarder" + self.tags = ["carding"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://unioncarder.com/members/?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["El miembro específicado no pudo ser encontrado. Por favor ingrese el nombre completo del miembro."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/ustream.py b/osrframework/wrappers/ustream.py new file mode 100644 index 0000000..8db1b12 --- /dev/null +++ b/osrframework/wrappers/ustream.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Ustream(Platform): + """ + A object for Ustream. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Ustream" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.ustream.tv/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Ustream"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/v7n.py b/osrframework/wrappers/v7n.py new file mode 100644 index 0000000..ab22356 --- /dev/null +++ b/osrframework/wrappers/v7n.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class V7n(Platform): + """ + A object for V7n. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "V7n" + self.tags = ["development"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.v7n.com/forums/members/" + "" + ".html" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This user has not registered and therefore does not have a profile to view."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/venmo.py b/osrframework/wrappers/venmo.py new file mode 100644 index 0000000..0b23e7c --- /dev/null +++ b/osrframework/wrappers/venmo.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Venmo(Platform): + """ + A object for Venmo. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Venmo" + self.tags = ["payments", "e-commerce"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://venmo.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [ "Venmo | Page Not Found" ] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/vexforum.py b/osrframework/wrappers/vexforum.py new file mode 100644 index 0000000..0fbb132 --- /dev/null +++ b/osrframework/wrappers/vexforum.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Vexforum(Platform): + """ + A object for Vexforum. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Vexforum" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.vexforum.com/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This user has not registered and therefore does not have a profile to view."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/viddler.py b/osrframework/wrappers/viddler.py new file mode 100644 index 0000000..58d91f5 --- /dev/null +++ b/osrframework/wrappers/viddler.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Viddler(Platform): + """ + A object for Viddler. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Viddler" + self.tags = ["video"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.viddler.com/channel/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    Nothing to see here

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/videohelp.py b/osrframework/wrappers/videohelp.py new file mode 100644 index 0000000..b778a84 --- /dev/null +++ b/osrframework/wrappers/videohelp.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Videohelp(Platform): + """ + A object for Videohelp. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Videohelp" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forum.videohelp.com/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["This user has not registered and therefore does not have a profile to view."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/vimeo.py b/osrframework/wrappers/vimeo.py new file mode 100644 index 0000000..03c3c81 --- /dev/null +++ b/osrframework/wrappers/vimeo.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Vimeo(Platform): + """ + A object for Vimeo. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Vimeo" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://vimeo.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["VimeUhOh"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/virustotal.py b/osrframework/wrappers/virustotal.py new file mode 100644 index 0000000..34677c2 --- /dev/null +++ b/osrframework/wrappers/virustotal.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Virustotal(Platform): + """ + A object for Virustotal. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Virustotal" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.virustotal.com/en/user/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Page not found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/vk.py b/osrframework/wrappers/vk.py new file mode 100644 index 0000000..82f43c3 --- /dev/null +++ b/osrframework/wrappers/vk.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Vk(Platform): + """ + A object for Vk. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Vk" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://vk.com/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["404 Not Found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/warriorforum.py b/osrframework/wrappers/warriorforum.py new file mode 100644 index 0000000..71ed8f1 --- /dev/null +++ b/osrframework/wrappers/warriorforum.py @@ -0,0 +1,119 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "i3visio" +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Warriorforum(Platform): + """ + A object for Warriorforum. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Warriorforum" + self.tags = ["gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.warriorforum.com/members/" + "" + ".html" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^\.\-]+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ['Oops | Warrior'] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + self.fieldsRegExp["usufy"]["i3visio.fullname"] = "<h2>([^<]+)</h2>" + self.fieldsRegExp["usufy"]["i3visio.location"] = '<dt class="shade">Location</dt> <dd>([^<]+)</dd>' + self.fieldsRegExp["usufy"]["i3visio.alias_twitter"] = '<dt class="shade">Twitter</dt> <dd>([^<]+)</dd>' + self.fieldsRegExp["usufy"]["i3visio.alias_facebook"] = '<dt class="shade">FaceBook</dt> <dd>([^<]+)</dd>' + self.fieldsRegExp["usufy"]["i3visio.alias_myspace"] = '<dt class="shade">MySpace</dt> <dd>([^<]+)</dd>' + self.fieldsRegExp["usufy"]["i3visio.alias_youtube"] = '<dt class="shade">Youtube\.com</dt> <dd>([^<]+)</dd>' + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/webtv.py b/osrframework/wrappers/webtv.py new file mode 100644 index 0000000..f214ca1 --- /dev/null +++ b/osrframework/wrappers/webtv.py @@ -0,0 +1,110 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Webtv(Platform): + """ + A <Platform> object for Webtv. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Webtv" + self.tags = ["video"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "<phonefy>" + self.url["usufy"] = "http://web.tv/user/" + "<usufy>" + #self.url["searchfy"] = "http://anyurl.com/search/" + "<searchfy>" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ['- web.tv'] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/wikia.py b/osrframework/wrappers/wikia.py new file mode 100644 index 0000000..e9d21b5 --- /dev/null +++ b/osrframework/wrappers/wikia.py @@ -0,0 +1,114 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "Felix Brezo, Yaiza Rubio " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Wikia(Platform): + """ + A object for Wikia. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Wikia" + self.tags = ["gaming"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://community.wikia.com/wiki/User:" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [' (page does not exist)">'] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + diff --git a/osrframework/wrappers/wikipediaar.py b/osrframework/wrappers/wikipediaar.py new file mode 100644 index 0000000..5c8d533 --- /dev/null +++ b/osrframework/wrappers/wikipediaar.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class WikipediaAr(Platform): + """ + A object for WikipediaAr. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Wikipedia (ar)" + self.parameterName = "wikipedia" + self.tags = ["education", "wiki"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://ar.wikipedia.org/wiki/user:" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ['mw-userpage-userdoesnotexist error'] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/wikipediaca.py b/osrframework/wrappers/wikipediaca.py new file mode 100644 index 0000000..ad46feb --- /dev/null +++ b/osrframework/wrappers/wikipediaca.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class WikipediaCa(Platform): + """ + A object for WikipediaCa. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Wikipedia (ca)" + self.parameterName = "wikipedia" + self.tags = ["education", "wiki"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://ca.wikipedia.org/wiki/Usuari:" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["no està registrat."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/wikipediade.py b/osrframework/wrappers/wikipediade.py new file mode 100644 index 0000000..0efd86b --- /dev/null +++ b/osrframework/wrappers/wikipediade.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class WikipediaDe(Platform): + """ + A object for WikipediaDe. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Wikipedia (de)" + self.parameterName = "wikipedia" + self.tags = ["education", "wiki"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://de.wikipedia.org/wiki/Benutzer:" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["ist nicht vorhanden."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/wikipediaen.py b/osrframework/wrappers/wikipediaen.py new file mode 100644 index 0000000..7faaba0 --- /dev/null +++ b/osrframework/wrappers/wikipediaen.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class WikipediaEn(Platform): + """ + A object for WikipediaEn. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Wikipedia (en)" + self.parameterName = "wikipedia" + self.tags = ["education", "wiki"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://en.wikipedia.org/wiki/user:" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["is not registered.", "user page with this exact name.
    In general, this page should be created and edited by"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/wikipediaes.py b/osrframework/wrappers/wikipediaes.py new file mode 100644 index 0000000..6ff80a8 --- /dev/null +++ b/osrframework/wrappers/wikipediaes.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class WikipediaEs(Platform): + """ + A object for WikipediaEs. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Wikipedia (es)" + self.parameterName = "wikipedia" + self.tags = ["education", "wiki"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://es.wikipedia.org/wiki/Usuario:" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Wikipedia aún no tiene una página"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/wikipediaeu.py b/osrframework/wrappers/wikipediaeu.py new file mode 100644 index 0000000..7f45aaa --- /dev/null +++ b/osrframework/wrappers/wikipediaeu.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class WikipediaEu(Platform): + """ + A object for WikipediaEu. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Wikipedia (eu)" + self.parameterName = "wikipedia" + self.tags = ["education", "wiki"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://eu.wikipedia.org/wiki/Lankide:" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Lankidea orrialdea Wikipedia honetan ez badago oraindik:"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/wikipediafr.py b/osrframework/wrappers/wikipediafr.py new file mode 100644 index 0000000..39c851c --- /dev/null +++ b/osrframework/wrappers/wikipediafr.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class WikipediaFr(Platform): + """ + A object for WikipediaFr. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Wikipedia (fr)" + self.parameterName = "wikipedia" + self.tags = ["education", "wiki"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://fr.wikipedia.org/wiki/Utilisateur:" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["dans les autres pages de l'espace Utilisateur."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/wikipediapt.py b/osrframework/wrappers/wikipediapt.py new file mode 100644 index 0000000..8d1e243 --- /dev/null +++ b/osrframework/wrappers/wikipediapt.py @@ -0,0 +1,111 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class WikipediaPt(Platform): + """ + A object for WikipediaPt. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Wikipedia (pt)" + self.parameterName = "wikipedia" + self.tags = ["education", "wiki"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://pt.wikipedia.org/wiki/Usuário(a):" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["com este nome exato. Em geral, esta página deveria ser criada e editada por"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/winamp.py b/osrframework/wrappers/winamp.py new file mode 100644 index 0000000..89f22fd --- /dev/null +++ b/osrframework/wrappers/winamp.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Winamp(Platform): + """ + A object for Winamp. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Winamp" + self.tags = ["audio", "music"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://forums.winamp.com/member.php?username=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = [""] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/wishlistr.py b/osrframework/wrappers/wishlistr.py new file mode 100644 index 0000000..a514f9f --- /dev/null +++ b/osrframework/wrappers/wishlistr.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Wishlistr(Platform): + """ + A object for Wishlistr. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Wishlistr" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.wishlistr.com/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Wishlistr - The Page Could Not Be Found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/witty.py b/osrframework/wrappers/witty.py new file mode 100644 index 0000000..79bf54b --- /dev/null +++ b/osrframework/wrappers/witty.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Witty(Platform): + """ + A object for Witty. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Witty" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.wittyprofiles.com/author/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["

    It looks like you are looking for something that isn't here.

    "] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/wykop.py b/osrframework/wrappers/wykop.py new file mode 100644 index 0000000..80aeef0 --- /dev/null +++ b/osrframework/wrappers/wykop.py @@ -0,0 +1,112 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Wykop(Platform): + """ + A object for Wykop. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Wykop" + self.tags = ["social", "opinions"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.wykop.pl/ludzie/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Wykop.pl - newsy, aktualności, gry, wiadomości, muzyka, ciekawostki, filmiki"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/xanga.py b/osrframework/wrappers/xanga.py new file mode 100644 index 0000000..bbe2419 --- /dev/null +++ b/osrframework/wrappers/xanga.py @@ -0,0 +1,116 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Xanga(Platform): + ''' + A object for Xanga. + ''' + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Xanga" + self.tags = ["social", "news"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Xanga 2.0 is Here!"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + self.fieldsRegExp["usufy"]["@last_activity"] = {"start": "

    ", "end": ""} + self.fieldsRegExp["usufy"]["@last_post_title"] = {"start": "Recent Posts

    ", "end": ""} + self.fieldsRegExp["usufy"]["@last_comment_title"] = {"start": "Recent Posts
    ", "end": ""} + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/xing.py b/osrframework/wrappers/xing.py new file mode 100644 index 0000000..2b1764b --- /dev/null +++ b/osrframework/wrappers/xing.py @@ -0,0 +1,121 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Xing(Platform): + ''' + A object for Xing. + ''' + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Xing" + self.tags = ["contact", "professional"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.xing.com/profile/" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Oh nein ... diese Seite haben wir leider nicht gefunden."] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + self.fieldsRegExp["usufy"]["i3visio.fullname"] = {"start": "

    Contactos de ", "end": "

    "} + self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": "workLocation\">", "end": ""} + self.fieldsRegExp["usufy"]["@makes_offer"] = {"start": "\"makesOffer\" itemscope itemtype=\"http://schema.org/Offer\">", "end": "
    "} + self.fieldsRegExp["usufy"]["@seeks"] = {"start": "\"seeks\" itemscope itemtype=\"http://schema.org/Demands\">", "end": "
    "} + self.fieldsRegExp["usufy"]["@job_title"] = {"start": "

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@language"] = {"start": "
      ", "end": "
    "} + self.fieldsRegExp["usufy"]["@interests"] = {"start": "
    ", "end": "
    "} + self.fieldsRegExp["usufy"]["@education"] = {"start": "
  • ", "end": "
  • "} + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/xtube.py b/osrframework/wrappers/xtube.py new file mode 100644 index 0000000..ea7e8d2 --- /dev/null +++ b/osrframework/wrappers/xtube.py @@ -0,0 +1,153 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Xtube(Platform): + ''' + A object for Xtube. + ''' + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Xtube" + # Add the tags for the platform + self.tags = ["video", "adult", "contact"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "http://www.xtube.com/community/profile.php?user=" + "" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Error page not found"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + gap = "\n
    \n " + self.fieldsRegExp["usufy"]["@horoscope"] = {"start": "

    Horoscope

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@tobacco_consumption"] = {"start": "

    Tobacco Consumption

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@alcohol_consumption"] = {"start": "

    Alcohol Consumption

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@ideal_partner"] = {"start": "

    Ideal partner

    " + gap +"

    ", "end": "

    \n Looking for" + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@age of partner from"] = {"start": "

    Age of partner from

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@age of partner to"] = {"start": "

    Age of partner to

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@appearance"] = {"start": "

    Appearance

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@body_type"] = {"start": "

    Body Type

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@height"] = {"start": "

    Height

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@eyecolor"] = {"start": "

    Eyecolor

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@hair_color"] = {"start": "

    Hair Color

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@hair_length"] = {"start": "

    Hair Length

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@facial_hair"] = {"start": "

    Facial Hair

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@body_hair"] = {"start": "

    Body Hair

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@body_decorations"] = {"start": "

    Body Decorations

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@glasses_or_Contacts"] = {"start": "

    Glasses or Contacts

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@allergies"] = {"start": "

    Allergies

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@career/Job"] = {"start": "

    Career/Job

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@work"] = {"start": "

    Work

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@living_arrangement"] = {"start": "

    Living Arrangement

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@Sexual_orientation"] = {"start": "

    Sexual Orientation

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@sex_how_often"] = {"start": "

    Sex, How often?

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@practice_safe_sex"] = {"start": "

    Practice Safe Sex

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@making_home_videos/pics"] = {"start": "

    Making home videos/pics

    " + gap +"

    ", "end": "

    "} + self.fieldsRegExp["usufy"]["@porn_movies_how_often?"] = {"start": "

    Porn Movies, How often?

    " + gap +"

    ", "end": "

    "} + + self.fieldsRegExp["usufy"]["@sexual_orientation"] = {"start": "Sexual orientation:", "end": "
    "} + self.fieldsRegExp["usufy"]["@member_for"] = {"start": "
    Member for ", "end": "
    "} + self.fieldsRegExp["usufy"]["@comments"] = {"start": "
    ", "end": "Comments
    "} + self.fieldsRegExp["usufy"]["@number_of_friends"] = {"start": "john's Friends ", "end": ""} + self.fieldsRegExp["usufy"]["@subscribers"] = {"start": "Subscribers:
    ", "end": "
    "} + self.fieldsRegExp["usufy"]["@viewed_videos"] = {"start": "Viewed Videos:
    ", "end": "
    "} + + self.fieldsRegExp["usufy"]["i3visio.location"] = {"start": "
    .*
    ", "end": "
    "} + self.fieldsRegExp["usufy"]["@ratings"] = {"start": "Ratings:
    ", "end": "
    "} + + self.fieldsRegExp["usufy"]["@viewed_photos"] = {"start": "Viewed Photos:
    ", "end": "
    "} + + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} + + diff --git a/osrframework/wrappers/younow.py b/osrframework/wrappers/younow.py new file mode 100644 index 0000000..4d4a76a --- /dev/null +++ b/osrframework/wrappers/younow.py @@ -0,0 +1,113 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +__author__ = "John Doe " +__version__ = "1.0" + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Younow(Platform): + """ + A object for Younow. + """ + def __init__(self): + """ + Constructor... + """ + self.platformName = "Younow" + self.tags = ["social"] + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = False + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.younow.com/" + "" + "/" + #self.url["searchfy"] = "http://anyurl.com/search/" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + #self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = ".+" + #self.validQuery["searchfy"] = ".*" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["YouNow - Broadcast Live"] + #self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + # Definition of regular expressions to be searched in searchfy mode + #self.fieldsRegExp["searchfy"] = {} + # Example of fields: + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + + ################ + # Fields found # + ################ + # This attribute will be feeded when running the program. + self.foundFields = {} diff --git a/osrframework/wrappers/youtube.py b/osrframework/wrappers/youtube.py new file mode 100644 index 0000000..1d39ff1 --- /dev/null +++ b/osrframework/wrappers/youtube.py @@ -0,0 +1,157 @@ +# !/usr/bin/python +# -*- coding: cp1252 -*- +# +################################################################################## +# +# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) +# +# This program is part of OSRFramework. You can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################## + +import argparse +import json +import re +import sys +import urllib2 + +import osrframework.utils.browser as browser +from osrframework.utils.platforms import Platform + +class Youtube(Platform): + ''' + A object for Youtube. + ''' + def __init__(self): + ''' + Constructor... + ''' + self.platformName = "Youtube" + self.tags = ["social", "video"] + + # Base URL + self.baseURL = "http://youtube.com/" + + ######################## + # Defining valid modes # + ######################## + self.isValidMode = {} + self.isValidMode["phonefy"] = False + self.isValidMode["usufy"] = True + self.isValidMode["searchfy"] = True + + ###################################### + # Search URL for the different modes # + ###################################### + # Strings with the URL for each and every mode + self.url = {} + #self.url["phonefy"] = "http://anyurl.com//phone/" + "" + self.url["usufy"] = "https://www.youtube.com/user/" + "" + "/about" + self.url["searchfy"] = "https://www.youtube.com/results?filters=channel&lclk=channel&search_query=" + "" + + ###################################### + # Whether the user needs credentials # + ###################################### + self.needsCredentials = {} + #self.needsCredentials["phonefy"] = False + self.needsCredentials["usufy"] = False + self.needsCredentials["searchfy"] = False + + ################# + # Valid queries # + ################# + # Strings that will imply that the query number is not appearing + self.validQuery = {} + # The regular expression '.+' will match any query. + #self.validQuery["phonefy"] = ".*" + self.validQuery["usufy"] = "[^@, ]+" + self.validQuery["searchfy"] = ".+" + + ################### + # Not_found clues # + ################### + # Strings that will imply that the query number is not appearing + self.notFoundText = {} + #self.notFoundText["phonefy"] = [] + self.notFoundText["usufy"] = ["Este canal no existe.", "channel-empty-message banner-message"] + self.notFoundText["searchfy"] = [] + + ######################### + # Fields to be searched # + ######################### + self.fieldsRegExp = {} + + # Definition of regular expressions to be searched in phonefy mode + #self.fieldsRegExp["phonefy"] = {} + # Example of fields: + #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" + + # Definition of regular expressions to be searched in usufy mode + self.fieldsRegExp["usufy"] = {} + # Example of fields: + #self.fieldsRegExp["usufy"]["i3visio.location"] = "" + self.fieldsRegExp["usufy"]["subscribers"] = {"start": ""} + self.fieldsRegExp["usufy"]["@total_views"] = {"start": ".*
  • .*", "end": ""} + self.fieldsRegExp["usufy"]["i3visio.date"] = {"start": "
  • ", "end": "
  • "} + self.fieldsRegExp["usufy"]["i3visio.profile.facebook"] = {"start": "alt=\"https://www.facebook.com/", "end": "\""} + self.fieldsRegExp["usufy"]["i3visio.profile.twitter"] = {"start": "alt=\"http://www.twitter.com/#!/", "end": "\""} + self.fieldsRegExp["usufy"]["i3visio.profile.instagram"] = {"start": "alt=\"http://instagram.com/", "end": "\""} + self.fieldsRegExp["usufy"]["i3visio.alias"] = '", "end": "
    "} + + + # Definition of regular expressions to be searched in searchfy mode + self.fieldsRegExp["searchfy"] = {} + self.searchfyAliasRegexp = '