├── Dockerfile ├── LICENSE ├── README.md ├── Tiredful-API.jpg ├── Tiredful-API ├── Tiredful_API │ ├── __init__.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── advertisements │ ├── __init__.py │ ├── apps.py │ ├── models.py │ ├── serializers.py │ ├── templates │ │ └── advertisements │ │ │ └── index.html │ ├── urls.py │ └── views.py ├── blog │ ├── __init__.py │ ├── apps.py │ ├── models.py │ ├── permissions.py │ ├── serializers.py │ ├── templates │ │ └── blog │ │ │ └── index.html │ ├── urls.py │ └── views.py ├── client_cred.txt ├── db.sqlite3 ├── exams │ ├── __init__.py │ ├── apps.py │ ├── models.py │ ├── serializers.py │ ├── templates │ │ └── exams │ │ │ └── index.html │ ├── urls.py │ └── views.py ├── health │ ├── __init__.py │ ├── apps.py │ ├── models.py │ ├── serializers.py │ ├── templates │ │ └── health │ │ │ └── index.html │ ├── urls.py │ └── views.py ├── intro │ ├── __init__.py │ ├── apps.py │ ├── forms.py │ ├── models.py │ ├── templates │ │ └── intro │ │ │ ├── about.html │ │ │ ├── csrf.html │ │ │ ├── index.html │ │ │ ├── scenarios.html │ │ │ └── token.html │ ├── urls.py │ └── views.py ├── library │ ├── __init__.py │ ├── apps.py │ ├── models.py │ ├── serializers.py │ ├── templates │ │ └── library │ │ │ └── index.html │ ├── urls.py │ └── views.py ├── manage.py ├── static │ ├── css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── js │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ └── npm.js │ └── rest_framework │ │ ├── css │ │ ├── bootstrap-tweaks.css │ │ ├── bootstrap.min.css │ │ ├── default.css │ │ └── prettify.css │ │ ├── docs │ │ ├── css │ │ │ ├── base.css │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap.min.css │ │ │ ├── font-awesome-4.0.3.css │ │ │ ├── highlight.css │ │ │ └── jquery.json-view.min.css │ │ ├── fonts │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── img │ │ │ ├── favicon.ico │ │ │ └── grid.png │ │ └── js │ │ │ ├── api.js │ │ │ ├── base.js │ │ │ ├── bootstrap.min.js │ │ │ ├── highlight.pack.js │ │ │ ├── jquery-1.10.2.min.js │ │ │ └── jquery.json-view.min.js │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ ├── glyphicons-halflings.png │ │ └── grid.png │ │ └── js │ │ ├── ajax-form.js │ │ ├── bootstrap.min.js │ │ ├── coreapi-0.1.0.js │ │ ├── csrf.js │ │ ├── default.js │ │ ├── jquery-1.12.4.min.js │ │ └── prettify-min.js ├── templates │ ├── basic.html │ ├── elements │ │ ├── css-content.html │ │ ├── javascript-content.html │ │ ├── navbar.html │ │ └── sidebar.html │ └── scenario-basic.html └── trains │ ├── __init__.py │ ├── apps.py │ ├── models.py │ ├── serializers.py │ ├── templates │ └── trains │ │ └── index.html │ ├── urls.py │ └── views.py └── requirements.txt /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.6 2 | MAINTAINER jsvazic@gmail.com 3 | 4 | COPY . /app/ 5 | 6 | RUN apk add --update \ 7 | python \ 8 | python-dev \ 9 | py-pip \ 10 | build-base \ 11 | && rm -rf /var/cache/apk/* \ 12 | && /usr/bin/pip install -r /app/requirements.txt 13 | 14 | WORKDIR /app/Tiredful-API 15 | 16 | EXPOSE 8000 17 | 18 | CMD ["/usr/bin/python", "manage.py", "runserver", "0.0.0.0:8000"] 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### What is Tiredful API? 2 | 3 | Tiredful API is intentionally designed broken app. The aim of this web app is to teach developers, QA or security professionals about flaws present in webservices (REST API) due to insecure coding practice. 4 | 5 | ![Tiredful API image](./Tiredful-API.jpg) 6 | 7 | ### Who can use Tiredful API? 8 | * Web developers 9 | * Web Pentesters 10 | * Security Professionals 11 | * Student 12 | 13 | ### What is included in Tiredful API? 14 | 15 | I tried to cover most of the vulnerabilities, I am sure that we have missed some vulnerabilities.Please ping me if you know any good vulnerability that should be included. For now I have included following vulnerabilities. 16 | 17 | * Information Disclosure 18 | * Insecure Direct Object Reference 19 | * Access Control 20 | * Throttling 21 | * SQL Injection (SQLite) 22 | * Cross Site Scripting. 23 | 24 | [You can see solution here](https://payatu.com/tiredful-api-solution/) 25 | 26 | ### Can I contribute? 27 | Yes, you can help by sending us the details of vulnerabilities that we can implement in future versions of Tiredful API. Please mail us at info[at]payatu.com with subject "Tiredful API Scenario". 28 | 29 | ### Where can I get Tiredful API? 30 | Source can be downloaded from [link](https://github.com/payatu/Tiredful-API). 31 | 32 | ### How to run Tiredful API? 33 | Tiredful API is developed using Django Framework and Django Rest Framework, so for running the web server user needs execute following command. 34 | 35 | * Navigate to the source folder and locate manage.py file. 36 | * Then execute `python manage.py runserver`. 37 | * If static files are not getting load, then execute above command with insecure flag i.e. `python manage.py runserver --insecure` 38 | If you are facing any issue starting the web server please refer [django documentation admin](https://docs.djangoproject.com/en/1.11/ref/django-admin/#runserver) or [django documentation tutorial](https://docs.djangoproject.com/en/1.11/intro/tutorial01/#the-development-server). 39 | Please ping me if you are still not able to run development server. 40 | 41 | **Note:** It is recommended to use required libraries with the version specified in the requirements.txt. Please refer [this](https://pip.pypa.io/en/stable/user_guide/#requirements-files) more details 42 | 43 | #### Docker Container 44 | You can run Tiredful via [Docker](https://www.docker.com). Simply execute: 45 | 46 | ``` 47 | docker build -t tiredful . 48 | docker run -p 8000:8000 --name tiredful -it tiredful 49 | ``` 50 | 51 | Browse to `http://localhost:8000/` and you are all set. Use `CTRL-C` to shut down the server. 52 | 53 | Added new JWT based scenarios. Updated repository available at [repo](https://github.com/siddharthbezalwar/Tiredful-API) 54 | 55 | #### Python3 Compatible Code 56 | [Tiredful API Python3](https://github.com/siddharthbezalwar/Tiredful-API-py3-beta) 57 | 58 | ### Feedback and Bug Reports. 59 | We would love to hear from you about your experience with Tiredful API. Please send us an email on info [at] payatu [dot] com or siddharth [dot] bezalwar [at] gmail [dot] com with Subject "Tiredful API Issue" based on what you want to share. Please include the below in your email. 60 | 61 | * Operating system with version. 62 | * Django Framework used. 63 | * Steps to replicate issue. 64 | 65 | 66 | ### Author 67 | Siddharth Bezalwar 68 | 69 | @fattu_medjai | siddharth [dot] bezalwar [at] gmail [dot] com 70 | 71 | ### About Payatu 72 | Payatu is a boutique security testing company with specialization in: 73 | 74 | * IoT Security 75 | * Mobile Security 76 | * Cloud security 77 | * Web Security 78 | We also organize two International Security Conferences 79 | 80 | nullcon International Security Conference - http://nullcon.net 81 | hardwear.io Hardware Security Conference - http://hardwear.io 82 | **Website:** http://payatu.com **Email:** info (at) payatu dot com 83 | -------------------------------------------------------------------------------- /Tiredful-API.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/payatu/Tiredful-API/0134124496b3c4f1b969e51a24fd8a059104fb98/Tiredful-API.jpg -------------------------------------------------------------------------------- /Tiredful-API/Tiredful_API/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | -------------------------------------------------------------------------------- /Tiredful-API/Tiredful_API/settings.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | """ 13 | Django settings for Tiredful_API project. 14 | 15 | Generated by 'django-admin startproject' using Django 1.11. 16 | 17 | For more information on this file, see 18 | https://docs.djangoproject.com/en/1.11/topics/settings/ 19 | 20 | For the full list of settings and their values, see 21 | https://docs.djangoproject.com/en/1.11/ref/settings/ 22 | """ 23 | 24 | import os 25 | 26 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 27 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 28 | 29 | # Quick-start development settings - unsuitable for production 30 | # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ 31 | 32 | # SECURITY WARNING: keep the secret key used in production secret! 33 | SECRET_KEY = 'han4v+at1&s0t4_h^g##ch@&w1b-kzf*drl166prl+*=m@e+zn' 34 | 35 | # SECURITY WARNING: don't run with debug turned on in production! 36 | DEBUG = True 37 | 38 | ALLOWED_HOSTS = ['*'] 39 | 40 | # Application definition 41 | 42 | INSTALLED_APPS = [ 43 | 'django.contrib.admin', 44 | 'django.contrib.auth', 45 | 'django.contrib.contenttypes', 46 | 'django.contrib.sessions', 47 | 'django.contrib.messages', 48 | 'django.contrib.staticfiles', 49 | 'oauth2_provider', 50 | 'rest_framework', 51 | 'intro.apps.IntroConfig', 52 | 'library.apps.LibraryConfig', 53 | 'exams.apps.ExamsConfig', 54 | 'blog.apps.BlogConfig', 55 | 'trains.apps.TrainsConfig', 56 | 'health.apps.HealthConfig', 57 | 'advertisements.apps.AdvertisementsConfig', 58 | ] 59 | 60 | MIDDLEWARE = [ 61 | 'django.middleware.security.SecurityMiddleware', 62 | 'django.contrib.sessions.middleware.SessionMiddleware', 63 | 'oauth2_provider.middleware.OAuth2TokenMiddleware', 64 | 'django.middleware.common.CommonMiddleware', 65 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 66 | 'django.contrib.messages.middleware.MessageMiddleware', 67 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 68 | ] 69 | 70 | ROOT_URLCONF = 'Tiredful_API.urls' 71 | 72 | TEMPLATES = [ 73 | { 74 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 75 | 'DIRS': ['templates'], 76 | 'APP_DIRS': True, 77 | 'OPTIONS': { 78 | 'context_processors': [ 79 | 'django.template.context_processors.debug', 80 | 'django.template.context_processors.request', 81 | 'django.contrib.auth.context_processors.auth', 82 | 'django.contrib.messages.context_processors.messages', 83 | 'django.template.context_processors.static', 84 | ], 85 | }, 86 | }, 87 | ] 88 | 89 | WSGI_APPLICATION = 'Tiredful_API.wsgi.application' 90 | 91 | # Database 92 | # https://docs.djangoproject.com/en/1.11/ref/settings/#databases 93 | 94 | DATABASES = { 95 | 'default': { 96 | 'ENGINE': 'django.db.backends.sqlite3', 97 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 98 | } 99 | } 100 | 101 | # Password validation 102 | # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators 103 | 104 | AUTH_PASSWORD_VALIDATORS = [ 105 | { 106 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 107 | }, 108 | { 109 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 110 | }, 111 | { 112 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 113 | }, 114 | { 115 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 116 | }, 117 | ] 118 | 119 | # Internationalization 120 | # https://docs.djangoproject.com/en/1.11/topics/i18n/ 121 | 122 | LANGUAGE_CODE = 'en-us' 123 | 124 | TIME_ZONE = 'UTC' 125 | 126 | USE_I18N = True 127 | 128 | USE_L10N = True 129 | 130 | USE_TZ = True 131 | 132 | # Static files (CSS, JavaScript, Images) 133 | # https://docs.djangoproject.com/en/1.11/howto/static-files/ 134 | 135 | STATIC_URL = '/static/' 136 | 137 | STATICFILES_DIRS = [ 138 | os.path.join(BASE_DIR, "static"), 139 | ] 140 | 141 | OAUTH2_PROVIDER = { 142 | # this is the list of available scopes 143 | 'SCOPES': {'read': 'Read scope', 'write': 'Write scope', 'groups': 'Access to your groups'} 144 | } 145 | 146 | # API Renderers 147 | REST_FRAMEWORK = { 148 | 'DEFAULT_RENDERER_CLASSES': ( 149 | 'rest_framework.renderers.JSONRenderer', 150 | ), 151 | 'DEFAULT_PARSER_CLASSES': ( 152 | 'rest_framework.parsers.JSONParser', 153 | ), 154 | 'DEFAULT_AUTHENTICATION_CLASSES': ( 155 | 'oauth2_provider.contrib.rest_framework.OAuth2Authentication', 156 | ), 157 | 'DEFAULT_PERMISSION_CLASSES': ( 158 | 'rest_framework.permissions.AllowAny', 159 | ), 160 | 'DEFAULT_THROTTLE_RATES': { 161 | 'anon': '10/day', 162 | 'user': '20/hour', 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /Tiredful-API/Tiredful_API/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | """Tiredful_API URL Configuration 13 | 14 | The `urlpatterns` list routes URLs to views. For more information please see: 15 | https://docs.djangoproject.com/en/1.11/topics/http/urls/ 16 | Examples: 17 | Function views 18 | 1. Add an import: from my_app import views 19 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 20 | Class-based views 21 | 1. Add an import: from other_app.views import Home 22 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 23 | Including another URLconf 24 | 1. Import the include() function: from django.conf.urls import url, include 25 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 26 | """ 27 | from django.conf.urls import url, include 28 | from django.contrib.auth.models import User, Group 29 | 30 | from rest_framework import permissions, routers, serializers, viewsets 31 | 32 | 33 | # first we define the serializers 34 | class UserSerializer(serializers.ModelSerializer): 35 | class Meta: 36 | model = User 37 | 38 | 39 | class GroupSerializer(serializers.ModelSerializer): 40 | class Meta: 41 | model = Group 42 | 43 | 44 | urlpatterns = [ 45 | # URL for user login 46 | url(r'^oauth/', include('oauth2_provider.urls', namespace='oauth2_provider')), 47 | 48 | # URL for including intro app. 49 | url(r'', include('intro.urls', namespace="intro")), 50 | 51 | # URL for including library app 52 | url(r'^api/v1/', include('library.urls', namespace="library-api")), 53 | url(r'^library/', include('library.urls', namespace="library")), 54 | 55 | # URL for including exams app 56 | url(r'^api/v1/', include('exams.urls', namespace="exams-api")), 57 | url(r'^exams/', include('exams.urls', namespace="exams")), 58 | 59 | # URL for including blog app 60 | url(r'^api/v1/', include('blog.urls', namespace="blog-api")), 61 | url(r'^blog/', include('blog.urls', namespace="blog")), 62 | 63 | # URL for including trains app 64 | url(r'^api/v1/', include('trains.urls', namespace="trains-api")), 65 | url(r'^trains/', include('trains.urls', namespace="trains")), 66 | 67 | # URL for including health app 68 | url(r'^api/v1/', include('health.urls', namespace="health-api")), 69 | url(r'^health/', include('health.urls', namespace="health")), 70 | 71 | # URL for including advertisements app 72 | url(r'^api/v1/', include('advertisements.urls', namespace="advertisements-api")), 73 | url(r'^advertisements/', include('advertisements.urls', namespace="advertisements")), 74 | 75 | ] 76 | -------------------------------------------------------------------------------- /Tiredful-API/Tiredful_API/wsgi.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | """ 13 | WSGI config for Tiredful_API project. 14 | 15 | It exposes the WSGI callable as a module-level variable named ``application``. 16 | 17 | For more information on this file, see 18 | https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ 19 | """ 20 | 21 | import os 22 | 23 | from django.core.wsgi import get_wsgi_application 24 | 25 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Tiredful_API.settings") 26 | 27 | application = get_wsgi_application() 28 | -------------------------------------------------------------------------------- /Tiredful-API/advertisements/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | -------------------------------------------------------------------------------- /Tiredful-API/advertisements/apps.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | 14 | from django.apps import AppConfig 15 | 16 | 17 | class AdvertisementsConfig(AppConfig): 18 | name = 'advertisements' 19 | -------------------------------------------------------------------------------- /Tiredful-API/advertisements/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | 14 | from django.db import models 15 | from django.contrib.auth.models import User 16 | 17 | 18 | # Advertisement Classfied 19 | class Classified(models.Model): 20 | headline = models.CharField(max_length=150) 21 | info = models.CharField(max_length=2048, default="") 22 | price = models.DecimalField(max_digits=7, decimal_places=2) 23 | user = models.ForeignKey(User, default=1) 24 | -------------------------------------------------------------------------------- /Tiredful-API/advertisements/serializers.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from rest_framework import serializers 13 | 14 | from advertisements.models import Classified 15 | 16 | 17 | # Classfied object serializer 18 | class ClassifiedSerializers(serializers.ModelSerializer): 19 | class Meta: 20 | model = Classified 21 | fields = ('headline', 'info', 'price', 'user') 22 | -------------------------------------------------------------------------------- /Tiredful-API/advertisements/templates/advertisements/index.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | {% extends 'scenario-basic.html' %} 13 | 14 | {% block title-text %} Tiredful API: Cross Site Scripting {% endblock %} 15 | 16 | {% block content %} 17 |

Challenge: Cross Site Scripting

18 |

19 | An advertisement portal where user can post and see classified advts.
20 | APIs are implemented for accessing the list of classified advertisements and to create the advertisements. 21 | Following are the API end points:
22 | 1. List of advertisements (authentication required) 23 |

24 |       GET Method http://{{ request.get_host }}/api/v1/advertisements/
25 |     
26 | 2. To create a advertisement (authentication required) 27 |
28 |       POST http://{{ request.get_host }}/api/v1/advertisements/
29 |     
30 | POST: 31 |
32 |     {
33 |       "headline": <headline(string)>,
34 |       "info": <info(string)>,
35 |       "price":  <price(float(7,2))>
36 |     }
37 |     
38 |

39 | Aim: Find parameters accepting cross site scripting meta-characters. 40 | 41 | {% endblock %} 42 | -------------------------------------------------------------------------------- /Tiredful-API/advertisements/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from django.conf.urls import url 13 | from . import views 14 | 15 | urlpatterns = [ 16 | 17 | # ex: /advertisements/ 18 | url(r'^$', views.index, name='index'), 19 | 20 | # ex: /advertisements/ (api) 21 | url(r'^advertisements/$', views.advts, name='advertisements'), 22 | ] 23 | -------------------------------------------------------------------------------- /Tiredful-API/advertisements/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | 14 | from django.shortcuts import render 15 | from django.contrib.auth.decorators import login_required 16 | from django.contrib.auth.models import User 17 | 18 | from rest_framework import status 19 | from rest_framework.decorators import api_view, permission_classes 20 | from rest_framework.permissions import IsAuthenticated 21 | from rest_framework.response import Response 22 | 23 | from advertisements.models import Classified 24 | from advertisements.serializers import ClassifiedSerializers 25 | 26 | 27 | # Index for cross site scripting 28 | def index(request): 29 | """ 30 | Index for cross site scripting 31 | """ 32 | return render(request, 'advertisements/index.html', ) 33 | 34 | 35 | @api_view(['GET', 'POST']) 36 | @permission_classes((IsAuthenticated,)) 37 | def advts(request): 38 | """ 39 | List of advts posted 40 | """ 41 | if request.method == 'GET': 42 | classifieds = Classified.objects.all() 43 | serializer = ClassifiedSerializers(classifieds, many=True) 44 | return Response(serializer.data) 45 | elif request.method == 'POST': 46 | serializer = ClassifiedSerializers(data=request.data) 47 | serializer.initial_data['user'] = request.user.id 48 | if serializer.is_valid(): 49 | serializer.save() 50 | return Response(serializer.data, status=status.HTTP_201_CREATED) 51 | return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) 52 | else: 53 | return Response( 54 | serializer.errors, status=status.HTTP_400_BAD_REQUEST) 55 | -------------------------------------------------------------------------------- /Tiredful-API/blog/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | -------------------------------------------------------------------------------- /Tiredful-API/blog/apps.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | 14 | from django.apps import AppConfig 15 | 16 | 17 | class BlogConfig(AppConfig): 18 | name = 'blog' 19 | -------------------------------------------------------------------------------- /Tiredful-API/blog/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | 14 | from django.db import models 15 | from django.contrib.auth.models import User 16 | 17 | 18 | class Article(models.Model): 19 | title = models.CharField(max_length=40) 20 | content = models.TextField() 21 | approval_status = models.BooleanField() 22 | user = models.ForeignKey(User) 23 | -------------------------------------------------------------------------------- /Tiredful-API/blog/permissions.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from rest_framework import permissions 13 | 14 | 15 | class UserPermission(permissions.BasePermission): 16 | def has_permission(self, request, view): 17 | if request.method in permissions.SAFE_METHODS: 18 | return True 19 | elif request.method == 'DELETE': 20 | return True 21 | else: 22 | return False 23 | 24 | def has_object_permission(self, request, view, obj): 25 | if request.method in permissions.SAFE_METHODS: 26 | return True 27 | elif request.method == 'DELETE': 28 | return True 29 | else: 30 | return False 31 | -------------------------------------------------------------------------------- /Tiredful-API/blog/serializers.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from rest_framework import serializers 13 | 14 | from blog.models import Article 15 | from django.contrib.auth.models import User 16 | 17 | 18 | # User object serializer 19 | class UserSerializer(serializers.ModelSerializer): 20 | class Meta: 21 | model = User 22 | fields = ('username', 'password') 23 | 24 | 25 | # ScoreCard object serializer 26 | class ArticleSerializer(serializers.ModelSerializer): 27 | class Meta: 28 | model = Article 29 | fields = ('title', 'content', 'user') 30 | -------------------------------------------------------------------------------- /Tiredful-API/blog/templates/blog/index.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | {% extends 'scenario-basic.html' %} 13 | 14 | {% block title-text %} Tiredful API: Access Control {% endblock %} 15 | 16 | {% block content %} 17 |

Challenge: Access Control

18 |

19 | A blog application allows user to create,edit and view articles.
20 | Developer decided to implement web services, so for testing purpose developers provides access to two API end points
21 | 1) Article Viewing - 22 |

23 |     GET method http://{{ request.get_host }}/api/v1/articles/<article-id>/
24 |     
25 | 2) Article Approving (Admin only)- 26 |
27 |      GET method  http://{{ request.get_host }}/api/v1/approve-article/<article-id>/
28 |     
29 | 30 | Following are available blogs 31 |
32 |
ID
33 |
Title
34 |
35 | {% for art in articles%} 36 |
37 |
{{ art.id }}
38 |
{{ art.title }}
39 |
40 | {% endfor %} 41 |

42 | Aim: Try to execute operation which should be allowed only to admin users. 43 | {% endblock %} 44 | -------------------------------------------------------------------------------- /Tiredful-API/blog/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from django.conf.urls import url 13 | from . import views 14 | 15 | urlpatterns = [ 16 | 17 | # ex: /blog/ 18 | url(r'^$', views.index, name='index'), 19 | 20 | # ex: /articles/ 21 | url(r'^articles/(?P[0-9]+)/$', views.article, name='articles'), 22 | 23 | # ex: /approve-article/ 24 | url(r'^approve-article/(?P[0-9]+)/$', views.approve_article, name='approve-article'), 25 | 26 | ] 27 | -------------------------------------------------------------------------------- /Tiredful-API/blog/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | 14 | from django.shortcuts import render 15 | import json 16 | 17 | from rest_framework import status 18 | 19 | from rest_framework.permissions import IsAuthenticated, IsAdminUser 20 | from rest_framework.decorators import api_view, permission_classes 21 | from rest_framework.response import Response 22 | 23 | from blog.models import Article 24 | from blog.serializers import ArticleSerializer 25 | from blog.permissions import UserPermission 26 | 27 | 28 | # Index method for Blog article listing 29 | def index(request): 30 | """ 31 | Index page for blog application - To list all blogs 32 | """ 33 | Articles = Article.objects.all().values('id', 'title') 34 | return render(request, 'blog/index.html', {'articles': Articles}) 35 | 36 | 37 | # Method to display article 38 | @api_view(['GET', 'PATCH', 'DELETE']) 39 | @permission_classes((UserPermission,)) 40 | def article(request, article_id): 41 | """ 42 | Display particular blog article, delete particular blog article, update blog article 43 | """ 44 | try: 45 | selected_article = Article.objects.get(pk=article_id) 46 | except Article.DoesNotExist: 47 | return Response(status=status.HTTP_404_NOT_FOUND) 48 | 49 | if request.method == 'GET': 50 | if selected_article.approval_status: 51 | serializer = ArticleSerializer(selected_article) 52 | return Response(serializer.data) 53 | else: 54 | return Response(status=status.HTTP_404_NOT_FOUND) 55 | elif request.method == 'DELETE': 56 | if 'HTTP_ISADMIN' in request.META: 57 | if request.META['HTTP_ISADMIN'] == "True": 58 | selected_article.delete() 59 | return Response(json.dumps('Successfully deleted')) 60 | else: 61 | return Response(json.dumps('Invalid header value')) 62 | else: 63 | return Response(json.dumps('IsAdmin header missing')) 64 | elif request.method == 'PATCH': 65 | selected_article.approval_status = True 66 | selected_article.save() 67 | return Response(json.dumps('{Message: Approved successfully}')) 68 | else: 69 | return Response(status=status.HTTP_400_BAD_REQUEST) 70 | 71 | 72 | # Method for approving the blog 73 | @api_view(['GET']) 74 | @permission_classes((IsAdminUser,)) 75 | def approve_article(request, article_id): 76 | """ 77 | Approve article for displaying 78 | """ 79 | try: 80 | article = Article.objects.get(pk=article_id) 81 | except Article.DoesNotExist: 82 | return Response(status=status.HTTP_404_NOT_FOUND) 83 | if request.method == 'GET': 84 | article.approval_status = True 85 | article.save() 86 | return Response(json.dumps('{Message: Approved successfully}')) 87 | else: 88 | return Response(status=status.HTTP_400_BAD_REQUEST) 89 | -------------------------------------------------------------------------------- /Tiredful-API/client_cred.txt: -------------------------------------------------------------------------------- 1 | client-id:ALGGN0UmsY2Gb9cs3V4CEKMfpBJ2D2XZQXuTFfND 2 | client-secret: mWM7pgvjtUSAtfaK8RXLjzOaLmurBxIWxMdQIQ0t1fSv9orqOnYr5wP5CaFN8DE18NiFiKKalQPu1WecmpbfoZCGYhMqMACz6i2WkWYs5E8gjXxqekjCyPkhBmO5n5EN 3 | -------------------------------------------------------------------------------- /Tiredful-API/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/payatu/Tiredful-API/0134124496b3c4f1b969e51a24fd8a059104fb98/Tiredful-API/db.sqlite3 -------------------------------------------------------------------------------- /Tiredful-API/exams/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | -------------------------------------------------------------------------------- /Tiredful-API/exams/apps.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | 14 | from django.apps import AppConfig 15 | 16 | 17 | class ExamsConfig(AppConfig): 18 | name = 'exams' 19 | -------------------------------------------------------------------------------- /Tiredful-API/exams/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | 14 | from django.db import models 15 | from django.contrib.auth.models import User 16 | 17 | 18 | # Exam scorecard 19 | class ScoreCard(models.Model): 20 | exam = models.CharField(max_length=40) 21 | user = models.ForeignKey(User) 22 | total_marks = models.DecimalField(max_digits=5, decimal_places=2) 23 | score = models.DecimalField(max_digits=5, decimal_places=2) 24 | attempt_number = models.IntegerField(default=0) 25 | question_attempted = models.IntegerField(default=0) 26 | question_correct = models.IntegerField(default=0) 27 | question_wrong = models.IntegerField(default=0) 28 | -------------------------------------------------------------------------------- /Tiredful-API/exams/serializers.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from rest_framework import serializers 13 | 14 | from exams.models import ScoreCard 15 | from django.contrib.auth.models import User 16 | 17 | 18 | # User object serializer 19 | class UserSerializer(serializers.ModelSerializer): 20 | class Meta: 21 | model = User 22 | fields = ('username', 'password') 23 | 24 | 25 | # ScoreCard object serializer 26 | class ScoreCardSerializer(serializers.ModelSerializer): 27 | class Meta: 28 | model = ScoreCard 29 | fields = ('exam', 'user', 'total_marks', 'score', 'attempt_number', 'attempt_number', 'question_correct', 30 | 'question_wrong') 31 | -------------------------------------------------------------------------------- /Tiredful-API/exams/templates/exams/index.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | {% extends 'scenario-basic.html' %} 13 | 14 | {% block title-text %} Tiredful API:Insecure Direct Object Reference {% endblock %} 15 | 16 | {% block content %} 17 |

Challenge: Insecure Direct Object Reference

18 | 19 |

20 | An online exam portal provides an API to access the result of attempt exams by a student.
21 | Login with "batman" and try to access exam result of other user.
22 | Following are the exam-id of test attempted by batman
23 |

    24 |
  1. MQ==
  2. 25 |
  3. Mg==
  4. 26 |
27 | Following is the API end point used to access the result.(authentication required)

28 |
GET method  http://{{ request.get_host }}/api/v1/exams/<exam_id>/
29 |

30 | Aim: Try to access exam results of other user. 31 | 32 | {% endblock %} 33 | -------------------------------------------------------------------------------- /Tiredful-API/exams/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from django.conf.urls import url 13 | from . import views 14 | 15 | urlpatterns = [ 16 | 17 | # ex: /exams/ 18 | url(r'^$', views.index, name='index'), 19 | 20 | # ex: /exams/score_card> 21 | url(r'^exams/(?P[0-9-=A-Za-z]+)/$', views.get_score, name='exams'), 22 | ] 23 | -------------------------------------------------------------------------------- /Tiredful-API/exams/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | from base64 import b64encode, b64decode 14 | 15 | from django.shortcuts import render 16 | from django.contrib.auth.decorators import login_required 17 | from django.http import HttpResponseRedirect 18 | from django.core.urlresolvers import reverse 19 | 20 | from rest_framework import status 21 | from rest_framework.permissions import IsAuthenticated 22 | from rest_framework.decorators import api_view, permission_classes 23 | from rest_framework.response import Response 24 | 25 | from exams.models import ScoreCard 26 | from exams.serializers import ScoreCardSerializer 27 | 28 | 29 | # Index for insecure direct object reference scenario 30 | def index(request): 31 | """ 32 | For insecure direct object reference challenge and login form 33 | """ 34 | return render(request, 'exams/index.html', ) 35 | 36 | 37 | # Score detail of exam 38 | @api_view(['GET']) 39 | @permission_classes((IsAuthenticated,)) 40 | def get_score(request, score_card): 41 | """ 42 | Details of exam score card. 43 | """ 44 | try: 45 | score_card = (b64decode(score_card)) 46 | except TypeError: 47 | return Response(status=status.HTTP_400_BAD_REQUEST) 48 | try: 49 | exam = ScoreCard.objects.get(pk=score_card) 50 | except ScoreCard.DoesNotExist: 51 | return Response(status=status.HTTP_404_NOT_FOUND) 52 | 53 | if request.method == 'GET': 54 | serializer = ScoreCardSerializer(exam) 55 | return Response(serializer.data) 56 | else: 57 | return Response(status=status.HTTP_400_BAD_REQUEST) 58 | -------------------------------------------------------------------------------- /Tiredful-API/health/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | -------------------------------------------------------------------------------- /Tiredful-API/health/apps.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | 14 | from django.apps import AppConfig 15 | 16 | 17 | class HealthConfig(AppConfig): 18 | name = 'health' 19 | -------------------------------------------------------------------------------- /Tiredful-API/health/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | 14 | from django.db import models 15 | from django.contrib.auth.models import User 16 | 17 | 18 | # Fitness Tracker 19 | class Tracker(models.Model): 20 | sleep = models.DecimalField(max_digits=5, decimal_places=2) 21 | heartbeat = models.IntegerField() 22 | calories = models.DecimalField(max_digits=7, decimal_places=2) 23 | running = models.DecimalField(max_digits=5, decimal_places=2) 24 | month = models.IntegerField() 25 | user = models.ForeignKey(User) 26 | -------------------------------------------------------------------------------- /Tiredful-API/health/serializers.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from rest_framework import serializers 13 | 14 | from health.models import Tracker 15 | 16 | 17 | # Tracker object serializer 18 | class TrackerSerializers(serializers.ModelSerializer): 19 | class Meta: 20 | model = Tracker 21 | fields = ('sleep', 'heartbeat', 'calories', 'running', 'month', 'user') 22 | -------------------------------------------------------------------------------- /Tiredful-API/health/templates/health/index.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | {% extends 'scenario-basic.html' %} 13 | 14 | {% block title-text %} Tiredful API: SQL Injection {% endblock %} 15 | 16 | {% block content %} 17 |

Challenge: SQL Injection

18 |

19 | APIs implemented to serve a fitness tracker mobile app, is used to check fitness activity in a month.
20 | Following is the API end point to access monthly fitness activity
21 |

POST http://{{ request.get_host }}/api/v1/activities/
22 |
23 | POST: 24 |
25 |     {
26 |       "month": <month(string)>
27 |     }
28 |     
29 |

30 |
31 |
User
32 |
Sleep
33 |
HeartBeat
34 |
Calories
35 |
Running
36 |
Month
37 |
38 | {% for data in tracker_details %} 39 |
40 |
{{ data.user.username }}
41 |
{{ data.sleep }}
42 |
{{ data.heartbeat }}
43 |
{{ data.calories }}
44 |
{{ data.running }}
45 |
{{ data.month }}
46 |
47 | {% endfor %} 48 | 49 | Aim: Try to find table names of the database(SQLite). 50 | {% endblock %} 51 | -------------------------------------------------------------------------------- /Tiredful-API/health/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from django.conf.urls import url 13 | from . import views 14 | 15 | urlpatterns = [ 16 | 17 | # ex: /health/ 18 | url(r'^$', views.index, name='index'), 19 | 20 | # ex: /activities/ 21 | url(r'^activities/$', views.get_activity, name='activities'), 22 | ] 23 | -------------------------------------------------------------------------------- /Tiredful-API/health/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | 14 | from django.shortcuts import render 15 | from django.db import connection 16 | from django.http import JsonResponse 17 | 18 | from rest_framework import status 19 | from rest_framework.decorators import api_view 20 | from rest_framework.response import Response 21 | 22 | from health.models import Tracker 23 | from health.serializers import TrackerSerializers 24 | 25 | 26 | # Index method for Blog article listing 27 | def index(request): 28 | """ 29 | Index page for health application 30 | """ 31 | tracker_details = Tracker.objects.all() 32 | return render(request, 'health/index.html', {'tracker_details': tracker_details}) 33 | 34 | 35 | # get user activities 36 | @api_view(['POST']) 37 | def get_activity(request): 38 | """ 39 | Details of user activity monthwise 40 | """ 41 | if request.method == 'POST': 42 | if request.data: 43 | if 'month' in request.data.keys(): 44 | month_requested = request.data['month'] 45 | try: 46 | activity_detail = Tracker.objects.raw( 47 | 'Select * from health_tracker where month=%s' % month_requested) 48 | final_serialized_data = [] 49 | for activity in activity_detail: 50 | serializer = TrackerSerializers(activity) 51 | final_serialized_data.append(serializer.data) 52 | return Response(final_serialized_data) 53 | except Tracker.DoesNotExist: 54 | return Response(status=status.HTTP_404_NOT_FOUND) 55 | except ValueError: 56 | cursor = connection.cursor() 57 | cursor.execute('Select * from health_tracker where month=%s' % month_requested) 58 | activity_detail = cursor.fetchall() 59 | return JsonResponse(activity_detail, safe=False) 60 | else: 61 | return Response(status=status.HTTP_400_BAD_REQUEST) 62 | else: 63 | return Response(status=status.HTTP_400_BAD_REQUEST) 64 | else: 65 | return Response(status=status.HTTP_400_BAD_REQUEST) 66 | -------------------------------------------------------------------------------- /Tiredful-API/intro/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | -------------------------------------------------------------------------------- /Tiredful-API/intro/apps.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | 14 | from django.apps import AppConfig 15 | 16 | 17 | class IntroConfig(AppConfig): 18 | name = 'intro' 19 | -------------------------------------------------------------------------------- /Tiredful-API/intro/forms.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from django import forms 13 | 14 | 15 | class LoginForm(forms.Form): 16 | username = forms.CharField(widget=forms.TextInput(attrs={'autocomplete': 'off'})) 17 | password = forms.CharField(widget=forms.PasswordInput(attrs={'autocomplete': 'off'})) 18 | grant_type = forms.CharField(widget=forms.HiddenInput(attrs={'value': 'password'})) 19 | client_id = forms.CharField(widget=forms.HiddenInput(attrs={'value': 'ALGGN0UmsY2Gb9cs3V4CEKMfpBJ2D2XZQXuTFfND'})) 20 | client_secret = forms.CharField(widget=forms.HiddenInput(attrs={ 21 | 'value': 'mWM7pgvjtUSAtfaK8RXLjzOaLmurBxIWxMdQIQ0t1fSv9orqOnYr5wP5CaFN8DE18NiFiKKalQPu1WecmpbfoZCGYhMqMACz6i2WkWYs5E8gjXxqekjCyPkhBmO5n5EN'})) 22 | 23 | 24 | class LogoutForm(forms.Form): 25 | token = forms.CharField(widget=forms.TextInput(attrs={'autocomplete': 'off'})) 26 | client_id = forms.CharField(widget=forms.HiddenInput(attrs={'value': 'ALGGN0UmsY2Gb9cs3V4CEKMfpBJ2D2XZQXuTFfND'})) 27 | client_secret = forms.CharField(widget=forms.HiddenInput(attrs={ 28 | 'value': 'mWM7pgvjtUSAtfaK8RXLjzOaLmurBxIWxMdQIQ0t1fSv9orqOnYr5wP5CaFN8DE18NiFiKKalQPu1WecmpbfoZCGYhMqMACz6i2WkWYs5E8gjXxqekjCyPkhBmO5n5EN'})) 29 | -------------------------------------------------------------------------------- /Tiredful-API/intro/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | 14 | from django.db import models 15 | -------------------------------------------------------------------------------- /Tiredful-API/intro/templates/intro/about.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | {% extends 'basic.html' %} 13 | 14 | 15 | {% block title-text %} Tiredful API: About Us {% endblock %} 16 | 17 | {% block content %} 18 |

About

19 |
20 |

Author

21 | Siddharth Bezalwar
22 | Security Consultant, Payatu Software Labs
23 | @fattu_medjai | siddharth.bezalwar@gmail.com | siddharthb@payatu.com 24 |
25 | 26 |

Payatu

27 | Payatu is a boutique security testing company with specialization in: 28 | 29 |
    30 |
  • IoT Security
  • 31 |
  • Mobile Security
  • 32 |
  • Cloud security
  • 33 |
  • Web Security
  • 34 |
35 | We also organize two International Security Conferences
36 | 37 | nullcon International Security Conference - http://nullcon.net
38 | hardwear.io Hardware Security Conference - http://hardwear.io
39 | Website: http://payatu.com Email: info [at] payatu [dot] com 40 | {% endblock %} 41 | -------------------------------------------------------------------------------- /Tiredful-API/intro/templates/intro/csrf.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | {% extends 'scenario-basic.html' %} 13 | 14 | {% block title-text %} Tiredful API: Cross Site Request Forgery {% endblock %} 15 | 16 | {% block content %} 17 |

Info: Cross Site Request Forgery

18 |

19 | This is not an actual challenge. A web application is vulnerable to CSRF, if it is storing the token generated by authentication scheme in a cookie. 20 |
For successful execution of CSRF attack, attacker needs a cookie which is used to identify the user. :) 21 |

22 | {% endblock %} 23 | -------------------------------------------------------------------------------- /Tiredful-API/intro/templates/intro/index.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | {% extends 'basic.html' %} 13 | 14 | {% block title-text %} Tiredful API: Home {% endblock %} 15 | 16 | {% block content %} 17 |
18 |

Tiredful API

19 |

Tiredful API is intentionally designed broken web app. The purpose of this application is to teach developers, QA or security professionals about flaws present in webservices (REST API) due to insecure coding practice. 20 | 21 |
22 | Let's Start 23 |

24 |
25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /Tiredful-API/intro/templates/intro/scenarios.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | {% extends 'scenario-basic.html' %} 13 | 14 | {% block title-text %} Tiredful API: Scenarios {% endblock %} 15 | 16 | {% block content %} 17 | 18 | 19 |

20 | TiredFul API is a web app intentionally developed to be insecure. 21 | The purpose of the app to teach developers, QA or security professionals about flaws present in webservices (REST API) due to insecure coding practice. 22 | Following are the scenarios implemented. 23 |

    24 |
  1. 25 | Information Disclosure 26 |
  2. 27 |
  3. 28 | Insecure Direct Object Reference 29 |
  4. 30 |
  5. 31 | Access Control 32 |
  6. 33 |
  7. 34 | Throttling 35 |
  8. 36 |
  9. 37 | SQL Injection 38 |
  10. 39 |
  11. 40 | Cross Site Scripting 41 |
  12. 42 |
43 |

44 |
45 |
46 |
47 |

48 | All the APIs are accessed over HTTP. All the requests to the APIs should have ACCEPT header. 49 |

Accept: application/json
50 |

51 |
52 |
53 |
54 |
55 |

56 | All the requests to the APIs using HTTP POST method should have Content-Type header. 57 |

Content-Type: application/json
58 |

59 |
60 |
61 |
62 |
63 |

64 | Some of the challenges require authentication under an account with appropriate access. 65 | For accessing login protected data user needs to provide an access key. 66 | Process to obtain the access key is provided in User Token section of the web application. 67 |

68 |
69 |
70 | 71 | {% endblock %} 72 | -------------------------------------------------------------------------------- /Tiredful-API/intro/templates/intro/token.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | {% extends 'scenario-basic.html' %} 13 | 14 | {% block title-text %} Tiredful API: Scenarios {% endblock %} 15 | 16 | {% block content %} 17 |
18 |

Token Manager

19 |

Module for issuing authorisation token for user.


20 | Some scenarios of the application requires user authentication.
21 | Following are the users registered with the application
22 |
    23 |
  1. 24 | Username: batman
    25 | Password: Batman@123 26 |
  2. 27 |
  3. 28 | Username: superman
    29 | Password: Superman@123 30 |
  4. 31 |
32 | For sending authorized request use HTTP header authorization as follows:
33 |
Authorization : Bearer < token_received >
34 |
35 |
36 |
37 |

Get User Token

38 |
39 | {{ login_form.as_p }} 40 | 41 |
42 |
43 | 44 |
45 |

Revoke User Token

46 |
47 | {{ logout_form.as_p }} 48 | 49 |
50 |
51 |
52 |
53 |
54 | 56 | 57 | 58 | {% endblock %} 59 | {% block page-level-js %} 60 | 147 | {% endblock %} 148 | -------------------------------------------------------------------------------- /Tiredful-API/intro/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from django.conf.urls import url 13 | 14 | from . import views 15 | 16 | urlpatterns = [ 17 | url(r'^$', views.index, name='index'), 18 | url(r'^about$', views.about, name='about'), 19 | url(r'^scenario$', views.scenario, name='scenario'), 20 | url(r'^handle-user-token/$', views.handle_token, name='handle-user-token'), 21 | url(r'^csrf/$', views.csrf, name='csrf') 22 | ] 23 | -------------------------------------------------------------------------------- /Tiredful-API/intro/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | from django.http import HttpResponse 14 | from django.shortcuts import render 15 | 16 | from intro.forms import LoginForm, LogoutForm 17 | 18 | 19 | # Application index page. 20 | def index(request): 21 | return render(request, 'intro/index.html', ) 22 | 23 | 24 | # About page. 25 | def about(request): 26 | return render(request, 'intro/about.html') 27 | 28 | 29 | # Scenarios page. 30 | def scenario(request): 31 | return render(request, 'intro/scenarios.html') 32 | 33 | 34 | # To manage user token 35 | def handle_token(request): 36 | return render(request, 'intro/token.html', {'login_form': LoginForm(), 'logout_form': LogoutForm()}) 37 | 38 | 39 | # CSRF scenario 40 | def csrf(request): 41 | return render(request, 'intro/csrf.html') 42 | -------------------------------------------------------------------------------- /Tiredful-API/library/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | -------------------------------------------------------------------------------- /Tiredful-API/library/apps.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | 14 | from django.apps import AppConfig 15 | 16 | 17 | class LibraryConfig(AppConfig): 18 | name = 'library' 19 | -------------------------------------------------------------------------------- /Tiredful-API/library/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | 14 | from django.db import models 15 | 16 | 17 | class Book(models.Model): 18 | title = models.CharField(max_length=30) 19 | author = models.CharField(max_length=30) 20 | ISBN = models.CharField(max_length=20) 21 | description = models.TextField() 22 | -------------------------------------------------------------------------------- /Tiredful-API/library/serializers.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from rest_framework import serializers 13 | 14 | from library.models import Book 15 | 16 | 17 | class BookSerializer(serializers.ModelSerializer): 18 | 19 | class Meta: 20 | model = Book 21 | fields = ('title', 'author', 'ISBN', 'description') 22 | -------------------------------------------------------------------------------- /Tiredful-API/library/templates/library/index.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | {% extends 'scenario-basic.html' %} 13 | 14 | {% block title-text %} Tiredful API: Information Disclosure {% endblock %} 15 | 16 | {% block content %} 17 |

Challenge: Information Disclosure

18 |

19 | A library decided to provide services to other third party through its APIs. 20 | One of the implemented API is to get the details of the book by providing ISBN number.
21 | We suspect that the API is revealing interesting information apart from the book details
22 | Following is the API-end point for getting book details.

23 |

24 |         GET method  http://{{ request.get_host }}/api/v1/books/<ISBN>/
25 |       
26 | Following are the book ISBNs available: 27 | {% if books %} 28 |
    29 | {% for book in books %} 30 |
  1. {{ book.ISBN }}
  2. 31 | {% endfor %} 32 |
33 | {% endif %} 34 | 35 |

36 | 37 | Aim: Try to get stacktrace information. 38 | 39 | {% endblock %} 40 | -------------------------------------------------------------------------------- /Tiredful-API/library/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from django.conf.urls import url 13 | from . import views 14 | 15 | urlpatterns = [ 16 | 17 | # ex: /library/ 18 | url(r'^$', views.index, name='index'), 19 | 20 | # ex: /library/books/ 21 | url(r'^books/(?P[0-9-A-Za-z]+)/$', views.book_detail, name='books'), 22 | ] 23 | -------------------------------------------------------------------------------- /Tiredful-API/library/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 4 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 5 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 6 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 7 | # 8 | # 9 | # Copyright (C) 2017-2018 Payatu Software Labs 10 | # This file is part of Tiredful API application 11 | 12 | from __future__ import unicode_literals 13 | import traceback, sys 14 | 15 | from django.shortcuts import render 16 | 17 | from rest_framework import status 18 | from rest_framework.decorators import api_view 19 | from rest_framework.response import Response 20 | 21 | from library.models import Book 22 | from library.serializers import BookSerializer 23 | 24 | 25 | # API for showing book details - leaking system information 26 | @api_view(['GET']) 27 | def book_detail(request, ISBN): 28 | """ 29 | Get details of specific book 30 | """ 31 | try: 32 | book = Book.objects.get(ISBN=ISBN) 33 | except Book.DoesNotExist: 34 | if ISBN.isupper(): 35 | return Response(traceback.format_exception(*sys.exc_info())) 36 | else: 37 | return Response(status=status.HTTP_404_NOT_FOUND) 38 | 39 | if request.method == 'GET': 40 | serializer = BookSerializer(book) 41 | return Response(serializer.data) 42 | else: 43 | return Response(status=status.HTTP_400_BAD_REQUEST) 44 | 45 | 46 | def index(request): 47 | """ 48 | Index page for information disclosure challenge 49 | """ 50 | books = Book.objects.all() 51 | return render(request, 'library/index.html', {'books': books}) 52 | -------------------------------------------------------------------------------- /Tiredful-API/manage.py: -------------------------------------------------------------------------------- 1 | # 2 | # ____ __ ___ ___ ___ ___ _ _ __ __ ___ __ 3 | # (_ _)( )( ,) ( _)( \( _)( )( )( ) ( ) ( ,\( ) 4 | # )( )( ) \ ) _) ) ) )) _) )()( )(__ /__\ ) _/ )( 5 | # (__) (__)(_)\_)(___)(___/(_) \__/ (____) (_)(_)(_) (__) 6 | # 7 | # 8 | # Copyright (C) 2017-2018 Payatu Software Labs 9 | # This file is part of Tiredful API application 10 | 11 | # !/usr/bin/env python 12 | import os 13 | import sys 14 | 15 | if __name__ == "__main__": 16 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Tiredful_API.settings") 17 | try: 18 | from django.core.management import execute_from_command_line 19 | except ImportError: 20 | # The above import may fail for some other reason. Ensure that the 21 | # issue is really that Django is missing to avoid masking other 22 | # exceptions on Python 2. 23 | try: 24 | import django 25 | except ImportError: 26 | raise ImportError( 27 | "Couldn't import Django. Are you sure it's installed and " 28 | "available on your PYTHONPATH environment variable? Did you " 29 | "forget to activate a virtual environment?" 30 | ) 31 | raise 32 | execute_from_command_line(sys.argv) 33 | -------------------------------------------------------------------------------- /Tiredful-API/static/css/bootstrap-theme.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.7 (http://getbootstrap.com) 3 | * Copyright 2011-2016 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | .btn-default, 7 | .btn-primary, 8 | .btn-success, 9 | .btn-info, 10 | .btn-warning, 11 | .btn-danger { 12 | text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); 13 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); 14 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); 15 | } 16 | .btn-default:active, 17 | .btn-primary:active, 18 | .btn-success:active, 19 | .btn-info:active, 20 | .btn-warning:active, 21 | .btn-danger:active, 22 | .btn-default.active, 23 | .btn-primary.active, 24 | .btn-success.active, 25 | .btn-info.active, 26 | .btn-warning.active, 27 | .btn-danger.active { 28 | -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); 29 | box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); 30 | } 31 | .btn-default.disabled, 32 | .btn-primary.disabled, 33 | .btn-success.disabled, 34 | .btn-info.disabled, 35 | .btn-warning.disabled, 36 | .btn-danger.disabled, 37 | .btn-default[disabled], 38 | .btn-primary[disabled], 39 | .btn-success[disabled], 40 | .btn-info[disabled], 41 | .btn-warning[disabled], 42 | .btn-danger[disabled], 43 | fieldset[disabled] .btn-default, 44 | fieldset[disabled] .btn-primary, 45 | fieldset[disabled] .btn-success, 46 | fieldset[disabled] .btn-info, 47 | fieldset[disabled] .btn-warning, 48 | fieldset[disabled] .btn-danger { 49 | -webkit-box-shadow: none; 50 | box-shadow: none; 51 | } 52 | .btn-default .badge, 53 | .btn-primary .badge, 54 | .btn-success .badge, 55 | .btn-info .badge, 56 | .btn-warning .badge, 57 | .btn-danger .badge { 58 | text-shadow: none; 59 | } 60 | .btn:active, 61 | .btn.active { 62 | background-image: none; 63 | } 64 | .btn-default { 65 | text-shadow: 0 1px 0 #fff; 66 | background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); 67 | background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%); 68 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0)); 69 | background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); 70 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); 71 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 72 | background-repeat: repeat-x; 73 | border-color: #dbdbdb; 74 | border-color: #ccc; 75 | } 76 | .btn-default:hover, 77 | .btn-default:focus { 78 | background-color: #e0e0e0; 79 | background-position: 0 -15px; 80 | } 81 | .btn-default:active, 82 | .btn-default.active { 83 | background-color: #e0e0e0; 84 | border-color: #dbdbdb; 85 | } 86 | .btn-default.disabled, 87 | .btn-default[disabled], 88 | fieldset[disabled] .btn-default, 89 | .btn-default.disabled:hover, 90 | .btn-default[disabled]:hover, 91 | fieldset[disabled] .btn-default:hover, 92 | .btn-default.disabled:focus, 93 | .btn-default[disabled]:focus, 94 | fieldset[disabled] .btn-default:focus, 95 | .btn-default.disabled.focus, 96 | .btn-default[disabled].focus, 97 | fieldset[disabled] .btn-default.focus, 98 | .btn-default.disabled:active, 99 | .btn-default[disabled]:active, 100 | fieldset[disabled] .btn-default:active, 101 | .btn-default.disabled.active, 102 | .btn-default[disabled].active, 103 | fieldset[disabled] .btn-default.active { 104 | background-color: #e0e0e0; 105 | background-image: none; 106 | } 107 | .btn-primary { 108 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%); 109 | background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%); 110 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88)); 111 | background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%); 112 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0); 113 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 114 | background-repeat: repeat-x; 115 | border-color: #245580; 116 | } 117 | .btn-primary:hover, 118 | .btn-primary:focus { 119 | background-color: #265a88; 120 | background-position: 0 -15px; 121 | } 122 | .btn-primary:active, 123 | .btn-primary.active { 124 | background-color: #265a88; 125 | border-color: #245580; 126 | } 127 | .btn-primary.disabled, 128 | .btn-primary[disabled], 129 | fieldset[disabled] .btn-primary, 130 | .btn-primary.disabled:hover, 131 | .btn-primary[disabled]:hover, 132 | fieldset[disabled] .btn-primary:hover, 133 | .btn-primary.disabled:focus, 134 | .btn-primary[disabled]:focus, 135 | fieldset[disabled] .btn-primary:focus, 136 | .btn-primary.disabled.focus, 137 | .btn-primary[disabled].focus, 138 | fieldset[disabled] .btn-primary.focus, 139 | .btn-primary.disabled:active, 140 | .btn-primary[disabled]:active, 141 | fieldset[disabled] .btn-primary:active, 142 | .btn-primary.disabled.active, 143 | .btn-primary[disabled].active, 144 | fieldset[disabled] .btn-primary.active { 145 | background-color: #265a88; 146 | background-image: none; 147 | } 148 | .btn-success { 149 | background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); 150 | background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%); 151 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641)); 152 | background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); 153 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); 154 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 155 | background-repeat: repeat-x; 156 | border-color: #3e8f3e; 157 | } 158 | .btn-success:hover, 159 | .btn-success:focus { 160 | background-color: #419641; 161 | background-position: 0 -15px; 162 | } 163 | .btn-success:active, 164 | .btn-success.active { 165 | background-color: #419641; 166 | border-color: #3e8f3e; 167 | } 168 | .btn-success.disabled, 169 | .btn-success[disabled], 170 | fieldset[disabled] .btn-success, 171 | .btn-success.disabled:hover, 172 | .btn-success[disabled]:hover, 173 | fieldset[disabled] .btn-success:hover, 174 | .btn-success.disabled:focus, 175 | .btn-success[disabled]:focus, 176 | fieldset[disabled] .btn-success:focus, 177 | .btn-success.disabled.focus, 178 | .btn-success[disabled].focus, 179 | fieldset[disabled] .btn-success.focus, 180 | .btn-success.disabled:active, 181 | .btn-success[disabled]:active, 182 | fieldset[disabled] .btn-success:active, 183 | .btn-success.disabled.active, 184 | .btn-success[disabled].active, 185 | fieldset[disabled] .btn-success.active { 186 | background-color: #419641; 187 | background-image: none; 188 | } 189 | .btn-info { 190 | background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); 191 | background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); 192 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2)); 193 | background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); 194 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); 195 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 196 | background-repeat: repeat-x; 197 | border-color: #28a4c9; 198 | } 199 | .btn-info:hover, 200 | .btn-info:focus { 201 | background-color: #2aabd2; 202 | background-position: 0 -15px; 203 | } 204 | .btn-info:active, 205 | .btn-info.active { 206 | background-color: #2aabd2; 207 | border-color: #28a4c9; 208 | } 209 | .btn-info.disabled, 210 | .btn-info[disabled], 211 | fieldset[disabled] .btn-info, 212 | .btn-info.disabled:hover, 213 | .btn-info[disabled]:hover, 214 | fieldset[disabled] .btn-info:hover, 215 | .btn-info.disabled:focus, 216 | .btn-info[disabled]:focus, 217 | fieldset[disabled] .btn-info:focus, 218 | .btn-info.disabled.focus, 219 | .btn-info[disabled].focus, 220 | fieldset[disabled] .btn-info.focus, 221 | .btn-info.disabled:active, 222 | .btn-info[disabled]:active, 223 | fieldset[disabled] .btn-info:active, 224 | .btn-info.disabled.active, 225 | .btn-info[disabled].active, 226 | fieldset[disabled] .btn-info.active { 227 | background-color: #2aabd2; 228 | background-image: none; 229 | } 230 | .btn-warning { 231 | background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); 232 | background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); 233 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316)); 234 | background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); 235 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); 236 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 237 | background-repeat: repeat-x; 238 | border-color: #e38d13; 239 | } 240 | .btn-warning:hover, 241 | .btn-warning:focus { 242 | background-color: #eb9316; 243 | background-position: 0 -15px; 244 | } 245 | .btn-warning:active, 246 | .btn-warning.active { 247 | background-color: #eb9316; 248 | border-color: #e38d13; 249 | } 250 | .btn-warning.disabled, 251 | .btn-warning[disabled], 252 | fieldset[disabled] .btn-warning, 253 | .btn-warning.disabled:hover, 254 | .btn-warning[disabled]:hover, 255 | fieldset[disabled] .btn-warning:hover, 256 | .btn-warning.disabled:focus, 257 | .btn-warning[disabled]:focus, 258 | fieldset[disabled] .btn-warning:focus, 259 | .btn-warning.disabled.focus, 260 | .btn-warning[disabled].focus, 261 | fieldset[disabled] .btn-warning.focus, 262 | .btn-warning.disabled:active, 263 | .btn-warning[disabled]:active, 264 | fieldset[disabled] .btn-warning:active, 265 | .btn-warning.disabled.active, 266 | .btn-warning[disabled].active, 267 | fieldset[disabled] .btn-warning.active { 268 | background-color: #eb9316; 269 | background-image: none; 270 | } 271 | .btn-danger { 272 | background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); 273 | background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%); 274 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a)); 275 | background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); 276 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); 277 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 278 | background-repeat: repeat-x; 279 | border-color: #b92c28; 280 | } 281 | .btn-danger:hover, 282 | .btn-danger:focus { 283 | background-color: #c12e2a; 284 | background-position: 0 -15px; 285 | } 286 | .btn-danger:active, 287 | .btn-danger.active { 288 | background-color: #c12e2a; 289 | border-color: #b92c28; 290 | } 291 | .btn-danger.disabled, 292 | .btn-danger[disabled], 293 | fieldset[disabled] .btn-danger, 294 | .btn-danger.disabled:hover, 295 | .btn-danger[disabled]:hover, 296 | fieldset[disabled] .btn-danger:hover, 297 | .btn-danger.disabled:focus, 298 | .btn-danger[disabled]:focus, 299 | fieldset[disabled] .btn-danger:focus, 300 | .btn-danger.disabled.focus, 301 | .btn-danger[disabled].focus, 302 | fieldset[disabled] .btn-danger.focus, 303 | .btn-danger.disabled:active, 304 | .btn-danger[disabled]:active, 305 | fieldset[disabled] .btn-danger:active, 306 | .btn-danger.disabled.active, 307 | .btn-danger[disabled].active, 308 | fieldset[disabled] .btn-danger.active { 309 | background-color: #c12e2a; 310 | background-image: none; 311 | } 312 | .thumbnail, 313 | .img-thumbnail { 314 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 315 | box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 316 | } 317 | .dropdown-menu > li > a:hover, 318 | .dropdown-menu > li > a:focus { 319 | background-color: #e8e8e8; 320 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 321 | background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 322 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); 323 | background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); 324 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); 325 | background-repeat: repeat-x; 326 | } 327 | .dropdown-menu > .active > a, 328 | .dropdown-menu > .active > a:hover, 329 | .dropdown-menu > .active > a:focus { 330 | background-color: #2e6da4; 331 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 332 | background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 333 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); 334 | background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); 335 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); 336 | background-repeat: repeat-x; 337 | } 338 | .navbar-default { 339 | background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); 340 | background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%); 341 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8)); 342 | background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); 343 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); 344 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 345 | background-repeat: repeat-x; 346 | border-radius: 4px; 347 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); 348 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); 349 | } 350 | .navbar-default .navbar-nav > .open > a, 351 | .navbar-default .navbar-nav > .active > a { 352 | background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); 353 | background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); 354 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2)); 355 | background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%); 356 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0); 357 | background-repeat: repeat-x; 358 | -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); 359 | box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); 360 | } 361 | .navbar-brand, 362 | .navbar-nav > li > a { 363 | text-shadow: 0 1px 0 rgba(255, 255, 255, .25); 364 | } 365 | .navbar-inverse { 366 | background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); 367 | background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%); 368 | background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222)); 369 | background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); 370 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); 371 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 372 | background-repeat: repeat-x; 373 | border-radius: 4px; 374 | } 375 | .navbar-inverse .navbar-nav > .open > a, 376 | .navbar-inverse .navbar-nav > .active > a { 377 | background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%); 378 | background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%); 379 | background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f)); 380 | background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%); 381 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0); 382 | background-repeat: repeat-x; 383 | -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); 384 | box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); 385 | } 386 | .navbar-inverse .navbar-brand, 387 | .navbar-inverse .navbar-nav > li > a { 388 | text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); 389 | } 390 | .navbar-static-top, 391 | .navbar-fixed-top, 392 | .navbar-fixed-bottom { 393 | border-radius: 0; 394 | } 395 | @media (max-width: 767px) { 396 | .navbar .navbar-nav .open .dropdown-menu > .active > a, 397 | .navbar .navbar-nav .open .dropdown-menu > .active > a:hover, 398 | .navbar .navbar-nav .open .dropdown-menu > .active > a:focus { 399 | color: #fff; 400 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 401 | background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 402 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); 403 | background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); 404 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); 405 | background-repeat: repeat-x; 406 | } 407 | } 408 | .alert { 409 | text-shadow: 0 1px 0 rgba(255, 255, 255, .2); 410 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); 411 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); 412 | } 413 | .alert-success { 414 | background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); 415 | background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); 416 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc)); 417 | background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); 418 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); 419 | background-repeat: repeat-x; 420 | border-color: #b2dba1; 421 | } 422 | .alert-info { 423 | background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); 424 | background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%); 425 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0)); 426 | background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); 427 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); 428 | background-repeat: repeat-x; 429 | border-color: #9acfea; 430 | } 431 | .alert-warning { 432 | background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); 433 | background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); 434 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0)); 435 | background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); 436 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); 437 | background-repeat: repeat-x; 438 | border-color: #f5e79e; 439 | } 440 | .alert-danger { 441 | background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); 442 | background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); 443 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3)); 444 | background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); 445 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); 446 | background-repeat: repeat-x; 447 | border-color: #dca7a7; 448 | } 449 | .progress { 450 | background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); 451 | background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); 452 | background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5)); 453 | background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); 454 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); 455 | background-repeat: repeat-x; 456 | } 457 | .progress-bar { 458 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%); 459 | background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%); 460 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090)); 461 | background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%); 462 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0); 463 | background-repeat: repeat-x; 464 | } 465 | .progress-bar-success { 466 | background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); 467 | background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%); 468 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44)); 469 | background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); 470 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); 471 | background-repeat: repeat-x; 472 | } 473 | .progress-bar-info { 474 | background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); 475 | background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); 476 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5)); 477 | background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); 478 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); 479 | background-repeat: repeat-x; 480 | } 481 | .progress-bar-warning { 482 | background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); 483 | background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); 484 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f)); 485 | background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); 486 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); 487 | background-repeat: repeat-x; 488 | } 489 | .progress-bar-danger { 490 | background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); 491 | background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%); 492 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c)); 493 | background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); 494 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); 495 | background-repeat: repeat-x; 496 | } 497 | .progress-bar-striped { 498 | background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); 499 | background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); 500 | background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); 501 | } 502 | .list-group { 503 | border-radius: 4px; 504 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 505 | box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 506 | } 507 | .list-group-item.active, 508 | .list-group-item.active:hover, 509 | .list-group-item.active:focus { 510 | text-shadow: 0 -1px 0 #286090; 511 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%); 512 | background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%); 513 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a)); 514 | background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%); 515 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0); 516 | background-repeat: repeat-x; 517 | border-color: #2b669a; 518 | } 519 | .list-group-item.active .badge, 520 | .list-group-item.active:hover .badge, 521 | .list-group-item.active:focus .badge { 522 | text-shadow: none; 523 | } 524 | .panel { 525 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); 526 | box-shadow: 0 1px 2px rgba(0, 0, 0, .05); 527 | } 528 | .panel-default > .panel-heading { 529 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 530 | background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 531 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); 532 | background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); 533 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); 534 | background-repeat: repeat-x; 535 | } 536 | .panel-primary > .panel-heading { 537 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 538 | background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 539 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); 540 | background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); 541 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); 542 | background-repeat: repeat-x; 543 | } 544 | .panel-success > .panel-heading { 545 | background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); 546 | background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); 547 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6)); 548 | background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); 549 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); 550 | background-repeat: repeat-x; 551 | } 552 | .panel-info > .panel-heading { 553 | background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); 554 | background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); 555 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3)); 556 | background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); 557 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); 558 | background-repeat: repeat-x; 559 | } 560 | .panel-warning > .panel-heading { 561 | background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); 562 | background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); 563 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc)); 564 | background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); 565 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); 566 | background-repeat: repeat-x; 567 | } 568 | .panel-danger > .panel-heading { 569 | background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); 570 | background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%); 571 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc)); 572 | background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); 573 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); 574 | background-repeat: repeat-x; 575 | } 576 | .well { 577 | background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); 578 | background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); 579 | background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5)); 580 | background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); 581 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); 582 | background-repeat: repeat-x; 583 | border-color: #dcdcdc; 584 | -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); 585 | box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); 586 | } 587 | /*# sourceMappingURL=bootstrap-theme.css.map */ 588 | 589 | .nav-sidebar > .open > a, 590 | .nav-sidebar > .active > a { 591 | background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); 592 | background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); 593 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2)); 594 | background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%); 595 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0); 596 | background-repeat: repeat-x; 597 | -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); 598 | box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); 599 | } 600 | -------------------------------------------------------------------------------- /Tiredful-API/static/css/bootstrap-theme.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.7 (http://getbootstrap.com) 3 | * Copyright 2011-2016 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} 6 | /*# sourceMappingURL=bootstrap-theme.min.css.map */ -------------------------------------------------------------------------------- /Tiredful-API/static/css/bootstrap-theme.min.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":";;;;AAmBA,YAAA,aAAA,UAAA,aAAA,aAAA,aAME,YAAA,EAAA,KAAA,EAAA,eC2CA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBDvCR,mBAAA,mBAAA,oBAAA,oBAAA,iBAAA,iBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBCsCA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBDlCR,qBAAA,sBAAA,sBAAA,uBAAA,mBAAA,oBAAA,sBAAA,uBAAA,sBAAA,uBAAA,sBAAA,uBAAA,+BAAA,gCAAA,6BAAA,gCAAA,gCAAA,gCCiCA,mBAAA,KACQ,WAAA,KDlDV,mBAAA,oBAAA,iBAAA,oBAAA,oBAAA,oBAuBI,YAAA,KAyCF,YAAA,YAEE,iBAAA,KAKJ,aErEI,YAAA,EAAA,IAAA,EAAA,KACA,iBAAA,iDACA,iBAAA,4CAAA,iBAAA,qEAEA,iBAAA,+CCnBF,OAAA,+GH4CA,OAAA,0DACA,kBAAA,SAuC2C,aAAA,QAA2B,aAAA,KArCtE,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAgBN,aEtEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAiBN,aEvEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAkBN,UExEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,gBAAA,gBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,iBAAA,iBAEE,iBAAA,QACA,aAAA,QAMA,mBAAA,0BAAA,yBAAA,0BAAA,yBAAA,yBAAA,oBAAA,2BAAA,0BAAA,2BAAA,0BAAA,0BAAA,6BAAA,oCAAA,mCAAA,oCAAA,mCAAA,mCAME,iBAAA,QACA,iBAAA,KAmBN,aEzEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAoBN,YE1EI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,kBAAA,kBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,mBAAA,mBAEE,iBAAA,QACA,aAAA,QAMA,qBAAA,4BAAA,2BAAA,4BAAA,2BAAA,2BAAA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,+BAAA,sCAAA,qCAAA,sCAAA,qCAAA,qCAME,iBAAA,QACA,iBAAA,KA2BN,eAAA,WClCE,mBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,EAAA,IAAA,IAAA,iBD2CV,0BAAA,0BE3FI,iBAAA,QACA,iBAAA,oDACA,iBAAA,+CAAA,iBAAA,wEACA,iBAAA,kDACA,OAAA,+GF0FF,kBAAA,SAEF,yBAAA,+BAAA,+BEhGI,iBAAA,QACA,iBAAA,oDACA,iBAAA,+CAAA,iBAAA,wEACA,iBAAA,kDACA,OAAA,+GFgGF,kBAAA,SASF,gBE7GI,iBAAA,iDACA,iBAAA,4CACA,iBAAA,qEAAA,iBAAA,+CACA,OAAA,+GACA,OAAA,0DCnBF,kBAAA,SH+HA,cAAA,ICjEA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBD6DV,sCAAA,oCE7GI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SD2CF,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBD0EV,cAAA,iBAEE,YAAA,EAAA,IAAA,EAAA,sBAIF,gBEhII,iBAAA,iDACA,iBAAA,4CACA,iBAAA,qEAAA,iBAAA,+CACA,OAAA,+GACA,OAAA,0DCnBF,kBAAA,SHkJA,cAAA,IAHF,sCAAA,oCEhII,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SD2CF,mBAAA,MAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBDgFV,8BAAA,iCAYI,YAAA,EAAA,KAAA,EAAA,gBAKJ,qBAAA,kBAAA,mBAGE,cAAA,EAqBF,yBAfI,mDAAA,yDAAA,yDAGE,MAAA,KE7JF,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,UFqKJ,OACE,YAAA,EAAA,IAAA,EAAA,qBC3HA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,gBDsIV,eEtLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAKF,YEvLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAMF,eExLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAOF,cEzLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAeF,UEjMI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFuMJ,cE3MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFwMJ,sBE5MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyMJ,mBE7MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0MJ,sBE9MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2MJ,qBE/MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF+MJ,sBElLI,iBAAA,yKACA,iBAAA,oKACA,iBAAA,iKFyLJ,YACE,cAAA,IC9KA,mBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,EAAA,IAAA,IAAA,iBDgLV,wBAAA,8BAAA,8BAGE,YAAA,EAAA,KAAA,EAAA,QEnOE,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFiOF,aAAA,QALF,+BAAA,qCAAA,qCAQI,YAAA,KAUJ,OCnME,mBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,EAAA,IAAA,IAAA,gBD4MV,8BE5PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyPJ,8BE7PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0PJ,8BE9PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2PJ,2BE/PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF4PJ,8BEhQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF6PJ,6BEjQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFoQJ,MExQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFsQF,aAAA,QC3NA,mBAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA,qBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n .box-shadow(none);\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &.focus,\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n border-radius: @navbar-border-radius;\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: #fff;\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n }\n }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]} -------------------------------------------------------------------------------- /Tiredful-API/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/payatu/Tiredful-API/0134124496b3c4f1b969e51a24fd8a059104fb98/Tiredful-API/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Tiredful-API/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/payatu/Tiredful-API/0134124496b3c4f1b969e51a24fd8a059104fb98/Tiredful-API/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Tiredful-API/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/payatu/Tiredful-API/0134124496b3c4f1b969e51a24fd8a059104fb98/Tiredful-API/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Tiredful-API/static/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/payatu/Tiredful-API/0134124496b3c4f1b969e51a24fd8a059104fb98/Tiredful-API/static/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Tiredful-API/static/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /Tiredful-API/static/rest_framework/css/bootstrap-tweaks.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This CSS file contains some tweaks specific to the included Bootstrap theme. 4 | It's separate from `style.css` so that it can be easily overridden by replacing 5 | a single block in the template. 6 | 7 | */ 8 | 9 | .form-actions { 10 | background: transparent; 11 | border-top-color: transparent; 12 | padding-top: 0; 13 | text-align: right; 14 | } 15 | 16 | #generic-content-form textarea { 17 | font-family:Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace; 18 | font-size: 80%; 19 | } 20 | 21 | .navbar-inverse .brand a { 22 | color: #999999; 23 | } 24 | .navbar-inverse .brand:hover a { 25 | color: white; 26 | text-decoration: none; 27 | } 28 | 29 | /* custom navigation styles */ 30 | .navbar { 31 | width: 100%; 32 | position: fixed; 33 | left: 0; 34 | top: 0; 35 | } 36 | 37 | .navbar { 38 | background: #2C2C2C; 39 | color: white; 40 | border: none; 41 | border-top: 5px solid #A30000; 42 | border-radius: 0px; 43 | } 44 | 45 | .navbar .nav li, .navbar .nav li a, .navbar .brand:hover { 46 | color: white; 47 | } 48 | 49 | .nav-list > .active > a, .nav-list > .active > a:hover { 50 | background: #2C2C2C; 51 | } 52 | 53 | .navbar .dropdown-menu li a, .navbar .dropdown-menu li { 54 | color: #A30000; 55 | } 56 | 57 | .navbar .dropdown-menu li a:hover { 58 | background: #EEEEEE; 59 | color: #C20000; 60 | } 61 | 62 | ul.breadcrumb { 63 | margin: 70px 0 0 0; 64 | } 65 | 66 | .breadcrumb li.active a { 67 | color: #777; 68 | } 69 | 70 | .pagination>.disabled>a, 71 | .pagination>.disabled>a:hover, 72 | .pagination>.disabled>a:focus { 73 | cursor: not-allowed; 74 | pointer-events: none; 75 | } 76 | 77 | .pager>.disabled>a, 78 | .pager>.disabled>a:hover, 79 | .pager>.disabled>a:focus { 80 | pointer-events: none; 81 | } 82 | 83 | .pager .next { 84 | margin-left: 10px; 85 | } 86 | 87 | /*=== dabapps bootstrap styles ====*/ 88 | 89 | html { 90 | width:100%; 91 | background: none; 92 | } 93 | 94 | /*body, .navbar .container-fluid { 95 | max-width: 1150px; 96 | margin: 0 auto; 97 | }*/ 98 | 99 | body { 100 | background: url("../img/grid.png") repeat-x; 101 | background-attachment: fixed; 102 | } 103 | 104 | #content { 105 | margin: 0; 106 | padding-bottom: 60px; 107 | } 108 | 109 | /* sticky footer and footer */ 110 | html, body { 111 | height: 100%; 112 | } 113 | 114 | .wrapper { 115 | position: relative; 116 | top: 0; 117 | left: 0; 118 | padding-top: 60px; 119 | margin: -60px 0; 120 | min-height: 100%; 121 | } 122 | 123 | .form-switcher { 124 | margin-bottom: 0; 125 | } 126 | 127 | .well { 128 | -webkit-box-shadow: none; 129 | -moz-box-shadow: none; 130 | box-shadow: none; 131 | } 132 | 133 | .well .form-actions { 134 | padding-bottom: 0; 135 | margin-bottom: 0; 136 | } 137 | 138 | .well form { 139 | margin-bottom: 0; 140 | } 141 | 142 | .nav-tabs { 143 | border: 0; 144 | } 145 | 146 | .nav-tabs > li { 147 | float: right; 148 | } 149 | 150 | .nav-tabs li a { 151 | margin-right: 0; 152 | } 153 | 154 | .nav-tabs > .active > a { 155 | background: #F5F5F5; 156 | } 157 | 158 | .nav-tabs > .active > a:hover { 159 | background: #F5F5F5; 160 | } 161 | 162 | .tabbable.first-tab-active .tab-content { 163 | border-top-right-radius: 0; 164 | } 165 | 166 | footer { 167 | position: absolute; 168 | bottom: 0; 169 | left: 0; 170 | clear: both; 171 | z-index: 10; 172 | height: 60px; 173 | width: 95%; 174 | margin: 0 2.5%; 175 | } 176 | 177 | footer p { 178 | text-align: center; 179 | color: gray; 180 | border-top: 1px solid #DDDDDD; 181 | padding-top: 10px; 182 | } 183 | 184 | footer a { 185 | color: gray !important; 186 | font-weight: bold; 187 | } 188 | 189 | footer a:hover { 190 | color: gray; 191 | } 192 | 193 | .page-header { 194 | border-bottom: none; 195 | padding-bottom: 0px; 196 | margin: 0; 197 | } 198 | 199 | /* custom general page styles */ 200 | .hero-unit h1, .hero-unit h2 { 201 | color: #A30000; 202 | } 203 | 204 | body a { 205 | color: #A30000; 206 | } 207 | 208 | body a:hover { 209 | color: #c20000; 210 | } 211 | 212 | .request-info { 213 | clear:both; 214 | } 215 | 216 | .horizontal-checkbox label { 217 | padding-top: 0; 218 | } 219 | 220 | .horizontal-checkbox label { 221 | padding-top: 0 !important; 222 | } 223 | 224 | .horizontal-checkbox input { 225 | float: left; 226 | width: 20px; 227 | margin-top: 3px; 228 | } 229 | 230 | .modal-footer form { 231 | margin-left: 5px; 232 | margin-right: 5px; 233 | } 234 | -------------------------------------------------------------------------------- /Tiredful-API/static/rest_framework/css/default.css: -------------------------------------------------------------------------------- 1 | 2 | /* The navbar is fixed at >= 980px wide, so add padding to the body to prevent 3 | content running up underneath it. */ 4 | 5 | h1 { 6 | font-weight: 300; 7 | } 8 | 9 | h2, h3 { 10 | font-weight: 300; 11 | } 12 | 13 | .resource-description, .response-info { 14 | margin-bottom: 2em; 15 | } 16 | 17 | .version:before { 18 | content: "v"; 19 | opacity: 0.6; 20 | padding-right: 0.25em; 21 | } 22 | 23 | .version { 24 | font-size: 70%; 25 | } 26 | 27 | .format-option { 28 | font-family: Menlo, Consolas, "Andale Mono", "Lucida Console", monospace; 29 | } 30 | 31 | .button-form { 32 | float: right; 33 | margin-right: 1em; 34 | } 35 | 36 | td.nested { 37 | padding: 0 !important; 38 | } 39 | 40 | td.nested > table { 41 | margin: 0; 42 | } 43 | 44 | form select, form input, form textarea { 45 | width: 90%; 46 | } 47 | 48 | form select[multiple] { 49 | height: 150px; 50 | } 51 | 52 | /* To allow tooltips to work on disabled elements */ 53 | .disabled-tooltip-shield { 54 | position: absolute; 55 | top: 0; 56 | right: 0; 57 | bottom: 0; 58 | left: 0; 59 | } 60 | 61 | .errorlist { 62 | margin-top: 0.5em; 63 | } 64 | 65 | pre { 66 | overflow: auto; 67 | word-wrap: normal; 68 | white-space: pre; 69 | font-size: 12px; 70 | } 71 | 72 | .page-header { 73 | border-bottom: none; 74 | padding-bottom: 0px; 75 | } 76 | 77 | #filtersModal form input[type=submit] { 78 | width: auto; 79 | } 80 | 81 | #filtersModal .modal-body h2 { 82 | margin-top: 0 83 | } 84 | -------------------------------------------------------------------------------- /Tiredful-API/static/rest_framework/css/prettify.css: -------------------------------------------------------------------------------- 1 | .com { color: #93a1a1; } 2 | .lit { color: #195f91; } 3 | .pun, .opn, .clo { color: #93a1a1; } 4 | .fun { color: #dc322f; } 5 | .str, .atv { color: #D14; } 6 | .kwd, .prettyprint .tag { color: #1e347b; } 7 | .typ, .atn, .dec, .var { color: teal; } 8 | .pln { color: #48484c; } 9 | 10 | .prettyprint { 11 | padding: 8px; 12 | background-color: #f7f7f9; 13 | border: 1px solid #e1e1e8; 14 | } 15 | .prettyprint.linenums { 16 | -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 17 | -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 18 | box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 19 | } 20 | 21 | /* Specify class=linenums on a pre to get line numbering */ 22 | ol.linenums { 23 | margin: 0 0 0 33px; /* IE indents via margin-left */ 24 | } 25 | ol.linenums li { 26 | padding-left: 12px; 27 | color: #bebec5; 28 | line-height: 20px; 29 | text-shadow: 0 1px 0 #fff; 30 | } -------------------------------------------------------------------------------- /Tiredful-API/static/rest_framework/docs/css/base.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | font-size: 45px; 3 | } 4 | 5 | .intro-code { 6 | margin-top: 20px; 7 | } 8 | 9 | pre.highlight code * { 10 | white-space: nowrap; // this sets all children inside to nowrap 11 | } 12 | 13 | pre.highlight { 14 | overflow-x: auto; // this sets the scrolling in x 15 | } 16 | 17 | pre.highlight code { 18 | white-space: pre; // forces to respect
 formatting
 19 | }
 20 | 
 21 | .main-container {
 22 |   padding-left: 30px;
 23 |   padding-right: 30px;
 24 | }
 25 | 
 26 | .btn:focus,
 27 | .btn:focus:active {
 28 |   outline: none;
 29 | }
 30 | 
 31 | .sidebar {
 32 |   overflow: auto;
 33 |   font-family: verdana;
 34 |   font-size: 12px;
 35 |   font-weight: 200;
 36 |   background-color: #2e353d;
 37 |   position: fixed;
 38 |   top: 0px;
 39 |   width: 225px;
 40 |   height: 100%;
 41 |   color: #FFF;
 42 | }
 43 | 
 44 | .sidebar .brand {
 45 |     background-color: #23282e;
 46 |     display: block;
 47 |     text-align: center;
 48 |     padding: 25px 0;
 49 |     margin-top: 0;
 50 |     margin-bottom: 0;
 51 | }
 52 | 
 53 | .sidebar .brand a {
 54 |     color: #FFF;
 55 | }
 56 | 
 57 | .sidebar .brand a:hover,
 58 | .sidebar .brand a:active,
 59 | .sidebar .brand a:focus {
 60 |   text-decoration: none;
 61 | }
 62 | 
 63 | .sidebar .toggle-btn {
 64 |   display: none;
 65 | }
 66 | 
 67 | .sidebar .menu-list ul,
 68 | .sidebar .menu-list li {
 69 |   background: #2e353d;
 70 |   list-style: none;
 71 |   padding: 0px;
 72 |   margin: 0px;
 73 |   line-height: 35px;
 74 |   cursor: pointer;
 75 | }
 76 | 
 77 | .sidebar .menu-list ul :not(collapsed) .arrow:before,
 78 | .sidebar .menu-list li :not(collapsed) .arrow:before {
 79 |   font-family: FontAwesome;
 80 |   content: "\f078";
 81 |   display: inline-block;
 82 |   padding-left: 10px;
 83 |   padding-right: 10px;
 84 |   vertical-align: middle;
 85 |   float: right;
 86 | }
 87 | 
 88 | .sidebar .menu-list ul .active,
 89 | .sidebar .menu-list li .active {
 90 |   border-left: 3px solid #d19b3d;
 91 |   background-color: #4f5b69;
 92 | }
 93 | 
 94 | .sidebar .menu-list ul .sub-menu li.active,
 95 | .sidebar .menu-list li .sub-menu li.active {
 96 |   color: #d19b3d;
 97 | }
 98 | 
 99 | .sidebar .menu-list ul .sub-menu li.active a,
100 | .sidebar .menu-list li .sub-menu li.active a {
101 |   color: #d19b3d;
102 | }
103 | 
104 | .sidebar .menu-list ul .sub-menu li,
105 | .sidebar .menu-list li .sub-menu li {
106 |   background-color: #181c20;
107 |   border: none;
108 |   border-bottom: 1px solid #23282e;
109 |   margin-left: 0px;
110 |   text-indent: 10px;
111 | }
112 | 
113 | .sidebar .menu-list ul .sub-menu li:hover,
114 | .sidebar .menu-list li .sub-menu li:hover {
115 |   background-color: #020203;
116 | }
117 | 
118 | 
119 | .sidebar .menu-list ul .sub-menu li a,
120 | .sidebar .menu-list li .sub-menu li a {
121 |   display: block;
122 | }
123 | 
124 | .sidebar .menu-list ul .sub-menu li a:before,
125 | .sidebar .menu-list li .sub-menu li a:before {
126 |   font-family: FontAwesome;
127 |   content: "\f105";
128 |   display: inline-block;
129 |   padding-left: 10px;
130 |   padding-right: 10px;
131 |   vertical-align: middle;
132 | }
133 | 
134 | .sidebar .menu-list li {
135 |   padding-left: 0px;
136 |   border-left: 3px solid #2e353d;
137 |   border-bottom: 1px solid #23282e;
138 | }
139 | 
140 | .sidebar .menu-list li a {
141 |   text-decoration: none;
142 |   color: white;
143 | }
144 | 
145 | .sidebar .menu-list li a i {
146 |   padding-left: 10px;
147 |   width: 20px;
148 |   padding-right: 20px;
149 | }
150 | 
151 | .sidebar .menu-list li:hover {
152 |   border-left: 3px solid #d19b3d;
153 |   background-color: #4f5b69;
154 |   -webkit-transition: all 1s ease;
155 |   -moz-transition: all 1s ease;
156 |   -o-transition: all 1s ease;
157 |   -ms-transition: all 1s ease;
158 |   transition: all 1s ease;
159 | }
160 | 
161 | body {
162 |   margin: 0px;
163 |   padding: 0px;
164 | }
165 | 
166 | .coredocs-section-title {
167 |     margin-top: 20px;
168 |     padding-bottom: 10px;
169 |     border-bottom: 1px solid lightgrey;
170 | }
171 | 
172 | .coredocs-link-title a,
173 | .coredocs-section-title a {
174 |   display: none;
175 | }
176 | 
177 | .coredocs-link-title a,
178 | .coredocs-section-title a {
179 |   text-decoration: none;
180 | }
181 | 
182 | .coredocs-link-title:hover a,
183 | .coredocs-section-title:hover a {
184 |   display: inline;
185 |   font-size: 20px;
186 | }
187 | 
188 | .coredocs-section-title:last-child {
189 |     margin-top: 0;
190 | }
191 | 
192 | 
193 | /* @group Language Switcher */
194 | 
195 | .sidebar .menu-list.menu-list-bottom {
196 |     margin-bottom: 0;
197 |     position: absolute;
198 |     bottom: 0;
199 |     left: 0;
200 |     right: 0;
201 |     border-top: 1px solid #23282e;
202 | }
203 | 
204 | .sidebar .menu-list-bottom li span {
205 |   float: right;
206 |   margin-right: 20px;
207 |   color: #d19b3d;
208 | }
209 | 
210 | /* @end Language Switcher */
211 | 
212 | 
213 | /* @group Docs Content */
214 | 
215 | .docs-content .meta .label {
216 |     vertical-align: middle;
217 |     font-size: 14px;
218 |     font-weight: normal;
219 | }
220 | 
221 | .docs-content .meta code {
222 |     vertical-align: middle;
223 |     padding: .2em .6em .3em;
224 |     font-size: 14px;
225 | }
226 | 
227 | .docs-content .btn {
228 |   font-size: inherit;
229 | }
230 | 
231 | .code-samples pre {
232 |   margin-top: 20px;
233 | }
234 | 
235 | /* @end Docs Content */
236 | 
237 | 
238 | @media (max-width: 767px) {
239 |   .main-container {
240 |     padding-left: 15px;
241 |     padding-right: 15px;
242 |   }
243 | 
244 |   .sidebar {
245 |     position: relative;
246 |     width: 100%;
247 |     margin-bottom: 10px;
248 |     overflow: visible;
249 |   }
250 | 
251 |   .sidebar .toggle-btn {
252 |     display: block;
253 |     cursor: pointer;
254 |     position: absolute;
255 |     right: 10px;
256 |     top: 10px;
257 |     z-index: 10 !important;
258 |     padding: 3px;
259 |     width: 40px;
260 |     text-align: center;
261 |   }
262 | 
263 |   .sidebar .menu-list.menu-list-bottom {
264 |     position: static;
265 |   }
266 | 
267 |   .sidebar .brand {
268 |     margin-top: 0;
269 |     margin-bottom: 0;
270 | 
271 |     text-align: left !important;
272 |     font-size: 22px;
273 |     padding: 0;
274 |     padding-left: 20px;
275 |     line-height: 50px !important;
276 |   }
277 | }
278 | 
279 | @media (min-width: 767px) {
280 |   .sidebar .menu-list .menu-content {
281 |     display: block;
282 |   }
283 |   #main {
284 |     width:calc(100% - 225px);
285 |     float: right;
286 |   }
287 | }
288 | 
289 | @media (min-width: 992px) {
290 |   .modal-lg {
291 |       width: 980px;
292 |   }
293 | }
294 | 
295 | .api-modal .modal-title .fa {
296 |   color: #93c54b;
297 | }
298 | 
299 | .api-modal .modal-body .request-awaiting {
300 |   padding: 35px 10px;
301 |   color: #7F8177;
302 |   text-align: center;
303 | }
304 | 
305 | .api-modal .modal-body .meta {
306 |   margin-bottom: 20px;
307 | }
308 | 
309 | .api-modal .modal-body .meta .label {
310 |     vertical-align: middle;
311 |     font-size: 14px;
312 |     font-weight: normal;
313 | }
314 | 
315 | .api-modal .modal-body .meta code {
316 |     vertical-align: middle;
317 |     padding: .2em .6em .3em;
318 |     font-size: 14px;
319 | }
320 | 
321 | .api-modal .modal-content .toggle-view {
322 |   text-align: right;
323 |   float: right;
324 | }
325 | 
326 | .api-modal .modal-content .response .well {
327 |   margin: 0;
328 |   max-height: 550px;
329 | }
330 | 
331 | .highlight {
332 |     background-color: #f7f7f9
333 | }
334 | 
335 | .checkbox label.control-label {
336 |     font-weight: bold
337 | }
338 | 
339 | @media (min-width: 768px) {
340 |     .navbar-nav.navbar-right:last-child {
341 |         margin-right: 0 !important;
342 |     }
343 | }
344 | 


--------------------------------------------------------------------------------
/Tiredful-API/static/rest_framework/docs/css/highlight.css:
--------------------------------------------------------------------------------
  1 | /*
  2 | This is the GitHub theme for highlight.js
  3 | 
  4 | github.com style (c) Vasily Polovnyov 
  5 | 
  6 | */
  7 | 
  8 | .hljs {
  9 |   display: block;
 10 |   overflow-x: auto;
 11 |   padding: 0.5em;
 12 |   color: #333;
 13 |   -webkit-text-size-adjust: none;
 14 | }
 15 | 
 16 | .hljs-comment,
 17 | .diff .hljs-header,
 18 | .hljs-javadoc {
 19 |   color: #998;
 20 |   font-style: italic;
 21 | }
 22 | 
 23 | .hljs-keyword,
 24 | .css .rule .hljs-keyword,
 25 | .hljs-winutils,
 26 | .nginx .hljs-title,
 27 | .hljs-subst,
 28 | .hljs-request,
 29 | .hljs-status {
 30 |   color: #333;
 31 |   font-weight: bold;
 32 | }
 33 | 
 34 | .hljs-number,
 35 | .hljs-hexcolor,
 36 | .ruby .hljs-constant {
 37 |   color: #008080;
 38 | }
 39 | 
 40 | .hljs-string,
 41 | .hljs-tag .hljs-value,
 42 | .hljs-phpdoc,
 43 | .hljs-dartdoc,
 44 | .tex .hljs-formula {
 45 |   color: #d14;
 46 | }
 47 | 
 48 | .hljs-title,
 49 | .hljs-id,
 50 | .scss .hljs-preprocessor {
 51 |   color: #900;
 52 |   font-weight: bold;
 53 | }
 54 | 
 55 | .hljs-list .hljs-keyword,
 56 | .hljs-subst {
 57 |   font-weight: normal;
 58 | }
 59 | 
 60 | .hljs-class .hljs-title,
 61 | .hljs-type,
 62 | .vhdl .hljs-literal,
 63 | .tex .hljs-command {
 64 |   color: #458;
 65 |   font-weight: bold;
 66 | }
 67 | 
 68 | .hljs-tag,
 69 | .hljs-tag .hljs-title,
 70 | .hljs-rule .hljs-property,
 71 | .django .hljs-tag .hljs-keyword {
 72 |   color: #000080;
 73 |   font-weight: normal;
 74 | }
 75 | 
 76 | .hljs-attribute,
 77 | .hljs-variable,
 78 | .lisp .hljs-body,
 79 | .hljs-name {
 80 |   color: #008080;
 81 | }
 82 | 
 83 | .hljs-regexp {
 84 |   color: #009926;
 85 | }
 86 | 
 87 | .hljs-symbol,
 88 | .ruby .hljs-symbol .hljs-string,
 89 | .lisp .hljs-keyword,
 90 | .clojure .hljs-keyword,
 91 | .scheme .hljs-keyword,
 92 | .tex .hljs-special,
 93 | .hljs-prompt {
 94 |   color: #990073;
 95 | }
 96 | 
 97 | .hljs-built_in {
 98 |   color: #0086b3;
 99 | }
100 | 
101 | .hljs-preprocessor,
102 | .hljs-pragma,
103 | .hljs-pi,
104 | .hljs-doctype,
105 | .hljs-shebang,
106 | .hljs-cdata {
107 |   color: #999;
108 |   font-weight: bold;
109 | }
110 | 
111 | .hljs-deletion {
112 |   background: #fdd;
113 | }
114 | 
115 | .hljs-addition {
116 |   background: #dfd;
117 | }
118 | 
119 | .diff .hljs-change {
120 |   background: #0086b3;
121 | }
122 | 
123 | .hljs-chunk {
124 |   color: #aaa;
125 | }
126 | 


--------------------------------------------------------------------------------
/Tiredful-API/static/rest_framework/docs/css/jquery.json-view.min.css:
--------------------------------------------------------------------------------
 1 | .json-view{position:relative}
 2 | .json-view .collapser{width:20px;height:18px;display:block;position:absolute;left:-1.7em;top:-.2em;z-index:5;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD1JREFUeNpiYGBgOADE%2F3Hgw0DM4IRHgSsDFOzFInmMAQnY49ONzZRjDFiADT7dMLALiE8y4AGW6LoBAgwAuIkf%2F%2FB7O9sAAAAASUVORK5CYII%3D);background-repeat:no-repeat;background-position:center center;opacity:.5;cursor:pointer}
 3 | .json-view .collapsed{-ms-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-khtml-transform:rotate(-90deg);-webkit-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}
 4 | .json-view .bl{display:block;padding-left:20px;margin-left:-20px;position:relative}
 5 | .json-view{font-family:monospace}
 6 | .json-view ul{list-style-type:none;padding-left:2em;border-left:1px dotted;margin:.3em}
 7 | .json-view ul li{position:relative}
 8 | .json-view .comments,.json-view .dots{display:none;-moz-user-select:none;-ms-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}
 9 | .json-view .comments{padding-left:.8em;font-style:italic;color:#888}
10 | .json-view .bool,.json-view .null,.json-view .num,.json-view .undef{font-weight:700;color:#1A01CC}
11 | .json-view .str{color:#800}


--------------------------------------------------------------------------------
/Tiredful-API/static/rest_framework/docs/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/payatu/Tiredful-API/0134124496b3c4f1b969e51a24fd8a059104fb98/Tiredful-API/static/rest_framework/docs/fonts/fontawesome-webfont.eot


--------------------------------------------------------------------------------
/Tiredful-API/static/rest_framework/docs/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/payatu/Tiredful-API/0134124496b3c4f1b969e51a24fd8a059104fb98/Tiredful-API/static/rest_framework/docs/fonts/fontawesome-webfont.ttf


--------------------------------------------------------------------------------
/Tiredful-API/static/rest_framework/docs/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/payatu/Tiredful-API/0134124496b3c4f1b969e51a24fd8a059104fb98/Tiredful-API/static/rest_framework/docs/fonts/fontawesome-webfont.woff


--------------------------------------------------------------------------------
/Tiredful-API/static/rest_framework/docs/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/payatu/Tiredful-API/0134124496b3c4f1b969e51a24fd8a059104fb98/Tiredful-API/static/rest_framework/docs/fonts/glyphicons-halflings-regular.eot


--------------------------------------------------------------------------------
/Tiredful-API/static/rest_framework/docs/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/payatu/Tiredful-API/0134124496b3c4f1b969e51a24fd8a059104fb98/Tiredful-API/static/rest_framework/docs/fonts/glyphicons-halflings-regular.ttf


--------------------------------------------------------------------------------
/Tiredful-API/static/rest_framework/docs/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/payatu/Tiredful-API/0134124496b3c4f1b969e51a24fd8a059104fb98/Tiredful-API/static/rest_framework/docs/fonts/glyphicons-halflings-regular.woff


--------------------------------------------------------------------------------
/Tiredful-API/static/rest_framework/docs/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/payatu/Tiredful-API/0134124496b3c4f1b969e51a24fd8a059104fb98/Tiredful-API/static/rest_framework/docs/fonts/glyphicons-halflings-regular.woff2


--------------------------------------------------------------------------------
/Tiredful-API/static/rest_framework/docs/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/payatu/Tiredful-API/0134124496b3c4f1b969e51a24fd8a059104fb98/Tiredful-API/static/rest_framework/docs/img/favicon.ico


--------------------------------------------------------------------------------
/Tiredful-API/static/rest_framework/docs/img/grid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/payatu/Tiredful-API/0134124496b3c4f1b969e51a24fd8a059104fb98/Tiredful-API/static/rest_framework/docs/img/grid.png


--------------------------------------------------------------------------------
/Tiredful-API/static/rest_framework/docs/js/api.js:
--------------------------------------------------------------------------------
  1 | function normalizeHTTPHeader (str) {
  2 |   // Capitalize HTTP headers for display.
  3 |   return (str.charAt(0).toUpperCase() + str.substring(1))
  4 |     .replace(/-(.)/g, function ($1) { return $1.toUpperCase() })
  5 |     .replace(/(Www)/g, function ($1) { return 'WWW' })
  6 |     .replace(/(Xss)/g, function ($1) { return 'XSS' })
  7 |     .replace(/(Md5)/g, function ($1) { return 'MD5' })
  8 | }
  9 | 
 10 | var responseDisplay = 'data'
 11 | const coreapi = window.coreapi
 12 | const schema = window.schema
 13 | 
 14 | // Language Control
 15 | $('#language-control li').click(function (event) {
 16 |     event.preventDefault();
 17 |     const languageMenuItem = $(this).find('a');
 18 |     var language = languageMenuItem.data("language")
 19 | 
 20 |     var languageControls = $(this).closest('ul').find('li');
 21 |     languageControls.find('a').not('[data-language="' + language +'"]').parent().removeClass("active")
 22 |     languageControls.find('a').filter('[data-language="' + language +'"]').parent().addClass("active")
 23 | 
 24 |     $('#selected-language').text(language)
 25 | 
 26 |     var codeBlocks = $('pre.highlight')
 27 |     codeBlocks.not('[data-language="' + language +'"]').addClass("hide")
 28 |     codeBlocks.filter('[data-language="' + language +'"]').removeClass("hide")
 29 | })
 30 | 
 31 | function formEntries (form) {
 32 |   // Polyfill for new FormData(form).entries()
 33 |   var formData = new FormData(form)
 34 |   if (formData.entries !== undefined) {
 35 |     return formData.entries()
 36 |   }
 37 | 
 38 |   var entries = []
 39 | 
 40 |   for (var {name, type, value, files, checked, selectedOptions} of Array.from(form.elements)) {
 41 |     if (!name) {
 42 |       continue
 43 |     }
 44 | 
 45 |     if (type === 'file') {
 46 |       for (var file of files) {
 47 |         entries.push([name, file])
 48 |       }
 49 |     } else if (type === 'select-multiple' || type === 'select-one') {
 50 |       for (var elm of Array.from(selectedOptions)) {
 51 |         entries.push([name, elm.value])
 52 |       }
 53 |     } else if (type === 'checkbox') {
 54 |       if (checked) {
 55 |         entries.push([name, value])
 56 |       }
 57 |     } else {
 58 |       entries.push([name, value])
 59 |     }
 60 |   }
 61 |   return entries
 62 | }
 63 | 
 64 | // API Explorer
 65 | $('form.api-interaction').submit(function(event) {
 66 |     event.preventDefault();
 67 | 
 68 |     const form = $(this).closest("form");
 69 |     const key = form.data("key");
 70 |     var params = {};
 71 | 
 72 |     const entries = formEntries(form.get()[0]);
 73 |     for (var [paramKey, paramValue] of entries) {
 74 |         var elem = form.find("[name=" + paramKey + "]")
 75 |         var dataType = elem.data('type') || 'string'
 76 | 
 77 |         if (dataType === 'integer' && paramValue) {
 78 |             var value = parseInt(paramValue)
 79 |             if (!isNaN(value)) {
 80 |               params[paramKey] = value
 81 |             }
 82 |         } else if (dataType === 'number' && paramValue) {
 83 |             var value = parseFloat(paramValue)
 84 |             if (!isNaN(value)) {
 85 |               params[paramKey] = value
 86 |             }
 87 |         } else if (dataType === 'boolean' && paramValue) {
 88 |             var value = {
 89 |                 'true': true,
 90 |                 'false': false
 91 |             }[paramValue.toLowerCase()]
 92 |             if (value !== undefined) {
 93 |               params[paramKey]
 94 |             }
 95 |         } else if (dataType === 'array' && paramValue) {
 96 |             try {
 97 |               params[paramKey] = JSON.parse(paramValue)
 98 |             } catch (err) {
 99 |               // Ignore malformed JSON
100 |             }
101 |         } else if (dataType === 'object' && paramValue) {
102 |             try {
103 |               params[paramKey] = JSON.parse(paramValue)
104 |             } catch (err) {
105 |               // Ignore malformed JSON
106 |             }
107 |         } else if (dataType === 'string' && paramValue) {
108 |             params[paramKey] = paramValue
109 |         }
110 |     }
111 | 
112 |     form.find(":checkbox").each(function( index ) {
113 |         // Handle unselected checkboxes
114 |         var name = $(this).attr("name");
115 |         if (!params.hasOwnProperty(name)) {
116 |             params[name] = false
117 |         }
118 |     })
119 | 
120 |     function requestCallback(request) {
121 |         // Fill in the "GET /foo/" display.
122 |         var parser = document.createElement('a');
123 |         parser.href = request.url;
124 |         const method = request.options.method
125 |         const path = parser.pathname + parser.hash + parser.search
126 | 
127 |         form.find(".request-method").text(method)
128 |         form.find(".request-url").text(path)
129 |     }
130 | 
131 |     function responseCallback(response, responseText) {
132 |         // Display the 'Data'/'Raw' control.
133 |         form.closest(".modal-content").find(".toggle-view").removeClass("hide")
134 | 
135 |         // Fill in the "200 OK" display.
136 |         form.find(".response-status-code").removeClass("label-success").removeClass("label-danger")
137 |         if (response.ok) {
138 |             form.find(".response-status-code").addClass("label-success")
139 |         } else {
140 |             form.find(".response-status-code").addClass("label-danger")
141 |         }
142 |         form.find(".response-status-code").text(response.status)
143 |         form.find(".meta").removeClass("hide")
144 | 
145 |         // Fill in the Raw HTTP response display.
146 |         var panelText = 'HTTP/1.1 ' + response.status + ' ' + response.statusText + '\n';
147 |         response.headers.forEach(function(header, key) {
148 |             panelText += normalizeHTTPHeader(key) + ': ' + header + '\n'
149 |         })
150 |         if (responseText) {
151 |             panelText += '\n' + responseText
152 |         }
153 |         form.find(".response-raw-response").text(panelText)
154 |     }
155 | 
156 |     // Instantiate a client to make the outgoing request.
157 |     var options = {
158 |         requestCallback: requestCallback,
159 |         responseCallback: responseCallback,
160 |     }
161 | 
162 |     // Setup authentication options.
163 |     if (window.auth && window.auth.type === 'token') {
164 |       // Header authentication
165 |       options.auth = new coreapi.auth.TokenAuthentication({
166 |         prefix: window.auth.scheme,
167 |         token: window.auth.token
168 |       })
169 |     } else if (window.auth && window.auth.type === 'basic') {
170 |       // Basic authentication
171 |       options.auth = new coreapi.auth.BasicAuthentication({
172 |         username: window.auth.username,
173 |         password: window.auth.password
174 |       })
175 |     } else if (window.auth && window.auth.type === 'session') {
176 |       // Session authentication
177 |       options.auth = new coreapi.auth.SessionAuthentication({
178 |         csrfCookieName: 'csrftoken',
179 |         csrfHeaderName: 'X-CSRFToken'
180 |       })
181 |     }
182 | 
183 |     const client = new coreapi.Client(options)
184 | 
185 |     client.action(schema, key, params).then(function (data) {
186 |         var response = JSON.stringify(data, null, 2);
187 |         form.find(".request-awaiting").addClass("hide")
188 |         form.find(".response-raw").addClass("hide")
189 |         form.find(".response-data").addClass("hide")
190 |         form.find(".response-data").text('')
191 |         form.find(".response-data").jsonView(response)
192 | 
193 |         if (responseDisplay === 'data') {
194 |             form.find(".response-data").removeClass("hide")
195 |         } else {
196 |             form.find(".response-raw").removeClass("hide")
197 |         }
198 |     }).catch(function (error) {
199 |         var response = JSON.stringify(error.content, null, 2);
200 |         form.find(".request-awaiting").addClass("hide")
201 |         form.find(".response-raw").addClass("hide")
202 |         form.find(".response-data").addClass("hide")
203 |         form.find(".response-data").text('')
204 |         form.find(".response-data").jsonView(response)
205 | 
206 |         if (responseDisplay === 'data') {
207 |             form.find(".response-data").removeClass("hide")
208 |         } else {
209 |             form.find(".response-raw").removeClass("hide")
210 |         }
211 |     })
212 | });
213 | 
214 | // 'Data'/'Raw' control
215 | $('.toggle-view button').click(function() {
216 |     responseDisplay = $(this).data("display-toggle");
217 |     $(this).removeClass("btn-default").addClass('btn-info').siblings().removeClass('btn-info');
218 |     if (responseDisplay === 'raw') {
219 |         $(this).closest(".modal-content").find(".response-raw").removeClass("hide");
220 |         $(this).closest(".modal-content").find(".response-data").addClass("hide");
221 |     } else {
222 |         $(this).closest(".modal-content").find(".response-data").removeClass("hide");
223 |         $(this).closest(".modal-content").find(".response-raw").addClass("hide");
224 |     }
225 | });
226 | 
227 | // Authentication: none
228 | $('#auth-control').find("[data-auth='none']").click(function (event) {
229 |     event.preventDefault();
230 |     window.auth = null;
231 |     $('#selected-authentication').text('none');
232 |     $('#auth-control').children().removeClass('active');
233 |     $('#auth-control').find("[data-auth='none']").addClass('active');
234 | })
235 | 
236 | // Authentication: token
237 | $('form.authentication-token-form').submit(function(event) {
238 |     event.preventDefault();
239 |     const form = $(this).closest("form");
240 |     const scheme = form.find('input#scheme').val();
241 |     const token = form.find('input#token').val();
242 |     window.auth = {
243 |         'type': 'token',
244 |         'scheme': scheme,
245 |         'token': token
246 |     };
247 |     $('#selected-authentication').text('token');
248 |     $('#auth-control').children().removeClass('active');
249 |     $('#auth-control').find("[data-auth='token']").addClass('active');
250 |     $('#auth_token_modal').modal('hide');
251 | });
252 | 
253 | // Authentication: basic
254 | $('form.authentication-basic-form').submit(function(event) {
255 |     event.preventDefault();
256 |     const form = $(this).closest("form");
257 |     const username = form.find('input#username').val();
258 |     const password = form.find('input#password').val();
259 |     window.auth = {
260 |         'type': 'basic',
261 |         'username': username,
262 |         'password': password
263 |     };
264 |     $('#selected-authentication').text('basic');
265 |     $('#auth-control').children().removeClass('active');
266 |     $('#auth-control').find("[data-auth='basic']").addClass('active');
267 |     $('#auth_basic_modal').modal('hide');
268 | });
269 | 
270 | // Authentication: session
271 | $('form.authentication-session-form').submit(function(event) {
272 |     event.preventDefault();
273 |     window.auth = {
274 |         'type': 'session',
275 |     };
276 |     $('#selected-authentication').text('session');
277 |     $('#auth-control').children().removeClass('active');
278 |     $('#auth-control').find("[data-auth='session']").addClass('active');
279 |     $('#auth_session_modal').modal('hide');
280 | });
281 | 


--------------------------------------------------------------------------------
/Tiredful-API/static/rest_framework/docs/js/base.js:
--------------------------------------------------------------------------------
 1 | function getSearchTerm()
 2 | {
 3 |     var sPageURL = window.location.search.substring(1);
 4 |     var sURLVariables = sPageURL.split('&');
 5 |     for (var i = 0; i < sURLVariables.length; i++)
 6 |     {
 7 |         var sParameterName = sURLVariables[i].split('=');
 8 |         if (sParameterName[0] == 'q')
 9 |         {
10 |             return sParameterName[1];
11 |         }
12 |     }
13 | }
14 | 
15 | $(document).ready(function() {
16 | 
17 |     var search_term = getSearchTerm(),
18 |         $search_modal = $('#mkdocs_search_modal');
19 | 
20 |     if(search_term){
21 |         $search_modal.modal();
22 |     }
23 | 
24 |     // make sure search input gets autofocus everytime modal opens.
25 |     $search_modal.on('shown.bs.modal', function () {
26 |         $search_modal.find('#mkdocs-search-query').focus();
27 |     });
28 | 
29 |     // Highlight.js
30 |     hljs.initHighlightingOnLoad();
31 |     $('table').addClass('table table-striped table-hover');
32 | });
33 | 
34 | 
35 | $('body').scrollspy({
36 |     target: '.bs-sidebar',
37 | });
38 | 
39 | /* Prevent disabled links from causing a page reload */
40 | $("li.disabled a").click(function() {
41 |     event.preventDefault();
42 | });
43 | 


--------------------------------------------------------------------------------
/Tiredful-API/static/rest_framework/docs/js/jquery.json-view.min.js:
--------------------------------------------------------------------------------
1 | /**
2 |  * jquery.json-view - jQuery collapsible JSON plugin
3 |  * @version v1.0.0
4 |  * @link http://github.com/bazh/jquery.json-view
5 |  * @license MIT
6 |  */
7 | !function(e){"use strict";var n=function(n){var a=e("",{"class":"collapser",on:{click:function(){var n=e(this);n.toggleClass("collapsed");var a=n.parent().children(".block"),p=a.children("ul");n.hasClass("collapsed")?(p.hide(),a.children(".dots, .comments").show()):(p.show(),a.children(".dots, .comments").hide())}}});return n&&a.addClass("collapsed"),a},a=function(a,p){var t=e.extend({},{nl2br:!0},p),r=function(e){return e.toString()?e.toString().replace(/&/g,"&").replace(/"/g,""").replace(//g,">"):""},s=function(n,a){return e("",{"class":a,html:r(n)})},l=function(a,p){switch(e.type(a)){case"object":p||(p=0);var c=e("",{"class":"block"}),d=Object.keys(a).length;if(!d)return c.append(s("{","b")).append(" ").append(s("}","b"));c.append(s("{","b"));var i=e("