diff --git a/README.md b/README.md index e1a6473..0629d20 100755 --- a/README.md +++ b/README.md @@ -1,66 +1,60 @@ -# Learning Kubernetes +## orchestration and backend engineering -* A Kubernetes cluster consists of **Nodes** (simialr to servers) +
-* Nodes run **Pods**, which are collections of Docker containers. Containers in a Pod share the same network. +### chapters -* The Kubernetes object responsible for launching and maintaining the desired number of pods is called a **Deployment**. +
-* Kubernetes provides objects called a **Service** so thart Pods to communicate with other Pods. They are tied to Deployments through Selectors and Labels, and they can be exposed to external clients either by exposing a **NodePort** as a static port on each Kubernetes node or by creating a **LoadBalancer** object/ +#### scripts for services and pubs -* Kubernetes provides the **Secret** object for managing sensitive information such as passwords, API keys, and other credentials. +* **[docker](code/docker)** +* **[kubernetes](code/kubernetes):** + * **[spin up a node server](code/kubernetes/node-server-example)** + * **[kustomize for deployment](code/kubernetes/kustomize)** + * **[python cdk for deployment](code/kubernetes/python-cdk)** +* **[kafka (long pooling)](code/kafka)** +
-------------- +#### scripts for cloud infrastructure -## In this Repository +* **[aws](code/aws)** +* **[gcp](code/gcp)** -* [Spin up a node server example](https://github.com/bt3gl/Learning_Kubernetes/tree/master/node-server-example). -* [Use kustomize to organize and combine YAML templates of your services and deployments](https://github.com/bt3gl/Learning_Kubernetes/tree/master/kustomize-example). +
+#### resources for storage systems --------------- -## Tools +* **[databases](resources/databases/)** -### Minikube +
-[Minikube](https://github.com/kubernetes/minikube) implements a local Kubernetes cluster on macOS, Linux, and Windows. You can install it following [this instructions](https://minikube.sigs.k8s.io/docs/start/). +#### scripts for cloud management -### Kubectl +* **[chef](code/chef)** -Kubectl is a command line interface for running commands against Kubernetes clusters. You can install it [here](https://kubernetes.io/docs/tasks/tools/install-kubectl/). +
+#### resources for learning -Checking out pods: +* **[protocol demos](code/protocol_demos/)** +* **[data engineering](resources/data_engineering/)** + * **[airflow and luigi](resources/data_engineering/airflow_and_luigi.md)** + * **[the arrow project](resources/data_engineering/arrow_project.md)** + * **[or tools](resources/data_engineering/or_tools.md)** +* **[what's a protocol](resources/protocols/)** +* **[what's communication patterns](resources/communication/)** -``` -$ kubectl get pods --namespace= -``` +
-Checking deployments: +--- -``` -$ kubectl get deployments --namespace= -``` +### cool resources -Checking services: +
-``` -$ kubectl get services --namespace= -``` +* **[list of public apis](https://github.com/public-apis/public-apis?tab=readme-ov-file)** +* **[system design in cool pictures](https://github.com/ByteByteGoHq/system-design-101)** +* **[my e2e surfline-pipeline-aws-py](https://github.com/autistic-symposium/surfline-pipeline-aws-py)** -Get more information about a pod: - -``` -$ kubectl describe pod --namespace= -``` - - --------- - -## Learning - - -* [Google's K8s 101](https://techdevguide.withgoogle.com/paths/cloud/sequence-2/kubernetes-101-pods-nodes-containers-and-clusters/#!). -* [K8s Bootcamp](https://kubernetesbootcamp.github.io/kubernetes-bootcamp/). -* [K8s the Hard Way](https://github.com/kelseyhightower/kubernetes-the-hard-way#labs). diff --git a/code/aws/README.md b/code/aws/README.md new file mode 100644 index 0000000..503976a --- /dev/null +++ b/code/aws/README.md @@ -0,0 +1,6 @@ +## resources on aws + +
+ +* [eks](eks) +* [lambda](lambda-function) diff --git a/code/aws/eks/README.md b/code/aws/eks/README.md new file mode 100644 index 0000000..969a3ba --- /dev/null +++ b/code/aws/eks/README.md @@ -0,0 +1,480 @@ +# AWS EKS + + +## Tutorials & Articles + +* [Provision a Kubernetes Cluster in Amazon EKS with Weaveworks eksctl and AWS CDK](https://blog.reactioncommerce.com/deploying-kubernetes-clusters-in-aws-eks-with-the-aws-cloud-development-kit/). + + +## Creating EKS cluster using the eksctl CLI + + eksctl create cluster \ + --name staging \ + --version 1.14 \ + --nodegroup-name staging-workers \ + --node-type m5.xlarge \ + --nodes 3 \ + --nodes-min 1 \ + --nodes-max 10 \ + --node-ami auto + +### Create RDS PostgreSQL instance + +Create `hydra` database and `hydradbadmin` user/role in the database. + + hydra=> CREATE DATABASE hydra; + CREATE DATABASE + hydra=> \q + hydra=> CREATE ROLE hydradbadmin; + CREATE ROLE + hydra=> ALTER ROLE hydradbadmin LOGIN; + ALTER ROLE + hydra=> ALTER USER hydradbadmin PASSWORD 'PASS'; + ALTER ROLE + +DB connection string: `postgres://hydradbadmin:PASS@staging.cjwa4nveh3ws.us-west-2.rds.amazonaws.com:5432/hydra` + +### Create MongoDB database and user in Atlas + + MONGO_OPLOG_URL: mongodb://domain:PASS@cluster0-shard-00-02-gk3cz.mongodb.net.:27017,[cluster0-shard-00-01-gk3cz.mongodb.net](http://cluster0-shard-00-01-gk3cz.mongodb.net/).:27017,[cluster0-shard-00-00-gk3cz.mongodb.net](http://cluster0-shard-00-00-gk3cz.mongodb.net/).:27017/local?authSource=admin&gssapiServiceName=mongodb&replicaSet=Cluster0-shard-0&ssl=true + + MONGO_URL: mongodb://domain:PASS@cluster0-shard-00-02-gk3cz.mongodb.net.:27017,[cluster0-shard-00-01-gk3cz.mongodb.net](http://cluster0-shard-00-01-gk3cz.mongodb.net/).:27017,[cluster0-shard-00-00-gk3cz.mongodb.net](http://cluster0-shard-00-00-gk3cz.mongodb.net/).:27017/rc-staging?authSource=admin&gssapiServiceName=mongodb&replicaSet=Cluster0-shard-0&ssl=true + +### Generate kubeconfig files for administrator and developer roles + +Save the above file somewhere, then + + export KUBECONFIG=/path/to/file + export AWS_PROFILE=profilename + +This configuration uses the `aws-iam-authenticator` binary (needs to exist locally) +and maps an IAM role to an internal Kubernetes RBAC role. + +This was created in the EKS cluster with: + + kind: Role + apiVersion: rbac.authorization.k8s.io/v1beta1 + metadata: + name: k8s-developer-role + namespace: staging + rules: + - apiGroups: + - "" + - "apps" + - "batch" + - "extensions" + resources: + - "configmaps" + - "cronjobs" + - "deployments" + - "events" + - "ingresses" + - "jobs" + - "pods" + - "pods/attach" + - "pods/exec" + - "pods/log" + - "pods/portforward" + - "secrets" + - "services" + verbs: + - "create" + - "delete" + - "describe" + - "get" + - "list" + - "patch" + - "update" + --- + kind: RoleBinding + apiVersion: rbac.authorization.k8s.io/v1beta1 + metadata: + name: k8s-developer-rolebinding + namespace: staging + subjects: + - kind: User + name: k8s-developer-user + roleRef: + kind: Role + name: k8s-developer-role + apiGroup: rbac.authorization.k8s.io + +### Install nginx ingress controller and create ALB in front of nginx ingress service + +The `Service` type for the `ingress-nginx` service is `NodePort` and not `LoadBalancer` +because we don't want AWS to create a new Load Balancer every time we recreate the ingress. + + kind: Service + apiVersion: v1 + metadata: + name: ingress-nginx + namespace: kube-ingress + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + spec: + type: NodePort + selector: + app: ingress-nginx + ports: + - name: http + port: 80 + nodePort: 30080 + targetPort: http + - name: https + port: 443 + nodePort: 30443 + targetPort: https + +Instead, we provision an ALB and send both HTTP and HTTPS traffic to a Target Group that targets port 30080 on +the EKS worker nodes (which is the `nodePort` in the manifest above for HTTP traffic). + +**NOTE**: need to add rule in EKS worker SG to allow SG of ALB to access port 30080. + +### Create Kubernetes Secret for DockerHub credentials (for pulling private images) + + apiVersion: v1 + type: kubernetes.io/dockerconfigjson + kind: Secret + metadata: + name: reaction-docker-hub + data: + .dockerconfigjson: BASE64_OF_DOCKERHUB_AUTH_STRING + + DOCKERHUB_AUTH_STRING={"auths":{"https://index.docker.io/v1/":{"username":"rck8s","password":"PASS","auth":"OBTAINED_FROM_DOCKER_CONFIG.JSON"}}} + +This Secret was created in several namespaces (`default`, `staging`, `monitoring`, `logging`, `flux-system`) + +### Install and customize Flux for GitOps workflow + +Flux is installed in its own `flux-system` namespace. + +To install it, it we ran: + + kustomize build overlays/staging | kubectl apply -f - + +The default `Deployment` for Flux is using the `weaveworks/flux` Docker image, which as of its last +version contains an older binary for `kustomize`. + +Here is the `Dockerfile` for that image: + + FROM fluxcd/flux:1.15.0 + + ARG REACTION_ENVIRONMENT + ENV SOPS_VERSION 3.4.0 + ENV REACTION_ENVIRONMENT=${REACTION_ENVIRONMENT} + + RUN /sbin/apk add npm + RUN wget https://github.com/mozilla/sops/releases/download/${SOPS_VERSION}/sops-${SOPS_VERSION}.linux \ + -O /usr/local/bin/sops; chmod +x /usr/local/bin/sops + + +For now, the script `build_and_push_image_staging.sh` sets this variable to `staging`: + + #!/bin/bash + + COMMIT_TAG=$(git rev-parse --short HEAD) + docker build --build-arg REACTION_ENVIRONMENT=staging -t reaction-flux:staging . + docker tag reaction-flux:staging reactioncommerce/reaction-flux:staging-${COMMIT_TAG} + docker push reactioncommerce/reaction-flux:staging-${COMMIT_TAG} + + +Flux generates an ssh key upon startup. We need to obtain that key with `fluxctl` and add +it as a deploy key to the `reaction-gitops` GitHub repo: + + fluxctl --k8s-fwd-ns=flux-system identity + +The `manifest-generation=true` argument allows Flux to inspect and use a special configuration file called +`.flux.yaml` in the root of the associated Git repo. The contents of this file are: + + version: 1 + commandUpdated: + generators: + - command: ./generate_kustomize_output.sh + +Flux will `cd` into the `git-path` (set to `.` in our case in the args above), then will run the `command` +specified in the `.flux.yaml` file. The output of the command needs to be valid YAML, which Flux will apply +to the Kubernetes cluster via `kubectl apply -f -`. + +We can run whatever commands we need, following whatever conventions we come up with, inside the `generate_kustomize_output.sh` script. Currently we do something along these lines: + + #!/bin/bash + + if [ -z $ENVIRONMENT ]; then + echo Please set the ENVIRONMENT environment variable to a value such as staging before running this script. + exit 1 + fi + + # this is necessary when running npm/npx inside a Docker container + npm config set unsafe-perm true + + cd kustomize + for SUBDIR in `ls`; do + if [ "$1" ] && [ "${SUBDIR}" != "$1" ]; then + continue + fi + OVERLAY_DIR=${SUBDIR}/overlays/${ENVIRONMENT} + if [ ! -d "${OVERLAY_DIR}" ]; then + continue + fi + if [ -d "${OVERLAY_DIR}/.sops" ]; then + # decrypt sops-encrypted values and merge them into stub manifests for Secret objects + npx --quiet --package @reactioncommerce/merge-sops-secrets@1.2.1 sops-to-secret ${OVERLAY_DIR}/secret-stub.yaml > ${OVERLAY_DIR}/secret.yaml + fi + # generate kustomize output + kustomize build ${OVERLAY_DIR} + echo "---" + rm -rf ${OVERLAY_DIR}/secret.yaml + done + +Flux will do a `git pull` against the branch of the `reaction-gitops` repo specified in the +command-line args (`master` in our case) every 5 minutes, and it will run the `generate_kustomize_output.sh` script, then will run `kubectl apply -f -` against the output of that script, applying any manifests that have changed. + +The Flux `git pull` can also be forced with `fluxctl sync`: + + fluxctl sync --k8s-fwd-ns flux-system + +To redeploy a Flux container for example when the underlying Docker image changes, do this in the +`reaction-gitops` root directory: + + cd bootstrap/flux + kustomize build overlays/staging | kubectl apply -f - + + +### Management of Kubernetes secrets + +We use sops to encrypt secret values for environment variables representing credentials, database connections, etc. + +We create one file per secret in directories of the format `kustomize/SERVICE/overlays/ENVIRONMENT/.sops.` + +We encrypt the files with a KMS key specified in `.sops.yaml` in the directory `kustomize/SERVICE/overlays/ENVIRONMENT`. + +Example: + + cd kustomize/hydra/overlays/staging + echo -n "postgres://hydradbadmin:PASS@staging.cjwa4nveh3ws.us-west-2.rds.amazonaws.com:5432/hydra" > .sops/DATABASE_URL.enc + sops -e -i .sops/DATABASE_URL.enc + +We also create a `secret-stub.yaml` file in the directory `kustomize/SERVICE/overlays/ENVIRONMENT` similar to this: + + $ cat overlays/staging/secret-stub.yaml + apiVersion: v1 + kind: Secret + metadata: + name: hydra + type: Opaque + data: + DATABASE_URL: BASE64_OF_PLAIN_TEXT_SECRET + OIDC_SUBJECT_TYPE_PAIRWISE_SALT: BASE64_OF_PLAIN_TEXT_SECRET + SYSTEM_SECRET: BASE64_OF_PLAIN_TEXT_SECRET + +The Flux container will call the `generate_kustomize_output.sh` script, which will decrypt the files via Pete's `@reactioncommerce/merge-sops-secrets@1.2.1 sops-to-secret` utility and will stitch their values inside `secret-stub.yaml`, saving the output in a `secret.yaml` file which will then be read by `kustomize`. + +Here is the relevant section from the `generate_kustomize_output.sh` script: + + npx --quiet \ + --package @reactioncommerce/merge-sops-secrets@1.2.1 \ + sops-to-secret ${OVERLAY_DIR}/secret-stub.yaml > ${OVERLAY_DIR}/secret.yaml + +The Flux container needs to be able to use the KMS key for decryption, so we had to create an IAM policy allowing access to this KMS key, then attach the policy to the EKS worker node IAM role. + + { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "VisualEditor0", + "Effect": "Allow", + "Action": [ + "kms:GetKeyPolicy", + "kms:Decrypt", + "kms:DescribeKey", + "kms:GenerateDataKey*" + ], + "Resource": "arn:aws:kms:us-west-2:773713188930:key/a8d73206-e37a-4ddf-987e-dbfa6c2cd2f8" + } + ] + } + +### Kubernetes manifest generation with Kustomize + +We use Kustomize to generate Kubernetes manifests in YAML format. +There are several directories under the `kustomize` directory, one for each service to be deployed. + +Example directory structure under `kustomize/reaction-storefront`: + + |____overlays + | |____staging + | | |____patch-deployment-imagepullsecret.yaml + | | |____kustomization.yaml + | | |____hpa.yaml + | | |____secret-stub.yaml + | | |____.sops + | | | |____SESSION_SECRET.enc + | | | |____OAUTH2_CLIENT_SECRET.enc + | | |____configmap.yaml + | | |____.sops.yaml + |____base + | |____deployment.yaml + | |____ingress.yaml + | |____kustomization.yaml + | |____service.yaml + +The manifests under the `base` directory define the various Kubernetes objects that will be created for `reaction-storefront` (similar to YAML manifests under the `templates` directory of a Helm chart, but with no templating). In this example we have a Deployment, a Service and an Ingress defined in their respective files. + +The file `base/kustomization.yaml` specifies how these manifests files are collated and how other common information is appended: + + $ cat base/kustomization.yaml + # Labels to add to all resources and selectors. + commonLabels: + app.kubernetes.io/component: frontend + app.kubernetes.io/instance: reaction-storefront + app.kubernetes.io/name: reaction-storefront + + # Value of this field is prepended to the + # names of all resources + #namePrefix: reaction-storefront + + configMapGenerator: + - name: reaction-storefront + + # List of resource files that kustomize reads, modifies + # and emits as a YAML string + resources: + - deployment.yaml + - ingress.yaml + - service.yaml + +The customization for a specific environment such as `staging` happens in files in the directory `overlays/staging`. Here is the `kustomization.yaml` file from that directory: + + $ cat overlays/staging/kustomization.yaml + apiVersion: kustomize.config.k8s.io/v1beta1 + kind: Kustomization + namePrefix: staging- + namespace: staging + images: + - name: docker.io/reactioncommerce/reaction-next-starterkit + newTag: 4e1c281ec5de541ec6b22c52c38e6e2e6e072a1c + resources: + - secret.yaml + - ../../base + patchesJson6902: + - patch: |- + - op: replace + path: /spec/rules/0/host + value: storefront.staging.reactioncommerce.io + target: + group: extensions + kind: Ingress + name: reaction-storefront + version: v1beta1 + patchesStrategicMerge: + - configmap.yaml + - patch-deployment-imagepullsecret.yaml + +Some things to note: + +- You can customize the Docker image and tag used for a container inside a pod +- You can specify a prefix to be added to all object names, so a deployment declared in the `base/deployment.yaml` file with the name `reaction-storefront` will get `staging-` in front and will become `staging-reaction-storefront` +- You can apply patches to the files under `base` and specify values specific to this environment + +Patches can be declared either inline in the `kustomization.yaml` file (such as the Ingress patch above), or in separate YAML files (such as the files in the `patchesStrategicMerge` section). + +Here is an example of a separate patch file: + + $ cat overlays/staging/patch-deployment-imagepullsecret.yaml + apiVersion: apps/v1 + kind: Deployment + metadata: + name: reaction-storefront + spec: + template: + spec: + imagePullSecrets: + - name: reaction-docker-hub + +You need to specify enough information in the patch file for `kustomize` to identify the object to be patched. If you think of the YAML manifest as a graph with nodes specified by a succession of keys, then the patch needs to specify which node needs to be modified or added, and what is the new value for that key. In the example above, we add a new key at `spec->template->spec->imagePullSecrets->0 (item index)->name` and set its value to `reaction-docker-hub`. + +**Environment variables** for a specific environment are set in the `configmap.yaml` file in the `overlays/ENVIRONMENT` directory. Example for `reaction-storefront`: + + $ cat overlays/staging/configmap.yaml + apiVersion: v1 + kind: ConfigMap + metadata: + name: reaction-storefront + data: + CANONICAL_URL: https://storefront.staging.reactioncommerce.io + DEFAULT_CACHE_TTL: "3600" + ELASTICSEARCH_URL: http://elasticsearch-client:9200 + EXTERNAL_GRAPHQL_URL: https://api.staging.reactioncommerce.io/graphql-beta + HYDRA_ADMIN_URL: http://staging-hydra:4445 + INTERNAL_GRAPHQL_URL: http://staging-reaction-core/graphql-beta + OAUTH2_ADMIN_PORT: "4445" + OAUTH2_AUTH_URL: https://auth.staging.reactioncommerce.io/oauth2/auth + OAUTH2_CLIENT_ID: staging-storefront + OAUTH2_HOST: staging-hydra + OAUTH2_IDP_HOST_URL: https://api.staging.reactioncommerce.io/ + OAUTH2_REDIRECT_URL: https://storefront.staging.reactioncommerce.io/callback + OAUTH2_TOKEN_URL: http://staging-hydra:4444/oauth2/token + PRINT_ERRORS: "false" + SEARCH_ENABLED: "false" + SESSION_MAX_AGE_MS: "2592000000" + +Another example of a patch is adding `serviceMonitorNamespaceSelector` and `serviceMonitorSelector` sections to a Prometheus manifest file: + + $ cat bootstrap/prometheus-operator/overlays/staging/patch-prometheus-application-selectors.yaml + apiVersion: monitoring.coreos.com/v1 + kind: Prometheus + metadata: + labels: + prometheus: application + name: application + namespace: monitoring + spec: + serviceMonitorNamespaceSelector: + matchExpressions: + - key: name + operator: In + values: + - staging + serviceMonitorSelector: + matchLabels: + monitoring: application + +**In short, the Kustomize patching mechanism is powerful, and it represents the main method for customizing manifests for a given environment while keeping intact the default manifests under the `base` directory.** + +### Automated PR creation into reaction-gitops from example-storefront + +We added a job to the CircleCI workflow for `reactioncommerce/example-storefront` (`master` branch) to create a PR automatically against `reactioncommerce/reaction-gitops`. + +The PR contains a single modification of the `reaction-storefront/overlays/staging/kustomize.yaml` file. It sets the Docker image tag to the CIRCLE_SHA1 of the current build by calling `kustomize edit set image [docker.io/${DOCKER_REPOSITORY}:${CIRCLE_SHA1}](http://docker.io/$%7BDOCKER_REPOSITORY%7D:$%7BCIRCLE_SHA1%7D)`. + +Details here: + +[https://github.com/reactioncommerce/example-storefront/blob/master/.circleci/config.yml#L101](https://github.com/reactioncommerce/example-storefront/blob/master/.circleci/config.yml#L101) + +### Set up ElasticSearch and Fluentd for Kubernetes pod logging + +Create IAM policy and add it to EKS worker node role: + + { + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "logs:DescribeLogGroups", + "logs:DescribeLogStreams", + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Resource": "*", + "Effect": "Allow" + } + ] + } + +Create ElasticSearch domain `staging-logs` and configure it to use Amazon Cognito for user authentication for Kibana. + +Download `fluentd.yml` from [https://eksworkshop.com/logging/deploy.files/fluentd.yml](https://eksworkshop.com/logging/deploy.files/fluentd.yml) , kustomize it, then install `fluentd` manifests for staging: + + $ kustomize build bootstrap/fluentd/overlays/staging | kubectl create -f - diff --git a/code/aws/lambda-function/README.md b/code/aws/lambda-function/README.md new file mode 100644 index 0000000..8452705 --- /dev/null +++ b/code/aws/lambda-function/README.md @@ -0,0 +1,5 @@ +# References for Lambda Functions + + +- [JavaScript Cloudwatch logging test](https://github.com/go-outside-labs/Curated_Cloud_and_Orchestration/blob/master/lambda_function_examples/monitoring_example). +- [Python functionby SQS and responding to a SNS topic](https://github.com/go-outside-labs/Curated_Cloud_and_Orchestration/blob/master/lambda_function_examples/sqs-sns_example). diff --git a/code/aws/lambda-function/monitoring_example/.gitignore b/code/aws/lambda-function/monitoring_example/.gitignore new file mode 100755 index 0000000..1102a55 --- /dev/null +++ b/code/aws/lambda-function/monitoring_example/.gitignore @@ -0,0 +1,4 @@ +!.env.example +.env +node_modules +src/packaged-*.yaml diff --git a/code/aws/lambda-function/monitoring_example/Makefile b/code/aws/lambda-function/monitoring_example/Makefile new file mode 100755 index 0000000..8e4c5e3 --- /dev/null +++ b/code/aws/lambda-function/monitoring_example/Makefile @@ -0,0 +1,37 @@ +BASEDIR := "$(PWD)/src" + +CMD := docker run -it --rm \ + --volume "/var/run/docker.sock:/var/run/docker.sock" \ + --volume "$(PWD)/src:/var/opt" \ + --volume ~/.aws:/root/.aws \ + --env-file .env + +AWS_REGION := $(shell aws configure get region) + +.PHONY: help +help: + @$(CMD) + +.PHONY: build +build: + @$(CMD) build + +.PHONY: validate +validate: + @$(CMD) validate + +.PHONY: local +local: + @$(CMD) local invoke "MonitoringTest" \ + -t "/var/opt/template.yaml" \ + -e "/var/opt/event.json" \ + --profile "$(AWS_PROFILE)" \ + --docker-volume-basedir "$(BASEDIR)" + +.PHONY: logs +logs: + @$(CMD) logs -n MonitoringTest --stack-name ${STACK_NAME} -t --region ${AWS_REGION} --profile ${AWS_PROFILE} + +.PHONY: package +package: + @$(CMD) package --template-file ./template.yaml --output-template-file ./packaged-template.yaml --s3-bucket ${S3_BUCKET} --region ${AWS_REGION} --profile ${AWS_PROFILE} \ No newline at end of file diff --git a/code/aws/lambda-function/monitoring_example/README.md b/code/aws/lambda-function/monitoring_example/README.md new file mode 100755 index 0000000..ad165a9 --- /dev/null +++ b/code/aws/lambda-function/monitoring_example/README.md @@ -0,0 +1,9 @@ +### Monitoring Lambda Test Function + +Lambda function that looks at its argument and just succeeds or fails based on the input. + +This is used to test our monitoring graphs and alerting rules. + + +Install [aws-cli](https://aws.amazon.com/cli/) and [sam](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-logs.html). + diff --git a/code/aws/lambda-function/monitoring_example/env_example b/code/aws/lambda-function/monitoring_example/env_example new file mode 100755 index 0000000..a02d7f6 --- /dev/null +++ b/code/aws/lambda-function/monitoring_example/env_example @@ -0,0 +1,4 @@ +export AWS_REGION= +export S3_BUCKET= +export STACK_NAME= +export SERVICE_NAME= \ No newline at end of file diff --git a/code/aws/lambda-function/monitoring_example/package.json b/code/aws/lambda-function/monitoring_example/package.json new file mode 100755 index 0000000..ea65e10 --- /dev/null +++ b/code/aws/lambda-function/monitoring_example/package.json @@ -0,0 +1,10 @@ +{ + "name": "monitoring", + "version": "1.0.0", + "description": "Lambda function that looks at its argument and just succeeds or fails based on the input.", + "main": "index.js", + "scripts": { + "locally": "node src/index.js" + }, + "author": "Mia Stein" +} diff --git a/code/aws/lambda-function/monitoring_example/scripts/deploy-to-aws.sh b/code/aws/lambda-function/monitoring_example/scripts/deploy-to-aws.sh new file mode 100755 index 0000000..1df73ad --- /dev/null +++ b/code/aws/lambda-function/monitoring_example/scripts/deploy-to-aws.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -o errexit # always exit on error +set -o errtrace # trap errors in functions as well +set -o pipefail # don't ignore exit codes when piping output + + +IFS=$'\n\t' + +cd "$(dirname "${BASH_SOURCE[0]}")/.." + +source "$1" +make --makefile=./scripts/deploy.mk all diff --git a/code/aws/lambda-function/monitoring_example/scripts/deploy.mk b/code/aws/lambda-function/monitoring_example/scripts/deploy.mk new file mode 100755 index 0000000..1ba87dd --- /dev/null +++ b/code/aws/lambda-function/monitoring_example/scripts/deploy.mk @@ -0,0 +1,30 @@ +SAM_INPUT_TEMPLATE=./src/template.yaml +SAM_OUTPUT_TEMPLATE=./src/packaged-template.yaml + +.PHONY: validate-env +validate-env: + @./scripts/validate-env.sh \ + AWS_ACCESS_KEY_ID \ + AWS_REGION \ + AWS_SECRET_ACCESS_KEY \ + STACK_NAME \ + S3_BUCKET + +.PHONY: package +package: validate-env + @aws cloudformation package \ + --template-file ${SAM_INPUT_TEMPLATE} \ + --output-template-file ${SAM_OUTPUT_TEMPLATE} \ + --s3-bucket ${S3_BUCKET} \ + --region ${AWS_REGION} + +.PHONY: deploy +deploy: validate-env package + aws cloudformation deploy \ + --template-file ${SAM_OUTPUT_TEMPLATE} \ + --stack-name ${SAM_STACK_NAME} \ + --capabilities CAPABILITY_IAM \ + --region ${AWS_REGION} + +.PHONY: all +all: deploy \ No newline at end of file diff --git a/code/aws/lambda-function/monitoring_example/scripts/invoke.sh b/code/aws/lambda-function/monitoring_example/scripts/invoke.sh new file mode 100755 index 0000000..f4d5bd2 --- /dev/null +++ b/code/aws/lambda-function/monitoring_example/scripts/invoke.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +set -o errexit # always exit on error +set -o errtrace # trap errors in functions as well +set -o pipefail # don't ignore exit codes when piping output +set -o posix # more strict failures in subshells + +IFS=$'\n\t' + +##### RUNNING THE SCRIPT ##### +# export FUNCTION = &2 + missing+=("${var}") + fi +done +if [[ -n "${missing[*]}" ]]; then + exit 1 +fi \ No newline at end of file diff --git a/code/aws/lambda-function/monitoring_example/src/event.json b/code/aws/lambda-function/monitoring_example/src/event.json new file mode 100755 index 0000000..89eba21 --- /dev/null +++ b/code/aws/lambda-function/monitoring_example/src/event.json @@ -0,0 +1,3 @@ +{ + "forceError": true +} \ No newline at end of file diff --git a/code/aws/lambda-function/monitoring_example/src/index.js b/code/aws/lambda-function/monitoring_example/src/index.js new file mode 100755 index 0000000..00b6f18 --- /dev/null +++ b/code/aws/lambda-function/monitoring_example/src/index.js @@ -0,0 +1,22 @@ +/** + * @name monitoring + * @param {Object} context Lambda context object + * @return {Object} Object with a message and the original event + */ +exports.handler = async function(event) { + console.log("got event", event); + + if (event.forceError) { + throw new Error ("Intentional Error.") + } + + return { + message: "Work complete.", + event + }; +} + +if (require.main === module) { + const event = require("./event.json"); + exports.handler(event); +} \ No newline at end of file diff --git a/code/aws/lambda-function/monitoring_example/src/template.yaml b/code/aws/lambda-function/monitoring_example/src/template.yaml new file mode 100755 index 0000000..1ae91fc --- /dev/null +++ b/code/aws/lambda-function/monitoring_example/src/template.yaml @@ -0,0 +1,11 @@ +AWSTemplateFormatVersion: '2010-09-09' +Transform: 'AWS::Serverless-2016-10-31' +Description: Monitoring test lambda +Resources: + MonitoringTest: + Type: 'AWS::Serverless::Function' + Properties: + Handler: index.handler + Runtime: nodejs8.10 + Description: Monitoring test lambda + MemorySize: 256 diff --git a/code/aws/lambda-function/sqs-sns_example/.gitignore b/code/aws/lambda-function/sqs-sns_example/.gitignore new file mode 100644 index 0000000..894a44c --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/.gitignore @@ -0,0 +1,104 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ diff --git a/code/aws/lambda-function/sqs-sns_example/Makefile b/code/aws/lambda-function/sqs-sns_example/Makefile new file mode 100644 index 0000000..9614d0f --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/Makefile @@ -0,0 +1,40 @@ +install: + @python setup.py install && pip install -r requirements.txt + +build: + @/bin/bash ./scripts/build_package.sh + +clean: + @rm -rf /tmp/*.mp4 .coverage .tox build dist lib/*.pyc *.egg-info *pyc __pycache__/ ffmpeg* .pytest_cache /tmp/*mp4 /tmp/*jpg + +doctoc: + @doctoc README.md + +event: + @PYTHONPATH=$(pwd) ./scripts/create_test_event.py + +invoke: + @PYTHONPATH=$(pwd) lambda invoke -v + +lint: + @pep8 --exclude=build,venv,dist . && echo pep8: no linting errors + +fixlint: + @autopep8 --in-place *py lib/*py lib/handlers/*py lib/routes/*py tests/*py scripts/*py + +test: + @PYTHONPATH=$(pwd) py.test -v --color=yes --ignore=venv/ + +deploy: + @/bin/bash scripts/deploy_lambda.sh sandbox + +sbox: + @/bin/cp .env.sample_sandbox .env + +stag: + @/bin/cp .env.sample_staging .env + +prod: + @/bin/cp .env.sample_prod .env + +.PHONY: install clean doctoc lint invoke test build deploy event fixlint prod stag sbox diff --git a/code/aws/lambda-function/sqs-sns_example/README.md b/code/aws/lambda-function/sqs-sns_example/README.md new file mode 100644 index 0000000..cd4d846 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/README.md @@ -0,0 +1,289 @@ +# AWS Lambda Function to Trim Videos with FFMPEG + + +An AWS Lambda Function to trim videos served from an API endpoint, within two given NTP UTC timestamps. + +The stack also uses SQS, SNS, and S3 resources. + +---- + +# Table of Contents + + + + +- [Introduction](#introduction) +- [Running Locally](#running-locally) + - [Create a virtual environment](#create-a-virtual-environment) + - [Configure the environment](#configure-the-environment) + - [Changes when moving to another environment](#changes-when-moving-to-another-environment) + - [Install the dependencies](#install-the-dependencies) + - [Create Sample SQS events](#create-sample-sqs-events) + - [Running the App locally](#running-the-app-locally) +- [AWS Deploynment](#aws-deploynment) + - [Running the App as a Lambda Function](#running-the-app-as-a-lambda-function) + - [Testing the flow in AWS](#testing-the-flow-in-aws) + - [Debugging Errors](#debugging-errors) +- [Contributing](#contributing) + - [Committing new code](#committing-new-code) + + + +---- + +# Introduction + + +As we see in this diagram, this application performs the following steps: + +1. Receive a SQS event requesting a clip for a given time interval. An example of SQS event is the follow: + +```json + { + "Records": [ + { + "body": "{'clipId': '1111111111111', 'retryTimestamps': [], 'cameraId': '1111111111111', 'startTimestampInMs': 1537119363000, 'endTimestampInMs': 1537119423000}", + "receiptHandle": "MessageReceiptHandle", + "md5OfBody": "7b270e59b47ff90a553787216d55d91d", + "eventSourceARN": "arn:aws:sqs:us-west-1:123456789012:MyQueue", + "eventSource": "aws:sqs", + "awsRegion": "us-west-1", + "messageId": "19dd0b57-b21e-4ac1-bd88-01bbb068cb78", + "attributes": { + "ApproximateFirstReceiveTimestamp": "1523232000001", + "SenderId": "123456789012", + "ApproximateReceiveCount": "1", + "SentTimestamp": "1523232000000" + }, + "messageAttributes": { + "SentTimestamp": "1523232000000" + } + } + ] + } + ``` + + +2. Call the camera API with the endpoint `/cameras/cameraID` to retrieve a camera alias for the given camera id. + +3. Call the camera API with the endpoint `/cameras/recording/` to retrieve a list of cam rewind source files within the given time range. + +Which would generate this response: + +```json + [{ + "startDate":"2018-09-16T16:00:17.000Z", + "endDate":"2018-09-16T16:10:17.000Z", + "thumbLargeUrl":URL, + "recordingUrl":URL, + "thumbSmallUrl":URL, + "alias":"test" + }] +``` + +4. Retrieve the cam rewind source files from the origin S3 bucket (downloading them on disk). + +5. Use ffmpeg to trim and merge clips into a single clip and to create several thumbnails. + +6. If the clips are available, store them in the destination S3 bucket. + +7. If the clips are not available, send a SQS message back to the queue, similar to the initial SQS, with a visibility timeout. + +8. Call the camera API with endpoint `/cameras/clips` to update the information about the new clip and send a SNS message with the resulting metadata. An example of SNS message: + +```json + { + "clipId": "1111111111111", + "cameraId": "1111111111111", + "startTimestampInMs": 1534305591000, + "endTimestampInMs": 1534305611000, + "status": "CLIP_AVAILABLE", + "bucket": "s3-test", + "clip": { + "url": URL, + "key": "/test.mp4" + }, + "thumbnail": { + "url": "https://url_{size}.png", + "key": "/1111111111111/1111111111111{size}.png", + "sizes": [300, 640, 1500, 3000] + } + } +``` + + + +# Running Locally + +To add new features to this application, follow these steps: + +### Create a virtual environment + +```bash +virtualenv venv +source venv/bin/activate +``` + +### Configure the environment + +```bash +cp .env.sample_{env} .env +vim .env +``` + +Where these are the global variables in this file: + +| Constant | Definition | +| :----------------------|:-------------------------------------------------------------------------------------- | +| CLIP_DOWNLOAD_DEST | Where the clips are going to be downloaded in disk | +| TIMESTAMP_FORMAT | The timestamp we will be parsing from the clip name strings | +| OLD_FILE_FORMAT | False if the clips to be downloaded have seconds encoded in their names (new format) | +| SQS_RETRY_LIMIT | The limit, in seconds, of retries for CLIP PENDING (default: 15 minutes) | +| OUT_OF_RANGE_LIMIT | The limit, in seconds, of how back in the past clips can be retrieved (default: 3 days)| +| CAM_SERVICES_URL | The url where the camera services is available | +| CLIP_URL | The url where the clips are posted to, accordingly to the environment | +| RECORDINGS_URL | The url where the source recordings are retrieved. | +| THUMBNAIL_SIZES | List of values for which clip thumbnails need to be created | +| VIDEO_MAX_LEN | Maximum length allowed for a clip | +| S3_BUCKET_ORIGIN | AWS S3 bucket where the rewinds are available | +| S3_BUCKET_ORIGIN_DIR | AWS S3 'folder' where the rewinds are available | +| S3_BUCKET_DESTINATION | AWS S3 bucket where the clips will be upload to. | +| AWS_SNS_TOPIC | AWS SNS topic arn | +| AWS_SQS_QUEUE | AWS SQS queue arn | +| AWS_SQS_QUEUE_URL | AWS SQS queue url | +| SQS_TIMEOUT | AWS SQS invisibility timeout in seconds | + + + +#### Changes when moving to another environment + +Whenever you move among the environments (prod, sandbox, or staging), you need to change the following variables: + + +| Constant | Possible value | +| :---------------------- |:------------------------------------------------- | +| CLIP_URL | https://camclips.{ENV}.test.com | +| S3_BUCKET_DESTINATION | cameras-service-clips-cdn-{ENV} | +| AWS_SNS_TOPIC | arn:aws:sns:test_{ENV} | +| AWS_SQS_QUEUE | arn:aws:sqs:test-sqs-{ENV} | +| AWS_SQS_QUEUE_URL | https://sqs.test-sqs-{ENV} | + + +### Install the dependencies + +```bash +make install +``` + +### Create Sample SQS events + +To create an `event.json` file to be tested in this application, run: + +```bash +make event +``` + +Note that this command runs `./scripts/create_test_event.py` considering that the camera `test` is up. In case it is down, you should add a valid camera to the global variables section in that script. + +You can create testing `event.json` to test alternate flows such as: + +* **Clip pending** (i.e. when the requested clip is within 15 minutes to the SQS message timestamp but it was not created yet): + +```bash +python scripts/create_test_event.py -p +``` + +* **Clip not available** (i.e. when the requested clip is later than 15 minutes but within 3 days to the SQS message timestamp): + +```bash +python scripts/create_test_event.py -n +``` + +* **Clip out of range** (i.e. when the requested clip is later than 3 days to the SQS message timestamp): + +```bash + +python scripts/create_test_event.py -o +``` + + +### Running the App locally + +```bash +make invoke +``` + + + +----- + +# AWS Deploynment + +### Running the App as a Lambda Function + +This creates a `.zip` package and deploys it to the lambda function: + +```bash +make deploy +``` + +Check whether the package has the expected content: + +```bash +unzip -l dist/cameras-service-generate-clip.zip +``` + +Note that this adds FFMPEG's dependencies manually and the Python dependencies are built within a Dockerfile. + +### Testing the flow in AWS + +You can test this application flow in sandbox and/or staging environment following theses steps: + +1. In the [SQS dashboard](https://console.aws.amazon.com/sqs/home?region=us-west-1), select SQS queue and click `Queue action -> Send a Message`. +2. Type the value for `body`, similarly as the a message created in `event.json`. For instance: + +``` +{'clipId': '111111111111','retryTimestamps': [],'cameraId': '111111111111','startTimestampInMs': 1538412898000,'endTimestampInMs': 1538413498000} +``` + +1. This should trigger the lambda function and you should see the clips and thumbnails in the environment's S3 bucket in around 20-40 seconds. + +### Debugging Errors + +Errors will be logged in [CloudWatch](https://us-west-1.console.aws.amazon.com/cloudwatch/home?region=us-west-1#logs:). To make sense of logs in the CLI, you should install [saw](https://github.com/TylerBrock/saw). + +For instance, to check error logs for staging in the last hour: + +```bash +saw get /aws/lambda/clip-function -1h --filter error +``` + +---- + +# Contributing + +### Committing new code + +Run unit tests with: + +```bash +make test +``` + +When deploying scripts (or to report back to Github on PRs), we ensure that code follows style guidelines with: + +```bash +make lint +``` + +To fix lint errors, use: + +```bash +make fixlint +``` + +Update the documentation (README.md) with: + +```bash +make doctoc +``` diff --git a/code/aws/lambda-function/sqs-sns_example/config.yaml b/code/aws/lambda-function/sqs-sns_example/config.yaml new file mode 100644 index 0000000..901e604 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/config.yaml @@ -0,0 +1,4 @@ +region: us-west-1 +function_name: ffmpeg-trimmer +handler: service.handler +description: Lambda function for creating camera clips by two NTP UTC timestamps. diff --git a/code/aws/lambda-function/sqs-sns_example/create_clip_id.py b/code/aws/lambda-function/sqs-sns_example/create_clip_id.py new file mode 100755 index 0000000..b6bf293 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/create_clip_id.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python2 +# +# Create a clipId to be used in event.json + +import requests +import subprocess +import json +import time + + +def put_request(url, data): + """ + Send the PUT request to create the id, returning + the clipId string. + """ + + r = requests.post(url, json=data) + print('--------------------------------------------------------') + print('Request to {}'.format(url)) + print('Data sent: {}'.format(data)) + print('Status code: {}'.format(r.status_code)) + + if r.status_code == 200: + print(r.json()) + return r.json()['clipId'] + + else: + return False + + +def create_timestamps(): + """ + Create a timestamp to send in the PUT request. + """ + now = int(time.time()*1000) + sent_ts = str(now) + begin_ts = str(now - 600000) + end_ts = str(now - 600000 + 180000) + + return sent_ts, begin_ts, end_ts + + +def create_data(cam_id, url, begin_ts, end_ts): + """ + Create the data that need to be sent to the + PUT request. + """ + data = { + "cameraId": cam_id, + "startTimestampInMs": begin_ts, + "endTimestampInMs": end_ts + } + + return data + + +def main(url, cam_id): + + sent_ts, begin_ts, end_ts = create_timestamps() + data = create_data(cam_id, url, begin_ts, end_ts) + clip_id = put_request(url, data) + + print('clipId to be added to event.json: {}'.format(clip_id)) + print('send ts, start, end: {0} {1} {2}'.format( + sent_ts, begin_ts, end_ts)) + diff --git a/code/aws/lambda-function/sqs-sns_example/error.sh b/code/aws/lambda-function/sqs-sns_example/error.sh new file mode 100755 index 0000000..e927391 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/error.sh @@ -0,0 +1 @@ +saw get /aws/lambda/ffmpeg-clip --start -24h --filter error diff --git a/code/aws/lambda-function/sqs-sns_example/event.json b/code/aws/lambda-function/sqs-sns_example/event.json new file mode 100644 index 0000000..2bd4207 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/event.json @@ -0,0 +1,20 @@ +{ + "Records": [ + { + "attributes": { + "ApproximateFirstReceiveTimestamp": "XXXXXXXXXXXXXXXXXXX", + "ApproximateReceiveCount": "1", + "SenderId": "XXXXXXXXXXXXXXXXXXX", + "SentTimestamp": "1543318636000" + }, + "awsRegion": "us-west-1", + "body": "{'clipId': '5bc67ace8e9c352780437d2c','retryTimestamps': [],'cameraId': '582356e81ee905c72145623e','startTimestampInMs': '1543318156000','endTimestampInMs': '1543318636000'}", + "eventSource": "aws:sqs", + "eventSourceARN": "XXXXXXXXXXXXXXXXXXX", + "md5OfBody": "XXXXXXXXXXXXXXXXXXX", + "messageAttributes": {}, + "messageId": "XXXXXXXXXXXXXXXXXXX", + "receiptHandle": "XXXXXXXXXXXXXXXXXXX" + } + ] +} \ No newline at end of file diff --git a/code/aws/lambda-function/sqs-sns_example/requirements.txt b/code/aws/lambda-function/sqs-sns_example/requirements.txt new file mode 100644 index 0000000..874bbe6 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/requirements.txt @@ -0,0 +1,31 @@ +boto3==1.4.4 +botocore==1.5.62 +certifi==2023.7.22 +chardet==3.0.4 +click==6.6 +docutils==0.12 +futures==3.2.0 +idna==2.7 +jmespath==0.9.0 +pyaml==15.8.2 +python-dateutil==2.5.3 +python-dotenv==0.9.1 +python-lambda==3.2.2 +PyYAML==5.4 +requests==2.31.0 +s3transfer==0.1.13 +six==1.10.0 +urllib3==1.26.5 +autopep8==1.4 +appdirs==1.4.3 +packaging==16.8 +pep8==1.7.0 +py==1.11.0 +pyaml==15.8.2 +pyparsing==2.2.0 +pytest==3.0.7 +virtualenv==15.0.3 +jmespath==0.9.0 +mock==2.0.0 +requests-mock==1.5.2 +coverage==4.5.1 diff --git a/code/aws/lambda-function/sqs-sns_example/scripts/.dockerignore b/code/aws/lambda-function/sqs-sns_example/scripts/.dockerignore new file mode 100644 index 0000000..0d606ac --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/scripts/.dockerignore @@ -0,0 +1,4 @@ +packages +lib +app +Dockerfile.build diff --git a/code/aws/lambda-function/sqs-sns_example/scripts/Dockerfile.build b/code/aws/lambda-function/sqs-sns_example/scripts/Dockerfile.build new file mode 100644 index 0000000..e2e4c5b --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/scripts/Dockerfile.build @@ -0,0 +1,9 @@ +FROM amazonlinux:1 + +WORKDIR /opt/app + +ADD requirements.txt . + +RUN \ + yum install -y python27-pip && \ + pip install --target=/opt/app -r requirements.txt diff --git a/code/aws/lambda-function/sqs-sns_example/scripts/build_package.sh b/code/aws/lambda-function/sqs-sns_example/scripts/build_package.sh new file mode 100755 index 0000000..ce4bd5a --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/scripts/build_package.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash +# This script adds additional dependences that are need for the lambda function package. + +set -x + +PACKAGE_NAME=cameras-clip.zip + +# If S3_BUCKET env var isn't set, default it +if [ -z "${S3_BUCKET}" ]; then + S3_BUCKET=s3-test +fi + +# Set dist env and create initial zip file +ORIGIN=$pwd +rm -rf dist && mkdir dist +lambda build --local-package . && mv dist/*.zip dist/$PACKAGE_NAME +cd dist/ + +## Fetch & add binary for FFMPEG +aws s3 cp "s3://${S3_BUCKET}/ffmpeg/ffmpeg-release-64bit-static.tar.xz" . && tar xf ffmpeg-release-64bit-static.tar.xz +zip -j -r9 $PACKAGE_NAME ffmpeg-*-64bit-static/ffmpeg +zip -j -r9 $PACKAGE_NAME ffmpeg-*-64bit-static/ffprobe + +# Add this App's source code +cp -r ../lib . +zip -r9 $PACKAGE_NAME lib + +# Add dependencies from pip +mkdir packages +cp ../scripts/Dockerfile.build Dockerfile +cp ../scripts/.dockerignore .dockerignore +cp ../requirements.txt . +docker build --tag pillow-build . +CTNHASH="$(docker create pillow-build)" +docker cp "${CTNHASH}":/opt/app/ . +cp -rf app/* packages/ + +# Package everything +cd packages +zip -ur9 ../$PACKAGE_NAME * +cd .. + +# Clean up +#rm -rf ffmpeg-release-64bit-static.tar.xz ffmpeg-*-64bit-static/ packages/ lib/ +docker rm ${CTNHASH} +cd $ORIGIN diff --git a/code/aws/lambda-function/sqs-sns_example/scripts/create_test_event.py b/code/aws/lambda-function/sqs-sns_example/scripts/create_test_event.py new file mode 100755 index 0000000..e9b26b5 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/scripts/create_test_event.py @@ -0,0 +1,177 @@ +#!/usr/bin/env python2 +# +# For integration tests, different SQS events are needed. +# This script generates events for alternate flows. +# Global variables are defined in main(). + +import time +import json +import argparse +import datetime +import calendar +import datetime + + +def time_to_epoch(timestamp, timestamp_format): + """ + Given a timestamp string in seconds, return + the epoch timestamp string, in milliseconds. + """ + date = time.strptime(str(timestamp), timestamp_format) + return str(calendar.timegm(date)) + '000' + + +def generate_delta_time(delta, timestamp_format, now, days): + """ + Given a clip duration delta, and how many days back + from today, return a begin and end timestamp for the event. + """ + end = now - datetime.timedelta(days=days, minutes=0) + begin = now - datetime.timedelta(days=days, minutes=delta) + return begin.strftime(timestamp_format), end.strftime(timestamp_format) + + +def get_current_local_time(timestamp): + """ + Return the current time in a datetime object, a + human-readable string, and an epoch time integer. + """ + now = datetime.datetime.now() + human_now = now.strftime(timestamp) + epoch_now = time_to_epoch(human_now, timestamp) + return now, human_now, epoch_now + + +def create_event(begin, end, event_file, cam_id, epoch_now): + """ + Create an event.json SQS message file for + tests with the new timestamps and save it to the + destination in event_file. + """ + data = {'Records': [ + { + "md5OfBody": "XXXXXXXXXXXXXXXXXXX", + "receiptHandle": "XXXXXXXXXXXXXXXXXXX", + "body": ("{'clipId': '1111111111111111'," + "'retryTimestamps': []," + "'cameraId': '" + str(cam_id) + "'," + "'startTimestampInMs': '" + str(begin) + "'," + "'endTimestampInMs': '" + str(end) + "'}"), + "eventSourceARN": "XXXXXXXXXXXXXXXXXXX", + "eventSource": "aws:sqs", + "awsRegion": "us-west-1", + "messageId": "XXXXXXXXXXXXXXXXXXX", + "attributes": { + "ApproximateFirstReceiveTimestamp": "XXXXXXXXXXXXXXXXXXX", + "SenderId": "XXXXXXXXXXXXXXXXXXX", + "ApproximateReceiveCount": "1", + "SentTimestamp": epoch_now + }, + "messageAttributes": {} + } + ] + } + + with open(event_file, 'w') as f: + json.dump(data, f, separators=(',', ': '), sort_keys=True, indent=2) + + return data['Records'][0]['body'] + + +def main(): + + # Global variables. + EVENT_FILE = 'event.json' + TIMESTAMP_FORMAT = '%d-%m-%Y %H:%M:%S' + DAYS_BEFORE_PENDING = 0 + DAYS_BEFORE_AVAILABLE = 0 + DAYS_BEFORE_NOT_AVAILABLE = 2 + DAYS_BEFORE_OUT_OF_RANGE = 8 + + # Camera IDs used for tests, they should be checked whether + # they are currently down or not. For instance: + CAM_DOWN = '1111111111111111' + CAM_UP = '1111111111111111' + + # This should not be more than 5 minutes (or the rewind clip generator + # app won't accent the event). + SESSION_DURATION_OK = 3 + SESSION_DURATION_CLIP_TO_LONG = 8 + + # Get the time of event to be generated. + parser = argparse.ArgumentParser( + description='Clip duration you are looking for (in mins):') + parser.add_argument('-a', '--clip_available', + action='store_true', help='Event for <15 min') + parser.add_argument('-p', '--clip_pending', + action='store_true', help='Event cam down <15 min') + parser.add_argument('-o', '--clip_out_of_range', + action='store_true', help='Event for >3 days') + parser.add_argument('-n', '--clip_not_available', + action='store_true', help='Event cam down >3 days') + parser.add_argument('-t', '--clip_too_long', + action='store_true', help='Clips > 5 min') + args = parser.parse_args() + + # Define what type of event we want. + if args.clip_pending: + days_before = DAYS_BEFORE_PENDING + cam_id = CAM_DOWN + session_duration = SESSION_DURATION_OK + + elif args.clip_out_of_range: + days_before = DAYS_BEFORE_OUT_OF_RANGE + cam_id = CAM_UP + session_duration = SESSION_DURATION_OK + + elif args.clip_not_available: + days_before = DAYS_BEFORE_NOT_AVAILABLE + cam_id = CAM_DOWN + session_duration = SESSION_DURATION_OK + + elif args.clip_too_long: + days_before = DAYS_BEFORE_AVAILABLE + cam_id = CAM_UP + session_duration = SESSION_DURATION_CLIP_TO_LONG + + else: + # Defaults to CLIP_AVAILABLE event. + days_before = DAYS_BEFORE_AVAILABLE + cam_id = CAM_UP + session_duration = SESSION_DURATION_OK + + # Get current time in human string and epoch int. + now, human_now, epoch_now = get_current_local_time(TIMESTAMP_FORMAT) + + # Generates a random begin and end time within the last days. + begin, end = generate_delta_time( + session_duration, TIMESTAMP_FORMAT, now, days_before) + + # Convert these times to epoch timestamp and human time. + end_epoch = time_to_epoch(end, TIMESTAMP_FORMAT) + begin_epoch = time_to_epoch(begin, TIMESTAMP_FORMAT) + + if begin_epoch and end_epoch: + + # Creates the JSON file for the event. + body = create_event(begin_epoch, end_epoch, + EVENT_FILE, cam_id, epoch_now) + + print('-----------------------------------------------------') + print('Event test saved at {}'.format(EVENT_FILE)) + print('Camera id is {}'.format(cam_id)) + print('Timestamp for {0} days ago, delta time is {1} mins').format( + days_before, session_duration) + print('Begin: {0} -> End: {1}'.format(begin_epoch, end_epoch)) + print('Begin: {0} -> End: {1}'.format(begin, end)) + print('Time: {}'.format(human_now)) + print('Body: ') + print(body) + print('-----------------------------------------------------') + + else: + print('Could not create timestamps for {}'.format(duration)) + + +if __name__ == '__main__': + main() diff --git a/code/aws/lambda-function/sqs-sns_example/scripts/deploy_lambda.sh b/code/aws/lambda-function/sqs-sns_example/scripts/deploy_lambda.sh new file mode 100755 index 0000000..3b36688 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/scripts/deploy_lambda.sh @@ -0,0 +1,58 @@ +#!/bin/bash -ex +# Script that deploy this app to the AWS lambda function, similarly to Jenkins. + +USAGE=$(cat <<-END +Usage: + deploy_lambda.sh +Examples: + deploy_lambda.sh staging +END +) + +if [[ "$1" = "-h" ]]; then + echo "${USAGE}" + exit +fi + +if [[ -n "$1" ]]; then + SERVER_GROUP=$1 +else + echo '[ERROR] You must specify the env: production, sandbox, staging' + echo + echo "${USAGE}" + exit 1 +fi + +BUILD_ENVIRONMENT=$1 +APP_NAME=cameras-service-generate-clip +export AWS_DEFAULT_REGION="us-west-1" +export AWS_REGION="us-west-1" + +if [[ "${BUILD_ENVIRONMENT}" == "sandbox" ]]; then + S3_BUCKET=sl-artifacts-dev +else + S3_BUCKET="sl-artifacts-${BUILD_ENVIRONMENT}" +fi + +S3_PREFIX="lambda-functions/${APP_NAME}" +S3_BUNDLE_KEY="sl-${APP_NAME}.zip" +S3_TAGGED_BUNDLE_KEY="sl-${APP_NAME}-${BUILD_TAG}.zip" + +make clean +make install +make lint +make build + +aws \ + s3 cp "dist/${S3_BUNDLE_KEY}" "s3://${S3_BUCKET}/${S3_PREFIX}/${S3_BUNDLE_KEY}" + +aws \ + s3 cp "s3://${S3_BUCKET}/${S3_PREFIX}/${S3_BUNDLE_KEY}" "s3://${S3_BUCKET}/${S3_PREFIX}/${S3_TAGGED_BUNDLE_KEY}" + +aws \ + lambda update-function-code \ + --function-name "sl-${APP_NAME}-${BUILD_ENVIRONMENT}" \ + --s3-bucket "${S3_BUCKET}" \ + --s3-key "${S3_PREFIX}/${S3_TAGGED_BUNDLE_KEY}" + +echo "build description:${APP_NAME}|${BUILD_ENVIRONMENT}|${BUILD_TAG}|" diff --git a/code/aws/lambda-function/sqs-sns_example/scripts/get_recording_list.sh b/code/aws/lambda-function/sqs-sns_example/scripts/get_recording_list.sh new file mode 100755 index 0000000..6407c56 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/scripts/get_recording_list.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +curl -i URL?startDate=$(date -v '-1H' +%s)000&endDate=$(date +%s)000 diff --git a/code/aws/lambda-function/sqs-sns_example/service.py b/code/aws/lambda-function/sqs-sns_example/service.py new file mode 100644 index 0000000..5b035e7 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/service.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +""" +Service handler module for AWS Lambda function. 'HANDLERS' constant dict is +used to map route requests to correct handler. +""" + +import logging +from lib.config import LOG_LEVEL +from lib.routes import root + +if LOG_LEVEL in ('CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG', 'NOTSET'): + level = logging.getLevelName(LOG_LEVEL) +else: + level = logging.INFO + +logging.basicConfig(level=level) +handler = root.handler diff --git a/code/aws/lambda-function/sqs-sns_example/setup.py b/code/aws/lambda-function/sqs-sns_example/setup.py new file mode 100644 index 0000000..88ba173 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/setup.py @@ -0,0 +1,7 @@ +from distutils.core import setup + +setup( + name='rewind_clip_generator', + version='1.0', + packages=['lib', 'lib.routes', 'lib.handlers'], +) diff --git a/code/aws/lambda-function/sqs-sns_example/tests/__init__.py b/code/aws/lambda-function/sqs-sns_example/tests/__init__.py new file mode 100644 index 0000000..40a96af --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/tests/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/code/aws/lambda-function/sqs-sns_example/tests/fixtures/SNS_contract.json b/code/aws/lambda-function/sqs-sns_example/tests/fixtures/SNS_contract.json new file mode 100644 index 0000000..cb36ef0 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/tests/fixtures/SNS_contract.json @@ -0,0 +1,19 @@ + +{ + "clipId": "11111111111", + "cameraId": "11111111111", + "startTimestampInMs": 1534305591000, + "endTimestampInMs": 1534305611000, + "status": "CLIP_AVAILABLE", + "bucket": "sl-cam-clip-archive-prod", + "clip": { + "url": "https://test.mp4", + "key": "/583499c4e411dc743a5d5296/11111111111.mp4" + }, + "thumbnail": { + "url": "https://test_{size}.png", + "key": "/11111111111/1111111111_{size}.png", + "sizes": [300, 640, 1500, 3000] + } +} + diff --git a/code/aws/lambda-function/sqs-sns_example/tests/fixtures/SQS_contract.json b/code/aws/lambda-function/sqs-sns_example/tests/fixtures/SQS_contract.json new file mode 100644 index 0000000..e86da1f --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/tests/fixtures/SQS_contract.json @@ -0,0 +1,24 @@ +{ + "Records": [ + { + "body": "{'clipId': '507f191e810c19729de860ea', 'retryTimestamps': [], 'cameraId': '583499c4e411dc743a5d5296', 'startTimestampInMs': 1537119363000, 'endTimestampInMs': 1537119423000}", + "receiptHandle": "MessageReceiptHandle", + "md5OfBody": "7b270e59b47ff90a553787216d55d91d", + "eventSourceARN": "arn:aws:sqs:us-west-1:123456789012:MyQueue", + "eventSource": "aws:sqs", + "awsRegion": "us-west-1", + "messageId": "19dd0b57-b21e-4ac1-bd88-01bbb068cb78", + "attributes": { + "ApproximateFirstReceiveTimestamp": "1523232000001", + "SenderId": "123456789012", + "ApproximateReceiveCount": "1", + "SentTimestamp": "1523232000000" + }, + "messageAttributes": { + "SentTimestamp": "1523232000000" + } + } + ] +} + + diff --git a/code/aws/lambda-function/sqs-sns_example/tests/fixtures/recording_contract.json b/code/aws/lambda-function/sqs-sns_example/tests/fixtures/recording_contract.json new file mode 100644 index 0000000..7b98605 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/tests/fixtures/recording_contract.json @@ -0,0 +1,10 @@ +[ + { + "startDate":"2018-08-25T19:20:16.000Z", + "endDate":"2018-08-25T19:30:16.000Z", + "thumbLargeUrl":"https://test_full.jpg", + "recordingUrl":"https://test.mp4", + "thumbSmallUrl":"https://test_small.jpg", + "alias":"test" + } +] diff --git a/code/aws/lambda-function/sqs-sns_example/tests/routes/.gitkeep b/code/aws/lambda-function/sqs-sns_example/tests/routes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/code/aws/lambda-function/sqs-sns_example/tests/routes/test_root.py b/code/aws/lambda-function/sqs-sns_example/tests/routes/test_root.py new file mode 100644 index 0000000..e5f2fe3 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/tests/routes/test_root.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +""" Test Root service handler module for AWS Lambda function. """ + +import os +import json +import pytest + +from lib.routes import root + +fixtures_path = os.path.join(os.path.dirname(__file__), '..', 'fixtures') + + +@pytest.fixture +def sns_event_record(): + sns_event_record_path = os.path.join(fixtures_path, 'SNS_contract.json') + with open(sns_event_record_path, 'r') as sns_event_record_json: + return json.load(sns_event_record_json) + + +@pytest.fixture +def context(): + return {} + + +class TestHandler(): + def test_type_error_for_bad_params(self, context): + try: + root.handler('', context) + except TypeError as e: + pass + else: + self.fail('ExpectedException not raised') diff --git a/code/aws/lambda-function/sqs-sns_example/tests/test_aws_wrapper.py b/code/aws/lambda-function/sqs-sns_example/tests/test_aws_wrapper.py new file mode 100644 index 0000000..831989f --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/tests/test_aws_wrapper.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +""" AWS Wrapper Test Module """ + +import unittest +import mock + +import lib.aws_wrapper + + +class TestAwsWrapper(unittest.TestCase): + + def setUp(self): + self.filename = 'filename_test' + self.destination = 'destination_test' + self.clip_metadata = {'test': 'test'} + self.aw = lib.aws_wrapper.AwsWrapper() + + @mock.patch('lib.aws_wrapper.boto3') + def test_download_clip_boto(self, boto3): + self.aw.download_video(self.filename, self.destination) + boto3.resource.assert_called_with('s3') + + @mock.patch('lib.aws_wrapper.boto3') + def test_upload_clip_boto(self, boto3): + self.aw.upload_asset(self.filename, self.destination) + boto3.client.assert_called_with('s3') + + @mock.patch('lib.aws_wrapper.boto3') + def test_send_sns_msg_boto(self, boto3): + aw = lib.aws_wrapper.AwsWrapper() + aw.send_sns_msg(self.clip_metadata) + boto3.client.assert_called_with('sns') diff --git a/code/aws/lambda-function/sqs-sns_example/tests/test_cam_wrapper.py b/code/aws/lambda-function/sqs-sns_example/tests/test_cam_wrapper.py new file mode 100644 index 0000000..a4ebc53 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/tests/test_cam_wrapper.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +""" Cam Wrapper Test Module """ + +import mock +import unittest +import pytest + +import lib.cam_wrapper +import lib.utils + + +class TestCamWrapper(unittest.TestCase): + + def setUp(self): + self.session_start_ms = '1535223360000' + self.session_end_ms = '1535224400000' + self.cameraId = '1111111111111111' + self.clipId = '1111111111111111' + + self.metadata_test_clip_key = '/{0}/{1}.mp4'.format( + self.cameraId, self.clipId) + self.metadata_test_tb_key = '/{0}/{1}'.format( + self.cameraId, self.clipId) + '_{size}.jpg' + self.cw = lib.cam_wrapper.CamWrapper( + self.session_start_ms, self.session_end_ms, + self.cameraId, self.clipId) + + @mock.patch('lib.utils.get_request') + def test_get_alias(self, mocked_method): + self.cw .get_alias() + self.assertTrue(mocked_method.called) + + def test_metadata(self): + self.assertEqual( + self.cw .metadata['clip']['key'], self.metadata_test_clip_key) + self.assertEqual( + self.cw .metadata['thumbnail']['key'], self.metadata_test_tb_key) + + @mock.patch('lib.utils.get_request') + def test_get_clip_names(self, mocked_method): + alias = self.cw .get_clip_names() + self.assertTrue(mocked_method.called) + + @mock.patch('lib.utils.put_request') + def test_put_clip_metadata(self, mocked_method): + alias = self.cw .put_clip_metadata() + self.assertTrue(mocked_method.called) + + def test_update_clip_status(self): + test_status = 'test' + self.cw.update_clip_status(test_status) + self.assertEqual(self.cw.metadata['status'], test_status) diff --git a/code/aws/lambda-function/sqs-sns_example/tests/test_ffmpeg_wrapper.py b/code/aws/lambda-function/sqs-sns_example/tests/test_ffmpeg_wrapper.py new file mode 100644 index 0000000..2699648 --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/tests/test_ffmpeg_wrapper.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +""" Ffmpeg Wrapper Test Module """ + +import lib.ffmpeg_wrapper +import unittest + + +class TestFfmpegWrapper(unittest.TestCase): + + def setUp(self): + self.epoch_video = 1.535884819e+12 + self.crop_start = '03:39.000' + self.crop_end = '13:01.000' + + self.session_start_ms = '1535884600000' + self.session_end_ms = '1535885600000' + self.alias = 'test' + self.clipId = '1111111111111111' + self.clips = [] + self.fw = lib.ffmpeg_wrapper.FfmpegWrapper( + self.alias, self.clips, + self.session_start_ms, + self.session_end_ms, + self.clipId) + + def test_calculate_crop_time(self): + crop_start, crop_end = self.fw.calculate_trim_time(self.epoch_video) + print crop_start, crop_end, self.crop_end, self.crop_start + self.assertEqual(crop_end, self.crop_end) + self.assertEqual(crop_start, self.crop_start) diff --git a/code/aws/lambda-function/sqs-sns_example/tests/test_utils.py b/code/aws/lambda-function/sqs-sns_example/tests/test_utils.py new file mode 100644 index 0000000..dac7c5a --- /dev/null +++ b/code/aws/lambda-function/sqs-sns_example/tests/test_utils.py @@ -0,0 +1,80 @@ +# -*- coding: utf-8 -*- +""" Utils Test Module """ + +import os +import json +import pytest +import unittest + +import mock +import requests +import requests_mock +import lib.utils + + +fixtures_path = os.path.join(os.path.dirname(__file__), 'fixtures') + + +@pytest.fixture +def get_fixture(fixture_json): + get_sqs_event = os.path.join(fixtures_path, fixture_json) + with open(get_sqs_event, 'r') as f: + return json.load(f) + + +class TestClipGeneratorTrigger(unittest.TestCase): + + def setUp(self): + self.domain = 'http://test.com' + self.endpoint = 'filetest.mp4' + self.file_url = 'http://test.com/filetest.mp4' + self.clipname = 'camtest.20180815T140019.mp4' + self.epoch_in_ms = 1535224400000 + self.timestamp = '20180825T191320' + self.timestamp_format = '%Y%m%dT%H%M%S' + self.msecs = 1807 + self.resp = {'test1': 'test2'} + + def test_url_join(self): + self.assertEqual('http://test.com/filetest.mp4', + lib.utils.url_join(self.domain, + self.endpoint), msg=None) + + def test_get_request(self): + with requests_mock.Mocker() as m: + m.get(self.file_url, json=self.resp) + self.assertTrue(lib.utils.get_request(self.domain, self.endpoint)) + + def test_get_basename_str(self): + self.assertEqual('filetest.mp4', lib.utils.get_basename_str( + self.file_url), msg=None) + + def test_get_timestamp_str(self): + self.assertEqual('20180815T140019000', + lib.utils.get_timestamp_str(self.clipname), msg=None) + + def test_get_location_str(self): + self.assertEqual('hbpiernscam', lib.utils.get_location_str( + self.clipname), msg=None) + + def test_timestamp_to_epoch(self): + self.assertEqual(self.epoch_in_ms, lib.utils.timestamp_to_epoch( + self.timestamp, self.timestamp_format), msg=None) + + def test_epoch_to_timestamp(self): + self.assertEqual(self.timestamp, lib.utils.epoch_to_timestamp( + self.epoch_in_ms, self.timestamp_format), msg=None) + + def test_humanize_delta_time(self): + self.assertEqual( + '00:01.807', lib.utils.humanize_delta_time(self.msecs), msg=None) + + @mock.patch('lib.utils.os.remove') + def test_remove_file(self, mocked_remove): + lib.utils.remove_file(self.clipname) + self.assertTrue(mocked_remove.called) + + @mock.patch('lib.utils.subprocess.check_output') + def test_run_subprocess(self, mocked_subprocess): + lib.utils.run_subprocess(['ls'], 'ok', 'err') + self.assertTrue(mocked_subprocess.called) diff --git a/code/chef/README.md b/code/chef/README.md new file mode 100755 index 0000000..2e047ba --- /dev/null +++ b/code/chef/README.md @@ -0,0 +1,23 @@ +# resources on chef + +
+ +## Suricata Chef Cookbook + +This cookbook installs and configures Suricata. + +## Usage + +### suricata::default + +* include `suricata` in your node's `run_list`: + +```json +{ + "name":"my_node", + "run_list": [ + "recipe[suricata]" + ] +} +``` + diff --git a/code/chef/attributes/default.rb b/code/chef/attributes/default.rb new file mode 100755 index 0000000..4829fad --- /dev/null +++ b/code/chef/attributes/default.rb @@ -0,0 +1 @@ +default['suricata']['version'] = '3.1' diff --git a/code/chef/files/default/classification.config b/code/chef/files/default/classification.config new file mode 100755 index 0000000..ebe91ca --- /dev/null +++ b/code/chef/files/default/classification.config @@ -0,0 +1,68 @@ +# $Id$ +# classification.config taken from Snort 2.8.5.3. Snort is governed by the GPLv2 +# +# The following includes information for prioritizing rules +# +# Each classification includes a shortname, a description, and a default +# priority for that classification. +# +# This allows alerts to be classified and prioritized. You can specify +# what priority each classification has. Any rule can override the default +# priority for that rule. +# +# Here are a few example rules: +# +# alert TCP any any -> any 80 (msg: "EXPLOIT ntpdx overflow"; +# dsize: > 128; classtype:attempted-admin; priority:10; +# +# alert TCP any any -> any 25 (msg:"SMTP expn root"; flags:A+; \ +# content:"expn root"; nocase; classtype:attempted-recon;) +# +# The first rule will set its type to "attempted-admin" and override +# the default priority for that type to 10. +# +# The second rule set its type to "attempted-recon" and set its +# priority to the default for that type. +# + +# +# config classification:shortname,short description,priority +# + +config classification: not-suspicious,Not Suspicious Traffic,3 +config classification: unknown,Unknown Traffic,3 +config classification: bad-unknown,Potentially Bad Traffic, 2 +config classification: attempted-recon,Attempted Information Leak,2 +config classification: successful-recon-limited,Information Leak,2 +config classification: successful-recon-largescale,Large Scale Information Leak,2 +config classification: attempted-dos,Attempted Denial of Service,2 +config classification: successful-dos,Denial of Service,2 +config classification: attempted-user,Attempted User Privilege Gain,1 +config classification: unsuccessful-user,Unsuccessful User Privilege Gain,1 +config classification: successful-user,Successful User Privilege Gain,1 +config classification: attempted-admin,Attempted Administrator Privilege Gain,1 +config classification: successful-admin,Successful Administrator Privilege Gain,1 + + +# NEW CLASSIFICATIONS +config classification: rpc-portmap-decode,Decode of an RPC Query,2 +config classification: shellcode-detect,Executable code was detected,1 +config classification: string-detect,A suspicious string was detected,3 +config classification: suspicious-filename-detect,A suspicious filename was detected,2 +config classification: suspicious-login,An attempted login using a suspicious username was detected,2 +config classification: system-call-detect,A system call was detected,2 +config classification: tcp-connection,A TCP connection was detected,4 +config classification: trojan-activity,A Network Trojan was detected, 1 +config classification: unusual-client-port-connection,A client was using an unusual port,2 +config classification: network-scan,Detection of a Network Scan,3 +config classification: denial-of-service,Detection of a Denial of Service Attack,2 +config classification: non-standard-protocol,Detection of a non-standard protocol or event,2 +config classification: protocol-command-decode,Generic Protocol Command Decode,3 +config classification: web-application-activity,access to a potentially vulnerable web application,2 +config classification: web-application-attack,Web Application Attack,1 +config classification: misc-activity,Misc activity,3 +config classification: misc-attack,Misc Attack,2 +config classification: icmp-event,Generic ICMP event,3 +config classification: kickass-porn,SCORE! Get the lotion!,1 +config classification: policy-violation,Potential Corporate Privacy Violation,1 +config classification: default-login-attempt,Attempt to login by a default username and password,2 diff --git a/code/chef/files/default/reference.config b/code/chef/files/default/reference.config new file mode 100755 index 0000000..2148ffa --- /dev/null +++ b/code/chef/files/default/reference.config @@ -0,0 +1,25 @@ +# config reference: system URL + +config reference: bugtraq http://www.securityfocus.com/bid/ +config reference: bid http://www.securityfocus.com/bid/ +config reference: cve http://cve.mitre.org/cgi-bin/cvename.cgi?name= +config reference: cve http://cvedetails.com/cve/ +config reference: secunia http://www.secunia.com/advisories/ +config reference: arachNIDS http://www.whitehats.com/info/IDS + +config reference: McAfee http://vil.nai.com/vil/content/v_ +config reference: nessus http://cgi.nessus.org/plugins/dump.php3?id= +config reference: url http:// +config reference: et http://doc.emergingthreats.net/ +config reference: etpro http://doc.emergingthreatspro.com/ +config reference: telus http:// +config reference: osvdb http://osvdb.org/show/osvdb/ +config reference: threatexpert http://www.threatexpert.com/report.aspx?md5= +config reference: md5 http://www.threatexpert.com/report.aspx?md5= +config reference: exploitdb http://www.exploit-db.com/exploits/ +config reference: openpacket https://www.openpacket.org/capture/grab/ +config reference: securitytracker http://securitytracker.com/id? +config reference: secunia http://secunia.com/advisories/ +config reference: xforce http://xforce.iss.net/xforce/xfdb/ +config reference: msft http://technet.microsoft.com/security/bulletin/ + diff --git a/code/chef/files/default/suricata_logrotate b/code/chef/files/default/suricata_logrotate new file mode 100755 index 0000000..ddca6e1 --- /dev/null +++ b/code/chef/files/default/suricata_logrotate @@ -0,0 +1,33 @@ +/var/log/suricata/*.log +{ + weekly + missingok + create + sharedscripts + postrotate + /bin/kill -HUP $(cat /var/run/suricata.pid) + endscript + delaycompress + copytruncate + compresscmd /usr/bin/pigz + compress + dateext + notifempty +} + +/var/log/suricata/eve.json +{ + weekly + missingok + create + sharedscripts + postrotate + /bin/kill -HUP $(cat /var/run/suricata.pid) + endscript + rotate 32 + delaycompress + compresscmd /usr/bin/pigz + compress + dateext + notifempty +} diff --git a/code/chef/files/default/threshold.config b/code/chef/files/default/threshold.config new file mode 100755 index 0000000..4f0ac7c --- /dev/null +++ b/code/chef/files/default/threshold.config @@ -0,0 +1,32 @@ +# Thresholding: +# +# This feature is used to reduce the number of logged alerts for noisy rules. +# Thresholding commands limit the number of times a particular event is logged +# during a specified time interval. +# +# The syntax is the following: +# +# threshold gen_id , sig_id , type , track , count , seconds +# +# event_filter gen_id , sig_id , type , track , count , seconds +# +# suppress gen_id , sig_id +# suppress gen_id , sig_id , track , ip +# +# The options are documented at https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Global-Thresholds +# +# Please note that thresholding can also be set inside a signature. The interaction between rule based thresholds +# and global thresholds is documented here: +# https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Global-Thresholds#Global-thresholds-vs-rule-thresholds + +# Limit to 10 alerts every 10 seconds for each source host +#threshold gen_id 0, sig_id 0, type threshold, track by_src, count 10, seconds 10 + +# Limit to 1 alert every 10 seconds for signature with sid 2404000 +#threshold gen_id 1, sig_id 2404000, type threshold, track by_dst, count 1, seconds 10 + +# Avoid to alert on f-secure update +# Example taken from http://blog.inliniac.net/2012/03/07/f-secure-av-updates-and-suricata-ips/ +#suppress gen_id 1, sig_id 2009557, track by_src, ip 217.110.97.128/25 +#suppress gen_id 1, sig_id 2012086, track by_src, ip 217.110.97.128/25 +#suppress gen_id 1, sig_id 2003614, track by_src, ip 217.110.97.128/25 diff --git a/code/chef/metadata.rb b/code/chef/metadata.rb new file mode 100755 index 0000000..13cde30 --- /dev/null +++ b/code/chef/metadata.rb @@ -0,0 +1,6 @@ +name 'suricata' +maintainer 'bt3' +license 'All rights reserved' +description 'Major suricata update to 3.1' +long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) +version '0.3.52' diff --git a/code/chef/recipes/centos.rb b/code/chef/recipes/centos.rb new file mode 100755 index 0000000..26d859a --- /dev/null +++ b/code/chef/recipes/centos.rb @@ -0,0 +1,138 @@ +# Cookbook Name:: suricata +# Recipe:: centos +# + +# Variable Definitions +suropts = node[:suricata] + +suricata_interface = suropts[:interface] + +# Do we have multiple interfaces to listen on? +if suricata_interface.is_a? String + suricata_interface = [ suricata_interface ] +end + +raise 'No suricata rules defined for this host' if suropts[:rules].nil? +rules = suropts[:rules] + + +# Setup +yum_package 'libcap-ng' + +yum_package 'libhtp' + +%w[ libmnl libnetfilter_queue ].each do |pkg| + yum_package pkg +end + + +# Install Suricata +yum_package 'suricata' do + notifies :restart, 'service[suricata]', :delayed +end + +group 'suricata' do + gid 683 + action :create +end + +user 'suricata' do + comment 'suricata IDS user' + gid 683 + shell '/sbin/nologin' + system true + action :create +end + +if node[:platform_version][0] == '6' + template '/etc/init.d/suricata' do + mode 0555 + owner 'root' + group 'root' + source 'suricata.init.erb' + variables({:interface => suricata_interface}) + end +else + template '/etc/systemd/system/suricata.service' do + mode 0444 + owner 'root' + group 'root' + source 'suricata.service.erb' + variables({:interface => suricata_interface}) + end +end + +cookbook_file '/etc/logrotate.d/suricata' do + source 'suricata_logrotate' + owner 'root' + group 'root' + mode 0644 +end + +# Set Rules Up +directory '/etc/suricata/rules' do + action :create +end + +# Need to create these rules when time comes. +#template '/etc/suricata/rules/local.rules' do +# mode 0644 +# owner 'root' +# group 'wheel' +# source 'centos/local.rules.erb' +#end + + +# Set and configurate Suricata for centos +magic_file = '/usr/share/file/magic' + +service_name = 'suricata' + +corpmacs = search(:node, 'roles:CorpMacDNS').map { |node| node['ipaddress'] }.sort! + +template '/etc/suricata/suricata.yaml' do + mode 0644 + source 'suricata.yaml.erb' + variables({:pcapinterface => suricata_interface, + :rules => rules, + :magic_file => magic_file, + :corpmacs => corpmacs}) + notifies :restart, "service[#{service_name}]", :delayed +end + +%w[ classification.config reference.config threshold.config ].each do |configfile| + cookbook_file "/etc/suricata/#{configfile}" do + source configfile + mode 0644 + owner 'root' + end +end + + +# Setup logging +directory '/var/log/suricata/' do + owner 'root' + group 'suricata' + mode 0775 + action :create +end + +logfile_group = 'suricata' +if system('getent group splunk') + logfile_group = 'splunk' +end + +%w[ fast.log outputs.log suricata.log tls.log eve.json ].each do |logfile| + file "/var/log/suricata/#{logfile}" do + mode 0640 + owner 'suricata' + group logfile_group + end +end + + +# Start Suricata +service 'suricata' do + supports :status => true, :restart => true, :reload => true + action [ :enable, :start ] +end diff --git a/code/chef/recipes/default.rb b/code/chef/recipes/default.rb new file mode 100755 index 0000000..50ccc2b --- /dev/null +++ b/code/chef/recipes/default.rb @@ -0,0 +1,25 @@ +# +# Cookbook Name:: suricata +# Recipe:: default +# + +suropts = node[:suricata] + +raise 'No suricata interface defined for this host' if suropts[:interface].nil? +suricata_interface = suropts[:interface] + +# Do we have multiple interfaces to listen on? +if suricata_interface.is_a? String + suricata_interface = [ suricata_interface ] +end + +# The list of rules to populate the yaml config with. +raise 'No suricata rules defined for this host' if suropts[:rules].nil? +rules = suropts[:rules] + +case node[:platform] +when 'centos' + include_recipe 'suricata::centos' +else + include_recipe 'suricata::corpmac' +end diff --git a/code/chef/recipes/mac.rb b/code/chef/recipes/mac.rb new file mode 100755 index 0000000..8a85e36 --- /dev/null +++ b/code/chef/recipes/mac.rb @@ -0,0 +1,172 @@ +# Cookbook Name:: suricata +# Recipe:: corpmac.rb +# + +# Variable Definitions +suropts = node[:suricata] + +raise 'No suricata interface defined for this host' if suropts[:interface].nil? +suricata_interface = suropts[:interface] + +if suricata_interface.is_a? String + suricata_interface = [ suricata_interface ] +end + +raise 'No suricata rules defined for this host' if suropts[:rules].nil? +rules = suropts[:rules] + + +# Setup +group 'suricata' do + gid 683 + action :create +end + +user 'suricata' do + comment 'suricata IDS user' + gid 683 + shell '/sbin/nologin' + system true + action :create +end + + +# Install Suricata +package "libmagic" do + action :install + provider Chef::Provider::Package::Homebrew +end + +homebrew_package "suricata" do + homebrew_user 'user' + action :install +end + + +directory '/etc/suricata/' do + action :create +end + + +# Set Rules Up +directory '/etc/suricata/rules' do + action :create +end + +template '/etc/suricata/rules/local.rules' do + mode 0644 + owner 'root' + group 'wheel' + source 'mac_os_x/local.rules.erb' +end + +template '/etc/suricata/rules/shellcode.rules' do + mode 0644 + owner 'root' + group 'wheel' + source 'mac_os_x/shellcode.rules.erb' +end + +template '/etc/suricata/rules/osxmalware.rules' do + mode 0644 + owner 'root' + group 'wheel' + source 'mac_os_x/osxmalware.rules.erb' +end + +template '/etc/suricata/rules/nmap.rules' do + mode 0644 + owner 'root' + group 'wheel' + source 'mac_os_x/nmap.rules.erb' +end + +template '/etc/suricata/rules/mobilemalware.rules' do + mode 0644 + owner 'root' + group 'wheel' + source 'mac_os_x/mobilemalware.rules.erb' +end + +template '/etc/suricata/rules/emerging-exploit.rules' do + mode 0644 + owner 'root' + group 'wheel' + source 'mac_os_x/emerging-exploit.rules.erb' +end + +template '/etc/suricata/rules/emerging-shellcode.rules' do + mode 0644 + owner 'root' + group 'wheel' + source 'mac_os_x/emerging-shellcode.rules.erb' +end + +template '/etc/suricata/rules/dshield.rules' do + mode 0644 + owner 'root' + group 'wheel' + source 'mac_os_x/dshield.rules.erb' +end + +template '/etc/suricata/rules/compromised.rules' do + mode 0644 + owner 'root' + group 'wheel' + source 'mac_os_x/compromised.rules.erb' +end + +template '/etc/suricata/rules/tor.rules' do + mode 0644 + owner 'root' + group 'wheel' + source 'mac_os_x/tor.rules.erb' +end + + +magic_file = '/usr/local/share/misc/magic.mgc' + +include_recipe "logrotate::suricata_os_x" + +service_name = 'com.host.suricata' + +corpmacs = search(:node, 'roles:CorpMacDNS').map { |node| node['ipaddress'] }.sort! + +template '/etc/suricata/suricata.yaml' do + mode 0644 + source 'suricata.yaml.erb' + variables({:pcapinterface => suricata_interface, + :rules => rules, + :magic_file => magic_file, + :corpmacs => corpmacs}) + notifies :restart, "service[#{service_name}]", :delayed +end + +%w[ classification.config reference.config threshold.config ].each do |configfile| + cookbook_file "/etc/suricata/#{configfile}" do + source configfile + mode 0644 + owner 'root' + end +end + + +# Setup logging +directory '/var/log/suricata/' do + owner 'root' + group 'suricata' + mode 0775 + action :create +end + +logfile_group = 'suricata' +if system('getent group splunk') + logfile_group = 'splunk' +end + + +# Start Suricata +service 'com.host.suricata' do + action [ :start ] + restart_command "kill -USR2 `cat /var/run/suricata.pid`" +end diff --git a/code/chef/templates/centos/compromised.rules.erb b/code/chef/templates/centos/compromised.rules.erb new file mode 100755 index 0000000..b0967df --- /dev/null +++ b/code/chef/templates/centos/compromised.rules.erb @@ -0,0 +1,86 @@ +# +# $Id: emerging-compromised.rules +# Rules to block known hostile or compromised hosts. These lists are updated daily or better from many sources +# +#Sources include: +# +# Daniel Gerzo's BruteForceBlocker +# http://danger.rulez.sk/projects/bruteforceblocker/ +# +# The OpenBL +# http://www.openbl.org/ (formerly sshbl.org) +# +# And the Emerging Threats Sandnet and SidReporter Projects +# +# More information available at www.emergingthreats.net +# +# Please submit any feedback or ideas to emerging@emergingthreats.net or the emerging-sigs mailing list +# +#************************************************************* +# +# Copyright (c) 2003-2017, Emerging Threats +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +# following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +# disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +# following disclaimer in the documentation and/or other materials provided with the distribution. +# * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# + +# VERSION 4467 + +# Generated 2017-09-22 00:30:02 EDT + +alert ip [101.132.70.58,101.226.164.254,101.230.200.173,101.231.117.54,101.236.51.134,101.251.201.246,101.64.237.31,101.79.44.115,103.17.51.78,103.207.36.217,103.207.36.220,103.207.36.225,103.207.36.226,103.207.36.246,103.207.36.251,103.207.36.84,103.207.37.200,103.207.38.144,103.207.38.178,103.207.38.202,103.207.38.86,103.207.39.125,103.207.39.203,103.210.239.167,103.212.222.16,103.212.223.150,103.212.223.42,103.217.152.20,103.228.152.141,103.237.56.230] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 1"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500000; rev:4467;) +alert ip [103.27.239.143,103.28.38.74,103.45.5.85,103.53.77.118,103.69.219.46,103.71.255.27,103.73.86.76,103.79.142.18,103.89.88.138,103.89.88.147,103.89.88.168,103.89.88.64,103.89.88.86,103.89.88.95,103.89.88.98,103.89.90.28,103.90.226.162,103.9.156.251,104.130.138.184,104.131.40.115,104.131.41.77,104.131.73.27,104.154.89.43,104.168.235.233,104.192.3.34,104.192.3.46,104.193.10.228,104.198.193.205,104.203.45.174,104.211.183.174] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 2"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500002; rev:4467;) +alert ip [104.218.140.228,104.223.123.98,104.238.95.233,104.244.77.64,104.244.78.156,104.37.214.97,104.42.197.23,105.209.67.118,105.225.167.218,106.112.59.106,106.172.82.195,106.247.22.57,106.254.62.123,106.38.252.50,106.39.70.232,106.39.93.84,106.51.1.164,106.51.44.4,106.57.168.64,106.75.134.62,106.75.143.3,106.75.48.185,106.75.71.224,107.132.53.129,107.167.184.140,107.175.145.42,108.14.52.60,108.162.151.203,108.172.246.196,108.172.71.183] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 3"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500004; rev:4467;) +alert ip [108.173.38.92,108.180.129.213,108.208.120.134,108.48.123.223,108.58.41.139,108.61.166.208,109.110.63.131,109.171.3.184,109.195.1.224,109.204.44.230,109.205.136.10,109.206.50.173,109.230.0.69,109.30.27.127,109.98.100.108,110.200.221.235,110.20.113.244,110.228.34.174,110.45.165.12,110.45.244.113,110.8.188.38,111.119.197.73,111.122.211.147,111.125.89.10,111.127.116.215,111.194.196.27,111.204.175.228,111.205.121.92,111.206.115.107,111.231.194.103] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 4"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500006; rev:4467;) +alert ip [111.26.139.65,111.26.182.3,111.39.46.47,111.89.5.185,112.101.172.18,112.148.101.13,112.161.232.55,112.4.81.93,112.5.140.230,112.64.33.92,112.81.182.17,112.82.237.169,113.105.152.226,113.116.60.141,113.122.140.67,113.124.141.122,113.124.141.48,113.141.70.163,113.178.66.10,113.179.135.18,113.195.226.160,113.200.203.102,113.201.169.192,113.247.233.90,113.252.218.53,113.252.222.216,113.57.160.51,113.77.11.29,114.112.65.226,114.113.101.107] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 5"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500008; rev:4467;) +alert ip [114.207.102.52,114.34.101.101,115.159.152.47,115.195.208.191,115.209.180.49,115.213.144.133,115.231.8.12,115.231.94.238,115.236.47.25,115.236.47.27,115.249.75.29,115.25.138.222,115.68.3.153,116.101.123.47,116.101.17.10,116.107.220.24,116.107.221.141,116.107.223.107,116.15.8.12,116.196.108.252,116.196.84.88,116.231.57.98,116.246.11.101,1.164.9.109,116.62.155.36,117.107.159.144,117.146.60.13,117.18.105.172,117.2.123.42,117.48.194.129] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 6"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500010; rev:4467;) +alert ip [117.79.147.217,118.140.111.22,118.144.138.200,118.144.138.203,118.151.209.235,118.165.126.206,118.179.220.203,118.180.18.102,118.186.21.234,118.186.36.50,118.221.123.174,118.221.201.81,118.244.238.14,118.244.238.18,118.244.238.19,118.244.238.4,118.26.170.129,118.32.27.85,118.34.18.148,118.89.239.137,119.14.160.126,119.146.201.177,119.192.239.231,119.195.208.150,119.197.4.164,119.236.181.148,119.254.153.43,119.44.217.220,119.52.229.151,120.132.113.76] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 7"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500012; rev:4467;) +alert ip [120.132.113.82,120.132.113.84,120.132.113.85,120.132.14.35,120.132.30.150,1.202.166.74,120.234.5.228,120.237.101.134,120.52.118.33,120.52.56.152,120.77.204.253,120.83.5.28,120.89.29.132,1.209.148.74,120.92.74.178,120.92.85.3,121.12.120.171,121.129.186.183,121.159.89.132,121.160.21.13,121.177.23.189,121.194.2.248,121.201.18.228,121.35.209.94,121.46.31.50,121.56.147.48,121.78.87.138,121.8.107.234,121.96.57.204,122.114.213.144] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 8"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500014; rev:4467;) +alert ip [122.117.90.221,122.146.46.145,122.207.17.20,122.224.144.131,122.228.196.166,122.228.249.84,122.243.182.219,122.46.210.188,122.72.22.132,123.122.123.172,123.132.243.89,123.134.87.51,123.150.101.229,123.150.108.238,123.16.84.49,123.169.170.158,123.169.192.151,123.169.192.77,123.169.200.247,123.171.114.246,123.184.35.48,123.196.120.135,123.207.236.127,123.207.242.81,123.247.9.244,123.249.20.27,123.249.20.31,1.234.4.14,123.96.186.129,123.96.49.127] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 9"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500016; rev:4467;) +alert ip [124.117.241.152,1.241.184.143,124.135.31.202,124.205.195.3,124.207.190.60,124.251.36.75,124.42.66.91,124.61.247.61,124.67.81.2,124.90.206.204,125.100.114.3,125.121.111.64,125.123.155.119,125.130.103.130,125.208.29.140,125.212.253.176,125.34.210.238,125.75.207.25,126.25.84.195,128.199.112.13,128.199.62.192,1.28.86.194,129.121.178.56,129.125.75.199,131.255.6.32,132.148.133.186,133.232.74.108,134.19.181.20,13.54.136.89,13.59.109.162] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 10"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500018; rev:4467;) +alert ip [136.144.156.254,137.186.227.52,137.44.3.243,13.75.158.218,13.76.245.100,137.74.6.238,13.81.217.61,138.197.101.38,138.197.103.4,13.84.188.226,138.68.239.21,138.68.5.130,139.159.220.163,139.219.103.115,139.219.190.2,139.219.70.7,139.255.93.122,139.5.71.112,139.59.123.240,139.59.123.37,139.59.18.218,139.99.104.118,140.114.75.64,140.207.213.31,140.207.2.182,140.255.69.150,140.255.99.4,141.105.69.248,14.163.184.137,14.166.71.61] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 11"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500020; rev:4467;) +alert ip [14.169.1.86,14.177.68.22,14.198.124.91,14.204.87.108,14.228.254.184,14.235.138.51,14.29.118.197,14.34.27.163,144.0.242.178,144.217.128.26,144.217.146.49,144.48.168.8,145.249.106.104,14.58.109.187,14.58.118.69,146.148.108.195,14.63.165.247,147.135.136.81,147.135.226.50,147.178.194.71,149.56.128.14,149.56.180.126,149.56.223.104,151.84.133.210,152.149.59.147,152.204.2.160,153.127.194.180,153.166.65.77,154.0.165.125,154.0.169.254] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 12"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500022; rev:4467;) +alert ip [155.133.82.12,156.67.106.30,157.7.137.248,159.203.102.134,159.203.104.139,159.203.66.209,159.203.68.222,159.203.90.141,159.203.93.23,159.224.62.130,159.226.162.195,160.202.161.28,160.202.161.30,160.3.126.165,162.223.162.11,162.223.162.62,162.243.170.180,162.253.41.66,162.253.42.106,163.172.118.208,163.172.119.32,163.172.125.238,163.172.135.37,163.172.167.129,163.172.170.212,163.172.174.231,163.172.200.128,163.172.223.87,163.172.48.201,163.172.67.180] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 13"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500024; rev:4467;) +alert ip [164.132.51.91,164.177.113.231,165.227.109.171,165.227.124.196,165.227.124.86,165.227.144.103,166.111.131.71,166.62.40.246,167.114.61.195,167.250.73.80,168.1.128.133,168.235.102.145,168.235.89.230,168.70.82.160,169.50.107.11,169.50.86.185,169.50.86.187,169.50.86.188,169.50.86.190,169.50.86.191,170.250.90.139,171.234.231.115,171.245.13.106,171.25.165.26,173.0.52.106,173.16.233.5,173.166.99.116,173.198.206.107,173.212.222.115,173.214.175.146] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 14"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500026; rev:4467;) +alert ip [173.254.233.195,173.63.215.158,174.100.60.23,174.138.80.41,175.125.93.32,175.126.232.29,175.139.173.1,175.156.152.231,175.207.20.177,175.99.86.177,176.105.180.147,176.126.252.11,176.162.154.1,176.9.156.75,177.11.50.67,177.155.104.44,177.182.109.43,177.201.127.209,177.240.165.184,177.55.160.207,177.55.98.244,177.67.82.109,177.99.236.237,178.124.171.187,178.159.36.6,178.159.37.11,178.170.172.85,178.17.173.74,178.238.239.123,178.239.62.109] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 15"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500028; rev:4467;) +alert ip [178.62.34.57,178.62.95.5,178.73.195.109,178.93.174.229,179.159.163.243,179.198.1.41,179.41.195.194,180.101.143.2,180.150.224.2,180.150.224.4,180.153.151.93,180.153.19.139,180.166.22.98,180.168.166.121,180.168.76.230,180.169.129.228,180.175.55.213,180.76.140.154,180.76.150.192,180.76.165.244,181.168.78.160,181.214.205.130,181.214.87.4,181.26.141.193,182.126.102.242,182.163.126.241,182.18.153.206,182.245.29.89,182.253.226.82,182.253.66.2] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 16"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500030; rev:4467;) +alert ip [182.36.201.180,182.38.118.131,182.45.108.45,182.45.43.33,182.45.45.24,18.248.2.85,183.136.188.116,183.152.50.38,183.152.95.93,183.214.148.89,183.239.228.51,183.87.56.75,183.91.0.68,184.149.38.74,185.100.84.108,185.107.94.40,185.140.120.153,185.156.173.106,185.165.29.111,185.165.29.116,185.165.29.122,185.165.29.128,185.165.29.23,185.165.29.50,185.165.29.69,185.165.29.77,185.165.29.78,185.168.242.215,185.200.35.233,185.200.35.3] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 17"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500032; rev:4467;) +alert ip [185.2.82.45,185.48.207.32,185.55.218.100,185.55.218.34,185.55.218.95,185.56.81.2,185.67.3.144,185.74.36.30,185.8.50.36,186.227.226.158,186.227.234.116,186.4.156.124,187.177.120.75,187.18.54.167,187.18.58.193,187.189.153.69,187.22.231.227,187.84.3.188,188.0.67.184,188.120.254.159,188.121.2.243,188.121.26.102,188.152.201.116,188.165.230.6,188.166.175.211,188.166.34.129,188.187.121.39,188.190.59.137,188.243.168.56,189.114.229.185] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 18"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500034; rev:4467;) +alert ip [189.169.197.102,189.224.143.228,189.28.12.34,189.39.120.230,189.55.139.237,190.107.225.54,190.107.81.2,190.110.88.164,190.110.89.82,190.110.90.118,190.110.91.217,190.110.94.208,190.110.94.97,190.116.182.154,190.174.203.127,190.196.156.134,190.197.53.146,190.205.38.222,190.210.244.236,190.215.115.50,190.45.3.201,190.48.135.240,190.85.6.90,190.97.205.89,190.98.207.226,191.101.235.232,191.96.112.105,191.96.112.106,191.96.112.107,191.96.112.111] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 19"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500036; rev:4467;) +alert ip [191.96.112.112,191.96.249.114,191.96.249.145,191.96.249.156,191.96.249.38,191.96.249.82,192.129.162.2,192.241.225.16,192.248.87.22,193.104.205.177,193.111.63.192,193.201.224.208,193.201.224.212,193.201.224.214,193.201.224.216,193.201.224.218,193.201.224.232,193.34.144.30,193.40.7.6,193.93.217.142,194.105.205.42,194.213.34.106,194.2.209.2,194.33.76.162,195.154.255.158,195.154.34.127,195.154.37.186,195.154.55.131,195.171.242.187,195.22.126.177] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 20"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500038; rev:4467;) +alert ip [195.225.224.38,195.62.53.126,196.52.32.17,197.231.221.211,198.12.152.136,198.167.136.101,198.199.112.44,198.199.113.122,198.211.121.75,198.24.186.34,198.255.146.211,198.98.50.113,198.98.51.117,198.98.57.188,198.98.57.32,198.98.59.151,198.98.60.112,198.98.60.239,198.98.60.72,198.98.61.180,198.98.61.33,199.168.100.164,199.195.248.31,199.195.249.132,199.195.250.64,199.27.250.119,199.76.14.51,200.17.252.12,200.56.109.119,200.68.66.165] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 21"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500040; rev:4467;) +alert ip [201.144.84.82,201.178.158.127,201.178.184.127,201.193.197.106,201.232.89.209,201.249.207.212,201.48.226.19,202.107.104.119,202.108.199.14,202.129.207.109,202.131.237.149,202.201.64.102,202.29.153.142,202.55.93.98,202.73.50.214,202.80.184.2,202.85.222.225,203.126.140.172,203.128.73.185,203.174.85.138,203.195.160.105,203.215.172.170,203.254.127.19,203.80.94.137,203.86.69.132,204.152.209.14,204.188.251.130,205.185.113.181,207.138.132.44,207.195.19.153] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 22"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500042; rev:4467;) +alert ip [207.81.165.45,208.66.77.245,208.98.22.130,209.10.82.200,209.15.218.187,209.188.19.226,209.213.170.114,209.239.114.231,209.239.123.90,209.243.10.198,209.92.176.105,209.92.176.114,210.140.10.72,210.212.210.86,210.245.32.72,210.84.44.200,210.94.133.8,211.110.139.215,211.168.232.5,211.195.14.39,211.215.174.144,211.216.123.97,211.226.176.47,211.249.35.203,211.249.35.205,211.57.201.184,211.64.35.129,212.109.221.169,212.129.13.232,212.129.59.195] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 23"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500044; rev:4467;) +alert ip [212.143.128.139,212.159.139.204,212.237.37.123,212.237.40.247,212.237.40.48,212.237.41.114,212.237.42.218,212.237.42.252,212.237.42.61,212.237.43.138,212.237.43.44,212.237.44.26,212.237.45.105,212.237.45.188,212.237.45.212,212.237.45.84,212.237.46.210,212.47.243.174,212.47.250.7,212.51.189.201,212.83.136.196,212.83.141.81,212.83.147.105,212.85.202.67,213.113.215.115,213.136.81.74,213.136.94.221,213.149.105.28,213.32.69.137,213.74.201.146] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 24"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500046; rev:4467;) +alert ip [213.74.55.250,213.78.109.14,216.168.110.244,216.223.112.22,216.245.209.78,216.98.212.11,217.111.170.195,217.170.205.103,217.23.138.22,217.23.15.165,217.46.196.74,217.57.147.180,217.61.18.106,217.65.2.116,218.103.98.209,218.106.244.93,218.108.206.56,218.148.4.24,218.15.163.100,218.156.193.236,218.2.15.138,218.28.55.134,218.29.188.109,218.32.45.19,218.52.219.225,218.5.76.147,218.63.248.173,218.79.14.243,218.9.118.187,219.116.11.89] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 25"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500048; rev:4467;) +alert ip [219.159.249.219,219.221.10.99,219.239.227.252,219.239.227.253,220.130.148.106,220.149.235.114,220.72.146.117,220.85.152.96,221.135.104.112,221.145.110.21,221.148.106.180,221.163.191.92,221.192.4.18,222.107.38.1,222.161.37.110,222.220.93.11,222.237.36.38,222.38.230.2,222.73.12.22,2.228.167.211,222.84.159.196,222.91.125.174,222.99.52.246,223.112.4.242,223.112.77.186,223.112.87.85,223.166.92.4,223.30.251.140,223.68.134.29,2.24.131.203] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 26"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500050; rev:4467;) +alert ip [23.129.64.12,23.30.57.83,24.119.126.64,24.46.10.22,24.80.229.169,24.87.106.109,2.50.47.6,27.118.21.218,27.16.159.23,27.19.1.251,27.210.14.232,27.219.169.241,27.255.65.189,27.255.79.21,27.255.79.7,27.54.162.253,27.64.38.194,27.73.14.63,27.73.87.164,31.172.247.106,31.172.80.188,31.173.128.149,31.207.47.53,31.37.37.187,35.162.178.210,35.190.149.252,35.193.213.56,35.193.231.245,35.199.187.166,36.67.37.95] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 27"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500052; rev:4467;) +alert ip [36.7.87.34,37.221.242.40,37.49.224.119,37.49.225.93,37.57.17.101,39.108.169.46,40.113.22.5,40.121.158.5,40.121.221.115,40.69.164.199,40.71.206.237,40.71.222.21,40.71.82.183,40.83.253.82,40.83.255.188,40.86.186.117,41.190.93.225,41.210.160.3,41.76.226.88,41.77.222.57,41.78.78.66,42.112.26.24,42.115.138.8,42.159.204.117,42.159.249.108,42.159.250.5,42.55.73.197,42.62.73.85,42.93.81.115,42.94.140.79] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 28"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500054; rev:4467;) +alert ip [45.116.80.242,45.249.247.80,45.251.43.189,45.32.236.123,45.32.39.134,45.32.47.58,45.32.60.87,45.55.186.166,45.55.216.145,45.55.4.137,45.56.30.99,45.63.104.148,45.63.35.50,45.76.104.223,45.76.186.62,45.76.198.131,45.76.216.217,45.76.218.238,45.76.220.58,45.76.221.116,45.76.223.152,45.76.53.82,45.79.200.100,46.101.9.80,46.148.20.25,46.164.186.33,46.165.223.217,46.166.185.14,46.17.44.94,46.183.217.165] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 29"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500056; rev:4467;) +alert ip [46.18.3.47,46.188.19.235,46.39.222.2,46.41.134.10,46.4.71.142,46.6.48.15,47.154.229.1,47.22.51.154,47.90.201.99,47.90.202.171,47.90.204.225,47.92.158.26,47.93.223.84,49.116.146.210,49.176.210.112,49.177.224.46,49.207.182.120,49.236.203.74,49.248.152.178,49.51.37.225,50.115.166.21,50.115.166.22,50.116.55.19,50.117.38.106,50.117.86.160,50.118.255.159,50.19.160.96,50.226.124.68,50.247.173.145,50.248.163.25] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 30"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500058; rev:4467;) +alert ip [50.62.56.171,5.101.40.37,5.101.40.38,5.101.40.62,5.102.224.212,51.15.141.220,51.15.39.26,51.15.64.212,51.254.101.200,51.254.34.30,51.255.202.66,5.135.21.155,5.135.212.153,5.188.10.156,5.188.10.175,5.188.10.176,5.188.10.178,5.188.10.179,5.188.10.180,5.188.10.182,5.189.153.129,52.124.71.138,52.144.39.97,52.165.220.242,52.166.112.31,52.168.179.155,52.168.180.139,52.187.131.166,5.226.174.124,5.249.146.145] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 31"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500060; rev:4467;) +alert ip [52.64.87.237,52.88.81.95,5.39.217.25,54.245.26.231,5.79.105.11,5.8.18.184,5.8.18.190,58.187.120.180,58.218.213.65,58.221.249.102,58.227.192.158,58.241.120.6,58.242.74.231,58.246.118.252,58.249.54.22,58.30.96.130,58.30.96.133,58.30.96.143,58.46.245.50,58.62.144.229,59.12.201.230,59.13.69.5,59.15.95.50,59.16.74.234,59.175.153.94,59.19.177.128,59.27.218.55,59.49.46.60,59.56.69.126,60.12.229.225] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 32"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500062; rev:4467;) +alert ip [60.124.22.115,60.13.74.216,60.176.158.242,60.206.137.145,60.208.139.180,60.222.116.99,61.147.68.166,61.161.143.179,61.164.46.188,61.176.218.19,61.197.164.161,61.216.155.200,61.216.38.102,61.219.149.59,61.240.159.244,61.8.249.89,62.152.32.179,62.164.145.253,62.210.130.150,62.210.15.114,62.210.169.48,62.210.97.105,62.219.209.70,62.64.154.18,62.76.177.98,62.76.185.15,62.76.187.122,62.76.191.87,62.76.42.249,62.76.42.62] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 33"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500064; rev:4467;) +alert ip [62.76.42.99,62.76.44.35,63.135.10.242,64.113.32.29,64.137.192.185,64.50.176.226,64.59.144.120,64.66.226.188,64.71.135.233,65.130.73.219,66.201.100.124,66.35.51.195,66.35.51.198,66.58.155.50,66.58.199.149,66.76.143.225,66.96.203.242,67.205.138.240,67.205.185.191,69.131.92.126,71.230.124.219,72.34.55.130,72.35.252.25,73.207.67.124,73.223.158.230,73.231.34.71,73.235.81.87,73.32.240.93,74.208.155.102,74.208.45.40] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 34"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500066; rev:4467;) +alert ip [74.52.53.204,76.164.197.48,76.191.17.120,76.74.219.170,76.8.60.134,77.105.1.80,77.123.76.69,77.242.132.150,77.72.82.171,77.72.82.199,77.72.83.249,77.72.85.100,77.81.226.157,78.113.206.194,78.129.10.146,78.138.91.6,78.146.59.79,78.188.21.107,78.195.178.119,78.203.141.125,78.203.248.197,78.211.73.147,78.224.40.128,78.245.236.138,78.43.104.193,78.47.64.211,79.106.161.36,79.137.39.158,79.143.191.24,79.148.105.88] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 35"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500068; rev:4467;) +alert ip [79.46.205.166,80.11.28.58,80.14.151.90,80.211.226.174,80.211.231.211,80.211.232.174,80.216.42.120,80.243.184.26,80.26.255.232,80.77.43.49,80.82.64.203,80.98.98.181,81.137.199.29,81.143.231.26,81.167.233.182,81.169.143.207,81.171.24.61,81.171.58.49,81.171.85.84,81.17.30.208,81.17.31.250,81.57.126.72,81.95.140.244,82.102.216.128,82.127.48.23,82.185.231.221,82.193.124.36,82.202.245.51,82.211.49.197,82.213.2.18] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 36"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500070; rev:4467;) +alert ip [82.228.240.199,82.246.170.196,82.6.131.182,82.98.139.229,83.209.114.167,83.220.169.203,83.246.164.83,84.105.201.12,84.107.154.75,84.200.7.180,84.237.16.110,84.55.161.158,85.195.226.180,85.195.48.166,85.230.149.52,85.247.95.85,85.90.210.87,86.109.170.96,86.164.122.219,86.57.164.109,86.57.168.86,86.88.141.158,87.106.71.197,87.126.129.215,87.85.170.35,88.127.227.155,88.147.17.251,88.212.206.44,88.99.38.116,89.108.109.46] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 37"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500072; rev:4467;) +alert ip [89.108.87.179,89.212.50.176,89.216.97.113,89.225.201.101,89.239.24.62,89.250.84.2,89.251.98.4,89.38.98.6,89.38.98.66,89.87.178.129,90.137.13.61,90.176.140.1,90.84.45.108,91.121.117.6,91.121.14.122,91.134.133.251,91.134.214.132,91.197.232.103,91.197.232.109,92.113.108.27,92.177.78.25,92.220.16.32,92.222.77.85,92.87.236.139,92.87.236.17,92.87.236.189,93.103.212.84,93.170.190.94,93.171.247.91,93.174.89.85] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 38"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500074; rev:4467;) +alert ip [93.174.93.10,93.174.93.71,93.174.94.253,93.190.140.112,93.212.109.60,93.42.185.41,94.102.51.26,94.177.207.42,94.177.217.169,94.177.218.163,94.177.244.134,94.200.147.213,94.231.4.132,94.231.82.19,94.23.210.41,94.23.59.133,94.74.81.29,95.110.224.97,95.169.50.213,95.179.32.4,95.213.202.178,95.215.62.242,95.240.135.79,95.85.25.122,96.22.196.161,96.231.43.95,96.239.59.131,96.33.76.87,98.110.245.232,98.160.239.31] any -> $HOME_NET any (msg:"ET COMPROMISED Known Compromised or Hostile Host Traffic group 39"; reference:url,doc.emergingthreats.net/bin/view/Main/CompromisedHosts; threshold: type limit, track by_src, seconds 60, count 1; classtype:misc-attack; sid:2500076; rev:4467;) \ No newline at end of file diff --git a/code/chef/templates/centos/drop.rules.erb b/code/chef/templates/centos/drop.rules.erb new file mode 100755 index 0000000..9a9d478 --- /dev/null +++ b/code/chef/templates/centos/drop.rules.erb @@ -0,0 +1,73 @@ +# +# $Id: emerging-drop.rules $ +# Emerging Threats Spamhaus DROP List rules. +# +# Rules to block Spamhaus DROP listed networks (www.spamhaus.org) +# +# More information available at www.emergingthreats.net +# +# Please submit any feedback or ideas to emerging@emergingthreats.net or the emerging-sigs mailing list +# +#************************************************************* +# +# Copyright (c) 2003-2017, Emerging Threats +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +# following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +# disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +# following disclaimer in the documentation and/or other materials provided with the distribution. +# * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# + +# VERSION 2619 + + +# Generated 2017-09-17 00:05:01 EDT + +alert ip [5.134.128.0/19,5.157.0.0/18,14.4.0.0/14,23.226.48.0/20,23.246.128.0/18,23.251.224.0/19,24.51.0.0/19,24.233.0.0/19,27.126.160.0/20,31.11.43.0/24,31.184.238.0/24,31.222.200.0/21,36.0.8.0/21,36.37.48.0/20,36.93.0.0/16,36.116.0.0/16,36.119.0.0/16,36.255.212.0/22,37.18.42.0/24,37.139.49.0/24] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 1"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400000; rev:2619;) +alert ip [42.1.56.0/22,42.1.128.0/17,42.52.0.0/14,42.83.80.0/22,42.96.0.0/18,42.123.36.0/22,42.128.0.0/12,42.160.0.0/12,42.194.8.0/22,42.194.12.0/22,42.194.128.0/17,42.208.0.0/12,43.229.52.0/22,43.236.0.0/16,43.250.116.0/22,43.252.80.0/22,43.252.152.0/22,43.252.180.0/22,45.4.128.0/22,45.4.136.0/22] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 2"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400001; rev:2619;) +alert ip [46.29.248.0/22,46.29.248.0/21,46.151.48.0/21,46.232.192.0/21,46.243.140.0/24,46.243.142.0/24,46.243.173.0/24,49.8.0.0/14,49.238.64.0/18,59.254.0.0/15,60.233.0.0/16,61.11.224.0/19,61.13.128.0/17,61.14.224.0/22,61.45.251.0/24,66.98.112.0/20,66.231.64.0/20,67.213.112.0/20,67.213.136.0/21,67.219.208.0/20] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 3"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400002; rev:2619;) +alert ip [79.110.17.0/24,79.110.18.0/24,79.110.19.0/24,79.110.25.0/24,79.173.104.0/21,83.175.0.0/18,84.238.160.0/22,85.93.5.0/24,85.121.39.0/24,86.55.40.0/23,86.55.42.0/23,91.194.254.0/23,91.200.12.0/22,91.200.248.0/22,91.207.4.0/22,91.209.12.0/24,91.212.104.0/24,91.212.124.0/24,91.213.126.0/24,91.217.10.0/23] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 4"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400003; rev:2619;) +alert ip [91.230.252.0/23,91.234.36.0/24,91.235.2.0/24,91.236.74.0/23,91.238.82.0/24,91.240.165.0/24,93.179.89.0/24,93.179.90.0/24,93.179.91.0/24,95.216.0.0/15,101.192.0.0/14,101.202.0.0/16,101.203.128.0/19,101.248.0.0/15,101.252.0.0/15,103.2.44.0/22,103.16.76.0/24,103.23.8.0/22,103.36.64.0/22,103.57.248.0/22] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 5"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400004; rev:2619;) +alert ip [103.197.8.0/22,103.205.84.0/22,103.207.160.0/22,103.210.12.0/22,103.215.80.0/22,103.227.4.0/22,103.228.8.0/22,103.229.36.0/22,103.229.40.0/22,103.230.144.0/22,103.231.84.0/22,103.232.136.0/22,103.232.172.0/22,103.236.32.0/22,103.239.56.0/22,104.36.184.0/22,104.153.96.0/21,104.153.112.0/21,104.153.244.0/22,104.160.224.0/19] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 6"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400005; rev:2619;) +alert ip [104.245.248.0/21,104.255.56.0/21,108.166.224.0/19,110.172.64.0/18,114.118.0.0/17,115.166.136.0/22,116.78.0.0/15,116.119.0.0/17,116.128.0.0/10,116.144.0.0/15,116.146.0.0/15,116.197.156.0/22,116.206.16.0/22,117.58.0.0/17,117.120.64.0/18,119.42.52.0/22,119.58.0.0/16,119.232.0.0/16,120.48.0.0/15,121.46.124.0/22] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 7"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400006; rev:2619;) +alert ip [124.70.0.0/15,124.157.0.0/18,124.242.0.0/16,125.31.192.0/18,125.58.0.0/18,125.169.0.0/16,128.13.0.0/16,128.85.0.0/16,128.94.0.0/16,128.168.0.0/16,128.188.0.0/16,130.148.0.0/16,130.196.0.0/16,130.222.0.0/16,131.72.208.0/22,131.108.16.0/22,131.108.232.0/22,131.200.0.0/16,134.18.0.0/16,134.22.0.0/16] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 8"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400007; rev:2619;) +alert ip [134.209.0.0/16,136.230.0.0/16,137.19.0.0/16,137.33.0.0/16,137.55.0.0/16,137.76.0.0/16,137.105.0.0/16,137.171.0.0/16,137.218.0.0/16,138.31.0.0/16,138.36.92.0/22,138.36.136.0/22,138.36.148.0/22,138.43.0.0/16,138.52.0.0/16,138.59.4.0/22,138.59.204.0/22,138.94.120.0/22,138.94.144.0/22,138.94.216.0/22] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 9"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400008; rev:2619;) +alert ip [138.216.0.0/16,138.228.0.0/16,138.249.0.0/16,139.45.0.0/16,139.136.0.0/16,139.188.0.0/16,140.143.128.0/17,140.167.0.0/16,141.94.0.0/15,141.101.132.0/24,141.101.201.0/24,141.136.22.0/24,141.136.27.0/24,141.178.0.0/16,141.253.0.0/16,142.4.160.0/19,142.102.0.0/16,143.0.236.0/22,143.49.0.0/16,143.64.0.0/16] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 10"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400009; rev:2619;) +alert ip [147.7.0.0/16,147.16.0.0/14,147.119.0.0/16,148.111.0.0/16,148.148.0.0/16,148.154.0.0/16,148.178.0.0/16,148.185.0.0/16,148.248.0.0/16,149.109.0.0/16,149.114.0.0/16,149.118.0.0/16,149.143.64.0/18,150.10.0.0/16,150.22.128.0/17,150.25.0.0/16,150.40.0.0/16,150.107.106.0/23,150.107.220.0/22,150.121.0.0/16] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 11"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400010; rev:2619;) +alert ip [150.242.36.0/22,150.242.100.0/22,150.242.120.0/22,150.242.144.0/22,151.123.0.0/16,151.192.0.0/16,151.212.0.0/16,151.237.176.0/20,151.237.184.0/22,152.109.0.0/16,152.136.0.0/16,152.147.0.0/16,153.14.0.0/16,153.52.0.0/14,153.93.0.0/16,155.11.0.0/16,155.40.0.0/16,155.66.0.0/16,155.73.0.0/16,155.108.0.0/16] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 12"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400011; rev:2619;) +alert ip [157.195.0.0/16,157.231.0.0/16,157.232.0.0/16,158.54.0.0/16,158.90.0.0/17,158.249.0.0/16,159.65.0.0/16,159.80.0.0/16,159.85.0.0/16,159.111.0.0/16,159.151.0.0/16,159.174.0.0/16,159.219.0.0/16,159.223.0.0/16,159.229.0.0/16,160.14.0.0/16,160.21.0.0/16,160.117.0.0/16,160.180.0.0/16,160.181.0.0/16] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 13"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400012; rev:2619;) +alert ip [161.0.68.0/22,161.66.0.0/16,161.70.0.0/16,161.71.0.0/16,161.189.0.0/16,161.232.0.0/16,162.208.124.0/22,162.212.188.0/22,162.213.128.0/22,162.213.232.0/22,162.219.32.0/21,162.222.148.0/22,162.245.124.0/22,162.254.72.0/21,163.47.19.0/24,163.50.0.0/16,163.53.247.0/24,163.59.0.0/16,163.250.0.0/16,163.254.0.0/16] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 14"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400013; rev:2619;) +alert ip [165.192.0.0/16,165.205.0.0/16,165.209.0.0/16,166.117.0.0/16,167.74.0.0/18,167.87.0.0/16,167.97.0.0/16,167.103.0.0/16,167.158.0.0/16,167.162.0.0/16,167.175.0.0/16,167.224.0.0/19,168.64.0.0/16,168.90.108.0/22,168.129.0.0/16,168.181.52.0/22,170.67.0.0/16,170.113.0.0/16,170.114.0.0/16,170.120.0.0/16] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 15"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400014; rev:2619;) +alert ip [172.96.16.0/22,172.103.40.0/21,172.103.64.0/18,173.228.160.0/19,173.246.160.0/19,175.103.64.0/18,176.61.136.0/22,176.61.136.0/21,176.65.128.0/19,176.97.116.0/22,177.36.16.0/20,177.74.160.0/20,177.91.0.0/22,177.234.136.0/21,178.16.80.0/20,178.216.48.0/21,179.42.64.0/19,180.178.192.0/18,180.236.0.0/14,181.118.32.0/19] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 16"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400015; rev:2619;) +alert ip [185.35.136.0/22,185.46.84.0/22,185.50.250.0/24,185.50.251.0/24,185.64.20.0/22,185.68.156.0/22,185.72.68.0/22,185.93.185.0/24,185.93.187.0/24,185.103.72.0/22,185.106.94.0/24,185.127.24.0/22,185.129.148.0/23,185.132.4.0/22,185.133.20.0/22,185.134.20.0/22,185.135.184.0/22,185.137.219.0/24,185.141.188.0/22,185.146.20.0/22] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 17"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400016; rev:2619;) +alert ip [185.149.112.0/22,185.150.84.0/22,185.151.48.0/22,185.151.60.0/22,185.152.36.0/22,185.152.248.0/22,185.154.20.0/22,185.155.52.0/22,185.156.88.0/21,185.156.92.0/22,185.159.36.0/22,185.159.37.0/24,185.159.68.0/22,185.166.216.0/22,185.167.116.0/22,185.171.120.0/22,185.173.44.0/22,185.175.140.0/22,185.180.124.0/22,185.184.192.0/22] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 18"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400017; rev:2619;) +alert ip [185.198.212.0/22,185.202.88.0/22,185.204.236.0/22,185.205.68.0/22,185.208.128.0/22,186.1.128.0/19,186.65.112.0/20,186.96.96.0/19,188.72.96.0/24,188.72.126.0/24,188.72.127.0/24,188.172.160.0/19,188.239.128.0/18,188.247.135.0/24,188.247.230.0/24,189.213.128.0/17,190.2.208.0/21,190.9.48.0/21,190.99.80.0/21,190.123.208.0/20] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 19"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400018; rev:2619;) +alert ip [192.40.29.0/24,192.43.153.0/24,192.43.154.0/23,192.43.156.0/22,192.43.160.0/24,192.43.175.0/24,192.43.176.0/21,192.43.184.0/24,192.46.192.0/18,192.54.110.0/24,192.67.16.0/24,192.67.160.0/22,192.86.85.0/24,192.88.74.0/24,192.100.142.0/24,192.101.44.0/24,192.101.181.0/24,192.101.200.0/21,192.101.240.0/21,192.101.248.0/23] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 20"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400019; rev:2619;) +alert ip [192.158.51.0/24,192.160.44.0/24,192.190.49.0/24,192.190.97.0/24,192.195.150.0/24,192.197.87.0/24,192.203.252.0/24,192.206.114.0/24,192.206.183.0/24,192.219.120.0/21,192.219.128.0/18,192.219.192.0/20,192.219.208.0/21,192.225.96.0/20,192.226.16.0/20,192.229.32.0/19,192.231.66.0/24,192.234.189.0/24,192.245.101.0/24,193.9.158.0/24] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 21"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400020; rev:2619;) +alert ip [193.177.64.0/18,193.243.0.0/17,194.1.152.0/24,194.29.185.0/24,195.182.57.0/24,195.190.13.0/24,195.191.56.0/23,195.191.102.0/23,195.225.176.0/22,196.1.109.0/24,196.42.128.0/17,196.61.240.0/20,196.63.0.0/16,196.164.0.0/15,196.193.0.0/16,196.196.0.0/16,196.197.0.0/16,196.198.0.0/16,196.199.0.0/16,196.240.0.0/15] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 22"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400021; rev:2619;) +alert ip [198.13.0.0/20,198.14.128.0/19,198.14.160.0/19,198.20.16.0/20,198.44.192.0/20,198.45.32.0/20,198.45.64.0/19,198.56.64.0/18,198.57.64.0/20,198.62.70.0/24,198.62.76.0/24,198.96.224.0/20,198.99.117.0/24,198.102.222.0/24,198.148.212.0/24,198.151.16.0/20,198.151.64.0/18,198.151.152.0/22,198.160.205.0/24,198.169.201.0/24] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 23"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400022; rev:2619;) +alert ip [198.179.22.0/24,198.181.64.0/19,198.181.96.0/20,198.183.32.0/19,198.184.193.0/24,198.184.208.0/24,198.186.25.0/24,198.186.208.0/24,198.187.64.0/18,198.187.192.0/24,198.190.173.0/24,198.199.212.0/24,198.202.237.0/24,198.204.0.0/21,198.206.140.0/24,198.212.132.0/24,199.5.152.0/23,199.5.229.0/24,199.10.64.0/24,199.26.137.0/24] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 24"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400023; rev:2619;) +alert ip [199.58.248.0/21,199.60.102.0/24,199.71.56.0/21,199.71.192.0/20,199.84.55.0/24,199.84.56.0/22,199.84.60.0/24,199.84.64.0/19,199.87.208.0/21,199.88.32.0/20,199.88.48.0/22,199.89.16.0/20,199.89.198.0/24,199.120.163.0/24,199.165.32.0/19,199.166.200.0/22,199.184.82.0/24,199.185.192.0/20,199.196.192.0/19,199.198.160.0/20] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 25"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400024; rev:2619;) +alert ip [199.223.0.0/20,199.230.64.0/19,199.230.96.0/21,199.233.85.0/24,199.233.96.0/24,199.241.64.0/19,199.244.56.0/21,199.245.138.0/24,199.246.137.0/24,199.246.213.0/24,199.246.215.0/24,199.248.64.0/18,199.249.64.0/19,199.253.32.0/20,199.253.48.0/21,199.253.224.0/20,199.254.32.0/20,200.0.60.0/23,200.3.128.0/20,200.22.0.0/16] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 26"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400025; rev:2619;) +alert ip [202.20.32.0/19,202.21.64.0/19,202.27.96.0/23,202.27.98.0/24,202.27.99.0/24,202.27.100.0/22,202.27.120.0/22,202.27.161.0/24,202.27.162.0/23,202.27.164.0/22,202.27.168.0/24,202.39.112.0/20,202.40.32.0/19,202.40.64.0/18,202.68.0.0/18,202.86.0.0/22,202.148.32.0/20,202.148.176.0/20,202.183.0.0/19,202.189.80.0/20] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 27"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400026; rev:2619;) +alert ip [203.34.252.0/23,203.86.252.0/22,203.148.80.0/22,203.149.92.0/22,203.169.0.0/22,203.189.112.0/22,203.191.64.0/18,204.19.38.0/23,204.44.32.0/20,204.44.192.0/20,204.44.224.0/20,204.48.16.0/20,204.52.255.0/24,204.57.16.0/20,204.75.147.0/24,204.75.228.0/24,204.80.198.0/24,204.86.16.0/20,204.87.199.0/24,204.89.224.0/24] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 28"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400027; rev:2619;) +alert ip [204.128.180.0/24,204.130.16.0/20,204.130.167.0/24,204.147.64.0/21,204.187.155.0/24,204.187.156.0/22,204.187.160.0/19,204.187.192.0/19,204.187.224.0/20,204.187.240.0/21,204.187.248.0/22,204.187.252.0/23,204.187.254.0/24,204.194.64.0/21,204.194.184.0/21,204.225.16.0/20,204.225.159.0/24,204.225.210.0/24,204.232.0.0/18,204.238.137.0/24] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 29"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400028; rev:2619;) +alert ip [205.144.176.0/20,205.148.128.0/18,205.148.192.0/18,205.151.128.0/19,205.159.45.0/24,205.159.174.0/24,205.159.180.0/24,205.166.77.0/24,205.166.84.0/24,205.166.130.0/24,205.166.168.0/24,205.166.211.0/24,205.172.176.0/22,205.172.244.0/22,205.175.160.0/19,205.189.71.0/24,205.189.72.0/23,205.203.0.0/19,205.203.224.0/19,205.207.134.0/24] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 30"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400029; rev:2619;) +alert ip [205.214.128.0/19,205.233.224.0/20,205.236.185.0/24,205.236.189.0/24,205.237.88.0/21,206.41.160.0/19,206.51.29.0/24,206.81.0.0/19,206.130.4.0/23,206.130.188.0/24,206.143.128.0/17,206.189.0.0/16,206.195.224.0/19,206.197.28.0/24,206.197.29.0/24,206.197.77.0/24,206.197.165.0/24,206.203.64.0/18,206.209.80.0/20,206.224.160.0/19] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 31"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400030; rev:2619;) +alert ip [207.32.208.0/20,207.45.224.0/20,207.110.64.0/18,207.110.96.0/19,207.110.128.0/18,207.177.128.0/18,207.178.64.0/19,207.183.192.0/19,207.226.192.0/20,207.234.0.0/17,208.93.4.0/22,208.117.88.0/22,208.117.92.0/24,209.51.32.0/20,209.54.160.0/19,209.66.128.0/19,209.95.192.0/19,209.97.128.0/18,209.99.128.0/18,209.145.0.0/19] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 32"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400031; rev:2619;) +alert ip [209.182.64.0/19,209.229.0.0/16,209.242.192.0/19,212.92.127.0/24,216.47.96.0/20,216.152.240.0/20,216.183.208.0/20,220.154.0.0/16,221.132.192.0/18,223.0.0.0/15,223.169.0.0/16,223.173.0.0/16,223.201.0.0/16,223.254.0.0/16] any -> $HOME_NET any (msg:"ET DROP Spamhaus DROP Listed Traffic Inbound group 33"; reference:url,www.spamhaus.org/drop/drop.lasso; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DROPIP; sid:2400032; rev:2619;) diff --git a/code/chef/templates/centos/dshield.rules.erb b/code/chef/templates/centos/dshield.rules.erb new file mode 100755 index 0000000..4a817bb --- /dev/null +++ b/code/chef/templates/centos/dshield.rules.erb @@ -0,0 +1,35 @@ +# +# $Id: emerging-dshield.rules $ +# Emerging Threats Dshield rules. +# +# Rules to block Dshield identified Top Attackers (www.dshield.org) +# +# More information available at www.emergingthreats.net +# +# Please submit any feedback or ideas to emerging@emergingthreats.net or the emerging-sigs mailing list +# +#************************************************************* +# +# Copyright (c) 2003-2014, Emerging Threats +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +# following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +# disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +# following disclaimer in the documentation and/or other materials provided with the distribution. +# * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# +alert ip [61.174.51.0/24,94.102.49.0/24,185.5.174.0/24,116.10.191.0/24,218.77.79.0/24,74.82.47.0/24,184.105.247.0/24,93.180.5.0/24,93.174.93.0/24,80.82.70.0/24,184.105.139.0/24,198.20.69.0/24,124.232.142.0/24,71.6.167.0/24,66.240.192.0/24,71.6.165.0/24,198.20.99.0/24,190.139.61.0/24,66.240.236.0/24,162.253.66.0/24] any -> $HOME_NET any (msg:"ET DROP Dshield Block Listed Source group 1"; reference:url,feed.dshield.org/block.txt; threshold: type limit, track by_src, seconds 3600, count 1; classtype:misc-attack; flowbits:set,ET.Evil; flowbits:set,ET.DshieldIP; sid:2402000; rev:3403;) diff --git a/code/chef/templates/centos/emerging-dns.rules.erb b/code/chef/templates/centos/emerging-dns.rules.erb new file mode 100755 index 0000000..9be0928 --- /dev/null +++ b/code/chef/templates/centos/emerging-dns.rules.erb @@ -0,0 +1,198 @@ +# Emerging Threats +# +# This distribution may contain rules under two different licenses. +# +# Rules with sids 1 through 3464, and 100000000 through 100000908 are under the GPLv2. +# A copy of that license is available at http://www.gnu.org/licenses/gpl-2.0.html +# +# Rules with sids 2000000 through 2799999 are from Emerging Threats and are covered under the BSD License +# as follows: +# +#************************************************************* +# Copyright (c) 2003-2017, Emerging Threats +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +# following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +# disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +# following disclaimer in the documentation and/or other materials provided with the distribution. +# * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +#************************************************************* +# +# +# +# + +# This Ruleset is EmergingThreats Open optimized for suricata-1.3-enhanced. + +#alert udp any 53 -> $DNS_SERVERS any (msg:"ET DNS Excessive DNS Responses with 1 or more RR's (100+ in 10 seconds) - possible Cache Poisoning Attempt"; byte_test:2,>,0,6; byte_test:2,>,0,10; threshold: type both, track by_src, count 100, seconds 10; reference:url,doc.emergingthreats.net/bin/view/Main/2008446; classtype:bad-unknown; sid:2008446; rev:9; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any 53 -> $HOME_NET any (msg:"ET DNS Excessive NXDOMAIN responses - Possible DNS Backscatter or Domain Generation Algorithm Lookups"; byte_test:1,&,128,2; byte_test:1,&,1,3; byte_test:1,&,2,3; threshold: type both, track by_src, count 50, seconds 10; reference:url,doc.emergingthreats.net/bin/view/Main/2008470; classtype:bad-unknown; sid:2008470; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any 53 -> $HOME_NET any (msg:"ET DNS Query Responses with 3 RR's set (50+ in 2 seconds) - possible NS RR Cache Poisoning Attempt"; content: "|85 00 00 01 00 01 00 01|"; offset: 2; depth:8; threshold: type both, track by_src,count 50, seconds 2; reference:url,infosec20.blogspot.com/2008/07/kaminsky-dns-cache-poisoning-poc.html; reference:url,doc.emergingthreats.net/bin/view/Main/2008447; classtype:bad-unknown; sid:2008447; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any 53 -> $HOME_NET any (msg:"ET DNS Query Responses with 3 RR's set (50+ in 2 seconds) - possible A RR Cache Poisoning Attempt"; content: "|81 80 00 01 00 01 00 01|"; offset: 2; depth:8; threshold: type both, track by_src, count 50, seconds 2; reference:url,infosec20.blogspot.com/2008/07/kaminsky-dns-cache-poisoning-poc.html; reference:url,doc.emergingthreats.net/bin/view/Main/2008475; classtype:bad-unknown; sid:2008475; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp $DNS_SERVERS 53 -> any any (msg:"ET DNS Standard query response, Format error"; pcre:"/^..[\x81\x82\x83\x84\x85\x86\x87]\x81/"; reference:url,doc.emergingthreats.net/2001116; classtype:not-suspicious; sid:2001116; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp $DNS_SERVERS 53 -> any any (msg:"ET DNS Standard query response, Name Error"; pcre:"/^..[\x81\x82\x83\x84\x85\x86\x87]\x83/"; reference:url,doc.emergingthreats.net/2001117; classtype:not-suspicious; sid:2001117; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp $DNS_SERVERS 53 -> any any (msg:"ET DNS Standard query response, Not Implemented"; pcre:"/^..[\x81\x82\x83\x84\x85\x86\x87]\x84/"; reference:url,doc.emergingthreats.net/2001118; classtype:not-suspicious; sid:2001118; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp $DNS_SERVERS 53 -> any any (msg:"ET DNS Standard query response, Refused"; pcre:"/^..[\x81\x82\x83\x84\x85\x86\x87]\x85/"; reference:url,doc.emergingthreats.net/2001119; classtype:not-suspicious; sid:2001119; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 53 (msg:"GPL DNS EXPLOIT named 8.2->8.2.1"; flow:to_server,established; content:"../../../"; reference:bugtraq,788; reference:cve,1999-0833; classtype:attempted-admin; sid:2100258; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 53 (msg:"GPL DNS named overflow ADM"; flow:to_server,established; content:"thisissometempspaceforthesockinaddrinyeahyeahiknowthisislamebutanywaywhocareshorizongotitworkingsoalliscool"; reference:bugtraq,788; reference:cve,1999-0833; classtype:attempted-admin; sid:2100259; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 53 (msg:"GPL DNS named overflow attempt"; flow:to_server,established; content:"|CD 80 E8 D7 FF FF FF|/bin/sh"; reference:url,www.cert.org/advisories/CA-1998-05.html; classtype:attempted-admin; sid:2100261; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 53 (msg:"GPL DNS TCP inverse query overflow"; flow:to_server,established; byte_test:1,<,16,4; byte_test:1,&,8,4; isdataat:400; reference:bugtraq,134; reference:cve,1999-0009; classtype:attempted-admin; sid:2103153; rev:3; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 53 (msg:"GPL DNS named authors attempt"; flow:to_server,established; content:"|07|authors"; offset:12; nocase; content:"|04|bind|00|"; offset:12; nocase; reference:arachnids,480; reference:nessus,10728; classtype:attempted-recon; sid:2101435; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 53 (msg:"GPL DNS named version attempt"; flow:to_server,established; content:"|07|version"; offset:12; nocase; content:"|04|bind|00|"; offset:12; nocase; reference:arachnids,278; reference:nessus,10028; classtype:attempted-recon; sid:2100257; rev:10; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 53 (msg:"GPL DNS zone transfer TCP"; flow:to_server,established; content:"|00 00 FC|"; offset:15; reference:arachnids,212; reference:cve,1999-0532; reference:nessus,10595; classtype:attempted-recon; sid:2100255; rev:14; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert udp $EXTERNAL_NET 53 -> $HOME_NET any (msg:"GPL DNS SPOOF query response PTR with TTL of 1 min. and no authority"; content:"|85 80 00 01 00 01 00 00 00 00|"; content:"|C0 0C 00 0C 00 01 00 00 00|<|00 0F|"; classtype:bad-unknown; sid:2100253; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert udp $EXTERNAL_NET 53 -> $HOME_NET any (msg:"GPL DNS SPOOF query response with TTL of 1 min. and no authority"; content:"|81 80 00 01 00 01 00 00 00 00|"; content:"|C0 0C 00 01 00 01 00 00 00|<|00 04|"; classtype:bad-unknown; sid:2100254; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 53 (msg:"GPL DNS UDP inverse query overflow"; byte_test:1,<,16,2; byte_test:1,&,8,2; isdataat:400; reference:bugtraq,134; reference:cve,1999-0009; classtype:attempted-admin; sid:2103154; rev:3; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 53 (msg:"GPL DNS named authors attempt"; content:"|07|authors"; offset:12; nocase; content:"|04|bind|00|"; offset:12; nocase; reference:nessus,10728; classtype:attempted-recon; sid:2100256; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 53 (msg:"GPL DNS named iquery attempt"; content:"|09 80 00 00 00 01 00 00 00 00|"; depth:16; offset:2; reference:bugtraq,134; reference:cve,1999-0009; reference:url,www.rfc-editor.org/rfc/rfc1035.txt; classtype:attempted-recon; sid:2100252; rev:9; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 53 (msg:"GPL DNS named version attempt"; content:"|07|version"; offset:12; nocase; content:"|04|bind|00|"; offset:12; nocase; reference:nessus,10028; classtype:attempted-recon; sid:2101616; rev:9; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 53 (msg:"GPL DNS zone transfer UDP"; content:"|00 00 FC|"; offset:14; reference:cve,1999-0532; reference:nessus,10595; classtype:attempted-recon; sid:2101948; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS DNS Query for Suspicious .com.ru Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|03|com|02|ru|00|"; fast_pattern; nocase; distance:0; reference:url,sign.kaffenews.com/?p=104; classtype:bad-unknown; sid:2011407; rev:3; metadata:created_at 2010_09_27, updated_at 2010_09_27;) + +#alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS DNS Query for Suspicious .com.cn Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|03|com|02|cn|00|"; fast_pattern; nocase; distance:0; reference:url,sign.kaffenews.com/?p=104; classtype:bad-unknown; sid:2011408; rev:3; metadata:created_at 2010_09_27, updated_at 2010_09_27;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS DNS Query for Suspicious .co.cc Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|co|02|cc|00|"; fast_pattern; nocase; distance:0; reference:url,sign.kaffenews.com/?p=104; classtype:bad-unknown; sid:2011409; rev:3; metadata:created_at 2010_09_27, updated_at 2010_09_27;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS DNS Query for Suspicious .cz.cc Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|cz|02|cc|00|"; fast_pattern; nocase; distance:0; reference:url,sign.kaffenews.com/?p=104; classtype:bad-unknown; sid:2011410; rev:3; metadata:created_at 2010_09_27, updated_at 2010_09_27;) + +#alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS DNS Query for Suspicious .co.kr Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|co|02|kr|00|"; fast_pattern; nocase; distance:0; reference:url,sign.kaffenews.com/?p=104; classtype:bad-unknown; sid:2011411; rev:3; metadata:created_at 2010_09_27, updated_at 2010_09_27;) + +alert udp ![$SMTP_SERVERS,$DNS_SERVERS] any -> $DNS_SERVERS 53 (msg:"ET DNS DNS Lookup for localhost.DOMAIN.TLD"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|09|localhost"; fast_pattern; nocase; classtype:bad-unknown; sid:2011802; rev:3; metadata:created_at 2010_10_12, updated_at 2010_10_12;) + +alert udp $HOME_NET any -> any 53 (msg:"ET DNS Hiloti DNS CnC Channel Successful Install Message"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|05|empty"; nocase; distance:0; content:"|0C|explorer_exe"; nocase; distance:0; reference:url,sign.kaffenews.com/?p=104; reference:url,blog.fortinet.com/hiloti-the-botmaster-of-disguise/; classtype:bad-unknown; sid:2011911; rev:2; metadata:created_at 2010_11_09, updated_at 2010_11_09;) + +alert udp $HOME_NET any -> any 53 (msg:"ET DNS DNS Query for a Suspicious Malware Related Numerical .in Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|in|00|"; fast_pattern; nocase; distance:0; pcre:"/\x00[0-9]{4,7}\x02in\x00/i"; reference:url,sign.kaffenews.com/?p=104; reference:url,www.isc.sans.org/diary.html?storyid=10165; classtype:bad-unknown; sid:2012115; rev:6; metadata:created_at 2011_12_30, updated_at 2011_12_30;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query to a .tk domain - Likely Hostile"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|tk|00|"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2012811; rev:2; metadata:created_at 2011_05_15, updated_at 2011_05_15;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS DNS Query to a Suspicious *.vv.cc domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|vv|02|cc|00|"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2012826; rev:1; metadata:created_at 2011_05_19, updated_at 2011_05_19;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS DNS Query for a Suspicious *.ae.am domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|ae|02|am"; fast_pattern; classtype:bad-unknown; sid:2012900; rev:3; metadata:created_at 2011_05_31, updated_at 2011_05_31;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for a Suspicious *.noc.su domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|03|noc|02|su"; fast_pattern:only; classtype:bad-unknown; sid:2012901; rev:2; metadata:created_at 2011_05_31, updated_at 2011_05_31;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS DNS Query for a Suspicious *.be.ma domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|be|02|ma"; fast_pattern; distance:0; classtype:bad-unknown; sid:2012902; rev:3; metadata:created_at 2011_05_31, updated_at 2011_05_31;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS DNS Query for a Suspicious *.qc.cx domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|qc|02|cx"; fast_pattern; classtype:bad-unknown; sid:2012903; rev:3; metadata:created_at 2011_05_31, updated_at 2011_05_31;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS DNS Query for a Suspicious *.co.tv domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|co|02|tv"; fast_pattern; classtype:bad-unknown; sid:2012956; rev:3; metadata:created_at 2011_06_08, updated_at 2011_06_08;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS DNS Query for Illegal Drug Sales Site (SilkRoad)"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|10|ianxz6zefk72ulzz|05|onion"; classtype:policy-violation; sid:2013016; rev:2; metadata:created_at 2011_06_13, updated_at 2011_06_13;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS DNS Query for Suspicious .co.be Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|co|02|be"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013124; rev:3; metadata:created_at 2011_06_28, updated_at 2011_06_28;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS DNS Query for a Suspicious *.cu.cc domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|cu|02|cc"; fast_pattern; classtype:bad-unknown; sid:2013172; rev:2; metadata:created_at 2011_07_02, updated_at 2011_07_02;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .net.tf Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|03|net|02|tf"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013847; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .eu.tf Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|eu|02|tf"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013848; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .int.tf Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|03|int|02|tf"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013849; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .edu.tf Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|03|edu|02|tf"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013850; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .us.tf Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|us|02|tf"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013851; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .ca.tf Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|ca|02|tf"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013852; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .bg.tf Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|bg|02|tf"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013853; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .ru.tf Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|ru|02|tf"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013854; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .pl.tf Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|pl|02|tf"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013855; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .cz.tf Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|cz|02|tf"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013856; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .de.tf Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|de|02|tf"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013857; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .at.tf Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|at|02|tf"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013858; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .ch.tf Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|ch|02|tf"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013859; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .sg.tf Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|sg|02|tf"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013860; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .nl.ai Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|nl|02|ai"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013861; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .xe.cx Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|xe|02|cx"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013862; rev:1; metadata:created_at 2011_11_07, updated_at 2011_11_07;) + +alert udp any 53 -> $DNS_SERVERS any (msg:"ET DNS Excessive DNS Responses with 1 or more RR's (100+ in 10 seconds) to google.com.br possible Cache Poisoning Attempt"; byte_test:2,>,0,6; byte_test:2,>,0,10; threshold: type both, track by_src, count 100, seconds 10; content:"|06|google|03|com|02|br|00|"; reference:url,www.securelist.com/en/blog/208193214/Massive_DNS_poisoning_attacks_in_Brazil; reference:url,www.zdnet.com/blog/security/massive-dns-poisoning-attack-in-brazil-serving-exploits-and-malware/9780; classtype:bad-unknown; sid:2013894; rev:5; metadata:created_at 2011_11_10, updated_at 2011_11_10;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for Suspicious .noip.cn Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|03|noip|02|cn|00|"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2013970; rev:1; metadata:created_at 2011_11_28, updated_at 2011_11_28;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query for .su TLD (Soviet Union) Often Malware Related"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|su|00|"; fast_pattern; distance:0; nocase; reference:url,www.abuse.ch/?p=3581; classtype:bad-unknown; sid:2014169; rev:1; metadata:created_at 2012_01_31, updated_at 2012_01_31;) + +alert udp $HOME_NET any -> any 53 (msg:"ET DNS DNS Query for Suspicious .ch.vu Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|ch|02|vu"; fast_pattern; nocase; distance:0; reference:url,google.com/safebrowsing/diagnostic?site=ch.vu; classtype:bad-unknown; sid:2014285; rev:4; metadata:created_at 2012_02_27, updated_at 2012_02_27;) + +alert udp $HOME_NET !9987 -> $EXTERNAL_NET 53 (msg:"ET DNS Non-DNS or Non-Compliant DNS traffic on DNS port Opcode 6 or 7 set"; content:!"7PYqwfzt"; depth:8; byte_test:1,!&,64,2; byte_test:1,&,32,2; byte_test:1,&,16,2; threshold: type limit, count 1, seconds 120, track by_dst; reference:md5,a56ec0f9bd46f921f65e4f6e598e5ed0; reference:url,vrt-blog.snort.org/2008/08/checking-multiple-bits-in-flag-field_29.html; classtype:policy-violation; sid:2014701; rev:12; metadata:created_at 2012_05_03, updated_at 2016_07_12;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Non-DNS or Non-Compliant DNS traffic on DNS port Opcode 8 through 15 set"; content:!"7PYqwfzt"; depth:8; byte_test:1,&,64,2; threshold: type limit, count 1, seconds 120, track by_dst; reference:md5,a56ec0f9bd46f921f65e4f6e598e5ed0; reference:url,vrt-blog.snort.org/2008/08/checking-multiple-bits-in-flag-field_29.html; classtype:policy-violation; sid:2014702; rev:9; metadata:created_at 2012_05_03, updated_at 2016_07_12;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Non-DNS or Non-Compliant DNS traffic on DNS port Reserved Bit Set"; content:!"7PYqwfzt"; depth:8; byte_test:1,&,64,3; threshold: type limit, count 1, seconds 120, track by_dst; reference:md5,a56ec0f9bd46f921f65e4f6e598e5ed0; reference:url,vrt-blog.snort.org/2008/08/checking-multiple-bits-in-flag-field_29.html; classtype:policy-violation; sid:2014703; rev:9; metadata:created_at 2012_05_03, updated_at 2016_07_12;) + +alert udp $HOME_NET any -> any 53 (msg:"ET DNS Query for a Suspicious *.upas.su domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|04|upas|02|su|00|"; fast_pattern; nocase; distance:0; classtype:bad-unknown; sid:2015550; rev:1; metadata:created_at 2012_07_31, updated_at 2012_07_31;) + +alert udp $EXTERNAL_NET 53 -> $HOME_NET any (msg:"ET DNS Reply Sinkhole - sinkhole.cert.pl 148.81.111.111"; content:"|00 01 00 01|"; content:"|00 04 94 51 6f 6f|"; distance:4; within:6; classtype:trojan-activity; sid:2016413; rev:4; metadata:created_at 2013_02_14, updated_at 2013_02_14;) + +alert udp $EXTERNAL_NET 53 -> $HOME_NET any (msg:"ET DNS Reply Sinkhole - Dr. Web"; content:"|00 01 00 01|"; content:"|00 04 5b e9 f4 6a|"; distance:4; within:6; reference:url,virustracker.info; classtype:trojan-activity; sid:2016418; rev:5; metadata:created_at 2013_02_16, updated_at 2013_02_16;) + +alert udp $EXTERNAL_NET 53 -> $HOME_NET any (msg:"ET DNS Reply Sinkhole - Zinkhole.org"; content:"|00 01 00 01|"; content:"|00 04 b0 1f 3e 4c|"; distance:4; within:6; classtype:trojan-activity; sid:2016419; rev:5; metadata:created_at 2013_02_16, updated_at 2013_02_16;) + +alert udp $EXTERNAL_NET 53 -> $HOME_NET any (msg:"ET DNS Reply Sinkhole - German Company"; content:"|00 01 00 01|"; content:"|00 04 52 a5 19 a7|"; distance:4; within:6; reference:url,virustracker.info; classtype:trojan-activity; sid:2016420; rev:5; metadata:created_at 2013_02_16, updated_at 2013_02_16;) + +alert udp $EXTERNAL_NET 53 -> $HOME_NET any (msg:"ET DNS Reply Sinkhole - 1and1 Internet AG"; content:"|00 01 00 01|"; content:"|00 04 52 a5 19 d2|"; distance:4; within:6; reference:url,virustracker.info; classtype:trojan-activity; sid:2016421; rev:5; metadata:created_at 2013_02_16, updated_at 2013_02_16;) + +alert udp $EXTERNAL_NET 53 -> $HOME_NET any (msg:"ET DNS Reply Sinkhole - Georgia Tech (1)"; content:"|00 01 00 01|"; content:"|00 04 c6 3d e3 06|"; distance:4; within:6; reference:url,virustracker.info; classtype:trojan-activity; sid:2016422; rev:5; metadata:created_at 2013_02_16, updated_at 2013_02_16;) + +alert udp $EXTERNAL_NET 53 -> $HOME_NET any (msg:"ET DNS Reply Sinkhole - Georgia Tech (2)"; content:"|00 01 00 01|"; content:"|00 04 32 3e 0c 67|"; distance:4; within:6; reference:url,virustracker.info; classtype:trojan-activity; sid:2016423; rev:6; metadata:created_at 2013_02_16, updated_at 2013_02_16;) + +alert udp $HOME_NET any -> any 53 (msg:"ET DNS APT_NGO_wuaclt C2 Domain micorsofts.net"; content:"|0a|micorsofts|03|net|00|"; nocase; fast_pattern:only; threshold: type limit, track by_src, count 1, seconds 300; reference:url,labs.alienvault.com; classtype:bad-unknown; sid:2016569; rev:3; metadata:created_at 2013_03_13, updated_at 2013_03_13;) + +alert udp $HOME_NET any -> any 53 (msg:"ET DNS APT_NGO_wuaclt C2 Domain micorsofts.com"; content:"|0a|micorsofts|03|com|00|"; nocase; fast_pattern:only; threshold: type limit, track by_src, count 1, seconds 300; reference:url,labs.alienvault.com; classtype:bad-unknown; sid:2016570; rev:2; metadata:created_at 2013_03_13, updated_at 2013_03_13;) + +alert udp $HOME_NET any -> any 53 (msg:"ET DNS APT_NGO_wuaclt C2 Domain hotmal1.com"; content:"|07|hotmal1|03|com|00|"; nocase; fast_pattern:only; threshold: type limit, track by_src, count 1, seconds 300; reference:url,labs.alienvault.com; classtype:bad-unknown; sid:2016571; rev:1; metadata:created_at 2013_03_13, updated_at 2013_03_13;) + +alert udp any 53 -> $HOME_NET any (msg:"ET DNS Reply Sinkhole - 106.187.96.49 blacklistthisdomain.com"; content:"|00 01 00 01|"; content:"|00 04 6a bb 60 31|"; distance:4; within:6; classtype:trojan-activity; sid:2016591; rev:6; metadata:created_at 2013_03_18, updated_at 2013_03_18;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET DNS Query to a *.pw domain - Likely Hostile"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|02|pw|00|"; fast_pattern; nocase; distance:0; content:!"|01|u|02|pw|00|"; nocase; classtype:bad-unknown; sid:2016778; rev:4; metadata:created_at 2013_04_19, updated_at 2013_04_19;) + +alert udp $HOME_NET any -> $EXTERNAL_NET any (msg:"ET DNS DNS Query for vpnoverdns - indicates DNS tunnelling"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|03|tun|10|vpnoverdns|03|com|00|"; fast_pattern; nocase; distance:0; reference:url,osint.bambenekconsulting.com/manual/vpnoverdns.txt; classtype:bad-unknown; sid:2018438; rev:2; metadata:created_at 2014_05_01, updated_at 2014_05_01;) + +alert udp any 53 -> $HOME_NET any (msg:"ET DNS Reply Sinkhole FBI Zeus P2P 1 - 142.0.36.234"; content:"|00 01 00 01|"; content:"|00 04 8e 00 24 ea|"; distance:4; within:6; classtype:trojan-activity; sid:2018517; rev:1; metadata:created_at 2014_06_03, updated_at 2014_06_03;) + +alert udp $HOME_NET any -> any 53 (msg:"ET DNS Query to a *.top domain - Likely Hostile"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|03|top|00|"; fast_pattern; nocase; distance:0; threshold:type limit, track by_src, count 1, seconds 30; reference:url,www.symantec.com/connect/blogs/shady-tld-research-gdn-and-our-2016-wrap; reference:url,www.spamhaus.org/statistics/tlds/; classtype:bad-unknown; sid:2023883; rev:1; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, attack_target Client_Endpoint, deployment Perimeter, signature_severity Major, created_at 2017_02_07, updated_at 2017_02_07;) + diff --git a/code/chef/templates/centos/emerging-dos.rules.erb b/code/chef/templates/centos/emerging-dos.rules.erb new file mode 100755 index 0000000..4d22866 --- /dev/null +++ b/code/chef/templates/centos/emerging-dos.rules.erb @@ -0,0 +1,254 @@ +# Emerging Threats +# +# This distribution may contain rules under two different licenses. +# +# Rules with sids 1 through 3464, and 100000000 through 100000908 are under the GPLv2. +# A copy of that license is available at http://www.gnu.org/licenses/gpl-2.0.html +# +# Rules with sids 2000000 through 2799999 are from Emerging Threats and are covered under the BSD License +# as follows: +# +#************************************************************* +# Copyright (c) 2003-2017, Emerging Threats +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +# following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +# disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +# following disclaimer in the documentation and/or other materials provided with the distribution. +# * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +#************************************************************* +# +# +# +# + +# This Ruleset is EmergingThreats Open optimized for suricata-1.3-enhanced. + +#alert udp any any -> any 53 (msg:"ET DOS DNS BIND 9 Dynamic Update DoS attempt"; byte_test:1,&,40,2; byte_test:1,>,0,5; byte_test:1,>,0,1; content:"|00 00 06|"; offset:8; content:"|c0 0c 00 ff|"; distance:2; reference:cve,2009-0696; reference:url,doc.emergingthreats.net/2009701; classtype:attempted-dos; sid:2009701; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET [22,23,80,443,10000] (msg:"ET DOS Possible Cisco PIX/ASA Denial Of Service Attempt (Hping Created Packets)"; flow:to_server; content:"|58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58|"; depth:40; content:"|58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58|"; distance:300; isdataat:300,relative; threshold: type threshold, track by_src, count 60, seconds 80; reference:url,www.securityfocus.com/bid/34429/info; reference:url,www.securityfocus.com/bid/34429/exploit; reference:url,www.cisco.com/en/US/products/products_applied_mitigation_bulletin09186a0080a99518.html; reference:cve,2009-1157; reference:url,doc.emergingthreats.net/2010624; classtype:attempted-dos; sid:2010624; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 5060 (msg:"ET DOS Possible Cisco ASA 5500 Series Adaptive Security Appliance Remote SIP Inspection Device Reload Denial of Service Attempt"; flow:established,to_server; content:"REGISTER"; depth:8; nocase; isdataat:400,relative; pcre:"/REGISTER.{400}/smi"; reference:url,tools.cisco.com/security/center/viewAlert.x?alertId=19915; reference:cve,2010-0569; reference:url,doc.emergingthreats.net/2010817; classtype:attempted-dos; sid:2010817; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 514 (msg:"ET DOS Cisco 514 UDP flood DoS"; content:"|25 25 25 25 25 58 58 25 25 25 25 25|"; reference:url,www.cisco.com/warp/public/707/IOS-cbac-dynacl-pub.shtml; reference:url,doc.emergingthreats.net/bin/view/Main/2000010; classtype:attempted-dos; sid:2000010; rev:11; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 23 (msg:"ET DOS Catalyst memory leak attack"; flow: to_server,established; content:"|41 41 41 0a|"; depth: 20; reference:url,www.cisco.com/en/US/products/products_security_advisory09186a00800b138e.shtml; reference:url,doc.emergingthreats.net/bin/view/Main/2000011; classtype:attempted-dos; sid:2000011; rev:8; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET DOS Cisco Router HTTP DoS"; flow:to_server,established; content:"/%%"; http_uri; reference:url,www.cisco.com/warp/public/707/cisco-sn-20040326-exploits.shtml; classtype:attempted-dos; sid:2000006; rev:13; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET DOS Cisco 4200 Wireless Lan Controller Long Authorisation Denial of Service Attempt"; flow:to_server,established; content:"GET"; http_method; nocase; content:"/screens/frameset.html"; fast_pattern; http_uri; nocase; content:"Authorization|3A 20|Basic"; nocase; content:!"|0a|"; distance:2; within:118; isdataat:120,relative; pcre:"/^Authorization\x3A Basic.{120}/Hmi"; reference:url,www.securityfocus.com/bid/35805; reference:url,www.cisco.com/warp/public/707/cisco-amb-20090727-wlc.shtml; reference:cve,2009-1164; reference:url,doc.emergingthreats.net/2010674; classtype:attempted-dos; sid:2010674; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 6014 (msg:"ET DOS IBM DB2 kuddb2 Remote Denial of Service Attempt"; flow:established,to_server; content:"|00 05 03 31 41|"; reference:url,www.securityfocus.com/bid/38018; reference:url,intevydis.blogspot.com/2010/01/ibm-db2-97-kuddb2-dos.html; reference:url,doc.emergingthreats.net/2010755; classtype:attempted-dos; sid:2010755; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 2049 (msg:"ET DOS FreeBSD NFS RPC Kernel Panic"; flow:to_server,established; content:"|00 01 86 a5|"; offset:16; depth:4; content:"|00 00 00 01|"; distance:4; within:4; content:"|00 00 00 00|"; offset:8; depth:4; content:"|00 00 00 00 00 00|"; offset:0; depth:6; reference:cve,2006-0900; reference:bugtraq,19017; reference:url,doc.emergingthreats.net/bin/view/Main/2002853; classtype:attempted-dos; sid:2002853; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 1755 (msg:"ET DOS Microsoft Streaming Server Malformed Request"; flow:established,to_server; content:"MSB "; depth:4; content:"|06 01 07 00 24 00 00 40 00 00 00 00 00 00 01 00 00 00|"; distance:0; within:18; reference:bugtraq,1282; reference:url,www.microsoft.com/technet/security/bulletin/ms00-038.mspx; reference:url,doc.emergingthreats.net/bin/view/Main/2002843; classtype:attempted-dos; sid:2002843; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert icmp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET DOS ICMP Path MTU lowered below acceptable threshold"; itype: 3; icode: 4; byte_test:2,<,576,6; byte_test:2,!=,0,7; reference:cve,CAN-2004-1060; reference:url,www.microsoft.com/technet/security/bulletin/MS05-019.mspx; reference:url,isc.sans.org/diary.php?date=2005-04-12; reference:url,doc.emergingthreats.net/bin/view/Main/2001882; classtype:denial-of-service; sid:2001882; rev:10; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 1433 (msg:"ET DOS Possible Microsoft SQL Server Remote Denial Of Service Attempt"; flow: established,to_server; content:"|10 00 00 10 cc|"; depth:5; reference:bugtraq,11265; reference:url,doc.emergingthreats.net/bin/view/Main/2001366; classtype:attempted-dos; sid:2001366; rev:10; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 445 (msg:"ET DOS NetrWkstaUserEnum Request with large Preferred Max Len"; flow:established,to_server; content:"|ff|SMB"; content:"|10 00 00 00|"; distance:0; content:"|02 00|"; distance:14; within:2; byte_jump:4,12,relative,little,multiplier 2; content:"|00 00 00 00 00 00 00 00|"; distance:12; within:8; byte_test:4,>,2,0,relative; reference:cve,2006-6723; reference:url,doc.emergingthreats.net/bin/view/Main/2003236; classtype:attempted-dos; sid:2003236; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $SMTP_SERVERS 25 (msg:"ET DOS Excessive SMTP MAIL-FROM DDoS"; flow: to_server, established; content:"MAIL FROM|3a|"; nocase; window: 0; id:0; threshold: type limit, track by_src, count 30, seconds 60; reference:url,doc.emergingthreats.net/bin/view/Main/2001795; classtype:denial-of-service; sid:2001795; rev:9; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 3306 (msg:"ET DOS Possible MYSQL GeomFromWKB() function Denial Of Service Attempt"; flow:to_server,established; content:"SELECT"; nocase; content:"geometrycollectionfromwkb"; distance:0; nocase; pcre:"/SELECT.+geometrycollectionfromwkb/si"; reference:url,www.securityfocus.com/bid/37297/info; reference:url,marc.info/?l=oss-security&m=125881733826437&w=2; reference:url,downloads.securityfocus.com/vulnerabilities/exploits/37297.txt; reference:cve,2009-4019; reference:url,doc.emergingthreats.net/2010491; classtype:attempted-dos; sid:2010491; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 3306 (msg:"ET DOS Possible MYSQL SELECT WHERE to User Variable Denial Of Service Attempt"; flow:to_server,established; content:"SELECT"; nocase; content:"WHERE"; distance:0; nocase; content:"SELECT"; nocase; content:"INTO"; distance:0; nocase; content:"|60|"; within:50; content:"|60|"; pcre:"/SELECT.+WHERE.+SELECT.+\x60/si"; reference:url,www.securityfocus.com/bid/37297/info; reference:url,marc.info/?l=oss-security&m=125881733826437&w=2; reference:url,downloads.securityfocus.com/vulnerabilities/exploits/37297-2.txt; reference:cve,2009-4019; reference:url,doc.emergingthreats.net/2010492; classtype:attempted-dos; sid:2010492; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 3306 (msg:"ET DOS Possible MySQL ALTER DATABASE Denial Of Service Attempt"; flow:established,to_server; content:"ALTER "; nocase; content:"DATABASE"; nocase; within:12; content:"|22|."; distance:0; content:"UPGRADE "; nocase; distance:0; content:"DATA"; nocase; within:8; pcre:"/ALTER.+DATABASE.+\x22\x2E(\x22|\x2E\x22|\x2E\x2E\x2F\x22).+UPGRADE.+DATA/si"; reference:url,securitytracker.com/alerts/2010/Jun/1024160.html; reference:url,dev.mysql.com/doc/refman/5.1/en/alter-database.html; reference:cve,2010-2008; reference:url,doc.emergingthreats.net/2011761; classtype:attempted-dos; sid:2011761; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert http $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"ET DOS Netgear DG632 Web Management Denial Of Service Attempt"; flow:established,to_server; content:"POST"; http_method; content:"/cgi-bin/firmwarecfg"; http_uri; nocase; reference:url, securitytracker.com/alerts/2009/Jun/1022403.html; reference:cve,2009-2256; reference:url,doc.emergingthreats.net/2010554; classtype:attempted-dos; sid:2010554; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"ET DOS Large amount of TCP ZeroWindow - Possible Nkiller2 DDos attack"; flags:A; window:0; threshold: type both, track by_src, count 100, seconds 60; reference:url,doc.emergingthreats.net/2009414; classtype:attempted-dos; sid:2009414; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert udp $EXTERNAL_NET 123 -> $HOME_NET 123 (msg:"ET DOS Potential Inbound NTP denial-of-service attempt (repeated mode 7 request)"; dsize:1; content:"|17|"; threshold:type limit, count 1, seconds 60, track by_src; reference:url,www.kb.cert.org/vuls/id/568372; reference:cve,2009-3563; reference:url,doc.emergingthreats.net/2010486; classtype:attempted-dos; sid:2010486; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert udp $EXTERNAL_NET 123 -> $HOME_NET 123 (msg:"ET DOS Potential Inbound NTP denial-of-service attempt (repeated mode 7 reply)"; dsize:4; content:"|97 00 00 00|"; threshold:type limit, count 1, seconds 60, track by_src; reference:url,www.kb.cert.org/vuls/id/568372; reference:cve,2009-3563; reference:url,doc.emergingthreats.net/2010487; classtype:attempted-dos; sid:2010487; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 69 (msg:"ET DOS Possible SolarWinds TFTP Server Read Request Denial Of Service Attempt"; content:"|00 01 01|"; depth:3; content:"NETASCII"; reference:url,www.exploit-db.com/exploits/12683/; reference:url,doc.emergingthreats.net/2011673; classtype:attempted-dos; sid:2011673; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 69 (msg:"ET DOS SolarWinds TFTP Server Long Write Request Denial Of Service Attempt"; content:"|00 02|"; depth:2; isdataat:1000,relative; content:!"|0A|"; within:1000; content:"NETASCII"; distance:1000; reference:url,www.exploit-db.com/exploits/13836/; reference:url,doc.emergingthreats.net/2011674; classtype:attempted-dos; sid:2011674; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 5900 (msg:"ET DOS Possible VNC ClientCutText Message Denial of Service/Memory Corruption Attempt"; flow:established,to_server; content:"|06|"; depth:1; isdataat:1000,relative; content:!"|0A|"; within:1000; reference:url,www.fortiguard.com/encyclopedia/vulnerability/vnc.server.clientcuttext.message.memory.corruption.html; reference:url,doc.emergingthreats.net/2011732; classtype:attempted-dos; sid:2011732; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"GPL DOS IGMP dos attack"; fragbits:M+; ip_proto:2; reference:bugtraq,514; reference:cve,1999-0918; reference:url,www.microsoft.com/technet/security/bulletin/MS99-034.mspx; classtype:attempted-dos; sid:2100272; rev:11; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"GPL DOS Jolt attack"; dsize:408; fragbits:M; reference:cve,1999-0345; classtype:attempted-dos; sid:2100268; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp any any -> $HOME_NET 3000 (msg:"ET DOS ntop Basic-Auth DOS inbound"; flow:established,to_server; content:"GET "; nocase; depth:4; content:"/configNtop.html"; distance:0; within:20; nocase; content:"Authorization|3a|"; nocase; content: "Basic"; distance:0; within:20; content:"=="; distance:0; within:100; reference:url,www.securityfocus.com/bid/36074; reference:url,www.securityfocus.com/archive/1/505862; reference:url,www.securityfocus.com/archive/1/505876; classtype:denial-of-service; sid:2011511; rev:1; metadata:created_at 2010_09_27, updated_at 2010_09_27;) + +alert tcp $HOME_NET any -> any 3000 (msg:"ET DOS ntop Basic-Auth DOS outbound"; flow:established,to_server; content:"GET "; nocase; depth:4; content:"/configNtop.html"; distance:0; within:20; nocase; content:"Authorization|3a|"; nocase; content: "Basic"; distance:0; within:20; content:"=="; distance:0; within:100; reference:url,www.securityfocus.com/bid/36074; reference:url,www.securityfocus.com/archive/1/505862; reference:url,www.securityfocus.com/archive/1/505876; classtype:denial-of-service; sid:2011512; rev:1; metadata:created_at 2010_09_27, updated_at 2010_09_27;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET DOS User-Agent used in known DDoS Attacks Detected outbound"; flow:established,to_server; content:"User-agent|3a| Mozilla/5.0 (Windows|3b| U|3b| Windows NT 5.1|3b| ru|3b| rv|3a|1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"; http_header; reference:url,www.linuxquestions.org/questions/linux-security-4/massive-ddos-need-advice-help-795298/; classtype:denial-of-service; sid:2011821; rev:3; metadata:created_at 2010_10_18, updated_at 2010_10_18;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET DOS User-Agent used in known DDoS Attacks Detected inbound"; flow:established,to_server; content:"User-agent|3a| Mozilla/5.0 (Windows|3b| U|3b| Windows NT 5.1|3b| ru|3b| rv|3a|1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"; http_header; reference:url,www.linuxquestions.org/questions/linux-security-4/massive-ddos-need-advice-help-795298/; classtype:denial-of-service; sid:2011822; rev:3; metadata:created_at 2010_10_18, updated_at 2010_10_18;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET DOS User-Agent used in known DDoS Attacks Detected outbound 2"; flow:established,to_server; content:"User-agent|3a| Opera/9.02 (Windows NT 5.1|3b| U|3b| ru)"; http_header; reference:url,www.linuxquestions.org/questions/linux-security-4/massive-ddos-need-advice-help-795298/; classtype:denial-of-service; sid:2011823; rev:3; metadata:created_at 2010_10_18, updated_at 2010_10_18;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET DOS User-Agent used in known DDoS Attacks Detected inbound 2"; flow:established,to_server; content:"User-agent|3a| Opera/9.02 (Windows NT 5.1|3b| U|3b| ru)"; http_header; reference:url,www.linuxquestions.org/questions/linux-security-4/massive-ddos-need-advice-help-795298/; classtype:denial-of-service; sid:2011824; rev:4; metadata:created_at 2010_10_18, updated_at 2010_10_18;) + +#alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"ET DOS Outbound Low Orbit Ion Cannon LOIC Tool Internal User May Be Participating in DDOS"; flow:to_server,established; content:"hihihihihihihihihihihihihihihihi"; nocase; threshold: type limit,track by_src,seconds 180,count 1; reference:url,www.isc.sans.org/diary.html?storyid=10051; classtype:trojan-activity; sid:2012048; rev:5; metadata:created_at 2010_12_13, updated_at 2010_12_13;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET DOS Inbound Low Orbit Ion Cannon LOIC DDOS Tool desu string"; flow:to_server,established; content:"desudesudesu"; nocase; threshold: type limit,track by_src,seconds 180,count 1; reference:url,www.isc.sans.org/diary.html?storyid=10051; classtype:trojan-activity; sid:2012049; rev:5; metadata:created_at 2010_12_13, updated_at 2010_12_13;) + +#alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"ET DOS Outbound Low Orbit Ion Cannon LOIC Tool Internal User May Be Participating in DDOS desu string"; flow:to_server,established; content:"desudesudesu"; nocase; threshold: type limit,track by_src,seconds 180,count 1; reference:url,www.isc.sans.org/diary.html?storyid=10051; classtype:trojan-activity; sid:2012050; rev:5; metadata:created_at 2010_12_13, updated_at 2010_12_13;) + +alert http $EXTERNAL_NET any -> $HOME_NET 9495 (msg:"ET DOS IBM Tivoli Endpoint Buffer Overflow Attempt"; flow:established,to_server; content:"POST"; http_method; isdataat:261; content:!"|0A|"; depth:261; reference:url, zerodayinitiative.com/advisories/ZDI-11-169/; classtype:denial-of-service; sid:2012938; rev:2; metadata:created_at 2011_06_07, updated_at 2011_06_07;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET DOS Skype FindCountriesByNamePattern property Buffer Overflow Attempt"; flow:to_client,established; file_data; content:"]*classid\s*=\s*[\x22\x27]?\s*clsid\s*\x3a\s*\x7B?\s*22C83263-E4B8-4233-82CD-FB047C6BF13E/si"; reference:url,garage4hackers.com/f43/skype-5-x-activex-crash-poc-981.html; classtype:web-application-attack; sid:2013462; rev:3; metadata:created_at 2011_08_26, updated_at 2011_08_26;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET DOS Skype FindCountriesByNamePattern property Buffer Overflow Attempt Format String Function Call"; flow:to_client,established; file_data; content:"ActiveXObject"; nocase; content:"SkypePNRLib.PNR"; nocase; distance:0; content:".FindCountriesByNamePattern"; nocase; reference:url,garage4hackers.com/f43/skype-5-x-activex-crash-poc-981.html; classtype:attempted-user; sid:2013463; rev:3; metadata:created_at 2011_08_26, updated_at 2011_08_26;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET DOS LOIC Javascript DDoS Outbound"; flow:established,to_server; content:"GET"; http_method; content:"/?id="; fast_pattern; http_uri; depth:5; content:"&msg="; http_uri; distance:13; within:5; pcre:"/^\/\?id=[0-9]{13}&msg=/U"; threshold: type both, track by_src, count 5, seconds 60; reference:url,isc.sans.org/diary/Javascript+DDoS+Tool+Analysis/12442; reference:url,www.wired.com/threatlevel/2012/01/anons-rickroll-botnet; classtype:attempted-dos; sid:2014141; rev:5; metadata:created_at 2012_01_23, updated_at 2012_01_23;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET DOS High Orbit Ion Cannon (HOIC) Attack Inbound Generic Detection Double Spaced UA"; flow:established,to_server; content:"User-Agent|3a 20 20|"; http_raw_header; content:"User-Agent|3a 20 20|"; fast_pattern:only; threshold: type both, track by_src, count 225, seconds 60; reference:url,blog.spiderlabs.com/2012/01/hoic-ddos-analysis-and-detection.html; classtype:attempted-dos; sid:2014153; rev:5; metadata:created_at 2012_01_27, updated_at 2012_01_27;) + +alert tcp any any -> $HOME_NET 3389 (msg:"ET DOS Microsoft Remote Desktop (RDP) Syn then Reset 30 Second DoS Attempt"; flags:R; flow:to_server; flowbits:isset,ms.rdp.synack; flowbits:isnotset,ms.rdp.established; flowbits:unset,ms.rdp.synack; reference:cve,2012-0152; classtype:attempted-dos; sid:2014384; rev:8; metadata:created_at 2012_03_13, updated_at 2012_03_13;) + +alert tcp $HOME_NET 3389 -> any any (msg:"ET DOS Microsoft Remote Desktop (RDP) Syn/Ack Outbound Flowbit Set"; flow:from_server; flags:SA; flowbits:isnotset,ms.rdp.synack; flowbits:set,ms.rdp.synack; flowbits:noalert; reference:cve,2012-0152; classtype:not-suspicious; sid:2014385; rev:5; metadata:created_at 2012_03_15, updated_at 2012_03_15;) + +alert tcp any any -> $HOME_NET 3389 (msg:"ET DOS Microsoft Remote Desktop (RDP) Session Established Flowbit Set"; flow:to_server,established; flowbits:isset,ms.rdp.synack; flowbits:unset,ms.rdp.synack; flowbits:set,ms.rdp.established; flowbits:noalert; reference:cve,2012-0152; classtype:not-suspicious; sid:2014386; rev:2; metadata:created_at 2012_03_15, updated_at 2012_03_15;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 3389 (msg:"ET DOS Microsoft Remote Desktop Protocol (RDP) maxChannelIds DoS Attempt Negative INT"; flow:to_server,established; content:"|03 00|"; depth:2; content:"|e0|"; distance:3; within:1; content:"|03 00|"; distance:0; content:"|f0|"; distance:3; within:1; content:"|7f 65|"; distance:1; within:2; content:"|04 01 01 04 01 01 01 01 ff 30|"; distance:3; within:10; content:"|02|"; distance:1; within:1; byte_test:1,<,0x80,0,relative,big; byte_test:1,&,0x80,1,relative,big; reference:url,www.msdn.microsoft.com/en-us/library/cc240836.aspx; reference:cve,2012-0002; reference:url,technet.microsoft.com/en-us/security/bulletin/ms12-020; reference:url,stratsec.blogspot.com.au/2012/03/ms12-020-vulnerability-for-breakfast.html; reference:url,aluigi.org/adv/termdd_1-adv.txt; reference:url,blog.binaryninjas.org/?p=58; reference:url,luca.ntop.org/Teaching/Appunti/asn1.html; classtype:attempted-dos; sid:2014430; rev:13; metadata:created_at 2012_03_20, updated_at 2012_03_20;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 3389 (msg:"ET DOS Microsoft Remote Desktop Protocol (RDP) maxChannelIds DoS Attempt"; flow:to_server,established; content:"|03 00|"; depth:2; content:"|e0|"; distance:3; within:1; content:"|03 00|"; distance:0; content:"|f0|"; distance:3; within:1; content:"|7f 65|"; distance:1; within:2; content:"|04 01 01 04 01 01 01 01 ff 30|"; distance:3; within:10; content:"|02|"; distance:1; within:1; byte_test:1,<,0x80,0,relative,big; byte_jump:1,0,relative; byte_test:1,<,0x06,-1,relative,big; reference:url,www.msdn.microsoft.com/en-us/library/cc240836.aspx; reference:cve,2012-0002; reference:url,technet.microsoft.com/en-us/security/bulletin/ms12-020; reference:url,stratsec.blogspot.com.au/2012/03/ms12-020-vulnerability-for-breakfast.html; reference:url,aluigi.org/adv/termdd_1-adv.txt; reference:url,blog.binaryninjas.org/?p=58; reference:url,luca.ntop.org/Teaching/Appunti/asn1.html; classtype:attempted-dos; sid:2014431; rev:15; metadata:created_at 2012_03_20, updated_at 2012_03_20;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 3389 (msg:"ET DOS Microsoft Remote Desktop Protocol (RDP) maxChannelIds Integer indef DoS Attempt"; flow:to_server,established; content:"|03 00|"; depth:2; content:"|e0|"; distance:3; within:1; content:"|03 00|"; distance:0; content:"|f0|"; distance:3; within:1; content:"|7f 65|"; distance:1; within:2; content:"|04 01 01 04 01 01 01 01 ff 30|"; distance:3; within:10; content:"|02|"; distance:1; within:1; byte_test:1,>,0x80,0,relative; byte_test:1,<,0xFF,0,relative; byte_jump:1,0,relative, post_offset -128; byte_jump:1,-1,relative; byte_test:1,<,0x06,-1,relative,big; reference:url,www.msdn.microsoft.com/en-us/library/cc240836.aspx; reference:cve,2012-0002; reference:url,technet.microsoft.com/en-us/security/bulletin/ms12-020; reference:url,stratsec.blogspot.com.au/2012/03/ms12-020 vulnerability-for-breakfast.html; reference:url,aluigi.org/adv/termdd_1-adv.txt; reference:url,blog.binaryninjas.org/?p=58; reference:url,luca.ntop.org/Teaching/Appunti/asn1.html; classtype:attempted-dos; sid:2014662; rev:1; metadata:created_at 2012_05_02, updated_at 2012_05_02;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 3389 (msg:"ET DOS Microsoft Remote Desktop Protocol (RDP) maxChannelIds Negative Integer indef DoS Attempt"; flow:to_server,established; content:"|03 00|"; depth:2; content:"|e0|"; distance:3; within:1; content:"|03 00|"; distance:0; content:"|f0|"; distance:3; within:1; content:"|7f 65|"; distance:1; within:2; content:"|04 01 01 04 01 01 01 01 ff 30|"; distance:3; within:10; content:"|02|"; distance:1; within:1; byte_test:1,>,0x80,0,relative; byte_test:1,<,0xFF,0,relative; byte_jump:1,0,relative, post_offset -128; byte_jump:1,-1,relative; byte_test:1,&,0x80,-1,relative,big; reference:url, www.msdn.microsoft.com/en-us/library/cc240836.aspx; reference:cve,2012-0002; reference:url,technet.microsoft.com/en-us/security/bulletin/ms12-020; reference:url,stratsec.blogspot.com.au/2012/03/ms12-020 vulnerability-for-breakfast.html; reference:url,aluigi.org/adv/termdd_1-adv.txt; reference:url,blog.binaryninjas.org/?p=58; reference:url,luca.ntop.org/Teaching/Appunti/asn1.html; classtype:attempted-dos; sid:2014663; rev:1; metadata:created_at 2012_05_02, updated_at 2012_05_02;) + +#alert icmp any any -> any any (msg:"ET DOS Microsoft Windows 7 ICMPv6 Router Advertisement Flood"; itype:134; icode:0; byte_test:1,&,0x08,2; content:"|03|"; offset:20; depth:1; byte_test:1,&,0x40,2,relative; byte_test:1,&,0x80,2,relative; threshold:type threshold, track by_src, count 10, seconds 1; reference:url,www.samsclass.info/ipv6/proj/proj8x-124-flood-router.htm; classtype:attempted-dos; sid:2014996; rev:3; metadata:created_at 2012_07_02, updated_at 2012_07_02;) + +alert udp any any -> $HOME_NET 53 (msg:"ET DOS DNS Amplification Attack Inbound"; content:"|01 00 00 01 00 00 00 00 00 01|"; depth:10; offset:2; pcre:"/^[^\x00]+?\x00/R"; content:"|00 ff 00 01 00 00 29|"; within:7; fast_pattern; byte_test:2,>,4095,0,relative; threshold: type both, track by_dst, seconds 60, count 5; classtype:bad-unknown; sid:2016016; rev:8; metadata:created_at 2012_12_11, updated_at 2012_12_11;) + +#alert udp $HOME_NET 53 -> any any (msg:"ET DOS DNS Amplification Attack Outbound"; content:"|01 00 00 01 00 00 00 00 00 01|"; depth:10; offset:2; pcre:"/^[^\x00]+?\x00/R"; content:"|00 ff 00 01 00 00 29|"; within:7; fast_pattern; byte_test:2,>,4095,0,relative; threshold: type limit, track by_src, seconds 60, count 1; classtype:bad-unknown; sid:2016017; rev:7; metadata:created_at 2012_12_11, updated_at 2012_12_11;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET DOS LOIC POST"; flow:established,to_server; content:"POST"; http_method; content:"13"; depth:2; http_client_body; content:"=MSG"; fast_pattern; http_client_body; distance:11; within:4; pcre:"/^13\d{11}/P"; threshold:type limit, track by_src, count 1, seconds 300; classtype:web-application-attack; sid:2016030; rev:4; metadata:created_at 2012_12_13, updated_at 2012_12_13;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET DOS LOIC GET"; flow:established,to_server; content:"GET"; http_method; content:"/?msg=MSG"; http_uri; threshold:type limit, track by_src, count 1, seconds 300; classtype:web-application-attack; sid:2016031; rev:3; metadata:created_at 2012_12_13, updated_at 2012_12_13;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 1900 (msg:"ET DOS LibuPnP CVE-2012-5958 ST DeviceType Buffer Overflow"; content:"|0D 0A|ST|3A|"; nocase; pcre:"/^[^\r\n]*schemas\x3adevice\x3a[^\r\n\x3a]{181}/Ri"; content:"schemas|3a|device"; nocase; fast_pattern:only; reference:cve,CVE_2012-5958; reference:cve,CVE-2012-5962; classtype:attempted-dos; sid:2016322; rev:1; metadata:created_at 2013_01_31, updated_at 2013_01_31;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 1900 (msg:"ET DOS LibuPnP CVE-2012-5963 ST UDN Buffer Overflow"; content:"|0D 0A|ST|3A|"; nocase; pcre:"/^[^\r\n]*uuid\x3a[^\r\n\x3a]{181}/Ri"; reference:cve,CVE-2012-5963; classtype:attempted-dos; sid:2016323; rev:1; metadata:created_at 2013_01_31, updated_at 2013_01_31;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 1900 (msg:"ET DOS LibuPnP CVE-2012-5964 ST URN ServiceType Buffer Overflow"; content:"|0D 0A|ST|3A|"; nocase; pcre:"/^[^\r\n]*urn\x3aservice\x3a[^\r\n\x3a]{181}/Ri"; content:"urn|3a|service"; nocase; fast_pattern:only; reference:cve,CVE-2012-5964; classtype:attempted-dos; sid:2016324; rev:1; metadata:created_at 2013_01_31, updated_at 2013_01_31;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 1900 (msg:"ET DOS LibuPnP CVE-2012-5965 ST URN DeviceType Buffer Overflow"; content:"|0D 0A|ST|3A|"; nocase; pcre:"/^[^\r\n]*urn\x3adevice\x3a[^\r\n\x3a]{181}/Ri"; content:"urn|3a|device"; nocase; fast_pattern:only; reference:cve,CVE-2012-5965; classtype:attempted-dos; sid:2016325; rev:1; metadata:created_at 2013_01_31, updated_at 2013_01_31;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 1900 (msg:"ET DOS LibuPnP CVE-2012-5961 ST UDN Buffer Overflow"; content:"|0D 0A|ST|3A|"; nocase; pcre:"/^[^\r\n]*schemas\x3adevice\x3a[^\r\n\x3a]{1,180}\x3a[^\r\n\x3a]{181}/Ri"; content:"schemas|3a|device"; nocase; fast_pattern:only; reference:cve,CVE-2012-5961; classtype:attempted-dos; sid:2016326; rev:1; metadata:created_at 2013_01_31, updated_at 2013_01_31;) + +alert udp any any -> $HOME_NET 1900 (msg:"ET DOS Miniupnpd M-SEARCH Buffer Overflow CVE-2013-0229"; content:"M-SEARCH"; depth:8; isdataat:1492,relative; content:!"|0d 0a|"; distance:1490; within:2; reference:url,community.rapid7.com/community/infosec/blog/2013/01/29/security-flaws-in-universal-plug-and-play-unplug-dont-play; reference:url,upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf; reference:cve,CVE-2013-0229; classtype:attempted-dos; sid:2016363; rev:2; metadata:created_at 2013_02_06, updated_at 2013_02_06;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET DOS CVE-2013-0230 Miniupnpd SoapAction MethodName Buffer Overflow"; flow:to_server,established; content:"POST "; depth:5; content:"|0d 0a|SOAPAction|3a|"; nocase; distance:0; pcre:"/^[^\r\n]+#[^\x22\r\n]{2049}/R"; reference:url,community.rapid7.com/community/infosec/blog/2013/01/29/security-flaws-in-universal-plug-and-play-unplug-dont-play; reference:url,upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf; reference:cve,CVE-2013-0230; classtype:attempted-dos; sid:2016364; rev:1; metadata:created_at 2013_02_06, updated_at 2013_02_06;) + +#alert http any any -> $HOME_NET 3128 (msg:"ET DOS Squid-3.3.5 DoS"; flow:established,to_server; content:"Host|3a| "; http_header; pcre:"/^Host\x3a[^\x3a\r\n]+?\x3a[^\r\n]{6}/Hmi"; classtype:attempted-dos; sid:2017154; rev:2; metadata:created_at 2013_07_16, updated_at 2013_07_16;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET DOS Trojan.BlackRev V1.Botnet HTTP Login POST Flood Traffic Inbound"; flow:established,to_server; content:"POST"; http_method; content:"Mozilla/4.0 (compatible|3B| Synapse)"; fast_pattern:24,9; http_user_agent; content:"login="; http_client_body; depth:6; content:"$pass="; http_client_body; within:50; threshold: type both, count 5, seconds 60, track by_src; reference:url,www.btpro.net/blog/2013/05/black-revolution-botnet-trojan/; classtype:attempted-dos; sid:2017722; rev:3; metadata:created_at 2013_11_14, updated_at 2013_11_14;) + +alert udp any any -> any 123 (msg:"ET DOS Possible NTP DDoS Inbound Frequent Un-Authed MON_LIST Requests IMPL 0x02"; content:"|00 02 2A|"; offset:1; depth:3; byte_test:1,!&,128,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_dst,count 2,seconds 60; reference:url,www.symantec.com/connect/blogs/hackers-spend-christmas-break-launching-large-scale-ntp-reflection-attacks; classtype:attempted-dos; sid:2017918; rev:2; metadata:created_at 2014_01_02, updated_at 2014_01_02;) + +alert udp any any -> any 123 (msg:"ET DOS Possible NTP DDoS Inbound Frequent Un-Authed MON_LIST Requests IMPL 0x03"; content:"|00 03 2A|"; offset:1; depth:3; byte_test:1,!&,128,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_dst,count 2,seconds 60; reference:url,www.symantec.com/connect/blogs/hackers-spend-christmas-break-launching-large-scale-ntp-reflection-attacks; classtype:attempted-dos; sid:2017919; rev:2; metadata:created_at 2014_01_02, updated_at 2014_01_02;) + +alert udp $HOME_NET 123 -> $EXTERNAL_NET any (msg:"ET DOS Possible NTP DDoS Multiple MON_LIST Seq 0 Response Spanning Multiple Packets IMPL 0x02"; content:"|00 02 2a|"; offset:1; depth:3; byte_test:1,&,128,0; byte_test:1,&,64,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_src,count 2,seconds 60; reference:url,www.symantec.com/connect/blogs/hackers-spend-christmas-break-launching-large-scale-ntp-reflection-attacks; classtype:attempted-dos; sid:2017920; rev:2; metadata:created_at 2014_01_02, updated_at 2014_01_02;) + +alert udp $HOME_NET 123 -> $EXTERNAL_NET any (msg:"ET DOS Possible NTP DDoS Multiple MON_LIST Seq 0 Response Spanning Multiple Packets IMPL 0x03"; content:"|00 03 2a|"; offset:1; depth:3; byte_test:1,&,128,0; byte_test:1,&,64,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_src,count 2,seconds 60; reference:url,www.symantec.com/connect/blogs/hackers-spend-christmas-break-launching-large-scale-ntp-reflection-attacks; classtype:attempted-dos; sid:2017921; rev:2; metadata:created_at 2014_01_02, updated_at 2014_01_02;) + +alert udp any 123 -> any 0:1023 (msg:"ET DOS Likely NTP DDoS In Progress MON_LIST Response to Non-Ephemeral Port IMPL 0x02"; content:"|00 02 2a|"; offset:1; depth:3; byte_test:1,&,128,0; byte_test:1,&,64,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_src,count 1,seconds 120; reference:url,www.symantec.com/connect/blogs/hackers-spend-christmas-break-launching-large-scale-ntp-reflection-attacks; reference:url,en.wikipedia.org/wiki/Ephemeral_port; classtype:attempted-dos; sid:2017965; rev:3; metadata:created_at 2014_01_13, updated_at 2014_01_13;) + +alert udp any 123 -> any 0:1023 (msg:"ET DOS Likely NTP DDoS In Progress MON_LIST Response to Non-Ephemeral Port IMPL 0x03"; content:"|00 03 2a|"; offset:1; depth:3; byte_test:1,&,128,0; byte_test:1,&,64,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_src,count 1,seconds 120; reference:url,www.symantec.com/connect/blogs/hackers-spend-christmas-break-launching-large-scale-ntp-reflection-attacks; reference:url,en.wikipedia.org/wiki/Ephemeral_port; classtype:attempted-dos; sid:2017966; rev:3; metadata:created_at 2014_01_13, updated_at 2014_01_13;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET DOS Inbound GoldenEye DoS attack"; flow:established,to_server; content:"/?"; fast_pattern; http_uri; depth:2; content:"="; http_uri; distance:3; within:11; pcre:"/^\/\?[a-zA-Z0-9]{3,10}=[a-zA-Z0-9]{3,20}(?:&[a-zA-Z0-9]{3,10}=[a-zA-Z0-9]{3,20})*?$/U"; content:"Keep|2d|Alive|3a|"; http_header; content:"Connection|3a| keep|2d|alive"; http_header; content:"Cache|2d|Control|3a|"; http_header; pcre:"/^Cache-Control\x3a\x20(?:max-age=0|no-cache)\r?$/Hm"; content:"Accept|2d|Encoding|3a|"; http_header; threshold: type both, track by_src, count 100, seconds 300; reference:url,github.com/jseidl/GoldenEye; classtype:denial-of-service; sid:2018208; rev:2; metadata:created_at 2014_03_04, updated_at 2014_03_04;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET DOS Possible WordPress Pingback DDoS in Progress (Inbound)"; flow:established,to_server; content:"/xmlrpc.php"; http_uri; nocase; content:"pingback.ping"; nocase; http_client_body; fast_pattern; threshold:type both, track by_src, count 5, seconds 90; classtype:attempted-dos; sid:2018277; rev:3; metadata:affected_product Wordpress, affected_product Wordpress_Plugins, attack_target Web_Server, deployment Datacenter, tag Wordpress, signature_severity Major, created_at 2014_03_14, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET DOS HOIC with booster outbound"; flow:to_server,established; content:"GET"; http_method; content:"HTTP/1.0|0d 0a|Accept|3a 20|*/*|0d 0a|Accept-Language|3a 20|"; content:"If-Modified-Since|3a 20 20|"; http_raw_header; content:"Keep-Alive|3a 20 20|"; http_raw_header; content:"Connection|3a 20 20|"; http_raw_header; content:"User-Agent|3a 20 20|"; http_raw_header; threshold: type both, count 1, seconds 60, track by_src; reference:md5,23fc64a5cac4406d7143ea26e8c4c7ab; reference:url,blog.spiderlabs.com/2012/01/hoic-ddos-analysis-and-detection.html; classtype:trojan-activity; sid:2018977; rev:3; metadata:created_at 2014_08_21, updated_at 2014_08_21;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET DOS HOIC with booster inbound"; flow:to_server,established; content:"GET"; http_method; content:"HTTP/1.0|0d 0a|Accept|3a 20|*/*|0d 0a|Accept-Language|3a 20|"; content:"If-Modified-Since|3a 20 20|"; http_raw_header; content:"Keep-Alive|3a 20 20|"; http_raw_header; content:"Connection|3a 20 20|"; http_raw_header; content:"User-Agent|3a 20 20|"; http_raw_header; threshold: type both, count 1, seconds 60, track by_dst; reference:md5,23fc64a5cac4406d7143ea26e8c4c7ab; reference:url,blog.spiderlabs.com/2012/01/hoic-ddos-analysis-and-detection.html; classtype:trojan-activity; sid:2018978; rev:2; metadata:created_at 2014_08_21, updated_at 2014_08_21;) + +alert udp any 123 -> any 0:1023 (msg:"ET DOS Likely NTP DDoS In Progress PEER_LIST Response to Non-Ephemeral Port IMPL 0x02"; content:"|00 02 00|"; offset:1; depth:3; byte_test:1,&,128,0; byte_test:1,&,64,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_src,count 1,seconds 120; reference:url,community.rapid7.com/community/metasploit/blog/2014/08/25/r7-2014-12-more-amplification-vulnerabilities-in-ntp-allow-even-more-drdos-attacks; reference:url,en.wikipedia.org/wiki/Ephemeral_port; classtype:attempted-dos; sid:2019010; rev:3; metadata:created_at 2014_08_25, updated_at 2014_08_25;) + +alert udp any 123 -> any 0:1023 (msg:"ET DOS Likely NTP DDoS In Progress PEER_LIST Response to Non-Ephemeral Port IMPL 0x03"; content:"|00 03 00|"; offset:1; depth:3; byte_test:1,&,128,0; byte_test:1,&,64,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_src,count 1,seconds 120; reference:url,community.rapid7.com/community/metasploit/blog/2014/08/25/r7-2014-12-more-amplification-vulnerabilities-in-ntp-allow-even-more-drdos-attacks; reference:url,en.wikipedia.org/wiki/Ephemeral_port; classtype:attempted-dos; sid:2019011; rev:3; metadata:created_at 2014_08_25, updated_at 2014_08_25;) + +alert udp any 123 -> any 0:1023 (msg:"ET DOS Likely NTP DDoS In Progress PEER_LIST_SUM Response to Non-Ephemeral Port IMPL 0x02"; content:"|00 02 01|"; offset:1; depth:3; byte_test:1,&,128,0; byte_test:1,&,64,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_src,count 1,seconds 120; reference:url,community.rapid7.com/community/metasploit/blog/2014/08/25/r7-2014-12-more-amplification-vulnerabilities-in-ntp-allow-even-more-drdos-attacks; reference:url,en.wikipedia.org/wiki/Ephemeral_port; classtype:attempted-dos; sid:2019012; rev:3; metadata:created_at 2014_08_25, updated_at 2014_08_25;) + +alert udp any 123 -> any 0:1023 (msg:"ET DOS Likely NTP DDoS In Progress PEER_LIST_SUM Response to Non-Ephemeral Port IMPL 0x03"; content:"|00 03 01|"; offset:1; depth:3; byte_test:1,&,128,0; byte_test:1,&,64,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_src,count 1,seconds 120; reference:url,community.rapid7.com/community/metasploit/blog/2014/08/25/r7-2014-12-more-amplification-vulnerabilities-in-ntp-allow-even-more-drdos-attacks; reference:url,en.wikipedia.org/wiki/Ephemeral_port; classtype:attempted-dos; sid:2019013; rev:3; metadata:created_at 2014_08_25, updated_at 2014_08_25;) + +alert udp any 123 -> any 0:1023 (msg:"ET DOS Likely NTP DDoS In Progress GET_RESTRICT Response to Non-Ephemeral Port IMPL 0x03"; content:"|00 03 10|"; offset:1; depth:3; byte_test:1,&,128,0; byte_test:1,&,64,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_src,count 1,seconds 120; reference:url,community.rapid7.com/community/metasploit/blog/2014/08/25/r7-2014-12-more-amplification-vulnerabilities-in-ntp-allow-even-more-drdos-attacks; reference:url,en.wikipedia.org/wiki/Ephemeral_port; classtype:attempted-dos; sid:2019014; rev:4; metadata:created_at 2014_08_25, updated_at 2014_08_25;) + +alert udp any 123 -> any 0:1023 (msg:"ET DOS Likely NTP DDoS In Progress GET_RESTRICT Response to Non-Ephemeral Port IMPL 0x02"; content:"|00 02 10|"; offset:1; depth:3; byte_test:1,&,128,0; byte_test:1,&,64,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_src,count 1,seconds 120; reference:url,community.rapid7.com/community/metasploit/blog/2014/08/25/r7-2014-12-more-amplification-vulnerabilities-in-ntp-allow-even-more-drdos-attacks; reference:url,en.wikipedia.org/wiki/Ephemeral_port; classtype:attempted-dos; sid:2019015; rev:4; metadata:created_at 2014_08_25, updated_at 2014_08_25;) + +alert udp any any -> any 123 (msg:"ET DOS Possible NTP DDoS Inbound Frequent Un-Authed PEER_LIST Requests IMPL 0x03"; content:"|00 03 00|"; offset:1; depth:3; byte_test:1,!&,128,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_dst,count 2,seconds 60; reference:url,community.rapid7.com/community/metasploit/blog/2014/08/25/r7-2014-12-more-amplification-vulnerabilities-in-ntp-allow-even-more-drdos-attacks; classtype:attempted-dos; sid:2019016; rev:3; metadata:created_at 2014_08_25, updated_at 2014_08_25;) + +alert udp any any -> any 123 (msg:"ET DOS Possible NTP DDoS Inbound Frequent Un-Authed PEER_LIST Requests IMPL 0x02"; content:"|00 02 00|"; offset:1; depth:3; byte_test:1,!&,128,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_dst,count 2,seconds 60; reference:url,community.rapid7.com/community/metasploit/blog/2014/08/25/r7-2014-12-more-amplification-vulnerabilities-in-ntp-allow-even-more-drdos-attacks; classtype:attempted-dos; sid:2019017; rev:3; metadata:created_at 2014_08_25, updated_at 2014_08_25;) + +alert udp any any -> any 123 (msg:"ET DOS Possible NTP DDoS Inbound Frequent Un-Authed PEER_LIST_SUM Requests IMPL 0x03"; content:"|00 03 01|"; offset:1; depth:3; byte_test:1,!&,128,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_dst,count 2,seconds 60; reference:url,community.rapid7.com/community/metasploit/blog/2014/08/25/r7-2014-12-more-amplification-vulnerabilities-in-ntp-allow-even-more-drdos-attacks; classtype:attempted-dos; sid:2019018; rev:3; metadata:created_at 2014_08_25, updated_at 2014_08_25;) + +alert udp any any -> any 123 (msg:"ET DOS Possible NTP DDoS Inbound Frequent Un-Authed PEER_LIST_SUM Requests IMPL 0x02"; content:"|00 02 01|"; offset:1; depth:3; byte_test:1,!&,128,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_dst,count 2,seconds 60; reference:url,community.rapid7.com/community/metasploit/blog/2014/08/25/r7-2014-12-more-amplification-vulnerabilities-in-ntp-allow-even-more-drdos-attacks; classtype:attempted-dos; sid:2019019; rev:3; metadata:created_at 2014_08_25, updated_at 2014_08_25;) + +alert udp any any -> any 123 (msg:"ET DOS Possible NTP DDoS Inbound Frequent Un-Authed GET_RESTRICT Requests IMPL 0x03"; content:"|00 03 10|"; offset:1; depth:3; byte_test:1,!&,128,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_dst,count 2,seconds 60; reference:url,community.rapid7.com/community/metasploit/blog/2014/08/25/r7-2014-12-more-amplification-vulnerabilities-in-ntp-allow-even-more-drdos-attacks; classtype:attempted-dos; sid:2019020; rev:3; metadata:created_at 2014_08_25, updated_at 2014_08_25;) + +alert udp any any -> any 123 (msg:"ET DOS Possible NTP DDoS Inbound Frequent Un-Authed GET_RESTRICT Requests IMPL 0x02"; content:"|00 02 10|"; offset:1; depth:3; byte_test:1,!&,128,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,&,1,0; threshold: type both,track by_dst,count 2,seconds 60; reference:url,community.rapid7.com/community/metasploit/blog/2014/08/25/r7-2014-12-more-amplification-vulnerabilities-in-ntp-allow-even-more-drdos-attacks; classtype:attempted-dos; sid:2019021; rev:3; metadata:created_at 2014_08_25, updated_at 2014_08_25;) + +alert udp any 123 -> any any (msg:"ET DOS Likely NTP DDoS In Progress Multiple UNSETTRAP Mode 6 Responses"; content:"|df 00 00 04 00|"; offset:1; depth:5; byte_test:1,!&,128,0; byte_test:1,!&,64,0; byte_test:1,&,4,0; byte_test:1,&,2,0; byte_test:1,!&,1,0; threshold: type both,track by_src,count 2,seconds 60; reference:url,community.rapid7.com/community/metasploit/blog/2014/08/25/r7-2014-12-more-amplification-vulnerabilities-in-ntp-allow-even-more-drdos-attacks; classtype:attempted-dos; sid:2019022; rev:4; metadata:created_at 2014_08_25, updated_at 2014_08_25;) + +alert udp any any -> $HOME_NET 1900 (msg:"ET DOS Possible SSDP Amplification Scan in Progress"; content:"M-SEARCH * HTTP/1.1"; content:"ST|3a 20|ssdp|3a|all|0d 0a|"; nocase; distance:0; fast_pattern; threshold: type both,track by_src,count 2,seconds 60; reference:url,community.rapid7.com/community/metasploit/blog/2014/08/29/weekly-metasploit-update; classtype:attempted-dos; sid:2019102; rev:1; metadata:created_at 2014_09_02, updated_at 2014_09_02;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"ET DOS Terse HTTP GET Likely LOIC"; flow:to_server,established; dsize:18; content:"GET / HTTP/1.1|0d 0a 0d 0a|"; depth:18; threshold:type both,track by_dst,count 500,seconds 60; classtype:attempted-dos; sid:2019346; rev:2; metadata:created_at 2014_10_03, updated_at 2014_10_03;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"ET DOS HTTP GET AAAAAAAA Likely FireFlood"; flow:to_server,established; content:"GET AAAAAAAA HTTP/1.1"; content:!"Referer|3a|"; distance:0; content:!"Accept"; distance:0; content:!"|0d 0a|"; distance:0; threshold:type both,track by_dst,count 500,seconds 60; classtype:attempted-dos; sid:2019347; rev:2; metadata:created_at 2014_10_03, updated_at 2014_10_03;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"ET DOS Terse HTTP GET Likely AnonMafiaIC DDoS tool"; flow:to_server,established; dsize:20; content:"GET / HTTP/1.0|0d 0a 0d 0a 0d 0a|"; depth:20; threshold:type both,track by_dst,count 500,seconds 60; classtype:attempted-dos; sid:2019348; rev:2; metadata:created_at 2014_10_03, updated_at 2014_10_03;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"ET DOS Terse HTTP GET Likely AnonGhost DDoS tool"; flow:to_server,established; dsize:20; content:"GET / HTTP/1.1|0d 0a 0d 0a 0d 0a|"; depth:20; threshold:type both,track by_dst,count 500,seconds 60; classtype:attempted-dos; sid:2019349; rev:2; metadata:created_at 2014_10_03, updated_at 2014_10_03;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"ET DOS Terse HTTP GET Likely GoodBye 5.2 DDoS tool"; flow:to_server,established; dsize:<50; content:"|20|HTTP/1.1Host|3a 20|"; threshold:type both,track by_dst,count 500,seconds 60; classtype:attempted-dos; sid:2019350; rev:2; metadata:created_at 2014_10_03, updated_at 2014_10_03;) + +#alert tcp $EXTERNAL_NET 10000: -> $HOME_NET 0:1023 (msg:"ET DOS Potential Tsunami SYN Flood Denial Of Service Attempt"; flags:S; flow:to_server; dsize:>900; threshold: type both, count 20, seconds 120, track by_src; reference:url,security.radware.com/uploadedFiles/Resources_and_Content/Threat/TsunamiSYNFloodAttack.pdf; classtype:attempted-dos; sid:2019404; rev:3; metadata:created_at 2014_10_15, updated_at 2014_10_15;) + +alert udp $HOME_NET 1434 -> $EXTERNAL_NET any (msg:"ET DOS MC-SQLR Response Outbound Possible DDoS Participation"; content:"|05|"; depth:1; content:"ServerName|3b|"; nocase; content:"InstanceName|3b|"; distance:0; content:"IsClustered|3b|"; distance:0; content:"Version|3b|"; distance:0; threshold:type both,track by_src,count 30,seconds 60; reference:url,kurtaubuchon.blogspot.com.es/2015/01/mc-sqlr-amplification-ms-sql-server.html; classtype:attempted-dos; sid:2020305; rev:4; metadata:created_at 2015_01_23, updated_at 2015_01_23;) + +alert udp $EXTERNAL_NET 1434 -> $HOME_NET any (msg:"ET DOS MC-SQLR Response Inbound Possible DDoS Target"; content:"|05|"; depth:1; content:"ServerName|3b|"; nocase; content:"InstanceName|3b|"; distance:0; content:"IsClustered|3b|"; distance:0; content:"Version|3b|"; distance:0; threshold:type both,track by_dst,count 30,seconds 60; reference:url,kurtaubuchon.blogspot.com.es/2015/01/mc-sqlr-amplification-ms-sql-server.html; classtype:attempted-dos; sid:2020306; rev:3; metadata:created_at 2015_01_23, updated_at 2015_01_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET DOS Bittorrent User-Agent inbound - possible DDOS"; flow:established,to_server; content:"User-Agent|3a| Bittorrent"; http_header; threshold: type both, count 1, seconds 60, track by_src; reference:url,torrentfreak.com/zombie-pirate-bay-tracker-fuels-chinese-ddos-attacks-150124/; classtype:attempted-dos; sid:2020702; rev:2; metadata:created_at 2015_03_18, updated_at 2015_03_18;) + +alert udp $HOME_NET 5093 -> $EXTERNAL_NET any (msg:"ET DOS Possible Sentinal LM Application attack in progress Outbound (Response)"; dsize:>1390; content:"|7a 00 00 00 00 00 00 00 00 00 00 00|"; depth:12; threshold: type both,track by_src,count 10,seconds 60; classtype:attempted-dos; sid:2021170; rev:1; metadata:created_at 2015_05_29, updated_at 2015_05_29;) + +alert udp $EXTERNAL_NET 5093 -> $HOME_NET any (msg:"ET DOS Possible Sentinal LM Amplification attack (Response) Inbound"; dsize:>1390; content:"|7a 00 00 00 00 00 00 00 00 00 00 00|"; depth:12; threshold: type both,track by_src,count 10,seconds 60; classtype:attempted-dos; sid:2021171; rev:1; metadata:created_at 2015_05_29, updated_at 2015_05_29;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 5093 (msg:"ET DOS Possible Sentinal LM Amplification attack (Request) Inbound"; dsize:6; content:"|7a 00 00 00 00 00|"; threshold: type both,track by_dst,count 10,seconds 60; classtype:attempted-dos; sid:2021172; rev:1; metadata:created_at 2015_05_29, updated_at 2015_05_29;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET DOS Linux/Tsunami DOS User-Agent (x00_-gawa.sa.pilipinas.2015) INBOUND"; flow:to_server,established; content:"x00_-gawa.sa.pilipinas.2015"; http_user_agent; reference:url,vms.drweb.com/virus/?i=4656268; classtype:attempted-dos; sid:2022760; rev:2; metadata:created_at 2016_04_26, updated_at 2016_04_26;) + +alert udp $EXTERNAL_NET 53 -> $HOME_NET 1:1023 (msg:"ET DOS DNS Amplification Attack Possible Inbound Windows Non-Recursive Root Hint Reserved Port"; content:"|81 00 00 01 00 00|"; depth:6; offset:2; byte_test:2,>,10,0,relative; byte_test:2,>,10,2,relative; content:"|0c|root-servers|03|net|00|"; distance:0; content:"|0c|root-servers|03|net|00|"; distance:0; threshold: type both, track by_dst, seconds 60, count 5; reference:url,twitter.com/sempersecurus/status/763749835421941760; reference:url,pastebin.com/LzubgtVb; classtype:bad-unknown; sid:2023053; rev:2; metadata:attack_target Server, deployment Datacenter, created_at 2016_08_12, performance_impact Low, updated_at 2016_08_12;) + +alert udp $HOME_NET 53 -> $EXTERNAL_NET 1:1023 (msg:"ET DOS DNS Amplification Attack Possible Outbound Windows Non-Recursive Root Hint Reserved Port"; content:"|81 00 00 01 00 00|"; depth:6; offset:2; byte_test:2,>,10,0,relative; byte_test:2,>,10,2,relative; content:"|0c|root-servers|03|net|00|"; distance:0; content:"|0c|root-servers|03|net|00|"; distance:0; threshold: type both, track by_dst, seconds 60, count 5; reference:url,twitter.com/sempersecurus/status/763749835421941760; reference:url,pastebin.com/LzubgtVb; classtype:bad-unknown; sid:2023054; rev:2; metadata:attack_target Server, deployment Datacenter, created_at 2016_08_12, performance_impact Low, updated_at 2016_08_12;) + +alert tcp any any -> $HOME_NET 445 (msg:"ET DOS Microsoft Windows LSASS Remote Memory Corruption (CVE-2017-0004)"; flow:established,to_server; content:"|FF|SMB|73|"; offset:4; depth:5; byte_test:1,&,0x80,6,relative; byte_test:1,&,0x08,6,relative; byte_test:1,&,0x10,5,relative; byte_test:1,&,0x04,5,relative; byte_test:1,&,0x02,5,relative; byte_test:1,&,0x01,5,relative; content:"|ff 00|"; distance:28; within:2; content:"|84|"; distance:25; within:1; content:"NTLMSSP"; fast_pattern; within:64; reference:url,github.com/lgandx/PoC/tree/master/LSASS; reference:url,support.microsoft.com/en-us/kb/3216771; reference:url,support.microsoft.com/en-us/kb/3199173; reference:cve,2017-0004; reference:url,technet.microsoft.com/library/security/MS17-004; classtype:attempted-dos; sid:2023497; rev:3; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, attack_target Client_and_Server, deployment Perimeter, deployment Datacenter, signature_severity Major, created_at 2016_11_11, performance_impact Low, updated_at 2017_01_12;) + +alert tcp any 445 -> $HOME_NET any (msg:"ET DOS Excessive Large Tree Connect Response"; flow:from_server,established; byte_test: 3,>,1000,1; content: "|fe 53 4d 42 40 00|"; offset: 4; depth: 6; content: "|03 00|"; offset: 16; depth:2; reference:url,isc.sans.edu/forums/diary/Windows+SMBv3+Denial+of+Service+Proof+of+Concept+0+Day+Exploit/22029/; classtype:attempted-dos; sid:2023831; rev:2; metadata:affected_product SMBv3, attack_target Client_and_Server, deployment Datacenter, signature_severity Major, created_at 2017_02_03, updated_at 2017_02_03;) + +alert tcp any 445 -> $HOME_NET any (msg:"ET DOS SMB Tree_Connect Stack Overflow Attempt (CVE-2017-0016)"; flow:from_server,established; content:"|FE|SMB"; offset:4; depth:4; content:"|03 00|"; distance:8; within:2; byte_test:1,&,1,2,relative; byte_jump:2,8,little,from_beginning; byte_jump:2,4,relative,little; isdataat:1000,relative; content:!"|FE|SMB"; within:1000; reference:cve,2017-0016; classtype:attempted-dos; sid:2023832; rev:3; metadata:affected_product SMBv3, attack_target Client_and_Server, deployment Datacenter, signature_severity Major, created_at 2017_02_03, updated_at 2017_02_07;) + +#alert tcp any any -> $HOME_NET [139,445] (msg:"ET DOS Possible SMBLoris NBSS Length Mem Exhaustion Vuln Inbound"; flow:established,to_server; content:"|00 01|"; depth:2; threshold:type both,track by_dst,count 3, seconds 90; metadata: former_category DOS; reference:url,isc.sans.edu/forums/diary/SMBLoris+the+new+SMB+flaw/22662/; classtype:trojan-activity; sid:2024510; rev:1; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, attack_target Client_and_Server, deployment Internal, signature_severity Major, created_at 2017_08_02, performance_impact Significant, updated_at 2017_08_02;) + +alert tcp any any -> $HOME_NET [139,445] (msg:"ET DOS SMBLoris NBSS Length Mem Exhaustion Attempt (PoC Based)"; flow:established,to_server; content:"|00 01 ff ff|"; depth:4; threshold:type both,track by_dst,count 30, seconds 300; metadata: former_category DOS; reference:url,isc.sans.edu/forums/diary/SMBLoris+the+new+SMB+flaw/22662/; classtype:trojan-activity; sid:2024511; rev:2; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, attack_target Client_and_Server, deployment Internal, signature_severity Major, created_at 2017_08_02, performance_impact Significant, updated_at 2017_08_03;) + +alert udp $EXTERNAL_NET 389 -> $HOME_NET 389 (msg:"ET DOS CLDAP Amplification Reflection (PoC based)"; dsize:52; content:"|30 84 00 00 00 2d 02 01 01 63 84 00 00 00 24 04 00 0a 01 00|"; fast_pattern; threshold:type both, count 100, seconds 60, track by_src; metadata: former_category DOS; reference:url,www.akamai.com/us/en/multimedia/documents/state-of-the-internet/cldap-threat-advisory.pdf; reference:url,packetstormsecurity.com/files/139561/LDAP-Amplication-Denial-Of-Service.html; classtype:attempted-dos; sid:2024584; rev:1; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, affected_product Linux, attack_target Server, deployment Perimeter, signature_severity Major, created_at 2017_08_16, performance_impact Significant, updated_at 2017_08_16;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 389 (msg:"ET DOS Potential CLDAP Amplification Reflection"; content:"objectclass0"; fast_pattern; threshold:type both, count 200, seconds 60, track by_src; metadata: former_category DOS; reference:url,www.akamai.com/us/en/multimedia/documents/state-of-the-internet/cldap-threat-advisory.pdf; reference:url,packetstormsecurity.com/files/139561/LDAP-Amplication-Denial-Of-Service.html; classtype:attempted-dos; sid:2024585; rev:1; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, affected_product Linux, attack_target Client_and_Server, deployment Perimeter, signature_severity Major, created_at 2017_08_16, performance_impact Significant, updated_at 2017_08_16;) + diff --git a/code/chef/templates/centos/emerging-exploit.rules.erb b/code/chef/templates/centos/emerging-exploit.rules.erb new file mode 100755 index 0000000..987e15f --- /dev/null +++ b/code/chef/templates/centos/emerging-exploit.rules.erb @@ -0,0 +1,1201 @@ +# Emerging Threats +# +# This distribution may contain rules under two different licenses. +# +# Rules with sids 1 through 3464, and 100000000 through 100000908 are under the GPLv2. +# A copy of that license is available at http://www.gnu.org/licenses/gpl-2.0.html +# +# Rules with sids 2000000 through 2799999 are from Emerging Threats and are covered under the BSD License +# as follows: +# +#************************************************************* +# Copyright (c) 2003-2017, Emerging Threats +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +# following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +# disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +# following disclaimer in the documentation and/or other materials provided with the distribution. +# * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +#************************************************************* +# +# +# +# + +# This Ruleset is EmergingThreats Open optimized for suricata-1.3-enhanced. + +#alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT Adobe Acrobat Reader Malicious URL Null Byte"; flow: to_server,established; content:".pdf|00|"; http_uri; reference:url,idefense.com/application/poi/display?id=126&type=vulnerabilities; reference:url,www.securiteam.com/windowsntfocus/5BP0D20DPW.html; reference:cve,2004-0629; reference:url,doc.emergingthreats.net/bin/view/Main/2001217; classtype:attempted-admin; sid:2001217; rev:11; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 617 (msg:"ET EXPLOIT Arkeia full remote access without password or authentication"; flow:to_server,established; content:"|464F3A20596F75206861766520737563|"; content:"|6520636C69656E7420696E666F726D61|"; reference:url,metasploit.com/research/vulns/arkeia_agent; reference:url,doc.emergingthreats.net/bin/view/Main/2001742; classtype:attempted-admin; sid:2001742; rev:9; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 14000 (msg:"ET EXPLOIT Borland VisiBroker Smart Agent Heap Overflow"; content:"|44 53 52 65 71 75 65 73 74|"; pcre:"/[0-9a-zA-Z]{50}/R"; reference:bugtraq,28084; reference:url,aluigi.altervista.org/adv/visibroken-adv.txt; reference:url,doc.emergingthreats.net/bin/view/Main/2007937; classtype:successful-dos; sid:2007937; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 2200 (msg:"ET EXPLOIT CA BrightStor ARCserve Mobile Backup LGSERVER.EXE Heap Corruption"; flow:established,to_server; content:"|4e 3d 2c 1b|"; depth:4; isdataat:2891,relative; reference:cve,2007-0449; reference:url,doc.emergingthreats.net/bin/view/Main/2003369; classtype:attempted-admin; sid:2003369; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 111 (msg:"ET EXPLOIT Computer Associates Brightstor ARCServer Backup RPC Server (Catirpc.dll) DoS"; content:"|00 00 00 00|"; offset:4; depth:4; content:"|00 00 00 03|"; distance:8; within:4; content:"|00 00 00 08|"; distance:0; within:4; content:"|00 00 00 00|"; distance:0; within:4; content:"|00 00 00 00|"; distance:4; within:4; content:"|00 00 00 00 00 00 00 00|"; distance:8; within:32; reference:url,www.milw0rm.com/exploits/3248; reference:url,doc.emergingthreats.net/bin/view/Main/2003370; classtype:attempted-dos; sid:2003370; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 1900 (msg:"ET EXPLOIT Computer Associates Mobile Backup Service LGSERVER.EXE Stack Overflow"; flow:established,to_server; content:"0000033000"; depth:10; isdataat:1000,relative; reference:url,www.milw0rm.com/exploits/3244; reference:url,doc.emergingthreats.net/bin/view/Main/2003378; classtype:attempted-admin; sid:2003378; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 2200 (msg:"ET EXPLOIT Computer Associates BrightStor ARCserve Backup for Laptops LGServer.exe DoS"; flow:established,to_server; content:"|ff ff ff ff|"; offset:16; depth:4; reference:url,www.securityfocus.com/archive/1/archive/1/458650/100/0/threaded; reference:url,doc.emergingthreats.net/bin/view/Main/2003379; classtype:attempted-dos; sid:2003379; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 1024:65535 (msg:"ET EXPLOIT Computer Associates Brightstor ARCServe Backup Mediasvr.exe Remote Exploit"; flow:established,to_server; content:"|00 06 09 7e|"; offset:16; depth:4; content:"|00 00 00 bf 00 00 00 00 00 00 00 00|"; distance:4; within:12; reference:url,www.milw0rm.com/exploits/3604; reference:url,doc.emergingthreats.net/bin/view/Main/2003518; classtype:attempted-admin; sid:2003518; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 1024:65535 (msg:"ET EXPLOIT CA Brightstor ARCServe caloggerd DoS"; flow:established,to_server; content:"|00 06 09 82|"; offset:16; depth:4; content:"|00 00 00 01 00 00 00 00 00 00 00 00|"; within:12; reference:url,www.milw0rm.com/exploits/3939; reference:url,doc.emergingthreats.net/bin/view/Main/2003750; classtype:attempted-dos; sid:2003750; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 1024:65535 (msg:"ET EXPLOIT CA Brightstor ARCServe Mediasvr DoS"; flow:established,to_server; content:"|00 06 09 7e|"; offset:16; depth:4; content:"|00 00 00 7e 00 00 00 00 00 00 00 00|"; within:12; reference:url, www.milw0rm.com/exploits/3940; reference:url,doc.emergingthreats.net/bin/view/Main/2003751; classtype:attempted-dos; sid:2003751; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 2401 (msg:"ET EXPLOIT CVS server heap overflow attempt (target Linux)"; flow: to_server,established; dsize: >512; content:"|45 6e 74 72 79 20 43 43 43 43 43 43 43 43 43 2f 43 43|"; offset: 0; depth: 20; threshold: type limit, track by_dst, count 1, seconds 60; reference:url,doc.emergingthreats.net/bin/view/Main/2000048; classtype:attempted-admin; sid:2000048; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 2401 (msg:"ET EXPLOIT CVS server heap overflow attempt (target BSD)"; flow: to_server,established; dsize: >512; content:"|45 6e 74 72 79 20 61 61 61 61 61 61 61 61 61 61 61 61|"; offset: 0; depth: 18; threshold: type limit, track by_dst, count 1, seconds 60; reference:url,doc.emergingthreats.net/bin/view/Main/2000031; classtype:attempted-admin; sid:2000031; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 2401 (msg:"ET EXPLOIT CVS server heap overflow attempt (target Solaris)"; flow: to_server,established; dsize: >512; content:"|41 72 67 75 6d 65 6e 74 20 62 62 62 62 62 62 62 62 62|"; offset: 0; depth: 18; threshold: type limit, track by_dst, count 1, seconds 60; reference:url,doc.emergingthreats.net/bin/view/Main/2000049; classtype:attempted-admin; sid:2000049; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 22 (msg:"ET EXPLOIT Catalyst SSH protocol mismatch"; flow: to_server,established; content:"|61 25 61 25 61 25 61 25 61 25 61 25 61 25|"; reference:url,www.cisco.com/warp/public/707/catalyst-ssh-protocolmismatch-pub.shtml; reference:url,doc.emergingthreats.net/bin/view/Main/2000007; classtype:attempted-dos; sid:2000007; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 23 (msg:"ET EXPLOIT Cisco Telnet Buffer Overflow"; flow: to_server,established; content:"|3f 3f 3f 3f 3f 3f 3f 3f 3f 3f 3f 3f 3f 3f 3f 3f 3f 61 7e 20 25 25 25 25 25 58 58|"; threshold: type limit, track by_src, count 1, seconds 120; reference:url,www.cisco.com/warp/public/707/cisco-sn-20040326-exploits.shtml; reference:url,doc.emergingthreats.net/bin/view/Main/2000005; classtype:attempted-dos; sid:2000005; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 1900 (msg:"ET EXPLOIT UPnP DLink M-Search Overflow Attempt"; content:"M-SEARCH "; depth:9; nocase; isdataat:500,relative; pcre:"/M-SEARCH\s+[^\n]{500}/i"; reference:url,www.eeye.com/html/research/advisories/AD20060714.html; reference:url,doc.emergingthreats.net/bin/view/Main/2003039; classtype:attempted-user; sid:2003039; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 25 (msg:"ET EXPLOIT Incoming Electronic Mail for UNIX Expires Header Buffer Overflow Exploit"; flow:established; content:"Expires|3a|"; content:"|40 60 6e 63|"; distance:52; within:300; content:"|2d 70|"; distance:2; within:20; reference:url,www.frsirt.com/exploits/20050822.elmexploit.c.php; reference:url,www.instinct.org/elm/; reference:url,doc.emergingthreats.net/bin/view/Main/2002315; classtype:misc-attack; sid:2002315; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $HOME_NET any -> $EXTERNAL_NET 25 (msg:"ET EXPLOIT Outgoing Electronic Mail for UNIX Expires Header Buffer Overflow Exploit"; flow:established; content:"Expires|3a|"; content:"|40 60 6e 63|"; distance:52; within:300; content:"|2d 70|"; distance:2; within:20; reference:url,www.frsirt.com/exploits/20050822.elmexploit.c.php; reference:url,www.instinct.org/elm/; reference:url,doc.emergingthreats.net/bin/view/Main/2002316; classtype:misc-attack; sid:2002316; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 427 (msg:"ET EXPLOIT ExtremeZ-IP File and Print Server Multiple Vulnerabilities - udp"; content:"language"; content:"|65 7a 69 70 3a 2f 2f 62 6c 61 2f 62 6c 61 3f 53 4e 3d 62 6c 61 3f 50 4e 3d 62 6c 61 3f 55 4e 3d 62 6c 61|"; reference:bugtraq,27718; reference:url,aluigi.altervista.org/adv/ezipirla-adv.txt; reference:cve,CVE-2008-0767; reference:url,doc.emergingthreats.net/bin/view/Main/2007876; classtype:successful-dos; sid:2007876; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 548 (msg:"ET EXPLOIT ExtremeZ-IP File and Print Server Multiple Vulnerabilities - tcp"; flow:established,to_server; content:"|12 06 41 46 50 33 2e 31|"; pcre:"/[a-zA-Z0-9]{5}/i"; reference:bugtraq,27718; reference:url,aluigi.altervista.org/adv/ezipirla-adv.txt; reference:cve,CVE-2008-0759; reference:url,doc.emergingthreats.net/bin/view/Main/2007877; classtype:successful-dos; sid:2007877; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp any any -> $HOME_NET [139,445] (msg:"ET EXPLOIT GsecDump executed"; flow:to_server,established; content:"|67 00 73 00 65 00 63 00 64 00 75 00 6d 00 70 00 2e 00 65 00 78 00 65|"; reference:url,xinn.org/Snort-gsecdump.html; reference:url,doc.emergingthreats.net/2010783; classtype:suspicious-filename-detect; sid:2010783; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 21 (msg:"ET EXPLOIT GuildFTPd CWD and LIST Command Heap Overflow - POC-1"; flow:established; content:"cwd"; depth:4; nocase; dsize:>74; pcre:"/(\/\.){70,}/i"; reference:url,milw0rm.com/exploits/6738; reference:cve,CVE-2008-4572; reference:bugtraq,31729; reference:url,doc.emergingthreats.net/bin/view/Main/2008776; classtype:web-application-attack; sid:2008776; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 21 (msg:"ET EXPLOIT GuildFTPd CWD and LIST Command Heap Overflow - POC-2"; flow:established; content:"list"; depth:5; nocase; dsize:>74; pcre:"/[\w]{70,}/i"; reference:url,milw0rm.com/exploits/6738; reference:cve,CVE-2008-4572; reference:bugtraq,31729; reference:url,doc.emergingthreats.net/bin/view/Main/2008777; classtype:web-application-attack; sid:2008777; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS (msg:"ET EXPLOIT GuppY error.php POST Arbitrary Remote Code Execution"; flow: to_server,established; content:"POST"; http_method; nocase; content:"/error.php?"; nocase; http_uri; content:"err="; nocase; http_uri; pcre:"/Cookie\:\ +REMOTE_ADDR=/i"; reference:bugtraq,15609; reference:url,doc.emergingthreats.net/bin/view/Main/2003332; classtype:web-application-attack; sid:2003332; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 1530 (msg:"ET EXPLOIT HP Open View Data Protector Buffer Overflow Attempt"; flow:established,to_server; content:"|B6 29 8C 23 FF FF FF|"; pcre:"/\xB6\x29\x8C\x23\xFF\xFF\xFF[\xF8-\xFF]/"; reference:url,dvlabs.tippingpoint.com/advisory/TPTI-09-15; reference:url,doc.emergingthreats.net/2010546; reference:cve,2007-2281; classtype:attempted-admin; sid:2010546; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 515 (msg:"ET EXPLOIT HP-UX Printer LPD Command Insertion"; flow:established,to_server; content:"|02|msf28|30|"; depth:7; content:"|60|"; distance:0; within:20; reference:cve,2005-3277; reference:bugtraq,15136; reference:url,doc.emergingthreats.net/bin/view/Main/2002852; classtype:attempted-user; sid:2002852; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 21 (msg:"ET EXPLOIT Possible IIS FTP Exploit attempt - Large SITE command"; flow:established,to_server; content:"SITE "; nocase; isdataat:150,relative; content:!"|0d 0a|"; within:150; reference:url,www.milw0rm.com/exploits/9541; reference:url,doc.emergingthreats.net/2009828; reference:cve,2009-3023; classtype:attempted-admin; sid:2009828; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 21 (msg:"ET EXPLOIT IIS FTP Exploit - NLST Globbing Exploit"; flow:established,to_server; content:"NLST "; nocase; content:"|2a 2f 2e 2e 2f|"; reference:url,www.milw0rm.com/exploits/9541; reference:url,doc.emergingthreats.net/2009860; reference:cve,2009-3023; classtype:attempted-admin; sid:2009860; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Invalid non-fragmented packet with fragment offset>0"; fragbits: !M; fragoffset: >0; reference:url,doc.emergingthreats.net/bin/view/Main/2001022; classtype:bad-unknown; sid:2001022; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Invalid fragment - ACK reset"; fragbits: M; flags: !A,12; reference:url,doc.emergingthreats.net/bin/view/Main/2001023; classtype:bad-unknown; sid:2001023; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Invalid fragment - illegal flags"; fragbits: M; flags: *FSR,12; reference:url,doc.emergingthreats.net/bin/view/Main/2001024; classtype:bad-unknown; sid:2001024; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT JamMail Jammail.pl Remote Command Execution Attempt"; flow: to_server,established; content:"/cgi-bin/jammail.pl?"; nocase; http_uri; fast_pattern:only; pcre:"/[\?&]mail=[^&]+?[\x3b\x2c\x7c\x27]/Ui"; reference:bugtraq,13937; reference:url,doc.emergingthreats.net/bin/view/Main/2001990; classtype:web-application-attack; sid:2001990; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET EXPLOIT libPNG - Width exceeds limit"; flow:established,from_server; file_data; content:"|89 50 4E 47 0D 0A 1A 0A|"; depth:8; byte_test:4,>,0x80000000,8,relative,big,string,hex; reference:url,www.securiteam.com/unixfocus/5ZP0C0KDPG.html; reference:url,doc.emergingthreats.net/bin/view/Main/2001191; classtype:misc-activity; sid:2001191; rev:13; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET EXPLOIT libPNG - Possible integer overflow in allocation in png_handle_sPLT"; flow: established; content:"|89 50 4E 47 0D 0A 1A 0A|"; depth:8; content:"sPLT"; isdataat:80,relative; content:!"|00|"; distance: 0; reference:url,www.securiteam.com/unixfocus/5ZP0C0KDPG.html; reference:url,doc.emergingthreats.net/bin/view/Main/2001195; classtype:misc-activity; sid:2001195; rev:9; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT libpng tRNS overflow attempt"; flow: established,to_client; file_data; content:"|89|PNG|0D 0A 1A 0A|"; content:!"PLTE"; content:"tRNS"; distance:0; byte_test:4,>,256,-8,relative,big; reference:cve,CAN-2004-0597; reference:url,doc.emergingthreats.net/bin/view/Main/2001058; classtype:attempted-admin; sid:2001058; rev:10; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Linksys WRT54g Authentication Bypass Attempt"; flow:established,to_server; content:"/Security.tri"; http_uri; nocase; content:"SecurityMode=0"; nocase; reference:url,secunia.com/advisories/21372/; reference:url,doc.emergingthreats.net/bin/view/Main/2003072; classtype:attempted-admin; sid:2003072; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"ET EXPLOIT Linksys WAP54G debug.cgi Shell Access as Gemtek"; flow:established,to_server; content:"Authorization|3a| Basic R2VtdGVrOmdlbXRla3N3ZA==|0d 0a|"; http_header; content:"/debug.cgi"; http_uri; reference:url,seclists.org/fulldisclosure/2010/Jun/176; reference:url,doc.emergingthreats.net/2011669; classtype:attempted-admin; sid:2011669; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT MS04-032 Windows Metafile (.emf) Heap Overflow Exploit"; flow: established; content:"|45 4D 46|"; content:"|EB 12 90 90 90 90 90 90|"; content:"|9e 5c 05 78|"; nocase; reference:url,www.k-otik.com/exploits/20041020.HOD-ms04032-emf-expl2.c.php; reference:url,doc.emergingthreats.net/bin/view/Main/2001369; classtype:shellcode-detect; sid:2001369; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible MS04-032 Windows Metafile (.emf) Heap Overflow Portbind Attempt"; flow: established; content:"|45 4D 46|"; content:"|23 6A 75 4E|"; reference:url,www.microsoft.com/technet/security/bulletin/ms04-032.mspx; reference:url,doc.emergingthreats.net/bin/view/Main/2001363; classtype:shellcode-detect; sid:2001363; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT MS04-032 Windows Metafile (.emf) Heap Overflow Connectback Attempt"; flow: established; content:"|45 4D 46|"; content:"|5E 79 72 63|"; content:"|48 4F 44 21|"; reference:url,www.microsoft.com/technet/security/bulletin/ms04-032.mspx; reference:url,doc.emergingthreats.net/bin/view/Main/2001364; classtype:shellcode-detect; sid:2001364; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET EXPLOIT MS04-032 Bad EMF file"; flow: from_server,established; content:"|01 00 00 00|"; depth: 4; content:"|20 45 4d 46|"; offset: 40; depth: 44; byte_test:4, >, 256, 60, little; reference:url,www.sygate.com/alerts/SSR20041013-0001.htm; reference:url,doc.emergingthreats.net/bin/view/Main/2001374; classtype:misc-activity; sid:2001374; rev:8; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET EXPLOIT Exploit MS05-002 Malformed .ANI stack overflow attack"; flow: to_client,established; content:"RIFF"; content:"ACON"; distance: 8; content:"anih"; distance: 160; byte_test:4,>,36,0,relative,little; reference:url,doc.emergingthreats.net/bin/view/Main/2001668; classtype:misc-attack; sid:2001668; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 25 (msg:"ET EXPLOIT MS05-021 Exchange Link State - Possible Attack (1)"; flow: to_server,established; content:"X-LINK2STATE"; nocase; reference:cve,CAN-2005-0560; reference:url,isc.sans.org/diary.php?date=2005-04-12; reference:url,www.microsoft.com/technet/security/bulletin/MS05-021.mspx; reference:url,doc.emergingthreats.net/bin/view/Main/2001848; classtype:misc-activity; sid:2001848; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 691 (msg:"ET EXPLOIT MS05-021 Exchange Link State - Possible Attack (2)"; flow: to_server,established; content:"X-LSA-2"; nocase; reference:cve,CAN-2005-0560; reference:url,isc.sans.org/diary.php?date=2005-04-12; reference:url,www.microsoft.com/technet/security/bulletin/MS05-021.mspx; reference:url,doc.emergingthreats.net/bin/view/Main/2001849; classtype:misc-activity; sid:2001849; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $SMTP_SERVERS 25 (msg:"ET EXPLOIT MS Exchange Link State Routing Chunk (maybe MS05-021)"; flow: to_server, established; content:"X-LINK2STATE"; nocase; content:"CHUNK="; nocase; threshold: type limit, track by_src, count 1, seconds 60; flowbits:set,msxlsa; reference:cve,CAN-2005-0560; reference:url,isc.sans.org/diary.php?date=2005-04-12; reference:url,www.microsoft.com/technet/security/bulletin/MS05-021.mspx; reference:url,doc.emergingthreats.net/bin/view/Main/2001873; classtype:misc-activity; sid:2001873; rev:9; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $SMTP_SERVERS 25 -> $EXTERNAL_NET any (msg:"ET EXPLOIT TCP Reset from MS Exchange after chunked data, probably crashed it (MS05-021)"; flags: R; flowbits:isset,msxlsa; flowbits: unset,msxlsa; reference:cve,CAN-2005-0560; reference:url,isc.sans.org/diary.php?date=2005-04-12; reference:url,www.microsoft.com/technet/security/bulletin/MS05-021.mspx; reference:url,doc.emergingthreats.net/bin/view/Main/2001874; classtype:misc-activity; sid:2001874; rev:8; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET EXPLOIT Windows Media Player parsing BMP file with 0 size offset to start of image"; flow:established,from_server; content:"BM"; depth:400; byte_test:8,=,0,4,relative; reference:url,www.milw0rm.com/id.php?id=1500; reference:url,www.microsoft.com/technet/security/Bulletin/MS06-005.mspx; reference:cve,2006-0006; reference:bugtraq,16633; reference:url,doc.emergingthreats.net/bin/view/Main/2002802; classtype:attempted-user; sid:2002802; rev:8; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT BMP with invalid bfOffBits"; flow:established,to_client; content:"|0d 0a 0d 0a|BM"; fast_pattern; byte_test:4,>,14,0,relative; content:"|0000000000000000|"; distance:4; within:8; reference:url,www.microsoft.com/technet/security/Bulletin/ms06-005.mspx; reference:cve,2006-0006; reference:bugtraq,16633; reference:url,doc.emergingthreats.net/bin/view/Main/2002803; classtype:attempted-user; sid:2002803; rev:10; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 445 (msg:"ET EXPLOIT DOS Microsoft Windows SRV.SYS MAILSLOT "; flow:to_server,established; content:"|00|"; depth:1; content:"|FF|SMB%"; within:5; distance:3; byte_test:1,!&,128,6,relative; pcre:"/^.{27}/sR"; content:"|03|"; distance:21; content:"|01 00 00 00 00 00|"; distance:1; within:6; byte_test:2,=,17,0,little,relative; content:"|5C|MAILSLOT|5C|"; within:10; distance:2; reference:url,www.milw0rm.com/exploits/2057; reference:url,www.microsoft.com/technet/security/bulletin/MS06-035.mspx; reference:url,doc.emergingthreats.net/bin/view/Main/2003067; classtype:attempted-dos; sid:2003067; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 1433 (msg:"ET EXPLOIT MSSQL Hello Overflow Attempt"; flow:established,to_server; dsize:>400; content:"|12 01 00 34 00 00 00 00|"; offset:0; depth:8; reference:cve,2002-1123; reference:bugtraq,5411; reference:url,doc.emergingthreats.net/bin/view/Main/2002845; classtype:attempted-admin; sid:2002845; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 1433 (msg:"ET EXPLOIT MS-SQL SQL Injection closing string plus line comment"; flow: to_server,established; content:"'|00|"; content:"-|00|-|00|"; reference:url,owasp.org/index.php/SQL_Injection; reference:url,doc.emergingthreats.net/bin/view/Main/2000488; classtype:attempted-user; sid:2000488; rev:7; metadata:affected_product Web_Server_Applications, attack_target Web_Server, deployment Datacenter, tag SQL_Injection, signature_severity Major, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 1433 (msg:"ET EXPLOIT MS-SQL SQL Injection running SQL statements line comment"; flow: to_server,established; content:"|3b 00|"; content:"-|00|-|00|"; reference:url,www.nextgenss.com/papers/more_advanced_sql_injection.pdf; reference:url,www.securitymap.net/sdm/docs/windows/mssql-checklist.html; reference:url,doc.emergingthreats.net/bin/view/Main/2000372; classtype:attempted-user; sid:2000372; rev:8; metadata:affected_product Web_Server_Applications, attack_target Web_Server, deployment Datacenter, tag SQL_Injection, signature_severity Major, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 1433 (msg:"ET EXPLOIT MS-SQL SQL Injection line comment"; flow: to_server,established; content:"-|00|-|00|"; reference:url,www.nextgenss.com/papers/more_advanced_sql_injection.pdf; reference:url,www.securitymap.net/sdm/docs/windows/mssql-checklist.html; reference:url,doc.emergingthreats.net/bin/view/Main/2000373; classtype:attempted-user; sid:2000373; rev:7; metadata:affected_product Web_Server_Applications, attack_target Web_Server, deployment Datacenter, tag SQL_Injection, signature_severity Major, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert udp $EXTERNAL_NET any -> $SQL_SERVERS 1434 (msg:"ET EXPLOIT MS-SQL heap overflow attempt"; content:"|08 3A 31|"; depth: 3; reference:url,www.nextgenss.com/papers/tp-SQL2000.pdf; reference:url,doc.emergingthreats.net/bin/view/Main/2000377; classtype:attempted-admin; sid:2000377; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp $EXTERNAL_NET any -> $SQL_SERVERS 1434 (msg:"ET EXPLOIT MS-SQL DOS attempt (08)"; dsize: >1; content:"|08|"; depth: 1; content:!"|3A|"; offset: 1; depth: 1; reference:url,www.nextgenss.com/papers/tp-SQL2000.pdf; reference:url,doc.emergingthreats.net/bin/view/Main/2000378; classtype:attempted-dos; sid:2000378; rev:8; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp $EXTERNAL_NET any -> $SQL_SERVERS 1434 (msg:"ET EXPLOIT MS-SQL DOS attempt (08) 1 byte"; dsize: 1; content:"|08|"; depth: 1; reference:url,www.nextgenss.com/papers/tp-SQL2000.pdf; reference:url,doc.emergingthreats.net/bin/view/Main/2000379; classtype:attempted-dos; sid:2000379; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp $EXTERNAL_NET any -> $SQL_SERVERS 1434 (msg:"ET EXPLOIT MS-SQL Spike buffer overflow"; content:"|12 01 00 34|"; depth: 4; reference:bugtraq,5411; reference:url,doc.emergingthreats.net/bin/view/Main/2000380; classtype:attempted-admin; sid:2000380; rev:9; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 1433 (msg:"ET EXPLOIT xp_servicecontrol access"; flow:to_server,established; content:"x|00|p|00|_|00|s|00|e|00|r|00|v|00|i|00|c|00|e|00|c|00|o|00|n|00|t|00|r|00|o|00|l|00|"; nocase; reference:url,doc.emergingthreats.net/2009999; classtype:attempted-user; sid:2009999; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 1433 (msg:"ET EXPLOIT xp_fileexist access"; flow:to_server,established; content:"x|00|p|00|_|00|f|00|i|00|l|00|e|00|e|00|x|00|i|00|s|00|t|00|"; nocase; reference:url,doc.emergingthreats.net/2010000; classtype:attempted-user; sid:2010000; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 1433 (msg:"ET EXPLOIT xp_enumerrorlogs access"; flow:to_server,established; content:"x|00|p|00|_|00|e|00|n|00|u|00|m|00|e|00|r|00|r|00|o|00|r|00|l|00|o|00|g|00|s|00|"; nocase; reference:url,doc.emergingthreats.net/2010001; classtype:attempted-user; sid:2010001; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 1433 (msg:"ET EXPLOIT xp_readerrorlogs access"; flow:to_server,established; content:"x|00|p|00|_|00|r|00|e|00|a|00|d|00|e|00|r|00|r|00|o|00|r|00|l|00|o|00|g|00|s|00|"; nocase; reference:url,doc.emergingthreats.net/2010002; classtype:attempted-user; sid:2010002; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 1433 (msg:"ET EXPLOIT xp_enumdsn access"; flow:to_server,established; content:"x|00|p|00|_|00|e|00|n|00|u|00|m|00|d|00|s|00|n|00|"; nocase; reference:url,doc.emergingthreats.net/2010003; classtype:attempted-user; sid:2010003; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 143 (msg:"ET EXPLOIT MDAEMON (Post Auth) Remote Root IMAP FETCH Command Universal Exploit"; flow:established,to_server; content:"FLAGS BODY"; pcre:"/[0-9a-zA-Z]{200,}/R"; content:"|EB 06 90 90 8b 11 DC 64 90|"; distance:0; reference:url,www.milw0rm.com/exploits/5248; reference:bugtraq,28245; reference:url,doc.emergingthreats.net/bin/view/Main/2008063; reference:cve,2008-1358; classtype:successful-user; sid:2008063; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 9999 (msg:"ET EXPLOIT MySQL MaxDB Buffer Overflow"; flow: to_server,established; content:"GET"; content:"|31 c9 83 e9 af d9 ee|"; pcre:"/(GET).\/%.{1586,}/i"; reference:url,doc.emergingthreats.net/bin/view/Main/2001988; classtype:attempted-admin; sid:2001988; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 143 (msg:"ET EXPLOIT Possible Novell Groupwise Internet Agent CREATE Verb Stack Overflow Attempt"; flow:established,to_server; content:"|41 30 30 31|"; depth:4; content:"CREATE "; within:10; isdataat:500,relative; content:!"|0A|"; within:500; reference:url,www.exploit-db.com/exploits/14379/; reference:url,www.zerodayinitiative.com/advisories/ZDI-10-129/; reference:url,www.novell.com/support/php/search.do?cmd=displayKC&docType=kc&externalId=7006374&sliceId=2&docTypeID=DT_TID_1_1&dialogID=155271264&stateId=0 0 155267598; reference:url,doc.emergingthreats.net/2011235; classtype:attempted-admin; sid:2011235; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 8028 (msg:"ET EXPLOIT Novell HttpStk Remote Code Execution Attempt /nds"; flow:to_server,established; content:"/nds"; depth:10; nocase; fast_pattern; content:"|0d0a|Host|3a|"; nocase; content:!"|0d0a|"; within:56; reference:url,doc.emergingthreats.net/bin/view/Main/2003145; classtype:web-application-attack; sid:2003145; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 8028 (msg:"ET EXPLOIT Novell HttpStk Remote Code Execution Attempt /dhost"; flow:to_server,established; content:"/dhost"; depth:10; nocase; fast_pattern; content:"|0d0a|Host|3a|"; nocase; content:!"|0d0a|"; within:56; reference:url,doc.emergingthreats.net/bin/view/Main/2003146; classtype:web-application-attack; sid:2003146; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 8028 (msg:"ET EXPLOIT Novell HttpStk Remote Code Execution Attempt /nds (linewrap)"; flow:to_server,established; content:"/nds"; depth:10; nocase; fast_pattern; content:"|0d0a|Host|3a|"; nocase; content:"|0d0a20|"; within:56; reference:url,doc.emergingthreats.net/bin/view/Main/2003148; classtype:web-application-attack; sid:2003148; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 8028 (msg:"ET EXPLOIT Novell HttpStk Remote Code Execution Attempt /dhost (linewrap)"; flow:to_server,established; content:"/dhost"; depth:10; nocase; fast_pattern; content:"|0d0a|Host|3a|"; nocase; content:"|0d0a20|"; within:56; reference:url,doc.emergingthreats.net/bin/view/Main/2003147; classtype:web-application-attack; sid:2003147; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 8800 (msg:"ET EXPLOIT Now SMS/MMS Gateway HTTP BOF Vulnerability"; flow:established,to_server; content:"GET "; depth:4; content:"Authorization|3a|"; distance:0; content:"Basic"; distance:0; pcre:"/Authorization\x3a\s*Basic\s*[a-zA-Z0-9]{255,}==/i"; reference:bugtraq,27896; reference:url,aluigi.altervista.org/adv/nowsmsz-adv.txt; reference:url,doc.emergingthreats.net/bin/view/Main/2007874; classtype:web-application-attack; sid:2007874; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 2775 (msg:"ET EXPLOIT Now SMS/MMS Gateway SMPP BOF Vulnerability"; flow:established,to_server; content:"|00 00 00 04|"; content:"|00 00 00 01|"; distance:1; pcre:"/[a-zA-Z0-9]{1000,}/i"; reference:bugtraq,27896; reference:url,aluigi.altervista.org/adv/nowsmsz-adv.txt; reference:url,doc.emergingthreats.net/bin/view/Main/2007875; classtype:web-application-attack; sid:2007875; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET EXPLOIT US-ASCII Obfuscated script"; flow:established,from_server; content:"US-ASCII"; nocase; pcre:"/\xbc[\xf3\xd3][\xe3\xc3][\xf2\xd2][\xe9\xc9][\xf0\xd0][\xf4\xd4]/"; reference:url,www.internetdefence.net/2007/02/06/Javascript-payload; reference:cve,2006-3227; reference:url,www.securityfocus.com/archive/1/437948/30/0/threaded; reference:url,doc.emergingthreats.net/bin/view/Main/2003400; classtype:web-application-attack; sid:2003400; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET EXPLOIT US-ASCII Obfuscated VBScript download file"; flow:established,from_server; content:"US-ASCII"; nocase; pcre:"/\xae[\xef\xcf][\xf0\xd0][\xe5\xc5][\xee\xce]\xa0\xa2[\xe7\xc7][\xe5\xc5][\xf4\xd4]\xa2/"; reference:url,www.internetdefence.net/2007/02/06/Javascript-payload; reference:cve,2006-3227; reference:url,www.securityfocus.com/archive/1/437948/30/0/threaded; reference:url,doc.emergingthreats.net/bin/view/Main/2003401; classtype:web-application-attack; sid:2003401; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET EXPLOIT US-ASCII Obfuscated VBScript execute command"; flow:established,from_server; content:"US-ASCII"; nocase; pcre:"/[\xf3\xd3][\xe8\xc8][\xe5\xc5][\xec\xcc][\xec\xcc][\xe5\xc5][\xf8\xd8][\xe5\xc5][\xe3\xc3][\xf5\xd5][\xf4\xd4][\xe5\xc5]/"; reference:url,www.internetdefence.net/2007/02/06/Javascript-payload; reference:cve,2006-3227; reference:url,www.securityfocus.com/archive/1/437948/30/0/threaded; reference:url,doc.emergingthreats.net/bin/view/Main/2003402; classtype:web-application-attack; sid:2003402; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET EXPLOIT US-ASCII Obfuscated VBScript"; flow:established,from_server; content:"US-ASCII"; nocase; pcre:"/[\xf6\xd6][\xe2\xc2][\xf3\xd3][\xe3\xc3][\xf2\xd2][\xe9\xc9][\xf0\xd0][\xf4\xd4]/"; reference:url,www.internetdefence.net/2007/02/06/Javascript-payload; reference:cve,2006-3227; reference:url,www.securityfocus.com/archive/1/437948/30/0/threaded; reference:url,doc.emergingthreats.net/bin/view/Main/2003403; classtype:web-application-attack; sid:2003403; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $SQL_SERVERS $ORACLE_PORTS (msg:"ET EXPLOIT SYS get_domain_index_metadata Privilege Escalation Attempt"; flow:established,to_server; content:"ODCIIndexMetadata"; nocase; content:"sys.dbms_export_extension.get_domain_index_metadata"; nocase; reference:bugtraq,17699; reference:url,doc.emergingthreats.net/bin/view/Main/2002886; classtype:attempted-admin; sid:2002886; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $SQL_SERVERS $ORACLE_PORTS (msg:"ET EXPLOIT SYS get_domain_index_tables Access"; flow:established,to_server; content:"sys.dbms_export_extension.get_domain_index_tables"; nocase; reference:bugtraq,17699; reference:url,doc.emergingthreats.net/bin/view/Main/2002887; classtype:attempted-admin; sid:2002887; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $SQL_SERVERS $ORACLE_PORTS (msg:"ET EXPLOIT SYS get_v2_domain_index_tables Privilege Escalation Attempt"; flow:established,to_server; content:"ODCIIndexUtilGetTableNames"; nocase; content:"sys.dbms_export_extension.get_v2_domain_index_tables"; nocase; reference:bugtraq,17699; reference:url,doc.emergingthreats.net/bin/view/Main/2002888; classtype:attempted-admin; sid:2002888; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET $ORACLE_PORTS (msg:"ET EXPLOIT Possible Oracle Database Text Component ctxsys.drvxtabc.create_tables Remote SQL Injection Attempt"; flow:established,to_server; content:"ctxsys|2E|drvxtabc|2E|create|5F|tables"; nocase; content:"dbms|5F|sql|2E|execute"; nocase; distance:0; pcre:"/ctxsys\x2Edrvxtabc\x2Ecreate\x5Ftables.+(SELECT|DELETE|CREATE|INSERT|UPDATE|OUTFILE)/si"; reference:url,www.securityfocus.com/bid/36748; reference:cve,2009-1991; reference:url,doc.emergingthreats.net/2010375; classtype:attempted-admin; sid:2010375; rev:2; metadata:affected_product Web_Server_Applications, attack_target Web_Server, deployment Datacenter, tag SQL_Injection, signature_severity Major, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 21 (msg:"ET EXPLOIT FTP .message file write"; flow:to_server,established; content:"STOR "; nocase; depth:5; content:".message|0d 0a|"; distance:0; pcre:"/[^a-zA-Z0-9]+\.message/"; flowbits:set,BE.ftp.message; reference:url,www.milw0rm.com/exploits/2856; reference:url,doc.emergingthreats.net/bin/view/Main/2003196; classtype:misc-attack; sid:2003196; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 21 (msg:"ET EXPLOIT ProFTPD .message file overflow attempt"; flowbits:isset,BE.ftp.message; flow:to_server,established; content:"CWD "; depth:4; nocase; flowbits:unset,BE.ftp.message; reference:url,www.milw0rm.com/exploits/2856; reference:url,doc.emergingthreats.net/bin/view/Main/2003197; classtype:misc-attack; sid:2003197; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp any any -> $HOME_NET 139 (msg:"ET EXPLOIT Pwdump3e Session Established Reg-Entry port 139"; flow: to_server,established; content:"|53 00 4f 00 46 00 54 00 57 00 41 00 52 00 45 00 5c 00 45 00 62 00 69 00 7a 00 5c 00 68 00 61 00 73 00 68|"; reference:url,doc.emergingthreats.net/bin/view/Main/2000565; classtype:suspicious-login; sid:2000565; rev:8; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp any any -> $HOME_NET 445 (msg:"ET EXPLOIT Pwdump3e Session Established Reg-Entry port 445"; flow: to_server,established; content:"|53 00 4f 00 46 00 54 00 57 00 41 00 52 00 45 00 5c 00 45 00 62 00 69 00 7a 00 5c 00 68 00 61 00 73 00 68|"; reference:url,doc.emergingthreats.net/bin/view/Main/2000566; classtype:suspicious-login; sid:2000566; rev:8; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp any any -> $HOME_NET 445 (msg:"ET EXPLOIT Pwdump3e pwservice.exe Access port 445"; flow: to_server,established; content:"p|00|w|00|s|00|e|00|r|00|v|00|i|00|c|00|e|00|.|00|e|00|x|00|e"; reference:url,doc.emergingthreats.net/bin/view/Main/2000564; classtype:misc-attack; sid:2000564; rev:9; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp any any -> $HOME_NET 139 (msg:"ET EXPLOIT Pwdump3e pwservice.exe Access port 139"; flow: to_server,established; content:"p|00|w|00|s|00|e|00|r|00|v|00|i|00|c|00|e|00|.|00|e|00|x|00|e"; reference:url,doc.emergingthreats.net/bin/view/Main/2000567; classtype:misc-attack; sid:2000567; rev:8; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $HOME_NET 445 -> any any (msg:"ET EXPLOIT Pwdump3e Password Hash Retrieval port 445"; flow: from_server,established; content:"|3a 00|5|00|0|00|0|3a|"; reference:url,doc.emergingthreats.net/bin/view/Main/2000563; classtype:misc-attack; sid:2000563; rev:11; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $HOME_NET 139 -> any any (msg:"ET EXPLOIT Pwdump3e Password Hash Retrieval port 139"; flow: from_server,established; content:"|3a 00|5|00|0|00|0|3a|"; reference:url,doc.emergingthreats.net/bin/view/Main/2000568; classtype:misc-attack; sid:2000568; rev:10; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp any any -> $HOME_NET 139 (msg:"ET EXPLOIT NTDump.exe Service Started port 139"; flow: to_server,established; content:"|4e 00 74 00 44 00 75 00 6d 00 70 00 53 00 76 00 63 00 2e 00 65 00 78 00 65 00|"; reference:url,doc.emergingthreats.net/bin/view/Main/2001053; classtype:misc-activity; sid:2001053; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp any any -> $HOME_NET 445 (msg:"ET EXPLOIT NTDump.exe Service Started port 445"; flow: to_server,established; content:"|4e 00 74 00 44 00 75 00 6d 00 70 00 53 00 76 00 63 00 2e 00 65 00 78 00 65 00|"; reference:url,doc.emergingthreats.net/bin/view/Main/2001544; classtype:misc-activity; sid:2001544; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp any any -> $HOME_NET 139 (msg:"ET EXPLOIT NTDump Session Established Reg-Entry port 139"; flow: to_server,established; content:"|53 00 4f 00 46 00 54 00 57 00 41 00 52 00 45 00 5c 00 4e 00 74 00 44 00 75 00 6d 00 70 00|"; reference:url,doc.emergingthreats.net/bin/view/Main/2001052; classtype:misc-activity; sid:2001052; rev:8; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp any any -> $HOME_NET 445 (msg:"ET EXPLOIT NTDump Session Established Reg-Entry port 445"; flow: to_server,established; content:"|53 00 4f 00 46 00 54 00 57 00 41 00 52 00 45 00 5c 00 4e 00 74 00 44 00 75 00 6d 00 70 00|"; reference:url,doc.emergingthreats.net/bin/view/Main/2001543; classtype:misc-activity; sid:2001543; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp any any -> $HOME_NET 139 (msg:"ET EXPLOIT Pwdump4 Session Established GetHash port 139"; flow: to_server,established; content:"|50 57 44 75 6d 70 34 2e 64 6c 6c 00 47 65 74 48 61 73 68|"; reference:url,doc.emergingthreats.net/bin/view/Main/2001753; classtype:suspicious-login; sid:2001753; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp any any -> $HOME_NET 445 (msg:"ET EXPLOIT Pwdump4 Session Established GetHash port 445"; flow: to_server,established; content:"|50 57 44 75 6d 70 34 2e 64 6c 6c 00 47 65 74 48 61 73 68|"; reference:url,doc.emergingthreats.net/bin/view/Main/2001754; classtype:suspicious-login; sid:2001754; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp any any -> $HOME_NET [139,445] (msg:"ET EXPLOIT PWDump4 Password dumping exe copied to victim"; flow:to_server,established; content:"|4F 00 72 00 69 00 67 00 69 00 6E 00 61 00 6C 00 46 00 69 00 6C 00 65 00 6E 00 61 00 6D 00 65 00 00 00 50 00 57 00 44 00 55 00 4D 00 50 00 34 00 2E 00 65 00 78 00 65|"; reference:url,xinn.org/Snort-pwdump4.html; reference:url,doc.emergingthreats.net/bin/view/Main/2008444; classtype:suspicious-filename-detect; sid:2008444; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp any any -> $HOME_NET [139,445] (msg:"ET EXPLOIT Pwdump6 Session Established test file created on victim"; flow:to_server,established; content:"|5c 00 74 00 65 00 73 00 74 00 2e 00 70 00 77 00 64|"; reference:url,xinn.org/Snort-pwdump6.html; reference:url,doc.emergingthreats.net/bin/view/Main/2008445; classtype:suspicious-filename-detect; sid:2008445; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp any any -> $HOME_NET [139,445] (msg:"ET EXPLOIT Foofus.net Password dumping dll injection"; flow:to_server,established; content:"|6c 00 73 00 72 00 65 00 6d 00 6f 00 72 00 61|"; metadata: former_category EXPLOIT; reference:url,xinn.org/Snort-fgdump.html; reference:url,doc.emergingthreats.net/bin/view/Main/2008476; classtype:suspicious-filename-detect; sid:2008476; rev:4; metadata:created_at 2010_07_30, updated_at 2017_05_08;) + +#alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT VNC Possible Vulnerable Server Response"; flow:established; dsize:12; content:"RFB 003.00"; depth:11; flowbits:noalert; flowbits:set,BSposs.vuln.vnc.svr; reference:url,www.realvnc.com/docs/rfbproto.pdf; reference:cve,2006-2369; reference:url,doc.emergingthreats.net/bin/view/Main/2002912; classtype:misc-activity; sid:2002912; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT VNC Client response"; flowbits:isset,BSposs.vuln.vnc.svr; flow:established; dsize:12; content:"RFB 003.0"; depth:9; flowbits:noalert; flowbits:set,BSis.vnc.setup; reference:url,www.realvnc.com/docs/rfbproto.pdf; reference:url,doc.emergingthreats.net/bin/view/Main/2002913; classtype:misc-activity; sid:2002913; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT VNC Server VNC Auth Offer"; flowbits:isset,BSis.vnc.setup; flow:established; dsize:20; content:"|00 00 00 02|"; depth:4; flowbits:noalert; flowbits:set,BSvnc.auth.offered; reference:url,www.realvnc.com/docs/rfbproto.pdf; reference:url,doc.emergingthreats.net/bin/view/Main/2002914; classtype:misc-activity; sid:2002914; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT VNC Server VNC Auth Offer - No Challenge string"; flowbits:isset,BSis.vnc.setup; flow:established; dsize:2; content:"|01 02|"; depth:2; flowbits:noalert; flowbits:set,BSvnc.auth.offered; reference:url,www.realvnc.com/docs/rfbproto.pdf; reference:url,doc.emergingthreats.net/bin/view/Main/2002918; classtype:misc-activity; sid:2002918; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT VNC Server Not Requiring Authentication"; flowbits:isset,BSis.vnc.setup; flow:established; content:"|01 01|"; depth:2; flowbits:set,BSvnc.auth.offered; flowbits:unset,BSis.vnc.setup; flowbits:unset,BSvnc.auth.offered; reference:url,www.realvnc.com/docs/rfbproto.pdf; reference:cve,2006-2369; reference:url,doc.emergingthreats.net/bin/view/Main/2002924; classtype:misc-activity; sid:2002924; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT VNC Server Not Requiring Authentication (case 2)"; flowbits:isset,BSis.vnc.setup; dsize:4; flow:established; content:"|00 00 00 01|"; depth:4; flowbits:set,BSvnc.auth.offered; reference:url,www.realvnc.com/docs/rfbproto.pdf; reference:cve,2006-2369; reference:url,doc.emergingthreats.net/bin/view/Main/2002923; classtype:misc-activity; sid:2002923; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT VNC Good Authentication Reply"; flowbits:isset,BSvnc.auth.offered; flow:established; dsize:2; content:"|02|"; flowbits:unset,BSvnc.auth.offered; flowbits:noalert; flowbits:set,BSvnc.auth.agreed; reference:url,www.realvnc.com/docs/rfbproto.pdf; reference:url,doc.emergingthreats.net/bin/view/Main/2002919; classtype:attempted-admin; sid:2002919; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT VNC Authentication Reply"; flowbits:isset,BSvnc.auth.offered; flow:established; dsize:16; flowbits:unset,BSvnc.auth.offered; flowbits:noalert; flowbits:set,BSvnc.auth.agreed; reference:url,www.realvnc.com/docs/rfbproto.pdf; reference:url,doc.emergingthreats.net/bin/view/Main/2002915; classtype:attempted-admin; sid:2002915; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT RealVNC Authentication Bypass Attempt"; flowbits:isset,BSvnc.auth.offered; flow:established; dsize:1; content:"|01|"; depth:1; flowbits:set,BSvnc.null.auth.sent; reference:url,secunia.com/advisories/20107/; reference:url,archives.neohapsis.com/archives/fulldisclosure/2006-05/0356.html; reference:cve,2006-2369; reference:url,doc.emergingthreats.net/bin/view/Main/2002916; classtype:attempted-admin; sid:2002916; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT RealVNC Server Authentication Bypass Successful"; flowbits:isset,BSvnc.null.auth.sent; flow:established; dsize:4; content:"|00 00 00 00|"; depth:4; flowbits:unset,BSis.vnc.setup; flowbits:unset,BSvnc.auth.offered; reference:url,secunia.com/advisories/20107/; reference:url,archives.neohapsis.com/archives/fulldisclosure/2006-05/0356.html; reference:cve,2006-2369; reference:url,doc.emergingthreats.net/bin/view/Main/2002917; classtype:successful-admin; sid:2002917; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT VNC Multiple Authentication Failures"; flowbits:isset,BSvnc.auth.agreed; flow:established; dsize:<50; content:"|00 00 00 02|"; depth:4; reference:url,www.realvnc.com/docs/rfbproto.pdf; reference:url,doc.emergingthreats.net/bin/view/Main/2002921; classtype:attempted-admin; sid:2002921; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 1433 (msg:"ET EXPLOIT SQL sp_configure - configuration change"; flow:to_server,established; content:"s|00|p|00|_|00|c|00|o|00|n|00|f|00|i|00|g|00|u|00|r|00|e|00|"; nocase; reference:url,msdn.microsoft.com/en-us/library/ms190693.aspx; reference:url,doc.emergingthreats.net/bin/view/Main/2008517; classtype:attempted-user; sid:2008517; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS (msg:"ET EXPLOIT SQL sp_configure attempt"; flow:to_server,established; content:"sp_configure"; nocase; reference:url,msdn.microsoft.com/en-us/library/ms190693.aspx; reference:url,doc.emergingthreats.net/bin/view/Main/2008518; classtype:attempted-user; sid:2008518; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 4000 (msg:"ET EXPLOIT SecurityGateway 1.0.1 Remote Buffer Overflow"; flow:to_server,established; content:"POST "; depth:5; nocase; content:"/SecurityGateway.dll"; nocase; distance:0; content:"logon"; nocase; distance:0; content:"&username"; nocase; distance:0; pcre:"/\x3d[^\x26]{720}/R"; reference:url,frsirt.com/english/advisories/2008/1717; reference:url,milw0rm.com/exploits/5718; reference:url,doc.emergingthreats.net/bin/view/Main/2008426; reference:cve,2008-4193; classtype:misc-attack; sid:2008426; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible ShixxNote buffer-overflow + remote shell attempt"; flow: established,to_server; content:"|68 61 63 6b 75|"; offset: 126; depth: 5; content:"|68 61 63 6b 90 61 61 61 61|"; offset: 519; depth: 9; reference:url,aluigi.altervista.org/adv/shixxbof-adv.txt; reference:url,doc.emergingthreats.net/bin/view/Main/2001385; classtype:shellcode-detect; sid:2001385; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 1723 (msg:"ET EXPLOIT Siemens Gigaset SE361 WLAN Data Flood Denial of Service Vulnerability"; flow:to_server; content:"|90 90 90 90 90|"; depth:5; content:"|90 90 90 90 90|"; distance:0; content:"|90 90 90 90 90|"; distance:0; pcre:"/\x90{200}/"; reference:cve,CVE-2009-3322; reference:bugtraq,36366; reference:url,www.milw0rm.com/exploits/9646; reference:url,doc.emergingthreats.net/2009976; classtype:denial-of-service; sid:2009976; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET 31337 -> $HOME_NET 64876 (msg:"ET EXPLOIT malformed Sack - Snort DoS-by-$um$id"; seq:0; ack:0; window:65535; dsize:0; reference:url,doc.emergingthreats.net/bin/view/Main/2002656; classtype:attempted-dos; sid:2002656; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 23 (msg:"ET EXPLOIT Solaris TTYPROMPT environment variable set"; flow: established,to_server; content:"|00 54 54 59 50 52 4F 4D 50 54|"; reference:url,online.securityfocus.com/archive/1/293844; reference:url,doc.emergingthreats.net/bin/view/Main/2001780; classtype:attempted-admin; sid:2001780; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 23 (msg:"ET EXPLOIT Solaris telnet USER environment vuln Attack inbound"; flow:to_server,established; content: "|ff fa 27 00 00 55 53 45 52 01 2d 66|"; rawbytes; reference:url,riosec.com/solaris-telnet-0-day; reference:url,isc.sans.org/diary.html?n&storyid=2220; reference:url,doc.emergingthreats.net/bin/view/Main/2003411; reference:cve,2007-0882; classtype:attempted-user; sid:2003411; rev:8; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $HOME_NET any -> $EXTERNAL_NET 23 (msg:"ET EXPLOIT Solaris telnet USER environment vuln Attack outbound"; flow:to_server,established; content: "|ff fa 27 00 00 55 53 45 52 01 2d 66|"; rawbytes; reference:url,riosec.com/solaris-telnet-0-day; reference:url,isc.sans.org/diary.html?n&storyid=2220; reference:url,doc.emergingthreats.net/bin/view/Main/2003412; reference:cve,2007-0882; classtype:attempted-user; sid:2003412; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 25 (msg:"ET EXPLOIT Possible SpamAssassin Milter Plugin Remote Arbitrary Command Injection Attempt"; flow:established,to_server; content:"to|3A|"; depth:10; nocase; content:"+|3A|\"|7C|"; distance:0; reference:url,www.securityfocus.com/bid/38578; reference:url,seclists.org/fulldisclosure/2010/Mar/140; reference:url,doc.emergingthreats.net/2010877; classtype:attempted-user; sid:2010877; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 25 (msg:"ET EXPLOIT Possible Sendmail SpamAssassin Milter Plugin Remote Arbitrary Command Injection Attempt"; flow:established,to_server; content:"to|3A|"; depth:10; nocase; content:"+\"|7C|"; distance:0; reference:url,www.securityfocus.com/bid/38578; reference:url,seclists.org/fulldisclosure/2010/Mar/140; reference:url,doc.emergingthreats.net/2010941; classtype:attempted-user; sid:2010941; rev:1; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 3128 (msg:"ET EXPLOIT Squid NTLM Auth Overflow Exploit"; flow: to_server; content:"|4141 414a 4351 6b4a 4351 6b4a 4351 6b4a|"; offset: 96; reference:url,www.idefense.com/application/poi/display?id=107; reference:cve,CAN-2004-0541; reference:url,doc.emergingthreats.net/bin/view/Main/2000342; classtype:misc-attack; sid:2000342; rev:6; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert http any $HTTP_PORTS -> $HOME_NET any (msg:"ET EXPLOIT Java runtime.exec() call"; flow:from_server,established; content:"|52 75 6e 74 69 6d 65 3b 01 00 04 65 78 65 63 01 00|"; reference:url,www.mullingsecurity.com; reference:url,doc.emergingthreats.net/bin/view/Main/2002783; classtype:trojan-activity; sid:2002783; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET EXPLOIT Java private function call sun.misc.unsafe"; flow:from_server,established; content:"sun/misc/Unsafe"; reference:url,www.mullingsecurity.com; reference:url,doc.emergingthreats.net/bin/view/Main/2002784; classtype:trojan-activity; sid:2002784; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert http $EXTERNAL_NET any -> $HOME_NET 8004 (msg:"ET EXPLOIT Symantec Scan Engine Request Password Hash"; flow:established,to_server; content:"POST"; nocase; http_method; content:"/xml.xml"; nocase; http_uri; content:" $HOME_NET 2967:2968 (msg:"ET EXPLOIT Symantec Remote Management RTVScan Exploit"; flow:established,to_server; content:"|10|"; depth:2; content:"|00 24 00|"; distance:0; within:20; content:"|5c|"; distance:0; isdataat:380,relative; reference:cve,2006-3455; reference:url,research.eeye.com/html/advisories/published/AD20060612.html; reference:url,doc.emergingthreats.net/bin/view/Main/2003250; classtype:attempted-admin; sid:2003250; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 69 (msg:"ET EXPLOIT TFTP Invalid Mode in file Get"; content:"|01|"; depth:1; content:"|00|"; distance:1; content:"|00|"; distance:0; content:!"|00|binary|00|"; nocase; content:!"|00|netascii|00|"; nocase; content:!"|00|mail|00|"; nocase; reference:url,doc.emergingthreats.net/bin/view/Main/2003198; classtype:non-standard-protocol; sid:2003198; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 69 (msg:"ET EXPLOIT TFTP Invalid Mode in file Put"; content:"|02|"; depth:1; content:"|00|"; distance:1; content:"|00|"; distance:0; content:!"|00|binary|00|"; nocase; content:!"|00|netascii|00|"; nocase; content:!"|00|mail|00|"; nocase; reference:url,doc.emergingthreats.net/bin/view/Main/2003199; classtype:non-standard-protocol; sid:2003199; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"ET EXPLOIT TAC Attack Directory Traversal"; flow:established,to_server; uricontent:"/ISALogin.dll?"; nocase; pcre:"/Template=.*\.\./UGi"; reference:cve,2005-3040; reference:url,secunia.com/advisories/16854; reference:url,cirt.dk/advisories/cirt-37-advisory.pdf; reference:url,doc.emergingthreats.net/bin/view/Main/2002406; classtype:attempted-recon; sid:2002406; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 14942 (msg:"ET EXPLOIT Trend Micro Web Interface Auth Bypass Vulnerable Cookie Attempt"; flow:established,to_server; content:"splx_2376_info"; reference:url,labs.idefense.com/intelligence/vulnerabilities/display.php?id=477; reference:url,www.trendmicro.com/download/product.asp?productid=20; reference:url,doc.emergingthreats.net/bin/view/Main/2003434; classtype:attempted-admin; sid:2003434; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 5168 (msg:"ET EXPLOIT TrendMicro ServerProtect Exploit possible worma(little-endian DCERPC Request)"; flow:established,to_server; dsize:>1000; content:"|05|"; depth:1; content:"|10 00 00 00|"; distance:3; within:4; content:"|00 00 88 88 28 25 5b bd d1 11 9d 53 00 80 c8 3a 5c 2c 04 00 03 00|"; distance:14; within:22; content:"|1c 13 74 65|"; distance:500; reference:url,isc.sans.org/diary.html?storyid=3310; reference:url,doc.emergingthreats.net/bin/view/Main/2007584; classtype:misc-attack; sid:2007584; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert http $EXTERNAL_NET any -> $HOME_NET 8080 (msg:"ET EXPLOIT VLC web interface buffer overflow attempt"; flow:to_server,established; content:"|2F|requests|2F|status|2E|xml|3F|"; http_uri; nocase; content:"input|3D|smb|3A 2F|"; http_uri; nocase; pcre:"/\x2Frequests\x2Fstatus\x2Exml\x3F[^\x0A\x0D]*input\x3D[^\x0A\x0D\x26\x3B]{1000}/iU"; reference:url,milw0rm.org/exploits/9029; reference:url,doc.emergingthreats.net/2009511; classtype:web-application-attack; sid:2009511; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (msg:"ET EXPLOIT M3U File Request Flowbit Set"; flow:to_server,established; content:"GET "; depth:4; uricontent:".m3u"; flowbits:set,ET.m3u.download; flowbits:noalert; reference:url,doc.emergingthreats.net/2011241; classtype:not-suspicious; sid:2011241; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET EXPLOIT Possible VLC Media Player M3U File FTP URL Processing Stack Buffer Overflow Attempt"; flowbits:isset,ET.m3u.download; flow:established,to_client; content:"ftp|3A|//"; nocase; content:"PRAV"; within:10; isdataat:2000,relative; content:!"|0A|"; within:2000; reference:url,securitytracker.com/alerts/2010/Jul/1024172.html; reference:url,doc.emergingthreats.net/2011242; classtype:attempted-user; sid:2011242; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 10000 (msg:"ET EXPLOIT Possible BackupExec Metasploit Exploit (inbound)"; flow:established,to_server; content: "|09 01|"; offset:18; depth:2; content:"|00 03|"; distance:10; within:2; byte_jump:2,2,relative,big; content:"|00 00|"; within:2; byte_test:2,>,512,0,relative,big; reference:url,isc.sans.org/diary.php?date=2005-06-27; reference:url,www.metasploit.org/projects/Framework/modules/exploits/backupexec_agent.pm; reference:url,doc.emergingthreats.net/bin/view/Main/2002061; classtype:attempted-admin; sid:2002061; rev:5; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert tcp $HOME_NET any -> $EXTERNAL_NET 10000 (msg:"ET EXPLOIT Possible BackupExec Metasploit Exploit (outbound)"; flow:established,to_server; content: "|00 00 03 00 00 02 00 58 58 58|"; offset: 24; depth: 20; reference:url,isc.sans.org/diary.php?date=2005-06-27; reference:url,www.metasploit.org/projects/Framework/modules/exploits/backupexec_agent.pm; reference:url,doc.emergingthreats.net/bin/view/Main/2002062; classtype:attempted-admin; sid:2002062; rev:4; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 10000 (msg:"ET EXPLOIT Veritas backupexec_agent exploit"; flow:to_server,established; content:"|00 00 00 00 00 00 09 01|"; offset:12; depth:20; content: "|00 00 00 03|"; offset: 28; depth: 32; byte_jump: 4, 32; byte_test: 4,>,3000,0,relative; reference:url,isc.sans.org/diary.php?date=2005-06-27; reference:url,doc.emergingthreats.net/bin/view/Main/2002065; reference:cve,2004-1172; classtype:misc-attack; sid:2002065; rev:8; metadata:created_at 2010_07_30, updated_at 2016_06_14;) + +#alert tcp $HOME_NET 10000 -> $EXTERNAL_NET any (msg:"ET EXPLOIT NDMP Notify Connect - Possible Backup Exec Remote Agent Recon"; flow:established,from_server; content:"|00 00 05 02|"; offset:16; depth:20; content: "|00 00 00 03|"; offset: 28; depth: 32; reference:url,www.ndmp.org/download/sdk_v4/draft-skardal-ndmp4-04.txt; reference:url,doc.emergingthreats.net/bin/view/Main/2002068; classtype:attempted-recon; sid:2002068; rev:8; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 10000 (msg:"ET EXPLOIT Backup Exec Windows Agent Remote File Access - Attempt"; flow:to_server,established; flowbits:isnotset,SID2002181; content:"|0000 0000 0000 0901 0000 0000 0000 0000 0000 0002 0000 0004 726f 6f74 b4b8 0f26 205c 4234 03fc aeee 8f91 3d6f|"; offset:8; depth:52; flowbits:set,SID2002181; reference:url,www.frsirt.com/english/advisories/2005/1387; reference:url,www.frsirt.com/exploits/20050811.backupexec_dump.pm.php; reference:url,doc.emergingthreats.net/bin/view/Main/2002181; classtype:default-login-attempt; sid:2002181; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $HOME_NET 10000 -> $EXTERNAL_NET any (msg:"ET EXPLOIT Backup Exec Windows Agent Remote File Access - Vulnerable"; flow:from_server,established; flowbits:isset,SID2002181; content:"|0000 0001 0000 0901|"; offset:8; depth:16; content:"|0000 0000 0000 0000|"; distance:4; within:12; reference:url,www.frsirt.com/english/advisories/2005/1387; reference:url,www.frsirt.com/exploits/20050811.backupexec_dump.pm.php; reference:url,doc.emergingthreats.net/bin/view/Main/2002182; classtype:misc-attack; sid:2002182; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT WMF Exploit"; flow:established; content:"|01 00 09 00 00 03 52 1f 00 00 06 00 3d 00 00 00|"; content:"|00 26 06 0f 00 08 00 ff ff ff ff 01 00 00 00 03 00 00 00 00 00|"; reference:url,www.frsirt.com/exploits/20051228.ie_xp_pfv_metafile.pm.php; reference:url,doc.emergingthreats.net/bin/view/Main/2002734; classtype:attempted-user; sid:2002734; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 9100 (msg:"ET EXPLOIT Xerox WorkCentre PJL Daemon Buffer Overflow Attempt"; flow:established,to_server; content:"ENTER LANGUAGE ="; depth:50; nocase; isdataat:55,relative; content:!"|0A|"; within:55; pcre:"/ENTER\x20LANGUAGE\x20\x3D.{55}/smi"; reference:url,www.securityfocus.com/bid/38010; reference:url,doc.emergingthreats.net/2010759; classtype:attempted-admin; sid:2010759; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 7700 (msg:"ET EXPLOIT Zilab Chat and Instant Messaging Heap Overflow Vulnerability"; flow:established; content:"|21 00 21 03|"; pcre:"/[0-9a-zA-Z]{10}/R"; reference:url,aluigi.altervista.org/adv/zilabzcsx-adv.txt; reference:bugtraq,27940; reference:url,doc.emergingthreats.net/bin/view/Main/2007933; classtype:misc-attack; sid:2007933; rev:8; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 7700 (msg:"ET EXPLOIT Zilab Chat and Instant Messaging User Info BoF Vulnerability"; flow:established; content:"|61 00 09 00 08 00 07 00 21 03|"; pcre:"/[0-9a-zA-Z]{10}/R"; reference:url,aluigi.altervista.org/adv/zilabzcsx-adv.txt; reference:bugtraq,27940; reference:url,doc.emergingthreats.net/bin/view/Main/2007934; classtype:misc-attack; sid:2007934; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Foxit PDF Reader Authentication Bypass Attempt"; flow:established,to_client; file_data; content:"%PDF-"; within:5; content:"Type/Action"; distance:0; nocase; content:"Launch"; nocase; within:40; content:"NewWindow true"; nocase; distance:0; pcre:"/Type\x2FAction.+Launch.+\x28\x2F[a-z]\x2F[a-z].+NewWindow\x20true/si"; reference:url,www.coresecurity.com/content/foxit-reader-vulnerabilities#lref.4; reference:cve,2009-0836; reference:url,doc.emergingthreats.net/2010878; classtype:attempted-user; sid:2010878; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert ip any any -> any any (msg:"GPL EXPLOIT EIGRP prefix length overflow attempt"; ip_proto:88; byte_test:1,>,32,44; reference:bugtraq,9952; reference:cve,2004-0176; reference:cve,2004-0367; classtype:attempted-admin; sid:2102464; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert ip any any -> any any (msg:"GPL EXPLOIT IGMP IGAP account overflow attempt"; ip_proto:2; byte_test:1,>,63,0; byte_test:1,<,67,0; byte_test:1,>,16,12; reference:bugtraq,9952; reference:cve,2004-0176; reference:cve,2004-0367; classtype:attempted-admin; sid:2102462; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert ip any any -> any any (msg:"GPL EXPLOIT IGMP IGAP message overflow attempt"; ip_proto:2; byte_test:1,>,63,0; byte_test:1,<,67,0; byte_test:1,>,64,13; reference:bugtraq,9952; reference:cve,2004-0176; reference:cve,2004-0367; classtype:attempted-admin; sid:2102463; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET 22 -> $HOME_NET any (msg:"GPL EXPLOIT SSH server banner overflow"; flow:established,from_server; content:"SSH-"; nocase; isdataat:200,relative; pcre:"/^SSH-\s[^\n]{200}/ism"; reference:bugtraq,5287; reference:cve,2002-1059; classtype:misc-attack; sid:2101838; rev:9; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 22 (msg:"GPL EXPLOIT ssh CRC32 overflow"; flow:to_server,established; content:"|00 01|W|00 00 00 18|"; depth:7; content:"|FF FF FF FF 00 00|"; depth:14; offset:8; reference:bugtraq,2347; reference:cve,2001-0144; reference:cve,2001-0572; classtype:shellcode-detect; sid:2101327; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 2401 (msg:"GPL EXPLOIT CVS non-relative path access attempt"; flow:to_server,established; content:"Argument "; content:"Directory"; distance:0; pcre:"/^Argument\s+\//smi"; pcre:"/^Directory/smiR"; reference:bugtraq,9178; reference:cve,2003-0977; classtype:misc-attack; sid:2102318; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 32771:34000 (msg:"GPL EXPLOIT ttdbserv Solaris overflow"; dsize:>999; flow:to_server,established; content:"|00 01 86 F3 00 00 00 01 00 00 00 0F 00 00 00 01|"; reference:arachnids,242; reference:bugtraq,122; reference:cve,1999-0003; reference:url,www.cert.org/advisories/CA-2001-27.html; classtype:attempted-admin; sid:2100571; rev:9; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 32771:34000 (msg:"GPL EXPLOIT ttdbserv solaris overflow"; dsize:>999; flow:to_server,established; content:"|C0 22|?|FC A2 02| |09 C0|,|7F FF E2 22|?|F4|"; metadata: former_category EXPLOIT; reference:arachnids,242; reference:bugtraq,122; reference:cve,1999-0003; reference:url,www.cert.org/advisories/CA-2001-27.html; classtype:attempted-admin; sid:2100570; rev:11; metadata:created_at 2010_09_23, updated_at 2017_06_29;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 32772:34000 (msg:"GPL EXPLOIT cachefsd buffer overflow attempt"; flow:to_server,established; dsize:>720; content:"|00 01 87 86 00 00 00 01 00 00 00 05|"; reference:bugtraq,4631; reference:cve,2002-0084; reference:nessus,10951; classtype:misc-attack; sid:2101751; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 42 (msg:"GPL EXPLOIT WINS name query overflow attempt TCP"; flow:established; byte_test:1,&,64,2; content:" "; offset:12; isdataat:56,relative; reference:bugtraq,9624; reference:cve,2003-0825; reference:url,www.microsoft.com/technet/security/bulletin/MS04-006.mspx; classtype:attempted-admin; sid:2103199; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 4242 (msg:"GPL EXPLOIT AIX pdnsd overflow"; flow:to_server,established; dsize:>1000; content:"|7F FF FB|x|7F FF FB|x|7F FF FB|x|7F FF FB|x"; content:"@|8A FF C8|@|82 FF D8 3B|6|FE 03 3B|v|FE 02|"; reference:bugtraq,3237; reference:bugtraq,590; reference:cve,1999-0745; classtype:attempted-user; sid:2101261; rev:12; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 512 (msg:"GPL EXPLOIT rexec username overflow attempt"; flow:to_server,established; content:"|00|"; offset:9; content:"|00|"; distance:0; content:"|00|"; distance:0; classtype:attempted-admin; sid:2102113; rev:4; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 513 (msg:"GPL EXPLOIT rsh froot"; flow:to_server,established; content:"-froot|00|"; fast_pattern:only; reference:arachnids,387; classtype:attempted-admin; sid:2100604; rev:6; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 514 (msg:"GPL EXPLOIT rsh bin"; flow:to_server,established; content:"bin|00|bin|00|"; reference:arachnids,390; classtype:attempted-user; sid:2100607; rev:6; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 515 (msg:"GPL EXPLOIT LPD dvips remote command execution attempt"; flow:to_server,established; content:"psfile=|22 60|"; reference:bugtraq,3241; reference:cve,2001-1002; reference:nessus,11023; classtype:system-call-detect; sid:2101821; rev:9; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 515 (msg:"GPL EXPLOIT Redhat 7.0 lprd overflow"; flow:to_server,established; content:"XXXX%.172u%300|24|n"; reference:bugtraq,1712; reference:cve,2000-0917; classtype:attempted-admin; sid:2100302; rev:10; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 6112 (msg:"GPL EXPLOIT CDE dtspcd exploit attempt"; flow:to_server,established; content:"1"; depth:1; offset:10; content:!"000"; depth:3; offset:11; reference:bugtraq,3517; reference:cve,2001-0803; reference:url,www.cert.org/advisories/CA-2002-01.html; classtype:misc-attack; sid:2101398; rev:11; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 617 (msg:"GPL EXPLOIT Arkeia client backup system info probe"; flow:established,to_server; content:"ARKADMIN_GET_"; nocase; pcre:"/^(CLIENT|MACHINE)_INFO/Ri"; reference:bugtraq,12594; classtype:attempted-recon; sid:2103453; rev:2; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 7100 (msg:"GPL EXPLOIT xfs overflow attempt"; flow:to_server,established; dsize:>512; content:"B|00 02|"; depth:3; reference:bugtraq,6241; reference:cve,2002-1317; reference:nessus,11188; classtype:misc-activity; sid:2101987; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 749 (msg:"GPL EXPLOIT kadmind buffer overflow attempt 2"; flow:established,to_server; content:"/shh//bi"; reference:bugtraq,5731; reference:bugtraq,6024; reference:cve,2002-1226; reference:cve,2002-1235; reference:url,www.kb.cert.org/vuls/id/875073; classtype:shellcode-detect; sid:2101898; rev:9; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 749 (msg:"GPL EXPLOIT kadmind buffer overflow attempt"; flow:established,to_server; content:"|00 C0 05 08 00 C0 05 08 00 C0 05 08 00 C0 05 08|"; reference:bugtraq,5731; reference:bugtraq,6024; reference:cve,2002-1226; reference:cve,2002-1235; reference:url,www.kb.cert.org/vuls/id/875073; classtype:shellcode-detect; sid:2101894; rev:9; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 749 (msg:"GPL EXPLOIT kadmind buffer overflow attempt"; flow:established,to_server; content:"|FF FF|KADM0.0A|00 00 FB 03|"; reference:bugtraq,5731; reference:bugtraq,6024; reference:cve,2002-1226; reference:cve,2002-1235; reference:url,www.kb.cert.org/vuls/id/875073; classtype:shellcode-detect; sid:2101896; rev:9; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 751 (msg:"GPL EXPLOIT kadmind buffer overflow attempt 3"; flow:established,to_server; content:"/shh//bi"; reference:bugtraq,5731; reference:bugtraq,6024; reference:cve,2002-1226; reference:cve,2002-1235; reference:url,www.kb.cert.org/vuls/id/875073; classtype:shellcode-detect; sid:2101899; rev:9; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 751 (msg:"GPL EXPLOIT kadmind buffer overflow attempt"; flow:established,to_server; content:"|00 C0 05 08 00 C0 05 08 00 C0 05 08 00 C0 05 08|"; reference:bugtraq,5731; reference:bugtraq,6024; reference:cve,2002-1226; reference:cve,2002-1235; reference:url,www.kb.cert.org/vuls/id/875073; classtype:shellcode-detect; sid:2101895; rev:9; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 751 (msg:"GPL EXPLOIT kadmind buffer overflow attempt"; flow:established,to_server; content:"|FF FF|KADM0.0A|00 00 FB 03|"; reference:bugtraq,5731; reference:bugtraq,6024; reference:cve,2002-1226; reference:cve,2002-1235; reference:url,www.kb.cert.org/vuls/id/875073; classtype:shellcode-detect; sid:2101897; rev:9; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 7777:7778 (msg:"GPL EXPLOIT Oracle Web Cache COPY overflow attempt"; flow:to_server,established; content:"COPY"; pcre:"/^COPY[^s]{432}/sm"; reference:bugtraq,9868; reference:cve,2004-0385; reference:nessus,12126; classtype:attempted-admin; sid:2102559; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 7777:7778 (msg:"GPL EXPLOIT Oracle Web Cache DELETE overflow attempt"; flow:to_server,established; content:"DELETE"; nocase; isdataat:432,relative; pcre:"/^DELETE[^s]{432}/sm"; reference:bugtraq,9868; reference:cve,2004-0385; reference:nessus,12126; classtype:attempted-admin; sid:2102556; rev:6; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 7777:7778 (msg:"GPL EXPLOIT Oracle Web Cache HEAD overflow attempt"; flow:to_server,established; content:"HEAD"; pcre:"/^HEAD[^s]{432}/sm"; reference:bugtraq,9868; reference:cve,2004-0385; reference:nessus,12126; classtype:attempted-admin; sid:2102552; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 7777:7778 (msg:"GPL EXPLOIT Oracle Web Cache LOCK overflow attempt"; flow:to_server,established; content:"LOCK"; pcre:"/^LOCK[^s]{432}/sm"; reference:bugtraq,9868; reference:cve,2004-0385; reference:nessus,12126; classtype:attempted-admin; sid:2102557; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 7777:7778 (msg:"GPL EXPLOIT Oracle Web Cache MKCOL overflow attempt"; flow:to_server,established; content:"MKCOL"; pcre:"/^MKCOL[^s]{432}/sm"; reference:bugtraq,9868; reference:cve,2004-0385; reference:nessus,12126; classtype:attempted-admin; sid:2102558; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 7777:7778 (msg:"GPL EXPLOIT Oracle Web Cache MOVE overflow attempt"; flow:to_server,established; content:"MOVE"; pcre:"/^MOVE[^s]{432}/sm"; reference:bugtraq,9868; reference:cve,2004-0385; reference:nessus,12126; classtype:attempted-admin; sid:2102560; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 7777:7778 (msg:"GPL EXPLOIT Oracle Web Cache POST overflow attempt"; flow:to_server,established; content:"POST"; pcre:"/^POST[^s]{432}/sm"; reference:bugtraq,9868; reference:cve,2004-0385; reference:nessus,12126; classtype:attempted-admin; sid:2102554; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 7777:7778 (msg:"GPL EXPLOIT Oracle Web Cache PUT overflow attempt"; flow:to_server,established; content:"PUT"; pcre:"/^PUT[^s]{432}/sm"; reference:bugtraq,9868; reference:cve,2004-0385; reference:nessus,12126; classtype:attempted-admin; sid:2102553; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 7777:7778 (msg:"GPL EXPLOIT Oracle Web Cache TRACE overflow attempt"; flow:to_server,established; content:"TRACE"; pcre:"/^TRACE[^s]{432}/sm"; reference:bugtraq,9868; reference:cve,2004-0385; reference:nessus,12126; classtype:attempted-admin; sid:2102555; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 873 (msg:"GPL EXPLOIT rsyncd module list access"; flow:to_server,established; content:"|23|list"; depth:5; classtype:misc-activity; sid:2102047; rev:3; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"GPL EXPLOIT EXPLOIT statdx"; flow:to_server,established; content:"/bin|C7|F|04|/sh"; reference:arachnids,442; classtype:attempted-admin; sid:2100600; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS (msg:"GPL EXPLOIT echo command attempt"; flow:to_server,established; content:"/bin/echo"; nocase; fast_pattern:only; classtype:web-application-attack; sid:2101334; rev:9; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT tftp command attempt"; flow:to_server,established; content:"tftp%20"; nocase; classtype:web-application-attack; sid:2101340; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT formmail access"; flow:to_server,established; content:"/formmail"; nocase; http_uri; reference:arachnids,226; reference:bugtraq,1187; reference:bugtraq,2079; reference:cve,1999-0172; reference:cve,2000-0411; reference:nessus,10076; reference:nessus,10782; classtype:web-application-activity; sid:2100884; rev:17; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT formmail arbitrary command execution attempt"; flow:to_server,established; content:"/formmail"; nocase; http_uri; content:"%0a"; nocase; reference:arachnids,226; reference:bugtraq,1187; reference:bugtraq,2079; reference:cve,1999-0172; reference:cve,2000-0411; reference:nessus,10076; reference:nessus,10782; classtype:web-application-attack; sid:2101610; rev:13; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT php.cgi access"; flow:to_server,established; content:"/php.cgi"; nocase; http_uri; reference:arachnids,232; reference:bugtraq,2250; reference:bugtraq,712; reference:cve,1999-0238; reference:cve,1999-058; reference:nessus,10178; classtype:attempted-recon; sid:2100824; rev:15; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT administrators.pwd access"; flow:to_server,established; content:"/administrators.pwd"; nocase; http_uri; reference:bugtraq,1205; classtype:web-application-activity; sid:2100953; rev:9; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT .cmd executable file parsing attack"; flow:established,to_server; content:".cmd|22|"; nocase; http_uri; pcre:"/\.cmd\x22.*?\x26/Ui"; reference:bugtraq,1912; reference:cve,2000-0886; classtype:web-application-attack; sid:2103193; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT .cnf access"; flow:to_server,established; content:".cnf"; nocase; http_uri; reference:bugtraq,4078; reference:nessus,10575; classtype:web-application-activity; sid:2100977; rev:13; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT .htr access"; flow:to_server,established; content:".htr"; nocase; http_uri; reference:bugtraq,1488; reference:cve,2000-0630; reference:nessus,10680; classtype:web-application-activity; sid:2100987; rev:16; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT /iisadmpwd/aexp2.htr access"; flow:to_server,established; content:"/iisadmpwd/aexp2.htr"; http_uri; reference:bugtraq,2110; reference:bugtraq,4236; reference:cve,1999-0407; reference:cve,2002-0421; reference:nessus,10371; classtype:web-application-activity; sid:2101487; rev:12; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT /msadc/samples/ access"; flow:to_server,established; content:"/msadc/samples/"; http_uri; nocase; reference:bugtraq,167; reference:cve,1999-0736; reference:nessus,1007; classtype:web-application-attack; sid:2101401; rev:10; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT Alternate Data streams ASP file access attempt"; flow:to_server,established; content:".asp|3A 3A 24|DATA"; nocase; http_uri; reference:bugtraq,149; reference:cve,1999-0278; reference:nessus,10362; reference:url,support.microsoft.com/default.aspx?scid=kb#-#-EN-US#-#-q188806; classtype:web-application-attack; sid:2100975; rev:14; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT CodeRed v2 root.exe access"; flow:to_server,established; content:"/root.exe"; nocase; http_uri; reference:url,www.cert.org/advisories/CA-2001-19.html; classtype:web-application-attack; sid:2101256; rev:10; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT ISAPI .ida access"; flow:to_server,established; content:".ida"; nocase; http_uri; pcre:"/\.ida$/iU"; reference:arachnids,552; reference:bugtraq,1065; reference:cve,2000-0071; classtype:web-application-activity; sid:2101242; rev:13; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT ISAPI .ida attempt"; flow:to_server,established; content:".ida?"; nocase; http_uri; reference:arachnids,552; reference:bugtraq,1065; reference:cve,2000-0071; classtype:web-application-attack; sid:2101243; rev:13; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT ISAPI .idq access"; flow:to_server,established; content:".idq"; nocase; http_uri; reference:arachnids,553; reference:bugtraq,1065; reference:cve,2000-0071; classtype:web-application-activity; sid:2101245; rev:12; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT ISAPI .idq attempt"; flow:to_server,established; content:".idq?"; nocase; http_uri; reference:arachnids,553; reference:bugtraq,1065; reference:bugtraq,968; reference:cve,2000-0071; reference:cve,2000-0126; reference:nessus,10115; classtype:web-application-attack; sid:2101244; rev:16; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT NTLM ASN.1 vulnerability scan attempt"; flow:to_server,established; content:"Authorization|3A| Negotiate YIQAAABiBoMAAAYrBgEFBQKgggBTMIFQoA4wDAYKKwYBBAGCNwICCqM"; http_header; reference:bugtraq,9633; reference:bugtraq,9635; reference:cve,2003-0818; reference:nessus,12052; reference:nessus,12055; reference:nessus,12065; reference:url,www.microsoft.com/technet/security/bulletin/MS04-007.mspx; classtype:attempted-dos; sid:2102386; rev:11; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS (msg:"GPL EXPLOIT WEBDAV exploit attempt"; flow:to_server,established; content:"HTTP/1.1|0A|Content-type|3A| text/xml|0A|HOST|3A|"; fast_pattern:32,4; content:"Accept|3A| */*|0A|Translate|3A| f|0A|Content-length|3A|5276|0A 0A|"; distance:1; reference:bugtraq,7116; reference:bugtraq,7716; reference:cve,2003-0109; reference:nessus,11413; reference:url,www.microsoft.com/technet/security/bulletin/ms03-007.mspx; classtype:attempted-admin; sid:2102090; rev:12; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS (msg:"GPL EXPLOIT cmd32.exe access"; flow:to_server,established; content:"cmd32.exe"; nocase; classtype:web-application-attack; sid:2101661; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT cmd? access"; flow:to_server,established; content:".cmd?&"; nocase; http_uri; classtype:web-application-attack; sid:2101003; rev:11; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT fpcount access"; flow:to_server,established; content:"/fpcount.exe"; nocase; http_uri; reference:bugtraq,2252; reference:cve,1999-1376; classtype:web-application-activity; sid:2101013; rev:11; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT iisadmpwd attempt"; flow:to_server,established; content:"/iisadmpwd/aexp"; nocase; http_uri; reference:bugtraq,2110; reference:cve,1999-0407; classtype:web-application-attack; sid:2101018; rev:12; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT iissamples access"; flow:to_server,established; content:"/iissamples/"; nocase; http_uri; reference:nessus,11032; classtype:web-application-attack; sid:2101402; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT site/iisamples access"; flow:to_server,established; content:"/site/iisamples"; nocase; http_uri; reference:nessus,10370; classtype:web-application-activity; sid:2101046; rev:11; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT unicode directory traversal attempt"; flow:to_server,established; content:"/..%c0%af../"; http_raw_uri; nocase; reference:bugtraq,1806; reference:cve,2000-0884; reference:nessus,10537; classtype:web-application-attack; sid:2100981; rev:14; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS (msg:"GPL EXPLOIT unicode directory traversal attempt"; flow:to_server,established; content:"/..%c1%1c../"; nocase; reference:bugtraq,1806; reference:cve,2000-0884; reference:nessus,10537; classtype:web-application-attack; sid:2100982; rev:12; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT unicode directory traversal attempt"; flow:to_server,established; content:"/..%c1%9c../"; http_raw_uri; reference:bugtraq,1806; reference:cve,2000-0884; reference:nessus,10537; classtype:web-application-attack; sid:2100983; rev:19; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT Tomcat server exploit access"; flow:to_server,established; content:"/contextAdmin/contextAdmin.html"; nocase; http_uri; reference:bugtraq,1548; reference:cve,2000-0672; reference:nessus,10477; classtype:attempted-recon; sid:2101111; rev:13; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"GPL EXPLOIT apache chunked encoding memory corruption exploit attempt"; flow:established,to_server; content:"|C0|PR|89 E1|PQRP|B8 3B 00 00 00 CD 80|"; reference:bugtraq,5033; reference:cve,2002-0392; classtype:web-application-activity; sid:2101808; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS (msg:"GPL EXPLOIT xp_filelist attempt"; flow:to_server,established; content:"xp_filelist"; nocase; classtype:web-application-attack; sid:2101059; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 139 (msg:"GPL EXPLOIT sp_adduser database user creation"; flow:to_server,established; content:"s|00|p|00|_|00|a|00|d|00|d|00|u|00|s|00|e|00|r|00|"; depth:32; offset:32; nocase; classtype:attempted-user; sid:2100679; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 139 (msg:"GPL EXPLOIT sp_start_job - program execution"; flow:to_server,established; content:"s|00|p|00|_|00|s|00|t|00|a|00|r|00|t|00|_|00|j|00|o|00|b|00|"; depth:32; offset:32; nocase; classtype:attempted-user; sid:2100676; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 139 (msg:"GPL EXPLOIT xp_sprintf possible buffer overflow"; flow:to_server,established; content:"x|00|p|00|_|00|s|00|p|00|r|00|i|00|n|00|t|00|f|00|"; offset:32; nocase; reference:bugtraq,1204; reference:url,www.microsoft.com/technet/security/bulletin/MS01-060.mspx; classtype:attempted-user; sid:2100695; rev:10; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 1433 (msg:"GPL EXPLOIT xp_cmdshell - program execution"; flow:to_server,established; content:"x|00|p|00|_|00|c|00|m|00|d|00|s|00|h|00|e|00|l|00|l|00|"; nocase; classtype:attempted-user; sid:2100687; rev:6; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 445 (msg:"GPL EXPLOIT xp_cmdshell program execution 445"; flow:to_server,established; content:"x|00|p|00|_|00|c|00|m|00|d|00|s|00|h|00|e|00|l|00|l|00|"; nocase; classtype:attempted-user; sid:2101759; rev:6; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $TELNET_SERVERS 23 (msg:"GPL EXPLOIT login buffer non-evasive overflow attempt"; flow:to_server,established; flowbits:isnotset,ttyprompt; content:"|FF FA|'|00 00|"; rawbytes; pcre:"/T.*?T.*?Y.*?P.*?R.*?O.*?M.*?P.*?T/RBi"; flowbits:set,ttyprompt; reference:bugtraq,3681; reference:cve,2001-0797; classtype:attempted-admin; sid:2103274; rev:4; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $HOME_NET !21:23 -> $EXTERNAL_NET any (msg:"GPL EXPLOIT Microsoft cmd.exe banner"; flow:established; content:"Microsoft Windows "; content:"Copyright |28|c|29| 20"; distance:0; content:"Microsoft Corp"; distance:0; reference:nessus,11633; classtype:successful-admin; sid:2102123; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $HOME_NET 749 -> $EXTERNAL_NET any (msg:"GPL EXPLOIT successful kadmind buffer overflow attempt"; flow:established,from_server; content:"*GOBBLE*"; depth:8; reference:bugtraq,5731; reference:bugtraq,6024; reference:cve,2002-1226; reference:cve,2002-1235; reference:url,www.kb.cert.org/vuls/id/875073; classtype:successful-admin; sid:2101900; rev:11; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $HOME_NET 751 -> $EXTERNAL_NET any (msg:"GPL EXPLOIT successful kadmind buffer overflow attempt"; flow:established,from_server; content:"*GOBBLE*"; depth:8; reference:bugtraq,5731; reference:bugtraq,6024; reference:cve,2002-1226; reference:cve,2002-1235; reference:url,www.kb.cert.org/vuls/id/875073; classtype:successful-admin; sid:2101901; rev:11; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 111 (msg:"GPL EXPLOIT portmap proxy integer overflow attempt UDP"; content:"|00 01 86 A0 00|"; depth:5; offset:12; content:"|00 00 00 05|"; within:4; distance:3; byte_jump:4,4,relative,align; byte_jump:4,4,relative,align; byte_test:4,>,2048,12,relative; content:"|00 00 00 00|"; depth:4; offset:4; reference:bugtraq,7123; reference:cve,2003-0028; classtype:rpc-portmap-decode; sid:2102092; rev:6; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 123 (msg:"GPL EXPLOIT ntpdx overflow attempt"; dsize:>128; reference:bugtraq,2540; reference:cve,2001-0414; classtype:attempted-admin; sid:2100312; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 500 (msg:"GPL EXPLOIT ISAKMP invalid identification payload attempt"; content:"|05|"; depth:1; offset:16; byte_test:2,>,4,30; byte_test:2,<,8,30; reference:bugtraq,10004; reference:cve,2004-0184; classtype:attempted-dos; sid:2102486; rev:6; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 500 (msg:"GPL EXPLOIT ISAKMP delete hash with empty hash attempt"; content:"|08|"; depth:1; offset:16; content:"|0C|"; depth:1; offset:28; content:"|00 04|"; depth:2; offset:30; reference:bugtraq,9416; reference:bugtraq,9417; reference:cve,2004-0164; classtype:misc-attack; sid:2102413; rev:11; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 500 (msg:"GPL EXPLOIT ISAKMP fifth payload certificate request length overflow attempt"; flow:to_server; byte_test:4,>,2043,24; byte_jump:2,30; byte_jump:2,-2,relative; byte_jump:2,-2,relative; content:"|07|"; within:1; distance:-4; byte_jump:2,1,relative; byte_test:2,>,2043,-2,relative; reference:bugtraq,9582; reference:cve,2004-0040; classtype:attempted-admin; sid:2102380; rev:5; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 500 (msg:"GPL EXPLOIT ISAKMP first payload certificate request length overflow attempt"; byte_test:4,>,2043,24; content:"|07|"; depth:1; offset:16; byte_test:2,>,2043,30; reference:bugtraq,9582; reference:cve,2004-0040; classtype:attempted-admin; sid:2102376; rev:4; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 500 (msg:"GPL EXPLOIT ISAKMP forth payload certificate request length overflow attempt"; flow:to_server; byte_test:4,>,2043,24; byte_jump:2,30; content:"|07|"; within:1; distance:-4; byte_jump:2,1,relative; byte_test:2,>,2043,-2,relative; reference:bugtraq,9582; reference:cve,2004-0040; classtype:attempted-admin; sid:2102379; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 500 (msg:"GPL EXPLOIT ISAKMP initial contact notification without SPI attempt"; content:"|0B|"; depth:1; offset:16; content:"|00 0C 00 00 00 01 01 00 06 02|"; depth:10; offset:30; reference:bugtraq,9416; reference:bugtraq,9417; reference:cve,2004-0164; classtype:misc-attack; sid:2102414; rev:10; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 500 (msg:"GPL EXPLOIT ISAKMP second payload certificate request length overflow attempt"; byte_test:4,>,2043,24; content:"|07|"; depth:1; offset:28; byte_jump:2,30; byte_test:2,>,2043,-2,relative; reference:bugtraq,9582; reference:cve,2004-0040; classtype:attempted-admin; sid:2102377; rev:4; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 500 (msg:"GPL EXPLOIT ISAKMP second payload initial contact notification without SPI attempt"; content:"|0B|"; depth:1; offset:28; byte_jump:2,30; content:"|00 0C 00 00 00 01 01 00|`|02|"; within:10; distance:-2; reference:bugtraq,9416; reference:bugtraq,9417; reference:cve,2004-0164; classtype:misc-attack; sid:2102415; rev:10; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 635 (msg:"GPL EXPLOIT x86 Linux mountd overflow"; content:"^|B0 02 89 06 FE C8 89|F|04 B0 06 89|F"; reference:bugtraq,121; reference:cve,1999-0002; classtype:attempted-admin; sid:2100315; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 67 (msg:"GPL EXPLOIT bootp x86 linux overflow"; content:"A90|C0 A8 01 01|/bin/sh|00|"; reference:cve,1999-0389; reference:cve,1999-0798; reference:cve,1999-0799; classtype:attempted-admin; sid:2100319; rev:6; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET 67 (msg:"GPL EXPLOIT bootp hostname format string attempt"; content:"|01|"; depth:1; content:"|0C|"; distance:240; content:"%"; distance:0; content:"%"; within:8; distance:1; content:"%"; within:8; distance:1; reference:bugtraq,4701; reference:cve,2002-0702; reference:nessus,11312; classtype:misc-attack; sid:2102039; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert http $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"ET EXPLOIT HP OpenView NNM snmpviewer.exe CGI Stack Buffer Overflow 1"; flow:to_server,established; content:"POST "; nocase; depth:5; uricontent:"/OvCgi/snmpviewer.exe"; nocase; content:"act="; nocase; content:"app="; nocase; isdataat:257,relative; content:!"|0A|"; within:257; pcre:"/app\x3D[^\x26\s\r\n]{257}/i"; reference:cve,CVE-2010-1552; reference:bugtraq,40068; classtype:attempted-admin; sid:2012682; rev:6; metadata:created_at 2010_09_25, updated_at 2010_09_25;) + +alert http $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"ET EXPLOIT HP OpenView NNM snmpviewer.exe CGI Stack Buffer Overflow 2"; flow:to_server,established; content:"POST "; nocase; depth:5; uricontent:"/OvCgi/snmpviewer.exe"; nocase; content:"app="; nocase; content:"act="; nocase; isdataat:257,relative; content:!"|0A|"; within:257; pcre:"/act\x3D[^\x26\s\r\n]{257}/i"; reference:cve,CVE-2010-1552; reference:bugtraq,40068; classtype:attempted-admin; sid:2012683; rev:5; metadata:created_at 2010_09_25, updated_at 2010_09_25;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 50002 (msg:"ET EXPLOIT Possible Etrust Secure Transaction Platform Identification and Entitlements Server File Disclosure Attempt"; flow:established,to_server; content:"POST "; nocase; depth:5; content:""; nocase; distance:0; flowbits:set,ET.etrust.fieldis; reference:url,shh.thathost.com/secadv/2009-06-15-entrust-ies.txt; reference:url,securitytracker.com/alerts/2010/Sep/1024391.html; classtype:misc-attack; sid:2011502; rev:1; metadata:created_at 2010_09_27, updated_at 2010_09_27;) + +alert tcp $HOME_NET 50002 -> $EXTERNAL_NET any (msg:"ET EXPLOIT Successful Etrust Secure Transaction Platform Identification and Entitlements Server File Disclosure Attempt"; flowbits:isset,ET.etrust.fieldis; flow:established,from_server; content:"Unknown user"; reference:url,shh.thathost.com/secadv/2009-06-15-entrust-ies.txt; reference:url,securitytracker.com/alerts/2010/Sep/1024391.html; classtype:misc-attack; sid:2011503; rev:3; metadata:created_at 2010_09_27, updated_at 2010_09_27;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT HP OpenView Network Node Manager OvJavaLocale Cookie Value Buffer Overflow Attempt"; flow:established,to_server; content:"GET"; http_method; content:"/OvCgi/webappmon.exe"; http_uri; nocase; content:"ins=nowait"; nocase; http_uri; content:"cache="; nocase; content:"OvJavaLocale="; nocase; within:15; isdataat:1000,relative; content:!"|0A|"; within:1000; reference:url,www.coresecurity.com/content/hp-nnm-ovjavalocale-buffer-overflow; reference:bugtraq,42154; reference:cve,2010-2709; classtype:web-application-attack; sid:2011328; rev:4; metadata:created_at 2010_09_28, updated_at 2010_09_28;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Microsoft Office Word 2007 sprmCMajority Buffer Overflow Attempt"; flow:established,to_client; file_data; content:"|0D 0A 0D 0A D0 CF 11 E0 A1 B1 1A E1|"; content:"|47 CA FF|"; content:"|3E C6 FF|"; distance:0; isdataat:84,relative; content:!"|0A|"; within:84; reference:url,www.exploit-db.com/moaub11-microsoft-office-word-sprmcmajority-buffer-overflow/; reference:url,www.microsoft.com/technet/security/Bulletin/MS10-056.mspx; reference:bid,42136; reference:cve,2010-1900; classtype:attempted-user; sid:2011478; rev:6; metadata:created_at 2010_09_28, updated_at 2010_09_28;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT VMware Tools Update OS Command Injection Attempt"; flow:established,to_server; content:"POST"; http_method; content:"exec|3A|"; nocase; content:"args|3A|"; nocase; distance:0; content:"UpgradeTools_Task"; distance:0; reference:url,www.exploit-db.com/exploits/15717/; reference:cve,2010-4297; classtype:attempted-admin; sid:2012045; rev:5; metadata:created_at 2010_12_10, updated_at 2010_12_10;) + +alert http any any -> $HOME_NET 8765 (msg:"ET EXPLOIT JDownloader Webinterface Source Code Disclosure"; flow:established,to_server; content:"|2f|index|2e|tmpl"; depth:80; nocase; pcre:"/\x2findex\x2etmpl(\x3a\x3a\x24DATA|\x2f|\x2e)\x0d\x0a/i"; reference:url,packetstormsecurity.org/files/view/96126/jdownloader-disclose.txt; classtype:attempted-recon; sid:2012055; rev:2; metadata:created_at 2010_12_15, updated_at 2010_12_15;) + +alert http $EXTERNAL_NET any -> $HOME_NET 8307 (msg:"ET EXPLOIT VMware 2 Web Server Directory Traversal"; flow:established,to_server; content:"|2f 2e 2e 2f 2e 2e 2f 2e 2e 2f|"; depth:60; reference:url,www.exploit-db.com/exploits/15617/; classtype:attempted-recon; sid:2012057; rev:2; metadata:created_at 2010_12_15, updated_at 2010_12_15;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 9100 (msg:"ET EXPLOIT HP LaserJet PLJ Interface Directory Traversal"; flow:established,to_server; content:"|1b 25 2d|"; depth:3; content:"|20 28 29 20 50 4a 4c 20|"; distance:0; within:25; content:"FSDIRLIST|20|NAME="; nocase; content:"|22|0|3a 5c 2e 2e 5c 2e 2e 5c 2e 2e|"; distance:0; within:25; reference:url,www.exploit-db.com/exploits/15631/; reference:bugtraq,44882; reference:cve,2010-4107; classtype:misc-attack; sid:2012058; rev:1; metadata:created_at 2010_12_15, updated_at 2010_12_15;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 445 (msg:"ET EXPLOIT Microsoft SRV2.SYS SMB Negotiate ProcessID Function Table Dereference (CVE-2009-3103)"; flow:to_server,established; content:"|FF 53 4d 42 72|"; offset:4; depth:5; content:"|00 26|"; distance:7; within:2; metadata: former_category NETBIOS; reference:url,www.exploit-db.com/exploits/14674/; reference:url,www.microsoft.com/technet/security/bulletin/ms09-050.mspx; reference:cve,2009-3103; classtype:attempted-user; sid:2012063; rev:3; metadata:created_at 2010_12_16, updated_at 2017_06_27;) + +alert http $EXTERNAL_NET any -> $HOME_NET 8899 (msg:"ET EXPLOIT Oracle Virtual Server Agent Command Injection Attempt"; flow: to_server,established; content:"POST"; http_method; content:"|0d 0a 0d 0a 3c 3f|xml|20|version"; nocase; content:"|3c|methodCall|3e|"; distance:0; content:"|3c|methodName|3e|"; distance:0; within:25; content:"|3c|params|3e|"; content:"|3c 2f|value|3e|"; distance:0; within:400; content:"|3c|param| 3e|"; distance:0; content:"|3c|value|3e|"; within:50; content:"|3c|string|3e|"; content:"|27|"; distance:0; within:50; content:"|3b|"; within:10; content:"|3b|"; content:"|27|"; distance:0; within:100; reference:url,exploit-db.com/exploits/15244/; classtype:attempted-user; sid:2012101; rev:3; metadata:created_at 2011_12_27, updated_at 2011_12_27;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT D-Link bsc_wlan.php Security Bypass"; flow:established,to_server; content:"POST"; nocase; http_method; content:"/bsc_wlan.php"; nocase; http_uri; content:"ACTION_POST=final&"; nocase; http_client_body; content:"&f_ssid="; nocase; http_client_body; content:"&f_authentication=7&"; nocase; http_client_body; within:135; content:"f_cipher=2&"; nocase; http_client_body; content:"f_wep_len=&f_wep_format=&f_wep_def_key=&"; nocase; http_client_body; within:40; content:"&f_wep=&f_wpa_psk_type=1&f_wpa_psk="; nocase; http_client_body; content:"&f_radius_ip1=&f_radius_port1=&f_radius_secret1="; nocase; http_client_body; within:70; reference:url,packetstormsecurity.org/files/view/96100/dlinkwlan-bypass.txt; classtype:web-application-attack; sid:2012103; rev:5; metadata:created_at 2011_12_27, updated_at 2011_12_27;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 3333 (msg:"ET EXPLOIT Wireshark ENTTEC DMX Data Processing Code Execution Attempt 1"; content:"|45 53 44 44|"; depth:4; content:"|04|"; distance:2; within:1; content:"|FE FF|"; distance:0; within:50; content:"|FE FF|"; distance:0; within:50; content:"|FE|"; byte_test:1,>,11,0,relative; reference:url,www.exploit-db.com/exploits/15898/; reference:bid,45634; classtype:attempted-user; sid:2012154; rev:2; metadata:created_at 2011_01_06, updated_at 2011_01_06;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 3333 (msg:"ET EXPLOIT Wireshark ENTTEC DMX Data Processing Code Execution Attempt 2"; content:"|FE|"; byte_test:1,>,11,0,relative; content:"|45 53 44 44|"; depth:4; content:"|04|"; distance:2; within:1; content:"|FE FF|"; distance:0; within:50; content:"|FE FF|"; distance:0; within:50; reference:url,www.exploit-db.com/exploits/15898/; reference:bid,45634; classtype:attempted-user; sid:2012155; rev:2; metadata:created_at 2011_01_06, updated_at 2011_01_06;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Microsoft Windows Common Control Library Heap Buffer Overflow"; flow:established,from_server; content:"Content-Type|3a| image/svg|2b|xml"; nocase; file_data; content:"|3c|svg xmlns="; nocase; distance:0; content:"style|3d 22|fill|3a 20 23|ffffff|22|"; nocase; distance:0; content:"transform"; nocase; distance:0; pcre:"/^=\s*\x22\s*[^\s\x22\x28]{1000}/iR"; reference:bugtraq,43717; reference:url,www.microsoft.com/technet/security/bulletin/MS10-081.mspx; classtype:attempted-admin; sid:2012174; rev:9; metadata:created_at 2011_01_12, updated_at 2011_01_12;) + +alert http $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"ET EXPLOIT Lexmark Printer RDYMSG Cross Site Scripting Attempt"; flow:established,to_server; content:"pjl_ready_message="; http_uri; nocase; fast_pattern:only; pcre:"/pjl\x5Fready\x5Fmessage\x3D.+(script|alert|onmouse[a-z]+|onkey[a-z]+|onload|onunload|ondragdrop|onblur|onfocus|onclick|ondblclick|onsubmit|onreset|onselect|onchange)/Ui"; reference:url,packetstormsecurity.org/files/view/97265/lexmark-xss.txt; classtype:web-application-attack; sid:2012193; rev:2; metadata:affected_product Web_Server_Applications, attack_target Web_Server, deployment Datacenter, tag XSS, tag Cross_Site_Scripting, signature_severity Major, created_at 2011_01_15, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (msg:"ET EXPLOIT Unknown Exploit Pack URL Detected"; flow:to_server,established; content:"/imgurl"; nocase; http_uri; content:".php"; nocase; http_uri; content:"hl="; nocase; http_uri; classtype:bad-unknown; sid:2012324; rev:4; metadata:created_at 2011_02_21, updated_at 2011_02_21;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 13364 (msg:"ET EXPLOIT RXS-3211 IP Camera Password Information Disclosure Attempt"; content:"|FF FF FF FF FF FF 00 06 FF F9|"; reference:bid,47976; classtype:attempted-admin; sid:2012866; rev:2; metadata:created_at 2011_05_26, updated_at 2011_05_26;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT 2Wire Password Reset Vulnerability via GET"; flow:established,to_server; content:"/xslt?PAGE=H04_POST&THISPAGE=H04&NEXTPAGE="; http_uri; content:"&PASSWORD="; http_uri; distance:0; content:"&PASSWORD_CONF="; http_uri; distance:0; reference:url,www.seguridad.unam.mx/doc/?ap=articulo&id=196; reference:url,packetstormsecurity.org/files/view/102614/2wire-reset.rb.txt; classtype:attempted-admin; sid:2013165; rev:2; metadata:created_at 2011_07_01, updated_at 2011_07_01;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT 2Wire Password Reset Vulnerability via POST"; flow:established,to_server; content:"/xslt"; http_uri; content:"PAGE=H04_POST&THISPAGE=H04&NEXTPAGE="; http_client_body; content:"&PASSWORD="; http_client_body; distance:0; content:"&PASSWORD_CONF="; http_client_body; distance:0; reference:url,www.seguridad.unam.mx/doc/?ap=articulo&id=196; reference:url,packetstormsecurity.org/files/view/102614/2wire-reset.rb.txt; classtype:attempted-admin; sid:2013166; rev:2; metadata:created_at 2011_07_01, updated_at 2011_07_01;) + +#alert ssh $HOME_NET any -> any any (msg:"ET EXPLOIT FreeBSD OpenSSH 3.5p1 possible vulnerable server"; flow:established,from_server; content:"SSH-1.99-OpenSSH_3.5p1 FreeBSD-200"; reference:url,packetstormsecurity.org/files/view/102683/ssh_preauth_freebsd.txt; reference:url,seclists.org/2011/Jul/6; classtype:misc-activity; sid:2013167; rev:4; metadata:created_at 2011_07_01, updated_at 2011_07_01;) + +alert ftp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT VSFTPD Backdoor User Login Smiley"; flow:established,to_server; content:"USER "; depth:5; content:"|3a 29|"; distance:0; classtype:attempted-admin; sid:2013188; rev:5; metadata:created_at 2011_07_05, updated_at 2011_07_05;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT HP OpenView Network Node Manager Toolbar.exe CGI Buffer Overflow Attempt"; flow:established,to_server; content:"/OvCgi/Toolbar.exe?"; http_uri; content:"/OvCgi/Toolbar.exe?"; isdataat:1024,relative; content:!"|0A|"; within:1024; reference:url,exploit-db.com/exploits/17536/; classtype:web-application-attack; sid:2013288; rev:3; metadata:created_at 2011_07_19, updated_at 2011_07_19;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible BSNL Router DNS Change Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/dnscfg.cgi"; http_uri; content:"dnsPrimary="; http_client_body; content:"&dnsSecondary="; http_client_body; content:"&dnsDynamic="; http_client_body; content:"&dnsRefresh="; http_client_body; reference:url,www.hackersbay.in/2011/02/pwning-routersbsnl.html; classtype:attempted-user; sid:2013918; rev:3; metadata:created_at 2011_11_17, updated_at 2011_11_17;) + +alert tcp any any -> $HOME_NET 3389 (msg:"ET EXPLOIT Microsoft RDP Server targetParams Exploit Attempt"; flow:to_server,established; content:"|03 00|"; depth:2; content:"|7f 65 82 01 94|"; distance:24; within:5; content:"|30 19|"; distance:9; within:2; byte_test:1,<,6,3,relative; reference:url,msdn.microsoft.com/en-us/library/cc240836.aspx; reference:cve,2012-0002; classtype:attempted-admin; sid:2014383; rev:2; metadata:created_at 2012_03_13, updated_at 2012_03_13;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Java Atomic Reference Exploit Attempt Metasploit Specific"; flow:established,from_server; file_data; content:"|3c|applet archive=|22|"; distance:0; content:".jar|22|"; distance:0; within:14; content:"code=|22|msf.x.Exploit.class|22|"; distance:0; fast_pattern:6,19; reference:cve,CVE-2012-0507; reference:url,www.metasploit.com/modules/exploit/multi/browser/java_atomicreferencearray; classtype:bad-unknown; sid:2014461; rev:8; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2012_04_04, updated_at 2016_07_01;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 21 (msg:"ET EXPLOIT Potential RoaringBeast ProFTPd Exploit Specific config files upload"; flow:established,to_server; content:"STOR "; content:".conf|0d 0a|"; distance:0; fast_pattern; pcre:"/^\s*?STOR\s+[^\r\n]*?\x2f(tgt|trace|rbp(c|p))\.conf\r$/mi"; reference:url,www.exploit-db.com/exploits/18181/; reference:url,stopmalvertising.com/malware-reports/the-c3284d-malware-network-stats.php.html; classtype:trojan-activity; sid:2015513; rev:3; metadata:created_at 2012_07_23, updated_at 2012_07_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 21 (msg:"ET EXPLOIT Potential RoaringBeast ProFTPd Exploit nsswitch.conf Upload"; flow:established,to_server; content:"STOR "; content:"nsswitch.conf|0d 0a|"; distance:0; pcre:"/^\s*?STOR\s+[^\r\n]*?nsswitch\.conf\r$/mi"; reference:url,www.exploit-db.com/exploits/18181/; reference:url,stopmalvertising.com/malware-reports/the-c3284d-malware-network-stats.php.html; classtype:trojan-activity; sid:2015514; rev:2; metadata:created_at 2012_07_23, updated_at 2012_07_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 21 (msg:"ET EXPLOIT Potential RoaringBeast ProFTPd Exploit Specific (CHMOD 777)"; flow:established,to_server; content:"SITE CHMOD 777 NONEXISTANT"; depth:26; reference:url,www.exploit-db.com/exploits/18181/; reference:url,stopmalvertising.com/malware-reports/the-c3284d-malware-network-stats.php.html; classtype:trojan-activity; sid:2015515; rev:2; metadata:created_at 2012_07_23, updated_at 2012_07_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 3306 (msg:"ET EXPLOIT MySQL Stack based buffer overrun Exploit Specific"; flow:to_server,established; content:"grant"; nocase; content:"file"; nocase; distance:0; content:"on"; distance:0; nocase; pcre:"/^\s+A{500}/R"; reference:url,seclists.org/fulldisclosure/2012/Dec/4; classtype:attempted-user; sid:2015975; rev:5; metadata:created_at 2012_12_03, updated_at 2012_12_03;) + +#alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 3306 (msg:"ET EXPLOIT MySQL Heap based buffer overrun Exploit Specific"; flow:to_server,established; byte_test:3,>,10000,0,little; content:"|00 03|"; offset:3; depth:2; pcre:"/^(USE|PASS|SELECT|UPDATE|INSERT|ASCII|SHOW|CREATE|DESCRIBE|DROP|ALTER)\s+?(.{1})\2{300}/Ri"; reference:url,archives.neohapsis.com/archives/fulldisclosure/2012-12/0006.html; classtype:attempted-user; sid:2015987; rev:3; metadata:created_at 2012_12_04, updated_at 2012_12_04;) + +alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 3306 (msg:"ET EXPLOIT MySQL (Linux) Database Privilege Elevation (Exploit Specific)"; flow:to_server,established; content:"|03|"; offset:3; depth:4; content:"select |27|TYPE=TRIGGERS|27| into outfile|27|"; nocase; pcre:"/\s*?\/.+?\.TRG\x27\s*?LINES TERMINATED BY \x27\x5fntriggers=/Ri"; content:"CREATE DEFINER=|60|root|60|@|60|localhost|60|"; nocase; distance:0; pcre:"/\s+?trigger\s+?[^\x20]+?\s+?after\s+?insert\s+?on\s+?/Ri"; content:"UPDATE mysql.user"; nocase; fast_pattern:only; reference:cve,2012-5613; reference:url,seclists.org/fulldisclosure/2012/Dec/6; classtype:attempted-user; sid:2015992; rev:7; metadata:created_at 2012_12_05, updated_at 2012_12_05;) + +alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 3306 (msg:"ET EXPLOIT MySQL Server for Windows Remote SYSTEM Level Exploit (Stuxnet Techique DUMP INTO executable)"; flow:to_server,established; content:"|03|"; offset:3; depth:4; content:"SELECT data FROM"; nocase; distance:0; content:"INTO DUMPFILE"; nocase; distance:0; content:"c|3a|/windows/system32/"; nocase; fast_pattern; content:".exe"; nocase; distance:0; pcre:"/SELECT data FROM [^\x20]+?\x20INTO DUMPFILE [\x27\x22]c\x3a\/windows\/system32\/[a-z0-9_-]+?\.exe[\x27\x22]/i"; reference:url,seclists.org/fulldisclosure/2012/Dec/att-13/; classtype:attempted-user; sid:2015995; rev:4; metadata:created_at 2012_12_05, updated_at 2012_12_05;) + +alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 3306 (msg:"ET EXPLOIT MySQL Server for Windows Remote SYSTEM Level Exploit (Stuxnet Technique)"; flow:to_server,established; content:"|03|"; offset:3; depth:4; content:"INSERT INTO"; nocase; distance:0; content:"#pragma namespace("; nocase; distance:0; content:"|5c 5c 5c|.|5c 5c 5c 5c|root|5c 5c 5c 5c|"; nocase; distance:0; content:"__EventFilter"; nocase; distance:0; content:" __InstanceModificationEvent"; nocase; distance:0; content:"TargetInstance"; nocase; distance:0; content:"Win32_LocalTime"; nocase; distance:0; content:"ActiveScriptEventConsumer"; nocase; distance:0; content:"JScript"; nocase; distance:0; content:"WScript.Shell"; nocase; distance:0; content:"WSH.run"; nocase; distance:0; content:".exe"; distance:0; content:"__FilterToConsumerBinding"; pcre:"/WSH\.run\x28\x5c+?[\x22\x27][a-z0-9_-]+?\.exe/"; reference:url,seclists.org/fulldisclosure/2012/Dec/att-13/; classtype:attempted-user; sid:2015996; rev:3; metadata:created_at 2012_12_05, updated_at 2012_12_05;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Metasploit -Java Atomic Exploit Downloaded"; flow:established,to_client; file_data; content:"PK"; within:2; content:"msf|2f|x|2f|"; distance:0; classtype:bad-unknown; sid:2016028; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2012_12_12, updated_at 2016_07_01;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Metasploit js_property_spray sprayHeap"; flow:established,from_server; file_data; content:"sprayHeap"; nocase; pcre:"/^[\r\n\s]*?\x28[^\x29]*?shellcode/Ri"; reference:url,community.rapid7.com/community/metasploit/blog/2013/03/04/new-heap-spray-technique-for-metasploit-browser-exploitation; classtype:attempted-user; sid:2016519; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2013_03_04, updated_at 2016_07_01;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Metasploit mstime_malloc no-spray"; flow:established,from_server; file_data; content:"mstime_malloc"; nocase; pcre:"/^[\r\n\s]*?\x28[^\x29]*?shellcode/Ri"; reference:url,community.rapid7.com/community/metasploit/blog/2013/03/04/new-heap-spray-technique-for-metasploit-browser-exploitation; classtype:attempted-user; sid:2016824; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2013_05_06, updated_at 2016_07_01;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 25 (msg:"ET EXPLOIT Exim/Dovecot Possible MAIL FROM Command Execution"; flow:to_server,established; content:"${IFS}"; fast_pattern:only; content:"mail from|3a|"; nocase; pcre:"/^[^\r\n]*?\x60[^\x60]*?\$\{IFS\}/R"; reference:url,redteam-pentesting.de/de/advisories/rt-sa-2013-001/-exim-with-dovecot-typical-misconfiguration-leads-to-remote-command-execution; classtype:attempted-admin; sid:2016835; rev:2; metadata:created_at 2013_05_08, updated_at 2013_05_08;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Apache Struts Possible OGNL Java Exec In URI"; flow:to_server,established; content:"java.lang.Runtime@getRuntime().exec("; http_uri; nocase; classtype:attempted-user; sid:2016953; rev:3; metadata:created_at 2013_05_31, updated_at 2013_05_31;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Apache Struts Possible OGNL AllowStaticMethodAccess in client body"; flow:to_server,established; content:"memberAccess"; http_client_body; nocase; content:"allowStaticMethodAccess"; http_client_body; nocase; classtype:attempted-user; sid:2016954; rev:3; metadata:created_at 2013_05_31, updated_at 2013_05_31;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Apache Struts Possible OGNL AllowStaticMethodAccess in URI"; flow:to_server,established; content:"memberAccess"; http_uri; nocase; content:"allowStaticMethodAccess"; http_uri; nocase; reference:url,struts.apache.org/development/2.x/docs/s2-013.html; classtype:attempted-user; sid:2016956; rev:3; metadata:created_at 2013_05_31, updated_at 2013_05_31;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Apache Struts Possible OGNL Java Exec in client body"; flow:to_server,established; content:"java.lang.Runtime@getRuntime().exec("; http_client_body; nocase; reference:url,struts.apache.org/development/2.x/docs/s2-013.html; classtype:attempted-user; sid:2016957; rev:3; metadata:created_at 2013_05_31, updated_at 2013_05_31;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Apache Struts Possible OGNL Java WriteFile in client_body"; flow:to_server,established; content:"java.io.FileOutputStream"; http_client_body; nocase; content:".write"; distance:0; nocase; http_client_body; content:"sun.misc.BASE64Decoder"; nocase; http_client_body; reference:url,struts.apache.org/development/2.x/docs/s2-013.html; classtype:attempted-user; sid:2016958; rev:3; metadata:created_at 2013_05_31, updated_at 2013_05_31;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Apache Struts Possible OGNL Java WriteFile in URI"; flow:to_server,established; content:"java.io.FileOutputStream"; http_uri; nocase; content:".write"; distance:0; nocase; http_uri; content:"sun.misc.BASE64Decoder"; nocase; http_uri; reference:url,struts.apache.org/development/2.x/docs/s2-013.html; classtype:attempted-user; sid:2016959; rev:3; metadata:created_at 2013_05_31, updated_at 2013_05_31;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT CVE-2013-1331 Microsoft Office PNG Exploit plugin-detect script access"; flow:established,to_client; file_data; content:"ScriptBridge.ScriptBridge"; content:"|00|h|00|t|00|t|00|p|00 3a 00 2f 00 2f 00|"; content:"|2f 00|v|00|w|00|.|00|p|00|h|00|p|00|?|00|i|00|="; distance:0; fast_pattern; reference:url,blogs.technet.com/b/srd/archive/2013/06/11/ms13-051-get-out-of-my-office.aspx; classtype:attempted-user; sid:2017006; rev:5; metadata:created_at 2013_06_11, updated_at 2013_06_11;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT CVE-2013-1331 Microsoft Office PNG Exploit plugin-detect script access"; flow:established,from_client; content:"/vw.php?i="; http_uri; fast_pattern:only; pcre:"/\/vw\.php\?i=[a-fA-F0-9]+?\-[a-fA-F0-9]+?$/U"; reference:url,blogs.technet.com/b/srd/archive/2013/06/11/ms13-051-get-out-of-my-office.aspx; classtype:attempted-user; sid:2017007; rev:6; metadata:created_at 2013_06_11, updated_at 2013_06_11;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT CVE-2013-1331 Microsoft Office PNG Exploit Specific"; flow:established,to_client; file_data; content:"|89 50 4E 47 0D 0A 1A 0A|"; content:"IHDR"; distance:0; content:"tEXt"; distance:13; content:"db.php?j="; distance:0; content:"msnmusax.ninn"; fast_pattern:only; classtype:attempted-user; sid:2017008; rev:5; metadata:created_at 2013_06_11, updated_at 2013_06_11;) + +alert http $HOME_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT SolusVM 1.13.03 SQL injection"; flow:established,to_server; content:"POST"; http_method; content:"/centralbackup.php?"; http_uri; fast_pattern:only; content:"_v="; content:"deleteid="; classtype:trojan-activity; sid:2017060; rev:3; metadata:affected_product Web_Server_Applications, attack_target Web_Server, deployment Datacenter, tag SQL_Injection, signature_severity Major, created_at 2013_06_24, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT SolusVM 1.13.03 Access to solusvmc-node setuid bin"; flow:established,to_server; content:"solusvmc-node"; fast_pattern:only; pcre:"/\bsolusvmc-node\b/"; classtype:trojan-activity; sid:2017061; rev:3; metadata:created_at 2013_06_24, updated_at 2013_06_24;) + +alert http $HOME_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT SolusVM WHMCS CURL Multi-part Boundary Issue"; flow:established,to_server; content:"POST"; http_method; content:"/rootpassword.php?"; http_uri; fast_pattern:only; content:"name=action"; content:"name=action"; distance:0; content:"name=action"; distance:0; reference:url,localhost.re/p/solusvm-whmcs-module-316-vulnerability; classtype:trojan-activity; sid:2017063; rev:3; metadata:created_at 2013_06_24, updated_at 2013_06_24;) + +alert udp any any -> $HOME_NET [623,664] (msg:"ET EXPLOIT IPMI Cipher 0 Authentication mode set"; content:"|07 06 10 00 00 00 00 00 00 00 00|"; offset:3; depth:11; content:"|00 00|"; distance:2; within:2; content:"|00 00 00 08 00 00 00 00 01 00 00 08 00 00 00 00 02 00 00 08 00 00 00 00|"; distance:6; within:24; reference:url,www.intel.com/content/dam/www/public/us/en/documents/product-briefs/second-gen-interface-spec-v2.pdf; reference:url,community.rapid7.com/community/metasploit/blog/2013/06/23/a-penetration-testers-guide-to-ipmi; classtype:attempted-admin; sid:2017094; rev:3; metadata:created_at 2013_07_03, updated_at 2013_07_03;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Apache Struts Possible OGNL Java ProcessBuilder URI"; flow:to_server,established; content:"java.lang.ProcessBuilder("; http_uri; nocase; classtype:attempted-user; sid:2017172; rev:4; metadata:created_at 2013_07_23, updated_at 2013_07_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Apache Struts Possible OGNL Java ProcessBuilder in client body"; flow:to_server,established; content:"java.lang.ProcessBuilder("; http_client_body; nocase; reference:url,struts.apache.org/development/2.x/docs/s2-013.html; classtype:attempted-user; sid:2017173; rev:4; metadata:created_at 2013_07_23, updated_at 2013_07_23;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Wscript Shell Run Attempt - Likely Hostile"; flow:established,to_server; content:"WScript.Shell"; nocase; content:".Run"; nocase; within:100; pcre:"/[\r\n\s]+(?P([a-z]([a-z0-9_])*|_+([a-z0-9])([a-z0-9_])*))[\r\n\s]*\x3d[\r\n\s]*CreateObject\(\s*[\x22\x27]Wscript\.Shell[\x27\x22]\s*\).+?(?P=var1)\.run/si"; classtype:attempted-user; sid:2017205; rev:2; metadata:created_at 2013_07_26, updated_at 2013_07_26;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Metasploit CVE-2013-3205 Exploit Specific"; flow:established,to_client; file_data; content:"function putPayload("; nocase; fast_pattern:only; classtype:attempted-user; sid:2017510; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2013_09_23, updated_at 2016_07_01;) + +#alert tcp $EXTERNAL_NET any -> $SMTP_SERVERS [25,587] (msg:"ET EXPLOIT Microsoft Outlook/Crypto API X.509 oid id-pe-authorityInfoAccessSyntax design bug allow blind HTTP requests attempt"; flow:to_server,established; content:"multipart/signed|3B|"; nocase; content:"application/pkcs7-signature|3B|"; nocase; distance:0; content:"|0A|QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB|0D|"; distance:0; reference:cve,2013-3870; reference:url,www.microsoft.com/technet/security/bulletin/MS13-068.mspx; reference:url,blog.nruns.com/blog/2013/11/12/A-portscan-by-email-Alex; classtype:attempted-admin; sid:2017712; rev:10; metadata:created_at 2013_11_13, updated_at 2013_11_13;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT JavaX Toolkit Posting Plugin-Detect Data"; flow:established,to_server; content:"/post.php?referanceMod="; http_uri; nocase; content:"java"; http_uri; nocase; reference:url,github.com/MrXors/Javax/; classtype:attempted-user; sid:2017730; rev:4; metadata:created_at 2013_11_19, updated_at 2013_11_19;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Adobe PDF CVE-2013-0640"; flow:from_server,established; flowbits:isset,ET.pdf.in.http; file_data; content:".keep.previous"; nocase; fast_pattern:only; content:".resolveNode"; nocase; pcre:"/^[\r\n\s]*?\\?\(.+?\\?\)\.keep\.previous[\r\n\s]*?=[\r\n\s]*?[\x22\x27]contentArea/Rsi"; reference:url,www.exploit-db.com/exploits/29881/; classtype:attempted-user; sid:2017790; rev:2; metadata:created_at 2013_11_29, updated_at 2013_11_29;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Zollard PHP Exploit UA"; flow:established,to_server; content:"Zollard"; http_user_agent; reference:url,deependresearch.org/2013/12/hey-zollard-leave-my-internet-of-things.html; classtype:trojan-activity; sid:2017798; rev:2; metadata:created_at 2013_12_04, updated_at 2013_12_04;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 23 (msg:"ET EXPLOIT Zollard PHP Exploit Telnet Inbound"; flow:to_server,established; content:"/var/run/.zollard/"; reference:url,deependresearch.org/2013/12/hey-zollard-leave-my-internet-of-things.html; classtype:attempted-user; sid:2017799; rev:2; metadata:created_at 2013_12_04, updated_at 2013_12_04;) + +alert tcp $HOME_NET any -> $EXTERNAL_NET 23 (msg:"ET EXPLOIT Zollard PHP Exploit Telnet Outbound"; flow:to_server,established; content:"/var/run/.zollard/"; reference:url,deependresearch.org/2013/12/hey-zollard-leave-my-internet-of-things.html; classtype:attempted-user; sid:2017800; rev:2; metadata:created_at 2013_12_04, updated_at 2013_12_04;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Metasploit Browser Exploit Server Plugin Detect"; flow:from_server,established; file_data; content:"misc_addons_detect.hasSilverlight"; classtype:trojan-activity; sid:2017810; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2013_12_06, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT Zollard PHP Exploit UA Outbound"; flow:established,to_server; content:"Zollard"; nocase; fast_pattern:only; http_user_agent; reference:cve,2012-1823; reference:url,blogs.cisco.com/security/the-internet-of-everything-including-malware/; classtype:trojan-activity; sid:2017825; rev:3; metadata:created_at 2013_12_09, updated_at 2013_12_09;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT Metasploit Plugin-Detect Posting Data 1"; flow:established,to_server; content:"Jm9zX2ZsYXZvcj"; http_client_body; reference:url,github.com/rapid7/metasploit-framework/wiki/How-to-write-a-browser-exploit-using-BrowserExploitServer; classtype:trojan-activity; sid:2017896; rev:4; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2013_12_23, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT Metasploit Plugin-Detect Posting Data 2"; flow:established,to_server; content:"Zvc19mbGF2b3I9"; http_client_body; reference:url,github.com/rapid7/metasploit-framework/wiki/How-to-write-a-browser-exploit-using-BrowserExploitServer; classtype:trojan-activity; sid:2017897; rev:4; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2013_12_23, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT Metasploit Plugin-Detect Posting Data 3"; flow:established,to_server; content:"mb3NfZmxhdm9yP"; http_client_body; reference:url,github.com/rapid7/metasploit-framework/wiki/How-to-write-a-browser-exploit-using-BrowserExploitServer; classtype:trojan-activity; sid:2017898; rev:4; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2013_12_23, updated_at 2016_07_01;) + +alert tcp any any -> any 32764 (msg:"ET EXPLOIT MMCS service (Little Endian)"; flow:established,to_server; content:"MMcS"; depth:4; isdataat:9,relative; reference:url,github.com/elvanderb/TCP-32764; classtype:web-application-attack; sid:2017923; rev:2; metadata:created_at 2014_01_03, updated_at 2014_01_03;) + +alert tcp any any -> any 32764 (msg:"ET EXPLOIT MMCS service (Big Endian)"; flow:established,to_server; content:"ScMM"; depth:4; isdataat:9,relative; reference:url,github.com/elvanderb/TCP-32764; classtype:web-application-attack; sid:2017924; rev:2; metadata:created_at 2014_01_03, updated_at 2014_01_03;) + +alert http $EXTERNAL_NET any -> $HOME_NET 8083 (msg:"ET EXPLOIT Linksys Auth Bypass fw_sys_up.cgi"; flow:to_server,established; content:"GET"; http_method; nocase; content:"/cgi-bin/fw_sys_up.cgi"; http_uri; nocase; reference:url,www.securityfocus.com/archive/1/531107; classtype:attempted-admin; sid:2018156; rev:2; metadata:created_at 2014_02_18, updated_at 2014_02_18;) + +alert http $EXTERNAL_NET any -> $HOME_NET 8083 (msg:"ET EXPLOIT Linksys Auth Bypass override.cgi"; flow:to_server,established; content:"GET"; http_method; nocase; content:"/cgi-bin/override.cgi"; http_uri; nocase; reference:url,www.securityfocus.com/archive/1/531107; classtype:attempted-admin; sid:2018157; rev:2; metadata:created_at 2014_02_18, updated_at 2014_02_18;) + +alert http $EXTERNAL_NET any -> $HOME_NET 8083 (msg:"ET EXPLOIT Linksys Auth Bypass share_editor.cgi"; flow:to_server,established; content:"GET"; http_method; nocase; content:"/cgi-bin/share_editor.cgi"; http_uri; nocase; reference:url,www.securityfocus.com/archive/1/531107; classtype:attempted-admin; sid:2018158; rev:2; metadata:created_at 2014_02_18, updated_at 2014_02_18;) + +alert http $EXTERNAL_NET any -> $HOME_NET 8083 (msg:"ET EXPLOIT Linksys Auth Bypass switch_boot.cgi"; flow:to_server,established; content:"GET"; http_method; nocase; content:"/cgi-bin/switch_boot.cgi"; http_uri; nocase; reference:url,www.securityfocus.com/archive/1/531107; classtype:attempted-admin; sid:2018159; rev:3; metadata:created_at 2014_02_18, updated_at 2014_02_18;) + +alert http $HOME_NET 8083 -> $EXTERNAL_NET any (msg:"ET EXPLOIT Linksys Failed Upgrade BackDoor Access (Server Response)"; flow:from_server,established; file_data; content:"Utopia_Init|3a 20|SUCCEEDED"; reference:url,www.securityfocus.com/archive/1/531107; classtype:attempted-admin; sid:2018160; rev:3; metadata:created_at 2014_02_18, updated_at 2014_02_18;) + +alert http $EXTERNAL_NET any -> $HOME_NET 49152 (msg:"ET EXPLOIT Supermicro BMC Password Disclosure 1"; flow:established,to_server; content:"/PSBlock"; http_uri; fast_pattern:only; reference:url,arstechnica.com/security/2014/06/at-least-32000-servers-broadcast-admin-passwords-in-the-clear-advisory-warns/; classtype:attempted-admin; sid:2018585; rev:4; metadata:created_at 2014_06_20, updated_at 2014_06_20;) + +alert http $EXTERNAL_NET any -> $HOME_NET 49152 (msg:"ET EXPLOIT Supermicro BMC Password Disclosure 2"; flow:established,to_server; content:"/PSStore"; http_uri; fast_pattern:only; reference:url,arstechnica.com/security/2014/06/at-least-32000-servers-broadcast-admin-passwords-in-the-clear-advisory-warns/; classtype:attempted-admin; sid:2018586; rev:5; metadata:created_at 2014_06_20, updated_at 2014_06_20;) + +alert http $EXTERNAL_NET any -> $HOME_NET 49152 (msg:"ET EXPLOIT Supermicro BMC Password Disclosure 3"; flow:established,to_server; content:"/PMConfig.dat"; fast_pattern:only; reference:url,arstechnica.com/security/2014/06/at-least-32000-servers-broadcast-admin-passwords-in-the-clear-advisory-warns/; classtype:attempted-admin; sid:2018587; rev:4; metadata:created_at 2014_06_20, updated_at 2014_06_20;) + +alert http $EXTERNAL_NET any -> $HOME_NET 49152 (msg:"ET EXPLOIT Supermicro BMC Password Disclosure 4"; flow:established,to_server; content:"/wsman/simple_auth.passwd"; http_uri; fast_pattern:5,20; reference:url,arstechnica.com/security/2014/06/at-least-32000-servers-broadcast-admin-passwords-in-the-clear-advisory-warns/; classtype:attempted-admin; sid:2018588; rev:4; metadata:created_at 2014_06_20, updated_at 2014_06_20;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Metasploit FireFox WebIDL Privileged Javascript Injection"; flow:from_server,established; file_data; content:".atob(String.fromCharCode("; pcre:"/^(?:90|0x5a|0+?132)\s*?,\s*?(?:71|0x47|0+?107)\s*?,\s*?(?:70|0x46|0+?106)\s*?,\s*?(?:48|0x30|0+?60)\s*?,\s*?(?:89|0x59|0+?131)\s*?,\s*?(?:84|0x54|0+?124)\s*?,\s*?(?:112|0x70|0+?160)/Rsi"; reference:url,www.exploit-db.com/exploits/34448/; classtype:trojan-activity; sid:2019085; rev:5; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2014_08_29, updated_at 2016_07_01;) + +alert tcp any any -> any 873 (msg:"ET EXPLOIT F5 BIG-IP rsync cmi access attempt"; flow:to_server,established; dsize:4; content:"cmi|0a|"; fast_pattern:only; reference:url,www.security-assessment.com/files/documents/advisory/F5_Unauthenticated_rsync_access_to_Remote_Root_Code_Execution.pdf; classtype:attempted-admin; sid:2019087; rev:4; metadata:created_at 2014_08_29, updated_at 2014_08_29;) + +alert tcp any any -> any 873 (msg:"ET EXPLOIT F5 BIG-IP rsync cmi authorized_keys access attempt"; flow:to_server,established; content:"cmi/var/ssh/root/authorized_keys"; fast_pattern:only; flowbits:set,ET.F5.key; reference:url,www.security-assessment.com/files/documents/advisory/F5_Unauthenticated_rsync_access_to_Remote_Root_Code_Execution.pdf; classtype:attempted-admin; sid:2019088; rev:3; metadata:created_at 2014_08_29, updated_at 2014_08_29;) + +alert tcp any 873 -> any any (msg:"ET EXPLOIT F5 BIG-IP rsync cmi authorized_keys successful exfiltration"; flow:from_server,established; content:"ssh-rsa"; fast_pattern:only; flowbits:isset,ET.F5.key; reference:url,www.security-assessment.com/files/documents/advisory/F5_Unauthenticated_rsync_access_to_Remote_Root_Code_Execution.pdf; classtype:attempted-admin; sid:2019089; rev:2; metadata:created_at 2014_08_29, updated_at 2014_08_29;) + +alert tcp any any -> any 873 (msg:"ET EXPLOIT F5 BIG-IP rsync cmi authorized_keys successful upload"; flow:to_server,established; content:"ssh-rsa"; fast_pattern:only; flowbits:isset,ET.F5.key; reference:url,www.security-assessment.com/files/documents/advisory/F5_Unauthenticated_rsync_access_to_Remote_Root_Code_Execution.pdf; classtype:attempted-admin; sid:2019090; rev:2; metadata:created_at 2014_08_29, updated_at 2014_08_29;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Metasploit Random Base CharCode JS Encoded String"; flow:from_server,established; file_data; content:"String.fromCharCode("; pcre:"/^(?=(?:(:?0x[a-f0-9]{2}|0+?\d{1,3})\s*?,\s*?)*?\d{1,3})(?=(?:(:?0x[a-f0-9]{2}|\d{1,3})\s*?,\s*?)*?0+?\d{1,3})(?=(?:(:?0+?\d{1,3}|\d{1,3})\s*?,\s*?)*?0x[a-f0-9]{2})(?:(:?0x[a-f0-9]{2}|0+?\d{1,3}|\d{1,3})\s*?,\s*?)+(:?0x[a-f0-9]{2}|0+?\d{1,3}|\d{1,3})\s*?\)/Rsi"; classtype:trojan-activity; sid:2019091; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2014_08_29, updated_at 2016_07_01;) + +alert udp any 67 -> any 68 (msg:"ET EXPLOIT Possible CVE-2014-6271 exploit attempt via malicious DHCP ACK"; content:"|02 01|"; depth:2; content:"|28 29 20 7b|"; fast_pattern:only; reference:url,access.redhat.com/articles/1200223; reference:cve,2014-6271; classtype:attempted-admin; sid:2019237; rev:4; metadata:created_at 2014_09_25, updated_at 2014_09_25;) + +alert udp any any -> $HOME_NET [5060,5061] (msg:"ET EXPLOIT Possible CVE-2014-6271 Attempt Against SIP Proxy"; flow:to_server; content:"|28 29 20 7b|"; fast_pattern:only; reference:url,github.com/zaf/sipshock; classtype:attempted-admin; sid:2019289; rev:3; metadata:created_at 2014_09_26, updated_at 2014_09_26;) + +alert tcp any any -> $HOME_NET [5060,5061] (msg:"ET EXPLOIT Possible CVE-2014-6271 Attempt Against SIP Proxy"; flow:to_server,established; content:"|28 29 20 7b|"; fast_pattern:only; reference:url,github.com/zaf/sipshock; classtype:attempted-admin; sid:2019290; rev:2; metadata:created_at 2014_09_26, updated_at 2014_09_26;) + +alert tcp any any -> $HOME_NET [25,587] (msg:"ET EXPLOIT Possible Qmail CVE-2014-6271 Mail From attempt"; flow:to_server,established; content:"|28 29 20 7b|"; fast_pattern:only; pcre:"/^mail\s*?from\s*?\x3a\s*?[^\r\n]*?\x28\x29\x20\x7b/mi"; reference:url,marc.info/?l=qmail&m=141183309314366&w=2; classtype:attempted-admin; sid:2019293; rev:2; metadata:created_at 2014_09_29, updated_at 2014_09_29;) + +alert udp any any -> $HOME_NET 1194 (msg:"ET EXPLOIT Possible OpenVPN CVE-2014-6271 attempt"; flow:to_server; content:"|20|"; depth:1; content:"|28 29 20 7b|"; fast_pattern:only; reference:url,news.ycombinator.com/item?id=8385332; classtype:attempted-admin; sid:2019322; rev:2; metadata:created_at 2014_09_30, updated_at 2014_09_30;) + +alert tcp any any -> $HOME_NET 1194 (msg:"ET EXPLOIT Possible OpenVPN CVE-2014-6271 attempt"; flow:to_server,established; content:"|20|"; depth:1; content:"|28 29 20 7b|"; fast_pattern:only; reference:url,news.ycombinator.com/item?id=8385332; classtype:attempted-admin; sid:2019323; rev:2; metadata:created_at 2014_09_30, updated_at 2014_09_30;) + +alert tcp any any -> $HOME_NET 21 (msg:"ET EXPLOIT Possible Pure-FTPd CVE-2014-6271 attempt"; flow:to_server,established; content:"|28 29 20 7b 20|"; fast_pattern:only; reference:url,gist.github.com/jedisct1/88c62ee34e6fa92c31dc; reference:cve,2014-6271; classtype:attempted-admin; sid:2019335; rev:1; metadata:created_at 2014_10_01, updated_at 2014_10_01;) + +alert tcp any any -> $HOME_NET [25,587] (msg:"ET EXPLOIT Possible Postfix CVE-2014-6271 attempt"; flow:to_server,established; content:"|28 29 20 7b|"; fast_pattern:only; pcre:"/^[a-z-]+\s*?\x3a\s*?[^\r\n]*?\x28\x29\x20\x7b.*\x3b.*\x7d\s*\x3b(?!=[\r\n])/mi"; reference:url,exploit-db.com/exploits/34896/; reference:cve,2014-6271; classtype:attempted-admin; sid:2019389; rev:4; metadata:created_at 2014_10_10, updated_at 2014_10_10;) + +alert udp $EXTERNAL_NET 53 -> $HOME_NET any (msg:"ET EXPLOIT Possible CVE-2014-6271 malicious DNS response"; byte_test:1,&,128,2; content:"|28 29 20 7b|"; fast_pattern:only; reference:cve,2014-6271; reference:url,packetstormsecurity.com/files/128650; classtype:attempted-admin; sid:2019402; rev:1; metadata:created_at 2014_10_15, updated_at 2014_10_15;) + +alert tcp $EXTERNAL_NET 53 -> $HOME_NET any (msg:"ET EXPLOIT Possible CVE-2014-6271 exploit attempt via malicious DNS"; byte_test:1,&,128,4; content:"|28 29 20 7b|"; fast_pattern:only; reference:cve,2014-6271; reference:url,packetstormsecurity.com/files/128650; classtype:attempted-admin; sid:2019403; rev:1; metadata:created_at 2014_10_15, updated_at 2014_10_15;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 1"; flow:established,to_server; content:"name["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])name\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019422; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 2"; flow:established,to_server; content:"name%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])name\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019423; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 3"; flow:established,to_server; content:"nam%65["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])nam\%65\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019424; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 4"; flow:established,to_server; content:"nam%65%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])nam\%65\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019425; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 5"; flow:established,to_server; content:"na%6de["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])na\%6de\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019426; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 6"; flow:established,to_server; content:"na%6de%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])na\%6de\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019427; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 7"; flow:established,to_server; content:"na%6d%65["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])na\%6d\%65\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019428; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 8"; flow:established,to_server; content:"na%6d%65%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])na\%6d\%65\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019429; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 9"; flow:established,to_server; content:"n%61me["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])n\%61me\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019430; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 10"; flow:established,to_server; content:"n%61me%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])n\%61me\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019431; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 11"; flow:established,to_server; content:"n%61m%65["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])n\%61m\%65\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019432; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 12"; flow:established,to_server; content:"n%61m%65%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])n\%61m\%65\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019433; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 13"; flow:established,to_server; content:"n%61%6de["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])n\%61\%6de\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019434; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 14"; flow:established,to_server; content:"n%61%6de%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])n\%61\%6de\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019435; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 15"; flow:established,to_server; content:"n%61%6d%65["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])n\%61\%6d\%65\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019436; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 16"; flow:established,to_server; content:"n%61%6d%65%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])n\%61\%6d\%65\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019437; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 17"; flow:established,to_server; content:"%6eame["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6eame\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019438; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 18"; flow:established,to_server; content:"%6eame%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6eame\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019439; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 19"; flow:established,to_server; content:"%6eam%65["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6eam\%65\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019440; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 20"; flow:established,to_server; content:"%6eam%65%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6eam\%65\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019441; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 21"; flow:established,to_server; content:"%6ea%6de["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6ea\%6de\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019442; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 22"; flow:established,to_server; content:"%6ea%6de%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6ea\%6de\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019443; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 23"; flow:established,to_server; content:"%6ea%6d%65["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6ea\%6d\%65\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019444; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 24"; flow:established,to_server; content:"%6ea%6d%65%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6ea\%6d\%65\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019445; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 25"; flow:established,to_server; content:"%6e%61me["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6e\%61me\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019446; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 26"; flow:established,to_server; content:"%6e%61me%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6e\%61me\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019447; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 27"; flow:established,to_server; content:"%6e%61m%65["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6e\%61m\%65\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019448; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 28"; flow:established,to_server; content:"%6e%61m%65%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6e\%61m\%65\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019449; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 29"; flow:established,to_server; content:"%6e%61%6de["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6e\%61\%6de\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019450; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 30"; flow:established,to_server; content:"%6e%61%6de%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6e\%61\%6de\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019451; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 31"; flow:established,to_server; content:"%6e%61%6d%65["; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6e\%61\%6d\%65\[[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019452; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert http any any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2014-3704 Drupal SQLi attempt URLENCODE 32"; flow:established,to_server; content:"%6e%61%6d%65%5b"; nocase; fast_pattern:only; http_client_body; pcre:"/(?:^|&|Content-Disposition[\x3a][^\n]*?name\s*?=\s*?[\x22\x27])\%6e\%61\%6d\%65\%5b[^\x5d]*?\W/Pi"; reference:url,pastebin.com/F2Dk9LbX; classtype:web-application-attack; sid:2019453; rev:2; metadata:created_at 2014_10_16, updated_at 2014_10_16;) + +alert udp $HOME_NET 5351 -> [!224.0.0.1,$EXTERNAL_NET] any (msg:"ET EXPLOIT Possible Malicious NAT-PMP Response to External Network"; dsize:12; content:"|80 00 00|"; offset:1; depth:3; reference:url,community.rapid7.com/community/metasploit/blog/2014/10/21/r7-2014-17-nat-pmp-implementation-and-configuration-vulnerabilities; classtype:attempted-admin; sid:2019490; rev:3; metadata:created_at 2014_10_22, updated_at 2017_01_06;) + +alert udp $HOME_NET 5351 -> $EXTERNAL_NET any (msg:"ET EXPLOIT Possible Malicious NAT-PMP Response Successful TCP Map to External Network"; dsize:16; content:"|82 00 00|"; offset:1; depth:3; reference:url,community.rapid7.com/community/metasploit/blog/2014/10/21/r7-2014-17-nat-pmp-implementation-and-configuration-vulnerabilities; classtype:attempted-admin; sid:2019491; rev:2; metadata:created_at 2014_10_22, updated_at 2014_10_22;) + +alert udp $HOME_NET 5351 -> $EXTERNAL_NET any (msg:"ET EXPLOIT Possible Malicious NAT-PMP Response Successful UDP Map to External Network"; dsize:16; content:"|81 00 00|"; offset:1; depth:3; reference:url,community.rapid7.com/community/metasploit/blog/2014/10/21/r7-2014-17-nat-pmp-implementation-and-configuration-vulnerabilities; classtype:attempted-admin; sid:2019492; rev:2; metadata:created_at 2014_10_22, updated_at 2014_10_22;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Belkin N750 Buffer Overflow Attempt"; flow:established,to_server; content:"POST"; http_method; urilen:10; content:"/login.cgi"; http_uri; content:"GO=&jump="; http_client_body; depth:9; isdataat:1380,relative; reference:cve,CVE-2014-1635; reference:url,labs.integrity.pt/advisories/cve-2014-1635/; classtype:attempted-admin; sid:2019686; rev:3; metadata:created_at 2014_11_10, updated_at 2014_11_10;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Internet Explorer VBscript failure to handle error case information disclosure CVE-2014-6332 Common Function Name"; flow:to_client,established; file_data; content:"function"; pcre:"/^(?:\x25(?:25)*?20|\s)*?runmumaa\W/Rs"; content:"runmumaa"; fast_pattern:only; reference:cve,2014-6332; classtype:attempted-user; sid:2019733; rev:5; metadata:created_at 2014_11_18, updated_at 2014_11_18;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Internet Explorer VBscript failure to handle error case information disclosure CVE-2014-6332 Common Construct"; flow:to_client,established; file_data; content:"chrw(01)&chrw(2176)&chrw(01)&chrw(00)&chrw(00)&chrw(00)&chrw(00)&chrw(00)"; reference:cve,2014-6332; classtype:attempted-user; sid:2019734; rev:3; metadata:created_at 2014_11_18, updated_at 2014_11_18;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Internet Explorer VBscript failure to handle error case information disclosure CVE-2014-6332 Common Construct Hex Encode"; flow:to_client,established; file_data; content:"chrw|25|"; pcre:"/^(?:25)?282176\x25(?:25)?29\x25(?:25)?26chrw\x25(?:25)?2801/Rs"; reference:cve,2014-6332; classtype:attempted-user; sid:2019735; rev:3; metadata:created_at 2014_11_18, updated_at 2014_11_18;) + +alert tcp any 2067 -> $EXTERNAL_NET any (msg:"ET EXPLOIT DLSw Information Disclosure CVE-2014-7992"; flow:established,from_server; content:"Cisco"; nocase; pcre:"/^(?: Systems|\.com\/techsupport)/Ri"; threshold:type both,count 1,seconds 60,track by_dst; reference:url,www.fishnetsecurity.com/6labs/blog/cisco-dlsw-leakage-allows-retrieval-packet-contents-remote-routers; reference:url,github.com/tatehansen/dlsw_exploit; reference:cve,2014-7992; classtype:trojan-activity; sid:2019778; rev:2; metadata:created_at 2014_11_24, updated_at 2014_11_24;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT D-Link IP Camera Vulnerable HTTP Request (CVE-2013-1599)"; flow:established,to_server; content:"GET"; http_method; content:"/cgi-bin/rtpd.cgi?"; http_uri; fast_pattern:only; reference:url,www.coresecurity.com/advisories/d-link-ip-cameras-multiple-vulnerabilities; classtype:attempted-admin; sid:2019801; rev:2; metadata:created_at 2014_11_25, updated_at 2014_11_25;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT D-Link IP Camera Vulnerable HTTP Request (CVE-2013-1600)"; flow:established,to_server; urilen:17; content:"GET"; http_method; content:"/upnp/asf-mp4.asf"; http_uri; fast_pattern:only; reference:url,www.coresecurity.com/advisories/d-link-ip-cameras-multiple-vulnerabilities; classtype:attempted-admin; sid:2019802; rev:2; metadata:created_at 2014_11_25, updated_at 2014_11_25;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT D-Link IP Camera Vulnerable HTTP Request (CVE-2013-1601)"; flow:established,to_server; urilen:12; content:"GET"; http_method; content:"/md/lums.cgi"; http_uri; fast_pattern:only; reference:url,www.coresecurity.com/advisories/d-link-ip-cameras-multiple-vulnerabilities; classtype:attempted-admin; sid:2019803; rev:2; metadata:created_at 2014_11_25, updated_at 2014_11_25;) + +alert tcp any any -> $HOME_NET 88 (msg:"ET EXPLOIT Possible PYKEK Priv Esc in-use"; flow:established,to_server; content:"|a4 11 18 0f|19700101000000Z|a5 11 18 0f|19700101000000Z|a6 11 18 0f|19700101000000Z"; content:"|a8 05 30 03 02 01 17|"; distance:8; within:7; threshold: type limit, track by_src, seconds 60, count 1; reference:url,github.com/bidord/pykek; reference:cve,CVE-2014-6324; classtype:attempted-admin; sid:2019897; rev:2; metadata:created_at 2014_12_09, updated_at 2014_12_09;) + +alert tcp any any -> $HOME_NET 88 (msg:"ET EXPLOIT Possible GoldenPac Priv Esc in-use"; flow:established,to_server; content:"|a0 07 03 05 00 50 80 00 00|"; content:"|a8 05 30 03 02 01 17|"; distance:0; isdataat:!1,relative; threshold: type limit, track by_src, seconds 60, count 1; reference:url,code.google.com/p/impacket/source/browse/trunk/examples/goldenPac.py; reference:cve,CVE-2014-6324; classtype:attempted-admin; sid:2019922; rev:2; metadata:created_at 2014_12_11, updated_at 2014_12_11;) + +alert http any any -> any [$HTTP_PORTS,7547] (msg:"ET EXPLOIT Possible Misfortune Cookie - SET"; flow:established,to_server; content:"Cookie|3a| C"; nocase; pcre:"/^[0-9][^=]/R"; flowbits:set,ET.Misfortune_Cookie; flowbits:noalert; reference:url,mis.fortunecook.ie/too-many-cooks-exploiting-tr069_tal-oppenheim_31c3.pdf; classtype:trojan-activity; sid:2020100; rev:2; metadata:created_at 2015_01_06, updated_at 2015_01_06;) + +alert http any [$HTTP_PORTS,7547] -> any any (msg:"ET EXPLOIT Possible Misfortune Cookie RomPager Server banner"; flow:established,from_server; flowbits:isset,ET.Misfortune_Cookie; content:"Server|3a| RomPager"; nocase; http_header; reference:url,mis.fortunecook.ie/too-many-cooks-exploiting-tr069_tal-oppenheim_31c3.pdf; classtype:trojan-activity; sid:2020101; rev:2; metadata:created_at 2015_01_06, updated_at 2015_01_06;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET [25,465,587] (msg:"ET EXPLOIT CVE-2015-0235 Exim Buffer Overflow Attempt (HELO)"; flow:to_server,established; content:"HELO "; nocase; content:!"|0a|"; within:1024; pcre:"/^\s*?\d[\d\x2e]{255}/R"; reference:url,openwall.com/lists/oss-security/2015/01/27/9; classtype:attempted-admin; sid:2020325; rev:2; metadata:created_at 2015_01_28, updated_at 2015_01_28;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET [25,465,587] (msg:"ET EXPLOIT CVE-2015-0235 Exim Buffer Overflow Attempt (EHLO)"; flow:to_server,established; content:"EHLO "; nocase; content:!"|0a|"; within:1024; pcre:"/^\s*?\d[\d\x2e]{255}/R"; reference:url,openwall.com/lists/oss-security/2015/01/27/9; classtype:attempted-admin; sid:2020326; rev:4; metadata:created_at 2015_01_28, updated_at 2015_01_28;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT D-Link DSL-2740R Remote DNS Change Attempt"; flow:established,to_server; content:"GET"; http_method; content:"/Forms/dns_1?"; http_uri; fast_pattern; content:"Enable_DNSFollowing=1"; http_uri; distance:0; content:"dnsPrimary="; http_uri; distance:0; reference:url,www.exploit-db.com/exploits/35917; classtype:attempted-admin; sid:2023466; rev:3; metadata:created_at 2015_01_29, updated_at 2016_10_31;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible dlink-DSL2640B DNS Change Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/ddnsmngr.cmd?action=apply"; http_uri; fast_pattern:only; content:"dnsPrimary="; http_uri; content:"&dnsSecondary="; http_uri; content:"&dnsDynamic="; http_uri; content:"&dnsRefresh="; http_uri; reference:url,packetstormsecurity.com/files/130418/dlink-DSL2640B.txt; classtype:attempted-user; sid:2020485; rev:2; metadata:created_at 2015_02_19, updated_at 2015_02_19;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible ShuttleTech 915WM DNS Change Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/dnscfg.cgi?"; http_uri; fast_pattern:only; content:"dnsPrimary="; http_uri; content:"&dnsSecondary="; http_uri; content:"&dnsDynamic="; http_uri; content:"&dnsRefresh="; http_uri; reference:url,packetstormsecurity.com/files/130418/dlink-DSL2640B.txt; classtype:attempted-user; sid:2020486; rev:2; metadata:created_at 2015_02_19, updated_at 2015_02_19;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Generic ADSL Router DNS Change GET Request"; flow:to_server,established; content:"GET"; http_method; content:"dnsPrimary="; http_uri; fast_pattern:only; content:"&dnsSecondary="; http_uri; content:"&dnsDynamic="; http_uri; content:"&dnsRefresh="; http_uri; reference:url,packetstormsecurity.com/files/130418/dlink-DSL2640B.txt; classtype:attempted-user; sid:2020487; rev:2; metadata:created_at 2015_02_19, updated_at 2015_02_19;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Generic ADSL Router DNS Change POST Request"; flow:to_server,established; content:"POST"; http_method; content:"dnsPrimary="; http_client_body; fast_pattern:only; content:"dnsSecondary="; http_client_body; content:"dnsDynamic="; http_client_body; content:"dnsRefresh="; http_client_body; reference:url,www.hackersbay.in/2011/02/pwning-routersbsnl.html; classtype:attempted-user; sid:2020488; rev:2; metadata:created_at 2015_02_19, updated_at 2015_02_19;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Seagate Business NAS Unauthenticated Remote Command Execution"; flow:to_server,established; content:"POST"; http_method; content:"/index.php/mv_system/get_general_setup?_=1413463189043"; http_uri; fast_pattern:only; content:"set_general"; http_client_body; reference:url,beyondbinary.io/advisory/seagate-nas-rce; classtype:attempted-admin; sid:2020583; rev:3; metadata:created_at 2015_03_02, updated_at 2015_03_02;) + +alert ftp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT PCMan FTP Server 2.0.7 Remote Command Execution"; flow:to_server,established; content:"|65 82 a5 7c|"; fast_pattern; content:"|90 90 90 90 90|"; distance:0; within:10; reference:url,exploit-db.com/exploits/36078; classtype:attempted-admin; sid:2020585; rev:2; metadata:created_at 2015_03_02, updated_at 2015_03_02;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT D-Link and TRENDnet ncc2 Service Vulnerability (ping.ccp) 2015-1187"; flow:to_server,established; content:"POST"; http_method; urilen:9; content:"/ping.ccp"; http_uri; fast_pattern:only; content:"ccp_act=ping_v6&ping_addr="; http_client_body; depth:26; pcre:"/ping_addr=[\d.]*[^\d.]/P"; reference:url,github.com/darkarnium/secpub/tree/master/Multivendor/ncc2; classtype:attempted-admin; sid:2020590; rev:2; metadata:created_at 2015_03_03, updated_at 2015_03_03;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT D-Link and TRENDnet ncc2 Service Vulnerability (fwupdate.cpp) 2015-1187"; flow:to_server,established; content:"POST"; http_method; urilen:14; content:"/fwupgrade.ccp"; http_uri; fast_pattern:only; content:"|0d 0a|fwupgrade"; http_client_body; content:"|0d 0a|resolv.conf"; nocase; http_client_body; reference:url,github.com/darkarnium/secpub/tree/master/Multivendor/ncc2; classtype:attempted-admin; sid:2020603; rev:2; metadata:created_at 2015_03_03, updated_at 2015_03_03;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT FREAK Weak Export Suite From Server (CVE-2015-0204)"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 03|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html; reference:cve,2015-0204; reference:cve,2015-1637; classtype:bad-unknown; sid:2020630; rev:6; metadata:created_at 2015_03_06, updated_at 2015_03_06;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT FREAK Weak Export Suite From Server (CVE-2015-0204)"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 06|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html; reference:cve,2015-0204; reference:cve,2015-1637; classtype:bad-unknown; sid:2020631; rev:6; metadata:created_at 2015_03_06, updated_at 2015_03_06;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT FREAK Weak Export Suite From Server (CVE-2015-0204)"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 08|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html; reference:cve,2015-0204; reference:cve,2015-1637; classtype:bad-unknown; sid:2020632; rev:5; metadata:created_at 2015_03_06, updated_at 2015_03_06;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT FREAK Weak Export Suite From Server (CVE-2015-0204)"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 0E|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html; reference:cve,2015-0204; reference:cve,2015-1637; classtype:bad-unknown; sid:2020633; rev:6; metadata:created_at 2015_03_06, updated_at 2015_03_06;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT FREAK Weak Export Suite From Server (CVE-2015-0204)"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 11|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html; reference:cve,2015-0204; reference:cve,2015-1637; classtype:bad-unknown; sid:2020659; rev:4; metadata:created_at 2015_03_10, updated_at 2015_03_10;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT FREAK Weak Export Suite From Server (CVE-2015-0204)"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 14|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html; reference:cve,2015-0204; reference:cve,2015-1637; classtype:bad-unknown; sid:2020660; rev:4; metadata:created_at 2015_03_10, updated_at 2015_03_10;) + +alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT FREAK Weak Export Suite From Server (CVE-2015-0204)"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 19|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html; reference:cve,2015-0204; reference:cve,2015-1637; classtype:bad-unknown; sid:2020661; rev:3; metadata:created_at 2015_03_10, updated_at 2015_03_10;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT FREAK Weak Export Suite From Server (CVE-2015-0204)"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 26|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html; reference:cve,2015-0204; reference:cve,2015-1637; classtype:bad-unknown; sid:2020662; rev:5; metadata:created_at 2015_03_10, updated_at 2015_03_10;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT FREAK Weak Export Suite From Server (CVE-2015-0204)"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 27|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html; reference:cve,2015-0204; reference:cve,2015-1637; classtype:bad-unknown; sid:2020663; rev:4; metadata:created_at 2015_03_10, updated_at 2015_03_10;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT FREAK Weak Export Suite From Server (CVE-2015-0204)"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 28|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html; reference:cve,2015-0204; reference:cve,2015-1637; classtype:bad-unknown; sid:2020664; rev:4; metadata:created_at 2015_03_10, updated_at 2015_03_10;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT FREAK Weak Export Suite From Server (CVE-2015-0204)"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 29|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html; reference:cve,2015-0204; reference:cve,2015-1637; classtype:bad-unknown; sid:2020665; rev:4; metadata:created_at 2015_03_10, updated_at 2015_03_10;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT FREAK Weak Export Suite From Server (CVE-2015-0204)"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 2A|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html; reference:cve,2015-0204; reference:cve,2015-1637; classtype:bad-unknown; sid:2020666; rev:4; metadata:created_at 2015_03_10, updated_at 2015_03_10;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT FREAK Weak Export Suite From Server (CVE-2015-0204)"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 2B|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html; reference:cve,2015-0204; reference:cve,2015-1637; classtype:bad-unknown; sid:2020667; rev:4; metadata:created_at 2015_03_10, updated_at 2015_03_10;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT FREAK Weak Export Suite From Server (CVE-2015-0204)"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 0B|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html; reference:cve,2015-0204; reference:cve,2015-1637; classtype:bad-unknown; sid:2020668; rev:2; metadata:created_at 2015_03_10, updated_at 2015_03_10;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT FREAK Weak Export Suite From Server (CVE-2015-0204)"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 17|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html; reference:cve,2015-0204; reference:cve,2015-1637; classtype:bad-unknown; sid:2020669; rev:2; metadata:created_at 2015_03_10, updated_at 2015_03_10;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT Metasploit Plugin-Detect Posting Data 4"; flow:established,to_server; content:"POST"; http_method; content:"b3NfbmFtZT"; depth:10; http_client_body; pcre:"/^b3NfbmFtZT[A-Za-z0-9+/]{2}(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$/P"; reference:url,github.com/rapid7/metasploit-framework/wiki/How-to-write-a-browser-exploit-using-BrowserExploitServer; classtype:trojan-activity; sid:2020751; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2015_03_25, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT Metasploit Plugin-Detect Posting Data 5"; flow:established,to_server; content:"POST"; http_method; content:"Jm9zX3ZlbmRvcj"; http_client_body; reference:url,github.com/rapid7/metasploit-framework/wiki/How-to-write-a-browser-exploit-using-BrowserExploitServer; classtype:trojan-activity; sid:2020752; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2015_03_25, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT Metasploit Plugin-Detect Posting Data 6"; flow:established,to_server; content:"POST"; http_method; content:"Zvc192ZW5kb3I9"; http_client_body; reference:url,github.com/rapid7/metasploit-framework/wiki/How-to-write-a-browser-exploit-using-BrowserExploitServer; classtype:trojan-activity; sid:2020753; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2015_03_25, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT Metasploit Plugin-Detect Posting Data 7"; flow:established,to_server; content:"POST"; http_method; content:"mb3NfdmVuZG9yP"; http_client_body; reference:url,github.com/rapid7/metasploit-framework/wiki/How-to-write-a-browser-exploit-using-BrowserExploitServer; classtype:trojan-activity; sid:2020754; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2015_03_25, updated_at 2016_07_01;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Metasploit Browser Exploit Server Plugin Detect 2"; flow:from_server,established; file_data; content:"var os_name|3b|"; content:"var os_vendor|3b|"; content:"var os_device|3b|"; content:"var os_flavor|3b|"; classtype:trojan-activity; sid:2020755; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2015_03_25, updated_at 2016_07_01;) + +alert http any any -> $HOME_NET $HTTP_PORTS (msg:"ET EXPLOIT TP-LINK TL-WR340G Router DNS Change GET Request"; flow:to_server,established; content:"GET"; http_method; content:"/userRpm/WanDynamicIpCfgRpm.htm?"; http_uri; depth:32; content:"&dnsserver="; http_uri; content:"&Save=Save"; http_uri; fast_pattern:only; reference:url,www.exploit-db.com/exploits/34583; classtype:attempted-admin; sid:2020856; rev:2; metadata:created_at 2015_04_07, updated_at 2015_04_07;) + +alert http any any -> $HOME_NET $HTTP_PORTS (msg:"ET EXPLOIT Belkin Wireless G Router DNS Change POST Request"; flow:to_server,established; content:"POST"; http_method; urilen:22; content:"/cgi-bin/setup_dns.exe"; http_uri; content:"getpage=|2e 2e|/html/setup/dns.htm"; http_client_body; depth:29; fast_pattern:9,20; content:"resolver|3a|settings/nameserver1="; http_client_body; distance:0; reference:url,www.exploit-db.com/exploits/3605; classtype:attempted-admin; sid:2020857; rev:4; metadata:created_at 2015_04_07, updated_at 2015_04_07;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Linksys WRT54GL Router DNS Change POST Request"; flow:to_server,established; content:"POST"; http_method; urilen:10; content:"/apply.cgi"; content:"submit_button=index"; http_client_body; depth:19; fast_pattern; content:"&action=Apply"; http_client_body; distance:0; nocase; content:"&lan_dns0="; http_client_body; distance:0; reference:url,www.s3cur1ty.de/node/640; classtype:attempted-admin; sid:2020858; rev:2; metadata:created_at 2015_04_07, updated_at 2015_04_07;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Netgear WNDR Router DNS Change POST Request"; flow:to_server,established; content:"POST"; http_method; urilen:26; content:"/apply.cgi?/BAS_update.htm"; http_uri; content:"submit_flag=ether"; http_client_body; depth:17; fast_pattern; content:"ðer_dnsaddr1="; http_client_body; distance:0; nocase; content:"&Apply=Apply"; http_client_body; distance:0; reference:url,www.s3cur1ty.de/node/640; classtype:attempted-admin; sid:2020859; rev:3; metadata:created_at 2015_04_07, updated_at 2015_04_07;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Motorola SBG900 Router DNS Change GET Request"; flow:to_server,established; content:"GET"; http_method; content:"/goformFOO/AlFrame?"; http_uri; content:"/goformFOO/AlFrame?"; http_uri; distance:0; content:"Gateway.Wan.dnsAddress1="; http_uri; distance:0; reference:url,github.com/hkm/routerpwn.com/blob/master/index.html; classtype:attempted-admin; sid:2020861; rev:2; metadata:created_at 2015_04_08, updated_at 2015_04_08;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT ASUS RT N56U Router DNS Change GET Request 1"; flow:to_server,established; content:"GET"; http_method; content:"/start_apply.htm?"; http_uri; content:"wan_dns1="; http_uri; distance:0; content:"action_mode=apply"; http_uri; distance:0; reference:url,securityevaluators.com/knowledge/case_studies/routers/asus_rtn56u.php; classtype:attempted-admin; sid:2020862; rev:2; metadata:created_at 2015_04_08, updated_at 2015_04_08;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT ASUS RT N56U Router DNS Change GET Request 2"; flow:to_server,established; content:"GET"; http_method; content:"/start_apply.htm?"; http_uri; content:"wan_dns1_x="; http_uri; distance:0; reference:url,securityevaluators.com/knowledge/case_studies/routers/asus_rtn56u.php; classtype:attempted-admin; sid:2020863; rev:2; metadata:created_at 2015_04_08, updated_at 2015_04_08;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT FritzBox RCE POST Request"; flow:to_server,established; content:"POST"; http_method; urilen:14; content:"/cgi-bin/webcm"; http_uri; fast_pattern:only; content:"getpage="; http_client_body; depth:10; content:"errorpage="; http_client_body; distance:0; content:"/html/index.html&login|3a|command"; http_client_body; distance:0; reference:url,www.exploit-db.com/exploits/33136; classtype:attempted-admin; sid:2020867; rev:3; metadata:created_at 2015_04_08, updated_at 2015_04_08;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT FritzBox RCE GET Request"; flow:to_server,established; content:"GET"; http_method; content:"/cgi-bin/webcm?"; http_uri; fast_pattern; content:"getpage="; http_uri; distance:0; content:"|2e 2e|/html/menus/menu2.html"; http_raw_uri; content:"&var|3a|lang="; http_uri; reference:url,www.exploit-db.com/exploits/33136; classtype:attempted-admin; sid:2020868; rev:3; metadata:created_at 2015_04_08, updated_at 2015_04_08;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT ASUS RT N56U Router DNS Change GET Request 3"; flow:to_server,established; content:"GET"; http_method; content:"/start_apply.htm?"; http_uri; fast_pattern; content:"dnsserver="; http_uri; distance:0; content:"&dnsserver2="; http_uri; distance:0; reference:url,securityevaluators.com/knowledge/case_studies/routers/asus_rtn56u.php; classtype:attempted-admin; sid:2020871; rev:2; metadata:created_at 2015_04_08, updated_at 2015_04_08;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT TP-LINK Known Malicious Router DNS Change GET Request"; flow:to_server,established; content:"GET"; http_method; content:"/basic/uiViewIPAddr="; fast_pattern; http_uri; content:"&uiViewDns1Mark="; http_uri; distance:0; content:"&uiViewDns2Mark="; http_uri; distance:0; reference:url,pastebin.com/u0MRLmjp; classtype:attempted-admin; sid:2020872; rev:2; metadata:created_at 2015_04_08, updated_at 2015_04_08;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT D-link DI604 Known Malicious Router DNS Change GET Request"; flow:to_server,established; content:"GET"; http_method; content:"/prim.htm?"; http_uri; depth:10; fast_pattern; nocase; content:"i00110004="; http_uri; distance:0; content:"&i00110005="; http_uri; distance:0; nocase; content:"&i00035007="; http_uri; distance:0; nocase; reference:url,www.gnucitizen.org/blog/router-hacking-challenge; classtype:attempted-admin; sid:2020873; rev:2; metadata:created_at 2015_04_08, updated_at 2015_04_08;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Netgear DGN1000B Router DNS Change GET Request"; flow:to_server,established; content:"GET"; http_method; content:"/setup.cgi?todo=wan_dns1="; http_uri; fast_pattern:only; reference:url,www.rapid7.com/db/modules/exploit/linux/http/netgear_dgn1000b_setup_exec; classtype:attempted-admin; sid:2020874; rev:3; metadata:created_at 2015_04_08, updated_at 2015_04_08;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Belkin G F5D7230-4 Router DNS Change GET Request"; flow:to_server,established; content:"GET"; http_method; content:"/setup_dns.stm?page=setup_dns"; http_uri; content:"&dns1_1="; http_uri; reference:url,www.gnucitizen.org/blog/holes-in-embedded-devices-authentication-bypass-pt-4; classtype:attempted-admin; sid:2020875; rev:2; metadata:created_at 2015_04_08, updated_at 2015_04_08;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Tenda ADSL2/2+ Router DNS Change GET Request"; flow:to_server,established; content:"GET"; http_method; content:"/apply.cgi?wan_primary_dns="; http_uri; fast_pattern:only; content:"&wan_secondary_dns="; http_uri; reference:url,malwr.com/analysis/MGY1ZDFhYjE1MzQ4NDAwM2EyZTI5YmY3MWZjMWE5OGM; classtype:attempted-admin; sid:2020876; rev:2; metadata:created_at 2015_04_08, updated_at 2015_04_08;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Known Malicious Router DNS Change GET Request"; flow:to_server,established; content:"GET"; http_method; content:"/router/add_dhcp_segment.cgi?"; http_uri; fast_pattern:only; content:"is_router_as_dns=1"; http_uri; content:"&dns1="; http_uri; content:"submitbutton="; http_uri; reference:url,wepawet.cs.ucsb.edu/view.php?hash=5e14985415814ed1e107c0583a27a1a2&t=1384961238&type=js; classtype:attempted-admin; sid:2020877; rev:2; metadata:created_at 2015_04_08, updated_at 2015_04_08;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT TP-LINK TL-WR841N Router DNS Change GET Request"; flow:to_server,established; content:"GET"; http_method; content:"/userRpm/LanDhcpServerRpm.htm?"; http_uri; fast_pattern; content:"dhcpserver=1"; http_uri; content:"&dnsserver="; http_uri; content:"&Save="; http_uri; reference:url,www.exploit-db.com/exploits/34584; classtype:attempted-admin; sid:2020878; rev:2; metadata:created_at 2015_04_08, updated_at 2015_04_08;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Linksys WRT54GL DNS Change GET Request"; flow:to_server,established; content:"GET"; http_method; content:"/Basic.tri?"; http_uri; fast_pattern; content:"&dns0_0="; http_uri; content:"&dns0_1="; http_uri; reference:url,sebug.net/paper/Exploits-Archives/2008-exploits/0803-exploits/linksys-bypass.txt; classtype:attempted-admin; sid:2020879; rev:2; metadata:created_at 2015_04_08, updated_at 2015_04_08;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT TP-LINK TL-WR750N DNS Change GET Request"; flow:to_server,established; content:"GET"; http_method; content:"/userRpm/WanStaticIpCfgRpm.htm"; http_uri; fast_pattern; content:"&dnsserver="; http_uri; content:"&Save=Save"; http_uri; reference:url,www.xexexe.cz/2015/02/bruteforcing-tp-link-routers-with.html; classtype:attempted-admin; sid:2020880; rev:2; metadata:created_at 2015_04_08, updated_at 2015_04_08;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT D-Link Devices Home Network Administration Protocol Command Execution"; flow:established,to_server; content:"POST"; http_method; content:"SOAPAction|3a|"; http_header; content:"http|3a|//purenetworks.com/HNAP1/"; fast_pattern; http_header; pcre:"/^SOAPAction\x3a\s+?[^\r\n]*?http\x3a\/\/purenetworks\.com\/HNAP1\/([^\x2f]+?[\x2f])?[^\x2f]/Hmi"; reference:url,devttys0.com/2015/04/hacking-the-d-link-dir-890l/; reference:cve,2016-6563; classtype:attempted-admin; sid:2020899; rev:4; metadata:created_at 2015_04_13, updated_at 2016_11_10;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Redirect to SMB exploit attempt - 302"; flow:from_server,established; content:"302"; http_stat_code; content:"Found"; http_stat_msg; content:"Location|3a| file|3a 2f 2f|"; http_header; fast_pattern:only; reference:url,blog.cylance.com/redirect-to-smb; classtype:attempted-user; sid:2020916; rev:2; metadata:created_at 2015_04_15, updated_at 2015_04_15;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Redirect to SMB exploit attempt - 301"; flow:from_server,established; content:"301"; http_stat_code; content:"Location|3a| file|3a 2f 2f|"; http_header; fast_pattern:only; reference:url,blog.cylance.com/redirect-to-smb; classtype:attempted-user; sid:2020917; rev:2; metadata:created_at 2015_04_15, updated_at 2015_04_15;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Redirect to SMB exploit attempt - 307"; flow:from_server,established; content:"307"; http_stat_code; content:"Location|3a| file|3a 2f 2f|"; http_header; fast_pattern:only; reference:url,blog.cylance.com/redirect-to-smb; reference:url,blog.trendmicro.com/trendlabs-security-intelligence/resurrection-of-the-living-dead-the-redirect-to-smb-vulnerability/; classtype:attempted-user; sid:2020976; rev:2; metadata:created_at 2015_04_23, updated_at 2015_04_23;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Redirect to SMB exploit attempt - 303"; flow:from_server,established; content:"303"; http_stat_code; content:"Location|3a| file|3a 2f 2f|"; http_header; fast_pattern:only; reference:url,blog.cylance.com/redirect-to-smb; classtype:attempted-user; sid:2020977; rev:2; metadata:created_at 2015_04_23, updated_at 2015_04_23;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT WNR2000v4 HTTP POST RCE Attempt Via Timestamp Discovery"; flow:to_server,established; content:"POST"; http_method; content:"/apply_noauth.cgi"; http_uri; fast_pattern:only; content:"timestamp="; http_client_body; threshold: type both, track by_dst, count 10, seconds 60; reference:url,seclists.org/fulldisclosure/2015/Apr/72; classtype:attempted-admin; sid:2021018; rev:2; metadata:created_at 2015_04_27, updated_at 2015_04_27;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT Logjam Weak DH/DHE Export Suite From Server"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 63|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,weakdh.org; classtype:bad-unknown; sid:2021124; rev:2; metadata:created_at 2015_05_20, updated_at 2015_05_20;) + +#alert tcp any [21,25,110,143,443,465,587,636,989:995,5061,5222] -> $HOME_NET any (msg:"ET EXPLOIT Logjam Weak DH/DHE Export Suite From Server"; flow:established,from_server; content:"|16 03|"; depth:2; byte_test:1,<,4,0,relative; content:"|02|"; distance:3; within:1; byte_jump:1,37,relative; content:"|00 65|"; within:2; fast_pattern; threshold:type limit,track by_dst,count 1,seconds 1200; reference:url,weakdh.org; classtype:bad-unknown; sid:2021125; rev:2; metadata:created_at 2015_05_20, updated_at 2015_05_20;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT AirLive RCI HTTP Request"; flow:to_server,established; content:"GET"; http_method; content:"/cgi_test.cgi?write_"; http_uri; fast_pattern:only; pcre:"/\?write_(?:m(?:ac|sn)|hdv|pid|tan)&[^&]*\x3b/Ui"; reference:url,packetstormsecurity.com/files/132585/CORE-2015-0012.txt; classtype:attempted-admin; sid:2021408; rev:2; metadata:created_at 2015_07_13, updated_at 2015_07_13;) + +alert udp any any -> any 53 (msg:"ET EXPLOIT Possible BIND9 DoS CVE-2015-5477 M1"; content:"|01 00 00 01 00 01|"; depth:6; offset:2; pcre:"/^.{4}[^\x00]+\x00/R"; content:"|00 f9|"; within:2; fast_pattern; pcre:"/^..[^\x00]+\x00/Rs"; content:!"|00 f9|"; within:2; threshold: type limit, track by_src, seconds 60, count 1; classtype:attempted-dos; sid:2021572; rev:3; metadata:created_at 2015_08_01, updated_at 2015_08_01;) + +alert udp any any -> any 53 (msg:"ET EXPLOIT Possible BIND9 DoS CVE-2015-5477 M2"; content:"|01 00 00 01|"; depth:4; offset:2; content:"|00 01|"; distance:4; within:2; pcre:"/^[^\x00]+\x00/R"; content:"|00 f9|"; within:2; fast_pattern; pcre:"/^..[^\x00]+\x00/Rs"; content:!"|00 f9|"; within:2; threshold: type limit, track by_src, seconds 60, count 1; classtype:attempted-dos; sid:2021573; rev:4; metadata:created_at 2015_08_01, updated_at 2015_08_01;) + +alert udp any any -> any 53 (msg:"ET EXPLOIT Possible BIND9 DoS CVE-2015-5477 M3"; content:"|00 00 00 01 00 01|"; depth:6; offset:2; pcre:"/^.{4}[^\x00]+\x00/R"; content:"|00 f9|"; within:2; fast_pattern; pcre:"/^..[^\x00]+\x00/Rs"; content:!"|00 f9|"; within:2; threshold: type limit, track by_src, seconds 60, count 1; classtype:attempted-dos; sid:2021574; rev:3; metadata:created_at 2015_08_01, updated_at 2015_08_01;) + +alert udp any any -> any 53 (msg:"ET EXPLOIT Possible BIND9 DoS CVE-2015-5477 M4"; content:"|00 00 00 01|"; depth:4; offset:2; content:"|00 01|"; distance:4; within:2; pcre:"/^[^\x00]+\x00/R"; content:"|00 f9|"; within:2; fast_pattern; pcre:"/^..[^\x00]+\x00/Rs"; content:!"|00 f9|"; within:2; threshold: type limit, track by_src, seconds 60, count 1; classtype:attempted-dos; sid:2021575; rev:4; metadata:created_at 2015_08_01, updated_at 2015_08_01;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Firefox PDF.js Same-Origin-Bypass CVE-2015-4495 M1"; flow:established,from_server; file_data; content:"|76 69 65 77 2d 73 6f 75 72 63 65 3a|"; nocase; content:"|61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 2d 6d 6f 7a 2d 70 6c 61 79 70 72 65 76 69 65 77 2d 70 64 66 6a 73|"; fast_pattern:15,20; nocase; content:"|73 61 6e 64 62 6f 78 43 6f 6e 74 65 78 74|"; nocase; content:"return "; pcre:"/\We[\s\x22\x27,+]*?v[\s\x22\x27,+]*?a[\s\x22\x27,+]*?l\W/"; reference:cve,2015-4495; classtype:attempted-user; sid:2021601; rev:2; metadata:created_at 2015_08_10, updated_at 2015_08_10;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Firefox PDF.js Same-Origin-Bypass CVE-2015-4495 M2"; flow:established,from_server; file_data; content:"|77 69 6e 64 6f 77 73 5f 73 65 61 72 63 68 5f 61 6e 64 5f 75 70 6c 6f 61 64 5f 69 6e 5f 61 70 70 5f 64 61 74 61 5f 62 79 5f 64 69 73 6b|"; nocase; content:"|64 71 2e 61 77 61 69 74 41 6c 6c 28 63 61 6c 6c 62 61 63 6b 29|"; nocase; reference:url,nakedsecurity.sophos.com/2015/08/07/firefox-zero-day-hole-used-against-windows-and-linux-to-steal-passwords/; reference:cve,2015-4495; classtype:attempted-user; sid:2021606; rev:2; metadata:created_at 2015_08_11, updated_at 2015_08_11;) + +alert http any any -> any 8081 (msg:"ET EXPLOIT Websense Content Gateway submit_net_debug.cgi cmd_param Param Buffer Overflow Attempt"; flow:to_server,established; content:"POST"; nocase; http_method; content:"/submit_net_debug.cgi"; nocase; http_uri; content:"cmd_param="; nocase; http_client_body; isdataat:500,relative; content:!"|0A|"; within:500; http_client_body; pcre:"/[\?\&]cmd_param=[^\&\r\n]{500}/Psi"; reference:cve,2015-5718; reference:url,seclists.org/fulldisclosure/2015/Aug/8; classtype:web-application-attack; sid:2021644; rev:3; metadata:created_at 2015_08_18, updated_at 2015_08_18;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Internet Explorer Memory Corruption Vulnerability (CVE-2015-2444)"; flow:from_server,established; file_data; content:"|3c 66 6f 72 6d 3e 3c 73 74 79 6c 65 3e 66 6f 72 6d 7b 2d 6d 73 2d 62 65 68 61 76 69 6f 72 3a 75 72 6c 28 22 63 22 29 3b 7d 3c 2f 73 74 79 6c 65 3e 3c 2f 66 6f 72 6d 3e|"; nocase; fast_pattern:13,20; reference:cve,2015-2444; classtype:attempted-user; sid:2021713; rev:3; metadata:created_at 2015_08_25, updated_at 2015_08_25;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT FireEye Appliance Unauthorized File Disclosure"; flow:established,to_server; content:"/NEI_ModuleDispatch.php"; http_uri; content:"module=NEI_AdvancedConfig"; distance:0; http_uri; content:"&function=HapiGetFileContents"; http_uri; fast_pattern:10,19; distance:0; pcre:"/(?:%2(?:52e(?:%2(?:52e(?:%(?:(?:25)?2|c0%a)f|\/)|e(?:%(?:(?:25)?2|c0%a)f|\/))|\.(?:%(?:(?:25)?2|c0%a)f|\/))|e(?:%2(?:52e(?:%(?:(?:25)?2|c0%a)f|\/)|e(?:%(?:(?:25)?2|c0%a)f|\/))|\.(?:%(?:(?:25)?2|c0%a)f|\/)))|\.(?:%2(?:52e(?:%(?:(?:25)?2|c0%a)f|\/)|e(?:%(?:(?:25)?2|c0%a)f|\/))|\.(?:%(?:(?:25)?2|c0%a)f|\/)))/Ii"; reference:url,www.exploit-db.com/exploits/38090/; classtype:trojan-activity; sid:2021756; rev:3; metadata:created_at 2015_09_09, updated_at 2015_09_09;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Android Stagefright MP4 CVE-2015-1538 - Shell"; flow:established,from_server; file_data; content:"|00 00 00 18 66 74 79 70|mp4"; within:13; content:"/system/bin/sh"; fast_pattern:only; reference:cve,2015-1538; reference:url,blog.zimperium.com/the-latest-on-stagefright-cve-2015-1538-exploit-is-now-available-for-testing-purposes/; classtype:attempted-user; sid:2021757; rev:2; metadata:created_at 2015_09_10, updated_at 2015_09_10;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Android Stagefright MP4 CVE-2015-1538 - ROP"; flow:established,from_server; file_data; content:"|00 00 00 18 66 74 79 70|mp4"; within:13; content:"|98 2A 00 B0 B3 38 00 B0|"; fast_pattern; content:"|00 10 00 00 07 00 00 00 03 D0 00 D0 04 D0 00 D0 44 11 00 B0|"; distance:4; within:20; reference:cve,2015-1538; reference:url,blog.zimperium.com/the-latest-on-stagefright-cve-2015-1538-exploit-is-now-available-for-testing-purposes/; classtype:attempted-user; sid:2021758; rev:2; metadata:created_at 2015_09_10, updated_at 2015_09_10;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Android Stagefright MP4 CVE-2015-1538 - STSC"; flow:established,from_server; file_data; content:"stsc|00 00 00 00 C0 00 00 03|"; fast_pattern; content:!"|00 00 00 00|"; within:4; pcre:"/^(?P.{4})(?P.{4})(?P=addr2)(?P=addr1)/Rsi"; reference:cve,2015-1538; reference:url,blog.zimperium.com/the-latest-on-stagefright-cve-2015-1538-exploit-is-now-available-for-testing-purposes/; classtype:attempted-user; sid:2021759; rev:2; metadata:created_at 2015_09_10, updated_at 2015_09_10;) + +alert tcp any any -> $HOME_NET any (msg:"ET EXPLOIT Serialized Java Object Calling Common Collection Function"; flow:to_server,established; content:"rO0ABXNyA"; content:"jb21tb25zLmNvbGxlY3Rpb25z"; fast_pattern; distance:0; reference:url,github.com/foxglovesec/JavaUnserializeExploits; classtype:misc-activity; sid:2022114; rev:1; metadata:created_at 2015_11_17, updated_at 2015_11_17;) + +alert tcp any any -> $HOME_NET any (msg:"ET EXPLOIT Serialized Java Object Calling Common Collection Function"; flow:to_server,established; content:"|ac ed 00 05 73 72 00|"; fast_pattern; content:"commons.collections"; nocase; distance:0; reference:url,github.com/foxglovesec/JavaUnserializeExploits; classtype:misc-activity; sid:2022115; rev:1; metadata:created_at 2015_11_17, updated_at 2015_11_17;) + +alert tcp any any -> $HOME_NET any (msg:"ET EXPLOIT Serialized Java Object Generated by ysoserial"; flow:to_server,established; content:"|ac ed 00 05 73 72 00|"; fast_pattern; content:"java/io/Serializable"; nocase; distance:0; content:"ysoserial/payloads/util/Gadgets"; reference:url,github.com/foxglovesec/JavaUnserializeExploits; classtype:misc-activity; sid:2022116; rev:1; metadata:created_at 2015_11_17, updated_at 2015_11_17;) + +alert tcp any any -> $HOME_NET any (msg:"ET EXPLOIT Serialized Groovy Java Object Generated by ysoserial"; flow:to_server,established; content:"|ac ed 00 05 73 72 00|"; fast_pattern; content:"org.codehaus.groovy.runtime.ConversionHandler"; nocase; distance:0; content:"ysoserial/payloads/util/Gadgets"; reference:url,github.com/foxglovesec/JavaUnserializeExploits; classtype:misc-activity; sid:2022117; rev:1; metadata:created_at 2015_11_17, updated_at 2015_11_17;) + +alert tcp any any -> $HOME_NET any (msg:"ET EXPLOIT Serialized Spring Java Object Generated by ysoserial"; flow:to_server,established; content:"|ac ed 00 05 73 72 00|"; fast_pattern; content:"org.springframework.core.SerializableTypeWrapper"; nocase; distance:0; content:"ysoserial/payloads/util/Gadgets"; reference:url,github.com/foxglovesec/JavaUnserializeExploits; classtype:misc-activity; sid:2022118; rev:1; metadata:created_at 2015_11_17, updated_at 2015_11_17;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Joomla RCE (JDatabaseDriverMysqli)"; flow:established,to_server; content:"JDatabaseDriverMysqli"; fast_pattern:only; pcre:"/^User-Agent\x3a[^\r\n]*JDatabaseDriverMysqli/Hmi"; reference:url,blog.sucuri.net/2015/12/remote-command-execution-vulnerability-in-joomla.html; classtype:web-application-attack; sid:2022261; rev:2; metadata:created_at 2015_12_14, updated_at 2015_12_14;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Joomla RCE M2 (Serialized PHP in UA)"; flow:established,to_server; content:"O|3a|"; http_header; fast_pattern:only; pcre:"/^User-Agent\x3a[^\r\n]*\bO\x3a\d+\x3a[^\r\n]*?\{[^\r\n]*?\}/Hmi"; reference:url,blog.sucuri.net/2015/12/remote-command-execution-vulnerability-in-joomla.html; classtype:web-application-attack; sid:2022263; rev:2; metadata:created_at 2015_12_15, updated_at 2015_12_15;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Joomla RCE M3 (Serialized PHP in XFF)"; flow:established,to_server; content:"O|3a|"; http_header; fast_pattern:only; pcre:"/^X-Forwarded-For\x3a[^\r\n]*\bO\x3a\d+\x3a[^\r\n]*?\{[^\r\n]*?\}/Hmi"; reference:url,blog.sucuri.net/2015/12/remote-command-execution-vulnerability-in-joomla.html; classtype:web-application-attack; sid:2022268; rev:2; metadata:created_at 2015_12_15, updated_at 2015_12_15;) + +alert tcp any any -> $HOME_NET 23 (msg:"ET EXPLOIT Juniper ScreenOS telnet Backdoor Default Password Attempt"; flow:established,to_server; content:"|3c 3c 3c 20 25 73 28 75 6e 3d 27 25 73 27 29 20 3d 20 25 75|"; fast_pattern; threshold: type limit, count 1, seconds 60, track by_src; reference:cve,2015-7755; reference:url,community.rapid7.com/community/infosec/blog/2015/12/20/cve-2015-7755-juniper-screenos-authentication-backdoor; classtype:attempted-admin; sid:2022291; rev:1; metadata:created_at 2015_12_21, updated_at 2015_12_21;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT TrendMicro node.js HTTP RCE Exploit Inbound (openUrlInDefaultBrowser)"; flow:from_server,established; file_data; content:"XMLHttpRequest"; nocase; content:"|3a|49155/api/openUrlInDefaultBrowser?"; fast_pattern:only; reference:url,code.google.com/p/google-security-research/issues/detail?id=693; classtype:attempted-user; sid:2022352; rev:2; metadata:created_at 2016_01_12, updated_at 2016_01_12;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT TrendMicro node.js HTTP RCE Exploit Inbound (showSB)"; flow:from_server,established; file_data; content:"XMLHttpRequest"; nocase; content:"|3a|49155/api/showSB?url="; fast_pattern:only; reference:url,code.google.com/p/google-security-research/issues/detail?id=693; classtype:attempted-user; sid:2022353; rev:2; metadata:created_at 2016_01_13, updated_at 2016_01_13;) + +alert ssh any $SSH_PORTS -> any any (msg:"ET EXPLOIT Possible CVE-2016-0777 Server Advertises Suspicious Roaming Support"; flow:established,to_client; content:"|14|"; offset:6; content:"resume@appgate.com"; distance:0; content:!"AppGateSSH_5.2"; reference:cve,2016-0777; reference:url,www.qualys.com/2016/01/14/cve-2016-0777-cve-2016-0778/openssh-cve-2016-0777-cve-2016-0778.txt; classtype:attempted-user; sid:2022369; rev:2; metadata:created_at 2016_01_14, updated_at 2016_01_14;) + +alert tcp any any -> any $SSH_PORTS (msg:"ET EXPLOIT Possible CVE-2016-0777 Client Sent Roaming Resume Request"; flow:established,to_server; content:"|14|"; offset:6; content:"roaming@appgate.com"; distance:0; content:!"AppGateSSH_5.2"; reference:cve,2016-0777; reference:url,www.qualys.com/2016/01/14/cve-2016-0777-cve-2016-0778/openssh-cve-2016-0777-cve-2016-0778.txt; classtype:attempted-user; sid:2022370; rev:2; metadata:created_at 2016_01_14, updated_at 2016_01_14;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 500 (msg:"ET EXPLOIT Possible CVE-2016-1287 Invalid Fragment Size Inbound"; flow:to_server; content:"|84 00 00|"; byte_test:1,<,9,0,relative; byte_jump:1,0,relative,post_offset -4; content:"|00 00 00|"; within:3; byte_test:1,<,8,0,relative; metadata: former_category EXPLOIT; reference:url,blog.exodusintel.com/2016/02/10/firewall-hacking; classtype:trojan-activity; sid:2022506; rev:3; metadata:created_at 2016_02_11, updated_at 2017_05_02;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 500 (msg:"ET EXPLOIT Possible CVE-2016-1287 Invalid Fragment Size Inbound 2"; flow:to_server; content:"|84 20|"; depth:2; offset:16; byte_test:2,<,9,12,relative; metadata: former_category EXPLOIT; reference:url,blog.exodusintel.com/2016/02/10/firewall-hacking; classtype:trojan-activity; sid:2022515; rev:2; metadata:created_at 2016_02_12, updated_at 2017_05_02;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 500 (msg:"ET EXPLOIT Possible CVE-2016-1287 Invalid Fragment Size Inbound 3"; flow:to_server; content:"|84 10|"; depth:2; offset:16; byte_test:2,<,9,12,relative; metadata: former_category EXPLOIT; reference:url,blog.exodusintel.com/2016/02/10/firewall-hacking; classtype:trojan-activity; sid:2022516; rev:2; metadata:created_at 2016_02_12, updated_at 2017_05_02;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT D-Link DCS-930L Remote Command Execution attempt"; flow:to_server,established; urilen:17; content:"POST"; nocase; http_method; content:"/setSystemCommand"; nocase; http_uri; content:"SystemCommand="; nocase; http_client_body; reference:url,www.exploit-db.com/exploits/39437/; classtype:web-application-attack; sid:2022518; rev:2; metadata:created_at 2016_02_12, updated_at 2016_02_12;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT MS16-009 IE MSHTML Form Element Type Confusion (CVE-2016-0061)"; flow:from_server,established; file_data; content:"opener"; nocase; fast_pattern; pcre:"/^\s*\[\s*[\x22\x27]\\u[a-f0-9]{4}\\u[a-f0-9]{4}/Rsi"; reference:cve,2016-0061; classtype:attempted-user; sid:2022524; rev:4; metadata:created_at 2016_02_16, updated_at 2016_02_16;) + +alert udp any 53 -> $HOME_NET any (msg:"ET EXPLOIT Possible 2015-7547 Malformed Server response"; flow:from_server; content:"|00 01 00 00 00 00 00 00|"; offset:4; depth:8; isdataat:2049; byte_test:1,&,128,2; byte_test:1,!&,64,2; byte_test:1,!&,32,2; byte_test:1,!&,16,2; byte_test:1,!&,8,2; byte_test:1,&,2,2; byte_test:1,!&,1,3; byte_test:1,!&,2,3; byte_test:1,!&,4,3; byte_test:1,!&,8,3; pcre:"/^[^\x00]+\x00\x00\x01/R"; reference:cve,2015-7547; classtype:attempted-user; sid:2022531; rev:1; metadata:created_at 2016_02_17, updated_at 2016_02_17;) + +alert udp any 53 -> $HOME_NET any (msg:"ET EXPLOIT Possible 2015-7547 PoC Server Response"; flow:from_server; content:"|83 80 00 01 00 00 00 00 00 00|"; offset:2; depth:10; isdataat:2049; pcre:"/^(?:.[a-z0-9-]{2,}){2,}\x00\x00(?:\x01|\x1c)/Ri"; reference:cve,2015-7547; classtype:attempted-user; sid:2022542; rev:1; metadata:created_at 2016_02_18, updated_at 2016_02_18;) + +alert udp any 53 -> $HOME_NET any (msg:"ET EXPLOIT Possible CVE-2015-7547 Long Response to A lookup"; flow:from_server; content:"|00 01|"; offset:4; depth:2; isdataat:2049; byte_test:1,&,128,2; byte_test:1,!&,64,2; byte_test:1,!&,32,2; byte_test:1,!&,16,2; byte_test:1,!&,8,2; byte_test:1,&,2,2; byte_test:1,!&,1,3; byte_test:1,!&,2,3; byte_test:1,!&,4,3; byte_test:1,!&,8,3; pcre:"/^.{6}[^\x00]+/Rs"; content:"|00 00 01 00 01|"; within:5; reference:cve,2015-7547; classtype:attempted-user; sid:2022543; rev:1; metadata:created_at 2016_02_18, updated_at 2016_02_18;) + +alert udp any 53 -> $HOME_NET any (msg:"ET EXPLOIT Possible CVE-2015-7547 Long Response to AAAA lookup"; flow:from_server; content:"|00 01|"; offset:4; depth:2; isdataat:2049; byte_test:1,&,128,2; byte_test:1,!&,64,2; byte_test:1,!&,32,2; byte_test:1,!&,16,2; byte_test:1,!&,8,2; byte_test:1,&,2,2; byte_test:1,!&,1,3; byte_test:1,!&,2,3; byte_test:1,!&,4,3; byte_test:1,!&,8,3; pcre:"/^.{6}[^\x00]+/Rs"; content:"|00 00 1c 00 01|"; within:5; reference:cve,2015-7547; classtype:attempted-user; sid:2022544; rev:1; metadata:created_at 2016_02_18, updated_at 2016_02_18;) + +alert udp any 53 -> $HOME_NET any (msg:"ET EXPLOIT Possible CVE-2015-7547 Malformed Server Response A/AAAA"; flow:from_server; content:"|00 01 00 00 00 00 00 00|"; offset:4; depth:10; isdataat:2049; byte_test:1,&,128,2; byte_test:1,!&,64,2; byte_test:1,!&,32,2; byte_test:1,!&,16,2; byte_test:1,!&,8,2; byte_test:1,&,2,2; byte_test:1,!&,1,3; byte_test:1,!&,2,3; byte_test:1,!&,4,3; byte_test:1,!&,8,3; pcre:"/^(?:.[a-z0-9-]{2,}){2,}\x00\x00(?:\x01|\x1c)/Ri"; reference:cve,2015-7547; classtype:attempted-user; sid:2022545; rev:1; metadata:created_at 2016_02_18, updated_at 2016_02_18;) + +alert tcp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET EXPLOIT Possible CVE-2015-7547 A/AAAA Record Lookup Possible Forced FallBack(fb set)"; flow:established,to_server; byte_test:2,<,513,0; byte_test:1,!&,128,4; byte_test:1,!&,64,4; byte_test:1,!&,32,4; byte_test:1,!&,16,4; byte_test:1,!&,8,4; content:"|00 01 00 00 00 00 00 00|"; offset:6; depth:8; pcre:"/^(?:.[a-z0-9-]{2,}){2,}\x00\x00(?:\x01|\x1c)/Ri"; flowbits:set,ET.CVE20157547.primer; flowbits:noalert; reference:cve,2015-7547; classtype:attempted-user; sid:2022546; rev:1; metadata:created_at 2016_02_18, updated_at 2016_02_18;) + +alert tcp any 53 -> $HOME_NET any (msg:"ET EXPLOIT Possible CVE-2015-7547 Large Response to A/AAAA query"; flow:established,from_server; flowbits:isset,ET.CVE20157547.primer; byte_test:2,>,2048,0; byte_test:1,&,128,4; byte_test:1,!&,64,4; byte_test:1,!&,32,4; byte_test:1,!&,16,4; byte_test:1,!&,8,4; content:"|00 01|"; offset:6; depth:2; reference:cve,2015-7547; classtype:attempted-user; sid:2022547; rev:1; metadata:created_at 2016_02_18, updated_at 2016_02_18;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT FireEye Detection Evasion %temp% attempt - Inbound"; flow:to_server,established; content:"%"; http_raw_uri; content:"temp%"; nocase; http_raw_uri; within:7; pcre:"/\%(?:25)?temp\%/Ii"; content:"temp%"; fast_pattern:only; reference:url,labs.bluefrostsecurity.de/advisories/bfs-sa-2016-001/; classtype:misc-attack; sid:2022554; rev:2; metadata:created_at 2016_02_22, updated_at 2016_02_22;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT TrendMicro node.js (Remote Debugger)"; flow:from_server,established; file_data; content:"/json/new/"; content:"javascript|3a|require"; distance:0; content:"child_process"; fast_pattern; distance:0; content:"spawnSync"; distance:0; reference:url,bugs.chromium.org/p/project-zero/issues/detail?id=773; classtype:trojan-activity; sid:2022693; rev:2; metadata:created_at 2016_03_31, updated_at 2016_03_31;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Quanta LTE Router Information Disclosure Exploit Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/data.ria?CfgType=get_homeCfg&file="; http_uri; fast_pattern; depth:35; reference:url,pierrekim.github.io/blog/2016-04-04-quanta-lte-routers-vulnerabilities.html; classtype:attempted-admin; sid:2022698; rev:2; metadata:created_at 2016_04_05, updated_at 2016_04_05;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 39889 (msg:"ET EXPLOIT Quanta LTE Router UDP Backdoor Activation Attempt"; flow:to_server; content:"HELODBG"; reference:url,pierrekim.github.io/blog/2016-04-04-quanta-lte-routers-vulnerabilities.html; classtype:attempted-admin; sid:2022699; rev:1; metadata:created_at 2016_04_05, updated_at 2016_04_05;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Quanta LTE Router RDE Exploit Attempt 1 (ping)"; flow:to_server,established; content:"POST"; http_method; content:"/webpost.cgi"; http_uri; content:"|7b 22 43 66 67 54 79 70 65 22 3a 22 70 69 6e 67 22 2c 22 63 6d 64 22 3a 22 70 69 6e 67 22 2c 22 75 72 6c 22 3a 22|"; http_client_body; fast_pattern; pcre:"/^[^\x22]*[\x24\x60]+/PRi"; reference:url,pierrekim.github.io/blog/2016-04-04-quanta-lte-routers-vulnerabilities.html; classtype:attempted-admin; sid:2022700; rev:2; metadata:created_at 2016_04_05, updated_at 2016_04_05;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Quanta LTE Router RDE Exploit Attempt 2 (traceroute)"; flow:to_server,established; content:"POST"; http_method; content:"/webpost.cgi"; http_uri; content:"|7b 22 43 66 67 54 79 70 65 22 3a 22 74 72 61 63 65 72 74 22 2c 22 63 6d 64 22 3a 22 74 72 61 63 65 72 74 22 2c 22 75 72 6c 22 3a 22|"; http_client_body; fast_pattern; pcre:"/^[^\x22]*[\x24\x60]+/PRi"; reference:url,pierrekim.github.io/blog/2016-04-04-quanta-lte-routers-vulnerabilities.html; classtype:attempted-admin; sid:2022701; rev:3; metadata:created_at 2016_04_05, updated_at 2016_04_05;) + +alert tcp any any -> any 6129 (msg:"ET EXPLOIT Dameware DMRC Buffer Overflow Attempt (CVE-2016-2345)"; flow:established,to_server; content:"|44 9c 00 00|"; depth:4; content:"|90 90 90 90 90 90 90 90|"; distance:0; content:"|eb 06 ff ff 61 11 40 00 90 90 90 e9 6b fa ff ff|"; distance:0; reference:cve,2016-2345; reference:url,www.securifera.com/blog/2016/04/03/fun-with-remote-controllers-dameware-mini-remote-control-cve-2016-2345; classtype:attempted-admin; sid:2022712; rev:1; metadata:created_at 2016_04_06, updated_at 2016_04_06;) + +alert http any any -> $HOME_NET 8080 (msg:"ET EXPLOIT Linksys Router Unauthenticated Remote Code Execution"; flow:to_server,established; content:"POST"; http_method; content:".cgi"; http_uri; nocase; content:"%74%74%63%70%5f%69%70%3d%2d%68%20%60"; http_client_body; fast_pattern:only; content:"Authorization|3a| Basic"; http_header; reference:url,sans.org/reading-room/whitepapers/malicious/analyzing-backdoor-bot-mips-platform-35902; classtype:attempted-user; sid:2022758; rev:2; metadata:created_at 2016_04_25, updated_at 2016_04_25;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Internet Explorer VBscript failure to handle error case information disclosure CVE-2014-6332 Common Construct M2"; flow:established,from_server; file_data; content:"redim"; nocase; fast_pattern:only; content:"Preserve"; nocase; content:"VBScript"; nocase; content:"chrw"; content:"32767"; distance:0; content:"chrw"; content:"2176"; distance:0; classtype:attempted-admin; sid:2022797; rev:2; metadata:created_at 2016_05_06, updated_at 2016_05_06;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 500 (msg:"ET EXPLOIT CVE-2016-1287 Public Exploit ShellCode"; content:"|60 c7 02 90 67 b9 09 8b 45 f8 8b 40 5c 8b 40 04 8b 40 08 8b 40 04 8b 00 85 c0 74 3b 50 8b 40 08 8b 40 04 8d 98 d8 00 00 00 58 81 3b d0 d4 00 e1 75 e4 83 7b 04 31 74 de 89 d8 2d 00 01 00 00 c7 40 04 03 01 00 00 c7 40 0c d0 00 00 00 c7 80 f8|"; reference:url,github.com/exodusintel/disclosures/blob/master/CVE_2016_1287_PoC; classtype:attempted-admin; sid:2022820; rev:1; metadata:created_at 2016_05_18, updated_at 2016_05_18;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible CVE-2016-2209 Symantec PowerPoint Parsing Buffer Overflow M1"; flow:established,from_server; file_data; content:"|C8 6A CD E5 F1 2C B0 16 E6 F2 36 7B 41 2E 7F 4B C4 27 13 CF F3 1F FF 2B A8 2B 3A FE 09 77 BE CE 29 00 00 BA 0F 91 03 00 00|"; content:!"|00 00|"; distance:503; within:2; content:"|00 00 BA 0F 16 01 00 00|"; distance:913; within:8; reference:url,bugs.chromium.org/p/project-zero/issues/detail?id=823&q=; classtype:trojan-activity; sid:2022923; rev:2; metadata:created_at 2016_06_29, updated_at 2016_06_29;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible CVE-2016-2209 Symantec PowerPoint Parsing Buffer Overflow M2"; flow:established,from_server; file_data; content:"|C8 6A CD E5 F1 2C B0 16 E6 F2 36 7B 41 2E 7F 4B C4 27 13 CF F3 1F FF 2B A8 2B 3A FE 09 77 BE CE 29 00 00 BA 0F A9 03 00 00|"; content:!"|00 00|"; distance:50; within:2; content:"|00 00 BA 0F 2E 01 00 00|"; distance:937; within:8; reference:url,bugs.chromium.org/p/project-zero/issues/detail?id=823&q=; classtype:trojan-activity; sid:2022924; rev:2; metadata:created_at 2016_06_29, updated_at 2016_06_29;) + +#alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible CVE-2016-2211 Symantec Cab Parsing Buffer Overflow"; flow:established,from_server; file_data; content:"|4d 53 43 46|"; depth:4; byte_jump:4,8,little; isdataat:1; reference:cve,2016-2211; reference:cve,CVE-2014-9732; reference:url,bugs.chromium.org/p/project-zero/issues/detail?id=823&q=; classtype:trojan-activity; sid:2022930; rev:2; metadata:created_at 2016_06_30, updated_at 2016_06_30;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Symantec Malicious MIME Doc Name Overflow (EICAR) toclient M2"; flow:established,to_client; file_data; content:"Content-Type|3a 20|"; nocase; content:"name"; nocase; isdataat:78,relative; pcre:"/^\s*=\s*[\x22\x27][^\x22\x27\r\n]{78}/R"; content:"|57 44 56 50 49 56 41 6c 51 45 46 51 57 7a 52 63 55 46 70 59 4e 54 51 6f 55 46 34 70 4e 30 4e 44 4b 54 64 39 4a 45 56 4a 51 30 46 53|"; reference:url,bugs.chromium.org/p/project-zero/issues/detail?id=823&q=; classtype:attempted-admin; sid:2022932; rev:2; metadata:created_at 2016_06_30, updated_at 2016_06_30;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Symantec Malicious MIME Doc Name Overflow (EICAR) toclient M1"; flow:established,to_client; file_data; content:"Content-Type|3a 20|"; nocase; content:"name"; nocase; isdataat:78,relative; pcre:"/^\s*=\s*[\x22\x27][^\x22\x27\r\n]{78}/R"; content:"|58 35 4f 21 50 25 40 41 50 5b 34 5c 50 5a 58 35 34 28 50 5e 29 37 43 43 29 37 7d 24 45 49 43 41 52 2d|"; reference:url,bugs.chromium.org/p/project-zero/issues/detail?id=823&q=; classtype:attempted-admin; sid:2022933; rev:2; metadata:created_at 2016_06_30, updated_at 2016_06_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Symantec Malicious MIME Doc Name Overflow (EICAR) toserver M3"; flow:established,to_server; content:"Content-Type|3a 20|"; nocase; content:"name"; nocase; isdataat:78,relative; pcre:"/^\s*=\s*[\x22\x27][^\x22\x27\r\n]{78}/R"; content:"|57 44 56 50 49 56 41 6c 51 45 46 51 57 7a 52 63 55 46 70 59 4e 54 51 6f 55 46 34 70 4e 30 4e 44 4b 54 64 39 4a 45 56 4a 51 30 46 53|"; reference:url,bugs.chromium.org/p/project-zero/issues/detail?id=823&q=; classtype:attempted-admin; sid:2022935; rev:1; metadata:created_at 2016_06_30, updated_at 2016_06_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Symantec Malicious MIME Doc Name Overflow (EICAR) toclient M4"; flow:established,to_client; content:"Content-Type|3a 20|"; nocase; content:"name"; nocase; isdataat:78,relative; pcre:"/^\s*=\s*[\x22\x27][^\x22\x27\r\n]{78}/R"; content:"|57 44 56 50 49 56 41 6c 51 45 46 51 57 7a 52 63 55 46 70 59 4e 54 51 6f 55 46 34 70 4e 30 4e 44 4b 54 64 39 4a 45 56 4a 51 30 46 53|"; reference:url,bugs.chromium.org/p/project-zero/issues/detail?id=823&q=; classtype:attempted-admin; sid:2022936; rev:1; metadata:created_at 2016_06_30, updated_at 2016_06_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Symantec Malicious MIME Doc Name Overflow (EICAR) toclient M3"; flow:established,to_client; content:"Content-Type|3a 20|"; nocase; content:"name"; nocase; isdataat:78,relative; pcre:"/^\s*=\s*[\x22\x27][^\x22\x27\r\n]{78}/R"; content:"|58 35 4f 21 50 25 40 41 50 5b 34 5c 50 5a 58 35 34 28 50 5e 29 37 43 43 29 37 7d 24 45 49 43 41 52 2d|"; reference:url,bugs.chromium.org/p/project-zero/issues/detail?id=823&q=; classtype:attempted-admin; sid:2022937; rev:1; metadata:created_at 2016_06_30, updated_at 2016_06_30;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Symantec Malicious MIME Doc Name Overflow (EICAR) toserver M4"; flow:established,to_server; content:"Content-Type|3a 20|"; nocase; content:"name"; nocase; isdataat:78,relative; pcre:"/^\s*=\s*[\x22\x27][^\x22\x27\r\n]{78}/R"; content:"|58 35 4f 21 50 25 40 41 50 5b 34 5c 50 5a 58 35 34 28 50 5e 29 37 43 43 29 37 7d 24 45 49 43 41 52 2d|"; reference:url,bugs.chromium.org/p/project-zero/issues/detail?id=823&q=; classtype:attempted-admin; sid:2022938; rev:1; metadata:created_at 2016_06_30, updated_at 2016_06_30;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT CVE-2016-0189 Common Construct M1"; flow:established,from_server; file_data; content:"%u0008%u4141%u4141%u4141"; nocase; content:"redim"; nocase; content:"Preserve"; content:"2000"; distance:0; pcre:"/^\s*?\x29/Rs"; content:"%u400C%u0000%u0000%u0000"; nocase; reference:url,theori.io/research/cve-2016-0189; reference:cve,2016-0189; classtype:attempted-user; sid:2022971; rev:2; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, attack_target Client_Endpoint, deployment Perimeter, tag CVE_2016_0189, signature_severity Major, created_at 2016_07_15, performance_impact Low, updated_at 2016_07_15;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT CVE-2016-0189 Common Construct M2"; flow:established,from_server; file_data; content:"triggerBug"; nocase; content:"Dim "; nocase; distance:0; content:".resize"; nocase; pcre:"/^\s*\x28/Rs"; content:"Mid"; pcre:"/^\s*?\(x\s*,\s*1,\s*24000\s*\x29/Rs"; reference:url,theori.io/research/cve-2016-0189; reference:cve,2016-0189; classtype:attempted-user; sid:2022972; rev:2; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, attack_target Client_Endpoint, deployment Perimeter, signature_severity Major, created_at 2016_07_15, performance_impact Low, updated_at 2016_07_15;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT LastPass RCE Attempt"; flow:from_server,established; file_data; content:"getBoundingClientRect"; nocase; content:"MouseEvent"; fast_pattern:only; content:"dispatchEvent"; nocase; pcre:"/^\s*\x28\s*new\s*MouseEvent\s*\x28\s*[\x22\x27]\s*click/Rsi"; content:"addEventListener"; nocase; pcre:"/^\s*\x28\s*[\x22\x27]\s*message/Rsi"; reference:url,bugs.chromium.org/p/project-zero/issues/detail?id=884; classtype:trojan-activity; sid:2022989; rev:2; metadata:affected_product Web_Browser_Plugins, attack_target Client_Endpoint, deployment Perimeter, signature_severity Major, created_at 2016_07_28, performance_impact Low, updated_at 2016_07_28;) + +alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS 8083 (msg:"GPL EXPLOIT WEB-MISC JBoss RMI class download service directory listing attempt"; flow:to_server,established; content:"GET %. HTTP/1."; reference:url,marc.theaimsgroup.com/?l=bugtraq&m=111911095424496&w=2; classtype:web-application-attack; sid:2103461; rev:1; metadata:created_at 2016_08_04, updated_at 2016_08_04;) + +alert udp any any -> any 161 (msg:"ET EXPLOIT Equation Group ExtraBacon Cisco ASA PMCHECK Disable"; content:"|bf a5 a5 a5 a5 b8 d8 a5 a5 a5 31 f8 bb a5|"; content:"|ac 31 fb b9 a5 b5 a5 a5 31 f9 ba a2 a5 a5 a5 31 fa cd 80 eb 14 bf|"; distance:2; within:22; content:"|31 c9 b1 04 fc f3 a4 e9 0c 00 00 00 5e eb ec e8 f8 ff ff ff 31 c0 40 c3|"; distance:4; within:24; reference:url,xorcatt.wordpress.com/2016/08/16/equationgroup-tool-leak-extrabacon-demo/; classtype:attempted-admin; sid:2023070; rev:1; metadata:affected_product Cisco_ASA, attack_target Server, deployment Datacenter, signature_severity Critical, created_at 2016_08_17, performance_impact Low, updated_at 2016_08_17;) + +alert udp any any -> any 161 (msg:"ET EXPLOIT Equation Group ExtraBacon Cisco ASA AAAADMINAUTH Disable"; content:"|bf a5 a5 a5 a5 b8 d8 a5 a5 a5 31 f8 bb a5|"; content:"|ad 31 fb b9 a5 b5 a5 a5 31 f9 ba a2 a5 a5 a5 31 fa cd 80 eb 14 bf|"; distance:2; within:22; content:"|31 c9 b1 04 fc f3 a4 e9 0c 00 00 00 5e eb ec e8 f8 ff ff ff 31 c0 40 c3|"; distance:4; within:24; reference:url,xorcatt.wordpress.com/2016/08/16/equationgroup-tool-leak-extrabacon-demo/; classtype:attempted-admin; sid:2023071; rev:1; metadata:affected_product Cisco_ASA, attack_target Server, deployment Datacenter, signature_severity Critical, created_at 2016_08_17, performance_impact Low, updated_at 2016_08_17;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Equation Group EGREGIOUSBLUNDER Fortigate Exploit Attempt"; flow:established,to_server; urilen:6; content:"POST"; http_method; content:"/index"; http_uri; content:!"User-Agent|3a|"; http_header; content:!"Content-Type|3a|"; http_header; content:!"Referer|3a|"; http_header; content:!"Accept"; http_header; content:"Host|3a 20|"; depth:6; http_header; content:"Content-length|3a 20|0|0d 0a|"; distance:0; http_header; content:"Content-length|3a 20|0|0d 0a|Cookie|3a 20|APSCOOKIE=Era=0&Payload="; fast_pattern:31,20; pcre:"/^[A-Za-z0-9+/]{0,4}?[^\x20-\x7e]/R"; pcre:"/^Host\x3a[^\r\n]+?\r\nContent-length/H"; classtype:attempted-admin; sid:2023075; rev:2; metadata:affected_product Fortigate, attack_target Server, deployment Datacenter, signature_severity Major, created_at 2016_08_17, performance_impact Low, updated_at 2016_08_17;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 161 (msg:"ET EXPLOIT CISCO FIREWALL SNMP Buffer Overflow Extrabacon (CVE-2016-6366)"; content:"|06 01 04 01 09 09 83 6B|"; pcre:"/^(?:\x01(?:(?:\x01(?:(?:\x04(?:(?:\x03(?:\x01(?:[\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b])?)?|\x04(?:\x01(?:[\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b])?)?|\x01(?:\x01(?:[\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a])?)?|\x02(?:\x01(?:[\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a])?)?))?|\x01(?:[\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c])?|\x02(?:[\x01\x02\x03\x04])?|\x03(?:[\x01\x02])?))?|\x03(?:(?:\x03(?:\x01(?:\x01(?:[\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e])?)?)?|\x01(?:[\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13])?|\x02(?:[\x01\x02])?))?|\x05(?:(?:\x02(?:\x01(?:[\x01\x02\x03\x04\x05\x06\x07])?)?|\x01(?:[\x01\x02\x03])?))?|\x02(?:(?:[\x01\x02]|\x03(?:\x01(?:[\x01\x02\x03])?)?))?|\x06(?:\x01(?:[\x01\x02\x03\x05\x06\x07\x08\x09\x0a\x0b])?)?|\x07(?:[\x01\x02])?|\x04))?|\x02(?:(?:\x02(?:[\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c])?|(?:\x01)?\x01))?)/Rsi"; content:"|81 10 81 10 81 10 81 10 81 10 81 10 81 10 81 10|"; within:160; fast_pattern; reference:cve,2016-6366; classtype:misc-attack; sid:2023086; rev:1; metadata:affected_product Cisco_ASA, attack_target Server, deployment Datacenter, signature_severity Critical, created_at 2016_08_25, performance_impact Low, updated_at 2016_08_25;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Challack Tool in use"; flow:no_stream,to_server; flags:R; dsize:1; content:"x"; threshold: type both, track by_dst, seconds 1, count 90; reference:url,www.cs.ucr.edu/~zhiyunq/pub/sec16_TCP_pure_offpath.pdf; reference:cve,2016-5696; classtype:misc-attack; sid:2023140; rev:2; metadata:affected_product Linux, attack_target Server, deployment Datacenter, signature_severity Major, created_at 2016_08_29, performance_impact Significant, updated_at 2016_08_29;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT RST Flood With Window"; flow:no_stream,to_server; flags:R; window:!0; threshold: type both, track by_dst, seconds 1, count 101; reference:url,www.cs.ucr.edu/~zhiyunq/pub/sec16_TCP_pure_offpath.pdf; reference:cve,2016-5696; classtype:misc-attack; sid:2023141; rev:2; metadata:affected_product Linux, attack_target Server, deployment Perimeter, signature_severity Major, created_at 2016_08_29, performance_impact Significant, updated_at 2016_08_29;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Android Stagefright MP4 (CVE 2016-3861) Set"; flow:established,from_server; file_data; content:"ftyp"; fast_pattern; offset:4; depth:4; content:"|00|"; distance:5; within:1; flowbits:set,ET.MP4Stagefright; flowbits:noalert; reference:cve,2016-3861; reference:url,googleprojectzero.blogspot.com.br/2016/09/return-to-libstagefright-exploiting.html; classtype:attempted-user; sid:2023184; rev:2; metadata:tag Android_Exploit, created_at 2016_09_12, updated_at 2016_09_12;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Android Stagefright MP4 (CVE 2016-3861) ROP"; flow:established,from_server; content:"ID3"; content:!"|FF|"; within:1; content:"|41 d8 41 d8 41 dc 41 d8 41 d8 41 dc|"; fast_pattern; within:800; pcre:"/^(\x41\xd8\x41\xd8\x41\xdc){2,}\x41\x00/R"; flowbits:isset,ET.MP4Stagefright; reference:cve,2016-3861; reference:url,googleprojectzero.blogspot.com.br/2016/09/return-to-libstagefright-exploiting.html; classtype:attempted-user; sid:2023185; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android_Exploit, signature_severity Major, created_at 2016_09_12, performance_impact Low, updated_at 2016_09_12;) + +alert tcp any any -> $HOME_NET 3306 (msg:"ET EXPLOIT Possible MySQL CVE-2016-6662 Attempt"; flow:established,to_server; content:"|03|"; offset:4; content:"unhex"; nocase; distance:0; content:"67656e6572616c5f6c6f675f66696c65"; distance:0; nocase; content:"2e636e66"; nocase; content:"6e6d616c6c6f635f6c6962"; reference:cve,2016-6662; reference:url,legalhackers.com/advisories/MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662.html; classtype:attempted-admin; sid:2023201; rev:1; metadata:affected_product MySQL, attack_target Server, deployment Datacenter, created_at 2016_09_13, updated_at 2016_09_13;) + +alert tcp any any -> $HOME_NET 3306 (msg:"ET EXPLOIT Possible MySQL cnf overwrite CVE-2016-6662 Attempt"; flow:established,to_server; content:"|03|"; offset:4; content:"global_log_dir"; nocase; distance:0; content:".cnf"; nocase; distance:0; content:"nmalloc_lib"; fast_pattern:only; reference:cve,2016-6662; reference:url,legalhackers.com/advisories/MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662.html; classtype:attempted-admin; sid:2023202; rev:1; metadata:affected_product MySQL, attack_target Server, deployment Datacenter, created_at 2016_09_13, updated_at 2016_09_13;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT CVE-2015-2419 As observed in Magnitude EK"; flow:established,from_server; file_data; content:"|5b 30 78 35 33 2c 20 30 78 35 35 2c 20 30 78 35 36 2c 20 30 78 65 38 2c 20 30 78 30 39 2c 20 30 78 30 30 2c 20 30 78 30 30 2c 20 30 78 30 30 2c 20 30 78 35 65 2c 20 30 78 35 64 2c 20 30 78 35 62 2c 20 30 78 38 62 2c 20 30 78 36 33 2c 20 30 78 30 63 2c 20 30 78 63 32 2c 20 30 78 30 63 2c 20 30 78 30 30 2c 20 30 78 39 30 5d|"; nocase; content:"|30 78 31 32 38 65 30 30 32 30|"; nocase; content:"|4a 53 4f 4e|"; nocase; content:"|73 74 72 69 6e 67 69 66 79|"; nocase; classtype:trojan-activity; sid:2023253; rev:2; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, affected_product Web_Browser_Plugins, attack_target Client_Endpoint, deployment Perimeter, tag Magnitude_EK, signature_severity Major, created_at 2016_09_21, malware_family Magnitude, updated_at 2016_09_21;) + +alert udp $EXTERNAL_NET any -> $HOME_NET 500 (msg:"ET EXPLOIT Possible Cisco IKEv1 Information Disclosure Vulnerability CVE-2016-6415"; dsize:>828; content:"|00 00 00 00 00 00 00 00 01 10|"; offset:8; depth:10; content:"|80 02 00|"; distance:30; byte_test:1,<,3,0,relative; byte_test:1,>,0,0,relative; content:"|80 04 00 01 00 06|"; distance:1; within:6; fast_pattern; byte_test:2,>,768,0,relative; reference:cve,2016-6415; classtype:attempted-user; sid:2023311; rev:1; metadata:affected_product Cisco_PIX, attack_target Networking_Equipment, deployment Datacenter, signature_severity Major, created_at 2016_09_29, performance_impact Low, updated_at 2016_09_29;) + +alert udp any any -> $DNS_SERVERS 53 (msg:"ET EXPLOIT BIND9 msg->reserved Assertion DoS Packet Inbound (CVE-2016-2776)"; dsize:>512; content:"|00 00 00 01 00 00 00 00 00 01|"; depth:10; offset:2; content:"|00 00 01 00 01|"; distance:0; content:"|00 00 FA|"; distance:0; reference:cve,cve-2016-2776; reference:url,blog.infobytesec.com/2016/10/a-tale-of-dns-packet-cve-2016-2776.html; classtype:attempted-dos; sid:2023317; rev:3; metadata:affected_product BIND, attack_target Server, deployment Datacenter, signature_severity Major, created_at 2016_10_04, updated_at 2016_10_05;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT COMTREND ADSL Router CT-5367 Remote DNS Change Attempt"; flow:established,to_server; content:"GET"; http_method; content:"/dnscfg.cgi?"; http_uri; fast_pattern; nocase; content:"dnsPrimary="; http_uri; content:"dnsDynamic="; http_uri; nocase; content:"dnsRefresh="; http_uri; nocase; reference:url,www.expku.com/remote/5853.html; classtype:attempted-admin; sid:2023467; rev:2; metadata:attack_target Client_Endpoint, deployment Perimeter, signature_severity Major, created_at 2016_10_31, updated_at 2016_10_31;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Unknown Router Remote DNS Change Attempt"; flow:established,to_server; urilen:10; content:"POST"; http_method; content:"/setup.htm"; http_uri; nocase; content:"wan_proto=dhcp"; nocase; http_client_body; content:"dhcps_dns_1="; http_client_body; nocase; fast_pattern:only; content:"dhcps_mode=enabled"; http_client_body; nocase; content:"lan_proto=enable"; http_client_body; nocase; content:!"Cookie|3a|"; content:!"Authorization|3a|"; http_header; classtype:attempted-admin; sid:2023468; rev:2; metadata:attack_target Client_Endpoint, deployment Perimeter, signature_severity Major, created_at 2016_10_31, updated_at 2016_10_31;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible iOS Pegasus Safari Exploit (CVE-2016-4657)"; flow:established,from_server; file_data; content:"+="; pcre:"/^\s*?\x27try\s*?{}\s*?catch\x28e\x29\s*?{}\x3b/Rsi"; content:"Object"; pcre:"/^(?:\.|\[\s*?[\x22\x27])defineProperties\s*?\x28/Rsi"; content:"defineProperties"; fast_pattern:only; reference:cve,2016-4657; reference:url,blog.lookout.com/blog/2016/11/02/trident-pegasus-technical-details/; classtype:attempted-admin; sid:2023484; rev:2; metadata:affected_product iOS, affected_product Safari, attack_target Mobile_Client, deployment Perimeter, signature_severity Major, created_at 2016_11_07, performance_impact Low, updated_at 2016_11_07;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 6379 (msg:"ET EXPLOIT REDIS Attemted SSH Authorized Key Writing Attempt"; flow:established,to_server; content:"*"; depth:1; content:"config"; content:"set"; distance:0; content:"|0D 0A|dbfilename|0D 0A|"; distance:0; content:"|0D 0A|authorized_keys|0D 0A|"; distance:0; reference:url,antirez.com/news/96; classtype:attempted-admin; sid:2023511; rev:1; metadata:attack_target Client_Endpoint, deployment Datacenter, tag SCAN_Redis_SSH, signature_severity Major, created_at 2016_11_15, updated_at 2016_11_15;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 6379 (msg:"ET EXPLOIT REDIS Attempted SSH Key Upload"; flow:established,to_server; content:"*"; depth:1; content:"|0D 0A|set|0D 0A|"; content:"ssh-rsa "; distance:0; reference:url,antirez.com/news/96; classtype:attempted-admin; sid:2023512; rev:1; metadata:attack_target Client_Endpoint, deployment Datacenter, tag SCAN_Redis_SSH, signature_severity Major, created_at 2016_11_15, updated_at 2016_11_15;) + +alert http any any -> any [5555,7547] (msg:"ET EXPLOIT Eir D1000 Modem CWMP Exploit RCE "; flow:to_server,established; content:"urn|3a|dslforum-org|3a|service|3a|Time|3a|1#SetNTPServers"; nocase; http_header; fast_pattern:only; reference:url,devicereversing.wordpress.com/2016/11/07/eirs-d1000-modem-is-wide-open-to-being-hacked/; reference:md5,a19d5b596992407796a33c5e15489934; classtype:trojan-activity; sid:2023548; rev:3; metadata:affected_product Eir_D1000_Modem, attack_target Networking_Equipment, deployment Perimeter, signature_severity Major, created_at 2016_11_28, updated_at 2016_11_29;) + +alert http any any -> any [5555,7547] (msg:"ET EXPLOIT Eir D1000 Modem CWMP Exploit Retrieving Wifi Key"; flow:to_server,established; content:"urn|3a|dslforum-org|3a|service|3a|Time|3a|1#SetNTPServers"; nocase; http_header; fast_pattern:only; content:"|3c 75 3a 47 65 74 53 65 63 75 72 69 74 79 4b 65 79 73|"; http_client_body; reference:url,devicereversing.wordpress.com/2016/11/07/eirs-d1000-modem-is-wide-open-to-being-hacked/; reference:md5,a19d5b596992407796a33c5e15489934; classtype:trojan-activity; sid:2023549; rev:3; metadata:affected_product Eir_D1000_Modem, attack_target Networking_Equipment, deployment Perimeter, signature_severity Major, created_at 2016_11_28, performance_impact Low, updated_at 2016_11_29;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Firefox 0-day used against TOR browser Nov 29 2016 M1"; flow:established,from_server; file_data; content:"|66 69 6e 64 50 6f 70 52 65 74|"; nocase; content:"|66 69 6e 64 53 74 61 63 6b 50 69 76 6f 74|"; nocase; content:"|56 69 72 74 75 61 6c 41 6c 6c 6f 63|"; nocase; content:"|72 6f 70 43 68 61 69 6e|"; nocase; content:"|6b 65 72 6e 65 6c 33 32 2e 64 6c 6c|"; nocase; reference:url,arstechnica.com/security/2016/11/firefox-0day-used-against-tor-users-almost-identical-to-one-fbi-used-in-2013/; classtype:attempted-admin; sid:2023559; rev:2; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, affected_product Firefox, attack_target Client_Endpoint, deployment Perimeter, tag Web_Client_Attacks, signature_severity Major, created_at 2016_11_30, performance_impact Low, updated_at 2016_11_30;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Firefox 0-day used against TOR browser Nov 29 2016 M2"; flow:established,from_server; file_data; content:"|72 6f 70 43 68 61 69 6e 28 72 6f 70 42 61 73 65 2c 76 74 61 62 6c 65 5f 6f 66 66 73 65 74 2c 31 30 2c 72 6f 70 41 72 72 42 75 66 29 3b|"; nocase; reference:url,arstechnica.com/security/2016/11/firefox-0day-used-against-tor-users-almost-identical-to-one-fbi-used-in-2013/; classtype:attempted-admin; sid:2023560; rev:2; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, affected_product Firefox, attack_target Client_Endpoint, deployment Perimeter, tag Web_Client_Attacks, signature_severity Major, created_at 2016_11_30, performance_impact Low, updated_at 2016_11_30;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT CVE-2016-3210 Exploit Observed ITW M1 Nov 30"; flow:established,from_server; file_data; content:"|43 6f 6c 6c 65 63 74 47 61 72 62 61 67 65|"; nocase; content:"|73 70 72 61 79 48 65 61 70|"; nocase; content:"|73 65 74 41 64 64 72 65 73 73|"; nocase; content:"|30 78 63 36 62 65 63|"; nocase; content:"|30 78 46 46 46 46 30 30 30 30|"; nocase; classtype:attempted-admin; sid:2023568; rev:2; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, affected_product Web_Browser_Plugins, attack_target Client_Endpoint, deployment Perimeter, tag Exploit_Kit_Sundown, signature_severity Major, created_at 2016_11_30, updated_at 2016_11_30;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT CVE-2016-3210 Exploit Observed ITW M1 Nov 30"; flow:established,from_server; file_data; content:"|77 72 69 74 65 4e 28 72 6f 70 61 64 64 72 20 2b 20 69 20 2a 20 34 2c 20 72 6f 70 5b 69 5d 2c 20 34 29 3b|"; classtype:attempted-admin; sid:2023569; rev:2; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, affected_product Web_Browser_Plugins, attack_target Client_Endpoint, deployment Perimeter, tag Exploit_Kit_Sundown, signature_severity Major, created_at 2016_11_30, updated_at 2016_11_30;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Netgear R7000 Command Injection Exploit"; flow:established,to_server; content:"/cgi-bin/"; http_uri; depth:9; content:"$IFS"; http_uri; fast_pattern; distance:0; content:"|3b|"; http_uri; reference:url,www.kb.cert.org/vuls/id/582384; classtype:attempted-user; sid:2023628; rev:2; metadata:affected_product Netgear_Router, attack_target Networking_Equipment, deployment Perimeter, signature_severity Major, created_at 2016_12_12, performance_impact Low, updated_at 2016_12_12;) + +alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET EXPLOIT Possible CVE-2016-10033 PHPMailer RCE Attempt"; flow:to_server,established; content:"POST"; http_method; content:"Content-Type|3a 20|multipart/form-data|3b|"; http_header; content:" $HOME_NET any (msg:"ET EXPLOIT Possible Microsoft Edge Chakra.dll Type Confusion (CVE-2016-7200 CVE-2016-7201) Observed in SunDown EK 3"; flow:established,from_server; file_data; content:"|66 75 6e 63 74 69 6f 6e 20 54 72 69 67 67 65 72 46 69 6c 6c 46 72 6f 6d 50 72 6f 74 6f 74 79 70 65 73 42 75 67 28 6c 6f 2c 20 68 69 29|"; nocase; content:"|63 68 61 6b 72 61 42 61 73 65 2e 61 64 64|"; nocase; content:"|73 68 63 6f 64 65 41 64 64 72 2e 61 6e 64|"; nocase; classtype:trojan-activity; sid:2023699; rev:3; metadata:affected_product Microsoft_Edge_Browser, attack_target Client_Endpoint, deployment Perimeter, tag Exploit_Kit_Sundown, signature_severity Critical, created_at 2017_01_06, updated_at 2017_01_06;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Microsoft Edge Chakra.dll Type Confusion (CVE-2016-7200 CVE-2016-7201) Observed in SunDown EK 1"; flow:established,to_client; file_data; content:"0x1DA2F5"; fast_pattern; nocase; content:"0x1DA2CB"; nocase; distance:0; content:"getPrototypeOf"; nocase; content:".__proto__"; nocase; content:"Symbol.species"; reference:cve,2016-7200; reference:url,malware.dontneedcoffee.com/2017/01/CVE-2016-7200-7201.html; classtype:attempted-user; sid:2023700; rev:2; metadata:affected_product Microsoft_Edge_Browser, attack_target Client_Endpoint, deployment Perimeter, tag Exploit_Kit_Sundown, signature_severity Critical, created_at 2017_01_06, updated_at 2017_01_06;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Microsoft Edge Chakra.dll Type Confusion (CVE-2016-7200 CVE-2016-7201) Observed in SunDown EK 2"; flow:established,to_client; file_data; content:"rop.length"; fast_pattern; nocase; content:"Write64"; nocase; distance:0; pcre:"/^\s*\x28\s*retPtrAddr\.add\s*\x28\s*i\s*\*\s*8\s*\x29\s*,\s*rop\s*\x5b/Rsi"; reference:cve,2016-7200; reference:url,malware.dontneedcoffee.com/2017/01/CVE-2016-7200-7201.html; classtype:attempted-user; sid:2023701; rev:2; metadata:affected_product Microsoft_Edge_Browser, attack_target Client_Endpoint, deployment Perimeter, tag Exploit_Kit_Sundown, signature_severity Critical, created_at 2017_01_06, updated_at 2017_01_06;) + +alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET EXPLOIT Possible Microsoft Edge Chakra.dll Type Confusion (CVE-2016-7200 CVE-2016-7201) B641"; flow:established,from_server; file_data; content:"VHJpZ2dlckZpbGxGcm9tUHJvdG90eXBlc0J1Z"; classtype:trojan-activity; sid:2023702; rev:2; metadata:affected_product Microsoft_Edge_Browser, attack_target Client_Endpoint, deployment Perimeter, tag Exploit_Kit_Sundown, signature_severity Critical, created_at 2017_01_06, updated_at 2017_01_06;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Microsoft Edge Chakra.dll Type Confusion (CVE-2016-7200 CVE-2016-7201) B642"; flow:established,from_server; file_data; content:"RyaWdnZXJGaWxsRnJvbVByb3RvdHlwZXNCdW"; classtype:trojan-activity; sid:2023703; rev:2; metadata:affected_product Microsoft_Edge_Browser, attack_target Client_Endpoint, deployment Perimeter, tag Exploit_Kit_Sundown, signature_severity Critical, created_at 2017_01_06, updated_at 2017_01_06;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Microsoft Edge Chakra.dll Type Confusion (CVE-2016-7200 CVE-2016-7201) B643"; flow:established,from_server; file_data; content:"UcmlnZ2VyRmlsbEZyb21Qcm90b3R5cGVzQnVn"; classtype:trojan-activity; sid:2023704; rev:2; metadata:affected_product Microsoft_Edge_Browser, attack_target Client_Endpoint, deployment Perimeter, tag Exploit_Kit_Sundown, signature_severity Critical, created_at 2017_01_06, updated_at 2017_01_06;) + +#alert tls $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible Ticketbleed Client Hello (CVE-2016-9244)"; flow:established,from_client; content:"|16 03|"; depth:2; content:"|01|"; distance:3; within:1; content:"|03 03|"; distance:3; within:2; byte_test:1,<,32,32,relative; byte_test:1,>,1,32,relative; flowbits:set,ET.ticketbleed; flowbits:noalert; reference:cve,2016-9244; reference:url,filippo.io/Ticketbleed; classtype:misc-attack; sid:2023896; rev:3; metadata:affected_product HTTP_Server, attack_target Server, deployment Datacenter, signature_severity Major, created_at 2017_02_10, performance_impact Moderate, updated_at 2017_02_13;) + +#alert tls $HOME_NET any -> $EXTERNAL_NET any (msg:"ET EXPLOIT Possible Ticketbleed Server Hello (CVE-2016-9244)"; flow:established,to_client; content:"|16 03|"; depth:2; content:"|02|"; distance:3; within:1; content:"|03 03|"; distance:3; within:2; content:"|20|"; distance:32; within:1; flowbits:isset,ET.ticketbleed; reference:url,filippo.io/Ticketbleed; reference:cve,2016-9244; classtype:misc-attack; sid:2023897; rev:3; metadata:affected_product HTTP_Server, attack_target Server, deployment Datacenter, signature_severity Major, created_at 2017_02_10, performance_impact Moderate, updated_at 2017_02_13;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT TP-LINK DNS Change GET Request (DNSChanger EK)"; flow:to_server,established; content:"GET"; http_method; content:"/userRpm/"; http_uri; depth:9; fast_pattern; content:"&dnsserver="; http_uri; threshold:type both,track by_dst,count 3, seconds 90; reference:url,www.xexexe.cz/2015/02/bruteforcing-tp-link-routers-with.html; classtype:attempted-admin; sid:2023995; rev:1; metadata:affected_product Linux, attack_target Networking_Equipment, deployment Internet, signature_severity Major, created_at 2017_02_17, performance_impact Moderate, updated_at 2017_02_17;) + +alert tcp any any -> $HOME_NET $HTTP_PORTS (msg:"ET EXPLOIT TP-LINK Password Change GET Request (DNSChanger EK)"; flow:to_server,established; content:"GET"; http_method; content:"/router/UserPassSet.cgi?"; http_uri; depth:24; fast_pattern; content:"new_user_name="; http_uri; content:"password1="; http_uri; threshold:type limit,track by_dst,count 3, seconds 90; reference:url,www.xexexe.cz/2015/02/bruteforcing-tp-link-routers-with.html; classtype:attempted-admin; sid:2023996; rev:2; metadata:affected_product Linux, attack_target Networking_Equipment, deployment Internal, signature_severity Major, created_at 2017_02_17, performance_impact Moderate, updated_at 2017_02_17;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 8880 (msg:"ET EXPLOIT IBM WebSphere - RCE Java Deserialization"; flow:to_server,established; content:"SOAPAction|3a| |22|urn:AdminService|22|"; content:""; content:"vcmcuYXBhY2hlLmNvbW1vbnMuY29sbGVjdGlvbn"; fast_pattern:only; metadata: former_category EXPLOIT; reference:cve,2015-7450; classtype:attempted-user; sid:2024062; rev:2; metadata:affected_product IBM_Websphere, attack_target Server, deployment Perimeter, signature_severity Major, created_at 2017_03_15, performance_impact Low, updated_at 2017_03_15;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET 2381 (msg:"ET EXPLOIT HP Smart Storage Administrator Remote Command Injection"; flow:to_server,established; content:"echo -n|20|"; pcre:"/^\s*(?:f0VMR|9FTE|\/RUxG)/R"; metadata: former_category EXPLOIT; reference:cve,2016-8523; classtype:attempted-user; sid:2024063; rev:2; metadata:affected_product HP_Smart_Storage_Administrator, attack_target Server, deployment Datacenter, signature_severity Critical, created_at 2017_03_15, performance_impact Low, updated_at 2017_03_15;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT NETGEAR WNR2000v5 hidden_lang_avi Stack Overflow (CVE-2016-10174)"; flow:to_server,established; content:"/lang_check.html"; http_uri; content:"timestamp="; http_uri; content:"&hidden_lang_avi="; isdataat:36,relative; content:!"|00|"; within:36; content:!"|25|"; within:36; content:!"|26|"; within:36; metadata: former_category EXPLOIT; classtype:attempted-admin; sid:2024121; rev:4; metadata:affected_product Netgear_Router, attack_target Client_Endpoint, deployment Perimeter, signature_severity Major, created_at 2017_03_30, performance_impact Low, updated_at 2017_03_31;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT D-LINK DIR-615 Cross-Site Request Forgery (CVE-2017-7398)"; flow:from_server,established; file_data; content:"/form2WlanBasicSetup.cgi"; fast_pattern; nocase; content:"method"; nocase; distance:0; pcre:"/^\s*=\s*[\x27\x22]\s*POST/Rsi"; content:"ssid"; nocase; content:"save"; nocase; content:"Apply"; nocase; distance:0; metadata: former_category EXPLOIT; reference:cve,CVE-2017-7398; classtype:attempted-user; sid:2024181; rev:2; metadata:affected_product D_Link_DIR_615, attack_target Client_Endpoint, deployment Perimeter, signature_severity Major, created_at 2017_04_05, performance_impact Low, updated_at 2017_04_05;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT TP-Link Archer C2 and Archer C20i Remote Code Execution"; flow:to_server,established; content:"POST"; http_method; content:"/cgi?"; http_uri; nocase; content:"/mainFrame.htm"; http_header; content:"IPPING"; nocase; http_client_body; content:"X_TP_ConnName=ewan_ipoe_s"; fast_pattern; http_client_body; metadata: former_category EXPLOIT; reference:url,github.com/reverse-shell/routersploit/blob/master/routersploit/modules/exploits/tplink/archer_c2_c20i_rce.py; classtype:attempted-recon; sid:2024191; rev:2; metadata:affected_product TPLINK, attack_target Client_Endpoint, deployment Perimeter, signature_severity Major, created_at 2017_04_07, performance_impact Low, updated_at 2017_04_07;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible CVE-2017-0199 HTA Inbound"; flow:established,from_server; flowbits:isset,et.IE7.NoRef.NoCookie; content:"Content-Type|3a 20|application/hta|0d 0a|"; http_header; file_data; content:"|7b 5c 72 74|"; distance:1; content:"|7b 5c|"; distance:0; content:"|7b 5c|"; distance:0; metadata: former_category EXPLOIT; classtype:trojan-activity; sid:2024192; rev:3; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, affected_product MS_Office, attack_target Client_Endpoint, deployment Perimeter, cve 2017_0199, signature_severity Major, created_at 2017_04_10, performance_impact Low, updated_at 2017_08_07;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible CVE-2017-0199 HTA Inbound M2"; flow:established,from_server; content:"Content-Type|3a 20|application/hta|0d 0a|"; http_header; file_data; content:"|2e 65 78 70 61 6e 64 45 6e 76 69 72 6f 6e 6d 65 6e 74 53 74 72 69 6e 67 73 28 22 25 41 50 50 44 41 54 41 25 22 29 20|"; content:"|4d 65 6e 75 5c 50 72 6f 67 72 61 6d 73 5c 53 74 61 72 74 75 70 5c|"; metadata: former_category EXPLOIT; classtype:trojan-activity; sid:2024193; rev:3; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, affected_product MS_Office, attack_target Client_Endpoint, deployment Perimeter, cve 2017_0199, signature_severity Major, created_at 2017_04_10, performance_impact Low, updated_at 2017_08_07;) + +alert tcp any any -> $HOME_NET 23 (msg:"ET EXPLOIT Cisco Catalyst Remote Code Execution (CVE-2017-3881)"; flow:to_server,established; content:"|ff fa 24 00 03|CISCO_KITS"; content:"|3a|"; distance:2; within:1; isdataat:160,relative; content:!"|3a|"; within:160; metadata: former_category EXPLOIT; reference:url,artkond.com/2017/04/10/cisco-catalyst-remote-code-execution/; classtype:attempted-user; sid:2024194; rev:1; metadata:affected_product CISCO_Catalyst, attack_target IoT, deployment Datacenter, signature_severity Critical, created_at 2017_04_10, performance_impact Low, updated_at 2017_04_10;) + +alert smb $HOME_NET any -> any any (msg:"ET EXPLOIT Possible ETERNALROMANCE MS17-010"; flow:from_server,established; content:"|FF|SMB|25 05 00 00 80|"; offset:4; depth:9; content:"LSbfLScnLSepLSlfLSmf"; distance:0; fast_pattern; content:"LSrfLSsrLSscLSblLSss"; within:20; content:"LSshLStrLStcLSopLScd"; within:20; flowbits:set,ETPRO.ETERNALROMANCE; metadata: former_category EXPLOIT; classtype:trojan-activity; sid:2024208; rev:1; metadata:attack_target SMB_Server, deployment Internal, signature_severity Critical, created_at 2017_04_17, updated_at 2017_04_17;) + +alert smb any any -> $HOME_NET any (msg:"ET EXPLOIT Possible Successful ETERNALROMANCE MS17-010 - Windows Executable Observed"; flow:to_server,established; flowbits:isset,ETPRO.ETERNALROMANCE; content:"|FF|SMB|26 00 00 00 00|"; offset:4; depth:9; content:"|4d 5a|"; distance:0; content:"This program cannot be run"; nocase; distance:0; fast_pattern:6,20; metadata: former_category EXPLOIT; classtype:trojan-activity; sid:2024207; rev:2; metadata:attack_target SMB_Server, deployment Internal, signature_severity Critical, created_at 2017_04_17, updated_at 2017_04_17;) + +alert smb $HOME_NET any -> any any (msg:"ET EXPLOIT Possible DOUBLEPULSAR Beacon Response"; flow:from_server,established; content:"|00 00 00 23 ff|SMB2|02 00 00 c0 98 07 c0 00 00|"; depth:18; content:"|00 00 00 08 ff fe 00 08|"; distance:8; within:8; fast_pattern; pcre:"/^[\x50-\x59]/R"; content:"|00 00 00|"; distance:1; within:3; isdataat:!1,relative; metadata: former_category EXPLOIT; classtype:trojan-activity; sid:2024216; rev:1; metadata:attack_target SMB_Server, deployment Internal, signature_severity Critical, created_at 2017_04_17, updated_at 2017_04_17;) + +alert smb any any -> $HOME_NET any (msg:"ET EXPLOIT Possible ECLIPSEDWING RPCTOUCH MS08-067"; flow:to_server,established; content:"|ff|SMB|2f 00 00 00 00|"; offset:4; depth:9; content:"NTLMSSP|00 03 00 00 00 01 00 01 00|"; distance:0; fast_pattern; content:"|00 00 00 00 49 00 00 00|"; distance:4; within:8; content:"|00 00 00 00 48 00 00 00|"; within:8; content:"|00 00 00 00 48 00 00 00|"; within:8; content:"|00 00 00 00 48 00 00 00|"; within:8; content:"|00 00 00 00 49 00 00 00|"; within:8; content:"|00 00 00 00 00 00 00 00 00|"; distance:4; within:9; isdataat:!1,relative; metadata: former_category EXPLOIT; classtype:trojan-activity; sid:2024214; rev:1; metadata:attack_target SMB_Server, deployment Internal, signature_severity Critical, created_at 2017_04_17, updated_at 2017_04_17;) + +alert smb any any -> $HOME_NET any (msg:"ET EXPLOIT Possible ECLIPSEDWING MS08-067"; flow:to_server,established; content:"|ff|SMB|2f 00 00 00 00|"; offset:4; depth:9; content:"|00 00 00 00 ff ff ff ff 08 00|"; distance:30; within:10; content:"|2e 00 00 00 00 00 00 00 2e 00 00 00|"; distance:0; content:"|2f 00 41 00 2f 00 2e 00 2e 00 2f 00|"; within:12; fast_pattern; content:"|2e 00 00 00 00 00 00 00 2e 00 00 00|"; distance:0; content:"|2f 00 41 00 2f 00 2e 00 2e 00 2f 00|"; within:12; content:"|2f 00 41 00 2f 00 2e 00 2e 00 2f 00|"; distance:0; content:"|2f 00 41 00 2f 00 2e 00 2e 00 2f 00|"; distance:0; isdataat:800,relative; metadata: former_category EXPLOIT; classtype:trojan-activity; sid:2024215; rev:1; metadata:attack_target SMB_Server, deployment Internal, signature_severity Critical, created_at 2017_04_17, updated_at 2017_04_17;) + +alert smb any any -> $HOME_NET any (msg:"ET EXPLOIT Possible ETERNALCHAMPION MS17-010 Sync Request (set)"; flow:to_server,established; content:"|ff|SMB|25 00 00 00 00 18 03 c0 00 00 00 00 00 00 00 00 00 00 00 00|"; offset:4; depth:24; content:"|00 00 00 00 ff ff ff ff 00 00|"; distance:17; within:10; content:"|5c 00 50 00 49 00 50 00 45 00 5c 00 4c 00 41 00 4e 00 4d 00 41 00 4e 00 00 00|"; distance:13; within:26; content:"|82 00|zb12g12DWrLehig24"; within:19; fast_pattern; flowbits:set,ET.ETERNALCHAMPIONsync; flowbits:noalert; metadata: former_category EXPLOIT; classtype:trojan-activity; sid:2024212; rev:2; metadata:attack_target SMB_Server, deployment Internal, signature_severity Critical, created_at 2017_04_17, updated_at 2017_04_17;) + +alert smb $HOME_NET any -> any any (msg:"ET EXPLOIT Possible ETERNALCHAMPION MS17-010 Sync Response"; flow:from_server,established; flowbits:isset,ET.ETERNALCHAMPIONsync; content:"|ff|SMB|25 00 00 00 00 98 03 c0 00 00 00 00 00 00 00 00 00 00 00 00|"; offset:4; depth:24; fast_pattern:4,20; content:"|7c 00|"; distance:32; within:2; content:"|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|"; within:20; content:"|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|"; distance:100; within:20; content:"|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|"; distance:100; within:20; content:"|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|"; distance:100; within:20; content:"|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|"; distance:0; isdataat:!1,relative; metadata: former_category EXPLOIT; classtype:trojan-activity; sid:2024213; rev:2; metadata:attack_target SMB_Server, deployment Internal, signature_severity Critical, created_at 2017_04_17, updated_at 2017_04_17;) + +alert smb any any -> $HOME_NET any (msg:"ET EXPLOIT Possible ETERNALBLUE MS17-010 Heap Spray"; flow:to_server,established; content:"|ff|SMB|33 00 00 00 00 18 07 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 08 ff fe 00 08|"; offset:4; depth:30; fast_pattern:10,20; content:"|00 09 00 00 00 10|"; distance:1; within:6; content:"|00 00 00 00 00 00 00 10|"; within:8; content:"|00 00 00 10|"; distance:4; within:4; pcre:"/^[a-zA-Z0-9+/]{1000,}/R"; threshold: type threshold, track by_src, count 5, seconds 1; metadata: former_category EXPLOIT; classtype:trojan-activity; sid:2024217; rev:2; metadata:attack_target SMB_Server, deployment Internal, signature_severity Critical, created_at 2017_04_17, updated_at 2017_05_13;) + +alert smb any any -> $HOME_NET any (msg:"ET EXPLOIT Possible ETERNALBLUE MS17-010 Echo Request (set)"; flow:to_server,established; content:"|00 00 00 31 ff|SMB|2b 00 00 00 00 18 07 c0|"; depth:16; fast_pattern; content:"|4a 6c 4a 6d 49 68 43 6c 42 73 72 00|"; distance:0; flowbits:set,ETPRO.ETERNALBLUE; flowbits:noalert; metadata: former_category EXPLOIT; classtype:trojan-activity; sid:2024220; rev:1; metadata:attack_target SMB_Server, deployment Internal, signature_severity Critical, created_at 2017_04_17, updated_at 2017_04_18;) + +alert smb $HOME_NET any -> any any (msg:"ET EXPLOIT Possible ETERNALBLUE MS17-010 Echo Response"; flow:from_server,established; content:"|00 00 00 31 ff|SMB|2b 00 00 00 00 98 07 c0|"; depth:16; fast_pattern; content:"|4a 6c 4a 6d 49 68 43 6c 42 73 72 00|"; distance:0; flowbits:isset,ETPRO.ETERNALBLUE; metadata: former_category EXPLOIT; classtype:trojan-activity; sid:2024218; rev:1; metadata:attack_target SMB_Server, deployment Internal, signature_severity Critical, created_at 2017_04_17, updated_at 2017_04_17;) + +alert smb any any -> $HOME_NET any (msg:"ET EXPLOIT Possible ETERNALROMANCE MS17-010 Heap Spray"; flow:to_server,established; content:"|ff|SMB|25 00 00 00 00 18|"; offset:4; depth:10; content:"|07 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 08|"; fast_pattern; within:16; content:"|00 08|"; distance:2; within:2; content:"|0e 00 00 40 00|"; distance:2; within:5; content:"|00 00 00 00 00 00 01 00 00 00 00 00 00 00 00|"; distance:2; within:15; content:"|00 00 00 00 00 00 00 00 00|"; isdataat:!1,relative; threshold: type threshold, track by_src, count 20, seconds 1; metadata: former_category EXPLOIT; classtype:trojan-activity; sid:2024219; rev:1; metadata:attack_target SMB_Server, deployment Internal, signature_severity Critical, created_at 2017_04_17, updated_at 2017_04_17;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible EXPLODINGCAN IIS5.0/6.0 Exploit Attempt"; flow:to_server,established; urilen:1; content:"PROPFIND"; http_method; content:"Content-Length|3a 20|0|0d 0a|Host|3a 20|"; http_header; depth:25; content:"|0d 0a|If|3a 20| $HOME_NET 8082 (msg:"ET EXPLOIT BlueCoat CAS v1.3.7.1 Report Email Command Injection attempt"; flow:to_server,established; content:"POST"; nocase; http_method; content:"/report-email/send"; nocase; http_uri; content:"/dev-report-overview.html"; nocase; http_client_body; content:"|3B|"; http_client_body; distance:0; pcre:"/\/dev-report-overview\.html[^\"]*?\x3b/Pi"; metadata: former_category EXPLOIT; reference:cve,2016-9091; reference:url,www.exploit-db.com/exploits/41785/; reference:url,bto.bluecoat.com/security-advisory/sa138; classtype:web-application-attack; sid:2024234; rev:2; metadata:affected_product HTTP_Server, attack_target Web_Server, deployment Internal, signature_severity Major, created_at 2017_04_21, performance_impact Moderate, updated_at 2017_04_21;) + +alert http any any -> $HOME_NET [16992,16993,623,664] (msg:"ET EXPLOIT Intel AMT Login Attempt Detected (CVE 2017-5689)"; flow:to_server,established; content:"Authorization|3a 20|Digest"; http_header; content:"username=|22|"; http_header; content:"response="; http_header; fast_pattern; pcre:"/^\s*\x22{2}/HR"; metadata: former_category EXPLOIT; reference:url,mjg59.dreamwidth.org/48429.html; reference:url,www.tenable.com/blog/rediscovering-the-intel-amt-vulnerability; reference:cve,2017-5689; classtype:attempted-admin; sid:2024287; rev:2; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, attack_target Client_Endpoint, deployment Internal, signature_severity Major, created_at 2017_05_10, performance_impact Moderate, updated_at 2017_05_10;) + +alert tcp any any -> any 445 (msg:"ET EXPLOIT ETERNALBLUE Exploit M2 MS17-010"; flow:established,to_server; content:"|8000a80000000000000000000000000000000000ffff000000000000ffff0000000000000000000000000000000000000000000000f1dfff000000000000000020f0dfff00f1dfffffffffff600004100000000080efdfff|"; metadata: former_category CURRENT_EVENTS; reference:cve,CVE-2017-0143; classtype:attempted-admin; sid:2024297; rev:2; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, attack_target Client_Endpoint, deployment Perimeter, signature_severity Major, created_at 2017_05_16, performance_impact Low, updated_at 2017_07_06;) + +alert tcp any any -> $HOME_NET 1556 (msg:"ET EXPLOIT NB8-01 - Unauthed RCE via bprd"; flow:established,to_server; content:"ack="; depth:4; content:"extension=bprd"; distance:0; fast_pattern; pcre:"/^.*?[\x24\x60]/R"; metadata: former_category EXPLOIT; reference:url,seclists.org/fulldisclosure/2017/May/27; classtype:web-application-attack; sid:2024308; rev:1; metadata:attack_target Server, deployment Internal, signature_severity Major, created_at 2017_05_17, performance_impact Moderate, updated_at 2017_05_17;) + +alert tcp any any -> $HOME_NET 1556 (msg:"ET EXPLOIT NB8-02 - Possible Unauthed RCE via nbbsdtar"; flow:established,to_server; content:"ack="; depth:4; content:"extension=bprd"; distance:0; fast_pattern; content:"/bin/"; distance:0; metadata: former_category EXPLOIT; reference:url,seclists.org/fulldisclosure/2017/May/27; classtype:web-application-attack; sid:2024309; rev:1; metadata:attack_target Server, deployment Internal, signature_severity Major, created_at 2017_05_17, performance_impact Moderate, updated_at 2017_05_17;) + +alert tcp any any -> $HOME_NET 1556 (msg:"ET EXPLOIT NB8-04 - Possible Unauthed RCE via whitelist bypass"; flow:established,to_server; content:"ack="; depth:4; content:"extension=bprd"; distance:0; fast_pattern; content:"BPCD_WHITELIST_PATH"; distance:0; metadata: former_category EXPLOIT; reference:url,seclists.org/fulldisclosure/2017/May/27; classtype:web-application-attack; sid:2024310; rev:1; metadata:attack_target Server, deployment Internal, signature_severity Major, created_at 2017_05_17, performance_impact Moderate, updated_at 2017_05_17;) + +alert tcp any any -> $HOME_NET 445 (msg:"ET EXPLOIT Samba Arbitrary Module Loading Vulnerability (.so file write to share) (CVE-2017-7494)"; flow:to_server,established; content:"SMB|2d 00|"; offset:5; depth:5; content:"|00 00|"; distance:1; within:2; content:"|12 00|"; distance:40; within:2; content:"|2e|so|00|"; fast_pattern; distance:16; metadata: former_category EXPLOIT; reference:cve,2017-7494; reference:url,github.com/rapid7/metasploit-framework/pull/8450; classtype:attempted-admin; sid:2024335; rev:1; metadata:attack_target SMB_Server, deployment Datacenter, signature_severity Critical, created_at 2017_05_25, performance_impact Low, updated_at 2017_05_25;) + +alert tcp any any -> $HOME_NET 445 (msg:"ET EXPLOIT Samba Arbitrary Module Loading Vulnerability (NT Create AndX .so) (CVE-2017-7494)"; flow:to_server,established; content:"SMB|a2 00|"; offset:5; depth:5; content:"|00 00|"; distance:1; within:2; content:"|2e|so|00|"; fast_pattern; distance:16; metadata: former_category EXPLOIT; reference:cve,2017-7494; reference:url,github.com/rapid7/metasploit-framework/pull/8450; classtype:attempted-admin; sid:2024336; rev:1; metadata:attack_target SMB_Server, deployment Datacenter, signature_severity Critical, created_at 2017_05_25, performance_impact Low, updated_at 2017_05_25;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Possible $MFT NTFS Device Access in HTTP Response"; flow:from_server,established; content:"file://"; content:"/$MFT/"; distance:0; fast_pattern; content:"src"; pcre:"/^\s*=\s*[^>]*file\x3a[^>]*\/\x24MFT\//Ris"; metadata: former_category EXPLOIT; reference:url,www.securitytracker.com/id/1038575; classtype:trojan-activity; sid:2024337; rev:2; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, attack_target Client_Endpoint, deployment Perimeter, signature_severity Major, created_at 2017_05_30, performance_impact Moderate, updated_at 2017_05_30;) + +alert udp any any -> $HOME_NET 50000 (msg:"ET EXPLOIT Win32/Industroyer DDOS Siemens SIPROTEC (CVE-2015-5374)"; dsize:18; content:"|11 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 28 9E|"; fast_pattern:only; metadata: former_category EXPLOIT; reference:url,www.welivesecurity.com/wp-content/uploads/2017/06/Win32_Industroyer.pdf; classtype:attempted-dos; sid:2024376; rev:1; metadata:attack_target Client_and_Server, deployment Perimeter, deployment Internal, signature_severity Major, created_at 2017_06_12, performance_impact Low, updated_at 2017_06_12;) + +alert tcp any any -> $HOME_NET 445 (msg:"ET EXPLOIT Samba Arbitrary Module Loading Vulnerability M2 (NT Create AndX .so) (CVE-2017-7494)"; flow:to_server,established; content:"SMB"; offset:5; depth:3; content:"|05 00|"; distance:8; within:2; content:"|00 2e 00 73 00 6f 00|"; distance:0; fast_pattern; isdataat:!1,relative; metadata: former_category EXPLOIT; reference:cve,2017-7494; classtype:attempted-admin; sid:2024384; rev:1; metadata:affected_product Linux, attack_target Server, deployment Perimeter, deployment Internal, signature_severity Major, created_at 2017_06_16, performance_impact Moderate, updated_at 2017_06_16;) + +alert tcp any any -> $HOME_NET 9100 (msg:"ET EXPLOIT HP Printer Attempted Path Traversal via PJL"; flow:to_server,established; content:"@PJL FS"; depth:7; content:"NAME="; distance:0; pcre:"/^\s*[\x22\x27][^\x22\x27]{0,128}\x2e\x2e/Ri"; metadata: former_category EXPLOIT; reference:url,www.tenable.com/blog/rooting-a-printer-from-security-bulletin-to-remote-code-execution; reference:cve,2017-2741; classtype:attempted-admin; sid:2024404; rev:2; metadata:attack_target IoT, deployment Internal, signature_severity Major, created_at 2017_06_16, performance_impact Moderate, updated_at 2017_06_20;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Possible SharePoint XSS (CVE-2017-8514) Inbound"; flow:to_server,established; content:"FollowSite="; http_uri; nocase; fast_pattern; content:"SiteName="; http_uri; nocase; content:"-confirm"; http_uri; nocase; distance:0; metadata: former_category EXPLOIT; reference:url,respectxss.blogspot.fr/2017/06/a-look-at-cve-2017-8514-sharepoints.html; classtype:attempted-user; sid:2024412; rev:2; metadata:affected_product HTTP_Server, attack_target Server, deployment Internal, signature_severity Major, created_at 2017_06_19, performance_impact Moderate, updated_at 2017_06_19;) + +alert smb any any -> $HOME_NET any (msg:"ET EXPLOIT Possible ETERNALBLUE Exploit M3 MS17-010"; flow:to_server,established; content:"|ff|SMB|32 00 00 00 00 18 07 c0|"; offset:4; depth:12; content:"|00 00 00 00 00 00 00 00 00 00 00 08 ff fe 00 08|"; distance:2; within:16; fast_pattern; content:"|0f 0c 00 00 10 01 00 00 00 00 00 00 00 f2 00 00 00 00 00 0c 00 42 00 00 10 4e 00 01 00 0e 00 0d 10 00|"; distance:2; within:34; isdataat:1000,relative; threshold: type both, track by_src, count 10, seconds 1; metadata: former_category EXPLOIT; classtype:trojan-activity; sid:2024430; rev:3; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, attack_target Client_Endpoint, deployment Perimeter, deployment Internal, signature_severity Critical, created_at 2017_06_27, updated_at 2017_07_06;) + +alert tcp $HOME_NET any -> $HOME_NET 42 (msg:"ET EXPLOIT Possible WINS Server Remote Memory Corruption Vulnerability"; flow:to_server,established; dsize:48; content:"|00 00 78 00|"; offset:4; depth:4; content:"|00 00 00 05|"; offset:16; depth:4; fast_pattern; threshold: type both, count 3, seconds 1, track by_src; metadata: former_category EXPLOIT; reference:url,blog.fortinet.com/2017/06/14/wins-server-remote-memory-corruption-vulnerability-in-microsoft-windows-server; classtype:attempted-user; sid:2024435; rev:1; metadata:affected_product Windows_DNS_server, attack_target DNS_Server, deployment Datacenter, signature_severity Major, created_at 2017_06_29, performance_impact Low, updated_at 2017_06_29;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET EXPLOIT Ubiquiti Networks UniFi Cloud Key Firm v0.6.1 Host Remote Command Execution attempt"; flow:to_server,established; content:"GET"; nocase; http_method; urilen:7; content:"/status"; http_uri; fast_pattern; content:"Host|3a|"; nocase; http_header; content:"|3b|"; http_header; within:50; distance:0; pcre:"/^Host\x3a[^\n]{0,50}?\x3b/Hmi"; metadata: former_category EXPLOIT; reference:url,cxsecurity.com/issue/WLB-2017080038; classtype:web-application-attack; sid:2024548; rev:2; metadata:affected_product Linux, attack_target IoT, deployment Perimeter, signature_severity Major, created_at 2017_08_14, performance_impact Moderate, updated_at 2017_08_14;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Apache Struts 2 REST Plugin XStream RCE (ProcessBuilder)"; flow:to_server,established; content:"java.lang.ProcessBuilder"; nocase; http_client_body; fast_pattern; content:"]/RPs"; metadata: former_category EXPLOIT; reference:cve,2017-9805; reference:url,lgtm.com/blog/apache_struts_CVE-2017-9805_announcement; classtype:attempted-user; sid:2024663; rev:1; metadata:affected_product Apache_Struts2, attack_target Web_Server, deployment Perimeter, signature_severity Critical, created_at 2017_09_06, performance_impact Low, updated_at 2017_09_06;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Apache Struts 2 REST Plugin XStream RCE (Runtime.Exec)"; flow:to_server,established; content:"java.lang.Runtime"; nocase; http_client_body; fast_pattern; content:".exec"; distance:0; http_client_body; content:"]/RPs"; metadata: former_category EXPLOIT; reference:cve,2017-9805; reference:url,lgtm.com/blog/apache_struts_CVE-2017-9805_announcement; classtype:attempted-user; sid:2024664; rev:1; metadata:affected_product Apache_Struts2, attack_target Web_Server, deployment Perimeter, signature_severity Critical, created_at 2017_09_06, performance_impact Low, updated_at 2017_09_06;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Apache Struts 2 REST Plugin ysoserial Usage (B64) 1"; flow:to_server,established; content:"POST"; http_method; content:"eXNvc2VyaWFsL"; http_client_body; metadata: former_category EXPLOIT; reference:cve,2017-9805; reference:url,lgtm.com/blog/apache_struts_CVE-2017-9805_announcement; classtype:attempted-user; sid:2024668; rev:2; metadata:affected_product Apache_Struts2, attack_target Web_Server, deployment Datacenter, signature_severity Critical, created_at 2017_09_07, updated_at 2017_09_07;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Apache Struts 2 REST Plugin ysoserial Usage (B64) 2"; flow:to_server,established; content:"POST"; http_method; content:"lzb3NlcmlhbC"; http_client_body; metadata: former_category EXPLOIT; reference:cve,2017-9805; reference:url,lgtm.com/blog/apache_struts_CVE-2017-9805_announcement; classtype:attempted-user; sid:2024669; rev:2; metadata:affected_product Apache_Struts2, attack_target Web_Server, deployment Datacenter, signature_severity Critical, created_at 2017_09_07, updated_at 2017_09_07;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Apache Struts 2 REST Plugin ysoserial Usage (B64) 3"; flow:to_server,established; content:"POST"; http_method; content:"5c29zZXJpYWwv"; http_client_body; metadata: former_category EXPLOIT; reference:cve,2017-9805; reference:url,lgtm.com/blog/apache_struts_CVE-2017-9805_announcement; classtype:attempted-user; sid:2024670; rev:2; metadata:affected_product Apache_Struts2, attack_target Web_Server, deployment Datacenter, signature_severity Critical, created_at 2017_09_07, updated_at 2017_09_07;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Apache Struts 2 REST Plugin (B64) 4"; flow:to_server,established; content:"POST"; http_method; content:"|79 76 36 36 76|"; http_client_body; content:"/struts2-rest-showcase/orders/3"; http_uri; metadata: former_category EXPLOIT; reference:cve,2017-9805; reference:url,lgtm.com/blog/apache_struts_CVE-2017-9805_announcement; classtype:attempted-user; sid:2024671; rev:2; metadata:affected_product Apache_Struts2, attack_target Web_Server, deployment Datacenter, signature_severity Critical, created_at 2017_09_07, updated_at 2017_09_07;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Apache Struts 2 REST Plugin (B64) 5"; flow:to_server,established; content:"POST"; http_method; content:"|72 2b 75 72|"; http_client_body; content:"/struts2-rest-showcase/orders/3"; http_uri; metadata: former_category EXPLOIT; reference:cve,2017-9805; reference:url,lgtm.com/blog/apache_struts_CVE-2017-9805_announcement; classtype:attempted-user; sid:2024672; rev:2; metadata:affected_product Apache_Struts2, attack_target Web_Server, deployment Datacenter, signature_severity Critical, created_at 2017_09_07, updated_at 2017_09_07;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Apache Struts 2 REST Plugin (B64) 6"; flow:to_server,established; content:"POST"; http_method; content:"|4b 2f 72 71 2b|"; http_client_body; content:"/struts2-rest-showcase/orders/3"; http_uri; metadata: former_category EXPLOIT; reference:cve,2017-9805; reference:url,lgtm.com/blog/apache_struts_CVE-2017-9805_announcement; classtype:attempted-user; sid:2024673; rev:2; metadata:affected_product Apache_Struts2, attack_target Web_Server, deployment Datacenter, signature_severity Critical, created_at 2017_09_07, updated_at 2017_09_07;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Apache Struts 2 REST Plugin (Runtime.Exec)"; flow:to_server,established; content:"POST"; http_method; content:"java.lang.Runtime"; nocase; http_client_body; fast_pattern; content:"/struts2-rest-showcase/orders/3"; http_uri; metadata: former_category EXPLOIT; reference:cve,2017-9805; reference:url,lgtm.com/blog/apache_struts_CVE-2017-9805_announcement; classtype:attempted-user; sid:2024674; rev:2; metadata:affected_product Apache_Struts2, attack_target Web_Server, deployment Datacenter, signature_severity Critical, created_at 2017_09_07, updated_at 2017_09_07;) + +alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Apache Struts 2 REST Plugin (ProcessBuilder)"; flow:to_server,established; content:"POST"; http_method; content:"java.lang.ProcessBuilder"; nocase; http_client_body; fast_pattern; content:"/struts2-rest-showcase/orders/3"; http_uri; metadata: former_category EXPLOIT; reference:cve,2017-9805; reference:url,lgtm.com/blog/apache_struts_CVE-2017-9805_announcement; classtype:attempted-user; sid:2024675; rev:2; metadata:affected_product Apache_Struts2, attack_target Web_Server, deployment Datacenter, signature_severity Critical, created_at 2017_09_07, updated_at 2017_09_07;) + +# Published by NCC Group's Cyber Defence team +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"Possible Office 0-day, RTF content with HTA header"; flow:established,from_server; content:"Content-Type|3a 20|application/hta|0d 0a|"; http_header; file_data; content:"|7b 5c 72 74|"; within: 128; classtype:trojan-activity; sid:1; rev:1;) + +alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg: "NCC Group - Trojan - Red Leaves magic packet detected (APT10 implant)"; flow:established,to_server; dsize:12; content:"|7a 8d 9b dc|"; offset: 4; depth: 4; flowbits:set,ncc.apt10.beacon_send; threshold:type limit, track by_src, count 1, seconds 600; classtype:trojan-activity; priority:1; sid:1; rev:1;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg: "NCC Group - Trojan - Red Leaves magic packet response detected (APT10 implant)"; flowbits:isset,ncc.apt10.beacon_send; flow:established,to_client; dsize:12; content:"|7a 8d 9b dc|"; offset: 4; depth: 4;threshold:type limit, track by_dst, count 1, seconds 600; classtype:trojan-activity; sid:2; rev:1;) + + + +#################### +### NetSec Rules ### +#################### + +alert tls any any -> any any (msg:"SURICATA TLS overflow heartbeat encountered, possible exploit attempt (heartbleed)"; flow:established; app-layer-event:tls.overflow_heartbeat_message; flowint:tls.anomaly.count,+,1; classtype:protocol-command-decode; reference:cve,2014-0160; sid:2230012; rev:1;) +alert tls any any -> any any (msg:"SURICATA TLS invalid heartbeat encountered, possible exploit attempt (heartbleed)"; flow:established; app-layer-event:tls.invalid_heartbeat_message; flowint:tls.anomaly.count,+,1; classtype:protocol-command-decode; reference:cve,2014-0160; sid:2230013; rev:1;) diff --git a/code/chef/templates/centos/emerging-shellcode.rules.erb b/code/chef/templates/centos/emerging-shellcode.rules.erb new file mode 100755 index 0000000..3d6e7f4 --- /dev/null +++ b/code/chef/templates/centos/emerging-shellcode.rules.erb @@ -0,0 +1,409 @@ +# Emerging Threats +# +# This distribution may contain rules under two different licenses. +# +# Rules with sids 1 through 3464, and 100000000 through 100000908 are under the GPLv2. +# A copy of that license is available at http://www.gnu.org/licenses/gpl-2.0.html +# +# Rules with sids 2000000 through 2799999 are from Emerging Threats and are covered under the BSD License +# as follows: +# +#************************************************************* +# Copyright (c) 2003-2017, Emerging Threats +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +# following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +# disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +# following disclaimer in the documentation and/or other materials provided with the distribution. +# * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +#************************************************************* +# +# +# +# + +# This Ruleset is EmergingThreats Open optimized for suricata-1.3-enhanced. + +#alert tcp any any -> any any (msg:"ET SHELLCODE Bindshell2 Decoder Shellcode"; flow:established; content:"|53 53 53 53 53 43 53 43 53 FF D0 66 68|"; content:"|66 53 89 E1 95 68 A4 1A|"; distance:0; reference:url,doc.emergingthreats.net/2009246; classtype:shellcode-detect; sid:2009246; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert udp any any -> any any (msg:"ET SHELLCODE Bindshell2 Decoder Shellcode (UDP)"; content:"|53 53 53 53 53 43 53 43 53 FF D0 66 68|"; content:"|66 53 89 E1 95 68 A4 1A|"; distance:0; reference:url,doc.emergingthreats.net/2009285; classtype:shellcode-detect; sid:2009285; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +alert tcp any any -> any any (msg:"ET SHELLCODE Rothenburg Shellcode"; flow:established; content:"|D9 74 24 F4 5B 81 73 13|"; content:"|83 EB FC E2 F4|"; distance:0; reference:url,doc.emergingthreats.net/2009247; classtype:shellcode-detect; sid:2009247; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Rothenburg Shellcode (UDP)"; content:"|D9 74 24 F4 5B 81 73 13|"; content:"|83 EB FC E2 F4|"; distance:0; reference:url,doc.emergingthreats.net/2009284; classtype:shellcode-detect; sid:2009284; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Lindau (linkbot) xor Decoder Shellcode"; flow:established; content:"|EB 15 B9|"; content:"|81 F1|"; distance:0; content:"|80 74 31 FF|"; distance:0; content:"|E2 F9 EB 05 E8 E6 FF FF FF|"; reference:url,doc.emergingthreats.net/2009248; classtype:shellcode-detect; sid:2009248; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Lindau (linkbot) xor Decoder Shellcode (UDP)"; content:"|EB 15 B9|"; content:"|81 F1|"; distance:0; content:"|80 74 31 FF|"; distance:0; content:"|E2 F9 EB 05 E8 E6 FF FF FF|"; reference:url,doc.emergingthreats.net/2009283; classtype:shellcode-detect; sid:2009283; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Adenau Shellcode"; flow:established; content:"|eb 19 5e 31 c9 81 e9|"; content:"|81 36|"; distance:0; content:"|81 ee fc ff ff ff|"; distance:0; reference:url,doc.emergingthreats.net/2009249; classtype:shellcode-detect; sid:2009249; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Adenau Shellcode (UDP)"; content:"|eb 19 5e 31 c9 81 e9|"; content:"|81 36|"; distance:0; content:"|81 ee fc ff ff ff|"; distance:0; reference:url,doc.emergingthreats.net/2009282; classtype:shellcode-detect; sid:2009282; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Mainz/Bielefeld Shellcode"; flow:established; content:"|33 c9 66 b9|"; content:"|80 34|"; distance:0; content:"|eb 05 e8 eb ff ff ff|"; distance:0; reference:url,doc.emergingthreats.net/2009250; classtype:shellcode-detect; sid:2009250; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Mainz/Bielefeld Shellcode (UDP)"; content:"|33 c9 66 b9|"; content:"|80 34|"; distance:0; content:"|eb 05 e8 eb ff ff ff|"; distance:0; reference:url,doc.emergingthreats.net/2009281; classtype:shellcode-detect; sid:2009281; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Wuerzburg Shellcode"; flow:established; content:"|eb 27|"; content:"|5d 33 c9 66 b9|"; distance:0; content:"|8d 75 05 8b fe 8a 06 3c|"; distance:0; content:"|75 05 46 8a 06|"; distance:0; content:"|88 07 47 e2 ed eb 0a e8 da ff ff ff|"; distance:0; reference:url,doc.emergingthreats.net/2009251; classtype:shellcode-detect; sid:2009251; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Wuerzburg Shellcode (UDP)"; content:"|eb 27|"; content:"|5d 33 c9 66 b9|"; distance:0; content:"|8d 75 05 8b fe 8a 06 3c|"; distance:0; content:"|75 05 46 8a 06|"; distance:0; content:"|88 07 47 e2 ed eb 0a e8 da ff ff ff|"; distance:0; reference:url,doc.emergingthreats.net/2009280; classtype:shellcode-detect; sid:2009280; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Schauenburg Shellcode"; flow:established; content:"|eb 0f 8b 34 24 33 c9 80 c1|"; content:"|80 36|"; distance:0; content:"|46 e2 fa c3 e8 ec|"; distance:0; reference:url,doc.emergingthreats.net/2009252; classtype:shellcode-detect; sid:2009252; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Schauenburg Shellcode (UDP)"; content:"|eb 0f 8b 34 24 33 c9 80 c1|"; content:"|80 36|"; distance:0; content:"|46 e2 fa c3 e8 ec|"; distance:0; reference:url,doc.emergingthreats.net/2009279; classtype:shellcode-detect; sid:2009279; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Koeln Shellcode"; flow:established; content:"|eb 0f 8b 34 24 33 c9 80 c1|"; content:"|80 36|"; distance:0; content:"|46 e2 fa c3 e8 ec|"; distance:0; reference:url,doc.emergingthreats.net/2009253; classtype:shellcode-detect; sid:2009253; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Koeln Shellcode (UDP)"; content:"|eb 0f 8b 34 24 33 c9 80 c1|"; content:"|80 36|"; distance:0; content:"|46 e2 fa c3 e8 ec|"; distance:0; reference:url,doc.emergingthreats.net/2009278; classtype:shellcode-detect; sid:2009278; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Lichtenfels Shellcode"; flow:established; content:"|01 fc ff ff 83 e4 fc 8b ec 33 c9 66 b9|"; content:"|80 30|"; distance:0; content:"|40 e2 fA|"; distance:0; reference:url,doc.emergingthreats.net/2009254; classtype:shellcode-detect; sid:2009254; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Lichtenfels Shellcode (UDP)"; content:"|01 fc ff ff 83 e4 fc 8b ec 33 c9 66 b9|"; content:"|80 30|"; distance:0; content:"|40 e2 fA|"; distance:0; reference:url,doc.emergingthreats.net/2009277; classtype:shellcode-detect; sid:2009277; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Mannheim Shellcode"; flow:established; content:"|80 73 0e|"; content:"|43 e2|"; distance:0; content:"|73 73 73|"; distance:0; content:"|81 86 8c 81|"; distance:0; reference:url,doc.emergingthreats.net/2009255; classtype:shellcode-detect; sid:2009255; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Mannheim Shellcode (UDP)"; content:"|80 73 0e|"; content:"|43 e2|"; distance:0; content:"|73 73 73|"; distance:0; content:"|81 86 8c 81|"; distance:0; reference:url,doc.emergingthreats.net/2009276; classtype:shellcode-detect; sid:2009276; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Berlin Shellcode"; flow:established; content:"|31 c9 b1 fc 80 73 0c|"; content:"|43 e2 8b 9f|"; distance:0; reference:url,doc.emergingthreats.net/2009256; classtype:shellcode-detect; sid:2009256; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Berlin Shellcode (UDP)"; content:"|31 c9 b1 fc 80 73 0c|"; content:"|43 e2 8b 9f|"; distance:0; reference:url,doc.emergingthreats.net/2009275; classtype:shellcode-detect; sid:2009275; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Leimbach Shellcode"; flow:established; content:"|5b 31 c9 b1|"; content:"|80 73|"; distance:0; content:"|43 e2|"; distance:0; reference:url,doc.emergingthreats.net/2009257; classtype:shellcode-detect; sid:2009257; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Leimbach Shellcode (UDP)"; content:"|5b 31 c9 b1|"; content:"|80 73|"; distance:0; content:"|43 e2|"; distance:0; reference:url,doc.emergingthreats.net/2009274; classtype:shellcode-detect; sid:2009274; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Aachen Shellcode"; flow:established; content:"|8b 45 04 35|"; content:"|89 45 04 66 8b 45 02 66 35|"; distance:0; content:"|66 89 45 02|"; distance:0; reference:url,doc.emergingthreats.net/2009258; classtype:shellcode-detect; sid:2009258; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Aachen Shellcode (UDP)"; content:"|8b 45 04 35|"; content:"|89 45 04 66 8b 45 02 66 35|"; distance:0; content:"|66 89 45 02|"; distance:0; reference:url,doc.emergingthreats.net/2009273; classtype:shellcode-detect; sid:2009273; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Furth Shellcode"; flow:established; content:"|31 c9 66 b9|"; content:"|80 73|"; distance:0; content:"|43 e2 1f|"; distance:0; reference:url,doc.emergingthreats.net/2009259; classtype:shellcode-detect; sid:2009259; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Furth Shellcode (UDP)"; content:"|31 c9 66 b9|"; content:"|80 73|"; distance:0; content:"|43 e2 1f|"; distance:0; reference:url,doc.emergingthreats.net/2009272; classtype:shellcode-detect; sid:2009272; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Langenfeld Shellcode"; flow:established; content:"|eb 0f 5b 33 c9 66 b9|"; content:"|80 33|"; distance:0; content:"|43 e2 fa eb|"; distance:0; reference:url,doc.emergingthreats.net/2009260; classtype:shellcode-detect; sid:2009260; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Langenfeld Shellcode (UDP)"; content:"|eb 0f 5b 33 c9 66 b9|"; content:"|80 33|"; distance:0; content:"|43 e2 fa eb|"; distance:0; reference:url,doc.emergingthreats.net/2009271; classtype:shellcode-detect; sid:2009271; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Bonn Shellcode"; flow:established; content:"|31 c9 81 e9|"; content:"|83 eb|"; distance:0; content:"|80 73|"; distance:0; content:"|43 e2 f9|"; distance:0; reference:url,doc.emergingthreats.net/2009261; classtype:shellcode-detect; sid:2009261; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Bonn Shellcode (UDP)"; content:"|31 c9 81 e9|"; content:"|83 eb|"; distance:0; content:"|80 73|"; distance:0; content:"|43 e2 f9|"; distance:0; reference:url,doc.emergingthreats.net/2009270; classtype:shellcode-detect; sid:2009270; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Siegburg Shellcode"; flow:established; content:"|31 eb 80 eb|"; content:"|58 80 30|"; distance:0; content:"|40 81 38|"; distance:0; reference:url,doc.emergingthreats.net/2009262; classtype:shellcode-detect; sid:2009262; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Siegburg Shellcode (UDP)"; content:"|31 eb 80 eb|"; content:"|58 80 30|"; distance:0; content:"|40 81 38|"; distance:0; reference:url,doc.emergingthreats.net/2009269; classtype:shellcode-detect; sid:2009269; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Plain1 Shellcode"; flow:established; content:"|89 e1 cd|"; content:"|5b 5d 52 66 bd|"; distance:0; content:"|0f cd 09 dd 55 6a|"; distance:0; content:"|51 50|"; distance:0; reference:url,doc.emergingthreats.net/2009263; classtype:shellcode-detect; sid:2009263; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Plain1 Shellcode (UDP)"; content:"|89 e1 cd|"; content:"|5b 5d 52 66 bd|"; distance:0; content:"|0f cd 09 dd 55 6a|"; distance:0; content:"|51 50|"; distance:0; reference:url,doc.emergingthreats.net/2009268; classtype:shellcode-detect; sid:2009268; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Plain2 Shellcode"; flow:established; content:"|50 50 50 50 40 50 40 50 ff 56 1c 8b d8 57 57 68 02|"; content:"|8b cc 6a|"; distance:0; content:"|51 53|"; distance:0; reference:url,doc.emergingthreats.net/2009264; classtype:shellcode-detect; sid:2009264; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Plain2 Shellcode (UDP)"; content:"|50 50 50 50 40 50 40 50 ff 56 1c 8b d8 57 57 68 02|"; content:"|8b cc 6a|"; distance:0; content:"|51 53|"; distance:0; reference:url,doc.emergingthreats.net/2009267; classtype:shellcode-detect; sid:2009267; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp any any -> any any (msg:"ET SHELLCODE Bindshell1 Decoder Shellcode"; flow:established; content:"|58 99 89 E1 CD 80 96 43 52 66 68|"; content:"|66 53 89 E1 6A 66 58 50 51 56|"; distance:0; reference:url,doc.emergingthreats.net/2009265; classtype:shellcode-detect; sid:2009265; rev:3; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert udp any any -> any any (msg:"ET SHELLCODE Bindshell1 Decoder Shellcode (UDP)"; content:"|58 99 89 E1 CD 80 96 43 52 66 68|"; content:"|66 53 89 E1 6A 66 58 50 51 56|"; distance:0; reference:url,doc.emergingthreats.net/2009266; classtype:shellcode-detect; sid:2009266; rev:2; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Possible UTF-8 encoded Shellcode Detected"; flow:from_server,established; content:"%u"; nocase; isdataat:2; content:!"|0A|"; within:2; content:!"|20|"; within:2; pcre:"/(%U([0-9a-f]{2})){6}/i"; reference:url,doc.emergingthreats.net/bin/view/Main/2003173; classtype:trojan-activity; sid:2003173; rev:7; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Possible UTF-16 encoded Shellcode Detected"; flow:from_server,established; content:"%u"; nocase; isdataat:4; content:!"|0A|"; within:4; content:!"|20|"; within:4; pcre:"/(%U([0-9a-f]{4})){6}/i"; reference:url,doc.emergingthreats.net/bin/view/Main/2003174; classtype:trojan-activity; sid:2003174; rev:8; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE x86 PexFnstenvMov/Sub Encoder"; flow:established; content:"|D9 EE D9 74 24 F4 5B 81 73 13|"; content:"|83 EB FC E2 F4|"; distance: 4; within: 5; reference:url,doc.emergingthreats.net/bin/view/Main/2002903; classtype:shellcode-detect; sid:2002903; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE x86 Alpha2 GetEIPs Encoder"; flow:established; content:"|EB 03 59 EB 05 E8 F8 FF FF FF|"; reference:url,doc.emergingthreats.net/bin/view/Main/2002904; classtype:shellcode-detect; sid:2002904; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE x86 Countdown Encoder"; flow:established; content:"|E8 FF FF FF FF C1 5E 30 4C 0E 07 E2 FA|"; reference:url,doc.emergingthreats.net/bin/view/Main/2002905; classtype:shellcode-detect; sid:2002905; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE x86 PexAlphaNum Encoder"; flow:established; content:"VTX630VXH49HHHPhYAAQhZYYYYAAQQDDDd36FFFFTXVj0PPTUPPa301089"; content:"JJJJJ"; distance: 2; within: 5; content:"VTX630VX4A0B6HH0B30BCVX2BDBH4A2AD0ADTBDQB0ADAVX4Z8BDJOM"; distance: 2; within: 55; reference:url,doc.emergingthreats.net/bin/view/Main/2002906; classtype:shellcode-detect; sid:2002906; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE x86 PexCall Encoder"; flow:established; content:"|E8 FF FF FF FF C0 5E 81 76 0E|"; content:"|82 EE FC E2 F4|"; distance: 4; within: 5; reference:url,doc.emergingthreats.net/bin/view/Main/2002907; classtype:shellcode-detect; sid:2002907; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE x86 JmpCallAdditive Encoder"; flow:established; content:"|FC BB|"; content:"|EB 0C 5E 56 31 1E AD 01 C3 85 C0 75 F7 C3 E8 EF FF FF FF|"; distance: 4; within: 19; reference:url,doc.emergingthreats.net/bin/view/Main/2002908; classtype:shellcode-detect; sid:2002908; rev:5; metadata:created_at 2010_07_30, updated_at 2010_07_30;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell"; content:"|83 e9 ec d9 ee d9 74 24 f4 5b 81 73 13|"; reference:url,doc.emergingthreats.net/2010383; classtype:shellcode-detect; sid:2010383; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Countdown Encoded 2)"; content:"|82 ed 5f 4c 5d 52 43 78 03 d9 95 8f 84 49 4a 48 71 74 45 d3|"; reference:url,doc.emergingthreats.net/2010385; classtype:shellcode-detect; sid:2010385; rev:4; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Countdown Encoded 3)"; content:"|9f 90 4b ef a3 76 76 74 97 36 e4 aa bc 46 2f 77 45 6a 69 63|"; reference:url,doc.emergingthreats.net/2010386; classtype:shellcode-detect; sid:2010386; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Countdown Encoded 4)"; content:"|64 65 f8 b6 7e 41 cc 6a 53 13 12 4d 57 28 6e 20 2a 2a cc a5|"; reference:url,doc.emergingthreats.net/2010387; classtype:shellcode-detect; sid:2010387; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Countdown Encoded 5)"; content:"|17 1c 1a 19 fb 77 80 ce|"; reference:url,doc.emergingthreats.net/2010388; classtype:shellcode-detect; sid:2010388; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Pex Encoded 1)"; content:"|c9 83 e9 ec e8 ff ff ff ff c0 5e 81 76 0e|"; reference:url,doc.emergingthreats.net/2010389; classtype:shellcode-detect; sid:2010389; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Pex Encoded 2)"; content:"|83 ee fc e2 f4|"; reference:url,doc.emergingthreats.net/2010390; classtype:shellcode-detect; sid:2010390; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Not Encoded 1)"; content:"|6a 61 58 99 52 68 10 02|"; reference:url,doc.emergingthreats.net/2010391; classtype:shellcode-detect; sid:2010391; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Not Encoded 2)"; content:"|89 e1 52 42 52 42 52 6a 10 cd 80 99 93 51 53 52 6a 68 58 cd|"; reference:url,doc.emergingthreats.net/2010392; classtype:shellcode-detect; sid:2010392; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Not Encoded 3)"; content:"|80 b0 6a cd 80 52 53 52 b0 1e cd 80 97 6a 02 59 6a 5a 58 51|"; reference:url,doc.emergingthreats.net/2010393; classtype:shellcode-detect; sid:2010393; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Not Encoded 4)"; content:"|57 51 cd 80 49 79 f5 50 68 2f 2f 73 68 68 2f 62 69 6e 89 e3|"; reference:url,doc.emergingthreats.net/2010394; classtype:shellcode-detect; sid:2010394; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Not Encoded 5)"; content:"|50 54 53 53 b0 3b cd 80|"; reference:url,doc.emergingthreats.net/2010395; classtype:shellcode-detect; sid:2010395; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Pex Alphanumeric Encoded 1)"; content:"|eb 03 59 eb 05 e8 f8 ff ff ff 4f 49 49 49 49 49 49 51 5a 56|"; reference:url,doc.emergingthreats.net/2010396; classtype:shellcode-detect; sid:2010396; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Pex Alphanumeric Encoded 2)"; content:"|54 58 36 33 30 56 58 34 41 30 42 36 48 48 30 42 33 30 42 43|"; reference:url,doc.emergingthreats.net/2010397; classtype:shellcode-detect; sid:2010397; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Pex Alphanumeric Encoded 3)"; content:"|56 58 32 42 44 42 48 34 41 32 41 44 30 41 44 54 42 44 51 42|"; reference:url,doc.emergingthreats.net/2010398; classtype:shellcode-detect; sid:2010398; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Pex Alphanumeric Encoded 4)"; content:"|30 41 44 41 56 58 34 5a 38 42 44 4a 4f 4d 4c 36 41|"; reference:url,doc.emergingthreats.net/2010399; classtype:shellcode-detect; sid:2010399; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Pex Alphanumeric Encoded 5)"; content:"|41 4e 44 35 44 34 44|"; reference:url,doc.emergingthreats.net/2010400; classtype:shellcode-detect; sid:2010400; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (PexFstEnvMov Encoded 1)"; content:"|6a 14 59 d9 ee d9 74 24 f4 5b 81 73 13|"; reference:url,doc.emergingthreats.net/2010401; classtype:shellcode-detect; sid:2010401; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (PexFstEnvMov Encoded 2)"; content:"|83 eb fc e2 f4|"; reference:url,doc.emergingthreats.net/2010402; classtype:shellcode-detect; sid:2010402; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (JmpCallAdditive Encoded)"; content:"|eb 0c 5e 56 31 1e ad 01 c3 85 c0 75 f7 c3 e8 ef ff ff ff|"; reference:url,doc.emergingthreats.net/2010403; classtype:shellcode-detect; sid:2010403; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Alpha2 Encoded 1)"; content:"|eb 03 59 eb 05 e8 f8 ff ff ff 49 49 49 49 49 49 49 49 49 49|"; reference:url,doc.emergingthreats.net/2010404; classtype:shellcode-detect; sid:2010404; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Alpha2 Encoded 2)"; content:"|41 42 32 42 41 32 41 41 30 41 41 58|"; reference:url,doc.emergingthreats.net/2010405; classtype:shellcode-detect; sid:2010405; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Bind shell (Alpha2 Encoded 3)"; content:"|49 72 4e 4e 69 6b 53|"; reference:url,doc.emergingthreats.net/2010406; classtype:shellcode-detect; sid:2010406; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (PexFnstenvSub Encoded 1)"; content:"|c9 83 e9 ef d9 ee d9 74 24 f4 5b 81 73 13|"; reference:url,doc.emergingthreats.net/2010407; classtype:shellcode-detect; sid:2010407; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (Countdown Encoded 1)"; content:"|6a 43 59 e8 ff ff ff ff c1 5e 30 4c 0e 07 e2 fa 6b 63 5b 9d|"; reference:url,doc.emergingthreats.net/2010409; classtype:shellcode-detect; sid:2010409; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (Countdown Encoded 2)"; content:"|9f f6 72 09 4b 4b 4d 8a 74 7d 78 ec a2 49 26 7c 96 7d 79 7e|"; reference:url,doc.emergingthreats.net/2010410; classtype:shellcode-detect; sid:2010410; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (Countdown Encoded 3)"; content:"|7b e6 ac 64 57 d9 60 59 1d 1c 47 5d 5e 18 5a 50 54 b2 df 6d|"; reference:url,doc.emergingthreats.net/2010411; classtype:shellcode-detect; sid:2010411; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (Countdown Encoded 4)"; content:"|57 44 55 4a 5b 62|"; reference:url,doc.emergingthreats.net/2010412; classtype:shellcode-detect; sid:2010412; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (Pex Encoded 1)"; content:"|c9 83 e9 ef e8 ff ff ff ff c0 5e 81 76 0e|"; reference:url,doc.emergingthreats.net/2010413; classtype:shellcode-detect; sid:2010413; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (Pex Encoded 2)"; content:"|83 ee fc e2 f4|"; reference:url,doc.emergingthreats.net/2010414; classtype:shellcode-detect; sid:2010414; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (Not Encoded 1)"; content:"|51 cd 80 49 79 f6 50 68 2f 2f 73 68 68 2f 62 69 6e 89 e3 50|"; reference:url,doc.emergingthreats.net/2010415; classtype:shellcode-detect; sid:2010415; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (Not Encoded 2)"; content:"|6a 61 58 99 52 42 52 42 52 68|"; reference:url,doc.emergingthreats.net/2010416; classtype:shellcode-detect; sid:2010416; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (Not Encoded 3)"; content:"|89 e1 6a 10 51 50 51 97 6a 62 58 cd 80 6a 02 59 b0 5a 51 57|"; reference:url,doc.emergingthreats.net/2010417; classtype:shellcode-detect; sid:2010417; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (Pex Alphanumeric Encoded 1)"; content:"|44 32 4d 4c 42 48 4a 46 42 31 44 50 50 41 4e 4f 49 38 41 4e|"; reference:url,doc.emergingthreats.net/2010418; classtype:shellcode-detect; sid:2010418; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (Pex Alphanumeric Encoded 2)"; content:"|4c 36 42 41 41 35 42 45 41 35 47 59 4c 36 44 56 4a 35 4d 4c|"; reference:url,doc.emergingthreats.net/2010419; classtype:shellcode-detect; sid:2010419; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (Pex Alphanumeric Encoded 3)"; content:"|56 58 32 42 44 42 48 34 41 32 41 44 30 41 44 54 42 44 51 42|"; reference:url,doc.emergingthreats.net/2010420; classtype:shellcode-detect; sid:2010420; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (PexFnstenvMov Encoded 1)"; content:"|6a 11 59 d9 ee d9 74 24 f4 5b 81 73 13|"; reference:url,doc.emergingthreats.net/2010421; classtype:shellcode-detect; sid:2010421; rev:3; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (JmpCallAdditive Encoded 1)"; content:"|eb 0c 5e 56 31 1e ad 01 c3 85 c0 75 f7 c3 e8 ef ff ff ff|"; reference:url,doc.emergingthreats.net/2010423; classtype:shellcode-detect; sid:2010423; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (Alpha2 Encoded 1)"; content:"|49 49 49 49 49 49 49 51 5a 6a|"; reference:url,doc.emergingthreats.net/2010424; classtype:shellcode-detect; sid:2010424; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (Alpha2 Encoded 2)"; content:"|58 50 30 42 31 41 42 6b 42 41|"; reference:url,doc.emergingthreats.net/2010425; classtype:shellcode-detect; sid:2010425; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD Reverse shell (Alpha2 Encoded 3)"; content:"|32 41 41 30 41 41 58 50 38 42 42 75|"; reference:url,doc.emergingthreats.net/2010426; classtype:shellcode-detect; sid:2010426; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD SPARC Bind shell (SPARC Encoded 1)"; content:"|20 bf ff ff 20 bf ff ff 7f ff ff ff ea 03 e0 20 aa 9d 40 11|"; reference:url,doc.emergingthreats.net/2010427; classtype:shellcode-detect; sid:2010427; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD SPARC Bind shell (SPARC Encoded 2)"; content:"|ea 23 e0 20 a2 04 40 15 81 db e0 20 12 bf ff fb 9e 03 e0 04|"; reference:url,doc.emergingthreats.net/2010428; classtype:shellcode-detect; sid:2010428; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD SPARC Bind shell (Not Encoded 1)"; content:"|e0 23 bf f0 c0 23 bf f4 92 23 a0 10 94 10 20 10 82 10 20 68|"; reference:url,doc.emergingthreats.net/2010429; classtype:shellcode-detect; sid:2010429; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD SPARC Bind shell (Not Encoded 2)"; content:"|91 d0 20 08 d0 03 bf f8 92 10 20 01 82 10 20 6a 91 d0 20 08|"; reference:url,doc.emergingthreats.net/2010430; classtype:shellcode-detect; sid:2010430; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD SPARC Bind shell (Not Encoded 3)"; content:"|d0 03 bf f8 92 1a 40 09 94 12 40 09 82 10 20 1e 91 d0 20 08|"; reference:url,doc.emergingthreats.net/2010431; classtype:shellcode-detect; sid:2010431; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD SPARC Bind shell (Not Encoded 4)"; content:"|23 0b dc da 90 23 a0 10 92 23 a0 08 e0 3b bf f0 d0 23 bf f8|"; reference:url,doc.emergingthreats.net/2010432; classtype:shellcode-detect; sid:2010432; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD SPARC Reverse shell (Not Encoded 1)"; content:"|9c 2b a0 07 94 1a c0 0b 92 10 20 01 90 10 20 02 82 10 20 61|"; reference:url,doc.emergingthreats.net/2010433; classtype:shellcode-detect; sid:2010433; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD SPARC Reverse shell (Not Encoded 2)"; content:"|91 d0 20 08 d0 23 bf f8 92 10 20 03 92 a2 60 01 82 10 20 5a|"; reference:url,doc.emergingthreats.net/2010434; classtype:shellcode-detect; sid:2010434; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD SPARC Reverse shell (Not Encoded 3)"; content:"|91 d0 20 08 12 bf ff fd d0 03 bf f8 21 3f c0|"; reference:url,doc.emergingthreats.net/2010437; classtype:shellcode-detect; sid:2010437; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD SPARC Reverse shell (SPARC Encoded 1)"; content:"|20 bf ff ff 20 bf ff ff 7f ff ff ff ea 03 e0 20 aa 9d 40 11|"; reference:url,doc.emergingthreats.net/2010435; classtype:shellcode-detect; sid:2010435; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"ET SHELLCODE METASPLOIT BSD SPARC Reverse shell (SPARC Encoded 2)"; content:"|ea 23 e0 20 a2 04 40 15 81 db e0 20 12 bf ff fb 9e 03 e0 04|"; reference:url,doc.emergingthreats.net/2010436; classtype:shellcode-detect; sid:2010436; rev:2; metadata:affected_product Any, attack_target Client_and_Server, deployment Perimeter, deployment Internet, deployment Internal, deployment Datacenter, tag Metasploit, signature_severity Critical, created_at 2010_07_30, updated_at 2016_07_01;) + +alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE AIX NOOP"; content:"O|FF FB 82|O|FF FB 82|O|FF FB 82|O|FF FB 82|"; classtype:shellcode-detect; sid:2100640; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE Digital UNIX NOOP"; content:"G|FF 04 1F|G|FF 04 1F|G|FF 04 1F|G|FF 04 1F|"; reference:arachnids,352; classtype:shellcode-detect; sid:2100641; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE HP-UX NOOP"; content:"|08|!|02 80 08|!|02 80 08|!|02 80 08|!|02 80|"; reference:arachnids,358; classtype:shellcode-detect; sid:2100642; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE HP-UX NOOP"; content:"|0B|9|02 80 0B|9|02 80 0B|9|02 80 0B|9|02 80|"; reference:arachnids,359; classtype:shellcode-detect; sid:2100643; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE Linux shellcode"; content:"|90 90 90 E8 C0 FF FF FF|/bin/sh"; reference:arachnids,343; classtype:shellcode-detect; sid:2100652; rev:10; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE SGI NOOP"; content:"|03 E0 F8|%|03 E0 F8|%|03 E0 F8|%|03 E0 F8|%"; reference:arachnids,356; classtype:shellcode-detect; sid:2100638; rev:6; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE SGI NOOP"; content:"|24 0F 12|4|24 0F 12|4|24 0F 12|4|24 0F 12|4"; reference:arachnids,357; classtype:shellcode-detect; sid:2100639; rev:6; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE sparc NOOP"; content:"|13 C0 1C A6 13 C0 1C A6 13 C0 1C A6 13 C0 1C A6|"; reference:arachnids,345; classtype:shellcode-detect; sid:2100644; rev:6; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE sparc NOOP"; content:"|80 1C|@|11 80 1C|@|11 80 1C|@|11 80 1C|@|11|"; reference:arachnids,353; classtype:shellcode-detect; sid:2100645; rev:6; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE sparc NOOP"; content:"|A6 1C C0 13 A6 1C C0 13 A6 1C C0 13 A6 1C C0 13|"; reference:arachnids,355; classtype:shellcode-detect; sid:2100646; rev:6; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE sparc setuid 0"; content:"|82 10| |17 91 D0| |08|"; reference:arachnids,282; classtype:system-call-detect; sid:2100647; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE x86 0x71FB7BAB NOOP unicode"; content:"q|00 FB 00|{|00 AB 00|q|00 FB 00|{|00 AB 00|q|00 FB 00|{|00 AB 00|q|00 FB 00|{|00 AB 00|"; classtype:shellcode-detect; sid:2102313; rev:3; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE x86 0x71FB7BAB NOOP"; content:"q|FB|{|AB|q|FB|{|AB|q|FB|{|AB|q|FB|{|AB|"; classtype:shellcode-detect; sid:2102312; rev:3; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE x86 0x90 NOOP unicode"; content:"|90 00 90 00 90 00 90 00 90 00 90 00 90 00 90 00|"; classtype:shellcode-detect; sid:2102314; rev:4; metadata:created_at 2010_09_23, updated_at 2016_09_09;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE x86 0x90 unicode NOOP"; content:"|90 00 90 00 90 00 90 00 90 00|"; classtype:shellcode-detect; sid:2100653; rev:10; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE x86 0xEB0C NOOP"; content:"|EB 0C EB 0C EB 0C EB 0C EB 0C EB 0C EB 0C EB 0C|"; fast_pattern:only; classtype:shellcode-detect; sid:2101424; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE x86 NOOP"; content:"|90 90 90 90 90 90 90 90 90 90 90 90 90 90|"; depth:128; reference:arachnids,181; classtype:shellcode-detect; sid:2100648; rev:8; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE x86 inc ebx NOOP"; content:"CCCCCCCCCCCCCCCCCCCCCCCC"; metadata: former_category SHELLCODE; classtype:shellcode-detect; sid:2101390; rev:6; metadata:created_at 2010_09_23, updated_at 2017_09_08;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE x86 setgid 0"; content:"|B0 B5 CD 80|"; reference:arachnids,284; classtype:system-call-detect; sid:2100649; rev:9; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE x86 setuid 0"; content:"|B0 17 CD 80|"; reference:arachnids,436; classtype:system-call-detect; sid:2100650; rev:9; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"GPL SHELLCODE x86 stealth NOOP"; content:"|EB 02 EB 02 EB 02|"; metadata: former_category SHELLCODE; reference:arachnids,291; classtype:shellcode-detect; sid:2100651; rev:9; metadata:created_at 2010_09_23, updated_at 2017_09_08;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 22 (msg:"GPL SHELLCODE ssh CRC32 overflow /bin/sh"; flow:to_server,established; content:"/bin/sh"; reference:bugtraq,2347; reference:cve,2001-0144; reference:cve,2001-0572; classtype:shellcode-detect; sid:2101324; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET 22 (msg:"GPL SHELLCODE ssh CRC32 overflow NOOP"; flow:to_server,established; content:"|90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90|"; reference:bugtraq,2347; reference:cve,2001-0144; reference:cve,2001-0572; classtype:shellcode-detect; sid:2101326; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +alert tcp $EXTERNAL_NET any -> $SQL_SERVERS 1433 (msg:"GPL SHELLCODE MSSQL shellcode attempt"; flow:to_server,established; content:"9 |D0 00 92 01 C2 00|R|00|U|00|9 |EC 00|"; fast_pattern:only; classtype:shellcode-detect; sid:2100691; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;) + +#alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Possible Unescape %u Shellcode/Heap Spray"; flow:established,to_client; content:"unescape"; nocase; content:"%u"; nocase; distance:0; content:"%u"; nocase; within:6; pcre:"/unescape.+\x25u[0-9,a-f]{2,4}\x25u[0-9,a-f]{2,4}/smi"; reference:url,www.w3schools.com/jsref/jsref_unescape.asp; reference:url,isc.sans.org/diary.html?storyid=7906; reference:url,isc.sans.org/diary.html?storyid=7903; reference:url,malzilla.sourceforge.net/tutorial01/index.html; reference:url,doc.emergingthreats.net/2011346; classtype:shellcode-detect; sid:2011346; rev:7; metadata:created_at 2010_09_28, updated_at 2010_09_28;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible TCP x86 JMP to CALL Shellcode Detected"; flow:established; content:"|EB|"; byte_jump:1,0,relative; content:"|E8|"; within:1; content:"|FF FF FF|"; distance:1; within:3; content:!"MZ"; content:!"This program cannot be run in DOS mode"; content:!"Windows Program"; reference:url,www.networkforensics.com/2010/05/16/network-detection-of-x86-buffer-overflow-shellcode/; classtype:shellcode-detect; sid:2011803; rev:5; metadata:created_at 2010_10_12, updated_at 2010_10_12;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible UDP x86 JMP to CALL Shellcode Detected"; content:"|EB|"; byte_jump:1,0,relative; content:"|E8|"; within:1; content:"|FF FF FF|"; distance:1; within:3; reference:url,www.networkforensics.com/2010/05/16/network-detection-of-x86-buffer-overflow-shellcode/; classtype:shellcode-detect; sid:2011804; rev:2; metadata:created_at 2010_10_12, updated_at 2010_10_12;) + +alert udp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible Call with No Offset UDP Shellcode"; content:"|E8 00 00 00 00 58|"; reference:url,www.networkforensics.com/2010/05/16/network-detection-of-x86-buffer-overflow-shellcode/; classtype:shellcode-detect; sid:2012087; rev:2; metadata:created_at 2010_12_23, updated_at 2010_12_23;) + +#alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible Call with No Offset TCP Shellcode"; flow:established; content:"|E8 00 00 00 00 8F|"; reference:url,www.networkforensics.com/2010/05/16/network-detection-of-x86-buffer-overflow-shellcode/; classtype:shellcode-detect; sid:2012088; rev:3; metadata:created_at 2010_12_23, updated_at 2016_09_16;) + +#alert udp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible Call with No Offset UDP Shellcode"; content:"|E8 00 00 00 00 8F|"; fast_pattern:only; metadata: former_category SHELLCODE; reference:url,www.networkforensics.com/2010/05/16/network-detection-of-x86-buffer-overflow-shellcode/; classtype:shellcode-detect; sid:2012089; rev:2; metadata:created_at 2010_12_23, updated_at 2017_09_08;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible Call with No Offset TCP Shellcode"; flow:established; content:"|E8 00 00 00 00 0F 1A|"; reference:url,www.networkforensics.com/2010/05/16/network-detection-of-x86-buffer-overflow-shellcode/; classtype:shellcode-detect; sid:2012090; rev:2; metadata:created_at 2010_12_23, updated_at 2010_12_23;) + +alert udp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible Call with No Offset UDP Shellcode"; content:"|E8 00 00 00 00 0F 1A|"; reference:url,www.networkforensics.com/2010/05/16/network-detection-of-x86-buffer-overflow-shellcode/; classtype:shellcode-detect; sid:2012091; rev:3; metadata:created_at 2010_12_23, updated_at 2010_12_23;) + +alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible Call with No Offset TCP Shellcode"; flow:established; content:"|E8 00 00 00 00 0F A9|"; reference:url,www.networkforensics.com/2010/05/16/network-detection-of-x86-buffer-overflow-shellcode/; classtype:shellcode-detect; sid:2012092; rev:2; metadata:created_at 2010_12_23, updated_at 2010_12_23;) + +alert udp $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible Call with No Offset UDP Shellcode"; content:"|E8 00 00 00 00 0F A9|"; reference:url,www.networkforensics.com/2010/05/16/network-detection-of-x86-buffer-overflow-shellcode/; classtype:shellcode-detect; sid:2012093; rev:3; metadata:created_at 2010_12_23, updated_at 2010_12_23;) + +alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Possible UTF-8 %u90 NOP SLED"; flow:established,to_client; content:"%u90%u90"; nocase; reference:url,cansecwest.com/slides07/csw07-nazario.pdf; reference:url,www.sophos.com/security/technical-papers/malware_with_your_mocha.html; reference:url,www.windowsecurity.com/articles/Obfuscated-Shellcode-Part1.html; classtype:shellcode-detect; sid:2012110; rev:3; metadata:created_at 2011_12_28, updated_at 2011_12_28;) + +alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Possible UTF-16 %u9090 NOP SLED"; flow:established,to_client; content:"%u9090%u"; nocase; pcre:"/^[a-f0-9]{4}/Ri"; reference:url,cansecwest.com/slides07/csw07-nazario.pdf; reference:url,www.sophos.com/security/technical-papers/malware_with_your_mocha.html; reference:url,www.windowsecurity.com/articles/Obfuscated-Shellcode-Part1.html; classtype:shellcode-detect; sid:2012111; rev:4; metadata:created_at 2011_12_28, updated_at 2011_12_28;) + +alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Possible Encoded %90 NOP SLED"; flow:established,to_client; content:"%90%90%90%90"; reference:url,cansecwest.com/slides07/csw07-nazario.pdf; reference:url,www.sophos.com/security/technical-papers/malware_with_your_mocha.html; reference:url,www.windowsecurity.com/articles/Obfuscated-Shellcode-Part1.html; classtype:shellcode-detect; sid:2012112; rev:4; metadata:created_at 2011_12_28, updated_at 2011_12_28;) + +#alert tcp $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Possible Usage of Actionscript ByteArray writeByte Function to Build Shellcode"; flow:established,to_client; content:"writeByte(0x"; nocase; pcre:"/writeByte\x280x[a-z,0-9]{2}.+writeByte\x280x[a-z,0-9]{2}.+writeByte\x280x[a-z,0-9]{2}/smi"; reference:url,blog.fireeye.com/research/2009/07/actionscript_heap_spray.html; classtype:shellcode-detect; sid:2012120; rev:2; metadata:created_at 2011_12_30, updated_at 2011_12_30;) + +alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Possible Unescape Encoded Content With Split String Obfuscation"; flow:established,to_client; content:"unescape|28 22|"; content:!"|29|"; within:100; content:"|22| +|0a|"; within:80; content:"|22| +|0a|"; within:80; content:"|22| "; within:80; content:"|22| +|0a|"; within:80; reference:url,cansecwest.com/slides07/csw07-nazario.pdf; reference:url,www.sophos.com/security/technical-papers/malware_with_your_mocha.html; classtype:shellcode-detect; sid:2012196; rev:3; metadata:created_at 2011_01_17, updated_at 2011_01_17;) + +alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Possible Unescape Encoded Content With Split String Obfuscation 2"; flow:established,to_client; content:"unescape|28 27|"; content:!"|29|"; within:100; content:"|27| +|0a|"; within:80; content:"|27| +|0a|"; within:80; content:"|27| +|0a|"; within:80; content:"|27| +|0a|"; within:80; reference:url,cansecwest.com/slides07/csw07-nazario.pdf; reference:url,www.sophos.com/security/technical-papers/malware_with_your_mocha.html; classtype:shellcode-detect; sid:2012197; rev:4; metadata:created_at 2011_01_17, updated_at 2011_01_17;) + +alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Common 0a0a0a0a Heap Spray String"; flow:established,to_client; content:"0a0a0a0a"; nocase; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2012252; rev:3; metadata:created_at 2011_02_02, updated_at 2011_02_02;) + +#alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Common %0a%0a%0a%0a Heap Spray String"; flow:established,to_client; content:"%0a%0a%0a%0a"; nocase; fast_pattern:only; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2012253; rev:2; metadata:created_at 2011_02_02, updated_at 2011_02_02;) + +alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Common %u0a0a%u0a0a UTF-16 Heap Spray String"; flow:established,to_client; content:"%u0a0a%u0a0a"; nocase; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2012254; rev:3; metadata:created_at 2011_02_02, updated_at 2011_02_02;) + +alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Common %u0a%u0a%u0a%u0a UTF-8 Heap Spray String"; flow:established,to_client; content:"%u0a%u0a%u0a%u0a"; nocase; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2012255; rev:3; metadata:created_at 2011_02_02, updated_at 2011_02_02;) + +#alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Common 0c0c0c0c Heap Spray String"; flow:established,to_client; content:"0c0c0c0c"; nocase; fast_pattern:only; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2012256; rev:2; metadata:created_at 2011_02_02, updated_at 2011_02_02;) + +alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Common %0c%0c%0c%0c Heap Spray String"; flow:established,to_client; content:"%0c%0c%0c%0c"; nocase; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2012257; rev:3; metadata:created_at 2011_02_02, updated_at 2011_02_02;) + +alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Common %u0c0c%u0c0c UTF-16 Heap Spray String"; flow:established,to_client; content:"%u0c0c%u0c0c"; nocase; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2012258; rev:3; metadata:created_at 2011_02_02, updated_at 2011_02_02;) + +alert http $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"ET SHELLCODE Common %u0c%u0c%u0c%u0c UTF-8 Heap Spray String"; flow:established,to_client; content:"%u0c%u0c%u0c%u0c"; nocase; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2012259; rev:3; metadata:created_at 2011_02_02, updated_at 2011_02_02;) + +#alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE UTF-8/16 Encoded Shellcode"; flow:established,to_client; content:"|5C|u"; nocase; content:"|5C|u"; nocase; within:6; content:"|5C|u"; nocase; within:6; content:"|5C|u"; nocase; within:6; content:"|5C|u"; nocase; within:6; pcre:"/\x5Cu[a-f,0-9]{2,4}\x5Cu[a-f,0-9]{2,4}\x5Cu[a-f,0-9]{2,4}/i"; reference:url,www.sophos.com/security/technical-papers/malware_with_your_mocha.html; classtype:bad-unknown; sid:2012510; rev:2; metadata:created_at 2011_03_16, updated_at 2011_03_16;) + +#alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Unescape Variable %u Shellcode"; flow:established,to_client; content:"= unescape|28|"; nocase; content:"%u"; nocase; within:3; content:"%u"; nocase; within:6; pcre:"/var\x20[a-z,0-9]{1,30}\x20\x3D\x20unescape\x28.\x25u[a-f,0-9]{2,4}\x25u[a-f,0-9]{2,4}/i"; reference:url,www.symantec.com/avcenter/reference/evolving.shell.code.pdf; classtype:shellcode-detect; sid:2012534; rev:2; metadata:created_at 2011_03_22, updated_at 2011_03_22;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Unescape Variable Unicode Shellcode"; flow:established,to_client; content:"= unescape|28|"; nocase; content:"|5C|u"; nocase; within:3; content:"|5C|u"; nocase; within:6; pcre:"/var\x20[a-z,0-9]{1,30}\x20\x3D\x20unescape\x28.\x5Cu[a-f,0-9]{2,4}\x5Cu[a-f,0-9]{2,4}/i"; reference:url,www.symantec.com/avcenter/reference/evolving.shell.code.pdf; classtype:shellcode-detect; sid:2012535; rev:2; metadata:created_at 2011_03_22, updated_at 2011_03_22;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Javascript Split String Unicode Heap Spray Attempt"; flow:established,to_client; content:"|22|u|22 20|+|20 22|0|22 20|+|20 22|"; content:"|22 20|+|20 22|"; distance:1; within:5; pcre:"/\x220\x22\x20\x2B\x20\x22[a-d]\x22\x20\x2B\x20\x22/smi"; classtype:shellcode-detect; sid:2012925; rev:2; metadata:created_at 2011_06_02, updated_at 2011_06_02;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible 0x0a0a0a0a Heap Spray Attempt"; flow:established,to_client; content:"0x0a0a0a0a"; nocase; classtype:shellcode-detect; sid:2012962; rev:3; metadata:created_at 2011_06_08, updated_at 2011_06_08;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible 0x0b0b0b0b Heap Spray Attempt"; flow:established,to_client; content:"0x0b0b0b0b"; nocase; classtype:shellcode-detect; sid:2012963; rev:2; metadata:created_at 2011_06_08, updated_at 2011_06_08;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible 0x0c0c0c0c Heap Spray Attempt"; flow:established,to_client; content:"0x0c0c0c0c"; nocase; classtype:shellcode-detect; sid:2012964; rev:3; metadata:created_at 2011_06_08, updated_at 2011_06_08;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible 0x0d0d0d0d Heap Spray Attempt"; flow:established,to_client; content:"0x0d0d0d0d"; nocase; classtype:shellcode-detect; sid:2012965; rev:3; metadata:created_at 2011_06_08, updated_at 2011_06_08;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible %0d%0d%0d%0d Heap Spray Attempt"; flow:established,to_client; content:"%0d%0d%0d%0d"; nocase; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2012966; rev:3; metadata:created_at 2011_06_08, updated_at 2011_06_08;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible %u0d%u0d%u0d%u0d UTF-8 Heap Spray Attempt"; flow:established,to_client; content:"%u0d%u0d%u0d%u0d"; nocase; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2012967; rev:3; metadata:created_at 2011_06_08, updated_at 2011_06_08;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible %u0d0d%u0d0d UTF-16 Heap Spray Attempt"; flow:established,to_client; content:"%u0d0d%u0d0d"; nocase; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2012968; rev:3; metadata:created_at 2011_06_08, updated_at 2011_06_08;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible Vertical Slash Unicode Heap Spray Attempt"; flow:established,to_client; content:"|7C|u0"; nocase; content:"|7C|u0"; distance:1; within:4; pcre:"/\x7Cu0[a-d](\x7Cu0|0)[a-d]/\x7Cu0[a-d](\x7Cu0|0)[a-d]/i"; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2012969; rev:2; metadata:created_at 2011_06_08, updated_at 2011_06_08;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible Backslash Unicode Heap Spray Attempt"; flow:established,to_client; content:"|5C|u0"; nocase; content:"|5C|u0"; distance:1; within:4; pcre:"/\x5Cu0[a-d](\x5Cu0|0)[a-d]/\x5Cu0[a-d](\x5Cu0|0)[a-d]/i"; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2012970; rev:2; metadata:created_at 2011_06_08, updated_at 2011_06_08;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible %41%41%41%41 Heap Spray Attempt"; flow:established,to_client; content:"%41%41%41%41"; fast_pattern:only; classtype:shellcode-detect; sid:2013145; rev:2; metadata:created_at 2011_06_30, updated_at 2011_06_30;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible %u41%u41%u41%u41 UTF-8 Heap Spray Attempt"; flow:established,to_client; content:"%u41%u41%u41%u41"; nocase; fast_pattern:only; classtype:shellcode-detect; sid:2013146; rev:2; metadata:created_at 2011_06_30, updated_at 2011_06_30;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible %u4141%u4141 UTF-16 Heap Spray Attempt"; flow:established,to_client; content:"%u4141%u4141"; nocase; fast_pattern:only; classtype:shellcode-detect; sid:2013147; rev:2; metadata:created_at 2011_06_30, updated_at 2011_06_30;) + +#alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE JavaScript Redefinition of a HeapLib Object - Likely Malicious Heap Spray Attempt"; flow:established,to_client; content:"heap|2E|"; nocase; fast_pattern:only; pcre:"/var\x20[^\n\r]*\x3D[^\n\r]*heap\x2E/smi"; classtype:shellcode-detect; sid:2013148; rev:3; metadata:created_at 2011_06_30, updated_at 2011_06_30;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Hex Obfuscated JavaScript Heap Spray 0b0b0b0b"; flow:established,to_client; file_data; content:"|5C|x0b|5C|x0b|5C|x0b|5C|x0b"; nocase; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2013268; rev:4; metadata:created_at 2011_07_14, updated_at 2011_07_14;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Hex Obfuscated JavaScript Heap Spray 0c0c0c0c"; flow:established,to_client; content:"|5C|x0c|5C|x0c|5C|x0c|5C|x0c"; nocase; fast_pattern:only; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2013269; rev:2; metadata:created_at 2011_07_14, updated_at 2011_07_14;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Hex Obfuscated JavaScript Heap Spray 0d0d0d0d"; flow:established,to_client; content:"|5C|x0d|5C|x0d|5C|x0d|5C|x0d"; nocase; fast_pattern:only; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2013270; rev:2; metadata:created_at 2011_07_14, updated_at 2011_07_14;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Hex Obfuscated JavaScript NOP SLED"; flow:established,to_client; content:"|5C|x90|5C|x90|5C|x90|5C|x90"; nocase; fast_pattern:only; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2013271; rev:2; metadata:created_at 2011_07_14, updated_at 2011_07_14;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Unescape Hex Obfuscated Content"; flow:established,to_client; content:"unescape|28|"; fast_pattern; content:"|5C|x"; distance:1; within:2; content:"|5C|x"; distance:2; within:2; content:"|5C|x"; distance:2; within:2; content:"|5C|x"; distance:2; within:2; pcre:"/unescape\x28(\x22|\x27)\x5Cx[a-f,0-9]{2}\x5Cx[a-f,0-9]{2}\x5Cx[a-f,0-9]{2}/smi"; classtype:shellcode-detect; sid:2013272; rev:3; metadata:created_at 2011_07_14, updated_at 2011_07_14;) + +#alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Hex Obfuscated JavaScript Heap Spray 41414141"; flow:established,to_client; content:"|5C|x41|5C|x41|5C|x41|5C|x41"; nocase; fast_pattern:only; metadata: former_category SHELLCODE; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2013273; rev:2; metadata:created_at 2011_07_14, updated_at 2017_09_08;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Double BackSlash Hex Obfuscated JavaScript Heap Spray 0a0a0a0a"; flow:established,to_client; content:"|5C 5C|x0a|5C 5C|x0a|5C 5C|x0a|5C 5C|x0a"; nocase; fast_pattern:only; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2013274; rev:2; metadata:created_at 2011_07_14, updated_at 2011_07_14;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Double BackSlash Hex Obfuscated JavaScript Heap Spray 0b0b0b0b"; flow:established,to_client; content:"|5C 5C|x0b|5C 5C|x0b|5C 5C|x0b|5C 5C|x0b"; nocase; fast_pattern:only; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2013275; rev:2; metadata:created_at 2011_07_14, updated_at 2011_07_14;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Double BackSlash Hex Obfuscated JavaScript Heap Spray 0c0c0c0c"; flow:established,to_client; content:"|5C 5C|x0c|5C 5C|x0c|5C 5C|x0c|5C 5C|x0c"; nocase; fast_pattern:only; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2013276; rev:2; metadata:created_at 2011_07_14, updated_at 2011_07_14;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Double BackSlash Hex Obfuscated JavaScript Heap Spray 0d0d0d0d"; flow:established,to_client; content:"|5C 5C|x0d|5C 5C|x0d|5C 5C|x0d|5C 5C|x0d"; nocase; fast_pattern:only; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2013277; rev:2; metadata:created_at 2011_07_14, updated_at 2011_07_14;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Double BackSlash Hex Obfuscated JavaScript NOP SLED"; flow:established,to_client; content:"|5C 5C|x90|5C 5C|x90|5C 5C|x90|5C 5C|x90"; nocase; fast_pattern:only; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2013278; rev:2; metadata:created_at 2011_07_14, updated_at 2011_07_14;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Double BackSlash Hex Obfuscated JavaScript Heap Spray 41414141"; flow:established,to_client; content:"|5C 5C|x41|5C 5C|x41|5C 5C|x41|5C 5C|x41"; nocase; fast_pattern:only; reference:url,www.darkreading.com/security/vulnerabilities/221901428/index.html; classtype:shellcode-detect; sid:2013279; rev:2; metadata:created_at 2011_07_14, updated_at 2011_07_14;) + +#alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Unicode UTF-8 Heap Spray Attempt"; flow:established,to_client; content:"u0"; nocase; content:"u0"; nocase; distance:1; within:2; content:"u0"; nocase; distance:1; within:2; content:"u0"; nocase; distance:1; within:2; pcre:"/u0[a-d]u0[a-d]u0[a-d]u0[a-d]/smi"; classtype:shellcode-detect; sid:2013319; rev:2; metadata:created_at 2011_07_27, updated_at 2011_07_27;) + +#alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Unicode UTF-16 Heap Spray Attempt"; flow:established,to_client; content:"u0"; nocase; content:"u0"; nocase; distance:3; within:2; pcre:"/u0[a-d]0[a-d]u0[a-d]0[a-d]/smi"; classtype:shellcode-detect; sid:2013320; rev:2; metadata:created_at 2011_07_27, updated_at 2011_07_27;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible Backslash Escaped UTF-8 0c0c Heap Spray"; flow:established,to_client; file_data; content:"|5C|0c|5C|0c"; nocase; distance:0; classtype:bad-unknown; sid:2016714; rev:2; metadata:created_at 2013_04_03, updated_at 2013_04_03;) + +#alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible Backslash Escaped UTF-16 0c0c Heap Spray"; flow:established,to_client; file_data; content:"|5C|0c0c"; nocase; distance:0; metadata: former_category SHELLCODE; classtype:bad-unknown; sid:2016715; rev:2; metadata:created_at 2013_04_03, updated_at 2017_09_08;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Possible UTF-16 u9090 NOP SLED"; file_data; flow:established,to_client; content:"|5c|u9090|5c|"; nocase; pcre:"/^[a-f0-9]{4}/Ri"; reference:url,cansecwest.com/slides07/csw07-nazario.pdf; reference:url,www.sophos.com/security/technical-papers/malware_with_your_mocha.html; reference:url,www.windowsecurity.com/articles/Obfuscated-Shellcode-Part1.html; classtype:shellcode-detect; sid:2017345; rev:4; metadata:created_at 2013_08_19, updated_at 2013_08_19;) + +alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Linux/x86-64 - Polymorphic Flush IPTables Shellcode"; content:"|6a 52 58 99 52 66 68 2d 46 54 5b 52 48 b9 69 70 74 61 62 6c 65 73 51 d0 e0 28 c8 48 b9 2f 2f 73 62 69 6e 2f 2f 51 54 5f 52 53 57 54 5e 0f 05|"; fast_pattern:only; metadata: former_category SHELLCODE; reference:url,a41l4.blogspot.ca/2017/03/polyflushiptables1434.html; classtype:shellcode-detect; sid:2024057; rev:1; metadata:affected_product Linux, attack_target Client_and_Server, deployment Perimeter, signature_severity Critical, created_at 2017_03_15, performance_impact Low, updated_at 2017_03_15;) + +alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Linux/x86-64 - Polymorphic Setuid(0) & Execve(/bin/sh) Shellcode"; content:"|31 ff 57 6a 69 58 48 bb 5e c4 d2 dc 5e 5e e6 d0 0f 05 48 d1 cb b0 3b 53 87 f7 54 99 5f 0f 05|"; fast_pattern:only; metadata: former_category SHELLCODE; reference:url,a41l4.blogspot.ca/2017/03/polysetuidexecve1434.html; classtype:shellcode-detect; sid:2024058; rev:1; metadata:affected_product Linux, attack_target Client_and_Server, deployment Perimeter, signature_severity Critical, created_at 2017_03_15, performance_impact Low, updated_at 2017_03_15;) + +alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"ET SHELLCODE Linux/x86-64 - Reverse Shell Shellcode"; content:"|6a 02 6a 2a 6a 10 6a 29 6a 01 6a 02|"; content:"|48 bf 2f 2f 62 69 6e 2f 73 68|"; fast_pattern:only; metadata: former_category SHELLCODE; reference:url,exploit-db.com/exploits/41477/; classtype:shellcode-detect; sid:2024065; rev:1; metadata:affected_product Linux, attack_target Client_and_Server, deployment Perimeter, signature_severity Critical, created_at 2017_03_16, performance_impact Low, updated_at 2017_03_16;) diff --git a/code/chef/templates/centos/mobilemalware.rules.erb b/code/chef/templates/centos/mobilemalware.rules.erb new file mode 100755 index 0000000..a1d1b20 --- /dev/null +++ b/code/chef/templates/centos/mobilemalware.rules.erb @@ -0,0 +1,447 @@ +# Emerging Threats +# +# This distribution may contain rules under two different licenses. +# +# Rules with sids 1 through 3464, and 100000000 through 100000908 are under the GPLv2. +# A copy of that license is available at http://www.gnu.org/licenses/gpl-2.0.html +# +# Rules with sids 2000000 through 2799999 are from Emerging Threats and are covered under the BSD License +# as follows: +# +#************************************************************* +# Copyright (c) 2003-2017, Emerging Threats +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +# following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +# disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +# following disclaimer in the documentation and/or other materials provided with the distribution. +# * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +#************************************************************* +# +# +# +# + +# This Ruleset is EmergingThreats Open optimized for suricata-1.3-enhanced. + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android Trojan Command and Control Communication"; flow:established,to_server; content:"POST"; http_method; content:"/getAdXml.do"; http_uri; nocase; content:"params="; nocase; reference:url,www.isc.sans.org/diary.html?storyid=10186; classtype:trojan-activity; sid:2012140; rev:5; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_01_05, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android Trojan MSO.PJApps checkin 1"; flow:established,to_server; content:"/push/androidxml/"; http_uri; nocase; content:"sim="; http_uri; nocase; content:"tel="; http_uri; nocase; content:"imsi="; http_uri; content:"pid="; http_uri; nocase; reference:url,virus.netqin.com/en/android/MSO.PJApps.A; classtype:trojan-activity; sid:2012451; rev:5; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_03_10, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET 9033 (msg:"ET MOBILE_MALWARE Android Trojan MSO.PJApps checkin 2"; flow:established,to_server; content:".log"; http_uri; nocase; content:"id="; http_uri; nocase; content:"softid="; http_uri; nocase; reference:url,virus.netqin.com/en/android/MSO.PJApps.A/; classtype:trojan-activity; sid:2012452; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_03_10, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android Trojan DroidDream Command and Control Communication"; flow:established,to_server; content:"POST"; http_method; content:"/GMServer/GMServlet"; nocase; http_uri; content:"|0d 0a|User-Agent|3a| Dalvik"; http_header; reference:url,blog.mylookout.com/2011/03/security-alert-malware-found-in-official-android-market-droiddream/; classtype:trojan-activity; sid:2012453; rev:3; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_03_10, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android Trojan Fake10086 checkin 1"; flow:established,to_server; content:"POST"; http_method; content:"request"; http_uri; nocase; content:".php"; http_uri; nocase; content:""; content:""; content:""; reference:url,blog.aegislab.com/index.php?op=ViewArticle&articleId=81&blogId=1; classtype:trojan-activity; sid:2012454; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_03_10, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android Trojan Fake10086 checkin 2"; flow:established,to_server; content:"req.php"; nocase; http_uri; content:"pid="; http_uri; nocase; content:"ver="; http_uri; nocase; content:"area="; http_uri; nocase; content:"insttime="; http_uri; nocase; content:"first="; http_uri; nocase; reference:url,blog.aegislab.com/index.php?op=ViewArticle&articleId=81&blogId=1; classtype:trojan-activity; sid:2012455; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_03_10, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS SuperFairy.D StartUpdata.ini Missing File HTTP Request"; flow:established,to_server; content:"/client/symbian/"; nocase; http_uri; content:"StartUpdata.ini"; nocase; http_uri; within:30; fast_pattern; reference:url,www.fortiguard.com/encyclopedia/virus/symbos_superfairy.d!tr.html; classtype:trojan-activity; sid:2012782; rev:2; metadata:created_at 2011_05_03, updated_at 2011_05_03;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS SuperFairy.D BackgroundUpdata.ini Missing File HTTP Request"; flow:established,to_server; content:"/client/symbian/BackgroundUpdata.ini"; http_uri; nocase; reference:url,www.fortiguard.com/encyclopedia/virus/symbos_superfairy.d!tr.html; classtype:trojan-activity; sid:2012783; rev:3; metadata:created_at 2011_05_03, updated_at 2011_05_03;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS SuperFairy.D active.txt Missing File HTTP Request"; flow:established,to_server; content:"/client/symbian/"; http_uri; nocase; content:"active.txt"; nocase; http_uri; within:30; fast_pattern; reference:url,www.fortiguard.com/encyclopedia/virus/symbos_superfairy.d!tr.html; classtype:trojan-activity; sid:2012784; rev:2; metadata:created_at 2011_05_03, updated_at 2011_05_03;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS/Yxes.B/E CnC Checkin Request"; flow:established,to_server; content:"/Kernel.jsp?Version="; nocase; http_uri; content:"&PhoneType="; nocase; http_uri; reference:url,blog.fortinet.com/symbosyxes-or-downloading-customized-malware/; classtype:trojan-activity; sid:2012844; rev:2; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS/Yxes CnC Checkin Request"; flow:established,to_server; content:"/bs?Version="; nocase; http_uri; content:"&PhoneImei="; nocase; http_uri; content:"&PhoneImsi="; nocase; http_uri; content:"&PhoneType="; nocase; http_uri; reference:url,blog.fortinet.com/symbosyxes-or-downloading-customized-malware/; classtype:trojan-activity; sid:2012845; rev:2; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS/Yxes CnC Checkin Request 2"; flow:established,to_server; content:"/number/?PhoneType="; nocase; http_uri; reference:url,blog.fortinet.com/symbosyxes-or-downloading-customized-malware/; classtype:trojan-activity; sid:2012846; rev:2; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS/Yxes.F CnC Checkin Request 3"; flow:established,to_server; content:".jsp?PhoneType="; nocase; http_uri; content:"&PhoneImei="; nocase; http_uri; content:"&PhoneImsi="; nocase; http_uri; reference:url,blog.fortinet.com/symbosyxes-or-downloading-customized-malware/; classtype:trojan-activity; sid:2012847; rev:2; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +#alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Possible Mobile Malware POST of IMEI International Mobile Equipment Identity in URI"; flow:established,to_server; content:"POST"; http_method; content:"imei="; nocase; http_uri; pcre:"/imei=\d{2}-?\d{6}-?\d{6,}-?\d{1,}/Ui"; content:!"Host|3a 20|iphone-wu.apple.com"; http_header; reference:url,www.met.police.uk/mobilephone/imei.htm; classtype:trojan-activity; sid:2012848; rev:3; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS.Flexispy.a Commercial Spying App Sending User Information to Server"; flow:established,to_server; content:"Host|3a| mobile.flexispy.com"; http_header; content:"/service"; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/symbos_flexispy.a!tr.spy.html; classtype:trojan-activity; sid:2012850; rev:2; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS/Yxes.I PropertyFile.jsp CnC Server Communication"; flow:established,to_server; content:"/PropertyFile.jsp?Version="; nocase; http_uri; content:"&PhoneType="; nocase; http_uri; content:"&PhoneImei="; nocase; http_uri; content:"&PhoneImsi="; nocase; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/symbos_yxes.i!worm.html; classtype:trojan-activity; sid:2012851; rev:3; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS/Yxes.I TipFile.jsp CnC Server Communication"; flow:established,to_server; content:"TipFile.jsp"; http_uri; content:"&LanguageCode="; http_uri; content:"&PhoneType="; http_uri; content:"&PhoneImei="; http_uri; content:"&PhoneImsi="; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/symbos_yxes.i!worm.html; classtype:trojan-activity; sid:2012852; rev:4; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS/Yxes.I NumberFile.jsp CnC Server Communication"; flow:established,to_server; content:"NumberFile.jsp?Version="; http_uri; content:"&PhoneType="; http_uri; content:"&PhoneImei="; http_uri; content:"&PhoneImsi="; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/symbos_yxes.i!worm.html; classtype:trojan-activity; sid:2012853; rev:2; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS/Merogo User Agent"; flow:established,to_server; content:"User-Agent|3A| LiveUpdater 1.0"; http_header; reference:url,www.fortiguard.com/encyclopedia/virus/symbos_merogo.b!tr.html; classtype:trojan-activity; sid:2012854; rev:2; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SPR/MobileSpy Mobile Spyware Sending Geographic Location Logs To Remote Server"; flow:established,to_server; content:"/webapi/gpslog.php"; nocase; http_uri; content:"&long="; nocase; http_uri; content:"&lat="; nocase; http_uri; content:"&speed="; nocase; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/spy_mobilespy!iphoneos.html; classtype:trojan-activity; sid:2012855; rev:3; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SPR/MobileSpy Mobile Spyware Sending Call Logs to Remote Server"; flow:established,to_server; content:"/webapi/calllog.php"; http_uri; content:"&date="; http_uri; content:"&time="; http_uri; content:"&from="; http_uri; content:"&dur="; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/spy_mobilespy!iphoneos.html; classtype:trojan-activity; sid:2012856; rev:3; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SPR/MobileSpy Mobile Spyware Sending SMS Logs to Remote Server"; flow:established,to_server; content:"/webapi/sms.php"; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/spy_mobilespy!iphoneos.html; classtype:trojan-activity; sid:2012857; rev:3; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS.Sagasi.a Worm Sending Data to Server"; flow:established,to_server; content:"/HiShowServlet/servlet"; http_uri; pcre:"/\x2FHiShowServlet\x2Fservlet.+(InstalNum|UserActivation)/Ui"; reference:url,www.fortiguard.com/encyclopedia/virus/symbos_sagasi.a!tr.html; classtype:trojan-activity; sid:2012858; rev:3; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS.Sagasi.a Worm Sending Data to Server"; flow:established,to_server; content:"/cot?ID="; http_uri; content:"&DLType="; http_uri; content:"&SD="; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/symbos_sagasi.a!tr.html; classtype:trojan-activity; sid:2012859; rev:3; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS.Sagasi.a User Agent LARK/1.3.0"; flow:established,to_server; content:"User-Agent|3A| LARK/"; http_header; reference:url,www.fortiguard.com/encyclopedia/virus/symbos_sagasi.a!tr.html; classtype:trojan-activity; sid:2012861; rev:4; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SslCrypt Server Communication"; flow:established,to_server; content:"/billwebsvr.dll?Buy?user="; http_uri; content:"&key="; http_uri; content:"&channel="; http_uri; content:"&corp="; http_uri; content:"&product="; http_uri; content:"&phone="; http_uri; content:"&private="; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/adware_sslcrypt!symbos.html; classtype:trojan-activity; sid:2012862; rev:4; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SslCrypt Server Communication"; flow:established,to_server; content:"?id="; http_uri; content:"&time="; http_uri; content:"&imei="; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/adware_sslcrypt!symbos.html; classtype:trojan-activity; sid:2012863; rev:3; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SslCrypt Server Communication"; flow:established,to_server; content:"sender="; http_uri; content:"&cpId="; http_uri; content:"&cpServiceId="; http_uri; content:"&channelId="; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/adware_sslcrypt!symbos.html; classtype:trojan-activity; sid:2012864; rev:2; metadata:created_at 2011_05_25, updated_at 2011_05_25;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS/SuperFairy.D Bookmarked Connection to Server"; flow:established,to_server; content:"jiao.com"; http_header; fast_pattern; content:"/?id=book22"; nocase; http_uri; pcre:"/Host\x3A[^\n\r]*jiao.com/Hi"; reference:url,www.fortiguard.com/encyclopedia/virus/symbos_superfairy.d!tr.html; classtype:trojan-activity; sid:2012904; rev:2; metadata:created_at 2011_05_31, updated_at 2011_05_31;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android/Smspacem CnC Communication Attempt"; flow:established,to_server; content:"/talktome.asmx"; nocase; http_uri; content:"cell"; http_client_body; nocase; content:"opname"; nocase; distance:0; http_client_body; reference:url,www.fortiguard.com/encyclopedia/virus/android_smspacem.a!tr.html; classtype:trojan-activity; sid:2012924; rev:3; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_06_02, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Iphone iKee.B Checkin"; flow:established,to_server; content:"/xlm.p.php?id="; http_uri; nocase; reference:url,mtc.sri.com/iPhone/; classtype:trojan-activity; sid:2013019; rev:2; metadata:created_at 2011_06_13, updated_at 2011_06_13;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE DroidKungFu Checkin"; flow:established,to_server; content:"POST"; http_method; content:"/search/sayhi.php"; http_uri; reference:url,extraexploit.blogspot.com/2011/06/droidkungfu-just-some-piece-of-code.html; reference:url,www.redmondpie.com/droidkungfu-new-hard-to-detect-android-malware-threat-on-the-loose-steals-user-data-and-more/; reference:url,www.fortiguard.com/encyclopedia/virus/android_droidkungfu.a!tr.html; classtype:trojan-activity; sid:2013020; rev:2; metadata:created_at 2011_06_13, updated_at 2011_06_13;) + +#alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Possible Post of Infected Mobile Device Location Information"; flow:established,to_server; content:"POST"; http_method; nocase; content:"longitude="; http_uri; nocase; content:"latitude="; http_uri; nocase; classtype:trojan-activity; sid:2013021; rev:2; metadata:created_at 2011_06_13, updated_at 2011_06_13;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE DroidKungFu Checkin 2"; flow:established,to_server; content:"POST"; http_method; content:"search/rpty.php"; http_uri; nocase; reference:url,extraexploit.blogspot.com/2011/06/droidkungfu-just-some-piece-of-code.html; reference:url,www.redmondpie.com/droidkungfu-new-hard-to-detect-android-malware-threat-on-the-loose-steals-user-data-and-more/; reference:url,www.fortiguard.com/encyclopedia/virus/android_droidkungfu.a!tr.html; classtype:trojan-activity; sid:2013022; rev:2; metadata:created_at 2011_06_13, updated_at 2011_06_13;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET MOBILE_MALWARE DNS Query for gongfu-android.com DroidKungFu CnC Server"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|0E|gongfu-android|03|com"; distance:0; reference:url,extraexploit.blogspot.com/2011/06/droidkungfu-just-some-piece-of-code.html; reference:url,www.redmondpie.com/droidkungfu-new-hard-to-detect-android-malware-threat-on-the-loose-steals-user-data-and-more/; reference:url,www.fortiguard.com/encyclopedia/virus/android_droidkungfu.a!tr.html; classtype:trojan-activity; sid:2013023; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_06_13, updated_at 2016_07_01;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET MOBILE_MALWARE DNS Query For Known Mobile Malware Control Server Waplove.cn"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|07|waplove|02|cn"; fast_pattern; nocase; distance:0; reference:url,www.symantec.com/security_response/writeup.jsp?docid=2011-060910-5804-99&tabid=2; classtype:trojan-activity; sid:2013038; rev:3; metadata:created_at 2011_06_16, updated_at 2011_06_16;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android.Tonclank JAR File Download"; flow:established,to_server; content:"/ProtocolGW/"; fast_pattern; http_uri; nocase; content:"filename="; http_uri; nocase; reference:url,www.symantec.com/security_response/writeup.jsp?docid=2011-061012-4545-99&tabid=2; classtype:trojan-activity; sid:2013040; rev:3; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_06_16, updated_at 2016_07_01;) + +alert udp $HOME_NET any -> $EXTERNAL_NET 53 (msg:"ET MOBILE_MALWARE DNS Query For Known Mobile Malware Control Server Searchwebmobile.com"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|0F|searchwebmobile|03|com"; nocase; distance:0; reference:url,www.symantec.com/security_response/writeup.jsp?docid=2011-061012-4545-99&tabid=2; classtype:trojan-activity; sid:2013041; rev:2; metadata:created_at 2011_06_16, updated_at 2011_06_16;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET MOBILE_MALWARE Android.Plankton/Tonclank Control Server Responding With JAR Download URL"; flow:established,to_client; content:"|0d 0a|url=http|3A|//"; nocase; content:"ProtocolGW/|3B|filename="; nocase; distance:0; reference:url,www.csc.ncsu.edu/faculty/jiang/Plankton/; reference:url,www.symantec.com/security_response/writeup.jsp?docid=2011-060910-5804-99&tabid=2; classtype:trojan-activity; sid:2013044; rev:4; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_06_16, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET 8511 (msg:"ET MOBILE_MALWARE DroidKungFu Checkin 3"; flow:established,to_server; content:"POST"; http_method; content:"/search/getty.php"; reference:url,extraexploit.blogspot.com/2011/06/droidkungfu-just-some-piece-of-code.html; reference:url,www.redmondpie.com/droidkungfu-new-hard-to-detect-android-malware-threat-on-the-loose-steals-user-data-and-more/; reference:url,www.fortiguard.com/encyclopedia/virus/android_droidkungfu.a!tr.html; reference:url,blog.fortinet.com/androiddroidkungfu-attacking-from-a-mobile-device/; classtype:trojan-activity; sid:2013063; rev:2; metadata:created_at 2011_06_17, updated_at 2011_06_17;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android.HongTouTou Checkin"; flow:established,to_server; content:"POST"; http_method; content:".aspx?im="; http_uri; content:"User-Agent|3A| J2ME/UCWEB"; http_header; reference:url,www.fortiguard.com/encyclopedia/virus/android_hongtoutou.a!tr.html; classtype:trojan-activity; sid:2013072; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_06_21, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android.YzhcSms CnC Keepalive Message"; flow:established,to_server; content:"/android/android.dbug.php?action=heart"; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/android_yzhcsms.a!tr.html; classtype:trojan-activity; sid:2013078; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_06_21, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android.YzhcSms URL for Possible File Download"; flow:established,to_server; content:"/ss/attachments/files/URLshorter.apk"; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/android_yzhcsms.a!tr.html; classtype:trojan-activity; sid:2013079; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_06_21, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE XML Style POST Of IMEI International Mobile Equipment Identity"; flow:established,to_server; content:"POST"; http_method; nocase; content:""; http_client_body; nocase; content:"<|2F|IMEI>"; fast_pattern; nocase; http_client_body; distance:0; content:!".blackberry.com|0d 0a|"; http_header; content:!".nokia.com|0d 0a|"; http_header; content:!".sonyericsson.com|0d 0a|"; http_header; reference:url,www.met.police.uk/mobilephone/imei.htm; classtype:trojan-activity; sid:2013138; rev:8; metadata:created_at 2011_06_30, updated_at 2011_06_30;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE XML Style POST Of IMSI International Mobile Subscriber Identity"; flow:established,to_server; content:"POST"; http_method; nocase; content:""; http_client_body; nocase; content:"<|2F|IMSI"; nocase; distance:0; http_client_body; reference:url,www.learntelecom.com/telephony/gsm/international-mobile-subscriber-identity-imsi; classtype:trojan-activity; sid:2013139; rev:2; metadata:created_at 2011_06_30, updated_at 2011_06_30;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS/Yxes CnC Checkin Message"; flow:established,to_server; content:".jsp?Version="; http_uri; content:"&PhoneType="; http_uri; content:"&PhoneImei="; http_uri; content:"PhoneImsi="; http_uri; content:"&PhoneNumber="; http_uri; content:"&Succeed="; http_uri; content:"&Fail="; http_uri; content:"&Source="; http_uri; content:"&Time="; http_uri; reference:url,blog.fortinet.com/symbosyxes-goes-version-2/; classtype:trojan-activity; sid:2013140; rev:3; metadata:created_at 2011_06_30, updated_at 2011_06_30;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS/Yxes Plugucsrv.sisx File Download"; flow:established,to_server; content:"plugucsrv.sisx"; http_uri; fast_pattern:only; reference:url,blog.fortinet.com/symbosyxes-goes-version-2/; classtype:trojan-activity; sid:2013141; rev:3; metadata:created_at 2011_06_30, updated_at 2011_06_30;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS/Yxes Jump.jsp CnC Checkin Message"; flow:established,to_server; content:"/Jump.jsp?Version="; http_uri; fast_pattern:only; content:"&PhoneType="; http_uri; reference:url,blog.fortinet.com/symbosyxes-goes-version-2/; classtype:trojan-activity; sid:2013142; rev:3; metadata:created_at 2011_06_30, updated_at 2011_06_30;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS/Yxes KernelPara.jsp CnC Checkin Message"; flow:established,to_server; content:"/KernelPara.jsp?Version="; http_uri; fast_pattern:only; content:"&PhoneType="; http_uri; reference:url,blog.fortinet.com/symbosyxes-goes-version-2/; classtype:trojan-activity; sid:2013143; rev:2; metadata:created_at 2011_06_30, updated_at 2011_06_30;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android.CruseWin Retriving XML File from Hard Coded CnC"; flow:established,to_server; content:"/flash/test.xml"; http_uri; fast_pattern:only; flowbits:set,ET.And.CruseWin; flowbits:noalert; reference:url,www.fortiguard.com/encyclopedia/virus/android_crusewin.a!tr.html; classtype:trojan-activity; sid:2013193; rev:3; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_07_05, updated_at 2016_07_01;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET MOBILE_MALWARE Android.CruseWin XML Configuration File Sent From CnC Server"; flowbits:isset,ET.And.CruseWin; flow:established,from_server; content:"http|3A|//"; nocase; content:"http|3A|//"; nocase; distance:0; content:" $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android.Walkinwat Sending Data to CnC Server"; flow:established,to_server; content:"/wat.php"; nocase; http_uri; content:"incorporateapps.com"; nocase; http_header; pcre:"/Host\x3A[^\r\n]*incorporateapps\x2Ecom/Hi"; reference:url,us.norton.com/security_response/writeup.jsp?docid=2011-033008-4831-99&tabid=2; reference:url,blog.avast.com/2011/03/21/android-is-calling-walk-and-text-and-be-malicious/; classtype:trojan-activity; sid:2013209; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_07_06, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android.Bgserv POST of Data to CnC Server"; flow:established,to_server; content:"POST"; http_method; uricontent:"/Coop/request"; reference:url,us.norton.com/security_response/writeup.jsp?docid=2011-031005-2918-99&tabid=2; classtype:trojan-activity; sid:2013210; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_07_06, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android/GoldDream Infected Device Registration"; flow:established,to_server; content:"/RegistUid.asp"; fast_pattern:only; http_uri; nocase; content:"?pid="; nocase; http_uri; content:"&cid="; nocase; http_uri; content:"&imei="; nocase; http_uri; content:"&sim="; nocase; http_uri; content:"&imsi="; nocase; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/android_golddream.a!tr.spy.html; classtype:trojan-activity; sid:2013238; rev:4; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_07_08, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android/GoldDream Task Information Retrieval"; flow:established,to_server; content:"/alotWorkTask.aspx?no="; http_uri; content:"&uid="; http_uri; content:"&ti="; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/android_golddream.a!tr.spy.html; classtype:trojan-activity; sid:2013240; rev:3; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_07_08, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android/GoldDream Uploading Watch Files"; flow:established,to_server; content:"/upload/UploadFiles.aspx?askId="; http_uri; fast_pattern:only; reference:url,www.fortiguard.com/encyclopedia/virus/android_golddream.a!tr.spy.html; classtype:trojan-activity; sid:2013241; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_07_08, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS/CommDN Downloading Second Stage Malware Binary"; flow:established,to_server; content:"DGOManagerServer/file/TianXiangServer2.sisx"; nocase; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/symbos_commdn.a!tr.html; classtype:trojan-activity; sid:2013261; rev:2; metadata:created_at 2011_07_13, updated_at 2011_07_13;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE SymbOS/SymGam CnC Checkin"; flow:established,to_server; content:"/ddown/getvalid.aspx"; nocase; http_uri; fast_pattern:only; reference:url,www.fortiguard.com/encyclopedia/virus/symbos_symgam.a!tr.html; classtype:trojan-activity; sid:2013265; rev:2; metadata:created_at 2011_07_14, updated_at 2011_07_14;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET MOBILE_MALWARE SymbOS/SymGam Receiving SMS Message Template from CnC Server"; flow:established,to_client; content:""; content:""; distance:0; reference:url,www.fortiguard.com/encyclopedia/virus/symbos_symgam.a!tr.html; classtype:trojan-activity; sid:2013266; rev:2; metadata:created_at 2011_07_14, updated_at 2011_07_14;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android/HippoSms Method Request to CnC"; flow:established,to_server; content:"/clientRequest.htm?method="; http_uri; nocase; content:"&os="; http_uri; content:"&brand="; nocase; http_uri; content:"&sdkVersion="; nocase; http_uri; pcre:"/method\x3D(update|startcharge)/Ui"; reference:url,www.fortiguard.com/encyclopedia/virus/android_hipposms.a!tr.html; classtype:trojan-activity; sid:2013299; rev:3; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_07_23, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android.AdSms Retrieving XML File from CnC Server"; flow:established,to_server; content:"/Submit.aspx?ver="; http_uri; content:"&sys="; http_uri; content:"&imei="; http_uri; content:"&ua="; http_uri; content:"&pro="; http_uri; reference:url,www.fortiguard.com/encyclopedia/virus/android_adsms.a!tr.html; classtype:trojan-activity; sid:2013316; rev:4; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_07_26, updated_at 2016_07_01;) + +alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET MOBILE_MALWARE Android.AdSms XML File From CnC Server"; flow:established,from_server; content:""; content:""; content:"<|2F|mobile>"; within:50; content:""; distance:0; content:""; distance:0; content:""; distance:0; reference:url,www.fortiguard.com/encyclopedia/virus/android_adsms.a!tr.html; classtype:trojan-activity; sid:2013317; rev:4; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_07_26, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android.Zitmo Forwarding SMS Message to CnC Server"; flow:established,to_server; content:"POST"; http_method; content:"/security.jsp"; nocase; http_uri; content:"|0d 0a 0d 0a|f0="; content:"&b0="; distance:0; content:"&pid="; distance:0; reference:url,blog.fortinet.com/zitmo-hits-android/; classtype:trojan-activity; sid:2013327; rev:3; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_07_27, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android/Netisend.A Posting Information to CnC"; flow:established,to_server; content:"POST"; http_method; nocase; content:"/netsend/nmsm_json.jsp"; fast_pattern:only; http_uri; content:"Apache-HttpClient/"; depth:18; http_user_agent; reference:url,www.fortiguard.com/latest/mobile/2959807; classtype:trojan-activity; sid:2013694; rev:5; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_09_23, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android/SndApp.B Sending Device Information"; flow:established,to_server; content:"/android_notifier/notifier.php?app="; http_uri; content:"&deviceId="; http_uri; content:"&mobile="; http_uri; content:"&country="; http_uri; content:"&carrier="; http_uri; reference:url,www.fortiguard.com/latest/mobile/3302891; classtype:trojan-activity; sid:2013965; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_11_23, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android/Ozotshielder.A Checkin"; flow:established,to_server; content:"/AndroidService.aspx?imsi="; http_uri; content:"&mobile="; http_uri; content:"&pid="; http_uri; content:"&ownerid="; http_uri; content:"&testchlid="; http_uri; content:"&androidver="; http_uri; reference:url,www.fortiguard.com/latest/mobile/3302951; classtype:trojan-activity; sid:2013966; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_11_23, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android/KungFu Package Delete Command"; flow:established,to_server; content:"/search/isavailable"; http_uri; content:".php?imei="; http_uri; content:"&ch="; http_uri; content:"&ver="; http_uri; content:"User-Agent|3A 20|adlib/"; http_header; reference:url,blog.trendmicro.com/connections-between-droiddreamlight-and-droidkungfu/; classtype:trojan-activity; sid:2013968; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2011_11_23, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android/FakeTimer.A Reporting to CnC"; flow:to_server,established; content:"/send.php?a_id="; http_uri; content:"&telno="; fast_pattern:only; http_uri; content:"&m_addr="; http_uri; content:"Android"; http_user_agent; reference:url,about-threats.trendmicro.com/Malware.aspx?language=uk&name=ANDROIDOS_FAKETIMER.A; reference:url,anubis.iseclab.org/?action=result&task_id=1ba82b938005acea4ddefc8eff1f4db06; reference:md5,cf9ba4996531d40402efe268c7efda91; reference:md5,537f190d3d469ad1f178024940affcb5; classtype:trojan-activity; sid:2014161; rev:3; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2012_01_27, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android/SndApps.SM Sending Information to CnC"; flow:established,to_server; content:"/android_notifier/notifier.php?h="; http_uri; reference:url,about-threats.trendmicro.com/Malware.aspx?language=uk&name=ANDROIDOS_SNDAPPS.SM; classtype:trojan-activity; sid:2014162; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2012_01_27, updated_at 2016_07_01;) + +alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET MOBILE_MALWARE Android/Plankton.P Commands Request to CnC Server"; flow:established,to_server; content:"/ProtocolGW/protocol/commands"; http_uri; reference:url,about-threats.trendmicro.com/Malware.aspx?language=uk&name=ANDROIDOS_PLANKTON.P; classtype:trojan-activity; sid:2014215; rev:2; metadata:affected_product Android, attack_target Client_Endpoint, deployment Perimeter, tag Android, signature_severity Critical, created_at 2012_02_07, updated_at 2016_07_01;) + +alert tcp $HOME_NET 8888 -> any any (msg:"ET MOBILE_MALWARE iOS Keylogger iKeyMonitor access"; flow:from_server,established; content:"/>Keystrokes - iKeyMonitor").appendTo(e));d.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",d.opacity));d.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",d.zIndex));this.scrollParent[0]!== +this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset());this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;0<=c;c--)this.containers[c]._trigger("activate",a,this._uiHash(this));b.ui.ddmanager&&(b.ui.ddmanager.current=this);b.ui.ddmanager&&!d.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,a);this.dragging=!0;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a); +return!0},_mouseDrag:function(a){var d,c,e,f;d=this.options;c=!1;this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageYg&&b+nl&&e+pa[this.floating?"width":"height"]?p:g",a.document[0]).addClass(d||a.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");"tbody"===c?a._createTrPlaceholder(a.currentItem.find("tr").eq(0),b("",a.document[0]).appendTo(f)):"tr"===c?a._createTrPlaceholder(a.currentItem,f):"img"===c&&f.attr("src",a.currentItem.attr("src"));d||f.css("visibility","hidden");return f},update:function(b,f){if(!d||c.forcePlaceholderSize)f.height()||f.height(a.currentItem.innerHeight()-parseInt(a.currentItem.css("paddingTop")|| +0,10)-parseInt(a.currentItem.css("paddingBottom")||0,10)),f.width()||f.width(a.currentItem.innerWidth()-parseInt(a.currentItem.css("paddingLeft")||0,10)-parseInt(a.currentItem.css("paddingRight")||0,10))}});a.placeholder=b(c.placeholder.element.call(a.element,a.currentItem));a.currentItem.after(a.placeholder);c.placeholder.update(a,a.placeholder)},_createTrPlaceholder:function(a,d){var c=this;a.children().each(function(){b(" ",c.document[0]).attr("colspan",b(this).attr("colspan")||1).appendTo(d)})}, +_contactContainers:function(a){var d,c,e,f,g,h,l,m,p=f=null;for(d=this.containers.length-1;0<=d;d--)b.contains(this.currentItem[0],this.containers[d].element[0])||(this._intersectsWith(this.containers[d].containerCache)?f&&b.contains(this.containers[d].element[0],f.element[0])||(f=this.containers[d],p=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",a,this._uiHash(this)),this.containers[d].containerCache.over=0));if(f)if(1===this.containers.length)this.containers[p].containerCache.over|| +(this.containers[p]._trigger("over",a,this._uiHash(this)),this.containers[p].containerCache.over=1);else{d=1E4;e=null;f=(c=f.floating||this._isFloating(this.currentItem))?"left":"top";g=c?"width":"height";m=c?"clientX":"clientY";for(c=this.items.length-1;0<=c;c--)b.contains(this.containers[p].element[0],this.items[c].item[0])&&this.items[c].item[0]!==this.currentItem[0]&&(h=this.items[c].item.offset()[f],l=!1,a[m]-h>this.items[c][g]/2&&(l=!0),Math.abs(a[m]-h)this.containment[2]&& +(c=this.containment[2]+this.offset.click.left),a.pageY-this.offset.click.top>this.containment[3]&&(d=this.containment[3]+this.offset.click.top)),e.grid&&(d=this.originalPageY+Math.round((d-this.originalPageY)/e.grid[1])*e.grid[1],d=this.containment?d-this.offset.click.top>=this.containment[1]&&d-this.offset.click.top<=this.containment[3]?d:d-this.offset.click.top>=this.containment[1]?d-e.grid[1]:d+e.grid[1]:d,c=this.originalPageX+Math.round((c-this.originalPageX)/e.grid[0])*e.grid[0],c=this.containment? +c-this.offset.click.left>=this.containment[0]&&c-this.offset.click.left<=this.containment[2]?c:c-this.offset.click.left>=this.containment[0]?c-e.grid[0]:c+e.grid[0]:c));return{top:d-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():g?0:f.scrollTop()),left:c-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())}},_rearrange:function(a, +b,c,e){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?b.item[0]:b.item[0].nextSibling);var f=this.counter=this.counter?++this.counter:1;this._delay(function(){f===this.counter&&this.refreshPositions(!e)})},_clear:function(a,b){function c(a,b,c){return function(d){c._trigger(a,d,b._uiHash(b))}}this.reverting=!1;var e,f=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort= +null;if(this.helper[0]===this.currentItem[0]){for(e in this._storedCSS)if("auto"===this._storedCSS[e]||"static"===this._storedCSS[e])this._storedCSS[e]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!b&&f.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))});!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]|| +b||f.push(function(a){this._trigger("update",a,this._uiHash())});this===this.currentContainer||b||(f.push(function(a){this._trigger("remove",a,this._uiHash())}),f.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.currentContainer)),f.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.currentContainer)));for(e=this.containers.length-1;0<=e;e--)b||f.push(c("deactivate",this,this.containers[e])),this.containers[e].containerCache.over&& +(f.push(c("out",this,this.containers[e])),this.containers[e].containerCache.over=0);this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove());this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex);this.dragging=!1;b||this._trigger("beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.cancelHelperRemoval|| +(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null);if(!b){for(e=0;e",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null, +page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max);this._setOption("min",this.options.min);this._setOption("step",this.options.step);""!==this.value()&&this._value(this.element.val(),!0);this._draw();this._on(this._events);this._refresh();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var a={},c=this.element;b.each(["min","max","step"],function(b,f){var g=c.attr(f); +void 0!==g&&g.length&&(a[f]=g)});return a},_events:{keydown:function(a){this._start(a)&&this._keydown(a)&&a.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(a){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",a))},mousewheel:function(a,b){if(b){if(!this.spinning&&!this._start(a))return!1;this._spin((0Math.ceil(.5*a.height())&&0"},_buttonHtml:function(){return""},_start:function(a){if(!this.spinning&&!1===this._trigger("start",a))return!1;this.counter|| +(this.counter=1);return this.spinning=!0},_repeat:function(a,b,e){a=a||500;clearTimeout(this.timer);this.timer=this._delay(function(){this._repeat(40,b,e)},a);this._spin(b*this.options.step,e)},_spin:function(a,b){var e=this.value()||0;this.counter||(this.counter=1);e=this._adjustValue(e+a*this._increment(this.counter));this.spinning&&!1===this._trigger("spin",b,{value:e})||(this._value(e),this.counter++)},_increment:function(a){var c=this.options.incremental;return c?b.isFunction(c)?c(a):Math.floor(a* +a*a/5E4-a*a/500+17*a/200+1):1},_precision:function(){var a=this._precisionOf(this.options.step);null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min)));return a},_precisionOf:function(a){a=a.toString();var b=a.indexOf(".");return-1===b?0:a.length-b-1},_adjustValue:function(a){var b,e=this.options;b=null!==e.min?e.min:0;a=Math.round((a-b)/e.step)*e.step;a=b+a;a=parseFloat(a.toFixed(this._precision()));return null!==e.max&&a>e.max?e.max:null!==e.min&&ae&&(a=0);0>a&&(a=e);return a}for(var e=this.tabs.length-1;-1!==b.inArray(c(),this.options.disabled);)a=d?a+1:a-1;return a},_focusNextTab:function(a,b){a=this._findNextTab(a, +b);this.tabs.eq(a).focus();return a},_setOption:function(a,b){"active"===a?this._activate(b):"disabled"===a?this._setupDisabled(b):(this._super(a,b),"collapsible"===a&&(this.element.toggleClass("ui-tabs-collapsible",b),b||!1!==this.options.active||this._activate(0)),"event"===a&&this._setupEvents(b),"heightStyle"===a&&this._setupHeightStyle(b))},_sanitizeSelector:function(a){return a?a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var a=this.options,d=this.tablist.children(":has(a[href])"); +a.disabled=b.map(d.filter(".ui-state-disabled"),function(a){return d.index(a)});this._processTabs();!1!==a.active&&this.anchors.length?this.active.length&&!b.contains(this.tablist[0],this.active[0])?this.tabs.length===a.disabled.length?(a.active=!1,this.active=b()):this._activate(this._findNextTab(Math.max(0,a.active-1),!1)):a.active=this.tabs.index(this.active):(a.active=!1,this.active=b());this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled);this._setupEvents(this.options.event); +this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"});this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var a= +this,d=this.tabs,c=this.anchors,e=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(a){b(this).is(".ui-state-disabled")&&a.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){b(this).closest("li").is(".ui-state-disabled")&&this.blur()});this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab", +tabIndex:-1});this.anchors=this.tabs.map(function(){return b("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1});this.panels=b();this.anchors.each(function(c,d){var e,l,m=b(d).uniqueId().attr("id"),p=b(d).closest("li"),n=p.attr("aria-controls");a._isLocal(d)?(e=d.hash,l=e.substring(1),e=a.element.find(a._sanitizeSelector(e))):(l=p.attr("aria-controls")||b({}).uniqueId()[0].id,e=a.element.find("#"+l),e.length||(e=a._createPanel(l),e.insertAfter(a.panels[c-1]||a.tablist)), +e.attr("aria-live","polite"));e.length&&(a.panels=a.panels.add(e));n&&p.data("ui-tabs-aria-controls",n);p.attr({"aria-controls":l,"aria-labelledby":m});e.attr("aria-labelledby",m)});this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel");d&&(this._off(d.not(this.tabs)),this._off(c.not(this.anchors)),this._off(e.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(a){return b("
").attr("id", +a).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(a){b.isArray(a)&&(a.length?a.length===this.anchors.length&&(a=!0):a=!1);for(var d=0,c;c=this.tabs[d];d++)!0===a||-1!==b.inArray(d,a)?b(c).addClass("ui-state-disabled").attr("aria-disabled","true"):b(c).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=a},_setupEvents:function(a){var d={};a&&b.each(a.split(" "),function(a,b){d[b]="_eventHandler"});this._off(this.anchors.add(this.tabs).add(this.panels)); +this._on(!0,this.anchors,{click:function(a){a.preventDefault()}});this._on(this.anchors,d);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs)},_setupHeightStyle:function(a){var d,c=this.element.parent();"fill"===a?(d=c.height(),d-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var a=b(this),c=a.css("position");"absolute"!==c&&"fixed"!==c&&(d-=a.outerHeight(!0))}), +this.element.children().not(this.panels).each(function(){d-=b(this).outerHeight(!0)}),this.panels.each(function(){b(this).height(Math.max(0,d-b(this).innerHeight()+b(this).height()))}).css("overflow","auto")):"auto"===a&&(d=0,this.panels.each(function(){d=Math.max(d,b(this).height("").height())}).height(d))},_eventHandler:function(a){var d=this.options,c=this.active,e=b(a.currentTarget).closest("li"),f=e[0]===c[0],g=f&&d.collapsible,h=g?b():this._getPanelForTab(e),l=c.length?this._getPanelForTab(c): +b(),c={oldTab:c,oldPanel:l,newTab:g?b():e,newPanel:h};a.preventDefault();e.hasClass("ui-state-disabled")||e.hasClass("ui-tabs-loading")||this.running||f&&!d.collapsible||!1===this._trigger("beforeActivate",a,c)||(d.active=g?!1:this.tabs.index(e),this.active=f?b():e,this.xhr&&this.xhr.abort(),l.length||h.length||b.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(e),a),this._toggle(a,c))},_toggle:function(a,d){function c(){f.running=!1;f._trigger("activate", +a,d)}function e(){d.newTab.closest("li").addClass("ui-tabs-active ui-state-active");g.length&&f.options.show?f._show(g,f.options.show,c):(g.show(),c())}var f=this,g=d.newPanel,h=d.oldPanel;this.running=!0;h.length&&this.options.hide?this._hide(h,this.options.hide,function(){d.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");e()}):(d.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),h.hide(),e());h.attr("aria-hidden","true");d.oldTab.attr({"aria-selected":"false", +"aria-expanded":"false"});g.length&&h.length?d.oldTab.attr("tabIndex",-1):g.length&&this.tabs.filter(function(){return 0===b(this).attr("tabIndex")}).attr("tabIndex",-1);g.attr("aria-hidden","false");d.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(a){a=this._findActive(a);a[0]!==this.active[0]&&(a.length||(a=this.active),a=a.find(".ui-tabs-anchor")[0],this._eventHandler({target:a,currentTarget:a,preventDefault:b.noop}))},_findActive:function(a){return!1=== +a?b():this.tabs.eq(a)},_getIndex:function(a){"string"===typeof a&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']")));return a},_destroy:function(){this.xhr&&this.xhr.abort();this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible");this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role");this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(); +this.tablist.unbind(this.eventNamespace);this.tabs.add(this.panels).each(function(){b.data(this,"ui-tabs-destroy")?b(this).remove():b(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")});this.tabs.each(function(){var a= +b(this),d=a.data("ui-tabs-aria-controls");d?a.attr("aria-controls",d).removeData("ui-tabs-aria-controls"):a.removeAttr("aria-controls")});this.panels.show();"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(a){var d=this.options.disabled;!1!==d&&(void 0===a?d=!1:(a=this._getIndex(a),d=b.isArray(d)?b.map(d,function(b){return b!==a?b:null}):b.map(this.tabs,function(b,d){return d!==a?d:null})),this._setupDisabled(d))},disable:function(a){var d=this.options.disabled; +if(!0!==d){if(void 0===a)d=!0;else{a=this._getIndex(a);if(-1!==b.inArray(a,d))return;d=b.isArray(d)?b.merge([a],d).sort():[a]}this._setupDisabled(d)}},load:function(a,d){a=this._getIndex(a);var c=this,e=this.tabs.eq(a),f=e.find(".ui-tabs-anchor"),g=this._getPanelForTab(e),h={tab:e,panel:g},l=function(a,b){"abort"===b&&c.panels.stop(!1,!0);e.removeClass("ui-tabs-loading");g.removeAttr("aria-busy");a===c.xhr&&delete c.xhr};this._isLocal(f[0])||(this.xhr=b.ajax(this._ajaxSettings(f,d,h)))&&"canceled"!== +this.xhr.statusText&&(e.addClass("ui-tabs-loading"),g.attr("aria-busy","true"),this.xhr.done(function(a,b,e){setTimeout(function(){g.html(a);c._trigger("load",d,h);l(e,b)},1)}).fail(function(a,b){setTimeout(function(){l(a,b)},1)}))},_ajaxSettings:function(a,d,c){var e=this;return{url:a.attr("href"),beforeSend:function(a,g){return e._trigger("beforeLoad",d,b.extend({jqXHR:a,ajaxSettings:g},c))}}},_getPanelForTab:function(a){a=b(a).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+ +a))}})}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./widget","./position"],b):b(jQuery)})(function(b){return b.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var a=b(this).attr("title")||"";return b("").text(a).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(a,d){var c=(a.attr("aria-describedby")||"").split(/\s+/); +c.push(d);a.data("ui-tooltip-id",d).attr("aria-describedby",b.trim(c.join(" ")))},_removeDescribedBy:function(a){var d=a.data("ui-tooltip-id"),c=(a.attr("aria-describedby")||"").split(/\s+/),d=b.inArray(d,c);-1!==d&&c.splice(d,1);a.removeData("ui-tooltip-id");(c=b.trim(c.join(" ")))?a.attr("aria-describedby",c):a.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};this.options.disabled&&this._disable();this.liveRegion=b("
").attr({role:"log", +"aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(a,d){var c=this;"disabled"===a?(this[d?"_disable":"_enable"](),this.options[a]=d):(this._super(a,d),"content"===a&&b.each(this.tooltips,function(a,b){c._updateContent(b.element)}))},_disable:function(){var a=this;b.each(this.tooltips,function(d,c){var e=b.Event("blur");e.target=e.currentTarget=c.element[0];a.close(e,!0)});this.element.find(this.options.items).addBack().each(function(){var a= +b(this);a.is("[title]")&&a.data("ui-tooltip-title",a.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var a=b(this);a.data("ui-tooltip-title")&&a.attr("title",a.data("ui-tooltip-title"))})},open:function(a){var d=this,c=b(a?a.target:this.element).closest(this.options.items);c.length&&!c.data("ui-tooltip-id")&&(c.attr("title")&&c.data("ui-tooltip-title",c.attr("title")),c.data("ui-tooltip-open",!0),a&&"mouseover"===a.type&&c.parents().each(function(){var a= +b(this),c;a.data("ui-tooltip-open")&&(c=b.Event("blur"),c.target=c.currentTarget=this,d.close(c,!0));a.attr("title")&&(a.uniqueId(),d.parents[this.id]={element:this,title:a.attr("title")},a.attr("title",""))}),this._registerCloseHandlers(a,c),this._updateContent(c,a))},_updateContent:function(a,b){var c;c=this.options.content;var e=this,f=b?b.type:null;if("string"===typeof c)return this._open(b,a,c);(c=c.call(a[0],function(c){e._delay(function(){a.data("ui-tooltip-open")&&(b&&(b.type=f),this._open(b, +a,c))})}))&&this._open(b,a,c)},_open:function(a,d,c){function e(a){l.of=a;g.is(":hidden")||g.position(l)}var f,g,h,l=b.extend({},this.options.position);c&&((f=this._find(d))?f.tooltip.find(".ui-tooltip-content").html(c):(d.is("[title]")&&(a&&"mouseover"===a.type?d.attr("title",""):d.removeAttr("title")),f=this._tooltip(d),g=f.tooltip,this._addDescribedBy(d,g.attr("id")),g.find(".ui-tooltip-content").html(c),this.liveRegion.children().hide(),c.clone&&(c=c.clone(),c.removeAttr("id").find("[id]").removeAttr("id")), +b("
").html(c).appendTo(this.liveRegion),this.options.track&&a&&/^mouse/.test(a.type)?(this._on(this.document,{mousemove:e}),e(a)):g.position(b.extend({of:d},this.options.position)),g.hide(),this._show(g,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){g.is(":visible")&&(e(l.of),clearInterval(h))},b.fx.interval)),this._trigger("open",a,{tooltip:g})))},_registerCloseHandlers:function(a,d){var c={keyup:function(a){a.keyCode===b.ui.keyCode.ESCAPE&& +(a=b.Event(a),a.currentTarget=d[0],this.close(a,!0))}};d[0]!==this.element[0]&&(c.remove=function(){this._removeTooltip(this._find(d).tooltip)});a&&"mouseover"!==a.type||(c.mouseleave="close");a&&"focusin"!==a.type||(c.focusout="close");this._on(!0,d,c)},close:function(a){var d,c=this,e=b(a?a.currentTarget:this.element),f=this._find(e);f?(d=f.tooltip,f.closing||(clearInterval(this.delayedShow),e.data("ui-tooltip-title")&&!e.attr("title")&&e.attr("title",e.data("ui-tooltip-title")),this._removeDescribedBy(e), +f.hiding=!0,d.stop(!0),this._hide(d,this.options.hide,function(){c._removeTooltip(b(this))}),e.removeData("ui-tooltip-open"),this._off(e,"mouseleave focusout keyup"),e[0]!==this.element[0]&&this._off(e,"remove"),this._off(this.document,"mousemove"),a&&"mouseleave"===a.type&&b.each(this.parents,function(a,d){b(d.element).attr("title",d.title);delete c.parents[a]}),f.closing=!0,this._trigger("close",a,{tooltip:d}),f.hiding||(f.closing=!1))):e.removeData("ui-tooltip-open")},_tooltip:function(a){var d= +b("
").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),c=d.uniqueId().attr("id");b("
").addClass("ui-tooltip-content").appendTo(d);d.appendTo(this.document[0].body);return this.tooltips[c]={element:a,tooltip:d}},_find:function(a){return(a=a.data("ui-tooltip-id"))?this.tooltips[a]:null},_removeTooltip:function(a){a.remove();delete this.tooltips[a.attr("id")]},_destroy:function(){var a=this;b.each(this.tooltips,function(d, +c){var e=b.Event("blur"),f=c.element;e.target=e.currentTarget=f[0];a.close(e,!0);b("#"+d).remove();f.data("ui-tooltip-title")&&(f.attr("title")||f.attr("title",f.data("ui-tooltip-title")),f.removeData("ui-tooltip-title"))});this.liveRegion.remove()}})}); +(function(b,a){b.rails!==a&&b.error("jquery-ujs has already been loaded!");var d,c=b(document);b.rails=d={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])", +disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]), textarea[name][required]:not([disabled])", +fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",csrfToken:function(){return b("meta[name=csrf-token]").attr("content")},csrfParam:function(){return b("meta[name=csrf-param]").attr("content")},CSRFProtection:function(a){var b=d.csrfToken();b&&a.setRequestHeader("X-CSRF-Token",b)},refreshCSRFTokens:function(){b('form input[name="'+d.csrfParam()+ +'"]').val(d.csrfToken())},fire:function(a,c,d){c=b.Event(c);a.trigger(c,d);return!1!==c.result},confirm:function(a){return confirm(a)},ajax:function(a){return b.ajax(a)},href:function(a){return a[0].href},isRemote:function(b){return b.data("remote")!==a&&!1!==b.data("remote")},handleRemote:function(c){var f,g,h,l,m;if(d.fire(c,"ajax:before")){l=c.data("with-credentials")||null;m=c.data("type")||b.ajaxSettings&&b.ajaxSettings.dataType;if(c.is("form")){f=c.data("ujs:submit-button-formmethod")||c.attr("method"); +g=c.data("ujs:submit-button-formaction")||c.attr("action");h=b(c[0]).serializeArray();var p=c.data("ujs:submit-button");p&&(h.push(p),c.data("ujs:submit-button",null));c.data("ujs:submit-button-formmethod",null);c.data("ujs:submit-button-formaction",null)}else c.is(d.inputChangeSelector)?(f=c.data("method"),g=c.data("url"),h=c.serialize(),c.data("params")&&(h=h+"&"+c.data("params"))):c.is(d.buttonClickSelector)?(f=c.data("method")||"get",g=c.data("url"),h=c.serialize(),c.data("params")&&(h=h+"&"+ +c.data("params"))):(f=c.data("method"),g=d.href(c),h=c.data("params")||null);f={type:f||"GET",data:h,dataType:m,beforeSend:function(b,f){f.dataType===a&&b.setRequestHeader("accept","*/*;q=0.5, "+f.accepts.script);if(d.fire(c,"ajax:beforeSend",[b,f]))c.trigger("ajax:send",b);else return!1},success:function(a,b,d){c.trigger("ajax:success",[a,b,d])},complete:function(a,b){c.trigger("ajax:complete",[a,b])},error:function(a,b,d){c.trigger("ajax:error",[a,b,d])},crossDomain:d.isCrossDomain(g)};l&&(f.xhrFields= +{withCredentials:l});g&&(f.url=g);return d.ajax(f)}return!1},isCrossDomain:function(a){var b=document.createElement("a");b.href=location.href;var c=document.createElement("a");try{return c.href=a,c.href=c.href,!(!(c.protocol&&":"!==c.protocol||c.host)||b.protocol+"//"+b.host===c.protocol+"//"+c.host)}catch(d){return!0}},handleMethod:function(c){var f=d.href(c),g=c.data("method");c=c.attr("target");var h=d.csrfToken(),l=d.csrfParam(),m=b('
'),g='';l===a||h===a||d.isCrossDomain(f)||(g+='');c&&m.attr("target",c);m.hide().append(g).appendTo("body");m.submit()},formElements:function(a,c){return a.is("form")?b(a[0].elements).filter(c):a.find(c)},disableFormElements:function(a){d.formElements(a,d.disableSelector).each(function(){d.disableFormElement(b(this))})},disableFormElement:function(b){var c,d;c=b.is("button")?"html":"val";d=b.data("disable-with");d!==a&&(b.data("ujs:enable-with", +b[c]()),b[c](d));b.prop("disabled",!0);b.data("ujs:disabled",!0)},enableFormElements:function(a){d.formElements(a,d.enableSelector).each(function(){d.enableFormElement(b(this))})},enableFormElement:function(b){var c=b.is("button")?"html":"val";b.data("ujs:enable-with")!==a&&(b[c](b.data("ujs:enable-with")),b.removeData("ujs:enable-with"));b.prop("disabled",!1);b.removeData("ujs:disabled")},allowAction:function(a){var b=a.data("confirm"),c=!1,h;if(!b)return!0;if(d.fire(a,"confirm")){try{c=d.confirm(b)}catch(l){(console.error|| +console.log).call(console,l.stack||l)}h=d.fire(a,"confirm:complete",[c])}return c&&h},blankInputs:function(a,c,d){var h=b(),l,m,p,n,q={};a.find(c||"input,textarea").each(function(){l=b(this);l.is("input[type=radio]")?(n=l.attr("name"),q[n]||(0===a.find('input[type=radio]:checked[name="'+n+'"]').length&&(p=a.find('input[type=radio][name="'+n+'"]'),h=h.add(p)),q[n]=n)):(m=l.is("input[type=checkbox],input[type=radio]")?l.is(":checked"):!!l.val(),m===d&&(h=h.add(l)))});return h.length?h:!1},nonBlankInputs:function(a, +b){return d.blankInputs(a,b,!0)},stopEverything:function(a){b(a.target).trigger("ujs:everythingStopped");a.stopImmediatePropagation();return!1},disableElement:function(b){var c=b.data("disable-with");c!==a&&(b.data("ujs:enable-with",b.html()),b.html(c));b.bind("click.railsDisable",function(a){return d.stopEverything(a)});b.data("ujs:disabled",!0)},enableElement:function(b){b.data("ujs:enable-with")!==a&&(b.html(b.data("ujs:enable-with")),b.removeData("ujs:enable-with"));b.unbind("click.railsDisable"); +b.removeData("ujs:disabled")}};d.fire(c,"rails:attachBindings")&&(b.ajaxPrefilter(function(a,b,c){a.crossDomain||d.CSRFProtection(c)}),b(window).on("pageshow.rails",function(){b(b.rails.enableSelector).each(function(){var a=b(this);a.data("ujs:disabled")&&b.rails.enableFormElement(a)});b(b.rails.linkDisableSelector).each(function(){var a=b(this);a.data("ujs:disabled")&&b.rails.enableElement(a)})}),c.on("ajax:complete",d.linkDisableSelector,function(){d.enableElement(b(this))}),c.on("ajax:complete", +d.buttonDisableSelector,function(){d.enableFormElement(b(this))}),c.on("click.rails",d.linkClickSelector,function(a){var c=b(this),g=c.data("method"),h=c.data("params"),l=a.metaKey||a.ctrlKey;if(!d.allowAction(c))return d.stopEverything(a);!l&&c.is(d.linkDisableSelector)&&d.disableElement(c);if(d.isRemote(c)){if(l&&(!g||"GET"===g)&&!h)return!0;a=d.handleRemote(c);!1===a?d.enableElement(c):a.fail(function(){d.enableElement(c)});return!1}if(g)return d.handleMethod(c),!1}),c.on("click.rails",d.buttonClickSelector, +function(a){var c=b(this);if(!d.allowAction(c)||!d.isRemote(c))return d.stopEverything(a);c.is(d.buttonDisableSelector)&&d.disableFormElement(c);a=d.handleRemote(c);!1===a?d.enableFormElement(c):a.fail(function(){d.enableFormElement(c)});return!1}),c.on("change.rails",d.inputChangeSelector,function(a){var c=b(this);if(!d.allowAction(c)||!d.isRemote(c))return d.stopEverything(a);d.handleRemote(c);return!1}),c.on("submit.rails",d.formSubmitSelector,function(c){var f=b(this),g=d.isRemote(f),h;if(!d.allowAction(f))return d.stopEverything(c); +if(f.attr("novalidate")===a)if(f.data("ujs:formnovalidate-button")===a){if((h=d.blankInputs(f,d.requiredInputSelector,!1))&&d.fire(f,"ajax:aborted:required",[h]))return d.stopEverything(c)}else f.data("ujs:formnovalidate-button",a);if(g){if(c=d.nonBlankInputs(f,d.fileInputSelector))return setTimeout(function(){d.disableFormElements(f)},13),(c=d.fire(f,"ajax:aborted:file",[c]))||setTimeout(function(){d.enableFormElements(f)},13),c;d.handleRemote(f);return!1}setTimeout(function(){d.disableFormElements(f)}, +13)}),c.on("click.rails",d.formInputClickSelector,function(a){var c=b(this);if(!d.allowAction(c))return d.stopEverything(a);a=(a=c.attr("name"))?{name:a,value:c.val()}:null;var g=c.closest("form");0===g.length&&(g=b("#"+c.attr("form")));g.data("ujs:submit-button",a);g.data("ujs:formnovalidate-button",c.attr("formnovalidate"));g.data("ujs:submit-button-formaction",c.attr("formaction"));g.data("ujs:submit-button-formmethod",c.attr("formmethod"))}),c.on("ajax:send.rails",d.formSubmitSelector,function(a){this=== +a.target&&d.disableFormElements(b(this))}),c.on("ajax:complete.rails",d.formSubmitSelector,function(a){this===a.target&&d.enableFormElements(b(this))}),b(function(){d.refreshCSRFTokens()}))})(jQuery); ++function(b){var a=function(a){b(a).on("click",'[data-dismiss="alert"]',this.close)};a.VERSION="3.3.7";a.TRANSITION_DURATION=150;a.prototype.close=function(c){function d(){h.detach().trigger("closed.bs.alert").remove()}var f=b(this),g=f.attr("data-target");g||(g=(g=f.attr("href"))&&g.replace(/.*(?=#[^\s]*$)/,""));var h=b("#"===g?[]:g);c&&c.preventDefault();h.length||(h=f.closest(".alert"));h.trigger(c=b.Event("close.bs.alert"));c.isDefaultPrevented()||(h.removeClass("in"),b.support.transition&&h.hasClass("fade")? +h.one("bsTransitionEnd",d).emulateTransitionEnd(a.TRANSITION_DURATION):d())};var d=b.fn.alert;b.fn.alert=function(c){return this.each(function(){var d=b(this),f=d.data("bs.alert");f||d.data("bs.alert",f=new a(this));"string"==typeof c&&f[c].call(d)})};b.fn.alert.Constructor=a;b.fn.alert.noConflict=function(){b.fn.alert=d;return this};b(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',a.prototype.close)}(jQuery); ++function(b){function a(a){var c;a=a.attr("data-target")||(c=a.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return b(a)}function d(a){return this.each(function(){var d=b(this),e=d.data("bs.collapse"),l=b.extend({},c.DEFAULTS,d.data(),"object"==typeof a&&a);!e&&l.toggle&&/show|hide/.test(a)&&(l.toggle=!1);e||d.data("bs.collapse",e=new c(this,l));if("string"==typeof a)e[a]()})}var c=function(a,d){this.$element=b(a);this.options=b.extend({},c.DEFAULTS,d);this.$trigger=b('[data-toggle="collapse"][href="#'+ +a.id+'"],[data-toggle="collapse"][data-target="#'+a.id+'"]');this.transitioning=null;this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger);this.options.toggle&&this.toggle()};c.VERSION="3.3.7";c.TRANSITION_DURATION=350;c.DEFAULTS={toggle:!0};c.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"};c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var a,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing"); +if(e&&e.length&&(a=e.data("bs.collapse"))&&a.transitioning)return;var h=b.Event("show.bs.collapse");this.$element.trigger(h);if(!h.isDefaultPrevented()){e&&e.length&&(d.call(e,"hide"),a||e.data("bs.collapse",null));var l=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[l](0).attr("aria-expanded",!0);this.$trigger.removeClass("collapsed").attr("aria-expanded",!0);this.transitioning=1;a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[l]("");this.transitioning= +0;this.$element.trigger("shown.bs.collapse")};if(!b.support.transition)return a.call(this);e=b.camelCase(["scroll",l].join("-"));this.$element.one("bsTransitionEnd",b.proxy(a,this)).emulateTransitionEnd(c.TRANSITION_DURATION)[l](this.$element[0][e])}}};c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var a=b.Event("hide.bs.collapse");this.$element.trigger(a);if(!a.isDefaultPrevented()){a=this.dimension();this.$element[a](this.$element[a]())[0].offsetHeight;this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", +!1);this.$trigger.addClass("collapsed").attr("aria-expanded",!1);this.transitioning=1;var d=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!b.support.transition)return d.call(this);this.$element[a](0).one("bsTransitionEnd",b.proxy(d,this)).emulateTransitionEnd(c.TRANSITION_DURATION)}}};c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};c.prototype.getParent=function(){return b(this.options.parent).find('[data-toggle="collapse"][data-parent="'+ +this.options.parent+'"]').each(b.proxy(function(c,d){var e=b(d);this.addAriaAndCollapsedClass(a(e),e)},this)).end()};c.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c);b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=b.fn.collapse;b.fn.collapse=d;b.fn.collapse.Constructor=c;b.fn.collapse.noConflict=function(){b.fn.collapse=e;return this};b(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var e=b(this);e.attr("data-target")|| +c.preventDefault();c=a(e);e=c.data("bs.collapse")?"toggle":e.data();d.call(c,e)})}(jQuery); ++function(b){function a(a,c){return this.each(function(){var g=b(this),h=g.data("bs.modal"),l=b.extend({},d.DEFAULTS,g.data(),"object"==typeof a&&a);h||g.data("bs.modal",h=new d(this,l));if("string"==typeof a)h[a](c);else l.show&&h.show(c)})}var d=function(a,c){this.options=c;this.$body=b(document.body);this.$element=b(a);this.$dialog=this.$element.find(".modal-dialog");this.originalBodyPad=this.isShown=this.$backdrop=null;this.scrollbarWidth=0;this.ignoreBackdropClick=!1;this.options.remote&&this.$element.find(".modal-content").load(this.options.remote, +b.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};d.VERSION="3.3.7";d.TRANSITION_DURATION=300;d.BACKDROP_TRANSITION_DURATION=150;d.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};d.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)};d.prototype.show=function(a){var c=this,g=b.Event("show.bs.modal",{relatedTarget:a});this.$element.trigger(g);this.isShown||g.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"), +this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',b.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){c.$element.one("mouseup.dismiss.bs.modal",function(a){b(a.target).is(c.$element)&&(c.ignoreBackdropClick=!0)})}),this.backdrop(function(){var g=b.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(c.$body);c.$element.show().scrollTop(0);c.adjustDialog();g&&c.$element[0].offsetWidth; +c.$element.addClass("in");c.enforceFocus();var l=b.Event("shown.bs.modal",{relatedTarget:a});g?c.$dialog.one("bsTransitionEnd",function(){c.$element.trigger("focus").trigger(l)}).emulateTransitionEnd(d.TRANSITION_DURATION):c.$element.trigger("focus").trigger(l)}))};d.prototype.hide=function(a){a&&a.preventDefault();a=b.Event("hide.bs.modal");this.$element.trigger(a);this.isShown&&!a.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),b(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"), +this.$dialog.off("mousedown.dismiss.bs.modal"),b.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",b.proxy(this.hideModal,this)).emulateTransitionEnd(d.TRANSITION_DURATION):this.hideModal())};d.prototype.enforceFocus=function(){b(document).off("focusin.bs.modal").on("focusin.bs.modal",b.proxy(function(a){document===a.target||this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))};d.prototype.escape=function(){if(this.isShown&& +this.options.keyboard)this.$element.on("keydown.dismiss.bs.modal",b.proxy(function(a){27==a.which&&this.hide()},this));else this.isShown||this.$element.off("keydown.dismiss.bs.modal")};d.prototype.resize=function(){if(this.isShown)b(window).on("resize.bs.modal",b.proxy(this.handleUpdate,this));else b(window).off("resize.bs.modal")};d.prototype.hideModal=function(){var a=this;this.$element.hide();this.backdrop(function(){a.$body.removeClass("modal-open");a.resetAdjustments();a.resetScrollbar();a.$element.trigger("hidden.bs.modal")})}; +d.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};d.prototype.backdrop=function(a){var c=this,g=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var h=b.support.transition&&g;this.$backdrop=b(document.createElement("div")).addClass("modal-backdrop "+g).appendTo(this.$body);this.$element.on("click.dismiss.bs.modal",b.proxy(function(a){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:a.target===a.currentTarget&&("static"== +this.options.backdrop?this.$element[0].focus():this.hide())},this));h&&this.$backdrop[0].offsetWidth;this.$backdrop.addClass("in");a&&(h?this.$backdrop.one("bsTransitionEnd",a).emulateTransitionEnd(d.BACKDROP_TRANSITION_DURATION):a())}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),g=function(){c.removeBackdrop();a&&a()},b.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(d.BACKDROP_TRANSITION_DURATION):g()):a&&a()}; +d.prototype.handleUpdate=function(){this.adjustDialog()};d.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})};d.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};d.prototype.checkScrollbar=function(){var a=window.innerWidth;a||(a=document.documentElement.getBoundingClientRect(), +a=a.right-Math.abs(a.left));this.bodyIsOverflowing=document.body.clientWidth .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1);a.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", +!0);p?(a[0].offsetWidth,a.addClass("in")):a.removeClass("fade");a.parent(".dropdown-menu").length&&a.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);e&&e()}var m=c.find("> .active"),p=e&&b.support.transition&&(m.length&&m.hasClass("fade")||!!c.find("> .fade").length);m.length&&p?m.one("bsTransitionEnd",l).emulateTransitionEnd(d.TRANSITION_DURATION):l();m.removeClass("in")};var c=b.fn.tab;b.fn.tab=a;b.fn.tab.Constructor=d;b.fn.tab.noConflict=function(){b.fn.tab= +c;return this};var e=function(c){c.preventDefault();a.call(b(this),"show")};b(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery); ++function(b){var a=function(a,b){this.inState=this.$element=this.hoverState=this.timeout=this.enabled=this.options=this.type=null;this.init("tooltip",a,b)};a.VERSION="3.3.7";a.TRANSITION_DURATION=150;a.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}};a.prototype.init=function(a,d, +f){this.enabled=!0;this.type=a;this.$element=b(d);this.options=this.getOptions(f);this.$viewport=this.options.viewport&&b(b.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport);this.inState={click:!1,hover:!1,focus:!1};if(this.$element[0]instanceof document.constructor&&!this.options.selector)throw Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");a=this.options.trigger.split(" "); +for(d=a.length;d--;)if(f=a[d],"click"==f)this.$element.on("click."+this.type,this.options.selector,b.proxy(this.toggle,this));else if("manual"!=f){var g="hover"==f?"mouseleave":"focusout";this.$element.on(("hover"==f?"mouseenter":"focusin")+"."+this.type,this.options.selector,b.proxy(this.enter,this));this.$element.on(g+"."+this.type,this.options.selector,b.proxy(this.leave,this))}this.options.selector?this._options=b.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};a.prototype.getDefaults= +function(){return a.DEFAULTS};a.prototype.getOptions=function(a){a=b.extend({},this.getDefaults(),this.$element.data(),a);a.delay&&"number"==typeof a.delay&&(a.delay={show:a.delay,hide:a.delay});return a};a.prototype.getDelegateOptions=function(){var a={},d=this.getDefaults();this._options&&b.each(this._options,function(b,g){d[b]!=g&&(a[b]=g)});return a};a.prototype.enter=function(a){var d=a instanceof this.constructor?a:b(a.currentTarget).data("bs."+this.type);d||(d=new this.constructor(a.currentTarget, +this.getDelegateOptions()),b(a.currentTarget).data("bs."+this.type,d));a instanceof b.Event&&(d.inState["focusin"==a.type?"focus":"hover"]=!0);if(d.tip().hasClass("in")||"in"==d.hoverState)d.hoverState="in";else{clearTimeout(d.timeout);d.hoverState="in";if(!d.options.delay||!d.options.delay.show)return d.show();d.timeout=setTimeout(function(){"in"==d.hoverState&&d.show()},d.options.delay.show)}};a.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1};a.prototype.leave= +function(a){var d=a instanceof this.constructor?a:b(a.currentTarget).data("bs."+this.type);d||(d=new this.constructor(a.currentTarget,this.getDelegateOptions()),b(a.currentTarget).data("bs."+this.type,d));a instanceof b.Event&&(d.inState["focusout"==a.type?"focus":"hover"]=!1);if(!d.isInStateTrue()){clearTimeout(d.timeout);d.hoverState="out";if(!d.options.delay||!d.options.delay.hide)return d.hide();d.timeout=setTimeout(function(){"out"==d.hoverState&&d.hide()},d.options.delay.hide)}};a.prototype.show= +function(){var c=b.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(c);var d=b.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(!c.isDefaultPrevented()&&d){var f=this,c=this.tip(),d=this.getUID(this.type);this.setContent();c.attr("id",d);this.$element.attr("aria-describedby",d);this.options.animation&&c.addClass("fade");var d="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement, +g=/\s?auto?\s?/i,h=g.test(d);h&&(d=d.replace(g,"")||"top");c.detach().css({top:0,left:0,display:"block"}).addClass(d).data("bs."+this.type,this);this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var g=this.getPosition(),l=c[0].offsetWidth,m=c[0].offsetHeight;if(h){var h=d,p=this.getPosition(this.$viewport),d="bottom"==d&&g.bottom+m>p.bottom?"top":"top"==d&&g.top-mp.width?"left": +"left"==d&&g.left-lm.top+m.height&&(h.top=m.top+m.height-b)):(g=b.left-l,b=b.left+ +l+d,gm.right&&(h.left=m.left+m.width-b));return h};a.prototype.getTitle=function(){var a=this.$element,b=this.options;return a.attr("data-original-title")||("function"==typeof b.title?b.title.call(a[0]):b.title)};a.prototype.getUID=function(a){do a+=~~(1E6*Math.random());while(document.getElementById(a));return a};a.prototype.tip=function(){if(!this.$tip&&(this.$tip=b(this.options.template),1!=this.$tip.length))throw Error(this.type+" `template` option must consist of exactly 1 top-level element!"); +return this.$tip};a.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};a.prototype.enable=function(){this.enabled=!0};a.prototype.disable=function(){this.enabled=!1};a.prototype.toggleEnabled=function(){this.enabled=!this.enabled};a.prototype.toggle=function(a){var d=this;a&&(d=b(a.currentTarget).data("bs."+this.type),d||(d=new this.constructor(a.currentTarget,this.getDelegateOptions()),b(a.currentTarget).data("bs."+this.type,d)));a?(d.inState.click=!d.inState.click, +d.isInStateTrue()?d.enter(d):d.leave(d)):d.tip().hasClass("in")?d.leave(d):d.enter(d)};a.prototype.destroy=function(){var a=this;clearTimeout(this.timeout);this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type);a.$tip&&a.$tip.detach();a.$tip=null;a.$arrow=null;a.$viewport=null;a.$element=null})};var d=b.fn.tooltip;b.fn.tooltip=function(c){return this.each(function(){var d=b(this),f=d.data("bs.tooltip"),g="object"==typeof c&&c;if(f||!/destroy|hide/.test(c))if(f||d.data("bs.tooltip", +f=new a(this,g)),"string"==typeof c)f[c]()})};b.fn.tooltip.Constructor=a;b.fn.tooltip.noConflict=function(){b.fn.tooltip=d;return this}}(jQuery); ++function(b){function a(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},e;for(e in b)if(void 0!==a.style[e])return{end:b[e]};return!1}b.fn.emulateTransitionEnd=function(a){var c=!1,e=this;b(this).one("bsTransitionEnd",function(){c=!0});setTimeout(function(){c||b(e).trigger(b.support.transition.end)},a);return this};b(function(){b.support.transition=a();b.support.transition&& +(b.event.special.bsTransitionEnd={bindType:b.support.transition.end,delegateType:b.support.transition.end,handle:function(a){if(b(a.target).is(this))return a.handleObj.handler.apply(this,arguments)}})})}(jQuery); +(function(){var b;b=function(){function a(b,c){this.form_field=b;this.options=null!=c?c:{};a.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}a.prototype.set_default_values=function(){this.click_test_action=function(a){return function(b){return a.test_active_click(b)}}(this);this.activate_action=function(a){return function(b){return a.activate_field(b)}}(this); +this.results_showing=this.mouse_on_container=this.active_field=!1;this.result_highlighted=null;this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1;this.disable_search_threshold=this.options.disable_search_threshold||0;this.disable_search=this.options.disable_search||!1;this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search: +!0;this.group_search=null!=this.options.group_search?this.options.group_search:!0;this.search_contains=this.options.search_contains||!1;this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0;this.max_selected_options=this.options.max_selected_options||Infinity;this.inherit_select_classes=this.options.inherit_select_classes||!1;this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options: +!0;this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0;this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1;this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY;return this.case_sensitive_search=this.options.case_sensitive_search||!1};a.prototype.set_default_text=function(){this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"): +this.default_text=this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||a.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||a.default_single_text;return this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||a.default_no_result_text};a.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?""+a.group_label+ +""+a.html:a.html};a.prototype.mouse_enter=function(){return this.mouse_on_container=!0};a.prototype.mouse_leave=function(){return this.mouse_on_container=!1};a.prototype.input_focus=function(a){if(this.is_multiple){if(!this.active_field)return setTimeout(function(a){return function(){return a.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()};a.prototype.input_blur=function(a){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(a){return function(){return a.blur_test()}}(this), +100)};a.prototype.results_option_build=function(a){var b,e,f,g,h,l,m;b="";m=0;l=this.results_data;g=0;for(h=l.length;g=this.max_shown_results);g++);return b};a.prototype.result_add_option=function(a){var b,e;if(!a.search_match||!this.include_option_in_results(a))return""; +b=[];a.disabled||a.selected&&this.is_multiple||b.push("active-result");!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result");a.selected&&b.push("result-selected");null!=a.group_array_index&&b.push("group-option");""!==a.classes&&b.push(a.classes);e=document.createElement("li");e.className=b.join(" ");e.style.cssText=a.style;e.setAttribute("data-option-array-index",a.array_index);e.innerHTML=a.search_text;a.title&&(e.title=a.title);return this.outerHTML(e)};a.prototype.result_add_group= +function(a){var b,e;if(!a.search_match&&!a.group_match||!(0"+e.search_text.substr(p+m.length),e.search_text=n.substr(0,p)+""+n.substr(p)),null!=l&&(l.group_match=!0)):null!=e.group_array_index&&this.results_data[e.group_array_index].search_match&&(e.search_match=!0);this.result_clear_highlight();if(1>h&&m.length)return this.update_results_content(""),this.no_results(m);this.update_results_content(this.results_option_build()); +return this.winnow_results_set_highlight()};a.prototype.get_search_regex=function(a){return new RegExp((this.search_contains?"":"^")+a,this.case_sensitive_search?"":"i")};a.prototype.search_string_match=function(a,b){var e,f,g,h;if(b.test(a))return!0;if(this.enable_split_word_search&&(0<=a.indexOf(" ")||0===a.indexOf("["))&&(h=a.replace(/\[|\]/g,"").split(" "),h.length))for(e=0,f=h.length;ethis.backstroke_length&&0\"\'\`]/.test(a))return a;b={"<":"<",">":">",'"':""","'":"'","`":"`"};return a.replace(/&(?!\w+;)|[\<\>\"\'\`]/g,function(a){return b[a]||"&"})};return a}();b.select_to_array=function(a){var d,c,e,f;e=new b;f=a.childNodes;d=0;for(c=f.length;d",a);this.is_multiple?this.container.html('
    '):this.container.html('
    '+this.default_text+ +'
      ');this.form_field_jq.hide().after(this.container);this.dropdown=this.container.find("div.chosen-drop").first();this.search_field=this.container.find("input").first();this.search_results=this.container.find("ul.chosen-results").first();this.search_field_scale();this.search_no_results=this.container.find("li.no-results").first();this.is_multiple? +(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first());this.results_build();this.set_tab_index();return this.set_label_behavior()};c.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})};c.prototype.register_observers=function(){this.container.bind("touchstart.chosen", +function(a){return function(b){a.container_mousedown(b);return b.preventDefault()}}(this));this.container.bind("touchend.chosen",function(a){return function(b){a.container_mouseup(b);return b.preventDefault()}}(this));this.container.bind("mousedown.chosen",function(a){return function(b){a.container_mousedown(b)}}(this));this.container.bind("mouseup.chosen",function(a){return function(b){a.container_mouseup(b)}}(this));this.container.bind("mouseenter.chosen",function(a){return function(b){a.mouse_enter(b)}}(this)); +this.container.bind("mouseleave.chosen",function(a){return function(b){a.mouse_leave(b)}}(this));this.search_results.bind("mouseup.chosen",function(a){return function(b){a.search_results_mouseup(b)}}(this));this.search_results.bind("mouseover.chosen",function(a){return function(b){a.search_results_mouseover(b)}}(this));this.search_results.bind("mouseout.chosen",function(a){return function(b){a.search_results_mouseout(b)}}(this));this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(a){return function(b){a.search_results_mousewheel(b)}}(this)); +this.search_results.bind("touchstart.chosen",function(a){return function(b){a.search_results_touchstart(b)}}(this));this.search_results.bind("touchmove.chosen",function(a){return function(b){a.search_results_touchmove(b)}}(this));this.search_results.bind("touchend.chosen",function(a){return function(b){a.search_results_touchend(b)}}(this));this.form_field_jq.bind("chosen:updated.chosen",function(a){return function(b){a.results_update_field(b)}}(this));this.form_field_jq.bind("chosen:activate.chosen", +function(a){return function(b){a.activate_field(b)}}(this));this.form_field_jq.bind("chosen:open.chosen",function(a){return function(b){a.container_mousedown(b)}}(this));this.form_field_jq.bind("chosen:close.chosen",function(a){return function(b){a.input_blur(b)}}(this));this.search_field.bind("blur.chosen",function(a){return function(b){a.input_blur(b)}}(this));this.search_field.bind("keyup.chosen",function(a){return function(b){a.keyup_checker(b)}}(this));this.search_field.bind("keydown.chosen", +function(a){return function(b){a.keydown_checker(b)}}(this));this.search_field.bind("focus.chosen",function(a){return function(b){a.input_focus(b)}}(this));this.search_field.bind("cut.chosen",function(a){return function(b){a.clipboard_event_checker(b)}}(this));this.search_field.bind("paste.chosen",function(a){return function(b){a.clipboard_event_checker(b)}}(this));return this.is_multiple?this.search_choices.bind("click.chosen",function(a){return function(b){a.choices_click(b)}}(this)):this.container.bind("click.chosen", +function(a){a.preventDefault()})};c.prototype.destroy=function(){b(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action);this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex);this.container.remove();this.form_field_jq.removeData("chosen");return this.form_field_jq.show()};c.prototype.search_field_disabled=function(){if(this.is_disabled=this.form_field_jq[0].disabled)return this.container.addClass("chosen-disabled"),this.search_field[0].disabled= +!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field();this.container.removeClass("chosen-disabled");this.search_field[0].disabled=!1;if(!this.is_multiple)return this.selected_item.bind("focus.chosen",this.activate_action)};c.prototype.container_mousedown=function(a){if(!this.is_disabled&&(a&&"mousedown"===a.type&&!this.results_showing&&a.preventDefault(),null==a||!b(a.target).hasClass("search-choice-close")))return this.active_field?this.is_multiple|| +!a||b(a.target)[0]!==this.selected_item[0]&&!b(a.target).parents("a.chosen-single").length||(a.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),b(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field()};c.prototype.container_mouseup=function(a){if("ABBR"===a.target.nodeName&&!this.is_disabled)return this.results_reset(a)};c.prototype.search_results_mousewheel=function(a){var b;a.originalEvent&&(b=a.originalEvent.deltaY|| +-a.originalEvent.wheelDelta||a.originalEvent.detail);if(null!=b)return a.preventDefault(),"DOMMouseScroll"===a.type&&(b*=40),this.search_results.scrollTop(b+this.search_results.scrollTop())};c.prototype.blur_test=function(a){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()};c.prototype.close_field=function(){b(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action);this.active_field=!1;this.results_hide();this.container.removeClass("chosen-container-active"); +this.clear_backstroke();this.show_search_field_default();return this.search_field_scale()};c.prototype.activate_field=function(){this.container.addClass("chosen-container-active");this.active_field=!0;this.search_field.val(this.search_field.val());return this.search_field.focus()};c.prototype.test_active_click=function(a){a=b(a.target).closest(".chosen-container");return a.length&&this.container[0]===a[0]?this.active_field=!0:this.close_field()};c.prototype.results_build=function(){this.parsing=!0; +this.selected_option_count=null;this.results_data=SelectParser.select_to_array(this.form_field);this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch")));this.update_results_content(this.results_option_build({first:!0})); +this.search_field_disabled();this.show_search_field_default();this.search_field_scale();return this.parsing=!1};c.prototype.result_do_highlight=function(a){var b,c,d,e;if(a.length){this.result_clear_highlight();this.result_highlight=a;this.result_highlight.addClass("highlighted");c=parseInt(this.search_results.css("maxHeight"),10);e=this.search_results.scrollTop();d=c+e;b=this.result_highlight.position().top+this.search_results.scrollTop();a=b+this.result_highlight.outerHeight();if(a>=d)return this.search_results.scrollTop(0< +a-c?a-c:0);if(bthis.choices_count()&&!this.active_field)return this.search_field.val(this.default_text),this.search_field.addClass("default");this.search_field.val("");return this.search_field.removeClass("default")};c.prototype.search_results_mouseup=function(a){var c;c=b(a.target).hasClass("active-result")?b(a.target):b(a.target).parents(".active-result").first();if(c.length)return this.result_highlight=c,this.result_select(a),this.search_field.focus()};c.prototype.search_results_mouseover= +function(a){if(a=b(a.target).hasClass("active-result")?b(a.target):b(a.target).parents(".active-result").first())return this.result_do_highlight(a)};c.prototype.search_results_mouseout=function(a){if(b(a.target).hasClass("active-result"))return this.result_clear_highlight()};c.prototype.choice_build=function(a){var c;c=b("
    • ",{"class":"search-choice"}).html(""+this.choice_label(a)+"");a.disabled?c.addClass("search-choice-disabled"):(a=b("",{"class":"search-choice-close","data-option-array-index":a.array_index}), +a.bind("click.chosen",function(a){return function(b){return a.choice_destroy_link_click(b)}}(this)),c.append(a));return this.search_container.before(c)};c.prototype.choice_destroy_link_click=function(a){a.preventDefault();a.stopPropagation();if(!this.is_disabled)return this.choice_destroy(b(a.target))};c.prototype.choice_destroy=function(a){if(this.result_deselect(a[0].getAttribute("data-option-array-index")))return this.show_search_field_default(),this.is_multiple&&0this.search_field.val().length&& +this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()};c.prototype.results_reset=function(){this.reset_single_select_options();this.form_field.options[0].selected=!0;this.single_set_selected_text();this.show_search_field_default();this.results_reset_cleanup();this.form_field_jq.trigger("change");if(this.active_field)return this.results_hide()};c.prototype.results_reset_cleanup=function(){this.current_selectedIndex=this.form_field.selectedIndex;return this.selected_item.find("abbr").remove()}; +c.prototype.result_select=function(a){var b;if(this.result_highlight){b=this.result_highlight;this.result_clear_highlight();if(this.is_multiple&&this.max_selected_options<=this.choices_count())return this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1;this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options();b.addClass("result-selected");b=this.results_data[b[0].getAttribute("data-option-array-index")];b.selected=!0;this.form_field.options[b.options_index].selected= +!0;this.selected_option_count=null;this.is_multiple?this.choice_build(b):this.single_set_selected_text(this.choice_label(b));(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide();this.show_search_field_default();(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[b.options_index].value});this.current_selectedIndex=this.form_field.selectedIndex;a.preventDefault();return this.search_field_scale()}}; +c.prototype.single_set_selected_text=function(a){null==a&&(a=this.default_text);a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default"));return this.selected_item.find("span").html(a)};c.prototype.result_deselect=function(a){a=this.results_data[a];if(this.form_field.options[a.options_index].disabled)return!1;a.selected=!1;this.form_field.options[a.options_index].selected=!1;this.selected_option_count= +null;this.result_clear_highlight();this.results_showing&&this.winnow_results();this.form_field_jq.trigger("change",{deselected:this.form_field.options[a.options_index].value});this.search_field_scale();return!0};c.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after(''),this.selected_item.addClass("chosen-single-with-deselect")};c.prototype.get_search_text= +function(){return b("
      ").text(b.trim(this.search_field.val())).html()};c.prototype.winnow_results_set_highlight=function(){var a;a=this.is_multiple?[]:this.search_results.find(".result-selected.active-result");a=a.length?a.first():this.search_results.find(".active-result").first();if(null!=a)return this.result_do_highlight(a)};c.prototype.no_results=function(a){var c;c=b('
    • '+this.results_none_found+' ""
    • ');c.find("span").first().html(a);this.search_results.append(c); +return this.form_field_jq.trigger("chosen:no_results",{chosen:this})};c.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()};c.prototype.keydown_arrow=function(){var a;if(this.results_showing&&this.result_highlight){if(a=this.result_highlight.nextAll("li.active-result").first())return this.result_do_highlight(a)}else return this.results_show()};c.prototype.keyup_arrow=function(){var a;if(!this.results_showing&&!this.is_multiple)return this.results_show(); +if(this.result_highlight){a=this.result_highlight.prevAll("li.active-result");if(a.length)return this.result_do_highlight(a.first());0",{style:e});a.text(this.search_field.val());b("body").append(a);c=a.width()+25;a.remove();a=this.container.outerWidth();c>a-10&&(c=a-10);return this.search_field.css({width:c+"px"})}};return c}(AbstractChosen)}).call(this); +!function(b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Clipboard=b()}(function(){return function a(d,c,e){function f(l,h){if(!c[l]){if(!d[l]){var p="function"==typeof require&&require;if(!h&&p)return p(l,!0);if(g)return g(l,!0);p=Error("Cannot find module '"+l+"'");throw p.code="MODULE_NOT_FOUND",p;}p=c[l]={exports:{}}; +d[l][0].call(p.exports,function(a){var c=d[l][1][a];return f(c?c:a)},p,p.exports,a,d,c,e)}return c[l].exports}for(var g="function"==typeof require&&require,h=0;he;e++)d[e].fn.apply(d[e].ctx,c);return this},off:function(a,c){var d=this.e||(this.e={}),e=d[a],m=[];if(e&&c)for(var p=0,n=e.length;n>p;p++)e[p].fn!== +c&&e[p].fn._!==c&&m.push(e[p]);return m.length?d[a]=m:delete d[a],this}};d.exports=e},{}],8:[function(a,d,c){!function(e,f){if("undefined"!=typeof c)f(d,a("select"));else{var g={exports:{}};f(g,e.select);e.clipboardAction=g.exports}}(this,function(a,c){$jscomp.initSymbol();$jscomp.initSymbol();$jscomp.initSymbolIterator();var d=c&&c.__esModule?c:{"default":c},h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){$jscomp.initSymbol();$jscomp.initSymbol(); +return a&&"function"==typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},l=function(){function a(c,d){for(var e=0;e=arguments.length||void 0===arguments[0]?{}:arguments[0];this.action=a.action;this.emitter=a.emitter;this.target=a.target;this.text=a.text;this.trigger=a.trigger;this.selectedText=""},a.prototype.initSelection=function(){this.text?this.selectFake():this.target&&this.selectTarget()},a.prototype.selectFake=function(){var a=this,c="rtl"==document.documentElement.getAttribute("dir");this.removeFake();this.fakeHandlerCallback=function(){return a.removeFake()};this.fakeHandler=document.body.addEventListener("click", +this.fakeHandlerCallback)||!0;this.fakeElem=document.createElement("textarea");this.fakeElem.style.fontSize="12pt";this.fakeElem.style.border="0";this.fakeElem.style.padding="0";this.fakeElem.style.margin="0";this.fakeElem.style.position="absolute";this.fakeElem.style[c?"right":"left"]="-9999px";this.fakeElem.style.top=(window.pageYOffset||document.documentElement.scrollTop)+"px";this.fakeElem.setAttribute("readonly","");this.fakeElem.value=this.text;document.body.appendChild(this.fakeElem);this.selectedText= +(0,d.default)(this.fakeElem);this.copyText()},a.prototype.removeFake=function(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null);this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)},a.prototype.selectTarget=function(){this.selectedText=(0,d.default)(this.target);this.copyText()},a.prototype.copyText=function(){var a=void 0;try{a=document.execCommand(this.action)}catch(c){a=!1}this.handleResult(a)}, +a.prototype.handleResult=function(a){a?this.emitter.emit("success",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)}):this.emitter.emit("error",{action:this.action,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})},a.prototype.clearSelection=function(){this.target&&this.target.blur();window.getSelection().removeAllRanges()},a.prototype.destroy=function(){this.removeFake()},l(a,[{key:"action",set:function(){if(this._action= +0>=arguments.length||void 0===arguments[0]?"copy":arguments[0],"copy"!==this._action&&"cut"!==this._action)throw Error('Invalid "action" value, use either "copy" or "cut"');},get:function(){return this._action}},{key:"target",set:function(a){if(void 0!==a){if(!a||"object"!==("undefined"==typeof a?"undefined":h(a))||1!==a.nodeType)throw Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&a.hasAttribute("disabled"))throw Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute'); +if("cut"===this.action&&(a.hasAttribute("readonly")||a.hasAttribute("disabled")))throw Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=a}},get:function(){return this._target}}]),a}();a.exports=m})},{select:6}],9:[function(a,d,c){!function(e,f){if("undefined"!=typeof c)f(d,a("./clipboard-action"),a("tiny-emitter"),a("good-listener"));else{var g={exports:{}};f(g,e.clipboardAction,e.tinyEmitter,e.goodListener);e.clipboard=g.exports}}(this, +function(a,c,d,h){function l(a){return a&&a.__esModule?a:{"default":a}}function m(a,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);a.prototype=Object.create(c&&c.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});c&&(Object.setPrototypeOf?Object.setPrototypeOf(a,c):a.__proto__=c)}function p(a,c){var d="data-clipboard-"+a;if(c.hasAttribute(d))return c.getAttribute(d)}var n=l(c);c=l(d);var q=l(h); +h=function(a){function c(d,e){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var f;f=a.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");f=!f||"object"!=typeof f&&"function"!=typeof f?this:f;return f.resolveOptions(e),f.listenClick(d),f}return m(c,a),c.prototype.resolveOptions=function(){var a=0>=arguments.length||void 0===arguments[0]?{}:arguments[0];this.action="function"==typeof a.action?a.action:this.defaultAction; +this.target="function"==typeof a.target?a.target:this.defaultTarget;this.text="function"==typeof a.text?a.text:this.defaultText},c.prototype.listenClick=function(a){var c=this;this.listener=(0,q.default)(a,"click",function(a){return c.onClick(a)})},c.prototype.onClick=function(a){a=a.delegateTarget||a.currentTarget;this.clipboardAction&&(this.clipboardAction=null);this.clipboardAction=new n.default({action:this.action(a),target:this.target(a),text:this.text(a),trigger:a,emitter:this})},c.prototype.defaultAction= +function(a){return p("action",a)},c.prototype.defaultTarget=function(a){return(a=p("target",a))?document.querySelector(a):void 0},c.prototype.defaultText=function(a){return p("text",a)},c.prototype.destroy=function(){this.listener.destroy();this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)},c}(c.default);a.exports=h})},{"./clipboard-action":8,"good-listener":4,"tiny-emitter":7}]},{},[9])(9)}); +(function(b){window.NestedFormEvents=function(){this.addFields=b.proxy(this.addFields,this);this.removeFields=b.proxy(this.removeFields,this)};NestedFormEvents.prototype={addFields:function(a){var d=a.currentTarget;a=b(d).data("association");var c=b("#"+b(d).data("blueprint-id")).data("blueprint"),e=(b(d).closest(".fields").closestChild("input, textarea, select").eq(0).attr("name")||"").replace(/[[a-z_]+]$/,"");if(e)for(var f=e.match(/[a-z_]+_attributes(?=\]\[(new_)?\d+\])/g)||[],e=e.match(/[0-9]+/g)|| +[],g=0;gf;f++)b[f][a]()};b.destroyAll=function(){b.invokeAll("destroy")};b.disableAll= +function(){b.invokeAll("disable")};b.enableAll=function(){b.invokeAll("enable")};b.refreshAll=function(){b.Context.refreshAll()};b.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight};b.viewportWidth=function(){return document.documentElement.clientWidth};b.adapters=[];b.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0};b.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()}, +"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}};window.Waypoint=b}(); +(function(){function b(a){window.setTimeout(a,1E3/60)}function a(a){this.element=a;this.Adapter=e.Adapter;this.adapter=new this.Adapter(a);this.key="waypoint-context-"+d;this.didResize=this.didScroll=!1;this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()};this.waypoints={vertical:{},horizontal:{}};a.waypointContextKey=this.key;c[a.waypointContextKey]=this;d+=1;this.createThrottledScrollHandler();this.createThrottledResizeHandler()}var d=0,c={},e=window.Waypoint,f=window.onload; +a.prototype.add=function(a){this.waypoints[a.options.horizontal?"horizontal":"vertical"][a.key]=a;this.refresh()};a.prototype.checkEmpty=function(){var a=this.Adapter.isEmptyObject(this.waypoints.horizontal),b=this.Adapter.isEmptyObject(this.waypoints.vertical);a&&b&&(this.adapter.off(".waypoints"),delete c[this.key])};a.prototype.createThrottledResizeHandler=function(){function a(){b.handleResize();b.didResize=!1}var b=this;this.adapter.on("resize.waypoints",function(){b.didResize||(b.didResize= +!0,e.requestAnimationFrame(a))})};a.prototype.createThrottledScrollHandler=function(){function a(){b.handleScroll();b.didScroll=!1}var b=this;this.adapter.on("scroll.waypoints",function(){b.didScroll&&!e.isTouch||(b.didScroll=!0,e.requestAnimationFrame(a))})};a.prototype.handleResize=function(){e.Context.refreshAll()};a.prototype.handleScroll=function(){var a={},b={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(), +oldScroll:this.oldScroll.y,forward:"down",backward:"up"}},c;for(c in b){var d=b[c],e=d.newScroll>d.oldScroll?d.forward:d.backward,f;for(f in this.waypoints[c]){var q=this.waypoints[c][f],r=d.oldScroll=q.triggerPoint,w=!r&&!u;(r&&u||w)&&(q.queueTrigger(e),a[q.group.id]=q.group)}}for(var B in a)a[B].flushTriggers();this.oldScroll={x:b.horizontal.newScroll,y:b.vertical.newScroll}};a.prototype.innerHeight=function(){return this.element==this.element.window?e.viewportHeight(): +this.adapter.innerHeight()};a.prototype.remove=function(a){delete this.waypoints[a.axis][a.key];this.checkEmpty()};a.prototype.innerWidth=function(){return this.element==this.element.window?e.viewportWidth():this.adapter.innerWidth()};a.prototype.destroy=function(){var a=[],b;for(b in this.waypoints)for(var c in this.waypoints[b])a.push(this.waypoints[b][c]);b=0;for(c=a.length;c>b;b++)a[b].destroy()};a.prototype.refresh=function(){var a,b=(a=this.element==this.element.window)?void 0:this.adapter.offset(), +c={};this.handleScroll();a={horizontal:{contextOffset:a?0:b.left,contextScroll:a?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:a?0:b.top,contextScroll:a?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var d in a){var b=a[d],f;for(f in this.waypoints[d]){var n,q,r,u=this.waypoints[d][f];r=u.options.offset; +n=u.triggerPoint;q=0;var w=null==n;u.element!==u.element.window&&(q=u.adapter.offset()[b.offsetProp]);"function"==typeof r?r=r.apply(u):"string"==typeof r&&(r=parseFloat(r),-1=b.oldScroll;r=n&&q;n=!n&&!q;!w&&r?(u.queueTrigger(b.backward),c[u.group.id]=u.group):!w&&n?(u.queueTrigger(b.forward),c[u.group.id]=u.group):w&&b.oldScroll>=u.triggerPoint&& +(u.queueTrigger(b.forward),c[u.group.id]=u.group)}}return e.requestAnimationFrame(function(){for(var a in c)c[a].flushTriggers()}),this};a.findOrCreateByElement=function(b){return a.findByElement(b)||new a(b)};a.refreshAll=function(){for(var a in c)c[a].refresh()};a.findByElement=function(a){return c[a.waypointContextKey]};window.onload=function(){f&&f();a.refreshAll()};e.requestAnimationFrame=function(a){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame|| +b).call(window,a)};e.Context=a})(); +(function(){function b(a,b){return a.triggerPoint-b.triggerPoint}function a(a,b){return b.triggerPoint-a.triggerPoint}function d(a){this.name=a.name;this.axis=a.axis;this.id=this.name+"-"+this.axis;this.waypoints=[];this.clearTriggerQueues();c[this.axis][this.name]=this}var c={vertical:{},horizontal:{}},e=window.Waypoint;d.prototype.add=function(a){this.waypoints.push(a)};d.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}};d.prototype.flushTriggers=function(){for(var c in this.triggerQueues){var d= +this.triggerQueues[c];d.sort("up"===c||"left"===c?a:b);for(var e=0,l=d.length;l>e;e+=1){var m=d[e];(m.options.continuous||e===d.length-1)&&m.trigger([c])}}this.clearTriggerQueues()};d.prototype.next=function(a){this.waypoints.sort(b);a=e.Adapter.inArray(a,this.waypoints);return a===this.waypoints.length-1?null:this.waypoints[a+1]};d.prototype.previous=function(a){this.waypoints.sort(b);return(a=e.Adapter.inArray(a,this.waypoints))?this.waypoints[a-1]:null};d.prototype.queueTrigger=function(a,b){this.triggerQueues[b].push(a)}; +d.prototype.remove=function(a){a=e.Adapter.inArray(a,this.waypoints);-1c+1?b[c+1].focus():b[0].focus()):a.keyCode===this.Keycodes_.SPACE||a.keyCode===this.Keycodes_.ENTER?(a.preventDefault(),b=new MouseEvent("mousedown"),a.target.dispatchEvent(b),b=new MouseEvent("mouseup"),a.target.dispatchEvent(b),a.target.click()):a.keyCode===this.Keycodes_.ESCAPE&&(a.preventDefault(),this.hide())}}};h.prototype.handleItemClick_=function(a){a.target.hasAttribute("disabled")? +a.stopPropagation():(this.closing_=!0,window.setTimeout(function(a){this.hide();this.closing_=!1}.bind(this),this.Constant_.CLOSE_TIMEOUT))};h.prototype.applyClip_=function(a,b){this.element_.classList.contains(this.CssClasses_.UNALIGNED)?this.element_.style.clip="":this.element_.classList.contains(this.CssClasses_.BOTTOM_RIGHT)?this.element_.style.clip="rect(0 "+b+"px 0 "+b+"px)":this.element_.classList.contains(this.CssClasses_.TOP_LEFT)?this.element_.style.clip="rect("+a+"px 0 "+a+"px 0)":this.element_.classList.contains(this.CssClasses_.TOP_RIGHT)? +this.element_.style.clip="rect("+a+"px "+b+"px "+a+"px "+b+"px)":this.element_.style.clip=""};h.prototype.removeAnimationEndListener_=function(a){a.target.classList.remove(h.prototype.CssClasses_.IS_ANIMATING)};h.prototype.addAnimationEndListener_=function(){this.element_.addEventListener("transitionend",this.removeAnimationEndListener_);this.element_.addEventListener("webkitTransitionEnd",this.removeAnimationEndListener_)};h.prototype.show=function(a){if(this.element_&&this.container_&&this.outline_){var b= +this.element_.getBoundingClientRect().height,c=this.element_.getBoundingClientRect().width;this.container_.style.width=c+"px";this.container_.style.height=b+"px";this.outline_.style.width=c+"px";this.outline_.style.height=b+"px";for(var d=this.Constant_.TRANSITION_DURATION_SECONDS*this.Constant_.TRANSITION_DURATION_FRACTION,e=this.element_.querySelectorAll("."+this.CssClasses_.ITEM),f=0;f=this.maxRows&&a.preventDefault()};c.prototype.onFocus_=function(a){this.element_.classList.add(this.CssClasses_.IS_FOCUSED)};c.prototype.onBlur_=function(a){this.element_.classList.remove(this.CssClasses_.IS_FOCUSED)};c.prototype.onReset_=function(a){this.updateClasses_()};c.prototype.updateClasses_=function(){this.checkDisabled();this.checkValidity();this.checkDirty();this.checkFocus()};c.prototype.checkDisabled=function(){this.input_.disabled? +this.element_.classList.add(this.CssClasses_.IS_DISABLED):this.element_.classList.remove(this.CssClasses_.IS_DISABLED)};c.prototype.checkDisabled=c.prototype.checkDisabled;c.prototype.checkFocus=function(){Boolean(this.element_.querySelector(":focus"))?this.element_.classList.add(this.CssClasses_.IS_FOCUSED):this.element_.classList.remove(this.CssClasses_.IS_FOCUSED)};c.prototype.checkFocus=c.prototype.checkFocus;c.prototype.checkValidity=function(){this.input_.validity&&(this.input_.validity.valid? +this.element_.classList.remove(this.CssClasses_.IS_INVALID):this.element_.classList.add(this.CssClasses_.IS_INVALID))};c.prototype.checkValidity=c.prototype.checkValidity;c.prototype.checkDirty=function(){this.input_.value&&0c+e?(this.element_.style.top="0",this.element_.style.marginTop="0"):(this.element_.style.top=c+"px",this.element_.style.marginTop=e+"px"):0>b+d?(this.element_.style.left="0",this.element_.style.marginLeft="0"):(this.element_.style.left=b+"px",this.element_.style.marginLeft=d+ +"px");this.element_.classList.contains(this.CssClasses_.TOP)?this.element_.style.top=a.top-this.element_.offsetHeight-10+"px":this.element_.classList.contains(this.CssClasses_.RIGHT)?this.element_.style.left=a.left+a.width+10+"px":this.element_.classList.contains(this.CssClasses_.LEFT)?this.element_.style.left=a.left-this.element_.offsetWidth-10+"px":this.element_.style.top=a.top+a.height+10+"px";this.element_.classList.add(this.CssClasses_.IS_ACTIVE)};c.prototype.hideTooltip_=function(){this.element_.classList.remove(this.CssClasses_.IS_ACTIVE)}; +c.prototype.init=function(){if(this.element_){var a=this.element_.getAttribute("for")||this.element_.getAttribute("data-mdl-for");a&&(this.forElement_=document.getElementById(a));this.forElement_&&(this.forElement_.hasAttribute("tabindex")||this.forElement_.setAttribute("tabindex","0"),this.boundMouseEnterHandler=this.handleMouseEnter_.bind(this),this.boundMouseLeaveAndScrollHandler=this.hideTooltip_.bind(this),this.forElement_.addEventListener("mouseenter",this.boundMouseEnterHandler,!1),this.forElement_.addEventListener("touchend", +this.boundMouseEnterHandler,!1),this.forElement_.addEventListener("mouseleave",this.boundMouseLeaveAndScrollHandler,!1),window.addEventListener("scroll",this.boundMouseLeaveAndScrollHandler,!0),window.addEventListener("touchstart",this.boundMouseLeaveAndScrollHandler))}};d.register({constructor:c,classAsString:"MaterialTooltip",cssClass:"mdl-tooltip"});c=function(a){this.element_=a;this.init()};window.MaterialLayout=c;c.prototype.Constant_={MAX_WIDTH:"(max-width: 1024px)",TAB_SCROLL_PIXELS:100,RESIZE_TIMEOUT:100, +MENU_ICON:"",CHEVRON_LEFT:"chevron_left",CHEVRON_RIGHT:"chevron_right"};c.prototype.Keycodes_={ENTER:13,ESCAPE:27,SPACE:32};c.prototype.Mode_={STANDARD:0,SEAMED:1,WATERFALL:2,SCROLL:3};c.prototype.CssClasses_={CONTAINER:"mdl-layout__container",HEADER:"mdl-layout__header",DRAWER:"mdl-layout__drawer",CONTENT:"mdl-layout__content",DRAWER_BTN:"mdl-layout__drawer-button",ICON:"material-icons",JS_RIPPLE_EFFECT:"mdl-js-ripple-effect",RIPPLE_CONTAINER:"mdl-layout__tab-ripple-container",RIPPLE:"mdl-ripple", +RIPPLE_IGNORE_EVENTS:"mdl-js-ripple-effect--ignore-events",HEADER_SEAMED:"mdl-layout__header--seamed",HEADER_WATERFALL:"mdl-layout__header--waterfall",HEADER_SCROLL:"mdl-layout__header--scroll",FIXED_HEADER:"mdl-layout--fixed-header",OBFUSCATOR:"mdl-layout__obfuscator",TAB_BAR:"mdl-layout__tab-bar",TAB_CONTAINER:"mdl-layout__tab-bar-container",TAB:"mdl-layout__tab",TAB_BAR_BUTTON:"mdl-layout__tab-bar-button",TAB_BAR_LEFT_BUTTON:"mdl-layout__tab-bar-left-button",TAB_BAR_RIGHT_BUTTON:"mdl-layout__tab-bar-right-button", +TAB_MANUAL_SWITCH:"mdl-layout__tab-manual-switch",PANEL:"mdl-layout__tab-panel",HAS_DRAWER:"has-drawer",HAS_TABS:"has-tabs",HAS_SCROLLING_HEADER:"has-scrolling-header",CASTING_SHADOW:"is-casting-shadow",IS_COMPACT:"is-compact",IS_SMALL_SCREEN:"is-small-screen",IS_DRAWER_OPEN:"is-visible",IS_ACTIVE:"is-active",IS_UPGRADED:"is-upgraded",IS_ANIMATING:"is-animating",ON_LARGE_SCREEN:"mdl-layout--large-screen-only",ON_SMALL_SCREEN:"mdl-layout--small-screen-only"};c.prototype.contentScrollHandler_=function(){if(!this.header_.classList.contains(this.CssClasses_.IS_ANIMATING)){var a= +!this.element_.classList.contains(this.CssClasses_.IS_SMALL_SCREEN)||this.element_.classList.contains(this.CssClasses_.FIXED_HEADER);0=this.content_.scrollTop&&this.header_.classList.contains(this.CssClasses_.IS_COMPACT)&&(this.header_.classList.remove(this.CssClasses_.CASTING_SHADOW), +this.header_.classList.remove(this.CssClasses_.IS_COMPACT),a&&this.header_.classList.add(this.CssClasses_.IS_ANIMATING))}};c.prototype.keyboardEventHandler_=function(a){a.keyCode===this.Keycodes_.ESCAPE&&this.drawer_.classList.contains(this.CssClasses_.IS_DRAWER_OPEN)&&this.toggleDrawer()};c.prototype.screenSizeHandler_=function(){this.screenSizeMediaQuery_.matches?this.element_.classList.add(this.CssClasses_.IS_SMALL_SCREEN):(this.element_.classList.remove(this.CssClasses_.IS_SMALL_SCREEN),this.drawer_&& +(this.drawer_.classList.remove(this.CssClasses_.IS_DRAWER_OPEN),this.obfuscator_.classList.remove(this.CssClasses_.IS_DRAWER_OPEN)))};c.prototype.drawerToggleHandler_=function(a){if(a&&"keydown"===a.type){if(a.keyCode!==this.Keycodes_.SPACE&&a.keyCode!==this.Keycodes_.ENTER)return;a.preventDefault()}this.toggleDrawer()};c.prototype.headerTransitionEndHandler_=function(){this.header_.classList.remove(this.CssClasses_.IS_ANIMATING)};c.prototype.headerClickHandler_=function(){this.header_.classList.contains(this.CssClasses_.IS_COMPACT)&& +(this.header_.classList.remove(this.CssClasses_.IS_COMPACT),this.header_.classList.add(this.CssClasses_.IS_ANIMATING))};c.prototype.resetTabState_=function(a){for(var b=0;ba?Math.ceil(a):Math.floor(a)}function r(a,b,c){for(var d=""+Math.abs(a);d.lengthd;d++)(c&&a[d]!==b[d]||!c&&G(a[d])!==G(b[d]))&&g++;return g+f}function H(a){if(a){var b=a.toLowerCase().replace(/(.)s$/, +"$1");a=Db[a]||Eb[b]||b}return a}function E(a){var b,c,d={};for(c in a)a.hasOwnProperty(c)&&(b=H(c),b&&(d[b]=a[c]));return d}function A(a){var c,d;if(0===a.indexOf("week"))c=7,d="day";else{if(0!==a.indexOf("month"))return;c=12;d="month"}v[a]=function(e,f){var g,h,k=v._locale[a],l=[];if("number"==typeof e&&(f=e,e=b),h=function(a){a=v().utc().set(d,a);return k.call(v._locale,a,e||"")},null!=f)return h(f);for(g=0;c>g;g++)l.push(h(g));return l}}function G(a){a=+a;var b=0;return 0!==a&&isFinite(a)&&(b= +0<=a?Math.floor(a):Math.ceil(a)),b}function L(a,b){return(new Date(Date.UTC(a,b+1,0))).getUTCDate()}function N(a,b,c){return ca(v([a,11,31+b-c]),b,c).week}function S(a){return 0===a%4&&0!==a%100||0===a%400}function J(a){var b;a._a&&-2===a._pf.overflow&&(b=0>a._a[z]||11a._a[k]||a._a[k]>L(a._a[Z],a._a[z])?k:0>a._a[wa]||23a._a[La]||59a._a[Ma]||59a._a[Na]||999b||b>k)&&(b=k),a._pf.overflow=b)}function Y(a){return null== +a._isValid&&(a._isValid=!isNaN(a._d.getTime())&&0>a._pf.overflow&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===a._pf.charsLeftOver&&0===a._pf.unusedTokens.length)),a._isValid}function T(a){return a?a.toLowerCase().replace("_","-"):a}function pa(a){var b=null;if(!oa[a]&&fb)try{b=v.locale(),require("./locale/"+a),v.locale(b)}catch(c){}return oa[a]}function la(a,b){return b._isUTC?v(a).zone(b._offset||0):v(a).local()} +function sa(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function aa(a){var b,c,d=a.match(Ua);b=0;for(c=d.length;c>b;b++)d[b]=Da[d[b]]?Da[d[b]]:sa(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function ja(a,b){return a.isValid()?(b=R(b,a.localeData()),Ya[b]||(Ya[b]=aa(b)),Ya[b](a)):a.localeData().invalidDate()}function R(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Va.lastIndex=0;0<=d&&Va.test(a);)a= +a.replace(Va,c),Va.lastIndex=0,--d;return a}function P(a,b){var c=b._strict;switch(a){case "Q":return Ea;case "DDDD":return Ba;case "YYYY":case "GGGG":case "gggg":return c?cb:ra;case "Y":case "G":case "g":return mb;case "YYYYYY":case "YYYYY":case "GGGGG":case "ggggg":return c?kb:Wa;case "S":if(c)return Ea;case "SS":if(c)return Ia;case "SSS":if(c)return Ba;case "DDD":return Bb;case "MMM":case "MMMM":case "dd":case "ddd":case "dddd":return Ka;case "a":case "A":return b._locale._meridiemParse;case "X":return gb; +case "Z":case "ZZ":return ab;case "T":return zb;case "SSSS":return Cb;case "MM":case "DD":case "YY":case "GG":case "gg":case "HH":case "hh":case "mm":case "ss":case "ww":case "WW":return c?Ia:qb;case "M":case "D":case "d":case "H":case "h":case "m":case "s":case "w":case "W":case "e":case "E":return qb;case "Do":return bb;default:var c=RegExp,d;d=ka(a.replace("\\","")).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return new c(d)}}function ba(a){a=(a||"").match(ab)||[];a=((a[a.length-1]||[])+"").match(lb)|| +["-",0,0];var b=+(60*a[1])+G(a[2]);return"+"===a[0]?-b:b}function Q(b){var c,d,e,f=[];if(!b._d){d=new Date;d=b._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()];if(b._w&&null==b._a[k]&&null==b._a[z]){var g,h,l,m,n,p;g=b._w;null!=g.GG||null!=g.W||null!=g.E?(n=1,p=4,h=a(g.GG,b._a[Z],ca(v(),1,4).year),l=a(g.W,1),m=a(g.E,1)):(n=b._locale._week.dow,p=b._locale._week.doy,h=a(g.gg,b._a[Z],ca(v(),n,p).year),l=a(g.w,1),null!=g.d?(m=g.d,n>m&&++l):m=null!= +g.e?g.e+n:n);g=n;var q,r;n=W(h,0,1).getUTCDay();p=(n=0===n?7:n,m=null!=m?m:g,q=g-n+(n>p?7:0)-(g>n?7:0),r=7*(l-1)+(m-g)+q+1,{year:0(S(e)?366:365)&&(b._pf._overflowDayOfYear=!0),c=W(e,0,b._dayOfYear),b._a[z]=c.getUTCMonth(),b._a[k]=c.getUTCDate());for(c=0;3>c&&null==b._a[c];++c)b._a[c]=f[c]=d[c];for(;7>c;c++)b._a[c]=f[c]=null==b._a[c]?2===c?1:0:b._a[c];b._d=(b._useUTC? +W:U).apply(null,f);null!=b._tzm&&b._d.setUTCMinutes(b._d.getUTCMinutes()+b._tzm)}}function va(a){if(a._f===v.ISO_8601)return void V(a);a._a=[];a._pf.empty=!0;var b,c,d,e,f,g=""+a._i,h=g.length,l=0;d=R(a._f,a._locale).match(Ua)||[];for(b=0;ba._a[wa]&&(a._a[wa]+=12);!1===a._isPm&&12===a._a[wa]&&(a._a[wa]=0);Q(a);J(a)}function ka(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function V(a){var b,c,d=a._i,e=eb.exec(d);if(e){a._pf.iso=!0;b=0;for(c=X.length;c>b;b++)if(X[b][1].exec(d)){a._f= +X[b][0]+(e[6]||" ");break}b=0;for(c=db.length;c>b;b++)if(db[b][1].exec(d)){a._f+=db[b][0];break}d.match(ab)&&(a._f+="Z");va(a)}else a._isValid=!1}function U(a,b,c,d,e,f,g){b=new Date(a,b,c,d,e,f,g);return 1970>a&&b.setFullYear(a),b}function W(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function Sa(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function ca(a,b,c){var d;b=c-b;c-=a.day();return c>b&&(c-=7),b-7>c&&(c+=7),d=v(a).add(c,"d"),{week:Math.ceil(d.dayOfYear()/ +7),year:d.year()}}function qa(a){var c=a._i,e=a._f;a._locale=a._locale||v.localeData(a._l);if(null===c||e===b&&""===c)a=v.invalid({nullInput:!0});else if("string"==typeof c&&(a._i=c=a._locale.preparse(c)),v.isMoment(c))a=new l(c,!0);else{if(e)if(D(e)){var f,g,h,k;if(0===a._f.length)a._pf.invalidFormat=!0,a._d=new Date(0/0);else{for(k=0;kc)&&(h=c,g=f)); +p(a,g||f)}}else va(a);else g=a._i,g===b?a._d=new Date:"[object Date]"===Object.prototype.toString.call(g)||g instanceof Date?a._d=new Date(+g):null!==(f=ob.exec(g))?a._d=new Date(+f[1]):"string"==typeof g?(V(a),!1===a._isValid&&(delete a._isValid,v.createFromInputFallback(a))):D(g)?(a._a=g.slice(0),Q(a)):"object"==typeof g?a._d||(k=E(a._i),a._a=[k.year,k.month,k.day,k.hour,k.minute,k.second,k.millisecond],Q(a)):"number"==typeof g?a._d=new Date(g):v.createFromInputFallback(a);a=new l(a)}return a}function xa(a, +b){var c,d;if(1===b.length&&D(b[0])&&(b=b[0]),!b.length)return v();c=b[0];for(d=1;da&&(a=-a,b="-"),b+r(G(a/60),2)+":"+r(G(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+r(G(a/60),2)+r(G(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},sb={},nb=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];rb.length;)fa= +rb.pop(),Da[fa+"o"]=g(Da[fa],fa);for(;hb.length;)fa=hb.pop(),Da[fa+fa]=f(Da[fa],2);Da.DDDD=f(Da.DDD,3);p(h.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January February March April May June July August September October November December".split(" "),months:function(a){return this._months[a.month()]},_monthsShort:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b, +c,d;this._monthsParse||(this._monthsParse=[]);for(b=0;12>b;b++)if(this._monthsParse[b]||(c=v.utc([2E3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun Mon Tue Wed Thu Fri Sat".split(" "),weekdaysShort:function(a){return this._weekdaysShort[a.day()]}, +_weekdaysMin:"Su Mo Tu We Th Fr Sa".split(" "),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;this._weekdaysParse||(this._weekdaysParse=[]);for(b=0;7>b;b++)if(this._weekdaysParse[b]||(c=v([2E3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT", +LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return 11=b&&y(e,c,!0)>=b-1)break;b--}f++}a=null}return a};v.isMoment=function(a){return a instanceof l||null!=a&&a.hasOwnProperty("_isAMomentObject")};v.isDuration=function(a){return a instanceof m}; +for(fa=nb.length-1;0<=fa;--fa)A(nb[fa]);v.normalizeUnits=function(a){return H(a)};v.invalid=function(a){var b=v.utc(0/0);return null!=a?p(b._pf,a):b._pf.userInvalidated=!0,b};v.parseZone=function(){return v.apply(null,arguments).parseZone()};v.parseTwoDigitYear=function(a){return G(a)+(68=a.year()?ja(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):ja(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){return[this.year(),this.month(),this.date(),this.hours(),this.minutes(),this.seconds(),this.milliseconds()]},isValid:function(){return Y(this)},isDSTShifted:function(){return this._a?this.isValid()&&0a?"sameElse":-1>a?"lastWeek":0>a?"lastDay":1>a?"sameDay":2>a?"nextDay":7>a?"nextWeek":"sameElse";return this.format(this.localeData().calendar(a,this))},isLeapYear:function(){return S(this.year())},isDST:function(){return this.zone()+v(a).startOf(b)},isBefore:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)<+v(a).startOf(b)},isSame:function(a,b){return b=b||"ms",+this.clone().startOf(b)===+la(a,this).startOf(b)},min:e("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548", +function(a){return a=v.apply(null,arguments),this>a?this:a}),max:e("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=v.apply(null,arguments),a>this?this:a}),zone:function(a,b){var c,d=this._offset||0;return null==a?this._isUTC?d:this._d.getTimezoneOffset():("string"==typeof a&&(a=ba(a)),16>Math.abs(a)&&(a*=60),!this._isUTC&&b&&(c=this._d.getTimezoneOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.subtract(c,"m"),d!==a&&(!b|| +this._changeInProgress?x(this,v.duration(d-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,v.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?v(a).zone():0,0===(this.zone()-a)%60},daysInMonth:function(){return L(this.year(), +this.month())},dayOfYear:function(a){var b=Ga((v(this).startOf("day")-v(this).startOf("year"))/864E5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=ca(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=ca(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this); +return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=ca(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return N(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return N(this.year(),a.dow,a.doy)},get:function(a){return a=H(a),this[a]()},set:function(a, +b){return a=H(a),"function"==typeof this[a]&&this[a](b),this},locale:function(a){return a===b?this._locale._abbr:(this._locale=v.localeData(a),this)},lang:e("moment().lang() is deprecated. Use moment().localeData() instead.",function(a){return a===b?this.localeData():(this._locale=v.localeData(a),this)}),localeData:function(){return this._locale}});v.fn.millisecond=v.fn.milliseconds=ea("Milliseconds",!1);v.fn.second=v.fn.seconds=ea("Seconds",!1);v.fn.minute=v.fn.minutes=ea("Minutes",!1);v.fn.hour= +v.fn.hours=ea("Hours",!0);v.fn.date=ea("Date",!0);v.fn.dates=e("dates accessor is deprecated. Use date instead.",ea("Date",!0));v.fn.year=ea("FullYear",!0);v.fn.years=e("years accessor is deprecated. Use year instead.",ea("FullYear",!0));v.fn.days=v.fn.day;v.fn.months=v.fn.month;v.fn.weeks=v.fn.week;v.fn.isoWeeks=v.fn.isoWeek;v.fn.quarters=v.fn.quarter;v.fn.toJSON=v.fn.toISOString;p(v.duration.fn=m.prototype,{_bubble:function(){var a;a=this._milliseconds;var b=this._days,c=this._months,d=this._data, +e=0;d.milliseconds=a%1E3;a=q(a/1E3);d.seconds=a%60;a=q(a/60);d.minutes=a%60;a=q(a/60);d.hours=a%24;b+=q(a/24);e=q(400*b/146097);b-=q(146097*e/400);c+=q(b/30);b%=30;e+=q(c/12);d.days=b;d.months=c%12;d.years=e},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes), +this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return q(this.days()/7)},valueOf:function(){return this._milliseconds+864E5*this._days+this._months%12*2592E6+31536E6*G(this._months/12)},humanize:function(a){var b;b=!a;var c=this.localeData(),d=v.duration(this).abs(),e=Ga(d.as("s")),f=Ga(d.as("m")),g=Ga(d.as("h")),h=Ga(d.as("d")),k=Ga(d.as("M")),d=Ga(d.as("y")),e=ethis.asSeconds()?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+ +"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale}});for(fa in Xa)Xa.hasOwnProperty(fa)&&I(fa.toLowerCase());v.duration.fn.asMilliseconds=function(){return this.as("ms")};v.duration.fn.asSeconds=function(){return this.as("s")};v.duration.fn.asMinutes=function(){return this.as("m")};v.duration.fn.asHours=function(){return this.as("h")};v.duration.fn.asDays=function(){return this.as("d")};v.duration.fn.asWeeks=function(){return this.as("weeks")};v.duration.fn.asMonths= +function(){return this.as("M")};v.duration.fn.asYears=function(){return this.as("y")};v.locale("en",{ordinal:function(a){var b=a%10,b=1===G(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+b}});fb?module.exports=v:"function"==typeof define&&define.amd?(define("moment",function(a,b,c){return c.config&&c.config()&&!0===c.config().noGlobal&&(Ja.moment=Ta),v}),za(!0)):za()}).call(this); +(function(b,a){function d(a){var b="";a=parseInt(a,10);if(!a||1>a)return b;for(;a;)b+="0",--a;return b}function c(a,b,c){null==a&&(a="");a=""+a;return(c?a:"")+d(b-a.length)+(c?"":a)}function e(a,b){for(var c=a.length;--c;)if(b(a[c]))return a[c]}function f(a,b){var c=0,d=a.length,e;"function"!==typeof b&&(e=b,b=function(a){return a===e});for(;cA.precision?(Math.floor(a.wholeValue* +Math.pow(10,A.precision))*Math.pow(10,-A.precision)).toString():a.wholeValue.toString();b=b.replace(/^\-/,"");1a.value&&(b="-"+b);E=!0;return b});"right"===A.trim&&b.reverse();return b.join("")};w.duration.fn.format.defaults={escape:/\[(.+?)\]/,years:/[Yy]+/,months:/M+/,weeks:/[Ww]+/,days:/[Dd]+/,hours:/[Hh]+/,minutes:/m+/,seconds:/s+/,milliseconds:/S+/,general:/.+?/,types:"escape years months weeks days hours minutes seconds milliseconds general",trim:"left",precision:0,forceLength:null,template:function(){var a=this.duration;switch(e(this.types,function(b){return a._data[b]})){case "seconds":return"h:mm:ss"; +case "minutes":return"d[d] h:mm";case "hours":return"d[d] h[h]";case "days":return"M[m] d[d]";case "weeks":return"y[y] w[w]";case "months":return"y[y] M[m]";case "years":return"y[y]";default:return"y[y] M[m] d[d] h:mm:ss"}}}})(this); +!function(){window.PR_SHOULD_USE_CONTINUATION=!0;(function(){function b(a){function b(a){var c=a.charCodeAt(0);if(92!==c)return c;var d=a.charAt(1);return(c=p[d])?c:"0"<=d&&"7">=d?parseInt(a.substring(1),8):"u"===d||"x"===d?parseInt(a.substring(2),16):a.charCodeAt(1)}function c(a){if(32>a)return(16>a?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);return"\\"===a||"-"===a||"]"===a||"^"===a?"\\"+a:a}function d(a){var e=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g); +a=[];var f="^"===e[0],g=["["];f&&g.push("^");for(var f=f?1:0,h=e.length;fm||122m||90m||122l[0]&&(l[1]+1>l[0]&&g.push("-"),g.push(c(l[1])));g.push("]");return g.join("")}function e(a){for(var b=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),h=b.length,l=[],m=0,n=0;m/,null])): +b.push(["com",/^#[^\n\r]*/,null,"#"]));a.cStyleComments&&(c.push(["com",/^\/\/[^\n\r]*/,null]),c.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,null]));if(d=a.regexLiterals){var f=(d=1|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+d+"])(?:[^/\\x5B\\x5C"+d+"]|\\x5C"+f+"|\\x5B(?:[^\\x5C\\x5D"+ +d+"]|\\x5C"+f+")*(?:\\x5D|$))+/")+")")])}(d=a.types)&&c.push(["typ",d]);d=(""+a.keywords).replace(/^ | $/g,"");d.length&&c.push(["kwd",RegExp("^(?:"+d.replace(/[\s,]+/g,"|")+")\\b"),null]);b.push(["pln",/^\s+/,null," \r\n\t\u00a0"]);d="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(d+="(?!s*/)");c.push(["lit",/^@[$_a-z][\w$@]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,null],["pln",/^[$_a-z][\w$@]*/i,null],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,null, +"0123456789"],["pln",/^\\[\S\s]?/,null],["pun",RegExp(d),null]);return e(b,c)}function g(a,b,c){function d(a){var b=a.nodeType;if(1==b&&!f.test(a.className))if("br"===a.nodeName)e(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)d(a);else if((3==b||4==b)&&c){var l=a.nodeValue,m=l.match(g);m&&(b=l.substring(0,m.index),a.nodeValue=b,(l=l.substring(m.index+m[0].length))&&a.parentNode.insertBefore(h.createTextNode(l),a.nextSibling),e(a),b||a.parentNode.removeChild(a))}} +function e(a){function b(a,c){var d=c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),f=a.nextSibling;e.appendChild(d);for(var g=f;g;g=f)f=g.nextSibling,e.appendChild(g)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;a=b(a.nextSibling,0);for(var c;(c=a.parentNode)&&1===c.nodeType;)a=c;m.push(a)}for(var f=/(?:^|\s)nocode(?:\s|$)/,g=/\r\n?|\n/,h=a.ownerDocument,l=h.createElement("li");a.firstChild;)l.appendChild(a.firstChild);for(var m=[l],n=0;n=+f[1],c=/\n/g,g=b.a,h=g.length,d=0,m=b.d,n=m.length,e=0,q=b.g,r=q.length,u=0;q[r]=h;var x,w;for(w=x=0;w=H&&(e+=2);d>=E&&(u+=2)}}finally{D&&(D.style.display=G)}}catch(ya){p.console&&console.log(ya&&ya.stack||ya)}}var p=window,n=["break,continue,do,else,for,if,return,while"],q=[[n, +"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],r=[q,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"], +u=[q,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],w=[q,"abstract,as,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,group,implicit,in,interface,internal,into,is,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],q=[q,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"], +B=[n,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],x=[n,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],D=[n,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],n=[n,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"], +y=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,H=/\S/,E=f({keywords:[r,w,q,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",B,x,n],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};h(E,["default-code"]);h(e([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/], +["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),"default-markup htm html mxml xhtml xml xsl".split(" "));h(e([["pln",/^\s+/,null," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i], +["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);h(e([],[["atv",/^[\S\s]+/]]),["uq.val"]);h(f({keywords:r,hashComments:!0,cStyleComments:!0,types:y}),"c cc cpp cxx cyc m".split(" "));h(f({keywords:"null,true,false"}),["json"]); +h(f({keywords:w,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:y}),["cs"]);h(f({keywords:u,cStyleComments:!0}),["java"]);h(f({keywords:n,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);h(f({keywords:B,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);h(f({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END", +hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);h(f({keywords:x,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);h(f({keywords:q,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);h(f({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}), +["coffee"]);h(f({keywords:D,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);h(e([],[["str",/^[\S\s]+/]]),["regex"]);var G=p.PR={createSimpleLexer:e,registerLangHandler:h,sourceDecorator:f,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:p.prettyPrintOne=function(a,b,c){var d=document.createElement("div"); +d.innerHTML="
      "+a+"
      ";d=d.firstChild;c&&g(d,c,!0);m({h:b,j:c,c:d,i:1});return d.innerHTML},prettyPrint:p.prettyPrint=function(a,b){function d(){for(var b=p.PR_SHOULD_USE_CONTINUATION?r.now()+250:Infinity;u
      '),p||(h.find(".rateit-reset").css("float","right"),h.find(".rateit-selected").addClass("rateit-selected-rtl"), +h.find(".rateit-hover").addClass("rateit-hover-rtl")),m("init",!0));var q=h.find(".rateit-range");q.width(m("starwidth")*(m("max")-m("min"))).height(m("starheight"));var r="rateit-preset"+(p?"":"-rtl");m("ispreset")?h.find(".rateit-selected").addClass(r):h.find(".rateit-selected").removeClass(r);if(null!=m("value")){var u=(m("value")-m("min"))*m("starwidth");h.find(".rateit-selected").width(u)}n=h.find(".rateit-reset");!0!==n.data("wired")&&n.click(function(){m("value",m("min"));q.find(".rateit-hover").hide().width(0); +q.find(".rateit-selected").width(0).show();m("backingfld")&&b(m("backingfld")).val(m("min"));h.trigger("reset")}).data("wired",!0);var w=function(a,c){var d=(c.changedTouches?c.changedTouches[0].pageX:c.pageX)-b(a).offset().left;p||(d=q.width()-d);d>q.width()&&(d=q.width());0>d&&(d=0);return u=Math.ceil(d/m("starwidth")*(1/m("step")))};m("readonly")?n.hide():(m("resetable")||n.hide(),m("wired")||(q.bind("touchmove touchend",a),q.mousemove(function(a){a=w(this,a);var b=a*m("starwidth")*m("step"),c= +q.find(".rateit-hover");c.data("width")!=b&&(q.find(".rateit-selected").hide(),c.width(b).show().data("width",b),a=[a*m("step")+m("min")],h.trigger("hover",a).trigger("over",a))}),q.mouseleave(function(a){q.find(".rateit-hover").hide().width(0).data("width","");h.trigger("hover",[null]).trigger("over",[null]);q.find(".rateit-selected").show()}),q.mouseup(function(a){a=w(this,a);var c=a*m("step")+m("min");m("value",c);m("backingfld")&&b(m("backingfld")).val(c);m("ispreset")&&(q.find(".rateit-selected").removeClass(r), +m("ispreset",!1));q.find(".rateit-hover").hide();q.find(".rateit-selected").width(a*m("starwidth")*m("step")).show();h.trigger("hover",[null]).trigger("over",[null]).trigger("rated",[c])}),m("wired",!0)),m("resetable")&&n.show())})};b.fn.rateit.defaults={min:0,max:5,step:.5,starwidth:16,starheight:16,readonly:!1,resetable:!0,ispreset:!1};b(function(){b(".rateit").rateit()})})(jQuery);var ql={};function status(b){return 200<=b.status&&300>b.status?Promise.resolve(b):Promise.reject(b)} +function json(b){return b.json()}function text(b){return b.text()}ql.getJson=function(b){return fetch(b,{credentials:"include"}).then(status).then(json)};ql.getHtml=function(b){return fetch(b,{credentials:"include"}).then(status).then(text)}; +ql.Poller=function(b,a,d,c){this.continuePolling=!0;this.path=b;this.timeout=a;this.success=d;this.failure=c||this.defaultFailure;this.start=function f(){if(this.continuePolling){var a=this;ql.getJson(this.path).then(this.success).then(function(){return setTimeout(f.bind(a),a.timeout)}).catch(function(b){a.stop();a.failure(b)})}};this.once=function(){ql.getJson(this.path).then(this.success).catch(this.failure)};this.stop=function(){this.continuePolling=!1};this.defaultFailure=function(a){console.log("Request failed", +a)}};ql.events={};ql.subscribe=function(b,a){ql.events[b]=ql.events[b]||[];ql.events[b].push(a);return{unsubscibe:function(){var d=ql.events[b].indexOf(a);ql.events[b].splice(d,1)}}};ql.publish=function(b,a){ql.events[b]&&ql.events[b].forEach(function(b){b.call(this,a)})};ql.debounce=function(b,a,d){a=void 0===a?20:a;d=void 0===d?!0:d;var c;return function(){var e=this,f=arguments,g=d&&!c;clearTimeout(c);c=setTimeout(function(){c=null;d||b.apply(e,f)},a);g&&b.apply(e,f)}}; +ql.showFlash=function(b,a){var d=$("#flash-sibling-before"),c=$('
      ');"notice"==b?c.addClass("alert-success"):c.addClass("alert-error");var e=$('
      '),f=$('');c.text(a);c.append(e);c.append(f);$(".alert").remove();c.insertAfter(d)};ql.moveFlash=function(b){$(function(){return $("#flash-sibling-before").insertAfter(b)})}; +ql.adminClassroomView=function(){function b(){ql.getJson(a).then(function(a){return d.innerHTML=a.focuses}).then(function(){return setTimeout(b,1E4)}).catch(function(a){return console.error(a.message)})}var a="",d="";return{init:function(c){a=c;d=document.querySelector(".js-classroom-focuses");b()}}}();initChosenListener=function(){$(".js-chosen").chosen({disable_search_threshold:20})};initChosen=function(){initChosenListener()};ql.focusDataPath=""; +ql.initStudentCheckBoxListeners=function(){var b=document.querySelectorAll(".js-select-student");[].concat($jscomp.arrayFromIterable(b)).map(function(a){a.addEventListener("click",ql.handleStudentCheckBox)})};ql.handleStudentCheckBox=function(){ql.toggleStudentRow(this.closest("[data-student]"));ql.toggleStudentCheckBox(this.querySelector("i.material-icons"));ql.toggleActionButtons()};ql.toggleStudentRow=function(b){b.classList.toggle("is-selected")}; +ql.toggleStudentCheckBox=function(b){b.innerHTML=b.innerHTML.includes("blank")?"check_box":"check_box_outline_blank"}; +ql.toggleActionButtons=function(){var b=ql.getSelectedStudentRows(),a=b.filter(function(a){return"true"==a.dataset.running}),d=document.querySelector(".js-student-table-title"),c=document.querySelector(".js-student-actions-container"),e=c.querySelectorAll(".mdl-button");b.length?(d.style.display="none",c.style.display="block",0==a.length?e.forEach(function(a){return a.classList.add("mdl-button--disabled")}):e.forEach(function(a){return a.classList.remove("mdl-button--disabled")})):(d.style.display= +"flex",c.style.display="none")};ql.getSelectedStudentRows=function(){var b=document.querySelectorAll("[data-student]");return[].concat($jscomp.arrayFromIterable(b)).filter(function(a){return a.classList.contains("is-selected")})};ql.initAddTimeListener=function(){document.querySelector(".js-add-time").addEventListener("click",ql.handleAddTime)}; +ql.handleAddTime=function(){ql.getSelectedStudentRows().filter(function(b){return"true"==b.dataset.running}).map(function(b){return b.dataset.addTimePath}).map(function(b){b=new Request(b,{method:"POST",credentials:"include",headers:new Headers({"X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content})});fetch(b).then(status).then(json).then(function(){return ql.getJson(ql.focusDataPath).then(function(a){return ql.publish("received-focus-data",a)})}).catch(function(a){return console.log("Request failed", +a)})})};ql.initEndLabListener=function(){document.querySelector(".js-end-lab").addEventListener("click",ql.handleEndLab)}; +ql.handleEndLab=function(){ql.getSelectedStudentRows().filter(function(b){return"true"==b.dataset.running}).map(function(b){return b.dataset.endLabPath}).map(function(b){fetch(b,{credentials:"include"}).then(status).then(json).then(function(){return ql.getJson(ql.focusDataPath).then(function(a){return ql.publish("received-focus-data",a)})}).catch(function(a){return console.log("Request failed",a)})})}; +ql.trainerClassroomView=function(){function b(a){a.students.forEach(function(a){var b=document.querySelector('[data-student="'+a.id+'"]');b.dataset.labInstance=a.lab_instance.id;b.dataset.labState=a.lab_instance.lab_state;b.dataset.running=a.lab_instance.running;b.dataset.addTimePath=a.lab_instance.add_time_path;b.dataset.endLabPath=a.lab_instance.end_lab_path;b.querySelector(".js-status").innerHTML=a.lab_instance.status_html;a.lab_instance.score_html&&(b.querySelector(".js-score").innerHTML=a.lab_instance.score_html)})} +function a(a){a.running_hotlabs&&a.running_hotlabs.forEach(function(a){document.querySelector("#focus_"+a.id).querySelector(".js-lab-details").innerHTML=0');var d=new Clipboard(".js-copy-button-"+b,{target:function(a){return a.previousElementSibling}});d.on("success",function(a){$(".js-copy-button-"+b).attr("title",trans.copied).tooltip("fixTitle").tooltip("show")});d.on("error",function(a){a="";a=/iPhone|iPad/i.test(navigator.userAgent)?trans.no_support:/Mac/i.test(navigator.userAgent)? +trans.mac_press:trans.windows_press;$(".js-copy-button-"+b).attr("title",a).tooltip("fixTitle").tooltip("show")});$(".js-copy-button-"+b).mouseout(function(){$(this).tooltip("hide").tooltip("destroy")})})};initImageZoom=function(){$(".js-lab-content img").click(function(b){b=$(this).attr("src");$("body").append('
      \n
      ";$instructionContent.classList.remove("is-faded");$instructionContent.classList.remove("is-hidden");$instructionHeader.classList.add("has-error");$instructionLoader.classList.add("is-hidden")})}$instructionRefresh=$instructionLoader=$instructionHeader=$instructionContent=$instructionCard="";instructionPoller={};return{init:function(){$instructionContent=document.querySelector(".js-instruction-content");$instructionHeader=document.querySelector(".js-instruction-header"); +$instructionLoader=document.querySelector(".js-instruction-loader");$instructionRefresh=document.querySelector(".js-instruction-refresh");ql.subscribe("received-instruction-status",c);$instructionRefresh.addEventListener("click",b,!1)},poll:a}}(); +ql.publishLab=function(){function b(b){b.preventDefault();b=new Request(this.href,{method:"POST",credentials:"include",headers:new Headers({"X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content})});fetch(b).then(status).then(json).then(function(b){return a(b.status_path)}).catch(console.error)}function a(a){publishPoller=new ql.Poller(a,500,d);publishPoller.start()}function d(a){ql.publish("received-publish-status",a)}function c(a){"done"==a.status?(publishPoller.stop(),$toastLoader.classList.remove("is-visible")): +$toastLoader.classList.add("is-visible");$toastMessage.innerHTML=a.html;$toast.classList.add("is-visible")}$toastLoader=$toastMessage=$toast=$publishButton="";publishPoller={};return{init:function(){$publishButton=document.querySelector(".js-publish-button");$toast=document.querySelector(".js-toast");$toastMessage=document.querySelector(".js-toast-message");$toastLoader=$toast.querySelector(".mdl-js-progress");ql.subscribe("received-publish-status",c);$publishButton.addEventListener("click",b)},poll:a}}(); +ql.labLocale=function(){function b(b){b.preventDefault();ql.getHtml(this.href).then(a).then(d).catch(console.error)}function a(a){$localeDialogBody.innerHTML=a;ql.initMaterialInputs($localeDialogBody);localeDialog.open()}function d(){$(document).on("ajax:success","form",function(a,b,d,g){$(document).off("ajax:success");localeDialog.close();window.location.replace(g.responseJSON.url)}).on("ajax:error","form",function(a,b,d,g){console.error(g)})}$localeDialogBody=$newLocaleButton=$dialog="";localeDialog= +{};return{init:function(){$newLocaleButton=document.querySelector(".js-new-locale");$dialog=document.querySelector(".js-dialog");$localeDialogBody=$dialog.querySelector(".js-new-lab-locale");localeDialog=new ql.MaterialDialog($dialog);$newLocaleButton.addEventListener("click",b)}}}(); +ql.labIndexView=function(){function b(b){"ArrowDown"===b.key?a[d+1]&&(d++,a[d].focus()):"ArrowUp"===b.key&&a[d-1]&&(d--,a[d].focus())}var a=[],d=0;return{init:function(){a=[].concat($jscomp.arrayFromIterable(document.querySelectorAll(".js-lab-row")));a.length&&(a[d].focus(),window.addEventListener("keyup",b))}}}(); +ql.labOutline=function(){function b(a){a.preventDefault();a=a.target.getAttribute("href");$section=f.querySelector(a);$(f).animate({scrollTop:$section.offsetTop-80},500,function(){d()})}function a(){if(localStorage.getItem("focusSections")){var a=JSON.parse(localStorage.getItem("focusSections"));if(a.hasOwnProperty(m)){var b=location.href;location.href="#"+a[m];history.replaceState(null,null,b);f.scrollTop-=80}}}function d(a){var b=f.scrollTop+.3333*f.offsetHeight;a=[].concat($jscomp.arrayFromIterable(h)).filter(function(a){return a.offsetTop< +b});a=a.length?a.pop():h[0];c(a);e(a)}function c(a){var b={};localStorage.getItem("focusSections")&&(b=JSON.parse(localStorage.getItem("focusSections")));b[m]=a.id;localStorage.setItem("focusSections",JSON.stringify(b))}function e(a){l.forEach(function(a){return a.classList.remove("is-active")});g.querySelector('a[href="#'+a.id+'"]').classList.add("is-active")}var f="",g="",h=[],l=[],m="";return{init:function(c){f=document.querySelector(".js-lab-content");g=f.querySelector(".js-lab-content-outline"); +h=f.querySelectorAll("h2");l=g.querySelectorAll("a");m=c;l.forEach(function(a){return a.addEventListener("click",b)});f.addEventListener("scroll",ql.debounce(d));a()}}}(); +var initLabResourceLinkListener=function(){$(".js-lab-resource-link").click(function(){closeLabResourceArea();$.ajax("/instructions/show_spl/"+$(this).data("id")+".json").done(function(b){fillLabResource(b);openLabResourceArea()}).fail(function(b){$(".js-lab-resource").html(trans.no_resource);openLabResourceArea()})})},initLabResourceAreaCloseListener=function(){$(".js-lab-resource-area-close").click(function(){closeLabResourceArea()})},fillLabResource=function(b){var a="";null===b.document_content_type? +a="
      "+b.description+"
      ":"text/plain"===b.document_content_type&&(a=b.document_file_name);$(".js-lab-resource").html(a)},openLabResourceArea=function(){$(".js-lab-resource-area").addClass("is-open");$(".js-lab-resource-background").addClass("is-visible")},closeLabResourceArea=function(){$(".js-lab-resource-area").removeClass("is-open");$(".js-lab-resource-background").removeClass("is-visible")},initLabResource=function(){initLabResourceLinkListener(); +initLabResourceAreaCloseListener()},initRateItListener=function(){$(".js-rateit").bind("rated",function(b,a){setRating(a)})},initReviewSubmitListener=function(){$(".js-lab-review-form").on("ajax:success",function(b,a,d,c){alertLabReviewSuccess(c)}).on("ajax:error",function(b,a,d,c){alertLabReviewError(a.responseText)})},alertLabReviewSuccess=function(b){$("#lab-review-modal").modal("hide");$(".js-alert-message").html(trans.thanks_review);$(".js-alert").removeClass("alert-error").addClass("alert-success").css("display", +"flex")},alertLabReviewError=function(b){$("#lab-review-modal").modal("hide");$(".js-alert-message").html(b);$(".js-alert").removeClass("alert-success").addClass("alert-error").css("display","flex")},setRating=function(b){$(".js-rating-input").val(b-3)},initLabReviewModal=function(){initRateItListener();initReviewSubmitListener()},pausePolling=!1,additionalConnectionInfoReceived=!1,cloudEnvironmentResourcesReceived=!1,cfConnectionOutputReceived=!1,focusDataPoll="",consoleClipboard="",consoleWindow= +"",endLabButtonDisplayed=!1,consoleDetailsFilled=!1,consoleReady=!1,cloudProvisioned=!1,checkIfLabIsAlreadyRunning=function(){var b=$(".js-start-lab-button");""!==b.data("lab-instance-id")&&(displayWaitingLabButton(b),startLab(b.data("focus-id")))},initStartButtonListener=function(){$(".js-start-lab-button").on("click",function(){console.log("Clicked start button.");"One-time Lab"===$(this).data("lab-access")||"Token-only"===$(this).data("lab-access")?$("#lab-access-modal").modal("show"):startLabAjax($(this).data("focus-id"))})}, +initEndButtonListener=function(){$(".js-end-lab-button").on("click",function(){var b=$(this).attr("data-lab-instance-id");console.log("Clicked end button, attempting end lab instance "+b);pausePolling=!0;displayWaitingLabButton(this);window.confirm(trans.are_you_sure)?endLabAjax(b):returnToLab()})},displayWaitingLabButton=function(b){$(b).addClass("is-hidden");$(".js-waiting-lab-button").removeClass("is-hidden")},startLabAjax=function(b){displayWaitingLabButton($(".js-start-lab-button"));var a="/focuses/run/"+ +b;$(".js-start-lab-button").attr("data-qlcampaign")&&(a=a+"?qlcampaign="+$(".js-start-lab-button").data("qlcampaign"));$.ajax(a).done(function(a){startLab(b)}).fail(function(a){alertStartLabError(a.responseText)})},endLabAjax=function(b){$.get("/lab_instances/end/"+b+".js").done(function(a){endLab()}).fail(function(a){alertEndLabError(a.responseText)})},alertStartLabError=function(b){showStartLabButton();$(".js-alert-message").html(b);$(".js-alert").removeClass("alert-success").addClass("alert-error").css("display", +"flex");console.log("Error "+b+" in Run SPL ajax call.")},alertEndLabError=function(b){showEndLabButton();$(".js-alert-message").html(b);$(".js-alert").removeClass("alert-success").addClass("alert-error").css("display","flex");console.log("Error "+b+" in End Lab ajax call.")},startLab=function(b){labStartSegment();showProgressBar();startFocusDataPolling(b)},endLab=function(b){showSidebar();closeConsoleWindow();endLabInstanceState();endFocusDataPolling();showStartLabButton();resetProgressBar();disableConsoleDetails(); +resetTimer();askForReview();resetVariables()},endLabInstanceState=function(){$(".js-start-lab-button").attr("data-lab-instance-id","")},returnToLab=function(){pausePolling=!1;$(".js-waiting-lab-button").addClass("is-hidden");$(".js-end-lab-button").removeClass("is-hidden")},showEndLabButton=function(b){endLabButtonDisplayed||($(".js-end-lab-button").attr("data-lab-instance-id",b),$(".js-waiting-lab-button").addClass("is-hidden"),$(".js-end-lab-button").removeClass("is-hidden"))},showStartLabButton= +function(){$(".js-end-lab-button").attr("data-lab-instance-id","");$(".js-waiting-lab-button").addClass("is-hidden");$(".js-start-lab-button").removeClass("is-hidden")},showProgressBar=function(){$(".js-progress").removeClass("is-hidden");$(".js-progress-message").removeClass("is-hidden")},resetProgressBar=function(){$(".js-progress").addClass("is-hidden");$(".js-progress-message").addClass("is-hidden");$(".js-progress-bar").css("width","0%");$(".js-progress-message-indicator").removeClass("is-complete"); +$(".js-progress-message-incomplete").removeClass("is-hidden");$(".js-progress-message-complete").addClass("is-hidden")},fillConsoleDetails=function(b){consoleDetailsFilled||($.each(b,function(a,b){var c=$(".js-connection-"+b.name);c.length&&(""===b.value?c.parents(".js-form-row").fadeOut():"input"===b.type?(c.prop("disabled",!1),c.val(b.value)):"link"===b.type&&consoleReady&&(c.removeClass("is-disabled"),c.attr("href",b.value)))}),consoleClipboard=new Clipboard(".js-copy-input-button"),initClipboardToolTips(consoleClipboard))}, +disableConsoleDetails=function(){$('[class*="js-connection"]').each(function(b,a){var d=$(a);d.is("input")?(d.val("\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"),d.prop("disabled",!0)):(d.removeAttr("href"),d.addClass("is-disabled"))});consoleClipboard.destroy()},startFocusDataPolling=function(b){pausePolling=!1;requestFocusData(b);focusDataPoll=setInterval(function(){requestFocusData(b)},5E3)},endFocusDataPolling=function(){clearInterval(focusDataPoll)},askForReview=function(){$("#lab-review-modal").modal("show")}, +requestFocusData=function(b){pausePolling||$.ajax("/focuses/show_spl/"+b+".json").done(function(a){1>a.seconds_remaining&&0==a.billing_limit||0:]mm[:]ss",{trim:!1})},updateAssessmentInfo= +function(b){if("undefined"!==typeof b&&"undefined"!==typeof b.total_score&&0
      "}); +$(".js-additional-connection-info").append(a);showAdditionalConnectionInfo();additionalConnectionInfoReceived=!0}},updateConnectionEndpointInfo=function(b){if(!cfConnectionOutputReceived&&""!=b){var a="";if(-1!==b.indexOf("")){var d="",c="";-1!==b.indexOf("dashboard")&&(c=" Dashboard");-1!==b.indexOf("launch")?(d=b.match(/href="([^"]*)/)[1],a+=""):a+="
      "+b+"
      "}else a+="
      "; +$(".js-cf-connection-output").append(a);$(".js-cf-connection-output").removeClass("is-hidden");$(".js-cf-connection-output").addClass("is-visible");cfConnectionOutputReceived=!0}},showAdditionalConnectionInfo=function(){$(".js-additional-connection-info").removeClass("is-hidden");$(".js-tab[data-tab='lab-resources']").click();$(".js-lab-sidebar").animate({scrollTop:$(".js-additional-connection-info").offset().top},750,function(){$(".js-additional-connection-info").addClass("is-visible")})},initExternalWindowListener= +function(){$(".js-external-window").click(function(b){b.preventDefault();if($(this)[0].hasAttribute("href"))consoleWindow=window.open($(this).attr("href"));else return!1})},closeConsoleWindow=function(){""!==consoleWindow&&consoleWindow.close()},resetVariables=function(){cfConnectionOutputReceived=additionalConnectionInfoReceived=pausePolling=!1;consoleWindow=consoleClipboard=focusDataPoll="";cloudProvisioned=consoleReady=consoleInfoFilled=endLabButtonDisplayed=!1},labStartSegment=function(){var b= +$(".js-lab_and_classroom_info").data();"undefined"!=typeof analytics&&analytics.track("start_lab",b)};initLabRun=function(){checkIfLabIsAlreadyRunning();initStartButtonListener();initEndButtonListener();initExternalWindowListener()};initSliderListener=function(){$(".js-sidebar-slider").click(function(){$(this).toggleClass("is-hidden");$(".js-lab-sidebar-container").toggleClass("is-hidden")})};showSidebar=function(){$(".js-sidebar-slider").removeClass("is-hidden");$(".js-lab-sidebar-container").removeClass("is-hidden")}; +hideSidebar=function(){$(".js-sidebar-slider").addClass("is-hidden");$(".js-lab-sidebar-container").addClass("is-hidden")};initLabSidebar=function(){initSliderListener()};var initFakeShadow=function(){$(".js-fake-shadow-waypoint").length&&new Waypoint({element:$(".js-fake-shadow-waypoint")[0],offset:60,handler:function(){$(".js-fake-shadow").toggleClass("is-stuck")}})},initTiles=function(){$(".js-landing-tiles").addClass("is-visible")},initLanding=function(){initFakeShadow();initTiles()}; +ql.MaterialDialog=function(b,a){this.dialog=b;this.dismissers=$(this.dialog).find("[data-dismiss]");this.isOpen=a||!1;this.listen();this.upgrade();this.render()};ql.MaterialDialog.prototype.upgrade=function(){$(this.dialog).addClass("is-upgraded")};ql.MaterialDialog.prototype.listen=function(){for(var b=0;b$(window).width()?($(".md-input").removeClass("md-input--horizontal"),$(".js-permissions-select").removeClass("permissions-select__container--horizontal"),$(".js-labs-resources").removeClass("labs__resources--horizontal")):($(".md-input").addClass("md-input--horizontal"),$(".js-student-resources .md-input").removeClass("md-input--horizontal"),$(".js-permissions-select").addClass("permissions-select__container--horizontal"),$(".js-labs-resources").addClass("labs__resources--horizontal"))}; +ql.initNewStudentResourceListener=function(){$(document).on("nested:fieldAdded",function(b){b=b.field.find(".md-input__input");for(var a=0;a"+this.permissions[a]+"");this.button.find("#permissions-display").html(b);this.menu.render()}; +ql.PermissionsMenu=function(b){var a=this;this.element=b;this.isVisible=!1;this.setPermissions="";this.categories=[];b=this.element.children("li");for(var d=0;de.max&&(e.max=n),n10||(h.releaseIds[e.slice(-200)]=(""+t).slice(-200))}var c=n(13),f=n(8),l=n(2),p=n(15),d=n(19),m=n(30),h=n("loader"),v=n("handle"),g=0;f.on("jserrors",function(){return{body:l.take(["cm"])}});var y={finished:p(o),setPageViewName:r,setErrorHandler:s,addToTrace:i,inlineHit:a,addRelease:u};m(y,function(n,e){c("api-"+n,e,"api")});var w=0},{}],4:[function(n,e,t){var r=/([^?#]*)[^#]*(#[^?]*|$).*/,o=/([^?#]*)().*/;e.exports=function(n,e){return n.replace(e?r:o,"$1$2")}},{}],5:[function(n,e,t){function r(n,e){var t=n[1];i(e[t],function(e,t){var r=n[0],o=t[0];if(o===r){var i=t[1],a=n[3],s=n[2];i.apply(a,s)}})}var o=n("ee"),i=n(30),a=n(13).handlers;e.exports=function(n){var e=o.backlog[n],t=a[n];if(t){for(var s=0;e&&se)return n.slice(0,r).join("");return n.join("")}function a(n,e){var t=0,r="";return u(n,function(n,i){var a,s,u=[];if("string"==typeof i)a="&"+n+"="+o(i),t+=a.length,r+=a;else if(i.length){for(t+=9,s=0;s=e));s++)u.push(a);r+="&"+n+"=%5B"+u.join(",")+"%5D"}}),r}function s(n,e){return e&&"string"==typeof e?"&"+n+"="+o(e):""}var u=n(30),c=n(18),f={"%2C":",","%3A":":","%2F":"/","%40":"@","%24":"$","%3B":";"},l=u(f,function(n){return n}),p=new RegExp(l.join("|"),"g");e.exports={obj:a,fromArray:i,qs:o,param:s}},{}],7:[function(n,e,t){var r=n(30),o=n("ee"),i=n(5);e.exports=function(n){n&&"object"==typeof n&&(r(n,function(n,e){e&&!a[n]&&(o.emit("feat-"+n,[]),a[n]=!0)}),i("feature"))};var a=e.exports.active={}},{}],8:[function(n,e,t){function r(n){if(n.info.beacon){n.info.queueTime&&b.store("measures","qt",{value:n.info.queueTime}),n.info.applicationTime&&b.store("measures","ap",{value:n.info.applicationTime}),k.measure("be","starttime","firstbyte"),k.measure("fe","firstbyte","onload"),k.measure("dc","firstbyte","domContent");var e=b.get("measures"),t=h(e,function(n,e){return"&"+n+"="+e.params.value}).join("");if(t){var r="1",o=[p(n)];if(o.push(t),o.push(g.param("tt",n.info.ttGuid)),o.push(g.param("us",n.info.user)),o.push(g.param("ac",n.info.account)),o.push(g.param("pr",n.info.product)),o.push(g.param("af",h(n.features,function(n){return n}).join(","))),window.performance&&"undefined"!=typeof window.performance.timing){var i={timing:v.addPT(window.performance.timing,{}),navigation:v.addPN(window.performance.navigation,{})};o.push(g.param("perf",y(i)))}o.push(g.param("xx",n.info.extra)),o.push(g.param("ua",n.info.userAttributes)),o.push(g.param("at",n.info.atts));var a=y(n.info.jsAttributes);o.push(g.param("ja","{}"===a?null:a));var s=g.fromArray(o,n.maxBytes);w.jsonp("https://"+n.info.beacon+"/"+r+"/"+n.info.licenseKey+s,A)}}}function o(n){var e=h(q,function(e){return a(e,n,{unload:!0})});return x(e,i)}function i(n,e){return n||e}function a(n,e,t){return u(e,n,s(n),t||{})}function s(n){for(var e=d({}),t=d({}),r=q[n]||[],o=0;o9||0===j.ieVersion);e.exports={sendRUM:m(r),sendFinal:o,pingErrors:c,sendX:a,on:l,xhrUsable:R}},{}],9:[function(n,e,t){var r=n("loader"),o=document.createElement("div");o.innerHTML="";var i=o.getElementsByTagName("div").length;4===i?r.ieVersion=6:3===i?r.ieVersion=7:2===i?r.ieVersion=8:1===i?r.ieVersion=9:r.ieVersion=0,e.exports=r.ieVersion},{}],10:[function(n,e,t){function r(n){c.sendFinal(p,!1),a.navCookie&&(document.cookie="NREUM=s="+Number(new Date)+"&r="+o(document.location.href)+"&p="+o(document.referrer)+"; path=/")}var o=n(14),i=n(1),a=n(16),s=n(17),u=n(15),c=n(8),f=n(13),l=n(7),p=n("loader"),d=n(29),m=n(5);n(3);var h="undefined"==typeof window.NREUM.autorun||window.NREUM.autorun;window.NREUM.setToken=l,6===n(9)?p.maxBytes=2e3:p.maxBytes=3e4,p.releaseIds={};var v=u(r);!d||navigator.sendBeacon?i("pagehide",v):i("beforeunload",v),i("unload",v),f("mark",s.mark,"api"),s.mark("done"),m("api"),h&&c.sendRUM(p)},{}],11:[function(n,e,t){e.exports=function(n,e){setTimeout(function t(){try{n()}finally{setTimeout(t,e)}},e)}},{}],12:[function(n,e,t){function r(n,e){var t=n["navigation"+a];return e.of=t,i(t,t,e,"n"),i(n[u+a],t,e,"u"),i(n[c+a],t,e,"r"),i(n[u+s],t,e,"ue"),i(n[c+s],t,e,"re"),i(n["fetch"+a],t,e,"f"),i(n[f+a],t,e,"dn"),i(n[f+s],t,e,"dne"),i(n["c"+l+a],t,e,"c"),i(n["secureC"+l+"ion"+a],t,e,"s"),i(n["c"+l+s],t,e,"ce"),i(n[p+a],t,e,"rq"),i(n[d+a],t,e,"rp"),i(n[d+s],t,e,"rpe"),i(n.domLoading,t,e,"dl"),i(n.domInteractive,t,e,"di"),i(n[h+a],t,e,"ds"),i(n[h+s],t,e,"de"),i(n.domComplete,t,e,"dc"),i(n[m+a],t,e,"l"),i(n[m+s],t,e,"le"),e}function o(n,e){return i(n.type,0,e,"ty"),i(n.redirectCount,0,e,"rc"),e}function i(n,e,t,r){var o;"number"==typeof n&&n>0&&(o=Math.round(n-e),t[r]=o),v.push(o)}var a="Start",s="End",u="unloadEvent",c="redirect",f="domainLookup",l="onnect",p="request",d="response",m="loadEvent",h="domContentLoadedEvent",v=[];e.exports={addPT:r,addPN:o,nt:v}},{}],13:[function(n,e,t){function r(n,e,t,r){o(r||i,n,e,t)}function o(n,e,t,r){r||(r="feature"),n||(n=i);var o=a[r]=a[r]||{},s=o[e]=o[e]||[];s.push([n,t])}var i=n("handle").ee;e.exports=r,r.on=o;var a=r.handlers={}},{}],14:[function(n,e,t){function r(n){var e,t=0;for(e=0;e6e4)return;return o}}}var a=n(14),s=n(17),u=n("loader"),c=n(29);e.exports={navCookie:!0},r()},{}],17:[function(n,e,t){function r(n,e){"undefined"==typeof e&&(e=a.now()+a.offset),s[n]=e}function o(n,e,t){var r=s[e],o=s[t];"undefined"!=typeof r&&"undefined"!=typeof o&&i.store("measures",n,{value:o-r})}var i=n(2),a=n("loader"),s={};e.exports={mark:r,measure:o}},{}],18:[function(n,e,t){function r(n){try{return i("",{"":n})}catch(e){try{s.emit("internal-error",[e])}catch(t){}}}function o(n){return u.lastIndex=0,u.test(n)?'"'+n.replace(u,function(n){var e=c[n];return"string"==typeof e?e:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function i(n,e){var t=e[n];switch(typeof t){case"string":return o(t);case"number":return isFinite(t)?String(t):"null";case"boolean":return String(t);case"object":if(!t)return"null";var r=[];if(t instanceof window.Array||"[object Array]"===Object.prototype.toString.apply(t)){for(var s=t.length,u=0;u1?e[1]:"unknown"}function f(n){return n&&n.indexOf("nrWrapper")>=0}function l(n){for(var e,t=n.stacktrace,r=/ line (\d+), column (\d+) in (?:]+)>|([^\)]+))\(.*\) in (.*):\s*$/i,o=t.split("\n"),i=[],a=[],s=!1,u=0,l=o.length;u100){var t=n.length-100;e=n.slice(0,50).join("\n"),e+="\n< ...truncated "+t+" lines... >\n",e+=n.slice(-50).join("\n")}else e=n.join("\n");return e.replace(r,"")}},{}],23:[function(n,e,t){function r(n){return p(n.exceptionClass)^n.stackHash}function o(n,e){if("string"!=typeof n)return"";var t=f(n);return t===e?"":t}function i(n,e){for(var t="",r=0;r=v)){var o,a,f={};"undefined"!=typeof window&&window.document&&window.document.documentElement&&(o=window.document.documentElement.clientWidth,a=window.document.documentElement.clientHeight);var l={timestamp:n+s.offset,timeSinceLoad:n/1e3,browserWidth:o,browserHeight:a,referrerUrl:i,currentUrl:p(""+location),pageUrl:p(s.origin),eventType:"PageAction"};u(l,r),u(y,r),t&&"object"==typeof t&&u(t,r),f.actionName=e||"",g.push(f)}}function o(n,e,t){y[e]=t}var i,a=n("ee"),s=n("loader"),u=n(30),c=n(18),f=n(13),l=n(8),p=n(4),d=n(11),m=120,h=30,v=m*h/60,g=[],y=s.info.jsAttributes={};document.referrer&&(i=p(document.referrer)),f("api-setCustomAttribute",o,"api"),a.on("feat-ins",function(){f("api-addPageAction",r),l.on("ins",function(){return{qs:{ua:s.info.userAttributes,at:s.info.atts},body:{ins:g.splice(0)}}}),d(function(){l.sendX("ins",s)},1e3*h),l.sendX("ins",s)})},{}],26:[function(n,e,t){function r(n){var e,t,r,o=Date.now();for(e in n)t=n[e],"number"==typeof t&&t>0&&ti.s-e?s.e=i.e:(r[i.o]=i,a.push(i)):(r[i.o]=null,i.n="scroll",a.push(i)),o}}function v(n,e){return e}function g(n,e){return n.concat(e)}function y(n){var e=4;return!!(n&&"number"==typeof n.e&&"number"==typeof n.s&&n.e-n.s9e5?void(C={}):(k(C,function(e,t){t&&t.length&&(n+=t.length)}),n>30&&b.sendX("resources",w),void(n>1e3&&(C={})))},1e4)});var B=0}}},{}],27:[function(n,e,t){function r(n,e,t){e.time=t,n.cat?o.store("xhr",s([n.status,n.cat]),n,e):o.store("xhr",s([n.status,n.host,n.pathname]),n,e)}var o=n(2),i=n(13),a=n(8),s=n(18),u=n("loader"),c=n("ee");u.features.xhr&&(a.on("jserrors",function(){return{body:o.take(["xhr"])}}),c.on("feat-err",function(){i("xhr",r)}),e.exports=r)},{}],28:[function(n,e,t){e.exports=function(n){var e=document.createElement("a"),t=window.location,r={};e.href=n,r.port=e.port;var o=e.href.split("://");!r.port&&o[1]&&(r.port=o[1].split("/")[0].split("@").pop().split(":")[1]),r.port&&"0"!==r.port||(r.port="https"===o[0]?"443":"80"),r.hostname=e.hostname||t.hostname,r.pathname=e.pathname,r.protocol=o[0],"/"!==r.pathname.charAt(0)&&(r.pathname="/"+r.pathname);var i=!e.protocol||":"===e.protocol||e.protocol===t.protocol,a=e.hostname===document.domain&&e.port===t.port;return r.sameOrigin=i&&(!e.hostname||a),r}},{}],29:[function(n,e,t){var r=0,o=navigator.userAgent.match(/Firefox[\/\s](\d+\.\d+)/);o&&(r=+o[1]),e.exports=r},{}],30:[function(n,e,t){function r(n,e){var t=[],r="",i=0;for(r in n)o.call(n,r)&&(t[i]=e(r,n[r]),i+=1);return t}var o=Object.prototype.hasOwnProperty;e.exports=r},{}],31:[function(n,e,t){function r(n,e,t){e||(e=0),"undefined"==typeof t&&(t=n?n.length:0);for(var r=-1,o=t-e||0,i=Array(o<0?0:o);++r + \ No newline at end of file diff --git a/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource(2).html b/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource(2).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource(2).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource(3).html b/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource(3).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource(3).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource(4).html b/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource(4).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource(4).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource(5).html b/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource(5).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource(5).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource(6).html b/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource(6).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource(6).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource.html b/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource.html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Leveraging Unstructured Data _ Qwiklabs + roitraining_files/saved_resource.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining.htm b/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining.htm new file mode 100755 index 0000000..d33246f --- /dev/null +++ b/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining.htm @@ -0,0 +1,1846 @@ + + + + + + + +Serverless Data Analysis (Python) | Qwiklabs + roitraining + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + +menu + +
      +arrow_back + +

      +Serverless Data Analysis (Python) +

      +
      +
      + + +
      +
      +
      + + +
      + +
      + +
      +
      + + + +
      +
      + + + +
      +
      +
      +
      +
      + +480m access +· +480m completion + +
      + + +
      +
      +
      +
      +
      +Connection Details +
      + + +
      +
      + + + +
      +
      + +
      +
      + + + +
      +
      + +
      +
      + + + +
      +
      + + + + + +
      +
      +
      +
      +
      + + +
      + +
      +
      +
      +
      +
      + +
      +
      + +
      + +
      +

      + 08:00:00 +

      +
      +
      + +
      +
      +
      +
      +
      + +

      SERVERLESS DATA ANALYSIS

      + +

      GETTING STARTED WITH GCP CONSOLE

      + +

      When the lab is ready a green button will appear that looks like this:

      + +

      2fa0ccada9d929f0.png

      + +

      When you are ready to begin, click Start Lab.

      + +

      Logging in to Google Cloud Platform

      + +

      Step 1: Locate the Username, Password and Project Id

      + +

      Press the green [Start] button to start the lab. After setup is completed you will see something similar to this on the right side of the Qwiklabs window:

      + +

      eaa80bb0490b07d0.png

      + +

      Step 2: Browse to Console

      + +

      Open an Incognito window in your browser.
      +And go to http://console.cloud.google.com

      + +

      Step 3: Sign in to Console

      + +

      Log in with the Username and Password provided. The steps below are suggestive. The actual dialog and procedures may vary from this example.

      + +

      1c492727805af169.png

      + +

      Step 4: Accept the conditions

      + +

      Accept the new account terms and conditions.

      + +

      32331ec60c5f6609.png

      + +

      This is a temporary account. You will only have access to the account for this one lab.

      +
      • Do not add recovery options
      • +
      • Do not sign up for free trials
      • +
      +

      Step 5: Don't change the password

      + +

      If prompted, don't change the password. Just click [Continue].

      + +

      ef164317a73a66d7.png

      + +

      Step 6 Agree to the Terms of Service

      + +

      Select (x) Yes, (x) Yes and click [AGREE AND CONTINUE].

      + +

      e0edec7592d289e1.png

      + +

      Step 7: Console opens

      + +

      The Google Cloud Platform Console opens.

      + +

      You may see a bar occupying the top part of the Console inviting you to sign up for a free trial. You can click on the [DISMISS] button so that the entire Console screen is available.

      + +

      a1b4bfec239cc863.png

      + +

      Step 8: Switch project (if necessary)

      + +

      On the top blue horizontal bar, click on the drop down icon to select the correct project (if not already so). You can confirm the project id from your Qwiklabs window (shown in step 1 above).

      + +

      849103afbf5e9178.png

      + +

      Click on "view more projects" if necessary and select the correct project id.

      + +

      PART 1: BUILD A BIGQUERY QUERY

      + +

      Overview

      + +

      Duration is 1 min

      + +

      In this lab, you learn how to build up a complex BigQuery using clauses, subqueries, built-in functions and joins.

      + +

      What you learn

      + +

      In this lab, you:

      +
      • Create and run a query
      • +
      • Modify the query to add clauses, subqueries, built-in functions and joins.
      • +
      +

      Introduction

      + +

      Duration is 1 min

      + +

      The goal of this lab is to build up a complex BigQuery using clauses, subqueries, built-in functions and joins, and to run the query.

      + +

      Before you begin

      + +

      Duration is 1 min

      + +

      If you have not started the lab, go ahead and click the green "Start Lab" button. Once done, it will display credentials for this lab. Repeat the steps in Lab 0 to log into the Cloud console with the credentials provided in this lab.

      + +

      Here is a quick reference:

      + +

      Open new incognito window → go to cloud console → login with provided credentials → follow the prompts → switch project if necessary

      + +

      Create and run a query

      + +

      Duration is 3 min

      + +

      Step 1

      + +

      Open the Google Cloud Console (in the incognito window) and using the menu, navigate into BigQuery web UI, click on the Compose Query button on top left, and then click on Show Options, and ensure you are using Standard SQL. You are using Standard SQL if the "Use Legacy SQL" checkbox is unchecked.

      + +

      beb1dee4f27cf451.png

      + +

      Step 2

      + +

      Click Compose Query.

      + +

      Step 3

      + +

      In the New Query window, type (or copy-and-paste) the following query:

      +
      SELECT
      +  airline,
      +  date,
      +  departure_delay
      +FROM
      +  `bigquery-samples.airline_ontime_data.flights`
      +WHERE
      +  departure_delay > 0
      +  AND departure_airport = 'LGA'
      +LIMIT
      +  100
      +
      +

      What does this query do? ______________________

      + +

      Step 4

      + +

      Click Run Query.

      + +

      Aggregate and Boolean functions

      + +

      Duration is 5 min

      + +

      Step 1

      + +

      To the previous query, add an additional clause to filter by date and group the results by airline. Because you are grouping the results, the SELECT statement will have to use an aggregate function. In the New Query window, type the following query:

      +
      SELECT
      +  airline,
      +  COUNT(departure_delay)
      +FROM
      +   `bigquery-samples.airline_ontime_data.flights`
      +WHERE
      +  departure_airport = 'LGA'
      +  AND date = '2008-05-13'
      +GROUP BY
      +  airline
      +ORDER BY airline
      +
      +

      Step 2

      + +

      Click Run Query. What does this query do? ______________________________________________________

      + +

      What is the number you get for American Airlines (AA)?

      + +
      + +

      Step 3

      + +

      Now change the query slightly:

      +
      SELECT
      +  airline,
      +  COUNT(departure_delay)
      +FROM
      +   `bigquery-samples.airline_ontime_data.flights`
      +WHERE
      +  departure_delay > 0 AND
      +  departure_airport = 'LGA'
      +  AND date = '2008-05-13'
      +GROUP BY
      +  airline
      +ORDER BY airline
      +
      +

      Step 4

      + +

      Click Run Query. What does this query do? ______________________________________________________

      + +

      What is the number you get for American Airlines (AA)?

      + +
      + +

      Step 5

      + +

      The first query returns the total number of flights by each airline from La Guardia, and the second query returns the total number of flights that departed late. (Do you see why?)

      + +

      How would you get both the number delayed as well as the total number of flights?

      + +
      + +
      + +

      Step 6

      + +

      Run this query:

      +
      SELECT
      +  f.airline,
      +  COUNT(f.departure_delay) AS total_flights,
      +  SUM(IF(f.departure_delay > 0, 1, 0)) AS num_delayed
      +FROM
      +   `bigquery-samples.airline_ontime_data.flights` AS f
      +WHERE
      +  f.departure_airport = 'LGA' AND f.date = '2008-05-13'
      +GROUP BY
      +  f.airline
      +
      +

      String operations

      + +

      Duration is 3 min

      + +

      Step 1

      + +

      In the New Query window, type the following query:

      +
      SELECT
      +  CONCAT(CAST(year AS STRING), '-', LPAD(CAST(month AS STRING),2,'0'), '-', LPAD(CAST(day AS STRING),2,'0')) AS rainyday
      +FROM
      +  `bigquery-samples.weather_geo.gsod`
      +WHERE
      +  station_number = 725030
      +  AND total_precipitation > 0
      +
      +

      Step 2

      + +

      Click Run Query.

      + +

      Step 3

      + +

      How would you do the airline query to aggregate over all these dates instead of just ‘2008-05-13'?

      + +
      + +

      You could use a JOIN, as shown next.

      + +

      Join on Date

      + +

      Duration is 3 min

      + +

      Step 1

      + +

      In the New Query window, type the following query:

      +
      SELECT
      +  f.airline,
      +  SUM(IF(f.arrival_delay > 0, 1, 0)) AS num_delayed,
      +  COUNT(f.arrival_delay) AS total_flights
      +FROM
      +  `bigquery-samples.airline_ontime_data.flights` AS f
      +JOIN (
      +  SELECT
      +    CONCAT(CAST(year AS STRING), '-', LPAD(CAST(month AS STRING),2,'0'), '-', LPAD(CAST(day AS STRING),2,'0')) AS rainyday
      +  FROM
      +    `bigquery-samples.weather_geo.gsod`
      +  WHERE
      +    station_number = 725030
      +    AND total_precipitation > 0) AS w
      +ON
      +  w.rainyday = f.date
      +WHERE f.arrival_airport = 'LGA'
      +GROUP BY f.airline
      +
      +

      Step 2

      + +

      Click __Run Query. __How would you get the fraction of flights delayed for each airline?

      + +

      You could put the entire query above into a subquery and then select from the columns of this result

      + +

      Subquery

      + +

      Duration is 3 min

      + +

      Step 1

      + +

      In the New Query window, type the following query:

      +
      SELECT
      +  airline,
      +  num_delayed,
      +  total_flights,
      +  num_delayed / total_flights AS frac_delayed
      +FROM (
      +SELECT
      +  f.airline AS airline,
      +  SUM(IF(f.arrival_delay > 0, 1, 0)) AS num_delayed,
      +  COUNT(f.arrival_delay) AS total_flights
      +FROM
      +  `bigquery-samples.airline_ontime_data.flights` AS f
      +JOIN (
      +  SELECT
      +    CONCAT(CAST(year AS STRING), '-', LPAD(CAST(month AS STRING),2,'0'), '-', LPAD(CAST(day AS STRING),2,'0')) AS rainyday
      +  FROM
      +    `bigquery-samples.weather_geo.gsod`
      +  WHERE
      +    station_number = 725030
      +    AND total_precipitation > 0) AS w
      +ON
      +  w.rainyday = f.date
      +WHERE f.arrival_airport = 'LGA'
      +GROUP BY f.airline
      +  )
      +ORDER BY
      +  frac_delayed ASC
      +
      +

      Step 2

      + +

      Click Run Query

      + + + +

      +

      Stop here if you are done. Wait for instructions from the Instructor before going into the next section

      +
      + +

      PART 2: LOADING AND EXPORTING DATA

      + +

      Overview

      + +

      Duration is 1 min

      + +

      In this lab you use load data in different formats into BigQuery tables.

      + +

      What you learn

      + +

      In this lab, you:

      +
      • Load a CSV file into a BigQuery table using the web UI
      • +
      • Load a JSON file into a BigQuery table using the CLI
      • +
      +

      Introduction

      + +

      Duration is 1 min

      + +

      In this lab, you load data into BigQuery in multiple ways. You also transform the data you load, and you query the data.

      + +

      Upload data using the web UI

      + +

      Duration is 14 min

      + +

      __Task: __In this section of the lab, you upload a CSV file to BigQuery using the BigQuery web UI.

      + +

      BigQuery supports the following data formats when loading data into tables: CSV, JSON, AVRO, or Cloud Datastore backups. This example focuses on loading a CSV file into BigQuery.

      + +

      Step 1

      + +

      Open the Google Cloud Console (in the incognito window) and using the menu, navigate into BigQuery web UI.

      + +

      Step 2

      + +

      Click the blue arrow to the right of your project name and choose Create new dataset.

      + +

      Step 3

      + +

      In the ‘Create Dataset' dialog, for Dataset ID, type cpb101_flight_data and then click OK.

      + +

      Step 4

      + +

      Download the following file to your local machine. This file contains the data that will populate the first table.

      + +

      Download airports.csv

      + +

      Step 5

      + +

      Create a new table in the cpb101_flight_data dataset to store the data from the CSV file. Click the create table icon (the plus sign) to the right of the dataset.

      + +

      Step 6

      + +

      On the Create Table page, in the Source Data section:

      +
      • For Location, leave File upload selected.
      • +
      • To the right of File upload, click Choose file, then browse to and select airports.csv.
      • +
      • Verify File format is set to CSV.
      • +
      +

      Note: __When you have created a table previously, the __Create from Previous Job option allows you to quickly use your settings to create similar tables.

      + +

      Step 7

      + +

      In the Destination Table section:

      +
      • For Table name, leave cpb101_flight_data selected.
      • +
      • For Destination table name, type AIRPORTS.
      • +
      • For Table type, Native table should be selected and unchangeable.
      • +
      +

      Step 8

      + +

      In the Schema section:

      +
      • Add fields one at a time. The airports.csv has the following fields: , , , , which are of type and , which are of type . Make all these fields .
      • +
      +

      Step 9

      + +

      In the Options section:

      +
      • For Field delimiter, verify Comma is selected.
      • +
      • Since airports.csv contains a single header row, for Header rows to skip, type 1.
      • +
      • Accept the remaining default values and click Create Table. BigQuery creates a load job to create the table and upload data into the table (this may take a few seconds). You can track job progress by clicking Job History.
      • +
      +

      Step 10

      + +

      Once the load job is complete, click cpb101_flight_data > AIRPORTS.

      + +

      Step 11

      + +

      On the Table Details page, click Details to view the table properties and then click Preview to view the table data.

      + +

      Upload data using the CLI

      + +

      Duration is 7 min

      + +

      Task: In this section of the lab, you upload multiple JSON files and an associated schema file to BigQuery using the CLI.

      + +

      Step 1

      + +

      Navigate to the Google Cloud Platform Console and to the right of your project name, click Activate Google Cloud Shell.

      + +

      Step 2

      + +

      Type the following command to download schema_flight_performance.json (the schema file for the table in this example) to your working directory.

      +
      curl https://storage.googleapis.com/cloud-training/CPB200/BQ/lab4/schema_flight_performance.json -o schema_flight_performance.json
      +
      +

      Step 3

      + +

      The JSON files containing the data for your table are stored in a Google Cloud Storage bucket. They have URIs like the following:

      + +

      + +

      Type the following command to create a table named flights_2014 in the __cpb101_flight_data __dataset, using data from files in Google Cloud Storage and the schema file stored on your virtual machine.

      + +

      Note that your Project ID is stored as a variable in Cloud Shell () so there's no need for you to remember it. If you require it, you can view your Project ID in the command line to the right of your username (after the @ symbol).

      +
      bq load --source_format=NEWLINE_DELIMITED_JSON $DEVSHELL_PROJECT_ID:cpb101_flight_data.flights_2014 gs://cloud-training/CPB200/BQ/lab4/domestic_2014_flights_*.json ./schema_flight_performance.json
      +
      +

      If you are prompted to select a project to be set as default, choose the Project ID that was setup when you started this qwiklab (Look in the "Connect" tab of your Qwiklabs window, the project id typically looks something like "qwiklabs-gcp-123xyz" ).

      + +

      Note

      +

      There are multiple JSON files in the bucket named according to the convention: domestic_2014_flights_*.json. The wildcard (*) character is used to include all of the .json files in the bucket.

      +
      + +

      Step 4

      + +

      Once the table is created, type the following command to verify table flights_2014 exists in dataset cpb101_flight_data.

      +
      bq ls $DEVSHELL_PROJECT_ID:cpb101_flight_data
      +
      +

      The output should look like the following:

      + +

      + +

      + +

      + +

      + +

      Export table

      + +

      Duration is 6 min

      + +

      __Task: __In this section of the lab, you export a BigQuery table using the web UI.

      + +

      Step 1

      + +

      If you don't already have a bucket on Cloud Storage, create one from the Storage section of the GCP console. Bucket names have to be globally unique.

      + +

      Step 2

      + +

      Back to the Google Cloud Console (in the incognito window) and using the menu, navigate into BigQuery web UI

      + +

      Step 3

      + +

      Select the AIRPORTS table that you created recently, and using the "down" button to its right, select the option for Export Table.

      + +

      Step 4

      + +

      In the dialog, specify and click _OK. _

      + +

      Step 5

      + +

      Use the CLI to export the table:

      +
      bq extract cpb101_flight_data.AIRPORTS gs://<your-bucket-name>/bq/airports2.csv
      +
      +

      Remember to change with the bucket you created earlier.

      + +

      Step 6

      + +

      Browse to your bucket and ensure that both .csv files have been created.

      + + + +

      +

      Stop here if you are done. Wait for instructions from the Instructor before going into the next section

      +
      + +

      PART 3: ADVANCED SQL QUERIES

      + +

      Overview

      + +

      Duration is 1 min

      + +

      In this lab you use some advanced SQL concepts to answer the question: what programming languages do open-source programmers program in on weekends?

      + +

      What you learn

      + +

      In this lab, you write a query that uses advanced SQL concepts:

      +
      • Nested fields
      • +
      • Regular expressions
      • +
      • With statement
      • +
      • Group and Having
      • +
      +

      Introduction

      + +

      Duration is 1 min

      + +

      In this lab, you use some advanced SQL concepts to answer the question: what programming languages do open-source programmers program in on weekends?

      + +

      To answer this question, we will use a BigQuery public dataset that has information on all GitHub commits.

      + +

      Get information about code commits

      + +

      Duration is 5 min

      + +

      In this section, you will learn how to work with nested fields.

      + +

      Step 1

      + +

      Open the Google Cloud Console (in the incognito window) and using the menu, navigate into BigQuery web UI.

      + +

      Step 2

      + +

      Compose a new query, making sure that the "Legacy SQL" option is not checked (you are using Standard SQL).

      +
      SELECT
      +  author.email,
      +  diff.new_path AS path,
      +  author.date
      +FROM
      +  `bigquery-public-data.github_repos.commits`,
      +  UNNEST(difference) diff
      +WHERE
      +  EXTRACT(YEAR
      +  FROM
      +    author.date)=2016
      +LIMIT 10
      +
      +

      Step 3

      + +

      Play a little with the query above to understand what it is doing. For example, instead of , try just . What type of field is author?

      + +

      Step 4

      + +

      Change to . Why does it not work? Replace by . Does this work? Why? What is the doing?

      + +

      Extract programming language

      + +

      Duration is 5 min

      + +

      In this section, you will learn how to use regular expressions. Let's assume that the filename extension is the programming language, i.e., a file that ends in .py has the language "py". How will you pull out the extension from the path?

      + +

      Step 1

      + +

      Type the following query:

      +
      SELECT
      +  author.email,
      +  LOWER(REGEXP_EXTRACT(diff.new_path, r'\.([^\./\(~_ \- #]*)$')) lang,
      +  diff.new_path AS path,
      +  author.date
      +FROM
      +  `bigquery-public-data.github_repos.commits`,
      +  UNNEST(difference) diff
      +WHERE
      +  EXTRACT(YEAR
      +  FROM
      +    author.date)=2016
      +LIMIT
      +  10
      +
      +

      Step 2

      + +

      Modify the query above to only use lang if the language consists purely of letters and has a length that is fewer than 8 characters.

      + +

      Step 3

      + +

      Modify the query above to group by language and list in descending order of the number of commits. Here's a potential solution:

      +
      WITH
      +  commits AS (
      +  SELECT
      +    author.email,
      +    LOWER(REGEXP_EXTRACT(diff.new_path, r'\.([^\./\(~_ \- #]*)$')) lang,
      +    diff.new_path AS path,
      +    author.date
      +  FROM
      +    `bigquery-public-data.github_repos.commits`,
      +    UNNEST(difference) diff
      +  WHERE
      +    EXTRACT(YEAR
      +    FROM
      +      author.date)=2016 )
      +SELECT
      +  lang,
      +  COUNT(path) AS numcommits
      +FROM
      +  commits
      +WHERE
      +  LENGTH(lang) < 8
      +  AND lang IS NOT NULL
      +  AND REGEXP_CONTAINS(lang, '[a-zA-Z]')
      +GROUP BY
      +  lang
      +HAVING
      +  numcommits > 100
      +ORDER BY
      +  numcommits DESC
      +
      +

      Weekend or weekday?

      + +

      Duration is 5 min

      + +

      Now, group the commits based on whether or not it happened on a weekend. How would you do it?

      + +

      Step 1

      + +

      Modify the query above to extract the day of the week from author.date. Days 2 to 6 are weekdays.

      + +

      Step 2

      + +

      Here's a potential solution:

      +
      WITH
      +  commits AS (
      +  SELECT
      +    author.email,
      +    EXTRACT(DAYOFWEEK
      +    FROM
      +      author.date) BETWEEN 2
      +    AND 6 is_weekday,
      +    LOWER(REGEXP_EXTRACT(diff.new_path, r'\.([^\./\(~_ \- #]*)$')) lang,
      +    diff.new_path AS path,
      +    author.date
      +  FROM
      +    `bigquery-public-data.github_repos.commits`,
      +    UNNEST(difference) diff
      +  WHERE
      +    EXTRACT(YEAR
      +    FROM
      +      author.date)=2016)
      +SELECT
      +  lang,
      +  is_weekday,
      +  COUNT(path) AS numcommits
      +FROM
      +  commits
      +WHERE
      +  LENGTH(lang) < 8
      +  AND lang IS NOT NULL
      +  AND REGEXP_CONTAINS(lang, '[a-zA-Z]')
      +GROUP BY
      +  lang,
      +  is_weekday
      +HAVING
      +  numcommits > 100
      +ORDER BY
      +  numcommits DESC
      +
      +

      Ignoring file extensions that do not correspond to programming languages, it appears that the most popular weekend programming languages are JavaScript, PHP and C.

      + +

      Acknowledgment: This section of lab (and query) is based on an article by Felipe Hoffa: https://medium.com/@hoffa/the-top-weekend-languages-according-to-githubs-code-6022ea2e33e8#.8oj2rp804

      + + + +

      +

      Stop here if you are done. Wait for instructions from the Instructor before going into the next section

      +
      + +

      PART 4: A SIMPLE DATAFLOW PIPELINE

      + +

      Overview

      + +

      Duration is 1 min

      + +

      In this lab, you learn how to write a simple Dataflow pipeline and run it both locally and on the cloud.

      + +

      What you learn

      + +

      In this lab, you learn how to:

      +
      • Setup a Java Dataflow project using Maven
      • +
      • Write a simple pipeline in Java
      • +
      • Execute the query on the local machine
      • +
      • Execute the query on the cloud
      • +
      +

      Introduction

      + +

      Duration is 1 min

      + +

      The goal of this lab is to become familiar with the structure of a Dataflow project and learn how to execute a Dataflow pipeline.

      + +

      Open Dataflow project

      + +

      Duration is 3 min

      + +

      Step 1

      + +

      Start CloudShell and navigate to the directory for this lab:

      +
      cd ~/training-data-analyst/courses/data_analysis/lab2/python
      +
      +

      If this directory doesn't exist, you may need to git clone the repository first:

      +
      cd ~
      +git clone https://github.com/GoogleCloudPlatform/training-data-analyst
      +cd ~/training-data-analyst/courses/data_analysis/lab2/python
      +
      +

      Step 2

      + +

      Install the necessary dependencies for Python dataflow:

      +
      sudo ./install_packages.sh
      +
      +

      Verify that you have the right version of pip (should be > 8.0):

      +
      pip -V
      +
      +

      If not, open a new CloudShell tab and it should pick up the updated pip.

      + +

      Pipeline filtering

      + +

      Duration is 5 min

      + +

      Step 1

      + +

      View the source code for the pipeline using nano:

      +
      cd ~/training-data-analyst/courses/data_analysis/lab2/python
      +nano grep.py
      +
      +

      Step 2

      + +

      What files are being read? _____________________________________________________

      + +

      What is the search term? ______________________________________________________

      + +

      Where does the output go? ___________________________________________________

      + +

      There are three transforms in the pipeline:

      +
      1. What does the transform do? _________________________________
      2. +
      3. What does the second transform do? ______________________________
      4. +
      • Where does its input come from? ________________________
      • +
      • What does it do with this input? __________________________
      • +
      • What does it write to its output? __________________________
      • +
      • Where does the output go to? ____________________________
      • +
      1. What does the third transform do? _____________________
      2. +
      +

      Execute the pipeline locally

      + +

      Duration is 2 min

      + +

      Step 1

      + +

      Execute locally:

      +
      python grep.py
      +
      +

      Note: if you see an error that says " you may ignore it. The error is simply saying that logging from the oauth2 library will go to stderr.

      + +

      Step 2

      + +

      Examine the output file:

      +
      cat /tmp/output-*
      +
      +

      Does the output seem logical? ______________________

      + +

      Execute the pipeline on the cloud

      + +

      Duration is 10 min

      + +

      Step 1

      + +

      If you don't already have a bucket on Cloud Storage, create one from the Storage section of the GCP console. Bucket names have to be globally unique.

      + +

      Step 2

      + +

      Copy some Java files to the cloud (make sure to replace with the bucket name you created in the previous step):

      +
      gsutil cp ../javahelp/src/main/java/com/google/cloud/training/dataanalyst/javahelp/*.java gs://<YOUR-BUCKET-NAME>/javahelp
      +
      +

      Step 3

      + +

      Edit the Dataflow pipeline in by opening up in nano:

      +
      cd ~/training-data-analyst/courses/data_analysis/lab2/python
      +nano grepc.py
      +
      +

      and changing the PROJECT and BUCKET variables appropriately.

      + +

      Step 4

      + +

      Submit the Dataflow to the cloud:

      +
      python grepc.py
      +
      +

      Because this is such a small job, running on the cloud will take significantly longer than running it locally (on the order of 2-3 minutes).

      + +

      Step 5

      + +

      On your Cloud Console, navigate to the Dataflow section (from the 3 bars on the top-left menu), and look at the Jobs. Select your job and monitor its progress. You will see something like this:

      + +

      8826f7db15d23f15.png

      + +

      Step 6

      + +

      Wait for the job status to turn to Succeeded. At this point, your CloudShell will display a command-line prompt. In CloudShell, examine the output:

      +
      gsutil cat gs://<YOUR-BUCKET-NAME>/javahelp/output-*
      +
      + + +

      +

      Stop here if you are done. Wait for instructions from the Instructor before going into the next section

      +
      + +

      PART 5: MAPREDUCE IN DATAFLOW

      + +

      Overview

      + +

      Duration is 1 min

      + +

      In this lab, you learn how to use pipeline options and carry out Map and Reduce operations in Dataflow.

      + +

      What you learn

      + +

      In this lab, you learn how to:

      +
      • Use pipeline options in Dataflow
      • +
      • Carry out mapping transformations
      • +
      • Carry out reduce aggregations
      • +
      +

      Introduction

      + +

      Duration is 1 min

      + +

      The goal of this lab is to learn how to write MapReduce operations using Dataflow.

      + +

      Identify Map and Reduce operations

      + +

      Duration is 5 min

      + +

      Step 1

      + +

      Start CloudShell and navigate to the directory for this lab:

      +
      cd ~/training-data-analyst/courses/data_analysis/lab2
      +
      +

      If this directory doesn't exist, you may need to git clone the repository:

      +
      git clone https://github.com/GoogleCloudPlatform/training-data-analyst
      +
      +

      Step 2

      + +

      View the source code for the pipeline using nano:

      +
      cd ~/training-data-analyst/courses/data_analysis/lab2/python
      +nano is_popular.py
      +
      +

      Step 3

      + +

      What custom arguments are defined? ____________________

      + +

      What is the default output prefix? _________________________________________

      + +

      How is the variable output_prefix in main() set? _____________________________

      + +

      How are the pipeline arguments such as --runner set? ______________________

      + +

      Step 4

      + +

      What are the key steps in the pipeline? _____________________________________________________________________________

      + +

      Which of these steps happen in parallel? ____________________________________

      + +

      Which of these steps are aggregations? _____________________________________

      + +

      Execute the pipeline

      + +

      Duration is 2 min

      + +

      Step 1

      + +

      Install the necessary dependencies for Python dataflow:

      +
      sudo ./install_packages.sh
      +
      +

      Verify that you have the right version of pip (should be > 8.0):

      +
      pip -V
      +
      +

      If not, open a new CloudShell tab and it should pick up the updated pip.

      + +

      Step 2

      + +

      Run the pipeline locally:

      +
      ./is_popular.py
      +
      +

      Note: if you see an error that says " you may ignore it. The error is simply saying that logging from the oauth2 library will go to stderr.

      + +

      Step 3

      + +

      Examine the output file:

      +
      cat /tmp/output-*
      +
      +

      Use command line parameters

      + +

      Duration is 2 min

      + +

      Step 1

      + +

      Change the output prefix from the default value:

      +
      ./is_popular.py --output_prefix=/tmp/myoutput
      +
      +

      What will be the name of the new file that is written out?

      + +

      Step 2

      + +

      Note that we now have a new file in the /tmp directory:

      +
      ls -lrt /tmp/myoutput*
      +
      + + +

      +

      Stop here if you are done. Wait for instructions from the Instructor before going into the next section

      +
      + +

      PART 6: SIDE INPUTS

      + +

      Overview

      + +

      Duration is 1 min

      + +

      In this lab, you learn how to use BigQuery as a data source into Dataflow, and how to use the results of a pipeline as a side input to another pipeline.

      + +

      What you learn

      + +

      In this lab, you learn how to:

      +
      • Read data from BigQuery into Dataflow
      • +
      • Use the output of a pipeline as a side-input to another pipeline
      • +
      +

      Introduction

      + +

      Duration is 1 min

      + +

      The goal of this lab is to learn how to use BigQuery as a data source into Dataflow, and how to use the result of a pipeline as a side input to another pipeline.

      + +

      Try out BigQuery query

      + +

      Duration is 4 min

      + +

      Step 1

      + +

      Open the Google Cloud Console (in the incognito window) and using the menu, navigate into BigQuery web UI, and click on Compose Query.

      + +

      Step 2

      + +

      Copy-and-paste this query:

      +
      SELECT
      +  content
      +FROM
      +  [fh-bigquery:github_extracts.contents_java_2016]
      +LIMIT
      +  10
      +
      +

      Step 3

      + +

      Click on Run Query.

      + +

      What is being returned? _______________________________ ____________________

      + +

      The BigQuery table contains the content (and some metadata) of all the Java files present in github in 2016.

      + +

      Step 4

      + +

      To find out how many Java files this table has, type the following query and click Run Query:

      +
      SELECT
      +  COUNT(*)
      +FROM
      +  [fh-bigquery:github_extracts.contents_java_2016]
      +
      +

      The reason zero bytes are processed is that this is table metadata.

      + +

      How many files are there in this dataset? __________________________________

      + +

      Is this a dataset you want to process locally or on the cloud? ______________

      + +

      Explore the pipeline code

      + +

      Duration is 10 min

      + +

      Step 1

      + +

      On your Cloud Console, start CloudShell and navigate to the directory for this lab:

      +
      cd ~/training-data-analyst/courses/data_analysis/lab2 
      +
      +

      If this directory doesn't exist, you may need to git clone the repository:

      +
      git clone https://github.com/GoogleCloudPlatform/training-data-analyst
      +
      +

      Step 2

      + +

      View the pipeline code using nano and answer the following questions:

      +
      cd ~/training-data-analyst/courses/data_analysis/lab2/javahelp
      +nano src/main/java/com/google/cloud/training/dataanalyst/javahelp/JavaProjectsThatNeedHelp.java
      +
      +

      The pipeline looks like this (refer to this diagram as you read the code):

      + +

      56694328f3596edc.png

      + +

      Step 3

      + +

      Looking at the class documentation at the very top, what is the purpose of this pipeline? __________________________________________________________

      + +

      Where does GetJava get Java content from? _______________________________

      + +

      What does ToLines do? (Hint: look at the content field of the BigQuery result) ____________________________________________________

      + +

      Step 4

      + +

      Why is the result of ToLines stored in a named PCollection instead of being directly passed to another apply()? ________________________________________________

      + +

      What are the two actions carried out on javaContent? ____________________________

      + +

      Step 5

      + +

      If a file has 3 FIXMEs and 2 TODOs in its content (on different lines), how many calls for help are associated with it? __________________________________________________

      + +

      If a file is in the package com.google.devtools.build, what are the packages that it is associated with? ____________________________________________________

      + +

      Why is the numHelpNeeded variable not enough? Why do we need to do Sum.integersPerKey()? ___________________________________ (Hint: there are multiple files in a package)

      + +

      Why is this converted to a View? ___________________________________________

      + +

      Step 6

      + +

      Which operation uses the View as a side input? _____________________________

      + +

      Instead of simply ParDo.of(), this operation uses ____________________________

      + +

      Besides c.element() and c.output(), this operation also makes use of what method in ProcessContext? __________________________________________________________

      + +

      Execute the pipeline

      + +

      Duration is 5 min

      + +

      Step 1

      + +

      If you don't already have a bucket on Cloud Storage, create one from the Storage section of the GCP console. Bucket names have to be globally unique.

      + +

      Step 2

      + +

      Execute the pipeline by typing in (make sure to replace with the bucket name you created in the previous step):

      +
      cd ~/training-data-analyst/courses/data_analysis/lab2/javahelp
      +./run_oncloud3.sh <PROJECT> <YOUR-BUCKET-NAME> JavaProjectsThatNeedHelp
      +
      +

      Monitor the job from the GCP console from the Dataflow section.

      + +

      Step 3

      + +

      Once the pipeline has finished executing, download and view the output:

      +
      gsutil cp gs://<YOUR-BUCKET-NAME>/javahelp/output.csv .
      +head output.csv
      +
      + + +

      +

      Stop here if you are done. Wait for instructions from the Instructor before going into the next section

      +
      + +

      PART 7: STREAMING INTO BIGQUERY

      + +

      Overview

      + +

      Duration is 1 min

      + +

      In this lab, you learn how to use Dataflow to aggregate records received in real-time in Cloud Pub/Sub. The aggregate statistics will then be streamed into BigQuery and analyzed even as the data are streaming in.

      + +

      What you learn

      + +

      In this lab, you learn how to:

      +
      • Create Cloud Pub/Sub topic
      • +
      • Read from Pub/Sub in Dataflow
      • +
      • Compute windowed aggregates
      • +
      • Stream into BigQuery
      • +
      +

      Introduction

      + +

      Duration is 1 min

      + +

      The goal of this lab is to learn how to use Pub/Sub as a real-time streaming source into Dataflow and BigQuery as a streaming sink.

      + +

      246cac282f5e8b2b.png

      + +

      Set up BigQuery and Pub/Sub

      + +

      Duration is 3 min

      + +

      Step 1

      + +

      Open the Google Cloud Console (in the incognito window) and using the menu, navigate into BigQuery web UI. Next click on the blue arrow next to your project name (on the left-hand panel) and click on Create new dataset and if you do not have a dataset named , please create one.

      + +

      59c77bc988898ac5.png

      + +

      Step 2

      + +

      Back on you Cloud Console, visit the Pub/Sub section of GCP Console and click on Create Topic. Give your new topic the name and select Create.

      + +

      Explore the pipeline code

      + +

      Duration is 10 min

      + +

      Step 1

      + +

      Start CloudShell and navigate to the directory for this lab:

      +
      cd ~/training-data-analyst/courses/data_analysis/lab2 
      +
      +

      If this directory doesn't exist, you may need to git clone the repository:

      +
      git clone https://github.com/GoogleCloudPlatform/training-data-analyst
      +
      +

      Step 2

      + +

      View the pipeline code using nano and answer the following questions:

      +
      cd ~/training-data-analyst/courses/data_analysis/lab2/javahelp
      +nano src/main/java/com/google/cloud/training/dataanalyst/javahelp/StreamDemoConsumer.java
      +
      +

      Step 3

      + +

      What are the fields in the BigQuery table? _______________________________

      + +

      Step 4

      + +

      What is the pipeline source? ________________________________________________

      + +

      Step 5

      + +

      How often will aggregates be computed? ___________________________________________

      + +

      Aggregates will be computed over what time period? _________________________________

      + +

      Step 6

      + +

      What aggregate is being computed in this pipeline? ____________________________

      + +

      How would you change it to compute the average number of words in each message over the time period? ____________________________

      + +

      Step 7

      + +

      What is the output sink for the pipeline? ____________________________

      + +

      Execute the pipeline

      + +

      Duration is 3 min

      + +

      Step 1

      + +

      If you don't already have a bucket on Cloud Storage, create one from the Storage section of the GCP console. Bucket names have to be globally unique.

      + +

      Step 2

      + +

      Execute the pipeline by typing in (make sure to replace with the bucket name you created in the previous step):

      +
      cd ~/training-data-analyst/courses/data_analysis/lab2/javahelp
      +./run_oncloud4.sh <PROJECT> <YOUR-BUCKET-NAME>
      +
      +

      Monitor the job from the GCP console from the Dataflow section. Note that this pipeline will not exit.

      + +

      Step 3

      + +

      Visit the Pub/Sub section of GCP Console and click on your streamdemo topic. Notice that it has a Dataflow subscription. Click on the Publish button and type in a message (any message) and click Publish:

      + +

      54513e6524bf166a.png

      + +

      Step 4

      + +

      Publish a few more messages.

      + +

      Carry out streaming analytics

      + +

      Duration is 3 min

      + +

      Step 1

      + +

      Open the Google Cloud Console (in the incognito window) and using the menu, navigate into BigQuery web UI. Compose a new query and type in (change your PROJECTID appropriately):

      +
      SELECT timestamp, num_words from [PROJECTID:demos.streamdemo] LIMIT 10
      +
      +

      Clean up

      + +

      Duration is 3 min

      + +

      Step 1

      + +

      Cancel the job from the GCP console from the Dataflow section.

      + +

      Step 2

      + +

      Delete the topic from the Pub/Sub section of GCP Console

      + +

      Step 3

      + +

      Delete the table from the left-panel of BigQuery console

      + +

      ©Google, Inc. or its affiliates. All rights reserved. Do not distribute.

      + +

      Provide Feedback on this Lab

      + +
      + + + +
      +
      + +
      +
      +× +
      +
      +
      +
      + +
      + +
      +
      + +
      + + + + + + + + + +
      +
      + + +
      + + +");d=e.children()[0];b("body").append(e);a=d.offsetWidth;e.css("overflow","scroll");d=d.offsetWidth; +a===d&&(d=e[0].clientWidth);e.remove();return c=a-d},getScrollInfo:function(a){var c=a.isWindow||a.isDocument?"":a.element.css("overflow-x"),d=a.isWindow||a.isDocument?"":a.element.css("overflow-y"),c="scroll"===c||"auto"===c&&a.widthd?"left":0h?"top":0f(g(e),g(h))?l.important="horizontal":l.important="vertical";c.using.call(this,a,l)});m.offset(b.extend(R,{using:l}))})};b.ui.position={fit:{left:function(a,b){var c=b.within,d=c.isWindow?c.scrollLeft:c.offset.left,e=c.width,h=a.left-b.collisionPosition.marginLeft,c=d-h,l=h+b.collisionWidth-e-d;b.collisionWidth> +e?0=l?(d=a.left+c+b.collisionWidth-e-d,a.left+=c-d):a.left=0=c?d:c>l?d+e-b.collisionWidth:d:a.left=0e?0=l?(d=a.top+c+b.collisionHeight-e-d,a.top+=c-d):a.top=0=c?d:c>l?d+e-b.collisionHeight:d:a.top=0c){if(d=a.left+h+m+p+b.collisionWidth-e-d,0>d||dc){if(d=a.top+h+m+p+b.collisionHeight-e-d,0>d||dd;a.innerHTML="";c.removeChild(a)})()})();return b.ui.position}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./widget","./position"],b):b(jQuery)})(function(b){return b.widget("ui.menu",{version:"1.11.4",defaultElement:"
      ":""):"");L+=J}E+=L}a._keyEvent=!1;return E+g},_generateMonthYearHeader:function(a,b,c,d,e,f,g,u){var w,B,x,D=this._get(a,"changeMonth"),y=this._get(a,"changeYear"),H=this._get(a,"showMonthAfterYear"), +E="
      ",A="";if(f||!D)A+=""+g[b]+"";else{g=d&&d.getFullYear()===c;w=e&&e.getFullYear()===c;A+=""}H||(E+=A+(!f&&D&&y?"":" "));if(!a.yearshtml)if(a.yearshtml="",f||!y)E+=""+ +c+"";else{u=this._get(a,"yearRange").split(":");x=(new Date).getFullYear();g=function(a){a=a.match(/c[+\-].*/)?c+parseInt(a.substring(1),10):a.match(/[+\-].*/)?x+parseInt(a,10):parseInt(a,10);return isNaN(a)?x:a};b=g(u[0]);u=Math.max(b,g(u[1]||""));b=d?Math.max(b,d.getFullYear()):b;u=e?Math.min(u,e.getFullYear()):u;for(a.yearshtml+="";E+=a.yearshtml;a.yearshtml=null}E+=this._get(a,"yearSuffix");H&&(E+=(!f&&D&&y?"":" ")+A);return E+"
      "},_adjustInstDate:function(a,b,c){var d=a.drawYear+("Y"===c?b:0),e=a.drawMonth+("M"===c?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+("D"===c?b:0);d=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,b)));a.selectedDay=d.getDate();a.drawMonth=a.selectedMonth=d.getMonth();a.drawYear=a.selectedYear=d.getFullYear();"M"!== +c&&"Y"!==c||this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),c=c&&bd?d:c},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return null==a?[1,1]:"number"===typeof a?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)}, +_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,d+(0>b?b:e[0]*e[1]),1));0>b&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c,d,e=this._getMinMaxDate(a,"min"),f=this._getMinMaxDate(a,"max"),g=null,u=null;if(c= +this._get(a,"yearRange"))c=c.split(":"),d=(new Date).getFullYear(),g=parseInt(c[0],10),u=parseInt(c[1],10),c[0].match(/[+\-].*/)&&(g+=d),c[1].match(/[+\-].*/)&&(u+=d);return(!e||b.getTime()>=e.getTime())&&(!f||b.getTime()<=f.getTime())&&(!g||b.getFullYear()>=g)&&(!u||b.getFullYear()<=u)},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff"),b="string"!==typeof b?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a, +"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);b=b?"object"===typeof b?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});b.fn.datepicker=function(a){if(!this.length)return this; +b.datepicker.initialized||(b(document).mousedown(b.datepicker._checkExternalClick),b.datepicker.initialized=!0);0===b("#"+b.datepicker._mainDivId).length&&b("body").append(b.datepicker.dpDiv);var c=Array.prototype.slice.call(arguments,1);return"string"===typeof a&&("isDisabled"===a||"getDate"===a||"widget"===a)||"option"===a&&2===arguments.length&&"string"===typeof arguments[1]?b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(c)):this.each(function(){"string"===typeof a?b.datepicker["_"+ +a+"Datepicker"].apply(b.datepicker,[this].concat(c)):b.datepicker._attachDatepicker(this,a)})};b.datepicker=new d;b.datepicker.initialized=!1;b.datepicker.uuid=(new Date).getTime();b.datepicker.version="1.11.4";return b.datepicker}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./widget"],b):b(jQuery)})(function(b){var a=!1;b(document).mouseup(function(){a=!1});return b.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(c){if(!0===b.data(c.target,a.widgetName+".preventClickEvent"))return b.removeData(c.target, +a.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(d){if(!a){this._mouseMoved=!1;this._mouseStarted&&this._mouseUp(d);this._mouseDownEvent=d;var c=this,e=1===d.which,f="string"===typeof this.options.cancel&&d.target.nodeName? +b(d.target).closest(this.options.cancel).length:!1;if(!e||f||!this._mouseCapture(d))return!0;this.mouseDelayMet=!this.options.delay;this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)&&(this._mouseStarted=!1!==this._mouseStart(d),!this._mouseStarted))return d.preventDefault(),!0;!0===b.data(d.target,this.widgetName+".preventClickEvent")&&b.removeData(d.target,this.widgetName+".preventClickEvent"); +this._mouseMoveDelegate=function(a){return c._mouseMove(a)};this._mouseUpDelegate=function(a){return c._mouseUp(a)};this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);d.preventDefault();return a=!0}},_mouseMove:function(a){if(this._mouseMoved&&(b.ui.ie&&(!document.documentMode||9>document.documentMode)&&!a.button||!a.which))return this._mouseUp(a);if(a.which||a.button)this._mouseMoved=!0;if(this._mouseStarted)return this._mouseDrag(a), +a.preventDefault();this._mouseDistanceMet(a)&&this._mouseDelayMet(a)&&((this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,a))?this._mouseDrag(a):this._mouseUp(a));return!this._mouseStarted},_mouseUp:function(d){this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);this._mouseStarted&&(this._mouseStarted=!1,d.target===this._mouseDownEvent.target&&b.data(d.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(d)); +return a=!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],b):b(jQuery)})(function(b){b.widget("ui.draggable",b.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both", +snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative();this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._setHandleClassName();this._mouseInit()},_setOption:function(a,b){this._super(a,b);"handle"===a&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")? +this.destroyOnClear=!0:(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(a){var d=this.options;this._blurActiveElement(a);if(this.helper||d.disabled||0").css("position","absolute").appendTo(a.parent()).outerWidth(a.outerWidth()).outerHeight(a.outerHeight()).offset(a.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(a){var d=this.document[0];if(this.handleElement.is(a.target))try{d.activeElement&&"body"!==d.activeElement.nodeName.toLowerCase()&&b(d.activeElement).blur()}catch(c){}},_mouseStart:function(a){var d=this.options;this.helper= +this._createHelper(a);this.helper.addClass("ui-draggable-dragging");this._cacheHelperProportions();b.ui.ddmanager&&(b.ui.ddmanager.current=this);this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent(!0);this.offsetParent=this.helper.offsetParent();this.hasFixedAncestor=0c[2]&&(f=c[2]+this.offset.click.left),a.pageY-this.offset.click.top>c[3]&&(e=c[3]+this.offset.click.top)),g.grid&&(e=g.grid[1]?this.originalPageY+Math.round((e-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY,e=c?e-this.offset.click.top>=c[1]||e-this.offset.click.top>c[3]?e:e-this.offset.click.top>=c[1]?e-g.grid[1]:e+g.grid[1]:e,f=g.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/g.grid[0])*g.grid[0]:this.originalPageX, +f=c?f-this.offset.click.left>=c[0]||f-this.offset.click.left>c[2]?f:f-this.offset.click.left>=c[0]?f-g.grid[0]:f+g.grid[0]:f),"y"===g.axis&&(f=this.originalPageX),"x"===g.axis&&(e=this.originalPageY));return{top:e-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:h?0: +this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove();this.helper=null;this.cancelHelperRemoval=!1;this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto"));"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()), +this.helper.css("bottom","auto"))},_trigger:function(a,d,c){c=c||this._uiHash();b.ui.plugin.call(this,a,[d,c,this],!0);/^(drag|start|stop)/.test(a)&&(this.positionAbs=this._convertPositionTo("absolute"),c.offset=this.positionAbs);return b.Widget.prototype._trigger.call(this,a,d,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});b.ui.plugin.add("draggable","connectToSortable",{start:function(a,d,c){var e= +b.extend({},d,{item:c.element});c.sortables=[];b(c.options.connectToSortable).each(function(){var d=b(this).sortable("instance");d&&!d.options.disabled&&(c.sortables.push(d),d.refreshPositions(),d._trigger("activate",a,e))})},stop:function(a,d,c){var e=b.extend({},d,{item:c.element});c.cancelHelperRemoval=!1;b.each(c.sortables,function(){this.isOver?(this.isOver=0,c.cancelHelperRemoval=!0,this.cancelHelperRemoval=!1,this._storedCSS={position:this.placeholder.css("position"),top:this.placeholder.css("top"), +left:this.placeholder.css("left")},this._mouseStop(a),this.options.helper=this.options._helper):(this.cancelHelperRemoval=!0,this._trigger("deactivate",a,e))})},drag:function(a,d,c){b.each(c.sortables,function(){var e=!1,f=this;f.positionAbs=c.positionAbs;f.helperProportions=c.helperProportions;f.offset.click=c.offset.click;f._intersectsWith(f.containerCache)&&(e=!0,b.each(c.sortables,function(){this.positionAbs=c.positionAbs;this.helperProportions=c.helperProportions;this.offset.click=c.offset.click; +this!==f&&this._intersectsWith(this.containerCache)&&b.contains(f.element[0],this.element[0])&&(e=!1);return e}));e?(f.isOver||(f.isOver=1,c._parent=d.helper.parent(),f.currentItem=d.helper.appendTo(f.element).data("ui-sortable-item",!0),f.options._helper=f.options.helper,f.options.helper=function(){return d.helper[0]},a.target=f.currentItem[0],f._mouseCapture(a,!0),f._mouseStart(a,!0,!0),f.offset.click.top=c.offset.click.top,f.offset.click.left=c.offset.click.left,f.offset.parent.left-=c.offset.parent.left- +f.offset.parent.left,f.offset.parent.top-=c.offset.parent.top-f.offset.parent.top,c._trigger("toSortable",a),c.dropped=f.element,b.each(c.sortables,function(){this.refreshPositions()}),c.currentItem=c.element,f.fromOutside=c),f.currentItem&&(f._mouseDrag(a),d.position=f.position)):f.isOver&&(f.isOver=0,f.cancelHelperRemoval=!0,f.options._revert=f.options.revert,f.options.revert=!1,f._trigger("out",a,f._uiHash(f)),f._mouseStop(a,!0),f.options.revert=f.options._revert,f.options.helper=f.options._helper, +f.placeholder&&f.placeholder.remove(),d.helper.appendTo(c._parent),c._refreshOffsets(a),d.position=c._generatePosition(a,!0),c._trigger("fromSortable",a),c.dropped=!1,b.each(c.sortables,function(){this.refreshPositions()}))})}});b.ui.plugin.add("draggable","cursor",{start:function(a,d,c){a=b("body");c=c.options;a.css("cursor")&&(c._cursor=a.css("cursor"));a.css("cursor",c.cursor)},stop:function(a,d,c){a=c.options;a._cursor&&b("body").css("cursor",a._cursor)}});b.ui.plugin.add("draggable","opacity", +{start:function(a,d,c){a=b(d.helper);c=c.options;a.css("opacity")&&(c._opacity=a.css("opacity"));a.css("opacity",c.opacity)},stop:function(a,d,c){a=c.options;a._opacity&&b(d.helper).css("opacity",a._opacity)}});b.ui.plugin.add("draggable","scroll",{start:function(a,b,c){c.scrollParentNotHidden||(c.scrollParentNotHidden=c.helper.scrollParent(!1));c.scrollParentNotHidden[0]!==c.document[0]&&"HTML"!==c.scrollParentNotHidden[0].tagName&&(c.overflowOffset=c.scrollParentNotHidden.offset())},drag:function(a, +d,c){d=c.options;var e=!1,f=c.scrollParentNotHidden[0],g=c.document[0];f!==g&&"HTML"!==f.tagName?(d.axis&&"x"===d.axis||(c.overflowOffset.top+f.offsetHeight-a.pageYm+w||yn+w||!b.contains(c.snapElements[q].item.ownerDocument,c.snapElements[q].item)?(c.snapElements[q].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,a,b.extend(c._uiHash(),{snapItem:c.snapElements[q].item})),c.snapElements[q].snapping= +!1):("inner"!==u.snapMode&&(e=Math.abs(p-y)<=w,f=Math.abs(n-D)<=w,g=Math.abs(l-x)<=w,h=Math.abs(m-B)<=w,e&&(d.position.top=c._convertPositionTo("relative",{top:p-c.helperProportions.height,left:0}).top),f&&(d.position.top=c._convertPositionTo("relative",{top:n,left:0}).top),g&&(d.position.left=c._convertPositionTo("relative",{top:0,left:l-c.helperProportions.width}).left),h&&(d.position.left=c._convertPositionTo("relative",{top:0,left:m}).left)),r=e||f||g||h,"outer"!==u.snapMode&&(e=Math.abs(p-D)<= +w,f=Math.abs(n-y)<=w,g=Math.abs(l-B)<=w,h=Math.abs(m-x)<=w,e&&(d.position.top=c._convertPositionTo("relative",{top:p,left:0}).top),f&&(d.position.top=c._convertPositionTo("relative",{top:n-c.helperProportions.height,left:0}).top),g&&(d.position.left=c._convertPositionTo("relative",{top:0,left:l}).left),h&&(d.position.left=c._convertPositionTo("relative",{top:0,left:m-c.helperProportions.width}).left)),!c.snapElements[q].snapping&&(e||f||g||h||r)&&c.options.snap.snap&&c.options.snap.snap.call(c.element, +a,b.extend(c._uiHash(),{snapItem:c.snapElements[q].item})),c.snapElements[q].snapping=e||f||g||h||r)}});b.ui.plugin.add("draggable","stack",{start:function(a,d,c){var e;a=b.makeArray(b(c.options.stack)).sort(function(a,c){return(parseInt(b(a).css("zIndex"),10)||0)-(parseInt(b(c).css("zIndex"),10)||0)});a.length&&(e=parseInt(b(a[0]).css("zIndex"),10)||0,b(a).each(function(a){b(this).css("zIndex",e+a)}),this.css("zIndex",e+a.length))}});b.ui.plugin.add("draggable","zIndex",{start:function(a,d,c){a= +b(d.helper);c=c.options;a.css("zIndex")&&(c._zIndex=a.css("zIndex"));a.css("zIndex",c.zIndex)},stop:function(a,d,c){a=c.options;a._zIndex&&b(d.helper).css("zIndex",a._zIndex)}});return b.ui.draggable}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],b):b(jQuery)})(function(b){b.widget("ui.resizable",b.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(a){return parseInt(a, +10)||0},_isNumber:function(a){return!isNaN(parseInt(a,10))},_hasScroll:function(a,d){if("hidden"===b(a).css("overflow"))return!1;var c=d&&"left"===d?"scrollLeft":"scrollTop",e=!1;if(0
      ").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"), +marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}), +this._proportionallyResize());this.handles=h.handles||(b(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");this._handles=b();if(this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),a=this.handles.split(","),this.handles={},d=0;d"),e.css({zIndex:h.zIndex}),"se"===c&&e.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[c]=".ui-resizable-"+c,this.element.append(e);this._renderAxis=function(a){var c,d,e;a=a||this.element;for(c in this.handles){if(this.handles[c].constructor===String)this.handles[c]=this.element.children(this.handles[c]).first().show();else if(this.handles[c].jquery||this.handles[c].nodeType)this.handles[c]=b(this.handles[c]),this._on(this.handles[c],{mousedown:g._mouseDown});this.elementIsWrapper&& +this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(d=b(this.handles[c],this.element),e=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth(),d=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join(""),a.css(d,e),this._proportionallyResize());this._handles=this._handles.add(this.handles[c])}};this._renderAxis(this.element);this._handles=this._handles.add(this.element.find(".ui-resizable-handle"));this._handles.disableSelection(); +this._handles.mouseover(function(){g.resizing||(this.className&&(e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),g.axis=e&&e[1]?e[1]:"se")});h.autoHide&&(this._handles.hide(),b(this.element).addClass("ui-resizable-autohide").mouseenter(function(){h.disabled||(b(this).removeClass("ui-resizable-autohide"),g._handles.show())}).mouseleave(function(){h.disabled||g.resizing||(b(this).addClass("ui-resizable-autohide"),g._handles.hide())}));this._mouseInit()},_destroy:function(){this._mouseDestroy(); +var a,d=function(a){b(a).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};this.elementIsWrapper&&(d(this.element),a=this.element,this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")}).insertAfter(a),a.remove());this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement); +return this},_mouseCapture:function(a){var d,c,e=!1;for(d in this.handles)if(c=b(this.handles[d])[0],c===a.target||b.contains(c,a.target))e=!0;return!this.options.disabled&&e},_mouseStart:function(a){var d,c,e=this.options,f=this.element;this.resizing=!0;this._renderProxy();d=this._num(this.helper.css("left"));c=this._num(this.helper.css("top"));e.containment&&(d+=b(e.containment).scrollLeft()||0,c+=b(e.containment).scrollTop()||0);this.offset=this.helper.offset();this.position={left:d,top:c};this.size= +this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:f.width(),height:f.height()};this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()};this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()};this.originalPosition={left:d,top:c};this.originalMousePosition={left:a.pageX,top:a.pageY};this.aspectRatio="number"===typeof e.aspectRatio?e.aspectRatio:this.originalSize.width/this.originalSize.height|| +1;d=b(".ui-resizable-"+this.axis).css("cursor");b("body").css("cursor","auto"===d?this.axis+"-resize":d);f.addClass("ui-resizable-resizing");this._propagate("start",a);return!0},_mouseDrag:function(a){var d,c=this.originalMousePosition;d=a.pageX-c.left||0;var c=a.pageY-c.top||0,e=this._change[this.axis];this._updatePrevProperties();if(!e)return!1;d=e.apply(this,[a,d,c]);this._updateVirtualBoundaries(a.shiftKey);if(this._aspectRatio||a.shiftKey)d=this._updateRatio(d,a);d=this._respectSize(d,a);this._updateCache(d); +this._propagate("resize",a);d=this._applyChanges();!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();b.isEmptyObject(d)||(this._updatePrevProperties(),this._trigger("resize",a,this.ui()),this._applyChanges());return!1},_mouseStop:function(a){this.resizing=!1;var d,c,e,f=this.options;this._helper&&(d=this._proportionallyResizeElements,d=(c=d.length&&/textarea/i.test(d[0].nodeName))&&this._hasScroll(d[0],"left")?0:this.sizeDiff.height,c=c?0:this.sizeDiff.width,c= +{width:this.helper.width()-c,height:this.helper.height()-d},d=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null,e=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null,f.animate||this.element.css(b.extend(c,{top:e,left:d})),this.helper.height(this.size.height),this.helper.width(this.size.width),this._helper&&!f.animate&&this._proportionallyResize());b("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing"); +this._propagate("stop",a);this._helper&&this.helper.remove();return!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left};this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var a={};this.position.top!==this.prevPosition.top&&(a.top=this.position.top+"px");this.position.left!==this.prevPosition.left&&(a.left=this.position.left+"px");this.size.width!==this.prevSize.width&&(a.width=this.size.width+"px");this.size.height!== +this.prevSize.height&&(a.height=this.size.height+"px");this.helper.css(a);return a},_updateVirtualBoundaries:function(a){var b,c,e,f;f=this.options;f={minWidth:this._isNumber(f.minWidth)?f.minWidth:0,maxWidth:this._isNumber(f.maxWidth)?f.maxWidth:Infinity,minHeight:this._isNumber(f.minHeight)?f.minHeight:0,maxHeight:this._isNumber(f.maxHeight)?f.maxHeight:Infinity};if(this._aspectRatio||a)a=f.minHeight*this.aspectRatio,c=f.minWidth/this.aspectRatio,b=f.maxHeight*this.aspectRatio,e=f.maxWidth/this.aspectRatio, +a>f.minWidth&&(f.minWidth=a),c>f.minHeight&&(f.minHeight=c),ba.width,h=this._isNumber(a.height)&&b.minHeight&& +b.minHeight>a.height,l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,p=/sw|nw|w/.test(c),c=/nw|ne|n/.test(c);g&&(a.width=b.minWidth);h&&(a.height=b.minHeight);e&&(a.width=b.maxWidth);f&&(a.height=b.maxHeight);g&&p&&(a.left=l-b.minWidth);e&&p&&(a.left=l-b.maxWidth);h&&c&&(a.top=m-b.minHeight);f&&c&&(a.top=m-b.maxHeight);a.width||a.height||a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null;return a},_getPaddingPlusBorderDimensions:function(a){var b= +0,c=[],e=[a.css("borderTopWidth"),a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")];for(a=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];4>b;b++)c[b]=parseInt(e[b],10)||0,c[b]+=parseInt(a[b],10)||0;return{height:c[0]+c[2],width:c[1]+c[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var a,b=0,c=this.helper||this.element;b"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+ +"px",top:this.elementOffset.top+"px",zIndex:++a.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){return{left:this.originalPosition.left+b,width:this.originalSize.width-b}},n:function(a,b,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(a,d,c){return b.extend(this._change.s.apply(this, +arguments),this._change.e.apply(this,[a,d,c]))},sw:function(a,d,c){return b.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[a,d,c]))},ne:function(a,d,c){return b.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[a,d,c]))},nw:function(a,d,c){return b.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[a,d,c]))}},_propagate:function(a,d){b.ui.plugin.call(this,a,[d,this.ui()]);"resize"!==a&&this._trigger(a,d,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement, +element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});b.ui.plugin.add("resizable","animate",{stop:function(a){var d=b(this).resizable("instance"),c=d.options,e=d._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&d._hasScroll(e[0],"left")?0:d.sizeDiff.height,f={width:d.size.width-(f?0:d.sizeDiff.width),height:d.size.height-g},g=parseInt(d.element.css("left"),10)+(d.position.left- +d.originalPosition.left)||null,h=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;d.element.animate(b.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var c={width:parseInt(d.element.css("width"),10),height:parseInt(d.element.css("height"),10),top:parseInt(d.element.css("top"),10),left:parseInt(d.element.css("left"),10)};e&&e.length&&b(e[0]).css({width:c.width,height:c.height});d._updateCache(c);d._propagate("resize", +a)}})}});b.ui.plugin.add("resizable","containment",{start:function(){var a,d,c,e,f,g=b(this).resizable("instance"),h=g.element;c=g.options.containment;if(h=c instanceof b?c.get(0):/parent/.test(c)?h.parent().get(0):c)g.containerElement=b(h),/document/.test(c)||c===document?(g.containerOffset={left:0,top:0},g.containerPosition={left:0,top:0},g.parentData={element:b(document),left:0,top:0,width:b(document).width(),height:b(document).height()||document.body.parentNode.scrollHeight}):(a=b(h),d=[],b(["Top", +"Right","Left","Bottom"]).each(function(b,c){d[b]=g._num(a.css("padding"+c))}),g.containerOffset=a.offset(),g.containerPosition=a.position(),g.containerSize={height:a.innerHeight()-d[3],width:a.innerWidth()-d[1]},c=g.containerOffset,e=g.containerSize.height,f=g.containerSize.width,f=g._hasScroll(h,"left")?h.scrollWidth:f,e=g._hasScroll(h)?h.scrollHeight:e,g.parentData={element:h,left:c.left,top:c.top,width:f,height:e})},resize:function(a){var d,c,e,f=b(this).resizable("instance");d=f.options;c=f.containerOffset; +e=f.position;a=f._aspectRatio||a.shiftKey;var g={top:0,left:0},h=f.containerElement,l=!0;h[0]!==document&&/static/.test(h.css("position"))&&(g=c);e.left<(f._helper?c.left:0)&&(f.size.width+=f._helper?f.position.left-c.left:f.position.left-g.left,a&&(f.size.height=f.size.width/f.aspectRatio,l=!1),f.position.left=d.helper?c.left:0);e.top<(f._helper?c.top:0)&&(f.size.height+=f._helper?f.position.top-c.top:f.position.top,a&&(f.size.width=f.size.height*f.aspectRatio,l=!1),f.position.top=f._helper?c.top: +0);d=f.containerElement.get(0)===f.element.parent().get(0);e=/relative|absolute/.test(f.containerElement.css("position"));d&&e?(f.offset.left=f.parentData.left+f.position.left,f.offset.top=f.parentData.top+f.position.top):(f.offset.left=f.element.offset().left,f.offset.top=f.element.offset().top);d=Math.abs(f.sizeDiff.width+(f._helper?f.offset.left-g.left:f.offset.left-c.left));c=Math.abs(f.sizeDiff.height+(f._helper?f.offset.top-g.top:f.offset.top-c.top));d+f.size.width>=f.parentData.width&&(f.size.width= +f.parentData.width-d,a&&(f.size.height=f.size.width/f.aspectRatio,l=!1));c+f.size.height>=f.parentData.height&&(f.size.height=f.parentData.height-c,a&&(f.size.width=f.size.height*f.aspectRatio,l=!1));l||(f.position.left=f.prevPosition.left,f.position.top=f.prevPosition.top,f.size.width=f.prevSize.width,f.size.height=f.prevSize.height)},stop:function(){var a=b(this).resizable("instance"),d=a.options,c=a.containerOffset,e=a.containerPosition,f=a.containerElement,g=b(a.helper),h=g.offset(),l=g.outerWidth()- +a.sizeDiff.width,g=g.outerHeight()-a.sizeDiff.height;a._helper&&!d.animate&&/relative/.test(f.css("position"))&&b(this).css({left:h.left-e.left-c.left,width:l,height:g});a._helper&&!d.animate&&/static/.test(f.css("position"))&&b(this).css({left:h.left-e.left-c.left,width:l,height:g})}});b.ui.plugin.add("resizable","alsoResize",{start:function(){var a=b(this).resizable("instance").options;b(a.alsoResize).each(function(){var a=b(this);a.data("ui-resizable-alsoresize",{width:parseInt(a.width(),10),height:parseInt(a.height(), +10),left:parseInt(a.css("left"),10),top:parseInt(a.css("top"),10)})})},resize:function(a,d){var c=b(this).resizable("instance"),e=c.originalSize,f=c.originalPosition,g={height:c.size.height-e.height||0,width:c.size.width-e.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0};b(c.options.alsoResize).each(function(){var a=b(this),c=b(this).data("ui-resizable-alsoresize"),e={},f=a.parents(d.originalElement[0]).length?["width","height"]:["width","height","top","left"];b.each(f,function(a, +b){var d=(c[b]||0)+(g[b]||0);d&&0<=d&&(e[b]=d||null)});a.css(e)})},stop:function(){b(this).removeData("resizable-alsoresize")}});b.ui.plugin.add("resizable","ghost",{start:function(){var a=b(this).resizable("instance"),d=a.options,c=a.size;a.ghost=a.originalElement.clone();a.ghost.css({opacity:.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"===typeof d.ghost?d.ghost:"");a.ghost.appendTo(a.helper)},resize:function(){var a= +b(this).resizable("instance");a.ghost&&a.ghost.css({position:"relative",height:a.size.height,width:a.size.width})},stop:function(){var a=b(this).resizable("instance");a.ghost&&a.helper&&a.helper.get(0).removeChild(a.ghost.get(0))}});b.ui.plugin.add("resizable","grid",{resize:function(){var a,d=b(this).resizable("instance"),c=d.options,e=d.size,f=d.originalSize,g=d.originalPosition,h=d.axis,l="number"===typeof c.grid?[c.grid,c.grid]:c.grid,m=l[0]||1,p=l[1]||1,n=Math.round((e.width-f.width)/m)*m,e= +Math.round((e.height-f.height)/p)*p,q=f.width+n,r=f.height+e,u=c.maxWidth&&c.maxWidthq,x=c.minHeight&&c.minHeight>r;c.grid=l;B&&(q+=m);x&&(r+=p);u&&(q-=m);w&&(r-=p);if(/^(se|s|e)$/.test(h))d.size.width=q,d.size.height=r;else if(/^(ne)$/.test(h))d.size.width=q,d.size.height=r,d.position.top=g.top-e;else if(/^(sw)$/.test(h))d.size.width=q,d.size.height=r,d.position.left=g.left-n;else{if(0>=r-p||0>=q-m)a=d._getPaddingPlusBorderDimensions(this); +0d&&b(this).css("top",a.top-d)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width, +minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;this._createWrapper();this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog);this._createTitlebar();this._createButtonPane(); +this.options.draggable&&b.fn.draggable&&this._makeDraggable();this.options.resizable&&b.fn.resizable&&this._makeResizable();this._isOpen=!1;this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var a=this.options.appendTo;return a&&(a.jquery||a.nodeType)?b(a):this.document.find(a||"body").eq(0)},_destroy:function(){var a,b=this.originalPosition;this._untrackInstance();this._destroyOverlay();this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(); +this.uiDialog.stop(!0,!0).remove();this.originalTitle&&this.element.attr("title",this.originalTitle);a=b.parent.children().eq(b.index);a.length&&a[0]!==this.element[0]?a.before(this.element):b.parent.append(this.element)},widget:function(){return this.uiDialog},disable:b.noop,enable:b.noop,close:function(a){var d,c=this;if(this._isOpen&&!1!==this._trigger("beforeClose",a)){this._isOpen=!1;this._focusedElement=null;this._destroyOverlay();this._untrackInstance();if(!this.opener.filter(":focusable").focus().length)try{(d= +this.document[0].activeElement)&&"body"!==d.nodeName.toLowerCase()&&b(d).blur()}catch(e){}this._hide(this.uiDialog,this.options.hide,function(){c._trigger("close",a)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(a,d){var c=!1,e=this.uiDialog.siblings(".ui-front:visible").map(function(){return+b(this).css("z-index")}).get(),e=Math.max.apply(null,e);e>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",e+1),c=!0);c&&!d&&this._trigger("focus", +a);return c},open:function(){var a=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=b(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){a._focusTabbable();a._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var a=this._focusedElement; +a||(a=this.element.find("[autofocus]"));a.length||(a=this.element.find(":tabbable"));a.length||(a=this.uiDialogButtonPane.find(":tabbable"));a.length||(a=this.uiDialogTitlebarClose.filter(":tabbable"));a.length||(a=this.uiDialog);a.eq(0).focus()},_keepFocus:function(a){function d(){var a=this.document[0].activeElement;this.uiDialog[0]===a||b.contains(this.uiDialog[0],a)||this._focusTabbable()}a.preventDefault();d.call(this);this._delay(d)},_createWrapper:function(){this.uiDialog=b("
      ").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+ +this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo());this._on(this.uiDialog,{keydown:function(a){if(this.options.closeOnEscape&&!a.isDefaultPrevented()&&a.keyCode&&a.keyCode===b.ui.keyCode.ESCAPE)a.preventDefault(),this.close(a);else if(a.keyCode===b.ui.keyCode.TAB&&!a.isDefaultPrevented()){var d=this.uiDialog.find(":tabbable"),c=d.filter(":first"),e=d.filter(":last");a.target!==e[0]&&a.target!==this.uiDialog[0]||a.shiftKey?a.target!==c[0]&&a.target!==this.uiDialog[0]|| +!a.shiftKey||(this._delay(function(){e.focus()}),a.preventDefault()):(this._delay(function(){c.focus()}),a.preventDefault())}},mousedown:function(a){this._moveToTop(a)&&this._focusTabbable()}});this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var a;this.uiDialogTitlebar=b("
      ").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog);this._on(this.uiDialogTitlebar, +{mousedown:function(a){b(a.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}});this.uiDialogTitlebarClose=b("").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar);this._on(this.uiDialogTitlebarClose,{click:function(a){a.preventDefault();this.close(a)}});a=b("").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar);this._title(a); +this.uiDialog.attr({"aria-labelledby":a.attr("id")})},_title:function(a){this.options.title||a.html(" ");a.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=b("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiButtonSet=b("
      ").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane);this._createButtons()},_createButtons:function(){var a=this,d=this.options.buttons;this.uiDialogButtonPane.remove();this.uiButtonSet.empty(); +b.isEmptyObject(d)||b.isArray(d)&&!d.length?this.uiDialog.removeClass("ui-dialog-buttons"):(b.each(d,function(c,d){var f,g;d=b.isFunction(d)?{click:d,text:c}:d;d=b.extend({type:"button"},d);f=d.click;d.click=function(){f.apply(a.element[0],arguments)};g={icons:d.icons,text:d.showText};delete d.icons;delete d.showText;b("",d).button(g).appendTo(a.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function a(a){return{position:a.position, +offset:a.offset}}var d=this,c=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(c,f){b(this).addClass("ui-dialog-dragging");d._blockFrames();d._trigger("dragStart",c,a(f))},drag:function(b,c){d._trigger("drag",b,a(c))},stop:function(e,f){var g=f.offset.left-d.document.scrollLeft(),h=f.offset.top-d.document.scrollTop();c.position={my:"left top",at:"left"+(0<=g?"+":"")+g+" top"+(0<=h?"+":"")+ +h,of:d.window};b(this).removeClass("ui-dialog-dragging");d._unblockFrames();d._trigger("dragStop",e,a(f))}})},_makeResizable:function(){function a(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}var d=this,c=this.options,e=c.resizable,f=this.uiDialog.css("position"),e="string"===typeof e?e:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:c.maxWidth,maxHeight:c.maxHeight, +minWidth:c.minWidth,minHeight:this._minHeight(),handles:e,start:function(c,e){b(this).addClass("ui-dialog-resizing");d._blockFrames();d._trigger("resizeStart",c,a(e))},resize:function(b,c){d._trigger("resize",b,a(c))},stop:function(e,f){var l=d.uiDialog.offset(),m=l.left-d.document.scrollLeft(),l=l.top-d.document.scrollTop();c.height=d.uiDialog.height();c.width=d.uiDialog.width();c.position={my:"left top",at:"left"+(0<=m?"+":"")+m+" top"+(0<=l?"+":"")+l,of:d.window};b(this).removeClass("ui-dialog-resizing"); +d._unblockFrames();d._trigger("resizeStop",e,a(f))}}).css("position",f)},_trackFocus:function(){this._on(this.widget(),{focusin:function(a){this._makeFocusTarget();this._focusedElement=b(a.target)}})},_makeFocusTarget:function(){this._untrackInstance();this._trackingInstances().unshift(this)},_untrackInstance:function(){var a=this._trackingInstances(),d=b.inArray(this,a);-1!==d&&a.splice(d,1)},_trackingInstances:function(){var a=this.document.data("ui-dialog-instances");a||(a=[],this.document.data("ui-dialog-instances", +a));return a},_minHeight:function(){var a=this.options;return"auto"===a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(){var a=this.uiDialog.is(":visible");a||this.uiDialog.show();this.uiDialog.position(this.options.position);a||this.uiDialog.hide()},_setOptions:function(a){var d=this,c=!1,e={};b.each(a,function(a,b){d._setOption(a,b);a in d.sizeRelatedOptions&&(c=!0);a in d.resizableRelatedOptions&&(e[a]=b)});c&&(this._size(),this._position());this.uiDialog.is(":data(ui-resizable)")&& +this.uiDialog.resizable("option",e)},_setOption:function(a,b){var c,e=this.uiDialog;"dialogClass"===a&&e.removeClass(this.options.dialogClass).addClass(b);"disabled"!==a&&(this._super(a,b),"appendTo"===a&&this.uiDialog.appendTo(this._appendTo()),"buttons"===a&&this._createButtons(),"closeText"===a&&this.uiDialogTitlebarClose.button({label:""+b}),"draggable"===a&&((c=e.is(":data(ui-draggable)"))&&!b&&e.draggable("destroy"),!c&&b&&this._makeDraggable()),"position"===a&&this._position(),"resizable"=== +a&&((c=e.is(":data(ui-resizable)"))&&!b&&e.resizable("destroy"),c&&"string"===typeof b&&e.resizable("option","handles",b),c||!1===b||this._makeResizable()),"title"===a&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var a,b,c,e=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});e.minWidth>e.width&&(e.width=e.minWidth);a=this.uiDialog.css({height:"auto",width:e.width}).outerHeight();b=Math.max(0,e.minHeight-a);c="number"===typeof e.maxHeight? +Math.max(0,e.maxHeight-a):"none";"auto"===e.height?this.element.css({minHeight:b,maxHeight:c,height:"auto"}):this.element.height(Math.max(0,e.height-a));this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var a=b(this);return b("
      ").css({position:"absolute",width:a.outerWidth(),height:a.outerHeight()}).appendTo(a.parent()).offset(a.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&& +(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(a){return b(a.target).closest(".ui-dialog").length?!0:!!b(a.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var a=!0;this._delay(function(){a=!1});this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(b){a||this._allowInteraction(b)||(b.preventDefault(),this._trackingInstances()[0]._focusTabbable())}});this.overlay=b("
      ").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()); +this._on(this.overlay,{mousedown:"_keepFocus"});this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var a=this.document.data("ui-dialog-overlays")-1;a?this.document.data("ui-dialog-overlays",a):this.document.unbind("focusin").removeData("ui-dialog-overlays");this.overlay.remove();this.overlay=null}}})}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./widget","./mouse","./draggable"],b):b(jQuery)})(function(b){b.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var a,d=this.options,c=d.accept;this.isover=!1;this.isout=!0;this.accept=b.isFunction(c)?c:function(a){return a.is(c)}; +this.proportions=function(){if(arguments.length)a=arguments[0];else return a?a:a={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}};this._addToManager(d.scope);d.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(a){b.ui.ddmanager.droppables[a]=b.ui.ddmanager.droppables[a]||[];b.ui.ddmanager.droppables[a].push(this)},_splice:function(a){for(var b=0;b=p&&a=m&&e=p&&g<=q||l>=p&&l<=q||gq)&&(f>=m&&f<=n||h>=m&&h<=n||fn);default:return!1}}}();b.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,d){var c,e,f=b.ui.ddmanager.droppables[a.options.scope]||[],g=d?d.type:null,h=(a.currentItem||a.element).find(":data(ui-droppable)").addBack();c=0;a:for(;ca?0:d.max6*c?a+(b-a)*c*6:1>2*c?b:2>3*c?a+(b-a)*(2/3-c)*6:a}var g=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55* +a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],l=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b, +c,d,e)},m={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},p={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},n=l.support={},q=a("

      ")[0],r,u=a.each;q.style.cssText="background-color:rgba(1,1,1,.5)";n.rgba=-1a.inArray(null,n[e].slice(0,3))&&(n[e][3]=1,d.from&&(n._rgba=d.from(n[e])))}),this},is:function(a){var b=l(a),c=!0,d=this;u(m,function(a,e){var f,g=b[e.cache];g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],u(e.props,function(a,b){if(null!=g[b.idx])return c=g[b.idx]===f[b.idx]}));return c});return c},_space:function(){var a=[],b=this;u(m,function(c,d){b[d.cache]&&a.push(c)});return a.pop()},transition:function(a, +b){var d=l(a),e=d._space(),f=m[e],g=0===this.alpha()?l("transparent"):this,h=g[f.cache]||f.to(g._rgba),n=h.slice(),d=d[f.cache];u(f.props,function(a,e){var f=e.idx,g=h[f],l=d[f],m=p[e.type]||{};null!==l&&(null===g?n[f]=l:(m.mod&&(l-g>m.mod/2?g+=m.mod:g-l>m.mod/2&&(g-=m.mod)),n[f]=c((l-g)*b+g,e)))});return this[e](n)},blend:function(b){if(1===this._rgba[3])return this;var c=this._rgba.slice(),d=c.pop(),e=l(b)._rgba;return l(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b= +"rgba(",c=a.map(this._rgba,function(a,b){return null==a?2b&&(a=Math.round(100*a)+"%");return a});1===c[3]&&(c.pop(),b="hsl(");return b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();b&&c.push(~~(255*d));return"#"+a.map(c,function(a){a=(a||0).toString(16);return 1===a.length?"0"+a:a}).join("")},toString:function(){return 0=== +this._rgba[3]?"transparent":this.toRgbaString()}});l.fn.parse.prototype=l.fn;m.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/255,c=a[1]/255,d=a[2]/255;a=a[3];var e=Math.max(b,c,d),f=Math.min(b,c,d),g=e-f,h=e+f,l=.5*h;return[Math.round(f===e?0:b===e?60*(c-d)/g+360:c===e?60*(d-b)/g+120:60*(b-c)/g+240)%360,0===g?0:.5>=l?g/h:g/(2-h),l,null==a?1:a]};m.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360, +c=a[1],d=a[2];a=a[3];c=.5>=d?d*(1+c):d+c-d*c;d=2*d-c;return[Math.round(255*f(d,c,b+1/3)),Math.round(255*f(d,c,b)),Math.round(255*f(d,c,b-1/3)),a]};u(m,function(e,f){var h=f.props,m=f.cache,p=f.to,n=f.from;l.fn[e]=function(e){p&&!this[m]&&(this[m]=p(this._rgba));if(e===b)return this[m].slice();var f,g=a.type(e),q="array"===g||"object"===g?e:arguments,r=this[m].slice();u(h,function(a,b){var d=q["object"===g?a:b.idx];null==d&&(d=r[b.idx]);r[b.idx]=c(d,b)});return n?(f=l(n(r)),f[m]=r,f):l(r)};u(h,function(b, +c){l.fn[b]||(l.fn[b]=function(d){var f=a.type(d),h="alpha"===b?this._hsla?"hsla":"rgba":e,l=this[h](),m=l[c.idx];if("undefined"===f)return m;"function"===f&&(d=d.call(this,m),f=a.type(d));if(null==d&&c.empty)return this;"string"===f&&(f=g.exec(d))&&(d=m+parseFloat(f[2])*("+"===f[1]?1:-1));l[c.idx]=d;return this[h](l)})})});l.hook=function(b){b=b.split(" ");u(b,function(b,c){a.cssHooks[c]={set:function(b,d){var f,g="";if("transparent"!==d&&("string"!==a.type(d)||(f=e(d)))){d=l(f||d);if(!n.rgba&&1!== +d._rgba[3]){for(f="backgroundColor"===c?b.parentNode:b;(""===g||"transparent"===g)&&f&&f.style;)try{g=a.css(f,"backgroundColor"),f=f.parentNode}catch(h){}d=d.blend(g&&"transparent"!==g?g:"_default")}d=d.toRgbaString()}try{b.style[c]=d}catch(h){}}};a.fx.step[c]=function(b){b.colorInit||(b.start=l(b.elem,c),b.end=l(b.end),b.colorInit=!0);a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})};l.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"); +a.cssHooks.borderColor={expand:function(a){var b={};u(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a});return b}};r=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(b);(function(){function a(a){var c,d=a.ownerDocument.defaultView? +a.ownerDocument.defaultView.getComputedStyle(a,null):a.currentStyle,h={};if(d&&d.length&&d[0]&&d[d[0]])for(a=d.length;a--;)c=d[a],"string"===typeof d[c]&&(h[b.camelCase(c)]=d[c]);else for(c in d)"string"===typeof d[c]&&(h[c]=d[c]);return h}var d=["add","remove","toggle"],c={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};b.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(a,c){b.fx.step[c]=function(a){if("none"!== +a.end&&!a.setAttr||1===a.pos&&!a.setAttr)b.style(a.elem,c,a.end),a.setAttr=!0}});b.fn.addBack||(b.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))});b.effects.animateClass=function(e,f,g,h){var l=b.speed(f,g,h);return this.queue(function(){var f=b(this),g=f.attr("class")||"",h,q=l.children?f.find("*").addBack():f,q=q.map(function(){return{el:b(this),start:a(this)}});h=function(){b.each(d,function(a,b){if(e[b])f[b+"Class"](e[b])})};h();q=q.map(function(){this.end= +a(this.el[0]);var d=this.start,e=this.end,f={},g,h;for(g in e)h=e[g],d[g]===h||c[g]||!b.fx.step[g]&&isNaN(parseFloat(h))||(f[g]=h);this.diff=f;return this});f.attr("class",g);q=q.map(function(){var a=this,c=b.Deferred(),d=b.extend({},l,{queue:!1,complete:function(){c.resolve(a)}});this.el.animate(this.diff,d);return c.promise()});b.when.apply(b,q.get()).done(function(){h();b.each(arguments,function(){var a=this.el;b.each(this.diff,function(b){a.css(b,"")})});l.complete.call(f[0])})})};b.fn.extend({addClass:function(a){return function(c, +d,h,l){return d?b.effects.animateClass.call(this,{add:c},d,h,l):a.apply(this,arguments)}}(b.fn.addClass),removeClass:function(a){return function(c,d,h,l){return 1

      ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none", +margin:0,padding:0}),g={width:a.width(),height:a.height()},h=document.activeElement;try{h.id}catch(l){h=document.body}a.wrap(f);(a[0]===h||b.contains(a[0],h))&&b(h).focus();f=a.parent();"static"===a.css("position")?(f.css({position:"relative"}),a.css({position:"relative"})):(b.extend(d,{position:a.css("position"),zIndex:a.css("z-index")}),b.each(["top","left","bottom","right"],function(b,f){d[f]=a.css(f);isNaN(parseInt(d[f],10))&&(d[f]="auto")}),a.css({position:"relative",top:0,left:0,right:"auto", +bottom:"auto"}));a.css(g);return f.css(d).show()},removeWrapper:function(a){var d=document.activeElement;a.parent().is(".ui-effects-wrapper")&&(a.parent().replaceWith(a),(a[0]===d||b.contains(a[0],d))&&b(d).focus());return a},setTransition:function(a,d,f,g){g=g||{};b.each(d,function(b,d){var e=a.cssUnit(d);0a?c(2*a)/2:1-c(-2*a+2)/2}})})();return b.effects}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.blind=function(a,d){var c=b(this),e="position top bottom left right height width".split(" "),f=b.effects.setMode(c,a.mode||"hide"),g=a.direction||"up",h=/up|down|vertical/.test(g),l=h?"height":"width",m=h?"top":"left",g=/up|left|vertical|horizontal/.test(g),p={},n="show"===f,q,r,u;c.parent().is(".ui-effects-wrapper")?b.effects.save(c.parent(),e):b.effects.save(c,e);c.show(); +q=b.effects.createWrapper(c).css({overflow:"hidden"});r=q[l]();u=parseFloat(q.css(m))||0;p[l]=n?r:0;g||(c.css(h?"bottom":"right",0).css(h?"top":"left","auto").css({position:"absolute"}),p[m]=n?u:r+u);n&&(q.css(l,0),g||q.css(m,u+r));q.animate(p,{duration:a.duration,easing:a.easing,queue:!1,complete:function(){"hide"===f&&c.hide();b.effects.restore(c,e);b.effects.removeWrapper(c);d()}})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.bounce=function(a,d){var c=b(this),e="position top bottom left right height width".split(" "),f=b.effects.setMode(c,a.mode||"effect"),g="hide"===f,h="show"===f,l=a.direction||"up",f=a.distance,m=a.times||5,p=2*m+(h||g?1:0),n=a.duration/p,q=a.easing,r="up"===l||"down"===l?"top":"left",l="up"===l||"left"===l,u,w,B=c.queue(),x=B.length;(h||g)&&e.push("opacity");b.effects.save(c, +e);c.show();b.effects.createWrapper(c);f||(f=c["top"===r?"outerHeight":"outerWidth"]()/3);h&&(w={opacity:1},w[r]=0,c.css("opacity",0).css(r,l?2*-f:2*f).animate(w,n,q));g&&(f/=Math.pow(2,m-1));w={};for(h=w[r]=0;h
      ").css({position:"absolute",visibility:"visible",left:-r*m,top:-q*p}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:m,height:p,left:u+(h?B*m:0),top:w+(h?x*p:0),opacity:h?0:1}).animate({left:u+(h?0:B*m),top:w+(h?0:x*p),opacity:h?1:0},a.duration||500,a.easing,c)}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.fade=function(a,d){var c=b(this),e=b.effects.setMode(c,a.mode||"toggle");c.animate({opacity:e},{queue:!1,duration:a.duration,easing:a.easing,complete:d})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.fold=function(a,d){var c=b(this),e="position top bottom left right height width".split(" "),f=b.effects.setMode(c,a.mode||"hide"),g="show"===f,h="hide"===f,f=a.size||15,l=/([0-9]+)%/.exec(f),m=!!a.horizFirst,p=g!==m,n=p?["width","height"]:["height","width"],q=a.duration/2,r,u={},w={};b.effects.save(c,e);c.show();r=b.effects.createWrapper(c).css({overflow:"hidden"});p= +p?[r.width(),r.height()]:[r.height(),r.width()];l&&(f=parseInt(l[1],10)/100*p[h?0:1]);g&&r.css(m?{height:0,width:f}:{height:f,width:0});u[n[0]]=g?p[0]:f;w[n[1]]=g?p[1]:0;r.animate(u,q,a.easing).animate(w,q,a.easing,function(){h&&c.hide();b.effects.restore(c,e);b.effects.removeWrapper(c);d()})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.highlight=function(a,d){var c=b(this),e=["backgroundImage","backgroundColor","opacity"],f=b.effects.setMode(c,a.mode||"show"),g={backgroundColor:c.css("backgroundColor")};"hide"===f&&(g.opacity=0);b.effects.save(c,e);c.show().css({backgroundImage:"none",backgroundColor:a.color||"#ffff99"}).animate(g,{queue:!1,duration:a.duration,easing:a.easing,complete:function(){"hide"=== +f&&c.hide();b.effects.restore(c,e);d()}})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.size=function(a,d){var c,e,f,g,h,l,m=b(this),p="position top bottom left right width height overflow opacity".split(" ");h="position top bottom left right overflow opacity".split(" ");var n=["width","height","overflow"],q=["fontSize"],r=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],u=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"], +w=b.effects.setMode(m,a.mode||"effect"),B=a.restore||"effect"!==w,x=a.scale||"both";l=a.origin||["middle","center"];var D=m.css("position"),y=B?p:h,H={height:0,width:0,outerHeight:0,outerWidth:0};"show"===w&&m.show();h={height:m.height(),width:m.width(),outerHeight:m.outerHeight(),outerWidth:m.outerWidth()};"toggle"===a.mode&&"show"===w?(m.from=a.to||H,m.to=a.from||h):(m.from=a.from||("show"===w?H:h),m.to=a.to||("hide"===w?H:h));f=m.from.height/h.height;g=m.from.width/h.width;c=m.to.height/h.height; +e=m.to.width/h.width;if("box"===x||"both"===x)f!==c&&(y=y.concat(r),m.from=b.effects.setTransition(m,r,f,m.from),m.to=b.effects.setTransition(m,r,c,m.to)),g!==e&&(y=y.concat(u),m.from=b.effects.setTransition(m,u,g,m.from),m.to=b.effects.setTransition(m,u,e,m.to));"content"!==x&&"both"!==x||f===c||(y=y.concat(q).concat(n),m.from=b.effects.setTransition(m,q,f,m.from),m.to=b.effects.setTransition(m,q,c,m.to));b.effects.save(m,y);m.show();b.effects.createWrapper(m);m.css("overflow","hidden").css(m.from); +l&&(l=b.effects.getBaseline(l,h),m.from.top=(h.outerHeight-m.outerHeight())*l.y,m.from.left=(h.outerWidth-m.outerWidth())*l.x,m.to.top=(h.outerHeight-m.to.outerHeight)*l.y,m.to.left=(h.outerWidth-m.to.outerWidth)*l.x);m.css(m.from);if("content"===x||"both"===x)r=r.concat(["marginTop","marginBottom"]).concat(q),u=u.concat(["marginLeft","marginRight"]),n=p.concat(r).concat(u),m.find("*[width]").each(function(){var d=b(this),h=d.height(),l=d.width(),m=d.outerHeight(),p=d.outerWidth();B&&b.effects.save(d, +n);d.from={height:h*f,width:l*g,outerHeight:m*f,outerWidth:p*g};d.to={height:h*c,width:l*e,outerHeight:h*c,outerWidth:l*e};f!==c&&(d.from=b.effects.setTransition(d,r,f,d.from),d.to=b.effects.setTransition(d,r,c,d.to));g!==e&&(d.from=b.effects.setTransition(d,u,g,d.from),d.to=b.effects.setTransition(d,u,e,d.to));d.css(d.from);d.animate(d.to,a.duration,a.easing,function(){B&&b.effects.restore(d,n)})});m.animate(m.to,{queue:!1,duration:a.duration,easing:a.easing,complete:function(){0===m.to.opacity&& +m.css("opacity",m.from.opacity);"hide"===w&&m.hide();b.effects.restore(m,y);B||("static"===D?m.css({position:"relative",top:m.to.top,left:m.to.left}):b.each(["top","left"],function(a,b){m.css(b,function(b,c){var d=parseInt(c,10),e=a?m.to.left:m.to.top;return"auto"===c?e+"px":d+e+"px"})}));b.effects.removeWrapper(m);d()}})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect","./effect-size"],b):b(jQuery)})(function(b){return b.effects.effect.scale=function(a,d){var c=b(this),e=b.extend(!0,{},a),f=b.effects.setMode(c,a.mode||"effect"),g=parseInt(a.percent,10)||(0===parseInt(a.percent,10)?0:"hide"===f?0:100),h=a.direction||"both",l=a.origin,m={height:c.height(),width:c.width(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth()},p="horizontal"!==h?g/100:1,g="vertical"!==h?g/100:1;e.effect= +"size";e.queue=!1;e.complete=d;"effect"!==f&&(e.origin=l||["middle","center"],e.restore=!0);e.from=a.from||("show"===f?{height:0,width:0,outerHeight:0,outerWidth:0}:m);e.to={height:m.height*p,width:m.width*g,outerHeight:m.outerHeight*p,outerWidth:m.outerWidth*g};e.fade&&("show"===f&&(e.from.opacity=0,e.to.opacity=1),"hide"===f&&(e.from.opacity=1,e.to.opacity=0));c.effect(e)}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect","./effect-scale"],b):b(jQuery)})(function(b){return b.effects.effect.puff=function(a,d){var c=b(this),e=b.effects.setMode(c,a.mode||"hide"),f="hide"===e,g=parseInt(a.percent,10)||150,h=g/100,l={height:c.height(),width:c.width(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth()};b.extend(a,{effect:"scale",queue:!1,fade:!0,mode:e,complete:d,percent:f?g:100,from:f?l:{height:l.height*h,width:l.width*h,outerHeight:l.outerHeight* +h,outerWidth:l.outerWidth*h}});c.effect(a)}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.pulsate=function(a,d){var c=b(this),e=b.effects.setMode(c,a.mode||"show"),f="show"===e,g="hide"===e,e=2*(a.times||5)+(f||"hide"===e?1:0),h=a.duration/e,l=0,m=c.queue(),p=m.length;if(f||!c.is(":visible"))c.css("opacity",0).show(),l=1;for(f=1;f
      ").appendTo(document.body).addClass(a.className).css({top:l.top-h,left:l.left-g,height:c.innerHeight(), +width:c.innerWidth(),position:f?"fixed":"absolute"}).animate(e,a.duration,a.easing,function(){m.remove();d()})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./widget"],b):b(jQuery)})(function(b){return b.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue();this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min});this.valueDiv=b("
      ").appendTo(this.element); +this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove()},value:function(a){if(void 0===a)return this.options.value;this.options.value=this._constrainedValue(a);this._refreshValue()},_constrainedValue:function(a){void 0===a&&(a=this.options.value);this.indeterminate=!1===a;"number"!==typeof a&&(a=0);return this.indeterminate? +!1:Math.min(this.options.max,Math.max(this.min,a))},_setOptions:function(a){var b=a.value;delete a.value;this._super(a);this.options.value=this._constrainedValue(b);this._refreshValue()},_setOption:function(a,b){"max"===a&&(b=Math.max(this.min,b));"disabled"===a&&this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b);this._super(a,b)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var a= +this.options.value,d=this._percentage();this.valueDiv.toggle(this.indeterminate||a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(d.toFixed(0)+"%");this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate);this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=b("
      ").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":a}),this.overlayDiv&& +(this.overlayDiv.remove(),this.overlayDiv=null));this.oldValue!==a&&(this.oldValue=a,this._trigger("change"));a===this.options.max&&this._trigger("complete")}})}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],b):b(jQuery)})(function(b){return b.widget("ui.selectable",b.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var a,d=this;this.element.addClass("ui-selectable");this.dragged=!1;this.refresh=function(){a=b(d.options.filter,d.element[0]);a.addClass("ui-selectee"); +a.each(function(){var a=b(this),d=a.offset();b.data(this,"selectable-item",{element:this,$element:a,left:d.left,top:d.top,right:d.left+a.outerWidth(),bottom:d.top+a.outerHeight(),startselected:!1,selected:a.hasClass("ui-selected"),selecting:a.hasClass("ui-selecting"),unselecting:a.hasClass("ui-unselecting")})})};this.refresh();this.selectees=a.addClass("ui-selectee");this._mouseInit();this.helper=b("
      ")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"); +this.element.removeClass("ui-selectable ui-selectable-disabled");this._mouseDestroy()},_mouseStart:function(a){var d=this,c=this.options;this.opos=[a.pageX,a.pageY];this.options.disabled||(this.selectees=b(c.filter,this.element[0]),this._trigger("start",a),b(c.appendTo).append(this.helper),this.helper.css({left:a.pageX,top:a.pageY,width:0,height:0}),c.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var c=b.data(this,"selectable-item");c.startselected=!0;a.metaKey|| +a.ctrlKey||(c.$element.removeClass("ui-selected"),c.selected=!1,c.$element.addClass("ui-unselecting"),c.unselecting=!0,d._trigger("unselecting",a,{unselecting:c.element}))}),b(a.target).parents().addBack().each(function(){var c,f=b.data(this,"selectable-item");if(f)return c=!a.metaKey&&!a.ctrlKey||!f.$element.hasClass("ui-selected"),f.$element.removeClass(c?"ui-unselecting":"ui-selected").addClass(c?"ui-selecting":"ui-unselecting"),f.unselecting=!c,f.selecting=c,(f.selected=c)?d._trigger("selecting", +a,{selecting:f.element}):d._trigger("unselecting",a,{unselecting:f.element}),!1}))},_mouseDrag:function(a){this.dragged=!0;if(!this.options.disabled){var d,c=this,e=this.options,f=this.opos[0],g=this.opos[1],h=a.pageX,l=a.pageY;f>h&&(d=h,h=f,f=d);g>l&&(d=l,l=g,g=d);this.helper.css({left:f,top:g,width:h-f,height:l-g});this.selectees.each(function(){var d=b.data(this,"selectable-item"),p=!1;d&&d.element!==c.element[0]&&("touch"===e.tolerance?p=!(d.left>h||d.rightl||d.bottomf&&d.rightg&&d.bottom",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var a=this.element.uniqueId().attr("id");this.ids={element:a,button:a+ +"-button",menu:a+"-menu"};this._drawButton();this._drawMenu();this.options.disabled&&this.disable()},_drawButton:function(){var a=this;this.label=b("label[for='"+this.ids.element+"']").attr("for",this.ids.button);this._on(this.label,{click:function(a){this.button.focus();a.preventDefault()}});this.element.hide();this.button=b("",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false", +"aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element);b("",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button);this.buttonText=b("",{"class":"ui-selectmenu-text"}).appendTo(this.button);this._setText(this.buttonText,this.element.find("option:selected").text());this._resizeButton();this._on(this.button,this._buttonEvents);this.button.one("focusin",function(){a.menuItems||a._refreshMenu()});this._hoverable(this.button); +this._focusable(this.button)},_drawMenu:function(){var a=this;this.menu=b("
      "}); +$(".js-additional-connection-info").append(a);showAdditionalConnectionInfo();additionalConnectionInfoReceived=!0}},updateConnectionEndpointInfo=function(b){if(!cfConnectionOutputReceived&&""!=b){var a="";if(-1!==b.indexOf("")){var d="",c="";-1!==b.indexOf("dashboard")&&(c=" Dashboard");-1!==b.indexOf("launch")?(d=b.match(/href="([^"]*)/)[1],a+=""):a+="
      "+b+"
      "}else a+="
      "; +$(".js-cf-connection-output").append(a);$(".js-cf-connection-output").removeClass("is-hidden");$(".js-cf-connection-output").addClass("is-visible");cfConnectionOutputReceived=!0}},showAdditionalConnectionInfo=function(){$(".js-additional-connection-info").removeClass("is-hidden");$(".js-tab[data-tab='lab-resources']").click();$(".js-lab-sidebar").animate({scrollTop:$(".js-additional-connection-info").offset().top},750,function(){$(".js-additional-connection-info").addClass("is-visible")})},initExternalWindowListener= +function(){$(".js-external-window").click(function(b){b.preventDefault();if($(this)[0].hasAttribute("href"))consoleWindow=window.open($(this).attr("href"));else return!1})},closeConsoleWindow=function(){""!==consoleWindow&&consoleWindow.close()},resetVariables=function(){cfConnectionOutputReceived=additionalConnectionInfoReceived=pausePolling=!1;consoleWindow=consoleClipboard=focusDataPoll="";cloudProvisioned=consoleReady=consoleInfoFilled=endLabButtonDisplayed=!1},labStartSegment=function(){var b= +$(".js-lab_and_classroom_info").data();"undefined"!=typeof analytics&&analytics.track("start_lab",b)};initLabRun=function(){checkIfLabIsAlreadyRunning();initStartButtonListener();initEndButtonListener();initExternalWindowListener()};initSliderListener=function(){$(".js-sidebar-slider").click(function(){$(this).toggleClass("is-hidden");$(".js-lab-sidebar-container").toggleClass("is-hidden")})};showSidebar=function(){$(".js-sidebar-slider").removeClass("is-hidden");$(".js-lab-sidebar-container").removeClass("is-hidden")}; +hideSidebar=function(){$(".js-sidebar-slider").addClass("is-hidden");$(".js-lab-sidebar-container").addClass("is-hidden")};initLabSidebar=function(){initSliderListener()};var initFakeShadow=function(){$(".js-fake-shadow-waypoint").length&&new Waypoint({element:$(".js-fake-shadow-waypoint")[0],offset:60,handler:function(){$(".js-fake-shadow").toggleClass("is-stuck")}})},initTiles=function(){$(".js-landing-tiles").addClass("is-visible")},initLanding=function(){initFakeShadow();initTiles()}; +ql.MaterialDialog=function(b,a){this.dialog=b;this.dismissers=$(this.dialog).find("[data-dismiss]");this.isOpen=a||!1;this.listen();this.upgrade();this.render()};ql.MaterialDialog.prototype.upgrade=function(){$(this.dialog).addClass("is-upgraded")};ql.MaterialDialog.prototype.listen=function(){for(var b=0;b$(window).width()?($(".md-input").removeClass("md-input--horizontal"),$(".js-permissions-select").removeClass("permissions-select__container--horizontal"),$(".js-labs-resources").removeClass("labs__resources--horizontal")):($(".md-input").addClass("md-input--horizontal"),$(".js-student-resources .md-input").removeClass("md-input--horizontal"),$(".js-permissions-select").addClass("permissions-select__container--horizontal"),$(".js-labs-resources").addClass("labs__resources--horizontal"))}; +ql.initNewStudentResourceListener=function(){$(document).on("nested:fieldAdded",function(b){b=b.field.find(".md-input__input");for(var a=0;a"+this.permissions[a]+"");this.button.find("#permissions-display").html(b);this.menu.render()}; +ql.PermissionsMenu=function(b){var a=this;this.element=b;this.isVisible=!1;this.setPermissions="";this.categories=[];b=this.element.children("li");for(var d=0;de.max&&(e.max=n),n10||(h.releaseIds[e.slice(-200)]=(""+t).slice(-200))}var c=n(13),f=n(8),l=n(2),p=n(15),d=n(19),m=n(30),h=n("loader"),v=n("handle"),g=0;f.on("jserrors",function(){return{body:l.take(["cm"])}});var y={finished:p(o),setPageViewName:r,setErrorHandler:s,addToTrace:i,inlineHit:a,addRelease:u};m(y,function(n,e){c("api-"+n,e,"api")});var w=0},{}],4:[function(n,e,t){var r=/([^?#]*)[^#]*(#[^?]*|$).*/,o=/([^?#]*)().*/;e.exports=function(n,e){return n.replace(e?r:o,"$1$2")}},{}],5:[function(n,e,t){function r(n,e){var t=n[1];i(e[t],function(e,t){var r=n[0],o=t[0];if(o===r){var i=t[1],a=n[3],s=n[2];i.apply(a,s)}})}var o=n("ee"),i=n(30),a=n(13).handlers;e.exports=function(n){var e=o.backlog[n],t=a[n];if(t){for(var s=0;e&&se)return n.slice(0,r).join("");return n.join("")}function a(n,e){var t=0,r="";return u(n,function(n,i){var a,s,u=[];if("string"==typeof i)a="&"+n+"="+o(i),t+=a.length,r+=a;else if(i.length){for(t+=9,s=0;s=e));s++)u.push(a);r+="&"+n+"=%5B"+u.join(",")+"%5D"}}),r}function s(n,e){return e&&"string"==typeof e?"&"+n+"="+o(e):""}var u=n(30),c=n(18),f={"%2C":",","%3A":":","%2F":"/","%40":"@","%24":"$","%3B":";"},l=u(f,function(n){return n}),p=new RegExp(l.join("|"),"g");e.exports={obj:a,fromArray:i,qs:o,param:s}},{}],7:[function(n,e,t){var r=n(30),o=n("ee"),i=n(5);e.exports=function(n){n&&"object"==typeof n&&(r(n,function(n,e){e&&!a[n]&&(o.emit("feat-"+n,[]),a[n]=!0)}),i("feature"))};var a=e.exports.active={}},{}],8:[function(n,e,t){function r(n){if(n.info.beacon){n.info.queueTime&&b.store("measures","qt",{value:n.info.queueTime}),n.info.applicationTime&&b.store("measures","ap",{value:n.info.applicationTime}),k.measure("be","starttime","firstbyte"),k.measure("fe","firstbyte","onload"),k.measure("dc","firstbyte","domContent");var e=b.get("measures"),t=h(e,function(n,e){return"&"+n+"="+e.params.value}).join("");if(t){var r="1",o=[p(n)];if(o.push(t),o.push(g.param("tt",n.info.ttGuid)),o.push(g.param("us",n.info.user)),o.push(g.param("ac",n.info.account)),o.push(g.param("pr",n.info.product)),o.push(g.param("af",h(n.features,function(n){return n}).join(","))),window.performance&&"undefined"!=typeof window.performance.timing){var i={timing:v.addPT(window.performance.timing,{}),navigation:v.addPN(window.performance.navigation,{})};o.push(g.param("perf",y(i)))}o.push(g.param("xx",n.info.extra)),o.push(g.param("ua",n.info.userAttributes)),o.push(g.param("at",n.info.atts));var a=y(n.info.jsAttributes);o.push(g.param("ja","{}"===a?null:a));var s=g.fromArray(o,n.maxBytes);w.jsonp("https://"+n.info.beacon+"/"+r+"/"+n.info.licenseKey+s,A)}}}function o(n){var e=h(q,function(e){return a(e,n,{unload:!0})});return x(e,i)}function i(n,e){return n||e}function a(n,e,t){return u(e,n,s(n),t||{})}function s(n){for(var e=d({}),t=d({}),r=q[n]||[],o=0;o9||0===j.ieVersion);e.exports={sendRUM:m(r),sendFinal:o,pingErrors:c,sendX:a,on:l,xhrUsable:R}},{}],9:[function(n,e,t){var r=n("loader"),o=document.createElement("div");o.innerHTML="";var i=o.getElementsByTagName("div").length;4===i?r.ieVersion=6:3===i?r.ieVersion=7:2===i?r.ieVersion=8:1===i?r.ieVersion=9:r.ieVersion=0,e.exports=r.ieVersion},{}],10:[function(n,e,t){function r(n){c.sendFinal(p,!1),a.navCookie&&(document.cookie="NREUM=s="+Number(new Date)+"&r="+o(document.location.href)+"&p="+o(document.referrer)+"; path=/")}var o=n(14),i=n(1),a=n(16),s=n(17),u=n(15),c=n(8),f=n(13),l=n(7),p=n("loader"),d=n(29),m=n(5);n(3);var h="undefined"==typeof window.NREUM.autorun||window.NREUM.autorun;window.NREUM.setToken=l,6===n(9)?p.maxBytes=2e3:p.maxBytes=3e4,p.releaseIds={};var v=u(r);!d||navigator.sendBeacon?i("pagehide",v):i("beforeunload",v),i("unload",v),f("mark",s.mark,"api"),s.mark("done"),m("api"),h&&c.sendRUM(p)},{}],11:[function(n,e,t){e.exports=function(n,e){setTimeout(function t(){try{n()}finally{setTimeout(t,e)}},e)}},{}],12:[function(n,e,t){function r(n,e){var t=n["navigation"+a];return e.of=t,i(t,t,e,"n"),i(n[u+a],t,e,"u"),i(n[c+a],t,e,"r"),i(n[u+s],t,e,"ue"),i(n[c+s],t,e,"re"),i(n["fetch"+a],t,e,"f"),i(n[f+a],t,e,"dn"),i(n[f+s],t,e,"dne"),i(n["c"+l+a],t,e,"c"),i(n["secureC"+l+"ion"+a],t,e,"s"),i(n["c"+l+s],t,e,"ce"),i(n[p+a],t,e,"rq"),i(n[d+a],t,e,"rp"),i(n[d+s],t,e,"rpe"),i(n.domLoading,t,e,"dl"),i(n.domInteractive,t,e,"di"),i(n[h+a],t,e,"ds"),i(n[h+s],t,e,"de"),i(n.domComplete,t,e,"dc"),i(n[m+a],t,e,"l"),i(n[m+s],t,e,"le"),e}function o(n,e){return i(n.type,0,e,"ty"),i(n.redirectCount,0,e,"rc"),e}function i(n,e,t,r){var o;"number"==typeof n&&n>0&&(o=Math.round(n-e),t[r]=o),v.push(o)}var a="Start",s="End",u="unloadEvent",c="redirect",f="domainLookup",l="onnect",p="request",d="response",m="loadEvent",h="domContentLoadedEvent",v=[];e.exports={addPT:r,addPN:o,nt:v}},{}],13:[function(n,e,t){function r(n,e,t,r){o(r||i,n,e,t)}function o(n,e,t,r){r||(r="feature"),n||(n=i);var o=a[r]=a[r]||{},s=o[e]=o[e]||[];s.push([n,t])}var i=n("handle").ee;e.exports=r,r.on=o;var a=r.handlers={}},{}],14:[function(n,e,t){function r(n){var e,t=0;for(e=0;e6e4)return;return o}}}var a=n(14),s=n(17),u=n("loader"),c=n(29);e.exports={navCookie:!0},r()},{}],17:[function(n,e,t){function r(n,e){"undefined"==typeof e&&(e=a.now()+a.offset),s[n]=e}function o(n,e,t){var r=s[e],o=s[t];"undefined"!=typeof r&&"undefined"!=typeof o&&i.store("measures",n,{value:o-r})}var i=n(2),a=n("loader"),s={};e.exports={mark:r,measure:o}},{}],18:[function(n,e,t){function r(n){try{return i("",{"":n})}catch(e){try{s.emit("internal-error",[e])}catch(t){}}}function o(n){return u.lastIndex=0,u.test(n)?'"'+n.replace(u,function(n){var e=c[n];return"string"==typeof e?e:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function i(n,e){var t=e[n];switch(typeof t){case"string":return o(t);case"number":return isFinite(t)?String(t):"null";case"boolean":return String(t);case"object":if(!t)return"null";var r=[];if(t instanceof window.Array||"[object Array]"===Object.prototype.toString.apply(t)){for(var s=t.length,u=0;u1?e[1]:"unknown"}function f(n){return n&&n.indexOf("nrWrapper")>=0}function l(n){for(var e,t=n.stacktrace,r=/ line (\d+), column (\d+) in (?:]+)>|([^\)]+))\(.*\) in (.*):\s*$/i,o=t.split("\n"),i=[],a=[],s=!1,u=0,l=o.length;u100){var t=n.length-100;e=n.slice(0,50).join("\n"),e+="\n< ...truncated "+t+" lines... >\n",e+=n.slice(-50).join("\n")}else e=n.join("\n");return e.replace(r,"")}},{}],23:[function(n,e,t){function r(n){return p(n.exceptionClass)^n.stackHash}function o(n,e){if("string"!=typeof n)return"";var t=f(n);return t===e?"":t}function i(n,e){for(var t="",r=0;r=v)){var o,a,f={};"undefined"!=typeof window&&window.document&&window.document.documentElement&&(o=window.document.documentElement.clientWidth,a=window.document.documentElement.clientHeight);var l={timestamp:n+s.offset,timeSinceLoad:n/1e3,browserWidth:o,browserHeight:a,referrerUrl:i,currentUrl:p(""+location),pageUrl:p(s.origin),eventType:"PageAction"};u(l,r),u(y,r),t&&"object"==typeof t&&u(t,r),f.actionName=e||"",g.push(f)}}function o(n,e,t){y[e]=t}var i,a=n("ee"),s=n("loader"),u=n(30),c=n(18),f=n(13),l=n(8),p=n(4),d=n(11),m=120,h=30,v=m*h/60,g=[],y=s.info.jsAttributes={};document.referrer&&(i=p(document.referrer)),f("api-setCustomAttribute",o,"api"),a.on("feat-ins",function(){f("api-addPageAction",r),l.on("ins",function(){return{qs:{ua:s.info.userAttributes,at:s.info.atts},body:{ins:g.splice(0)}}}),d(function(){l.sendX("ins",s)},1e3*h),l.sendX("ins",s)})},{}],26:[function(n,e,t){function r(n){var e,t,r,o=Date.now();for(e in n)t=n[e],"number"==typeof t&&t>0&&ti.s-e?s.e=i.e:(r[i.o]=i,a.push(i)):(r[i.o]=null,i.n="scroll",a.push(i)),o}}function v(n,e){return e}function g(n,e){return n.concat(e)}function y(n){var e=4;return!!(n&&"number"==typeof n.e&&"number"==typeof n.s&&n.e-n.s9e5?void(C={}):(k(C,function(e,t){t&&t.length&&(n+=t.length)}),n>30&&b.sendX("resources",w),void(n>1e3&&(C={})))},1e4)});var B=0}}},{}],27:[function(n,e,t){function r(n,e,t){e.time=t,n.cat?o.store("xhr",s([n.status,n.cat]),n,e):o.store("xhr",s([n.status,n.host,n.pathname]),n,e)}var o=n(2),i=n(13),a=n(8),s=n(18),u=n("loader"),c=n("ee");u.features.xhr&&(a.on("jserrors",function(){return{body:o.take(["xhr"])}}),c.on("feat-err",function(){i("xhr",r)}),e.exports=r)},{}],28:[function(n,e,t){e.exports=function(n){var e=document.createElement("a"),t=window.location,r={};e.href=n,r.port=e.port;var o=e.href.split("://");!r.port&&o[1]&&(r.port=o[1].split("/")[0].split("@").pop().split(":")[1]),r.port&&"0"!==r.port||(r.port="https"===o[0]?"443":"80"),r.hostname=e.hostname||t.hostname,r.pathname=e.pathname,r.protocol=o[0],"/"!==r.pathname.charAt(0)&&(r.pathname="/"+r.pathname);var i=!e.protocol||":"===e.protocol||e.protocol===t.protocol,a=e.hostname===document.domain&&e.port===t.port;return r.sameOrigin=i&&(!e.hostname||a),r}},{}],29:[function(n,e,t){var r=0,o=navigator.userAgent.match(/Firefox[\/\s](\d+\.\d+)/);o&&(r=+o[1]),e.exports=r},{}],30:[function(n,e,t){function r(n,e){var t=[],r="",i=0;for(r in n)o.call(n,r)&&(t[i]=e(r,n[r]),i+=1);return t}var o=Object.prototype.hasOwnProperty;e.exports=r},{}],31:[function(n,e,t){function r(n,e,t){e||(e=0),"undefined"==typeof t&&(t=n?n.length:0);for(var r=-1,o=t-e||0,i=Array(o<0?0:o);++r + \ No newline at end of file diff --git a/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource(2).html b/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource(2).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource(2).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource(3).html b/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource(3).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource(3).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource(4).html b/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource(4).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource(4).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource(5).html b/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource(5).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource(5).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource(6).html b/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource(6).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource(6).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource.html b/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource.html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Serverless Data Analysis (Python) _ Qwiklabs + roitraining_files/saved_resource.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining.htm b/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining.htm new file mode 100755 index 0000000..5102b56 --- /dev/null +++ b/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining.htm @@ -0,0 +1,903 @@ + + + + + + + +Serverless Machine Learning | Qwiklabs + roitraining + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + +menu + +
      +arrow_back + +

      +Serverless Machine Learning +

      +
      +
      + + +
      +
      +
      + + +
      + +
      + +
      +
      + + +
      +
      + + + +
      +
      +
      +
      +
      + +4m setup +· +2880m access +· +2880m completion + +
      + + +
      +
      +
      +
      +
      +Connection Details +
      + + +
      +
      + + + +
      +
      + +
      +
      + + + +
      +
      + +
      +
      + + + +
      +
      + + + + +
      +
      + + + +
      +
      + + + + + + + +
      +
      +
      +
      +
      + + +
      + +
      +
      +
      +
      +
      + +
      +
      + +
      + + +Lab Running + +
      +
      + +
      +

      1 days

      +
      +
      + +
      +
      +
      +
      +
      + +

      Serverless Machine Learning

      + +

      Overview

      + +

      Duration is 1 min

      + +

      In this lab, you go from exploring a taxicab dataset to training and deploying a high-accuracy distributed model with Cloud ML Engine.

      + +

      What you need

      + +

      What you'll need

      + +

      To complete this lab, you'll need:

      +
      • Access to a standard internet browser (Chrome browser recommended).
      • +
      • Time. Note the lab's Duration in the Lab Details tab in Qwiklabs, which is an estimate of the time it should take to complete all steps. Plan your schedule so you have time to complete the lab. Once you start the lab, you will not be able to pause and return later (you begin at step 1 every time you start a lab).
      • +
      • You do NOT need a Google Cloud Platform account or project. An account, project and associated resources are provided to you as part of this lab.
      • +
      • If you already have your own GCP account, make sure you do not use it for this lab.
      • +
      • If your lab prompts you to log into the console, use only the student account provided to you by the lab. This prevents you from incurring charges for lab activities in your personal GCP account.
      • +
      +

      Before accessing the Cloud Console, log out of all other Google / Gmail accounts you may be logged in with. If this is not possible, use a new Incognito window (Chrome) or another browser for the Qwiklabs session.

      +
      + +

      Start your lab

      + +

      Note the Setup time in the Lab Details tab in Qwiklabs. That's how long it will take for the lab account to build its resources. You can track your lab's progress with the status bar at the top of your screen.

      + +

      When you are ready, click Start Lab.

      + +

      5e5165bd940f65c.png

      + +

      Important: What is happening during this time?

      +

      Your lab is spinning up GCP resources for you behind the scenes, including an account, a project, resources within the project, and permission for you to control the resources you will need to run the lab. This means that instead of spending time manually setting up a project and building resources from scratch as part of your lab, you can more quickly begin learning.

      +
      + +

      Find Your Lab's GCP Username and Password

      + +

      To access the resources and console for this lab, locate the Connection Details panel in Qwiklabs. Here you will find the account ID and password for the account you will use to log in to the Google Cloud Platform:

      + +

      56aa1b525796849d.png

      + +

      If your lab provides other resource identifiers or connection-related information, it will appear on this panel as well.

      + +

      What you learn

      + +

      In this series of labs, you go from exploring a taxicab dataset to training and deploying a high-accuracy distributed model with Cloud ML Engine.

      + +

      Setup

      + +

      Activate Google Cloud Shell

      + +

      From the GCP Console click the icon (as depicted below) on the top right toolbar:

      + +

      5f504766b9b3be17.png

      + +

      Then click "Start Cloud Shell" as shown here:

      + +

      c0726a5e7bd6ec39.png

      + +

      It should only take a few moments to provision and connect to the environment: 718b09ed50d1e90.png

      + +

      This virtual machine is loaded with all the development tools you'll need. It offers a persistent 5GB home directory, and runs on the Google Cloud, greatly enhancing network performance and authentication. Much if not all of your work in this lab can be done with simply a browser or your Google Chromebook.

      + +

      Once connected to the cloud shell, you should see that you are already authenticated and that the project is already set to your PROJECT_ID:

      +
      gcloud auth list
      +
      +

      Command output

      +
      Credentialed accounts:
      + - <myaccount>@<mydomain>.com (active)
      +
      +

      Note: gcloud is the powerful and unified command-line tool for Google Cloud Platform. Full documentation is available from https://cloud.google.com/sdk/gcloud. It comes pre-installed on CloudShell and you will surely enjoy its support for tab-completion.

      +
      +
      gcloud config list project
      +
      +

      Command output

      +
      [core]
      +project = <PROJECT_ID>
      +
      +

      If it is not, you can set it with this command:

      +
      gcloud config set project <PROJECT_ID>
      +
      +

      Command output

      +
      Updated property [core/project].
      +
      +

      Launch Cloud Datalab

      + +

      Duration is 2 min

      + +

      To launch Cloud Datalab:

      + +

      Step 1

      + +

      In Cloud Shell, type:

      +
      gcloud compute zones list
      +
      +

      Pick a zone in a geographically closeby region.

      + +

      Step 2

      + +

      In Cloud Shell, type:

      +
      datalab create dataengvm --zone <ZONE>
      +
      +

      Datalab will take about 5 minutes to start.

      + +

      + +

      If you are not yet familiar with Datalab, what follows is a graphical cheat sheet for the main Datalab functionality:

      + +

      369bf7e045b084ed.png

      + +

      Move on to the next step.

      + +

      Checkout notebook into Cloud Datalab

      + +

      Duration is 5 min

      + +

      Step 1

      + +

      If necessary, wait for Datalab to finish launching. Datalab is ready when you see a message prompting you to do a "Web Preview".

      + +

      Step 2

      + +

      Click on the Web Preview icon on the top-left corner of the Cloud Shell ribbon. Switch to port 8081.

      + +

      7eb159ad9b4d3d2d.png

      + +

      + +

      Step 3

      + +

      In Datalab, click on the icon for "Open ungit" in the top-right ribbon.

      + +

      fc5c4f63c40f83f.png

      + +

      Step 4

      + +

      In the Ungit window, select the text that reads /content/datalab/notebooks and remove the notebooks so that it reads /content/datalab, then hit enter.

      + +

      70652193140af6f3.png

      + +

      In the panel that comes up, type the following as the GitHub repository to Clone from:

      +
      https://github.com/GoogleCloudPlatform/training-data-analyst
      +
      +

      Then, click on Clone repository.

      + +

      1. Explore dataset, create ML datasets, create benchmark

      + +

      Duration is 15 min

      + +

      In this lab, you will:

      +
      • Explore a dataset using BigQuery and Datalab
      • +
      • Sample the dataset and create training, validation, and testing datasets for local development of TensorFlow models
      • +
      • Create a benchmark to evaluate the performance of ML against
      • +
      +

      Step 1

      + +

      In Cloud Datalab, click on the Home icon, and then navigate to training-data-analyst/courses/machine_learning/datasets/ and open create_datasets.ipynb.

      + +

      Step 2

      + +

      In Datalab, click on Clear | All Cells (click on__ Clear_, then in the drop-down menu, select_ All Cells)__. Now, read the narrative and execute each cell in turn.

      + +

      2a. Getting Started with TensorFlow

      + +

      Duration is 15 min

      + +

      In this lab, you will learn how the TensorFlow Python API works:

      +
      • Building a graph
      • +
      • Running a graph
      • +
      • Feeding values into a graph
      • +
      • Find area of a triangle using TensorFlow
      • +
      +

      Step 1

      + +

      In Cloud Datalab, click on the Home icon, and then navigate to training-data-analyst/courses/machine_learning/tensorflow and open a_tfstart.ipynb

      + +

      Step 2

      + +

      In Datalab, click on Clear | All Cells. Now read the narrative and execute each cell in turn.

      + +

      2b. Machine Learning using tf.learn

      + +

      Duration is 15 min

      + +

      In this lab, you will implement a simple machine learning model using tf.learn:

      +
      • Read .csv data into a Pandas dataframe
      • +
      • Implement a Linear Regression model in TensorFlow
      • +
      • Train the model
      • +
      • Evaluate the model
      • +
      • Predict with the model
      • +
      • Repeat with a Deep Neural Network model in TensorFlow
      • +
      +

      Step 1

      + +

      In Cloud Datalab, click on the Home icon, and then navigate to training-data-analyst/courses/machine_learning/tensorflow and open b_tflearn.ipynb

      + +

      Step 2

      + +

      In Datalab, click on Clear | All Cells. Now read the narrative and execute each cell in turn.

      + +

      2c. TensorFlow on Big Data

      + +

      Duration is 15 min

      + +

      In this lab, you will learn how to:

      +
      • Read from a potentially large file in batches
      • +
      • Do a wildcard match on filenames
      • +
      • Break the one-to-one relationship between inputs and features
      • +
      +

      Step 1

      + +

      In Cloud Datalab, click on the Home icon, and then navigate to training-data-analyst/courses/machine_learning/tensorflow and open__ c_batched.ipynb__.

      + +

      Step 2

      + +

      In Datalab, click on Clear | All Cells. Now read the narrative and execute each cell in turn.

      + +

      2d. Refactor for Distributed training and monitoring

      + +

      Duration is 15 min

      + +

      In this lab, you will learn how to:

      +
      • Use the Experiment class
      • +
      • Monitor training using TensorBoard
      • +
      +

      Step 1

      + +

      In Cloud Datalab, click on the Home icon, and then navigate to training-data-analyst/courses/machine_learning/tensorflow and open d_experiment.ipynb.

      + +

      Step 2

      + +

      In Datalab, click on Clear | All Cells. Now read the narrative and execute each cell in turn.

      + +

      3. Getting Started with Cloud ML Engine

      + +

      Duration is 30 min

      + +

      In this lab, you will learn how to:

      +
      • Package up TensorFlow model
      • +
      • Run training locally
      • +
      • Run training on cloud
      • +
      • Deploy model to cloud
      • +
      • Invoke model to carry out predictions
      • +
      +

      Step 1

      + +

      If you don't already have a bucket on Cloud Storage, create one from the Storage section of the GCP console. Bucket names have to be globally unique.

      + +

      Step 2

      + +

      In Cloud Datalab, click on the Home icon, and then navigate to training-data-analyst/courses/machine_learning/cloudmle and open__ cloudmle.ipynb__.

      + +

      Step 3

      + +

      In Datalab, click on Clear | All Cells. Now read the narrative and execute each cell in turn.

      + +

      4. Feature Engineering

      + +

      Duration is 30 min

      + +

      In this lab, you will improve the ML model using feature engineering. In the process, you will learn how to:

      +
      • Work with feature columns
      • +
      • Add feature crosses in TensorFlow
      • +
      • Read data from BigQuery
      • +
      • Create datasets using Dataflow
      • +
      • Use a wide-and-deep model
      • +
      +

      Step 1

      + +

      In Cloud Datalab, click on the Home icon, and then navigate to training-data-analyst/courses/machine_learning/feateng and open__ feateng.ipynb__.

      + +

      Step 2

      + +

      In Datalab, click on Clear | All Cells. Now read the narrative and execute each cell in turn.

      + +

      Your instructor will demo notebooks that contain hyper-parameter tuning and training on 500 million rows of data. The changes to the model are minor -- essentially just command-line parameters, but the impact on model accuracy is huge:

      + +

      21d055d73bf7974e.png

      + +

      ©Google, Inc. or its affiliates. All rights reserved. Do not distribute.

      + +

      Provide Feedback on this Lab

      + +
      + + + +
      +
      + +
      +
      +× +
      +
      +
      +
      + +
      + +
      +
      + +
      + + + + + + + + + +
      +
      + + +
      + + +");d=e.children()[0];b("body").append(e);a=d.offsetWidth;e.css("overflow","scroll");d=d.offsetWidth; +a===d&&(d=e[0].clientWidth);e.remove();return c=a-d},getScrollInfo:function(a){var c=a.isWindow||a.isDocument?"":a.element.css("overflow-x"),d=a.isWindow||a.isDocument?"":a.element.css("overflow-y"),c="scroll"===c||"auto"===c&&a.widthd?"left":0h?"top":0f(g(e),g(h))?l.important="horizontal":l.important="vertical";c.using.call(this,a,l)});m.offset(b.extend(R,{using:l}))})};b.ui.position={fit:{left:function(a,b){var c=b.within,d=c.isWindow?c.scrollLeft:c.offset.left,e=c.width,h=a.left-b.collisionPosition.marginLeft,c=d-h,l=h+b.collisionWidth-e-d;b.collisionWidth> +e?0=l?(d=a.left+c+b.collisionWidth-e-d,a.left+=c-d):a.left=0=c?d:c>l?d+e-b.collisionWidth:d:a.left=0e?0=l?(d=a.top+c+b.collisionHeight-e-d,a.top+=c-d):a.top=0=c?d:c>l?d+e-b.collisionHeight:d:a.top=0c){if(d=a.left+h+m+p+b.collisionWidth-e-d,0>d||dc){if(d=a.top+h+m+p+b.collisionHeight-e-d,0>d||dd;a.innerHTML="";c.removeChild(a)})()})();return b.ui.position}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./widget","./position"],b):b(jQuery)})(function(b){return b.widget("ui.menu",{version:"1.11.4",defaultElement:"
      ":""):"");L+=J}E+=L}a._keyEvent=!1;return E+g},_generateMonthYearHeader:function(a,b,c,d,e,f,g,u){var w,B,x,D=this._get(a,"changeMonth"),y=this._get(a,"changeYear"),H=this._get(a,"showMonthAfterYear"), +E="
      ",A="";if(f||!D)A+=""+g[b]+"";else{g=d&&d.getFullYear()===c;w=e&&e.getFullYear()===c;A+=""}H||(E+=A+(!f&&D&&y?"":" "));if(!a.yearshtml)if(a.yearshtml="",f||!y)E+=""+ +c+"";else{u=this._get(a,"yearRange").split(":");x=(new Date).getFullYear();g=function(a){a=a.match(/c[+\-].*/)?c+parseInt(a.substring(1),10):a.match(/[+\-].*/)?x+parseInt(a,10):parseInt(a,10);return isNaN(a)?x:a};b=g(u[0]);u=Math.max(b,g(u[1]||""));b=d?Math.max(b,d.getFullYear()):b;u=e?Math.min(u,e.getFullYear()):u;for(a.yearshtml+="";E+=a.yearshtml;a.yearshtml=null}E+=this._get(a,"yearSuffix");H&&(E+=(!f&&D&&y?"":" ")+A);return E+"
      "},_adjustInstDate:function(a,b,c){var d=a.drawYear+("Y"===c?b:0),e=a.drawMonth+("M"===c?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+("D"===c?b:0);d=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,b)));a.selectedDay=d.getDate();a.drawMonth=a.selectedMonth=d.getMonth();a.drawYear=a.selectedYear=d.getFullYear();"M"!== +c&&"Y"!==c||this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),c=c&&bd?d:c},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return null==a?[1,1]:"number"===typeof a?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)}, +_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,d+(0>b?b:e[0]*e[1]),1));0>b&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c,d,e=this._getMinMaxDate(a,"min"),f=this._getMinMaxDate(a,"max"),g=null,u=null;if(c= +this._get(a,"yearRange"))c=c.split(":"),d=(new Date).getFullYear(),g=parseInt(c[0],10),u=parseInt(c[1],10),c[0].match(/[+\-].*/)&&(g+=d),c[1].match(/[+\-].*/)&&(u+=d);return(!e||b.getTime()>=e.getTime())&&(!f||b.getTime()<=f.getTime())&&(!g||b.getFullYear()>=g)&&(!u||b.getFullYear()<=u)},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff"),b="string"!==typeof b?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a, +"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);b=b?"object"===typeof b?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});b.fn.datepicker=function(a){if(!this.length)return this; +b.datepicker.initialized||(b(document).mousedown(b.datepicker._checkExternalClick),b.datepicker.initialized=!0);0===b("#"+b.datepicker._mainDivId).length&&b("body").append(b.datepicker.dpDiv);var c=Array.prototype.slice.call(arguments,1);return"string"===typeof a&&("isDisabled"===a||"getDate"===a||"widget"===a)||"option"===a&&2===arguments.length&&"string"===typeof arguments[1]?b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(c)):this.each(function(){"string"===typeof a?b.datepicker["_"+ +a+"Datepicker"].apply(b.datepicker,[this].concat(c)):b.datepicker._attachDatepicker(this,a)})};b.datepicker=new d;b.datepicker.initialized=!1;b.datepicker.uuid=(new Date).getTime();b.datepicker.version="1.11.4";return b.datepicker}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./widget"],b):b(jQuery)})(function(b){var a=!1;b(document).mouseup(function(){a=!1});return b.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(c){if(!0===b.data(c.target,a.widgetName+".preventClickEvent"))return b.removeData(c.target, +a.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(d){if(!a){this._mouseMoved=!1;this._mouseStarted&&this._mouseUp(d);this._mouseDownEvent=d;var c=this,e=1===d.which,f="string"===typeof this.options.cancel&&d.target.nodeName? +b(d.target).closest(this.options.cancel).length:!1;if(!e||f||!this._mouseCapture(d))return!0;this.mouseDelayMet=!this.options.delay;this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)&&(this._mouseStarted=!1!==this._mouseStart(d),!this._mouseStarted))return d.preventDefault(),!0;!0===b.data(d.target,this.widgetName+".preventClickEvent")&&b.removeData(d.target,this.widgetName+".preventClickEvent"); +this._mouseMoveDelegate=function(a){return c._mouseMove(a)};this._mouseUpDelegate=function(a){return c._mouseUp(a)};this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);d.preventDefault();return a=!0}},_mouseMove:function(a){if(this._mouseMoved&&(b.ui.ie&&(!document.documentMode||9>document.documentMode)&&!a.button||!a.which))return this._mouseUp(a);if(a.which||a.button)this._mouseMoved=!0;if(this._mouseStarted)return this._mouseDrag(a), +a.preventDefault();this._mouseDistanceMet(a)&&this._mouseDelayMet(a)&&((this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,a))?this._mouseDrag(a):this._mouseUp(a));return!this._mouseStarted},_mouseUp:function(d){this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);this._mouseStarted&&(this._mouseStarted=!1,d.target===this._mouseDownEvent.target&&b.data(d.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(d)); +return a=!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],b):b(jQuery)})(function(b){b.widget("ui.draggable",b.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both", +snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative();this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._setHandleClassName();this._mouseInit()},_setOption:function(a,b){this._super(a,b);"handle"===a&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")? +this.destroyOnClear=!0:(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(a){var d=this.options;this._blurActiveElement(a);if(this.helper||d.disabled||0").css("position","absolute").appendTo(a.parent()).outerWidth(a.outerWidth()).outerHeight(a.outerHeight()).offset(a.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(a){var d=this.document[0];if(this.handleElement.is(a.target))try{d.activeElement&&"body"!==d.activeElement.nodeName.toLowerCase()&&b(d.activeElement).blur()}catch(c){}},_mouseStart:function(a){var d=this.options;this.helper= +this._createHelper(a);this.helper.addClass("ui-draggable-dragging");this._cacheHelperProportions();b.ui.ddmanager&&(b.ui.ddmanager.current=this);this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent(!0);this.offsetParent=this.helper.offsetParent();this.hasFixedAncestor=0c[2]&&(f=c[2]+this.offset.click.left),a.pageY-this.offset.click.top>c[3]&&(e=c[3]+this.offset.click.top)),g.grid&&(e=g.grid[1]?this.originalPageY+Math.round((e-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY,e=c?e-this.offset.click.top>=c[1]||e-this.offset.click.top>c[3]?e:e-this.offset.click.top>=c[1]?e-g.grid[1]:e+g.grid[1]:e,f=g.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/g.grid[0])*g.grid[0]:this.originalPageX, +f=c?f-this.offset.click.left>=c[0]||f-this.offset.click.left>c[2]?f:f-this.offset.click.left>=c[0]?f-g.grid[0]:f+g.grid[0]:f),"y"===g.axis&&(f=this.originalPageX),"x"===g.axis&&(e=this.originalPageY));return{top:e-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:h?0: +this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove();this.helper=null;this.cancelHelperRemoval=!1;this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto"));"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()), +this.helper.css("bottom","auto"))},_trigger:function(a,d,c){c=c||this._uiHash();b.ui.plugin.call(this,a,[d,c,this],!0);/^(drag|start|stop)/.test(a)&&(this.positionAbs=this._convertPositionTo("absolute"),c.offset=this.positionAbs);return b.Widget.prototype._trigger.call(this,a,d,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});b.ui.plugin.add("draggable","connectToSortable",{start:function(a,d,c){var e= +b.extend({},d,{item:c.element});c.sortables=[];b(c.options.connectToSortable).each(function(){var d=b(this).sortable("instance");d&&!d.options.disabled&&(c.sortables.push(d),d.refreshPositions(),d._trigger("activate",a,e))})},stop:function(a,d,c){var e=b.extend({},d,{item:c.element});c.cancelHelperRemoval=!1;b.each(c.sortables,function(){this.isOver?(this.isOver=0,c.cancelHelperRemoval=!0,this.cancelHelperRemoval=!1,this._storedCSS={position:this.placeholder.css("position"),top:this.placeholder.css("top"), +left:this.placeholder.css("left")},this._mouseStop(a),this.options.helper=this.options._helper):(this.cancelHelperRemoval=!0,this._trigger("deactivate",a,e))})},drag:function(a,d,c){b.each(c.sortables,function(){var e=!1,f=this;f.positionAbs=c.positionAbs;f.helperProportions=c.helperProportions;f.offset.click=c.offset.click;f._intersectsWith(f.containerCache)&&(e=!0,b.each(c.sortables,function(){this.positionAbs=c.positionAbs;this.helperProportions=c.helperProportions;this.offset.click=c.offset.click; +this!==f&&this._intersectsWith(this.containerCache)&&b.contains(f.element[0],this.element[0])&&(e=!1);return e}));e?(f.isOver||(f.isOver=1,c._parent=d.helper.parent(),f.currentItem=d.helper.appendTo(f.element).data("ui-sortable-item",!0),f.options._helper=f.options.helper,f.options.helper=function(){return d.helper[0]},a.target=f.currentItem[0],f._mouseCapture(a,!0),f._mouseStart(a,!0,!0),f.offset.click.top=c.offset.click.top,f.offset.click.left=c.offset.click.left,f.offset.parent.left-=c.offset.parent.left- +f.offset.parent.left,f.offset.parent.top-=c.offset.parent.top-f.offset.parent.top,c._trigger("toSortable",a),c.dropped=f.element,b.each(c.sortables,function(){this.refreshPositions()}),c.currentItem=c.element,f.fromOutside=c),f.currentItem&&(f._mouseDrag(a),d.position=f.position)):f.isOver&&(f.isOver=0,f.cancelHelperRemoval=!0,f.options._revert=f.options.revert,f.options.revert=!1,f._trigger("out",a,f._uiHash(f)),f._mouseStop(a,!0),f.options.revert=f.options._revert,f.options.helper=f.options._helper, +f.placeholder&&f.placeholder.remove(),d.helper.appendTo(c._parent),c._refreshOffsets(a),d.position=c._generatePosition(a,!0),c._trigger("fromSortable",a),c.dropped=!1,b.each(c.sortables,function(){this.refreshPositions()}))})}});b.ui.plugin.add("draggable","cursor",{start:function(a,d,c){a=b("body");c=c.options;a.css("cursor")&&(c._cursor=a.css("cursor"));a.css("cursor",c.cursor)},stop:function(a,d,c){a=c.options;a._cursor&&b("body").css("cursor",a._cursor)}});b.ui.plugin.add("draggable","opacity", +{start:function(a,d,c){a=b(d.helper);c=c.options;a.css("opacity")&&(c._opacity=a.css("opacity"));a.css("opacity",c.opacity)},stop:function(a,d,c){a=c.options;a._opacity&&b(d.helper).css("opacity",a._opacity)}});b.ui.plugin.add("draggable","scroll",{start:function(a,b,c){c.scrollParentNotHidden||(c.scrollParentNotHidden=c.helper.scrollParent(!1));c.scrollParentNotHidden[0]!==c.document[0]&&"HTML"!==c.scrollParentNotHidden[0].tagName&&(c.overflowOffset=c.scrollParentNotHidden.offset())},drag:function(a, +d,c){d=c.options;var e=!1,f=c.scrollParentNotHidden[0],g=c.document[0];f!==g&&"HTML"!==f.tagName?(d.axis&&"x"===d.axis||(c.overflowOffset.top+f.offsetHeight-a.pageYm+w||yn+w||!b.contains(c.snapElements[q].item.ownerDocument,c.snapElements[q].item)?(c.snapElements[q].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,a,b.extend(c._uiHash(),{snapItem:c.snapElements[q].item})),c.snapElements[q].snapping= +!1):("inner"!==u.snapMode&&(e=Math.abs(p-y)<=w,f=Math.abs(n-D)<=w,g=Math.abs(l-x)<=w,h=Math.abs(m-B)<=w,e&&(d.position.top=c._convertPositionTo("relative",{top:p-c.helperProportions.height,left:0}).top),f&&(d.position.top=c._convertPositionTo("relative",{top:n,left:0}).top),g&&(d.position.left=c._convertPositionTo("relative",{top:0,left:l-c.helperProportions.width}).left),h&&(d.position.left=c._convertPositionTo("relative",{top:0,left:m}).left)),r=e||f||g||h,"outer"!==u.snapMode&&(e=Math.abs(p-D)<= +w,f=Math.abs(n-y)<=w,g=Math.abs(l-B)<=w,h=Math.abs(m-x)<=w,e&&(d.position.top=c._convertPositionTo("relative",{top:p,left:0}).top),f&&(d.position.top=c._convertPositionTo("relative",{top:n-c.helperProportions.height,left:0}).top),g&&(d.position.left=c._convertPositionTo("relative",{top:0,left:l}).left),h&&(d.position.left=c._convertPositionTo("relative",{top:0,left:m-c.helperProportions.width}).left)),!c.snapElements[q].snapping&&(e||f||g||h||r)&&c.options.snap.snap&&c.options.snap.snap.call(c.element, +a,b.extend(c._uiHash(),{snapItem:c.snapElements[q].item})),c.snapElements[q].snapping=e||f||g||h||r)}});b.ui.plugin.add("draggable","stack",{start:function(a,d,c){var e;a=b.makeArray(b(c.options.stack)).sort(function(a,c){return(parseInt(b(a).css("zIndex"),10)||0)-(parseInt(b(c).css("zIndex"),10)||0)});a.length&&(e=parseInt(b(a[0]).css("zIndex"),10)||0,b(a).each(function(a){b(this).css("zIndex",e+a)}),this.css("zIndex",e+a.length))}});b.ui.plugin.add("draggable","zIndex",{start:function(a,d,c){a= +b(d.helper);c=c.options;a.css("zIndex")&&(c._zIndex=a.css("zIndex"));a.css("zIndex",c.zIndex)},stop:function(a,d,c){a=c.options;a._zIndex&&b(d.helper).css("zIndex",a._zIndex)}});return b.ui.draggable}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],b):b(jQuery)})(function(b){b.widget("ui.resizable",b.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(a){return parseInt(a, +10)||0},_isNumber:function(a){return!isNaN(parseInt(a,10))},_hasScroll:function(a,d){if("hidden"===b(a).css("overflow"))return!1;var c=d&&"left"===d?"scrollLeft":"scrollTop",e=!1;if(0").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"), +marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}), +this._proportionallyResize());this.handles=h.handles||(b(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");this._handles=b();if(this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),a=this.handles.split(","),this.handles={},d=0;d"),e.css({zIndex:h.zIndex}),"se"===c&&e.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[c]=".ui-resizable-"+c,this.element.append(e);this._renderAxis=function(a){var c,d,e;a=a||this.element;for(c in this.handles){if(this.handles[c].constructor===String)this.handles[c]=this.element.children(this.handles[c]).first().show();else if(this.handles[c].jquery||this.handles[c].nodeType)this.handles[c]=b(this.handles[c]),this._on(this.handles[c],{mousedown:g._mouseDown});this.elementIsWrapper&& +this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(d=b(this.handles[c],this.element),e=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth(),d=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join(""),a.css(d,e),this._proportionallyResize());this._handles=this._handles.add(this.handles[c])}};this._renderAxis(this.element);this._handles=this._handles.add(this.element.find(".ui-resizable-handle"));this._handles.disableSelection(); +this._handles.mouseover(function(){g.resizing||(this.className&&(e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),g.axis=e&&e[1]?e[1]:"se")});h.autoHide&&(this._handles.hide(),b(this.element).addClass("ui-resizable-autohide").mouseenter(function(){h.disabled||(b(this).removeClass("ui-resizable-autohide"),g._handles.show())}).mouseleave(function(){h.disabled||g.resizing||(b(this).addClass("ui-resizable-autohide"),g._handles.hide())}));this._mouseInit()},_destroy:function(){this._mouseDestroy(); +var a,d=function(a){b(a).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};this.elementIsWrapper&&(d(this.element),a=this.element,this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")}).insertAfter(a),a.remove());this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement); +return this},_mouseCapture:function(a){var d,c,e=!1;for(d in this.handles)if(c=b(this.handles[d])[0],c===a.target||b.contains(c,a.target))e=!0;return!this.options.disabled&&e},_mouseStart:function(a){var d,c,e=this.options,f=this.element;this.resizing=!0;this._renderProxy();d=this._num(this.helper.css("left"));c=this._num(this.helper.css("top"));e.containment&&(d+=b(e.containment).scrollLeft()||0,c+=b(e.containment).scrollTop()||0);this.offset=this.helper.offset();this.position={left:d,top:c};this.size= +this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:f.width(),height:f.height()};this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()};this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()};this.originalPosition={left:d,top:c};this.originalMousePosition={left:a.pageX,top:a.pageY};this.aspectRatio="number"===typeof e.aspectRatio?e.aspectRatio:this.originalSize.width/this.originalSize.height|| +1;d=b(".ui-resizable-"+this.axis).css("cursor");b("body").css("cursor","auto"===d?this.axis+"-resize":d);f.addClass("ui-resizable-resizing");this._propagate("start",a);return!0},_mouseDrag:function(a){var d,c=this.originalMousePosition;d=a.pageX-c.left||0;var c=a.pageY-c.top||0,e=this._change[this.axis];this._updatePrevProperties();if(!e)return!1;d=e.apply(this,[a,d,c]);this._updateVirtualBoundaries(a.shiftKey);if(this._aspectRatio||a.shiftKey)d=this._updateRatio(d,a);d=this._respectSize(d,a);this._updateCache(d); +this._propagate("resize",a);d=this._applyChanges();!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();b.isEmptyObject(d)||(this._updatePrevProperties(),this._trigger("resize",a,this.ui()),this._applyChanges());return!1},_mouseStop:function(a){this.resizing=!1;var d,c,e,f=this.options;this._helper&&(d=this._proportionallyResizeElements,d=(c=d.length&&/textarea/i.test(d[0].nodeName))&&this._hasScroll(d[0],"left")?0:this.sizeDiff.height,c=c?0:this.sizeDiff.width,c= +{width:this.helper.width()-c,height:this.helper.height()-d},d=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null,e=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null,f.animate||this.element.css(b.extend(c,{top:e,left:d})),this.helper.height(this.size.height),this.helper.width(this.size.width),this._helper&&!f.animate&&this._proportionallyResize());b("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing"); +this._propagate("stop",a);this._helper&&this.helper.remove();return!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left};this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var a={};this.position.top!==this.prevPosition.top&&(a.top=this.position.top+"px");this.position.left!==this.prevPosition.left&&(a.left=this.position.left+"px");this.size.width!==this.prevSize.width&&(a.width=this.size.width+"px");this.size.height!== +this.prevSize.height&&(a.height=this.size.height+"px");this.helper.css(a);return a},_updateVirtualBoundaries:function(a){var b,c,e,f;f=this.options;f={minWidth:this._isNumber(f.minWidth)?f.minWidth:0,maxWidth:this._isNumber(f.maxWidth)?f.maxWidth:Infinity,minHeight:this._isNumber(f.minHeight)?f.minHeight:0,maxHeight:this._isNumber(f.maxHeight)?f.maxHeight:Infinity};if(this._aspectRatio||a)a=f.minHeight*this.aspectRatio,c=f.minWidth/this.aspectRatio,b=f.maxHeight*this.aspectRatio,e=f.maxWidth/this.aspectRatio, +a>f.minWidth&&(f.minWidth=a),c>f.minHeight&&(f.minHeight=c),ba.width,h=this._isNumber(a.height)&&b.minHeight&& +b.minHeight>a.height,l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,p=/sw|nw|w/.test(c),c=/nw|ne|n/.test(c);g&&(a.width=b.minWidth);h&&(a.height=b.minHeight);e&&(a.width=b.maxWidth);f&&(a.height=b.maxHeight);g&&p&&(a.left=l-b.minWidth);e&&p&&(a.left=l-b.maxWidth);h&&c&&(a.top=m-b.minHeight);f&&c&&(a.top=m-b.maxHeight);a.width||a.height||a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null;return a},_getPaddingPlusBorderDimensions:function(a){var b= +0,c=[],e=[a.css("borderTopWidth"),a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")];for(a=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];4>b;b++)c[b]=parseInt(e[b],10)||0,c[b]+=parseInt(a[b],10)||0;return{height:c[0]+c[2],width:c[1]+c[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var a,b=0,c=this.helper||this.element;b"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+ +"px",top:this.elementOffset.top+"px",zIndex:++a.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){return{left:this.originalPosition.left+b,width:this.originalSize.width-b}},n:function(a,b,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(a,d,c){return b.extend(this._change.s.apply(this, +arguments),this._change.e.apply(this,[a,d,c]))},sw:function(a,d,c){return b.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[a,d,c]))},ne:function(a,d,c){return b.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[a,d,c]))},nw:function(a,d,c){return b.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[a,d,c]))}},_propagate:function(a,d){b.ui.plugin.call(this,a,[d,this.ui()]);"resize"!==a&&this._trigger(a,d,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement, +element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});b.ui.plugin.add("resizable","animate",{stop:function(a){var d=b(this).resizable("instance"),c=d.options,e=d._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&d._hasScroll(e[0],"left")?0:d.sizeDiff.height,f={width:d.size.width-(f?0:d.sizeDiff.width),height:d.size.height-g},g=parseInt(d.element.css("left"),10)+(d.position.left- +d.originalPosition.left)||null,h=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;d.element.animate(b.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var c={width:parseInt(d.element.css("width"),10),height:parseInt(d.element.css("height"),10),top:parseInt(d.element.css("top"),10),left:parseInt(d.element.css("left"),10)};e&&e.length&&b(e[0]).css({width:c.width,height:c.height});d._updateCache(c);d._propagate("resize", +a)}})}});b.ui.plugin.add("resizable","containment",{start:function(){var a,d,c,e,f,g=b(this).resizable("instance"),h=g.element;c=g.options.containment;if(h=c instanceof b?c.get(0):/parent/.test(c)?h.parent().get(0):c)g.containerElement=b(h),/document/.test(c)||c===document?(g.containerOffset={left:0,top:0},g.containerPosition={left:0,top:0},g.parentData={element:b(document),left:0,top:0,width:b(document).width(),height:b(document).height()||document.body.parentNode.scrollHeight}):(a=b(h),d=[],b(["Top", +"Right","Left","Bottom"]).each(function(b,c){d[b]=g._num(a.css("padding"+c))}),g.containerOffset=a.offset(),g.containerPosition=a.position(),g.containerSize={height:a.innerHeight()-d[3],width:a.innerWidth()-d[1]},c=g.containerOffset,e=g.containerSize.height,f=g.containerSize.width,f=g._hasScroll(h,"left")?h.scrollWidth:f,e=g._hasScroll(h)?h.scrollHeight:e,g.parentData={element:h,left:c.left,top:c.top,width:f,height:e})},resize:function(a){var d,c,e,f=b(this).resizable("instance");d=f.options;c=f.containerOffset; +e=f.position;a=f._aspectRatio||a.shiftKey;var g={top:0,left:0},h=f.containerElement,l=!0;h[0]!==document&&/static/.test(h.css("position"))&&(g=c);e.left<(f._helper?c.left:0)&&(f.size.width+=f._helper?f.position.left-c.left:f.position.left-g.left,a&&(f.size.height=f.size.width/f.aspectRatio,l=!1),f.position.left=d.helper?c.left:0);e.top<(f._helper?c.top:0)&&(f.size.height+=f._helper?f.position.top-c.top:f.position.top,a&&(f.size.width=f.size.height*f.aspectRatio,l=!1),f.position.top=f._helper?c.top: +0);d=f.containerElement.get(0)===f.element.parent().get(0);e=/relative|absolute/.test(f.containerElement.css("position"));d&&e?(f.offset.left=f.parentData.left+f.position.left,f.offset.top=f.parentData.top+f.position.top):(f.offset.left=f.element.offset().left,f.offset.top=f.element.offset().top);d=Math.abs(f.sizeDiff.width+(f._helper?f.offset.left-g.left:f.offset.left-c.left));c=Math.abs(f.sizeDiff.height+(f._helper?f.offset.top-g.top:f.offset.top-c.top));d+f.size.width>=f.parentData.width&&(f.size.width= +f.parentData.width-d,a&&(f.size.height=f.size.width/f.aspectRatio,l=!1));c+f.size.height>=f.parentData.height&&(f.size.height=f.parentData.height-c,a&&(f.size.width=f.size.height*f.aspectRatio,l=!1));l||(f.position.left=f.prevPosition.left,f.position.top=f.prevPosition.top,f.size.width=f.prevSize.width,f.size.height=f.prevSize.height)},stop:function(){var a=b(this).resizable("instance"),d=a.options,c=a.containerOffset,e=a.containerPosition,f=a.containerElement,g=b(a.helper),h=g.offset(),l=g.outerWidth()- +a.sizeDiff.width,g=g.outerHeight()-a.sizeDiff.height;a._helper&&!d.animate&&/relative/.test(f.css("position"))&&b(this).css({left:h.left-e.left-c.left,width:l,height:g});a._helper&&!d.animate&&/static/.test(f.css("position"))&&b(this).css({left:h.left-e.left-c.left,width:l,height:g})}});b.ui.plugin.add("resizable","alsoResize",{start:function(){var a=b(this).resizable("instance").options;b(a.alsoResize).each(function(){var a=b(this);a.data("ui-resizable-alsoresize",{width:parseInt(a.width(),10),height:parseInt(a.height(), +10),left:parseInt(a.css("left"),10),top:parseInt(a.css("top"),10)})})},resize:function(a,d){var c=b(this).resizable("instance"),e=c.originalSize,f=c.originalPosition,g={height:c.size.height-e.height||0,width:c.size.width-e.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0};b(c.options.alsoResize).each(function(){var a=b(this),c=b(this).data("ui-resizable-alsoresize"),e={},f=a.parents(d.originalElement[0]).length?["width","height"]:["width","height","top","left"];b.each(f,function(a, +b){var d=(c[b]||0)+(g[b]||0);d&&0<=d&&(e[b]=d||null)});a.css(e)})},stop:function(){b(this).removeData("resizable-alsoresize")}});b.ui.plugin.add("resizable","ghost",{start:function(){var a=b(this).resizable("instance"),d=a.options,c=a.size;a.ghost=a.originalElement.clone();a.ghost.css({opacity:.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"===typeof d.ghost?d.ghost:"");a.ghost.appendTo(a.helper)},resize:function(){var a= +b(this).resizable("instance");a.ghost&&a.ghost.css({position:"relative",height:a.size.height,width:a.size.width})},stop:function(){var a=b(this).resizable("instance");a.ghost&&a.helper&&a.helper.get(0).removeChild(a.ghost.get(0))}});b.ui.plugin.add("resizable","grid",{resize:function(){var a,d=b(this).resizable("instance"),c=d.options,e=d.size,f=d.originalSize,g=d.originalPosition,h=d.axis,l="number"===typeof c.grid?[c.grid,c.grid]:c.grid,m=l[0]||1,p=l[1]||1,n=Math.round((e.width-f.width)/m)*m,e= +Math.round((e.height-f.height)/p)*p,q=f.width+n,r=f.height+e,u=c.maxWidth&&c.maxWidthq,x=c.minHeight&&c.minHeight>r;c.grid=l;B&&(q+=m);x&&(r+=p);u&&(q-=m);w&&(r-=p);if(/^(se|s|e)$/.test(h))d.size.width=q,d.size.height=r;else if(/^(ne)$/.test(h))d.size.width=q,d.size.height=r,d.position.top=g.top-e;else if(/^(sw)$/.test(h))d.size.width=q,d.size.height=r,d.position.left=g.left-n;else{if(0>=r-p||0>=q-m)a=d._getPaddingPlusBorderDimensions(this); +0d&&b(this).css("top",a.top-d)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width, +minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;this._createWrapper();this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog);this._createTitlebar();this._createButtonPane(); +this.options.draggable&&b.fn.draggable&&this._makeDraggable();this.options.resizable&&b.fn.resizable&&this._makeResizable();this._isOpen=!1;this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var a=this.options.appendTo;return a&&(a.jquery||a.nodeType)?b(a):this.document.find(a||"body").eq(0)},_destroy:function(){var a,b=this.originalPosition;this._untrackInstance();this._destroyOverlay();this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(); +this.uiDialog.stop(!0,!0).remove();this.originalTitle&&this.element.attr("title",this.originalTitle);a=b.parent.children().eq(b.index);a.length&&a[0]!==this.element[0]?a.before(this.element):b.parent.append(this.element)},widget:function(){return this.uiDialog},disable:b.noop,enable:b.noop,close:function(a){var d,c=this;if(this._isOpen&&!1!==this._trigger("beforeClose",a)){this._isOpen=!1;this._focusedElement=null;this._destroyOverlay();this._untrackInstance();if(!this.opener.filter(":focusable").focus().length)try{(d= +this.document[0].activeElement)&&"body"!==d.nodeName.toLowerCase()&&b(d).blur()}catch(e){}this._hide(this.uiDialog,this.options.hide,function(){c._trigger("close",a)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(a,d){var c=!1,e=this.uiDialog.siblings(".ui-front:visible").map(function(){return+b(this).css("z-index")}).get(),e=Math.max.apply(null,e);e>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",e+1),c=!0);c&&!d&&this._trigger("focus", +a);return c},open:function(){var a=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=b(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){a._focusTabbable();a._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var a=this._focusedElement; +a||(a=this.element.find("[autofocus]"));a.length||(a=this.element.find(":tabbable"));a.length||(a=this.uiDialogButtonPane.find(":tabbable"));a.length||(a=this.uiDialogTitlebarClose.filter(":tabbable"));a.length||(a=this.uiDialog);a.eq(0).focus()},_keepFocus:function(a){function d(){var a=this.document[0].activeElement;this.uiDialog[0]===a||b.contains(this.uiDialog[0],a)||this._focusTabbable()}a.preventDefault();d.call(this);this._delay(d)},_createWrapper:function(){this.uiDialog=b("
      ").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+ +this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo());this._on(this.uiDialog,{keydown:function(a){if(this.options.closeOnEscape&&!a.isDefaultPrevented()&&a.keyCode&&a.keyCode===b.ui.keyCode.ESCAPE)a.preventDefault(),this.close(a);else if(a.keyCode===b.ui.keyCode.TAB&&!a.isDefaultPrevented()){var d=this.uiDialog.find(":tabbable"),c=d.filter(":first"),e=d.filter(":last");a.target!==e[0]&&a.target!==this.uiDialog[0]||a.shiftKey?a.target!==c[0]&&a.target!==this.uiDialog[0]|| +!a.shiftKey||(this._delay(function(){e.focus()}),a.preventDefault()):(this._delay(function(){c.focus()}),a.preventDefault())}},mousedown:function(a){this._moveToTop(a)&&this._focusTabbable()}});this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var a;this.uiDialogTitlebar=b("
      ").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog);this._on(this.uiDialogTitlebar, +{mousedown:function(a){b(a.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}});this.uiDialogTitlebarClose=b("").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar);this._on(this.uiDialogTitlebarClose,{click:function(a){a.preventDefault();this.close(a)}});a=b("").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar);this._title(a); +this.uiDialog.attr({"aria-labelledby":a.attr("id")})},_title:function(a){this.options.title||a.html(" ");a.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=b("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiButtonSet=b("
      ").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane);this._createButtons()},_createButtons:function(){var a=this,d=this.options.buttons;this.uiDialogButtonPane.remove();this.uiButtonSet.empty(); +b.isEmptyObject(d)||b.isArray(d)&&!d.length?this.uiDialog.removeClass("ui-dialog-buttons"):(b.each(d,function(c,d){var f,g;d=b.isFunction(d)?{click:d,text:c}:d;d=b.extend({type:"button"},d);f=d.click;d.click=function(){f.apply(a.element[0],arguments)};g={icons:d.icons,text:d.showText};delete d.icons;delete d.showText;b("",d).button(g).appendTo(a.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function a(a){return{position:a.position, +offset:a.offset}}var d=this,c=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(c,f){b(this).addClass("ui-dialog-dragging");d._blockFrames();d._trigger("dragStart",c,a(f))},drag:function(b,c){d._trigger("drag",b,a(c))},stop:function(e,f){var g=f.offset.left-d.document.scrollLeft(),h=f.offset.top-d.document.scrollTop();c.position={my:"left top",at:"left"+(0<=g?"+":"")+g+" top"+(0<=h?"+":"")+ +h,of:d.window};b(this).removeClass("ui-dialog-dragging");d._unblockFrames();d._trigger("dragStop",e,a(f))}})},_makeResizable:function(){function a(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}var d=this,c=this.options,e=c.resizable,f=this.uiDialog.css("position"),e="string"===typeof e?e:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:c.maxWidth,maxHeight:c.maxHeight, +minWidth:c.minWidth,minHeight:this._minHeight(),handles:e,start:function(c,e){b(this).addClass("ui-dialog-resizing");d._blockFrames();d._trigger("resizeStart",c,a(e))},resize:function(b,c){d._trigger("resize",b,a(c))},stop:function(e,f){var l=d.uiDialog.offset(),m=l.left-d.document.scrollLeft(),l=l.top-d.document.scrollTop();c.height=d.uiDialog.height();c.width=d.uiDialog.width();c.position={my:"left top",at:"left"+(0<=m?"+":"")+m+" top"+(0<=l?"+":"")+l,of:d.window};b(this).removeClass("ui-dialog-resizing"); +d._unblockFrames();d._trigger("resizeStop",e,a(f))}}).css("position",f)},_trackFocus:function(){this._on(this.widget(),{focusin:function(a){this._makeFocusTarget();this._focusedElement=b(a.target)}})},_makeFocusTarget:function(){this._untrackInstance();this._trackingInstances().unshift(this)},_untrackInstance:function(){var a=this._trackingInstances(),d=b.inArray(this,a);-1!==d&&a.splice(d,1)},_trackingInstances:function(){var a=this.document.data("ui-dialog-instances");a||(a=[],this.document.data("ui-dialog-instances", +a));return a},_minHeight:function(){var a=this.options;return"auto"===a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(){var a=this.uiDialog.is(":visible");a||this.uiDialog.show();this.uiDialog.position(this.options.position);a||this.uiDialog.hide()},_setOptions:function(a){var d=this,c=!1,e={};b.each(a,function(a,b){d._setOption(a,b);a in d.sizeRelatedOptions&&(c=!0);a in d.resizableRelatedOptions&&(e[a]=b)});c&&(this._size(),this._position());this.uiDialog.is(":data(ui-resizable)")&& +this.uiDialog.resizable("option",e)},_setOption:function(a,b){var c,e=this.uiDialog;"dialogClass"===a&&e.removeClass(this.options.dialogClass).addClass(b);"disabled"!==a&&(this._super(a,b),"appendTo"===a&&this.uiDialog.appendTo(this._appendTo()),"buttons"===a&&this._createButtons(),"closeText"===a&&this.uiDialogTitlebarClose.button({label:""+b}),"draggable"===a&&((c=e.is(":data(ui-draggable)"))&&!b&&e.draggable("destroy"),!c&&b&&this._makeDraggable()),"position"===a&&this._position(),"resizable"=== +a&&((c=e.is(":data(ui-resizable)"))&&!b&&e.resizable("destroy"),c&&"string"===typeof b&&e.resizable("option","handles",b),c||!1===b||this._makeResizable()),"title"===a&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var a,b,c,e=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});e.minWidth>e.width&&(e.width=e.minWidth);a=this.uiDialog.css({height:"auto",width:e.width}).outerHeight();b=Math.max(0,e.minHeight-a);c="number"===typeof e.maxHeight? +Math.max(0,e.maxHeight-a):"none";"auto"===e.height?this.element.css({minHeight:b,maxHeight:c,height:"auto"}):this.element.height(Math.max(0,e.height-a));this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var a=b(this);return b("
      ").css({position:"absolute",width:a.outerWidth(),height:a.outerHeight()}).appendTo(a.parent()).offset(a.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&& +(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(a){return b(a.target).closest(".ui-dialog").length?!0:!!b(a.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var a=!0;this._delay(function(){a=!1});this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(b){a||this._allowInteraction(b)||(b.preventDefault(),this._trackingInstances()[0]._focusTabbable())}});this.overlay=b("
      ").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()); +this._on(this.overlay,{mousedown:"_keepFocus"});this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var a=this.document.data("ui-dialog-overlays")-1;a?this.document.data("ui-dialog-overlays",a):this.document.unbind("focusin").removeData("ui-dialog-overlays");this.overlay.remove();this.overlay=null}}})}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./widget","./mouse","./draggable"],b):b(jQuery)})(function(b){b.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var a,d=this.options,c=d.accept;this.isover=!1;this.isout=!0;this.accept=b.isFunction(c)?c:function(a){return a.is(c)}; +this.proportions=function(){if(arguments.length)a=arguments[0];else return a?a:a={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}};this._addToManager(d.scope);d.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(a){b.ui.ddmanager.droppables[a]=b.ui.ddmanager.droppables[a]||[];b.ui.ddmanager.droppables[a].push(this)},_splice:function(a){for(var b=0;b=p&&a=m&&e=p&&g<=q||l>=p&&l<=q||gq)&&(f>=m&&f<=n||h>=m&&h<=n||fn);default:return!1}}}();b.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,d){var c,e,f=b.ui.ddmanager.droppables[a.options.scope]||[],g=d?d.type:null,h=(a.currentItem||a.element).find(":data(ui-droppable)").addBack();c=0;a:for(;ca?0:d.max6*c?a+(b-a)*c*6:1>2*c?b:2>3*c?a+(b-a)*(2/3-c)*6:a}var g=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55* +a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],l=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b, +c,d,e)},m={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},p={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},n=l.support={},q=a("

      ")[0],r,u=a.each;q.style.cssText="background-color:rgba(1,1,1,.5)";n.rgba=-1a.inArray(null,n[e].slice(0,3))&&(n[e][3]=1,d.from&&(n._rgba=d.from(n[e])))}),this},is:function(a){var b=l(a),c=!0,d=this;u(m,function(a,e){var f,g=b[e.cache];g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],u(e.props,function(a,b){if(null!=g[b.idx])return c=g[b.idx]===f[b.idx]}));return c});return c},_space:function(){var a=[],b=this;u(m,function(c,d){b[d.cache]&&a.push(c)});return a.pop()},transition:function(a, +b){var d=l(a),e=d._space(),f=m[e],g=0===this.alpha()?l("transparent"):this,h=g[f.cache]||f.to(g._rgba),n=h.slice(),d=d[f.cache];u(f.props,function(a,e){var f=e.idx,g=h[f],l=d[f],m=p[e.type]||{};null!==l&&(null===g?n[f]=l:(m.mod&&(l-g>m.mod/2?g+=m.mod:g-l>m.mod/2&&(g-=m.mod)),n[f]=c((l-g)*b+g,e)))});return this[e](n)},blend:function(b){if(1===this._rgba[3])return this;var c=this._rgba.slice(),d=c.pop(),e=l(b)._rgba;return l(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b= +"rgba(",c=a.map(this._rgba,function(a,b){return null==a?2b&&(a=Math.round(100*a)+"%");return a});1===c[3]&&(c.pop(),b="hsl(");return b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();b&&c.push(~~(255*d));return"#"+a.map(c,function(a){a=(a||0).toString(16);return 1===a.length?"0"+a:a}).join("")},toString:function(){return 0=== +this._rgba[3]?"transparent":this.toRgbaString()}});l.fn.parse.prototype=l.fn;m.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/255,c=a[1]/255,d=a[2]/255;a=a[3];var e=Math.max(b,c,d),f=Math.min(b,c,d),g=e-f,h=e+f,l=.5*h;return[Math.round(f===e?0:b===e?60*(c-d)/g+360:c===e?60*(d-b)/g+120:60*(b-c)/g+240)%360,0===g?0:.5>=l?g/h:g/(2-h),l,null==a?1:a]};m.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360, +c=a[1],d=a[2];a=a[3];c=.5>=d?d*(1+c):d+c-d*c;d=2*d-c;return[Math.round(255*f(d,c,b+1/3)),Math.round(255*f(d,c,b)),Math.round(255*f(d,c,b-1/3)),a]};u(m,function(e,f){var h=f.props,m=f.cache,p=f.to,n=f.from;l.fn[e]=function(e){p&&!this[m]&&(this[m]=p(this._rgba));if(e===b)return this[m].slice();var f,g=a.type(e),q="array"===g||"object"===g?e:arguments,r=this[m].slice();u(h,function(a,b){var d=q["object"===g?a:b.idx];null==d&&(d=r[b.idx]);r[b.idx]=c(d,b)});return n?(f=l(n(r)),f[m]=r,f):l(r)};u(h,function(b, +c){l.fn[b]||(l.fn[b]=function(d){var f=a.type(d),h="alpha"===b?this._hsla?"hsla":"rgba":e,l=this[h](),m=l[c.idx];if("undefined"===f)return m;"function"===f&&(d=d.call(this,m),f=a.type(d));if(null==d&&c.empty)return this;"string"===f&&(f=g.exec(d))&&(d=m+parseFloat(f[2])*("+"===f[1]?1:-1));l[c.idx]=d;return this[h](l)})})});l.hook=function(b){b=b.split(" ");u(b,function(b,c){a.cssHooks[c]={set:function(b,d){var f,g="";if("transparent"!==d&&("string"!==a.type(d)||(f=e(d)))){d=l(f||d);if(!n.rgba&&1!== +d._rgba[3]){for(f="backgroundColor"===c?b.parentNode:b;(""===g||"transparent"===g)&&f&&f.style;)try{g=a.css(f,"backgroundColor"),f=f.parentNode}catch(h){}d=d.blend(g&&"transparent"!==g?g:"_default")}d=d.toRgbaString()}try{b.style[c]=d}catch(h){}}};a.fx.step[c]=function(b){b.colorInit||(b.start=l(b.elem,c),b.end=l(b.end),b.colorInit=!0);a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})};l.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"); +a.cssHooks.borderColor={expand:function(a){var b={};u(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a});return b}};r=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(b);(function(){function a(a){var c,d=a.ownerDocument.defaultView? +a.ownerDocument.defaultView.getComputedStyle(a,null):a.currentStyle,h={};if(d&&d.length&&d[0]&&d[d[0]])for(a=d.length;a--;)c=d[a],"string"===typeof d[c]&&(h[b.camelCase(c)]=d[c]);else for(c in d)"string"===typeof d[c]&&(h[c]=d[c]);return h}var d=["add","remove","toggle"],c={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};b.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(a,c){b.fx.step[c]=function(a){if("none"!== +a.end&&!a.setAttr||1===a.pos&&!a.setAttr)b.style(a.elem,c,a.end),a.setAttr=!0}});b.fn.addBack||(b.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))});b.effects.animateClass=function(e,f,g,h){var l=b.speed(f,g,h);return this.queue(function(){var f=b(this),g=f.attr("class")||"",h,q=l.children?f.find("*").addBack():f,q=q.map(function(){return{el:b(this),start:a(this)}});h=function(){b.each(d,function(a,b){if(e[b])f[b+"Class"](e[b])})};h();q=q.map(function(){this.end= +a(this.el[0]);var d=this.start,e=this.end,f={},g,h;for(g in e)h=e[g],d[g]===h||c[g]||!b.fx.step[g]&&isNaN(parseFloat(h))||(f[g]=h);this.diff=f;return this});f.attr("class",g);q=q.map(function(){var a=this,c=b.Deferred(),d=b.extend({},l,{queue:!1,complete:function(){c.resolve(a)}});this.el.animate(this.diff,d);return c.promise()});b.when.apply(b,q.get()).done(function(){h();b.each(arguments,function(){var a=this.el;b.each(this.diff,function(b){a.css(b,"")})});l.complete.call(f[0])})})};b.fn.extend({addClass:function(a){return function(c, +d,h,l){return d?b.effects.animateClass.call(this,{add:c},d,h,l):a.apply(this,arguments)}}(b.fn.addClass),removeClass:function(a){return function(c,d,h,l){return 1

      ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none", +margin:0,padding:0}),g={width:a.width(),height:a.height()},h=document.activeElement;try{h.id}catch(l){h=document.body}a.wrap(f);(a[0]===h||b.contains(a[0],h))&&b(h).focus();f=a.parent();"static"===a.css("position")?(f.css({position:"relative"}),a.css({position:"relative"})):(b.extend(d,{position:a.css("position"),zIndex:a.css("z-index")}),b.each(["top","left","bottom","right"],function(b,f){d[f]=a.css(f);isNaN(parseInt(d[f],10))&&(d[f]="auto")}),a.css({position:"relative",top:0,left:0,right:"auto", +bottom:"auto"}));a.css(g);return f.css(d).show()},removeWrapper:function(a){var d=document.activeElement;a.parent().is(".ui-effects-wrapper")&&(a.parent().replaceWith(a),(a[0]===d||b.contains(a[0],d))&&b(d).focus());return a},setTransition:function(a,d,f,g){g=g||{};b.each(d,function(b,d){var e=a.cssUnit(d);0a?c(2*a)/2:1-c(-2*a+2)/2}})})();return b.effects}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.blind=function(a,d){var c=b(this),e="position top bottom left right height width".split(" "),f=b.effects.setMode(c,a.mode||"hide"),g=a.direction||"up",h=/up|down|vertical/.test(g),l=h?"height":"width",m=h?"top":"left",g=/up|left|vertical|horizontal/.test(g),p={},n="show"===f,q,r,u;c.parent().is(".ui-effects-wrapper")?b.effects.save(c.parent(),e):b.effects.save(c,e);c.show(); +q=b.effects.createWrapper(c).css({overflow:"hidden"});r=q[l]();u=parseFloat(q.css(m))||0;p[l]=n?r:0;g||(c.css(h?"bottom":"right",0).css(h?"top":"left","auto").css({position:"absolute"}),p[m]=n?u:r+u);n&&(q.css(l,0),g||q.css(m,u+r));q.animate(p,{duration:a.duration,easing:a.easing,queue:!1,complete:function(){"hide"===f&&c.hide();b.effects.restore(c,e);b.effects.removeWrapper(c);d()}})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.bounce=function(a,d){var c=b(this),e="position top bottom left right height width".split(" "),f=b.effects.setMode(c,a.mode||"effect"),g="hide"===f,h="show"===f,l=a.direction||"up",f=a.distance,m=a.times||5,p=2*m+(h||g?1:0),n=a.duration/p,q=a.easing,r="up"===l||"down"===l?"top":"left",l="up"===l||"left"===l,u,w,B=c.queue(),x=B.length;(h||g)&&e.push("opacity");b.effects.save(c, +e);c.show();b.effects.createWrapper(c);f||(f=c["top"===r?"outerHeight":"outerWidth"]()/3);h&&(w={opacity:1},w[r]=0,c.css("opacity",0).css(r,l?2*-f:2*f).animate(w,n,q));g&&(f/=Math.pow(2,m-1));w={};for(h=w[r]=0;h
      ").css({position:"absolute",visibility:"visible",left:-r*m,top:-q*p}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:m,height:p,left:u+(h?B*m:0),top:w+(h?x*p:0),opacity:h?0:1}).animate({left:u+(h?0:B*m),top:w+(h?0:x*p),opacity:h?1:0},a.duration||500,a.easing,c)}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.fade=function(a,d){var c=b(this),e=b.effects.setMode(c,a.mode||"toggle");c.animate({opacity:e},{queue:!1,duration:a.duration,easing:a.easing,complete:d})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.fold=function(a,d){var c=b(this),e="position top bottom left right height width".split(" "),f=b.effects.setMode(c,a.mode||"hide"),g="show"===f,h="hide"===f,f=a.size||15,l=/([0-9]+)%/.exec(f),m=!!a.horizFirst,p=g!==m,n=p?["width","height"]:["height","width"],q=a.duration/2,r,u={},w={};b.effects.save(c,e);c.show();r=b.effects.createWrapper(c).css({overflow:"hidden"});p= +p?[r.width(),r.height()]:[r.height(),r.width()];l&&(f=parseInt(l[1],10)/100*p[h?0:1]);g&&r.css(m?{height:0,width:f}:{height:f,width:0});u[n[0]]=g?p[0]:f;w[n[1]]=g?p[1]:0;r.animate(u,q,a.easing).animate(w,q,a.easing,function(){h&&c.hide();b.effects.restore(c,e);b.effects.removeWrapper(c);d()})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.highlight=function(a,d){var c=b(this),e=["backgroundImage","backgroundColor","opacity"],f=b.effects.setMode(c,a.mode||"show"),g={backgroundColor:c.css("backgroundColor")};"hide"===f&&(g.opacity=0);b.effects.save(c,e);c.show().css({backgroundImage:"none",backgroundColor:a.color||"#ffff99"}).animate(g,{queue:!1,duration:a.duration,easing:a.easing,complete:function(){"hide"=== +f&&c.hide();b.effects.restore(c,e);d()}})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.size=function(a,d){var c,e,f,g,h,l,m=b(this),p="position top bottom left right width height overflow opacity".split(" ");h="position top bottom left right overflow opacity".split(" ");var n=["width","height","overflow"],q=["fontSize"],r=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],u=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"], +w=b.effects.setMode(m,a.mode||"effect"),B=a.restore||"effect"!==w,x=a.scale||"both";l=a.origin||["middle","center"];var D=m.css("position"),y=B?p:h,H={height:0,width:0,outerHeight:0,outerWidth:0};"show"===w&&m.show();h={height:m.height(),width:m.width(),outerHeight:m.outerHeight(),outerWidth:m.outerWidth()};"toggle"===a.mode&&"show"===w?(m.from=a.to||H,m.to=a.from||h):(m.from=a.from||("show"===w?H:h),m.to=a.to||("hide"===w?H:h));f=m.from.height/h.height;g=m.from.width/h.width;c=m.to.height/h.height; +e=m.to.width/h.width;if("box"===x||"both"===x)f!==c&&(y=y.concat(r),m.from=b.effects.setTransition(m,r,f,m.from),m.to=b.effects.setTransition(m,r,c,m.to)),g!==e&&(y=y.concat(u),m.from=b.effects.setTransition(m,u,g,m.from),m.to=b.effects.setTransition(m,u,e,m.to));"content"!==x&&"both"!==x||f===c||(y=y.concat(q).concat(n),m.from=b.effects.setTransition(m,q,f,m.from),m.to=b.effects.setTransition(m,q,c,m.to));b.effects.save(m,y);m.show();b.effects.createWrapper(m);m.css("overflow","hidden").css(m.from); +l&&(l=b.effects.getBaseline(l,h),m.from.top=(h.outerHeight-m.outerHeight())*l.y,m.from.left=(h.outerWidth-m.outerWidth())*l.x,m.to.top=(h.outerHeight-m.to.outerHeight)*l.y,m.to.left=(h.outerWidth-m.to.outerWidth)*l.x);m.css(m.from);if("content"===x||"both"===x)r=r.concat(["marginTop","marginBottom"]).concat(q),u=u.concat(["marginLeft","marginRight"]),n=p.concat(r).concat(u),m.find("*[width]").each(function(){var d=b(this),h=d.height(),l=d.width(),m=d.outerHeight(),p=d.outerWidth();B&&b.effects.save(d, +n);d.from={height:h*f,width:l*g,outerHeight:m*f,outerWidth:p*g};d.to={height:h*c,width:l*e,outerHeight:h*c,outerWidth:l*e};f!==c&&(d.from=b.effects.setTransition(d,r,f,d.from),d.to=b.effects.setTransition(d,r,c,d.to));g!==e&&(d.from=b.effects.setTransition(d,u,g,d.from),d.to=b.effects.setTransition(d,u,e,d.to));d.css(d.from);d.animate(d.to,a.duration,a.easing,function(){B&&b.effects.restore(d,n)})});m.animate(m.to,{queue:!1,duration:a.duration,easing:a.easing,complete:function(){0===m.to.opacity&& +m.css("opacity",m.from.opacity);"hide"===w&&m.hide();b.effects.restore(m,y);B||("static"===D?m.css({position:"relative",top:m.to.top,left:m.to.left}):b.each(["top","left"],function(a,b){m.css(b,function(b,c){var d=parseInt(c,10),e=a?m.to.left:m.to.top;return"auto"===c?e+"px":d+e+"px"})}));b.effects.removeWrapper(m);d()}})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect","./effect-size"],b):b(jQuery)})(function(b){return b.effects.effect.scale=function(a,d){var c=b(this),e=b.extend(!0,{},a),f=b.effects.setMode(c,a.mode||"effect"),g=parseInt(a.percent,10)||(0===parseInt(a.percent,10)?0:"hide"===f?0:100),h=a.direction||"both",l=a.origin,m={height:c.height(),width:c.width(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth()},p="horizontal"!==h?g/100:1,g="vertical"!==h?g/100:1;e.effect= +"size";e.queue=!1;e.complete=d;"effect"!==f&&(e.origin=l||["middle","center"],e.restore=!0);e.from=a.from||("show"===f?{height:0,width:0,outerHeight:0,outerWidth:0}:m);e.to={height:m.height*p,width:m.width*g,outerHeight:m.outerHeight*p,outerWidth:m.outerWidth*g};e.fade&&("show"===f&&(e.from.opacity=0,e.to.opacity=1),"hide"===f&&(e.from.opacity=1,e.to.opacity=0));c.effect(e)}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect","./effect-scale"],b):b(jQuery)})(function(b){return b.effects.effect.puff=function(a,d){var c=b(this),e=b.effects.setMode(c,a.mode||"hide"),f="hide"===e,g=parseInt(a.percent,10)||150,h=g/100,l={height:c.height(),width:c.width(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth()};b.extend(a,{effect:"scale",queue:!1,fade:!0,mode:e,complete:d,percent:f?g:100,from:f?l:{height:l.height*h,width:l.width*h,outerHeight:l.outerHeight* +h,outerWidth:l.outerWidth*h}});c.effect(a)}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.pulsate=function(a,d){var c=b(this),e=b.effects.setMode(c,a.mode||"show"),f="show"===e,g="hide"===e,e=2*(a.times||5)+(f||"hide"===e?1:0),h=a.duration/e,l=0,m=c.queue(),p=m.length;if(f||!c.is(":visible"))c.css("opacity",0).show(),l=1;for(f=1;f
      ").appendTo(document.body).addClass(a.className).css({top:l.top-h,left:l.left-g,height:c.innerHeight(), +width:c.innerWidth(),position:f?"fixed":"absolute"}).animate(e,a.duration,a.easing,function(){m.remove();d()})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./widget"],b):b(jQuery)})(function(b){return b.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue();this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min});this.valueDiv=b("
      ").appendTo(this.element); +this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove()},value:function(a){if(void 0===a)return this.options.value;this.options.value=this._constrainedValue(a);this._refreshValue()},_constrainedValue:function(a){void 0===a&&(a=this.options.value);this.indeterminate=!1===a;"number"!==typeof a&&(a=0);return this.indeterminate? +!1:Math.min(this.options.max,Math.max(this.min,a))},_setOptions:function(a){var b=a.value;delete a.value;this._super(a);this.options.value=this._constrainedValue(b);this._refreshValue()},_setOption:function(a,b){"max"===a&&(b=Math.max(this.min,b));"disabled"===a&&this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b);this._super(a,b)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var a= +this.options.value,d=this._percentage();this.valueDiv.toggle(this.indeterminate||a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(d.toFixed(0)+"%");this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate);this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=b("
      ").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":a}),this.overlayDiv&& +(this.overlayDiv.remove(),this.overlayDiv=null));this.oldValue!==a&&(this.oldValue=a,this._trigger("change"));a===this.options.max&&this._trigger("complete")}})}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],b):b(jQuery)})(function(b){return b.widget("ui.selectable",b.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var a,d=this;this.element.addClass("ui-selectable");this.dragged=!1;this.refresh=function(){a=b(d.options.filter,d.element[0]);a.addClass("ui-selectee"); +a.each(function(){var a=b(this),d=a.offset();b.data(this,"selectable-item",{element:this,$element:a,left:d.left,top:d.top,right:d.left+a.outerWidth(),bottom:d.top+a.outerHeight(),startselected:!1,selected:a.hasClass("ui-selected"),selecting:a.hasClass("ui-selecting"),unselecting:a.hasClass("ui-unselecting")})})};this.refresh();this.selectees=a.addClass("ui-selectee");this._mouseInit();this.helper=b("
      ")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"); +this.element.removeClass("ui-selectable ui-selectable-disabled");this._mouseDestroy()},_mouseStart:function(a){var d=this,c=this.options;this.opos=[a.pageX,a.pageY];this.options.disabled||(this.selectees=b(c.filter,this.element[0]),this._trigger("start",a),b(c.appendTo).append(this.helper),this.helper.css({left:a.pageX,top:a.pageY,width:0,height:0}),c.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var c=b.data(this,"selectable-item");c.startselected=!0;a.metaKey|| +a.ctrlKey||(c.$element.removeClass("ui-selected"),c.selected=!1,c.$element.addClass("ui-unselecting"),c.unselecting=!0,d._trigger("unselecting",a,{unselecting:c.element}))}),b(a.target).parents().addBack().each(function(){var c,f=b.data(this,"selectable-item");if(f)return c=!a.metaKey&&!a.ctrlKey||!f.$element.hasClass("ui-selected"),f.$element.removeClass(c?"ui-unselecting":"ui-selected").addClass(c?"ui-selecting":"ui-unselecting"),f.unselecting=!c,f.selecting=c,(f.selected=c)?d._trigger("selecting", +a,{selecting:f.element}):d._trigger("unselecting",a,{unselecting:f.element}),!1}))},_mouseDrag:function(a){this.dragged=!0;if(!this.options.disabled){var d,c=this,e=this.options,f=this.opos[0],g=this.opos[1],h=a.pageX,l=a.pageY;f>h&&(d=h,h=f,f=d);g>l&&(d=l,l=g,g=d);this.helper.css({left:f,top:g,width:h-f,height:l-g});this.selectees.each(function(){var d=b.data(this,"selectable-item"),p=!1;d&&d.element!==c.element[0]&&("touch"===e.tolerance?p=!(d.left>h||d.rightl||d.bottomf&&d.rightg&&d.bottom",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var a=this.element.uniqueId().attr("id");this.ids={element:a,button:a+ +"-button",menu:a+"-menu"};this._drawButton();this._drawMenu();this.options.disabled&&this.disable()},_drawButton:function(){var a=this;this.label=b("label[for='"+this.ids.element+"']").attr("for",this.ids.button);this._on(this.label,{click:function(a){this.button.focus();a.preventDefault()}});this.element.hide();this.button=b("",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false", +"aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element);b("",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button);this.buttonText=b("",{"class":"ui-selectmenu-text"}).appendTo(this.button);this._setText(this.buttonText,this.element.find("option:selected").text());this._resizeButton();this._on(this.button,this._buttonEvents);this.button.one("focusin",function(){a.menuItems||a._refreshMenu()});this._hoverable(this.button); +this._focusable(this.button)},_drawMenu:function(){var a=this;this.menu=b("
      "}); +$(".js-additional-connection-info").append(a);showAdditionalConnectionInfo();additionalConnectionInfoReceived=!0}},updateConnectionEndpointInfo=function(b){if(!cfConnectionOutputReceived&&""!=b){var a="";if(-1!==b.indexOf("")){var d="",c="";-1!==b.indexOf("dashboard")&&(c=" Dashboard");-1!==b.indexOf("launch")?(d=b.match(/href="([^"]*)/)[1],a+=""):a+="
      "+b+"
      "}else a+="
      "; +$(".js-cf-connection-output").append(a);$(".js-cf-connection-output").removeClass("is-hidden");$(".js-cf-connection-output").addClass("is-visible");cfConnectionOutputReceived=!0}},showAdditionalConnectionInfo=function(){$(".js-additional-connection-info").removeClass("is-hidden");$(".js-tab[data-tab='lab-resources']").click();$(".js-lab-sidebar").animate({scrollTop:$(".js-additional-connection-info").offset().top},750,function(){$(".js-additional-connection-info").addClass("is-visible")})},initExternalWindowListener= +function(){$(".js-external-window").click(function(b){b.preventDefault();if($(this)[0].hasAttribute("href"))consoleWindow=window.open($(this).attr("href"));else return!1})},closeConsoleWindow=function(){""!==consoleWindow&&consoleWindow.close()},resetVariables=function(){cfConnectionOutputReceived=additionalConnectionInfoReceived=pausePolling=!1;consoleWindow=consoleClipboard=focusDataPoll="";cloudProvisioned=consoleReady=consoleInfoFilled=endLabButtonDisplayed=!1},labStartSegment=function(){var b= +$(".js-lab_and_classroom_info").data();"undefined"!=typeof analytics&&analytics.track("start_lab",b)};initLabRun=function(){checkIfLabIsAlreadyRunning();initStartButtonListener();initEndButtonListener();initExternalWindowListener()};initSliderListener=function(){$(".js-sidebar-slider").click(function(){$(this).toggleClass("is-hidden");$(".js-lab-sidebar-container").toggleClass("is-hidden")})};showSidebar=function(){$(".js-sidebar-slider").removeClass("is-hidden");$(".js-lab-sidebar-container").removeClass("is-hidden")}; +hideSidebar=function(){$(".js-sidebar-slider").addClass("is-hidden");$(".js-lab-sidebar-container").addClass("is-hidden")};initLabSidebar=function(){initSliderListener()};var initFakeShadow=function(){$(".js-fake-shadow-waypoint").length&&new Waypoint({element:$(".js-fake-shadow-waypoint")[0],offset:60,handler:function(){$(".js-fake-shadow").toggleClass("is-stuck")}})},initTiles=function(){$(".js-landing-tiles").addClass("is-visible")},initLanding=function(){initFakeShadow();initTiles()}; +ql.MaterialDialog=function(b,a){this.dialog=b;this.dismissers=$(this.dialog).find("[data-dismiss]");this.isOpen=a||!1;this.listen();this.upgrade();this.render()};ql.MaterialDialog.prototype.upgrade=function(){$(this.dialog).addClass("is-upgraded")};ql.MaterialDialog.prototype.listen=function(){for(var b=0;b$(window).width()?($(".md-input").removeClass("md-input--horizontal"),$(".js-permissions-select").removeClass("permissions-select__container--horizontal"),$(".js-labs-resources").removeClass("labs__resources--horizontal")):($(".md-input").addClass("md-input--horizontal"),$(".js-student-resources .md-input").removeClass("md-input--horizontal"),$(".js-permissions-select").addClass("permissions-select__container--horizontal"),$(".js-labs-resources").addClass("labs__resources--horizontal"))}; +ql.initNewStudentResourceListener=function(){$(document).on("nested:fieldAdded",function(b){b=b.field.find(".md-input__input");for(var a=0;a"+this.permissions[a]+"");this.button.find("#permissions-display").html(b);this.menu.render()}; +ql.PermissionsMenu=function(b){var a=this;this.element=b;this.isVisible=!1;this.setPermissions="";this.categories=[];b=this.element.children("li");for(var d=0;de.max&&(e.max=n),n10||(h.releaseIds[e.slice(-200)]=(""+t).slice(-200))}var c=n(13),f=n(8),l=n(2),p=n(15),d=n(19),m=n(30),h=n("loader"),v=n("handle"),g=0;f.on("jserrors",function(){return{body:l.take(["cm"])}});var y={finished:p(o),setPageViewName:r,setErrorHandler:s,addToTrace:i,inlineHit:a,addRelease:u};m(y,function(n,e){c("api-"+n,e,"api")});var w=0},{}],4:[function(n,e,t){var r=/([^?#]*)[^#]*(#[^?]*|$).*/,o=/([^?#]*)().*/;e.exports=function(n,e){return n.replace(e?r:o,"$1$2")}},{}],5:[function(n,e,t){function r(n,e){var t=n[1];i(e[t],function(e,t){var r=n[0],o=t[0];if(o===r){var i=t[1],a=n[3],s=n[2];i.apply(a,s)}})}var o=n("ee"),i=n(30),a=n(13).handlers;e.exports=function(n){var e=o.backlog[n],t=a[n];if(t){for(var s=0;e&&se)return n.slice(0,r).join("");return n.join("")}function a(n,e){var t=0,r="";return u(n,function(n,i){var a,s,u=[];if("string"==typeof i)a="&"+n+"="+o(i),t+=a.length,r+=a;else if(i.length){for(t+=9,s=0;s=e));s++)u.push(a);r+="&"+n+"=%5B"+u.join(",")+"%5D"}}),r}function s(n,e){return e&&"string"==typeof e?"&"+n+"="+o(e):""}var u=n(30),c=n(18),f={"%2C":",","%3A":":","%2F":"/","%40":"@","%24":"$","%3B":";"},l=u(f,function(n){return n}),p=new RegExp(l.join("|"),"g");e.exports={obj:a,fromArray:i,qs:o,param:s}},{}],7:[function(n,e,t){var r=n(30),o=n("ee"),i=n(5);e.exports=function(n){n&&"object"==typeof n&&(r(n,function(n,e){e&&!a[n]&&(o.emit("feat-"+n,[]),a[n]=!0)}),i("feature"))};var a=e.exports.active={}},{}],8:[function(n,e,t){function r(n){if(n.info.beacon){n.info.queueTime&&b.store("measures","qt",{value:n.info.queueTime}),n.info.applicationTime&&b.store("measures","ap",{value:n.info.applicationTime}),k.measure("be","starttime","firstbyte"),k.measure("fe","firstbyte","onload"),k.measure("dc","firstbyte","domContent");var e=b.get("measures"),t=h(e,function(n,e){return"&"+n+"="+e.params.value}).join("");if(t){var r="1",o=[p(n)];if(o.push(t),o.push(g.param("tt",n.info.ttGuid)),o.push(g.param("us",n.info.user)),o.push(g.param("ac",n.info.account)),o.push(g.param("pr",n.info.product)),o.push(g.param("af",h(n.features,function(n){return n}).join(","))),window.performance&&"undefined"!=typeof window.performance.timing){var i={timing:v.addPT(window.performance.timing,{}),navigation:v.addPN(window.performance.navigation,{})};o.push(g.param("perf",y(i)))}o.push(g.param("xx",n.info.extra)),o.push(g.param("ua",n.info.userAttributes)),o.push(g.param("at",n.info.atts));var a=y(n.info.jsAttributes);o.push(g.param("ja","{}"===a?null:a));var s=g.fromArray(o,n.maxBytes);w.jsonp("https://"+n.info.beacon+"/"+r+"/"+n.info.licenseKey+s,A)}}}function o(n){var e=h(q,function(e){return a(e,n,{unload:!0})});return x(e,i)}function i(n,e){return n||e}function a(n,e,t){return u(e,n,s(n),t||{})}function s(n){for(var e=d({}),t=d({}),r=q[n]||[],o=0;o9||0===j.ieVersion);e.exports={sendRUM:m(r),sendFinal:o,pingErrors:c,sendX:a,on:l,xhrUsable:R}},{}],9:[function(n,e,t){var r=n("loader"),o=document.createElement("div");o.innerHTML="";var i=o.getElementsByTagName("div").length;4===i?r.ieVersion=6:3===i?r.ieVersion=7:2===i?r.ieVersion=8:1===i?r.ieVersion=9:r.ieVersion=0,e.exports=r.ieVersion},{}],10:[function(n,e,t){function r(n){c.sendFinal(p,!1),a.navCookie&&(document.cookie="NREUM=s="+Number(new Date)+"&r="+o(document.location.href)+"&p="+o(document.referrer)+"; path=/")}var o=n(14),i=n(1),a=n(16),s=n(17),u=n(15),c=n(8),f=n(13),l=n(7),p=n("loader"),d=n(29),m=n(5);n(3);var h="undefined"==typeof window.NREUM.autorun||window.NREUM.autorun;window.NREUM.setToken=l,6===n(9)?p.maxBytes=2e3:p.maxBytes=3e4,p.releaseIds={};var v=u(r);!d||navigator.sendBeacon?i("pagehide",v):i("beforeunload",v),i("unload",v),f("mark",s.mark,"api"),s.mark("done"),m("api"),h&&c.sendRUM(p)},{}],11:[function(n,e,t){e.exports=function(n,e){setTimeout(function t(){try{n()}finally{setTimeout(t,e)}},e)}},{}],12:[function(n,e,t){function r(n,e){var t=n["navigation"+a];return e.of=t,i(t,t,e,"n"),i(n[u+a],t,e,"u"),i(n[c+a],t,e,"r"),i(n[u+s],t,e,"ue"),i(n[c+s],t,e,"re"),i(n["fetch"+a],t,e,"f"),i(n[f+a],t,e,"dn"),i(n[f+s],t,e,"dne"),i(n["c"+l+a],t,e,"c"),i(n["secureC"+l+"ion"+a],t,e,"s"),i(n["c"+l+s],t,e,"ce"),i(n[p+a],t,e,"rq"),i(n[d+a],t,e,"rp"),i(n[d+s],t,e,"rpe"),i(n.domLoading,t,e,"dl"),i(n.domInteractive,t,e,"di"),i(n[h+a],t,e,"ds"),i(n[h+s],t,e,"de"),i(n.domComplete,t,e,"dc"),i(n[m+a],t,e,"l"),i(n[m+s],t,e,"le"),e}function o(n,e){return i(n.type,0,e,"ty"),i(n.redirectCount,0,e,"rc"),e}function i(n,e,t,r){var o;"number"==typeof n&&n>0&&(o=Math.round(n-e),t[r]=o),v.push(o)}var a="Start",s="End",u="unloadEvent",c="redirect",f="domainLookup",l="onnect",p="request",d="response",m="loadEvent",h="domContentLoadedEvent",v=[];e.exports={addPT:r,addPN:o,nt:v}},{}],13:[function(n,e,t){function r(n,e,t,r){o(r||i,n,e,t)}function o(n,e,t,r){r||(r="feature"),n||(n=i);var o=a[r]=a[r]||{},s=o[e]=o[e]||[];s.push([n,t])}var i=n("handle").ee;e.exports=r,r.on=o;var a=r.handlers={}},{}],14:[function(n,e,t){function r(n){var e,t=0;for(e=0;e6e4)return;return o}}}var a=n(14),s=n(17),u=n("loader"),c=n(29);e.exports={navCookie:!0},r()},{}],17:[function(n,e,t){function r(n,e){"undefined"==typeof e&&(e=a.now()+a.offset),s[n]=e}function o(n,e,t){var r=s[e],o=s[t];"undefined"!=typeof r&&"undefined"!=typeof o&&i.store("measures",n,{value:o-r})}var i=n(2),a=n("loader"),s={};e.exports={mark:r,measure:o}},{}],18:[function(n,e,t){function r(n){try{return i("",{"":n})}catch(e){try{s.emit("internal-error",[e])}catch(t){}}}function o(n){return u.lastIndex=0,u.test(n)?'"'+n.replace(u,function(n){var e=c[n];return"string"==typeof e?e:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function i(n,e){var t=e[n];switch(typeof t){case"string":return o(t);case"number":return isFinite(t)?String(t):"null";case"boolean":return String(t);case"object":if(!t)return"null";var r=[];if(t instanceof window.Array||"[object Array]"===Object.prototype.toString.apply(t)){for(var s=t.length,u=0;u1?e[1]:"unknown"}function f(n){return n&&n.indexOf("nrWrapper")>=0}function l(n){for(var e,t=n.stacktrace,r=/ line (\d+), column (\d+) in (?:]+)>|([^\)]+))\(.*\) in (.*):\s*$/i,o=t.split("\n"),i=[],a=[],s=!1,u=0,l=o.length;u100){var t=n.length-100;e=n.slice(0,50).join("\n"),e+="\n< ...truncated "+t+" lines... >\n",e+=n.slice(-50).join("\n")}else e=n.join("\n");return e.replace(r,"")}},{}],23:[function(n,e,t){function r(n){return p(n.exceptionClass)^n.stackHash}function o(n,e){if("string"!=typeof n)return"";var t=f(n);return t===e?"":t}function i(n,e){for(var t="",r=0;r=v)){var o,a,f={};"undefined"!=typeof window&&window.document&&window.document.documentElement&&(o=window.document.documentElement.clientWidth,a=window.document.documentElement.clientHeight);var l={timestamp:n+s.offset,timeSinceLoad:n/1e3,browserWidth:o,browserHeight:a,referrerUrl:i,currentUrl:p(""+location),pageUrl:p(s.origin),eventType:"PageAction"};u(l,r),u(y,r),t&&"object"==typeof t&&u(t,r),f.actionName=e||"",g.push(f)}}function o(n,e,t){y[e]=t}var i,a=n("ee"),s=n("loader"),u=n(30),c=n(18),f=n(13),l=n(8),p=n(4),d=n(11),m=120,h=30,v=m*h/60,g=[],y=s.info.jsAttributes={};document.referrer&&(i=p(document.referrer)),f("api-setCustomAttribute",o,"api"),a.on("feat-ins",function(){f("api-addPageAction",r),l.on("ins",function(){return{qs:{ua:s.info.userAttributes,at:s.info.atts},body:{ins:g.splice(0)}}}),d(function(){l.sendX("ins",s)},1e3*h),l.sendX("ins",s)})},{}],26:[function(n,e,t){function r(n){var e,t,r,o=Date.now();for(e in n)t=n[e],"number"==typeof t&&t>0&&ti.s-e?s.e=i.e:(r[i.o]=i,a.push(i)):(r[i.o]=null,i.n="scroll",a.push(i)),o}}function v(n,e){return e}function g(n,e){return n.concat(e)}function y(n){var e=4;return!!(n&&"number"==typeof n.e&&"number"==typeof n.s&&n.e-n.s9e5?void(C={}):(k(C,function(e,t){t&&t.length&&(n+=t.length)}),n>30&&b.sendX("resources",w),void(n>1e3&&(C={})))},1e4)});var B=0}}},{}],27:[function(n,e,t){function r(n,e,t){e.time=t,n.cat?o.store("xhr",s([n.status,n.cat]),n,e):o.store("xhr",s([n.status,n.host,n.pathname]),n,e)}var o=n(2),i=n(13),a=n(8),s=n(18),u=n("loader"),c=n("ee");u.features.xhr&&(a.on("jserrors",function(){return{body:o.take(["xhr"])}}),c.on("feat-err",function(){i("xhr",r)}),e.exports=r)},{}],28:[function(n,e,t){e.exports=function(n){var e=document.createElement("a"),t=window.location,r={};e.href=n,r.port=e.port;var o=e.href.split("://");!r.port&&o[1]&&(r.port=o[1].split("/")[0].split("@").pop().split(":")[1]),r.port&&"0"!==r.port||(r.port="https"===o[0]?"443":"80"),r.hostname=e.hostname||t.hostname,r.pathname=e.pathname,r.protocol=o[0],"/"!==r.pathname.charAt(0)&&(r.pathname="/"+r.pathname);var i=!e.protocol||":"===e.protocol||e.protocol===t.protocol,a=e.hostname===document.domain&&e.port===t.port;return r.sameOrigin=i&&(!e.hostname||a),r}},{}],29:[function(n,e,t){var r=0,o=navigator.userAgent.match(/Firefox[\/\s](\d+\.\d+)/);o&&(r=+o[1]),e.exports=r},{}],30:[function(n,e,t){function r(n,e){var t=[],r="",i=0;for(r in n)o.call(n,r)&&(t[i]=e(r,n[r]),i+=1);return t}var o=Object.prototype.hasOwnProperty;e.exports=r},{}],31:[function(n,e,t){function r(n,e,t){e||(e=0),"undefined"==typeof t&&(t=n?n.length:0);for(var r=-1,o=t-e||0,i=Array(o<0?0:o);++r + \ No newline at end of file diff --git a/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource(2).html b/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource(2).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource(2).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource(3).html b/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource(3).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource(3).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource(4).html b/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource(4).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource(4).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource(5).html b/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource(5).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource(5).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource(6).html b/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource(6).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource(6).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource.html b/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource.html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Serverless Machine Learning _ Qwiklabs + roitraining_files/saved_resource.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining.htm b/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining.htm new file mode 100755 index 0000000..ebe9626 --- /dev/null +++ b/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining.htm @@ -0,0 +1,1826 @@ + + + + + + + +Streaming Data Processing | Qwiklabs + roitraining + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + +menu + +
      +arrow_back + +

      +Streaming Data Processing +

      +
      +
      + + +
      +
      +
      + + +
      + +
      + +
      +
      + + +
      +
      + + + +
      +
      +
      +
      +
      + +480m access +· +480m completion + +
      + + +
      +
      +
      +
      +
      +Connection Details +
      + + +
      +
      + + + +
      +
      + +
      +
      + + + +
      +
      + +
      +
      + + + +
      +
      + + + + + +
      +
      +
      +
      +
      + + +
      + +
      +
      +
      +
      +
      + +
      +
      + +
      + +
      +

      + 08:00:00 +

      +
      +
      + +
      +
      +
      +
      +
      + +

      STREAMING DATA PROCESSING

      + +

      GETTING STARTED WITH GCP CONSOLE

      + +

      When the lab is ready a green button will appear that looks like this:

      + +

      2fa0ccada9d929f0.png

      + +

      When you are ready to begin, click Start Lab.

      + +

      Logging in to Google Cloud Platform

      + +

      Step 1: Locate the Username, Password and Project Id

      + +

      Press the green [Start] button to start the lab. After setup is completed you will see something similar to this on the right side of the Qwiklabs window:

      + +

      eaa80bb0490b07d0.png

      + +

      Step 2: Browse to Console

      + +

      Open an Incognito window in your browser.
      +And go to http://console.cloud.google.com

      + +

      Step 3: Sign in to Console

      + +

      Log in with the Username and Password provided. The steps below are suggestive. The actual dialog and procedures may vary from this example.

      + +

      1c492727805af169.png

      + +

      Step 4: Accept the conditions

      + +

      Accept the new account terms and conditions.

      + +

      32331ec60c5f6609.png

      + +

      This is a temporary account. You will only have access to the account for this one lab.

      +
      • Do not add recovery options
      • +
      • Do not sign up for free trials
      • +
      +

      Step 5: Don't change the password

      + +

      If prompted, don't change the password. Just click [Continue].

      + +

      ef164317a73a66d7.png

      + +

      Step 6 Agree to the Terms of Service

      + +

      Select (x) Yes, (x) _Yes and click _[AGREE AND CONTINUE].

      + +

      e0edec7592d289e1.png

      + +

      Step 7: Console opens

      + +

      The Google Cloud Platform Console opens.

      + +

      You may see a bar occupying the top part of the Console inviting you to sign up for a free trial. You can click on the __[DISMISS] __button so that the entire Console screen is available.

      + +

      a1b4bfec239cc863.png

      + +

      Step 8: Switch project (if necessary)

      + +

      On the top blue horizontal bar, click on the drop down icon to select the correct project (if not already so). You can confirm the project id from your Qwiklabs window (shown in step 1 above).

      + +

      849103afbf5e9178.png

      + +

      Click on "view more projects" if necessary and select the correct project id.

      + +

      PART 1: PUBLISH STREAMING DATA INTO PUB/SUB

      + +

      Overview

      + +

      Duration is 1 min

      + +

      Google Cloud Pub/Sub is a fully-managed real-time messaging service that allows you to send and receive messages between independent applications. Use Cloud Pub/Sub to publish and subscribe to data from multiple sources, then use Google Cloud Dataflow to understand your data, all in real time.

      + +

      In this lab you will use simulate your traffic sensor data into a Pubsub topic for later to be processed by Dataflow pipeline before finally ending up in a BigQuery table for further analysis.

      + +

      What you learn

      + +

      In this lab, you will learn how to:

      +
      • Create a Pubsub topic and subscription
      • +
      • Simulate your traffic sensor data into Pubsub
      • +
      +

      Create PubSub topic and Subscription

      + +

      Step 1

      + +

      Open a new CloudShell window and navigate to the directory for this lab:

      +
      cd ~/training-data-analyst/courses/streaming/publish
      +
      +

      If this directory doesn't exist, you may need to git clone the repository first:

      +
      cd ~
      +git clone https://github.com/GoogleCloudPlatform/training-data-analyst
      +cd ~/training-data-analyst/courses/streaming/publish
      +
      +

      Step 2

      + +

      Run the following command to configure gcloud:

      +
      gcloud init
      +
      +

      Note: when prompted, select option 1 to Re-initialize the configuration and when further prompted, choose the right account and project ID (look at your Qwiklabs "Connect" tab to confirm).

      + +

      Install the Cloud SDK beta command component:

      +
      gcloud components install beta
      +
      +

      Step 3

      + +

      Create your topic and publish a simple message:

      +
      gcloud beta pubsub topics create sandiego
      +gcloud beta pubsub topics publish sandiego "hello"
      +
      +

      Step 4

      + +

      Create a subscription for the topic:

      +
      gcloud beta pubsub subscriptions create --topic sandiego mySub1
      +
      +

      Step 5

      + +

      Pull the first message that was published to your topic:

      +
      gcloud beta pubsub subscriptions pull --auto-ack mySub1
      +
      +

      Do you see any result? If not, why?

      + +

      Step 6

      + +

      Try to publish another message and then pull it using the subscription:

      +
      gcloud beta pubsub topics publish sandiego "hello again"
      +
      +gcloud beta pubsub subscriptions pull --auto-ack mySub1
      +
      +

      Did you get any response this time?

      + +

      Step 7

      + +

      Cancel your subscription:

      +
      gcloud beta pubsub subscriptions delete mySub1
      +
      +

      Simulate your traffic sensor data into PubSub

      + +

      Step 1

      + +

      Explore the python script to simulate San Diego traffic sensor data:

      +
      nano send_sensor_data.py
      +
      +

      Look at the simulate function. This one lets the script behave as if traffic sensors were sending in data in real time to PubSub. The speedFactor parameter determines how fast the simulation will go.

      + +

      Step 2

      + +

      Download traffic dataset

      +
      ./download_data.sh
      +
      +

      Step 3

      + +

      To ensure the shell has the right permissions, run the following command:

      +
      gcloud auth application-default login
      +
      +

      When you run the gcloud command, you will get a confirmation prompt. Enter ‘Y' to continue. Next, you will be given a url, which you need to type in a your browser tab.

      + + + +

      +

      +

      +

      +

      +
      + +

      You will next be prompted to select the account, and click Next. The next page requires you to approve authorization, so click Allow. Finally, you get a code which you need to copy and paste it back in shell where you ran the gcloud command where you would be prompted to enter code.

      + +

      Step 4

      + +

      Once re-authenticated, run the send_sensor_data.py

      +
      ./send_sensor_data.py --speedFactor=60
      +
      +

      This command will send 1 hour of data in 1 minute.

      + +

      Note:

      +
      • If you get the google.gax.errors.RetryError: GaxError OR "StatusCode.PERMISSION_DENIED, User not authorized to perform this action.", then simply re-authenticate the shell and run the script again
      • +
      gcloud auth application-default login
      +./send_sensor_data.py --speedFactor=60
      +
      • If this fails because google.cloud.pubsub can not be found, then do the pip install below and run the send_sensor_data.py again:
      • +
      sudo pip install google-cloud-pubsub
      +./send_sensor_data.py --speedFactor=60
      +
      • If you get a failure that the module pubsub has no attribute called Client then you are running into path problems because an older version of pub/sub is installed on your machine. The solution is to use virtualenv:
      • +
      virtualenv cpb104
      +source cpb104/bin/activate
      +pip install google-cloud-pubsub
      +gcloud auth application-default login
      +
      +

      Then, try the send_sensor_data.py again

      +
      ./send_sensor_data.py --speedFactor=60
      +
      +

      Step 5

      + +

      Create a new tab in Cloud Shell and change into the directory you were working in:

      +
      cd ~/training-data-analyst/courses/streaming/publish
      +
      +

      Step 6

      + +

      Create a subscription for the topic and do a pull to confirm that messages are coming in:

      +
      gcloud beta pubsub subscriptions create --topic sandiego mySub2
      +gcloud beta pubsub subscriptions pull --auto-ack mySub2
      +
      +

      Confirm that you see a message with traffic sensor information.

      + +

      Step 7

      + +

      Cancel this subscription.

      +
      gcloud beta pubsub subscriptions delete mySub2
      +
      +

      In the next lab, you will run a Dataflow pipeline to read in all these messages and process them.

      + +

      Step 8

      + +

      Go to the Cloud Shell tab with the publisher and type to stop it.

      + + + +

      +

      Stop here if you are done. Wait for instructions from the Instructor before going into the next section

      +
      + +

      PART 2: STREAMING DATA PIPELINES

      + +

      Overview

      + +

      Duration is 1 min

      + +

      In this lab you will use Dataflow to collect traffic events from simulated traffic sensor data made available through Google Cloud PubSub, process them into an actionable average, and store the raw data in BigQuery for later analysis. You will learn how to start a Dataflow pipeline, monitor it, and, lastly, optimize it.

      + +

      What you learn

      + +

      In this lab, you will learn how to:

      +
      • Launch Dataflow and run a Dataflow job
      • +
      • Understand how data elements flow through the transformations of a Dataflow pipeline
      • +
      • Connect Dataflow to Pub/Sub and BigQuery
      • +
      • Observe and understand how Dataflow autoscaling adjusts compute resources to process input data optimally
      • +
      • Learn where to find logging information created by Dataflow
      • +
      • Explore metrics and create alerts and dashboards with Stackdriver Monitoring
      • +
      +

      Create BigQuery Dataset and Storage bucket

      + +

      The Dataflow pipeline we will create later will write into a table in this dataset.

      + +

      Step 1

      + +

      Open the Google Cloud Console (in the incognito window) and using the menu, navigate into BigQuery web UI

      + +

      Step 2

      + +

      Click the blue arrow to the right of your project name and choose Create new dataset.

      + +

      Step 3

      + +

      In the ‘Create Dataset' dialog, for Dataset ID, type demos and then click OK.

      + +

      Step 4

      + +

      If you don't already have a bucket on Cloud Storage, create one from the Storage section of the GCP console. Bucket names have to be globally unique.

      + +

      Simulate your traffic sensor data into PubSub

      + +

      Step 1

      + +

      In Cloud Shell, start the script to read from the csv data and publish to PubSub

      +
      cd ~/training-data-analyst/courses/streaming/publish
      +
      +./send_sensor_data.py --speedFactor=60
      +
      +

      This command will send 1 hour of data in 1 minute.

      + +

      Note:

      +
      • If you get the google.gax.errors.RetryError: GaxError OR "StatusCode.PERMISSION_DENIED, User not authorized to perform this action.", then simply re-authenticate the shell and run the script again
      • +
      gcloud auth application-default login
      +./send_sensor_data.py --speedFactor=60
      +
      • If this fails because google.cloud.pubsub can not be found, then do the pip install below and run the send_sensor_data.py again:
      • +
      sudo pip install google-cloud-pubsub
      +./send_sensor_data.py --speedFactor=60
      +
      • If you get a failure that the module pubsub has no attribute called Client then you are running into path problems because an older version of pub/sub is installed on your machine. The solution is to use virtualenv:
      • +
      virtualenv cpb104
      +source cpb104/bin/activate
      +pip install google-cloud-pubsub
      +gcloud auth application-default login
      +
      +

      Then, try the send_sensor_data.py again

      +
      ./send_sensor_data.py --speedFactor=60
      +
      +

      Launch Dataflow Pipeline

      + +

      Duration is 9 min

      + +

      Step 1

      + +

      Open a new CloudShell window and navigate to the directory for this lab:

      +
      cd ~/training-data-analyst/courses/streaming/process/sandiego
      +
      +

      If this directory doesn't exist, you may need to git clone the repository first:

      +
      cd ~
      +git clone https://github.com/GoogleCloudPlatform/training-data-analyst
      +cd ~/training-data-analyst/courses/streaming/process/sandiego
      +
      +

      Step 2

      + +

      Explore the scripts that create and run a Dataflow pipeline in the cloud:

      +
      nano run_oncloud.sh
      +
      +

      The script takes 3 required arguments: project id, bucket name, classname and possibly a 4th argument: options. We will cover the options argument in a later part of the lab.

      + +

      project id : this is your GCP project

      + +

      bucket name : this your Cloud Storage bucket you created earlier

      + +

      *classname *: we have 4 java files that you can choose from, each reads the traffic data rom Pub/Sub and runs different aggregations/computations. Go into the java directory and explore one of the files we will be using:

      +
      cd src/main/java/com/google/cloud/training/dataanalyst/sandiego 
      +nano AverageSpeeds.java
      +
      +

      What does the script do?

      + +

      Step 3

      + +

      Run the Dataflow pipeline to read from PubSub and write into BigQuery

      +
      cd ~/training-data-analyst/courses/streaming/process/sandiego
      +./run_oncloud.sh yourproject yourbucket AverageSpeeds
      +
      +

      Note: make sure to plug in your project id and bucket name for the first and second arguments respectively.

      + +

      Note: If you are on a free trial account, you might get an error about insufficient quota(s) to execute this workflow with 3 instances. If so, add to the command-line in so as to keep the Dataflow pipeline under quota. If you do this, though, you will not be able to observe autoscaling.

      + +

      Explore the pipeline

      + +

      Duration is 4 min

      + +

      In this activity, you will learn more about the pipeline that you launched in the previous steps.

      + +

      This Dataflow pipeline:

      +
      • reads messages from a Pub/Sub topic,
      • +
      • parses the Json of the input message and produces one main output
      • +
      • and writes into BigQuery.
      • +
      +

      Step 1

      + +

      Go to the Dataflow Jobs page in the Cloud Console.

      + +

      Step 2

      + +

      Click on the pipeline you created in the lab, it will have your username in the pipeline name.

      + +

      de43819cb53af15f.png

      + +

      Step 4

      + +

      Compare the code you saw earlier of the pipeline (AverageSpeeds.java) and the pipeline graph in the Cloud Console.

      + +

      Step 5

      + +

      Find the "GetMessages" pipeline step in the graph, and then find the corresponding code snippet in the AverageSpeeds.java file. This is the pipeline step that reads from the Pub/Sub topic. It creates a collection of Strings - the read Pub/Sub messages.

      + +

      Do you see a subscription created?

      + +

      How does the code pull messages from Pub/Sub?

      + +

      Step 6

      + +

      Find the "Time Window" pipeline step in the graph and in code. In this pipeline step we create a window of a duration specified in the pipeline parameters (sliding window in this case). This window will accumulate the traffic data from the previous step until end of window, and pass it to the next steps for further transforms.

      + +

      What is the window interval ? How often is a new window created?

      + +

      Step 7

      + +

      Find the "BySensor" and "AvgBySensor" pipeline steps in the graph, and then find the corresponding code snippet in the AverageSpeeds.java file. This "BySensor" does a grouping of all events in the window by sensor id, while "AvgBySensor" will then compute the mean speed for each grouping.

      + +

      Step 8

      + +

      Find the "ToBQRow" pipeline step in the graph and in code. In this step we simply create a "row" with the average computed from previous step together with the lane information. In this step, you can do other interesting things like maybe compare the calculated mean against a predefined threshold and log the results of the comparison, which you can later search for in Stackdriver Logging. In the later steps, we use the predefined metrics and look at the logging info.

      + +

      Step 9

      + +

      Lastly, find the "BigQueryIO.Write" in both the pipeline graph and in source code. In this step we are writing the row out of the pipeline into a BigQuery table. Because we chose the WriteDisposition.WRITE_APPEND write disposition, new records will be appended to the table.

      + +

      Determine throughput rates

      + +

      Duration is 3 min

      + +

      One common activity when monitoring and improving Dataflow pipelines is figuring out how many elements the pipeline processes per second, what the system lag is, and how many data elements have been processed so far. In this activity you will learn where in the Cloud Console one can find information about processed elements and time.

      + +

      Step 1

      + +

      Go to the Dataflow Jobs page in the Cloud Console.

      + +

      Step 2

      + +

      Click on the pipeline you created in the lab.

      + +

      Step 3

      + +

      Select the "GetMessages" pipeline node in the graph and look at the step metrics on the right.

      +
      • System Lag is an important metric for streaming pipelines. It represents the amount of time data elements are waiting to be processed since they "arrived" in the input of the transformation step.
      • +
      • Elements Added metric under output collections tells you how many data elements exited this step (for the "Read PubSub Msg" step of our pipeline it also represents the number of Pub/Sub messages read from the topic by the Pub/Sub IO connector)
      • +
      +

      Another important metric is the Step Throughput, measured in data elements per second. You will find it inside step nodes in the pipeline graph.

      + +

      Step 4

      + +

      Select the next pipeline node in the graph - "Time Window". Observe how the Elements Added metric under the Input Collections of the "Time Window" step matches the Elements Added metric under the Output Collections of the previous step "GetMessages". Generally speaking, output of Step N will be equal to the input of the next Step N+1.

      + +

      Review BigQuery output

      + +

      Duration is 4 min

      + +

      Find the output tables in BigQuery and run commands to view written records.

      + +

      Step 1

      + +

      Open the Google Cloud Console (in the incognito window) and using the menu, navigate into BigQuery web UI, and explore the demos dataset. Note that streaming tables may not show up immediately. You can still query the tables though.

      + +

      c19c88068984ec7c.png

      + +

      Step 2

      + +

      Use the following query to observe the output from your Dataflow job.

      +
      SELECT * 
      +FROM [<PROJECTID>:demos.average_speeds] 
      +ORDER BY timestamp DESC
      +LIMIT 100
      +
      +

      Step 3

      + +

      Find the last update to the table by running the following SQL:

      +
      SELECT
      +  MAX(timestamp)
      +FROM
      +  [<PROJECTID>:demos.average_speeds]
      +
      +

      Step 4

      + +

      Use the BigQuery Table Decorator to look at results in the last 10 minutes:

      +
      SELECT
      +  *
      +FROM
      +  [<PROJECTID>:demos.average_speeds@-600000]
      +ORDER BY
      +  timestamp DESC
      +
      +

      Use the BigQuery Invalid Snapshot Time, try reducing the 60000 to perhaps 10000.

      + +

      Observe and understand autoscaling

      + +

      Duration is 4 min

      + +

      In this activity, we will observe how Dataflow scales the number of workers to process the backlog of incoming Pub/Sub messages.

      + +

      Step 1

      + +

      Go to the Dataflow Jobs page in the Cloud Console.

      + +

      Step 2

      + +

      Click on the pipeline you created in the lab. Find the Summary panel on the right, and review the Autoscaling panel. Check how many workers are currently being used to process messages in the Pub/Sub topic.

      + +

      Step 3

      + +

      Click on "See More History" link and review how many workers were used at different points in time during the pipeline execution.

      + +

      Step 4

      + +

      The data from a traffic sensor simulator started at the beginning of the lab creates hundreds of messages per second in the Pub/Sub topic. This will cause Dataflow to increase the number of workers in order to keep the system lag of the pipeline at optimal levels.

      + +

      In the "Worker History" screen, observe how Dataflow changed the number of workers, and the rationale for these decisions in the history table.

      + +

      Monitor pipelines

      + +

      Duration is 2 min

      + +

      Note: Dataflow / Stackdriver Monitoring Integration is currently available as part of an Early Access Program (EAP). Features and behavior are not final and will change as we move towards General Availability.

      + +

      Dataflow integration with Stackdriver Monitoring allows users to access Dataflow job metrics such as System Lag (for streaming jobs), Job Status (Failed, Successful), Element Counts, and User Counters from within Stackdriver.

      + +

      You can also employ Stackdriver alerting capabilities to get notified of a variety of conditions such as long streaming system lag or failed jobs.

      + +

      Dataflow / Stackdriver Monitoring Integration allows you to:

      +
      • Explore Dataflow Metrics: Browse through available Dataflow pipeline metrics (see next section for a list of metrics) and visualize them in charts.
      • +
      • Chart Dataflow metrics in Stackdriver Dashboards: Create Dashboards and chart time series of Dataflow metrics.
      • +
      • Configure Alerts: Define thresholds on job or resource group-level metrics and alert when these metrics reach specified values.
      • +
      • Monitor User-Defined Metrics: In addition to Dataflow metrics, Dataflow exposes user-defined metrics (SDK Aggregators) as Stackdriver custom counters in the Monitoring UI, available for charting and alerting.
      • +
      +

      Monitor pipelines (cont'd)

      + +

      Duration is 2 min

      + +

      What Dataflow pipeline metrics are available in Stackdriver?

      + +

      Some of the more important metrics Dataflow provides are:

      +
      • Job status: Job status (Failed, Successful), reported as an enum every 30 secs and on update.
      • +
      • Elapsed time: Job elapsed time (measured in seconds), reported every 30 secs.
      • +
      • System lag: Max lag across the entire pipeline, reported in seconds.
      • +
      • Current vCPU count: Current # of virtual CPUs used by job and updated on value change.
      • +
      • Estimated byte count: Number of bytes processed per PCollection. Note: This is a per-PCollection metric, not a job-level metric, so it is not yet available for alerting.
      • +
      +

      What are user-defined metrics?

      + +

      Any Aggregator defined in a Dataflow pipeline will be reported to Stackdriver as a custom metric. Dataflow will define a new custom metric on behalf of the user and report incremental updates to Stackdriver approximately every 30 secs.

      + +

      Explore metrics

      + +

      Duration is 3 min

      + +

      Step 1

      + +

      Navigate to Stackdriver Monitoring and go to Resources > Metrics Explorer

      + +

      Note: If this is your first time trying out Stackdriver for this project, you may need to set up for your account. Just follow the prompts to activate 30-day trial.

      + +

      Step 2

      + +

      In the Metrics Explorer, find and select the dataflow_job resource type. You should now see a list of Dataflow-related metrics you can choose from.

      + +

      Step 3

      + +

      Select a metric you want to observe for one of your jobs. The pipeline you launched at the beginning of the lab is a streaming pipeline, and one of the more important metrics of streaming pipelines is System Lag. Select System Lag as the metric to observe the system lag of the streaming pipeline you launched.

      + +

      Step 4

      + +

      Stackdriver will populate a list of jobs running in our lab project on the right side of the page. Select your pipeline and observe the progress of the metric over time.

      + +

      Create alerts

      + +

      Duration is 4 min

      + +

      If you want to be notified when a certain metric crosses a specified threshold (for example, when System Lag of our lab streaming pipeline increases above a predefined value), you could use the Alerting mechanisms of Stackdriver to accomplish that.

      + +

      Step 1

      + +

      On the Stackdriver Monitoring page, navigate to the Alerting menu and select Policies Overview.

      + +

      Step 2

      + +

      Click on Add Policy.

      + +

      Step 3

      + +

      The "Create new Alerting Policy" page allows you to define the alerting conditions and the channels of communication for alerts. For example, to set an alert on the System Lag for our lab pipeline group, do the following:

      +
      • click on "Add Condition",
      • +
      • click on "Select" under Metric Threshold,
      • +
      • select "Dataflow Job" in the Resource Type dropdown,
      • +
      • select "Single" in the "Applies To" dropdown,
      • +
      • select the group you created in the previous step,
      • +
      • select "Any Member Violates" in the "Condition Triggers If" dropdown,
      • +
      • select "System Lag" in the "If Metric" dropdown, and
      • +
      • select Condition "above" a Threshold of "5" seconds.
      • +
      +

      Click on Save Condition to save the alert.

      + +

      Step 4

      + +

      Add a Notifications channel, give the policy a name, and click on "Save Policy".

      + +

      Step 5

      + +

      After you created an Alert, you can review the Events related to Dataflow in the Alerting>Events page. Every time an alert is triggered by a Metric Threshold condition, an Incident and a corresponding Event are created in Stackdriver. If you specified a notification mechanism in the alert (email, SMS, pager, etc), you will also receive a notification.

      + +

      Set up dashboards

      + +

      Duration is 5 min

      + +

      You can easily build dashboards with the most relevant Dataflow-related charts with Stackdriver Monitoring Dashboards.

      + +

      Step 1

      + +

      On the Stackdriver Monitoring page, go to the Dashboards menu and select "Create Dashboard".

      + +

      Step 2

      + +

      Click on Add Chart.

      + +

      Step 3

      + +

      On the Add Chart page:

      +
      • select "Dataflow Job" as the Resource Type,
      • +
      • select a metric you want to chart in the Metric Type field (e.g. System Lag),
      • +
      • in the Filter panel, select a group that you created in one of the previous steps and that contains your Dataflow pipeline,
      • +
      • click "Save".
      • +
      +

      You can add more charts to the dashboard, if you would like, for example, PubSub publish rates on the topic, or subscription backlog (which is a signal to the Dataflow auto-scaler).

      + +

      Launch another streaming pipeline

      + +

      Duration is 9 min

      + +

      Step 1

      + +

      Go back to the CloudShell where you ran the first Dataflow pipeline.

      + +

      Run the CurrentConditions java code in a new Dataflow pipeline; this script is simpler in the sense that it does not do many transforms like AverageSpeeds. We will use the results in the next lab to build dashboards and run some transforms (functions) while retrieving the data from BigQuery

      +
      cd ~/training-data-analyst/courses/streaming/process/sandiego
      +./run_oncloud.sh yourproject yourbucket CurrentConditions
      +
      +

      Step 2

      + +

      Go to the Dataflow Jobs page in the Cloud Console and confirm you see the pipeline job listed. Further ensure that it is running (no errors).

      + + + +

      +

      Stop here if you are done. Wait for instructions from the Instructor before going into the next section

      +
      + +

      PART 3: STREAMING ANALYTICS AND DASHBOARDS

      + +

      Overview

      + +

      Duration is 1 min

      + +

      Data visualization tools can help you make sense of your BigQuery data and help you analyze the data interactively. You can use visualization tools to help you identify trends, respond to them, and make predictions using your data. In this lab, you use Google Data Studio to visualize data in the BigQuery table populated by your Dataflow pipeline in the previous exercise.

      + +

      What you learn

      + +

      In this lab, you:

      +
      • Connect to a BigQuery data source
      • +
      • Create reports and charts to visualize BigQuery data
      • +
      +

      Creating a data source

      + +

      Duration is 10 min

      + +

      In this section of the lab, you use Google Data Studio to visualize data in BigQuery using the BigQuery connector. You create a data source, a report, and charts that visualize data in the sample table.

      + +

      The first step in creating a report in Data Studio is to create a data source for the report. A report may contain one or more data sources. When you create a BigQuery data source, Data Studio uses the BigQuery connector.

      + +

      You must have the appropriate permissions in order to add a BigQuery data source to a Data Studio report. In addition, the permissions applied to BigQuery datasets will apply to the reports, charts, and dashboards you create in Data Studio. When a Data Studio report is shared, the report components are visible only to users who have appropriate permissions.

      + +

      To create a data source:

      + +

      Step 1

      + +

      Open Google Data Studio.

      + +

      Step 2

      + +

      On the Reports page, in the Start a new report section, click the Blank template. This creates a new untitled report.

      + +

      a8eaa86ffbba3009.png

      + +

      Step 3

      + +

      If prompted, click I accept the terms and conditions and then click Accept. You may need to click the Blank template again after agreeing to the terms and conditions.

      + +

      Step 4

      + +

      In the Add a data source window, click Create new data source.

      + +

      b83dada2910eec15.png

      + +

      Step 5

      + +

      For Connectors, click BigQuery.

      + +

      Step 6

      + +

      For Authorization, click Authorize. This allows Data Studio access to your GCP project.

      + +

      Step 7

      + +

      In the Request for permission dialog, click Allow to give Data Studio the ability to view data in BigQuery. You may not receive this prompt if you previously used Data Studio.

      + +

      Step 8

      + +

      Select My Projects, then click on your project name

      + +

      Step 9

      + +

      For Dataset, click demos.

      + +

      Step 10

      + +

      For Table, click current_conditions.

      + +

      84dd048f8bb50540.png

      + +

      Step 11

      + +

      If you need to specify a Billing Project, then select your GCP project.

      + +

      Step 12

      + +

      In the upper right corner of the window, click Connect.

      + +

      Step 13

      + +

      Once Data Studio has connected to the BigQuery data source, the table's fields are displayed. You can use this page to adjust the field properties or to create new calculated fields. Click Create report.

      + +

      355461df703fdef5.png

      + +

      Step 14

      + +

      When prompted, click Add to report.

      + +

      Step 15

      + +

      In the Request for permission dialog, click Allow to give Data Studio the ability to view and manage files in Google Drive. You may not receive this prompt if you previously used Data Studio.

      + +

      Creating a bar chart using a calculated field

      + +

      Duration is 15 min

      + +

      Introduction

      + +

      Once you have added the current_conditions data source to the report, the next step is to create a visualization. Begin by creating a bar chart. The bar chart displays the total number of vehicles captured for each highway. To display this, you create a calculated field as follows:

      + +

      Step 1

      + +

      (Optional) At the top of the page, click Untitled Report to change the report name. For example, type -report1-yourname.

      + +

      Step 2

      + +

      When the report editor loads, click Insert > Bar chart.

      + +

      Step 3

      + +

      Using the handle, draw a rectangle on the report to display the chart.

      + +

      Step 4

      + +

      In the Bar chart properties window, on the Data tab, notice the value for Data Source (current_conditions) and the default values for Dimension and Metric.

      + +

      Step 5

      + +

      If Dimension is not set to , then change Dimension to . In the Dimension section, click the existing dimension.

      + +

      38ab1ca54f8d67b7.png

      + +

      Step 6

      + +

      In the Dimension picker, select highway.

      + +

      Step 7

      + +

      Click the back arrow 1e6c7195ed36171.png to close the Dimension picker.

      + +

      Step 8

      + +

      In the Metric section, click the existing metric.

      + +

      38ab1ca54f8d67b7.png

      + +

      Step 9

      + +

      In the Metric picker, click Create new metric.

      + +

      Step 10

      + +

      Click d4c82cbdef400df2.png (Create a calculated field). To display a count of the number of vehicles using each highway, create a calculated field. For this lab, you count the entries in the field. The value is irrespective, we just need the number of occurrences.

      + +

      Step 11

      + +

      For Name, type vehicles.

      + +

      Step 12

      + +

      Leave the ID unchanged.

      + +

      Step 13

      + +

      For Formula, type the following (or use the formula assistant): COUNT(sensorId).

      + +

      Step 14

      + +

      Click Create field.

      + +

      a9b0ebd82a9beb86.png

      + +

      Step 15

      + +

      Click Done.

      + +

      Step 16

      + +

      In the Metric picker, select vehicles.

      + +

      Step 17

      + +

      Click the back arrow to close the Metric picker. The Dimension should be set to highway and the Metric should be set to vehicles. Notice the chart is sorted in Descending order by default. The highway with the most vehicles are displayed first.

      + +

      8220855e9c967fa8.png

      + +

      Step 18

      + +

      To enhance the chart, change the bar labels. In the Bar chart properties window, click the Style tab.

      + +

      Step 19

      + +

      In the Bar chart section, check Show data labels.

      + +

      a64a68e7b215691f.png

      + +

      The total number of vehicles is displayed above each bar in the chart.

      + +

      Creating a chart using a custom query

      + +

      Duration is 15 min

      + +

      Introduction

      + +

      Because Data Studio does not allow aggregations on metrics, some report components are easier to generate using a custom SQL query. The Custom Query option also lets you leverage BigQuery's full query capabilities such as joins, unions, and analytical functions.

      + +

      Alternatively, you can leverage BigQuery's full query capabilities by creating a view. A view is a virtual table defined by a SQL query. You can query data in a view by adding the dataset containing the view as a data source.

      + +

      When you specify a SQL query as your BigQuery data source, the results of the query are in table format, which becomes the field definition (schema) for your data source. When you use a custom query as a data source, Data Studio uses your SQL as an inner select statement for each generated query to BigQuery. For more information on custom queries in Data Studio, consult the online help.

      + +

      To add a bar chart to your report that uses a custom query data source:

      + +

      Step 1

      + +

      Click Insert > Bar chart.

      + +

      Step 2

      + +

      Using the handle, draw a rectangle on the report to display the chart.

      + +

      Step 3

      + +

      In the Bar chart properties window, on the Data tab, notice the value for Data Source (natality) and the default values for Dimension and Metric are the same as the previous chart. In the Data Source section, click 691cfe3a6f7dc4b6.png (Select data source).

      + +

      b3fd0f90481c54bb.png

      + +

      Step 4

      + +

      Click Create new data source.

      + +

      Step 5

      + +

      For Connectors, click BigQuery.

      + +

      Step 6

      + +

      For My Projects, click Custom query.

      + +

      Step 7

      + +

      For Project, select your GCP project.

      + +

      Step 8

      + +

      Type the following in the Enter custom query window:

      +
      SELECT max(speed) as maxspeed, min(speed) as minspeed, avg(speed) as avgspeed, highway FROM [<PROJECTID>:demos.current_conditions] group by highway
      +
      +

      This query uses max/min/avg functions to give you the same for each highway..

      + +

      Step 9

      + +

      At the top of the window, click Untitled data source, and change the data source name to San Diego highway traffic summary.

      + +

      Step 10

      + +

      In the upper right corner of the window, click Connect. Once Data Studio has connected to the BigQuery data source, the results of the query are used to determine the table schema.

      + +

      Step 11

      + +

      When the schema is displayed, notice the type and aggregation for each field.

      + +

      479c1d487aacc182.png

      + +

      Step 12

      + +

      Click Add to report.

      + +

      Step 13

      + +

      When prompted, click Add to report.

      + +

      Step 14

      + +

      Data Studio may be unable to determine the appropriate Dimension and Metrics for the chart. This results in the error: . In the Bar chart properties, on the Data tab, in the Dimension section, click Invalid metric.

      + +

      d1cd361fae2c033e.png

      + +

      Step 15

      + +

      In the Metric picker, select maxspeed.

      + +

      Step 16

      + +

      Click the back arrow to close the Metric picker.

      + +

      Step 17

      + +

      In the Metric section, click Add a metric.

      + +

      Step 18

      + +

      In the Metric picker, select minspeed.

      + +

      Step 19

      + +

      Click the back arrow to close the Metric picker.

      + +

      Step 20

      + +

      In the Metric section, click Add a metric.

      + +

      Step 21

      + +

      In the Metric picker, select avgspeed.

      + +

      Step 22

      + +

      Click the back arrow to close the Metric picker. Your chart now displays the max speed, minimum speed and average speed for each highway.

      + +

      bad3d793f601daaa.png

      + +

      Step 23

      + +

      For readability, change the chart styles. In the Bar chart properties, click the Style tab.

      + +

      Step 24

      + +

      In the Bar chart __section, *deselect *Single color__.

      + +

      7bd8a09db9ac3e4.png

      + +

      Step 25

      + +

      Notice each bar has a default color based on the order the metrics were added to the chart.

      + +

      6482fcba53715260.png

      + +

      Viewing your query history

      + +

      Duration is 3 min

      + +

      Introduction

      + +

      You can view queries submitted via the BigQuery Connector by examining your query history in the BigQuery web interface. Using the query history, you can estimate query costs, and you can save queries for use in other scenarios.

      + +

      To examine your query history:

      + +

      Step 1

      + +

      In the Google Cloud Console, using the menu, navigate into BigQuery web UI, click Query History. (Note: you may need to refresh the BigQuery Web UI).

      + +

      Step 2

      + +

      The list of queries is displayed with the most recent queries first. Click Open Query to view details on the query such as Job ID and Bytes Processed.

      + +

      a17b00121caebd9f.png

      + +

      3381eeb97bcde1a0.png

      + + + +

      +

      Stop here if you are done. Wait for instructions from the Instructor before going into the next section

      +
      + +

      PART 4: STREAMING DATA PIPELINES INTO BIGTABLE

      + +

      Overview

      + +

      Duration is 1 min

      + +

      In this lab you will use Dataflow to collect traffic events from simulated traffic sensor data made available through Google Cloud PubSub, and write them into a Bigtable table.

      + +

      What you learn

      + +

      In this lab, you will learn how to:

      +
      • Launch Dataflow pipeline to read from PubSub and write into Bigtable
      • +
      • Open an HBase shell to query the Bigtable data
      • +
      +

      Simulate your traffic sensor data into PubSub

      + +

      Step 1

      + +

      In Cloud Shell, run the script to download and unzip the quickstart files (you will later use these to run the HBase shell)

      +
      cd ~/training-data-analyst/courses/streaming/process/sandiego
      +./install_quickstart.sh
      +
      +

      Step 2

      + +

      In Cloud Shell, start the script to read from the csv data and publish to PubSub

      +
      cd ~/training-data-analyst/courses/streaming/publish
      +./send_sensor_data.py --speedFactor=30
      +
      +

      This command will send 1 hour of data in 2 minutes

      + +

      Note:

      +
      • If you get the google.gax.errors.RetryError: GaxError OR "StatusCode.PERMISSION_DENIED, User not authorized to perform this action.", then simply re-authenticate the shell and run the script again
      • +
      gcloud auth application-default login
      +./send_sensor_data.py --speedFactor=30
      +
      • If this fails because google.cloud.pubsub can not be found, then do the pip install below and run the send_sensor_data.py again:
      • +
      sudo pip install google-cloud-pubsub
      +./send_sensor_data.py --speedFactor=30
      +
      • If you get a failure that the module pubsub has no attribute called Client then you are running into path problems because an older version of pub/sub is installed on your machine. The solution is to use virtualenv:
      • +
      virtualenv cpb104
      +source cpb104/bin/activate
      +pip install google-cloud-pubsub
      +gcloud auth application-default login
      +
      +

      Then, try the send_sensor_data.py again

      +
      ./send_sensor_data.py --speedFactor=30
      +
      +

      Launch Dataflow Pipeline

      + +

      Duration is 9 min

      + +

      Step 1

      + +

      Open a new CloudShell window and navigate to the directory for this lab:

      +
      cd ~/training-data-analyst/courses/streaming/process/sandiego
      +
      +

      If this directory doesn't exist, you may need to git clone the repository first:

      +
      cd ~
      +git clone https://github.com/GoogleCloudPlatform/training-data-analyst
      +cd ~/training-data-analyst/courses/streaming/process/sandiego
      +
      +

      Step 2

      + +

      Ensure to authenticate shell to have the right permissions for the pipeline later

      +
      gcloud auth application-default login
      +
      +

      Step 3

      + +

      Explore the scripts that create and run a Dataflow pipeline in the cloud:

      +
      nano run_oncloud.sh
      +
      +

      The script takes 3 required arguments: project id, bucket name, classname and possibly a 4th argument: options. In this part of the lab, we will use the option which will direct the pipeline to write into Cloud Bigtable.

      + +

      Example: ./run_on_cloud.sh qwiklabs-gcp-123456 my-bucket1 CurrentConditions --bigtable

      +
      cd src/main/java/com/google/cloud/training/dataanalyst/sandiego 
      +nano CurrentConditions.java
      +
      +

      What does the script do?

      + +

      Step 4

      + +

      Run the script below to create the Bigtable instance

      +
      cd ~/training-data-analyst/courses/streaming/process/sandiego
      +./create_cbt.sh
      +
      +

      Step 5

      + +

      Run the Dataflow pipeline to read from PubSub and write into Cloud Bigtable

      +
      cd ~/training-data-analyst/courses/streaming/process/sandiego
      +./run_oncloud.sh yourproject yourbucket CurrentConditions --bigtable
      +
      +

      Note: make sure to plug in your project id and bucket name for the first and second arguments respectively.

      + +

      Explore the pipeline

      + +

      Duration is 4 min

      + +

      In this activity, you will learn more about the pipeline you just launched that writes into Bigtable

      + +

      Step 1

      + +

      Go to the Dataflow Jobs page in the Cloud Console.

      + +

      Step 2

      + +

      Click on the pipeline you created in the lab, it will have "currentconditions" followed by your username in the pipeline name.

      + +

      de43819cb53af15f.png

      + +

      Step 3

      + +

      Find the "write:cbt" step in the pipeline graph, and click on the down arrow on the right to see the writer in action. Review the Bigtable options in the step summary.

      + +

      Query Bigtable data

      + +

      Step 1

      + +

      Back at the cloud shell, run the quickstart.sh script to launch the HBase shell:

      +
      cd ~/training-data-analyst/courses/streaming/process/sandiego/quickstart
      +./quickstart.sh
      +
      +

      If the script runs successfully, you would be in a HBase shell prompt that looks something like:

      + +

      + +

      Step 2

      + +

      At the HBase shell prompt, type the following query to retrieve 2 rows from your Bigtable table that was populated by the pipeline.

      +
      scan 'current_conditions', {'LIMIT' => 2}
      +
      +

      Review the output. Notice each row is broken into column,timestamp,value combinations.

      + +

      Step 3

      + +

      Lets run another query. This time we only look at the lane:speed column, and limit to 10 rows, and also specify rowid patterns for start and end rows to scan over.

      +
      scan 'current_conditions', {'LIMIT' => 10, STARTROW => '15#S#1', ENDROW => '15#S#999', COLUMN => 'lane:speed'}
      +
      +

      Review the output. Notice that you see 10 of the column,timestamp,value combinations, all of which correspond to Highway 15. Also notice that column is restricted to lane:speed.

      + +

      Step 4

      + +

      Feel free to run other queries if you are familiar with the syntax. Once you're satisfied, ‘quit' to exit the shell.

      +
      quit
      +
      +

      Cleanup

      + +

      Step 1

      + +

      Run the script to delete your Bigtable instance

      +
      cd ~/training-data-analyst/courses/streaming/process/sandiego
      +./delete_cbt.sh
      +
      +

      Step 2

      + +

      On your Dataflow page in your Cloud Console, click on the pipeline job name and click the ‘stop job' on the right panel.

      + +

      Step 3

      + +

      Go back to the first Cloud Shell tab with the publisher and type to stop it.

      + +

      Step 4

      + +

      Go to the BigQuery console and delete the dataset .

      + +

      Provide Feedback on this Lab

      + +
      + + + +
      +
      + +
      +
      +× +
      +
      +
      +
      + +
      + +
      +
      + +
      + + + + + + + + + +
      +
      + + +
      + + +");d=e.children()[0];b("body").append(e);a=d.offsetWidth;e.css("overflow","scroll");d=d.offsetWidth; +a===d&&(d=e[0].clientWidth);e.remove();return c=a-d},getScrollInfo:function(a){var c=a.isWindow||a.isDocument?"":a.element.css("overflow-x"),d=a.isWindow||a.isDocument?"":a.element.css("overflow-y"),c="scroll"===c||"auto"===c&&a.widthd?"left":0h?"top":0f(g(e),g(h))?l.important="horizontal":l.important="vertical";c.using.call(this,a,l)});m.offset(b.extend(R,{using:l}))})};b.ui.position={fit:{left:function(a,b){var c=b.within,d=c.isWindow?c.scrollLeft:c.offset.left,e=c.width,h=a.left-b.collisionPosition.marginLeft,c=d-h,l=h+b.collisionWidth-e-d;b.collisionWidth> +e?0=l?(d=a.left+c+b.collisionWidth-e-d,a.left+=c-d):a.left=0=c?d:c>l?d+e-b.collisionWidth:d:a.left=0e?0=l?(d=a.top+c+b.collisionHeight-e-d,a.top+=c-d):a.top=0=c?d:c>l?d+e-b.collisionHeight:d:a.top=0c){if(d=a.left+h+m+p+b.collisionWidth-e-d,0>d||dc){if(d=a.top+h+m+p+b.collisionHeight-e-d,0>d||dd;a.innerHTML="";c.removeChild(a)})()})();return b.ui.position}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./widget","./position"],b):b(jQuery)})(function(b){return b.widget("ui.menu",{version:"1.11.4",defaultElement:"
      ":""):"");L+=J}E+=L}a._keyEvent=!1;return E+g},_generateMonthYearHeader:function(a,b,c,d,e,f,g,u){var w,B,x,D=this._get(a,"changeMonth"),y=this._get(a,"changeYear"),H=this._get(a,"showMonthAfterYear"), +E="
      ",A="";if(f||!D)A+=""+g[b]+"";else{g=d&&d.getFullYear()===c;w=e&&e.getFullYear()===c;A+=""}H||(E+=A+(!f&&D&&y?"":" "));if(!a.yearshtml)if(a.yearshtml="",f||!y)E+=""+ +c+"";else{u=this._get(a,"yearRange").split(":");x=(new Date).getFullYear();g=function(a){a=a.match(/c[+\-].*/)?c+parseInt(a.substring(1),10):a.match(/[+\-].*/)?x+parseInt(a,10):parseInt(a,10);return isNaN(a)?x:a};b=g(u[0]);u=Math.max(b,g(u[1]||""));b=d?Math.max(b,d.getFullYear()):b;u=e?Math.min(u,e.getFullYear()):u;for(a.yearshtml+="";E+=a.yearshtml;a.yearshtml=null}E+=this._get(a,"yearSuffix");H&&(E+=(!f&&D&&y?"":" ")+A);return E+"
      "},_adjustInstDate:function(a,b,c){var d=a.drawYear+("Y"===c?b:0),e=a.drawMonth+("M"===c?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+("D"===c?b:0);d=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,b)));a.selectedDay=d.getDate();a.drawMonth=a.selectedMonth=d.getMonth();a.drawYear=a.selectedYear=d.getFullYear();"M"!== +c&&"Y"!==c||this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),c=c&&bd?d:c},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return null==a?[1,1]:"number"===typeof a?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)}, +_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,d+(0>b?b:e[0]*e[1]),1));0>b&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c,d,e=this._getMinMaxDate(a,"min"),f=this._getMinMaxDate(a,"max"),g=null,u=null;if(c= +this._get(a,"yearRange"))c=c.split(":"),d=(new Date).getFullYear(),g=parseInt(c[0],10),u=parseInt(c[1],10),c[0].match(/[+\-].*/)&&(g+=d),c[1].match(/[+\-].*/)&&(u+=d);return(!e||b.getTime()>=e.getTime())&&(!f||b.getTime()<=f.getTime())&&(!g||b.getFullYear()>=g)&&(!u||b.getFullYear()<=u)},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff"),b="string"!==typeof b?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a, +"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);b=b?"object"===typeof b?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});b.fn.datepicker=function(a){if(!this.length)return this; +b.datepicker.initialized||(b(document).mousedown(b.datepicker._checkExternalClick),b.datepicker.initialized=!0);0===b("#"+b.datepicker._mainDivId).length&&b("body").append(b.datepicker.dpDiv);var c=Array.prototype.slice.call(arguments,1);return"string"===typeof a&&("isDisabled"===a||"getDate"===a||"widget"===a)||"option"===a&&2===arguments.length&&"string"===typeof arguments[1]?b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(c)):this.each(function(){"string"===typeof a?b.datepicker["_"+ +a+"Datepicker"].apply(b.datepicker,[this].concat(c)):b.datepicker._attachDatepicker(this,a)})};b.datepicker=new d;b.datepicker.initialized=!1;b.datepicker.uuid=(new Date).getTime();b.datepicker.version="1.11.4";return b.datepicker}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./widget"],b):b(jQuery)})(function(b){var a=!1;b(document).mouseup(function(){a=!1});return b.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(c){if(!0===b.data(c.target,a.widgetName+".preventClickEvent"))return b.removeData(c.target, +a.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(d){if(!a){this._mouseMoved=!1;this._mouseStarted&&this._mouseUp(d);this._mouseDownEvent=d;var c=this,e=1===d.which,f="string"===typeof this.options.cancel&&d.target.nodeName? +b(d.target).closest(this.options.cancel).length:!1;if(!e||f||!this._mouseCapture(d))return!0;this.mouseDelayMet=!this.options.delay;this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)&&(this._mouseStarted=!1!==this._mouseStart(d),!this._mouseStarted))return d.preventDefault(),!0;!0===b.data(d.target,this.widgetName+".preventClickEvent")&&b.removeData(d.target,this.widgetName+".preventClickEvent"); +this._mouseMoveDelegate=function(a){return c._mouseMove(a)};this._mouseUpDelegate=function(a){return c._mouseUp(a)};this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);d.preventDefault();return a=!0}},_mouseMove:function(a){if(this._mouseMoved&&(b.ui.ie&&(!document.documentMode||9>document.documentMode)&&!a.button||!a.which))return this._mouseUp(a);if(a.which||a.button)this._mouseMoved=!0;if(this._mouseStarted)return this._mouseDrag(a), +a.preventDefault();this._mouseDistanceMet(a)&&this._mouseDelayMet(a)&&((this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,a))?this._mouseDrag(a):this._mouseUp(a));return!this._mouseStarted},_mouseUp:function(d){this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);this._mouseStarted&&(this._mouseStarted=!1,d.target===this._mouseDownEvent.target&&b.data(d.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(d)); +return a=!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],b):b(jQuery)})(function(b){b.widget("ui.draggable",b.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both", +snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative();this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._setHandleClassName();this._mouseInit()},_setOption:function(a,b){this._super(a,b);"handle"===a&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")? +this.destroyOnClear=!0:(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(a){var d=this.options;this._blurActiveElement(a);if(this.helper||d.disabled||0").css("position","absolute").appendTo(a.parent()).outerWidth(a.outerWidth()).outerHeight(a.outerHeight()).offset(a.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(a){var d=this.document[0];if(this.handleElement.is(a.target))try{d.activeElement&&"body"!==d.activeElement.nodeName.toLowerCase()&&b(d.activeElement).blur()}catch(c){}},_mouseStart:function(a){var d=this.options;this.helper= +this._createHelper(a);this.helper.addClass("ui-draggable-dragging");this._cacheHelperProportions();b.ui.ddmanager&&(b.ui.ddmanager.current=this);this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent(!0);this.offsetParent=this.helper.offsetParent();this.hasFixedAncestor=0c[2]&&(f=c[2]+this.offset.click.left),a.pageY-this.offset.click.top>c[3]&&(e=c[3]+this.offset.click.top)),g.grid&&(e=g.grid[1]?this.originalPageY+Math.round((e-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY,e=c?e-this.offset.click.top>=c[1]||e-this.offset.click.top>c[3]?e:e-this.offset.click.top>=c[1]?e-g.grid[1]:e+g.grid[1]:e,f=g.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/g.grid[0])*g.grid[0]:this.originalPageX, +f=c?f-this.offset.click.left>=c[0]||f-this.offset.click.left>c[2]?f:f-this.offset.click.left>=c[0]?f-g.grid[0]:f+g.grid[0]:f),"y"===g.axis&&(f=this.originalPageX),"x"===g.axis&&(e=this.originalPageY));return{top:e-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:h?0: +this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove();this.helper=null;this.cancelHelperRemoval=!1;this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto"));"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()), +this.helper.css("bottom","auto"))},_trigger:function(a,d,c){c=c||this._uiHash();b.ui.plugin.call(this,a,[d,c,this],!0);/^(drag|start|stop)/.test(a)&&(this.positionAbs=this._convertPositionTo("absolute"),c.offset=this.positionAbs);return b.Widget.prototype._trigger.call(this,a,d,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});b.ui.plugin.add("draggable","connectToSortable",{start:function(a,d,c){var e= +b.extend({},d,{item:c.element});c.sortables=[];b(c.options.connectToSortable).each(function(){var d=b(this).sortable("instance");d&&!d.options.disabled&&(c.sortables.push(d),d.refreshPositions(),d._trigger("activate",a,e))})},stop:function(a,d,c){var e=b.extend({},d,{item:c.element});c.cancelHelperRemoval=!1;b.each(c.sortables,function(){this.isOver?(this.isOver=0,c.cancelHelperRemoval=!0,this.cancelHelperRemoval=!1,this._storedCSS={position:this.placeholder.css("position"),top:this.placeholder.css("top"), +left:this.placeholder.css("left")},this._mouseStop(a),this.options.helper=this.options._helper):(this.cancelHelperRemoval=!0,this._trigger("deactivate",a,e))})},drag:function(a,d,c){b.each(c.sortables,function(){var e=!1,f=this;f.positionAbs=c.positionAbs;f.helperProportions=c.helperProportions;f.offset.click=c.offset.click;f._intersectsWith(f.containerCache)&&(e=!0,b.each(c.sortables,function(){this.positionAbs=c.positionAbs;this.helperProportions=c.helperProportions;this.offset.click=c.offset.click; +this!==f&&this._intersectsWith(this.containerCache)&&b.contains(f.element[0],this.element[0])&&(e=!1);return e}));e?(f.isOver||(f.isOver=1,c._parent=d.helper.parent(),f.currentItem=d.helper.appendTo(f.element).data("ui-sortable-item",!0),f.options._helper=f.options.helper,f.options.helper=function(){return d.helper[0]},a.target=f.currentItem[0],f._mouseCapture(a,!0),f._mouseStart(a,!0,!0),f.offset.click.top=c.offset.click.top,f.offset.click.left=c.offset.click.left,f.offset.parent.left-=c.offset.parent.left- +f.offset.parent.left,f.offset.parent.top-=c.offset.parent.top-f.offset.parent.top,c._trigger("toSortable",a),c.dropped=f.element,b.each(c.sortables,function(){this.refreshPositions()}),c.currentItem=c.element,f.fromOutside=c),f.currentItem&&(f._mouseDrag(a),d.position=f.position)):f.isOver&&(f.isOver=0,f.cancelHelperRemoval=!0,f.options._revert=f.options.revert,f.options.revert=!1,f._trigger("out",a,f._uiHash(f)),f._mouseStop(a,!0),f.options.revert=f.options._revert,f.options.helper=f.options._helper, +f.placeholder&&f.placeholder.remove(),d.helper.appendTo(c._parent),c._refreshOffsets(a),d.position=c._generatePosition(a,!0),c._trigger("fromSortable",a),c.dropped=!1,b.each(c.sortables,function(){this.refreshPositions()}))})}});b.ui.plugin.add("draggable","cursor",{start:function(a,d,c){a=b("body");c=c.options;a.css("cursor")&&(c._cursor=a.css("cursor"));a.css("cursor",c.cursor)},stop:function(a,d,c){a=c.options;a._cursor&&b("body").css("cursor",a._cursor)}});b.ui.plugin.add("draggable","opacity", +{start:function(a,d,c){a=b(d.helper);c=c.options;a.css("opacity")&&(c._opacity=a.css("opacity"));a.css("opacity",c.opacity)},stop:function(a,d,c){a=c.options;a._opacity&&b(d.helper).css("opacity",a._opacity)}});b.ui.plugin.add("draggable","scroll",{start:function(a,b,c){c.scrollParentNotHidden||(c.scrollParentNotHidden=c.helper.scrollParent(!1));c.scrollParentNotHidden[0]!==c.document[0]&&"HTML"!==c.scrollParentNotHidden[0].tagName&&(c.overflowOffset=c.scrollParentNotHidden.offset())},drag:function(a, +d,c){d=c.options;var e=!1,f=c.scrollParentNotHidden[0],g=c.document[0];f!==g&&"HTML"!==f.tagName?(d.axis&&"x"===d.axis||(c.overflowOffset.top+f.offsetHeight-a.pageYm+w||yn+w||!b.contains(c.snapElements[q].item.ownerDocument,c.snapElements[q].item)?(c.snapElements[q].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,a,b.extend(c._uiHash(),{snapItem:c.snapElements[q].item})),c.snapElements[q].snapping= +!1):("inner"!==u.snapMode&&(e=Math.abs(p-y)<=w,f=Math.abs(n-D)<=w,g=Math.abs(l-x)<=w,h=Math.abs(m-B)<=w,e&&(d.position.top=c._convertPositionTo("relative",{top:p-c.helperProportions.height,left:0}).top),f&&(d.position.top=c._convertPositionTo("relative",{top:n,left:0}).top),g&&(d.position.left=c._convertPositionTo("relative",{top:0,left:l-c.helperProportions.width}).left),h&&(d.position.left=c._convertPositionTo("relative",{top:0,left:m}).left)),r=e||f||g||h,"outer"!==u.snapMode&&(e=Math.abs(p-D)<= +w,f=Math.abs(n-y)<=w,g=Math.abs(l-B)<=w,h=Math.abs(m-x)<=w,e&&(d.position.top=c._convertPositionTo("relative",{top:p,left:0}).top),f&&(d.position.top=c._convertPositionTo("relative",{top:n-c.helperProportions.height,left:0}).top),g&&(d.position.left=c._convertPositionTo("relative",{top:0,left:l}).left),h&&(d.position.left=c._convertPositionTo("relative",{top:0,left:m-c.helperProportions.width}).left)),!c.snapElements[q].snapping&&(e||f||g||h||r)&&c.options.snap.snap&&c.options.snap.snap.call(c.element, +a,b.extend(c._uiHash(),{snapItem:c.snapElements[q].item})),c.snapElements[q].snapping=e||f||g||h||r)}});b.ui.plugin.add("draggable","stack",{start:function(a,d,c){var e;a=b.makeArray(b(c.options.stack)).sort(function(a,c){return(parseInt(b(a).css("zIndex"),10)||0)-(parseInt(b(c).css("zIndex"),10)||0)});a.length&&(e=parseInt(b(a[0]).css("zIndex"),10)||0,b(a).each(function(a){b(this).css("zIndex",e+a)}),this.css("zIndex",e+a.length))}});b.ui.plugin.add("draggable","zIndex",{start:function(a,d,c){a= +b(d.helper);c=c.options;a.css("zIndex")&&(c._zIndex=a.css("zIndex"));a.css("zIndex",c.zIndex)},stop:function(a,d,c){a=c.options;a._zIndex&&b(d.helper).css("zIndex",a._zIndex)}});return b.ui.draggable}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],b):b(jQuery)})(function(b){b.widget("ui.resizable",b.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(a){return parseInt(a, +10)||0},_isNumber:function(a){return!isNaN(parseInt(a,10))},_hasScroll:function(a,d){if("hidden"===b(a).css("overflow"))return!1;var c=d&&"left"===d?"scrollLeft":"scrollTop",e=!1;if(0").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"), +marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}), +this._proportionallyResize());this.handles=h.handles||(b(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");this._handles=b();if(this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),a=this.handles.split(","),this.handles={},d=0;d"),e.css({zIndex:h.zIndex}),"se"===c&&e.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[c]=".ui-resizable-"+c,this.element.append(e);this._renderAxis=function(a){var c,d,e;a=a||this.element;for(c in this.handles){if(this.handles[c].constructor===String)this.handles[c]=this.element.children(this.handles[c]).first().show();else if(this.handles[c].jquery||this.handles[c].nodeType)this.handles[c]=b(this.handles[c]),this._on(this.handles[c],{mousedown:g._mouseDown});this.elementIsWrapper&& +this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(d=b(this.handles[c],this.element),e=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth(),d=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join(""),a.css(d,e),this._proportionallyResize());this._handles=this._handles.add(this.handles[c])}};this._renderAxis(this.element);this._handles=this._handles.add(this.element.find(".ui-resizable-handle"));this._handles.disableSelection(); +this._handles.mouseover(function(){g.resizing||(this.className&&(e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),g.axis=e&&e[1]?e[1]:"se")});h.autoHide&&(this._handles.hide(),b(this.element).addClass("ui-resizable-autohide").mouseenter(function(){h.disabled||(b(this).removeClass("ui-resizable-autohide"),g._handles.show())}).mouseleave(function(){h.disabled||g.resizing||(b(this).addClass("ui-resizable-autohide"),g._handles.hide())}));this._mouseInit()},_destroy:function(){this._mouseDestroy(); +var a,d=function(a){b(a).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};this.elementIsWrapper&&(d(this.element),a=this.element,this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")}).insertAfter(a),a.remove());this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement); +return this},_mouseCapture:function(a){var d,c,e=!1;for(d in this.handles)if(c=b(this.handles[d])[0],c===a.target||b.contains(c,a.target))e=!0;return!this.options.disabled&&e},_mouseStart:function(a){var d,c,e=this.options,f=this.element;this.resizing=!0;this._renderProxy();d=this._num(this.helper.css("left"));c=this._num(this.helper.css("top"));e.containment&&(d+=b(e.containment).scrollLeft()||0,c+=b(e.containment).scrollTop()||0);this.offset=this.helper.offset();this.position={left:d,top:c};this.size= +this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:f.width(),height:f.height()};this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()};this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()};this.originalPosition={left:d,top:c};this.originalMousePosition={left:a.pageX,top:a.pageY};this.aspectRatio="number"===typeof e.aspectRatio?e.aspectRatio:this.originalSize.width/this.originalSize.height|| +1;d=b(".ui-resizable-"+this.axis).css("cursor");b("body").css("cursor","auto"===d?this.axis+"-resize":d);f.addClass("ui-resizable-resizing");this._propagate("start",a);return!0},_mouseDrag:function(a){var d,c=this.originalMousePosition;d=a.pageX-c.left||0;var c=a.pageY-c.top||0,e=this._change[this.axis];this._updatePrevProperties();if(!e)return!1;d=e.apply(this,[a,d,c]);this._updateVirtualBoundaries(a.shiftKey);if(this._aspectRatio||a.shiftKey)d=this._updateRatio(d,a);d=this._respectSize(d,a);this._updateCache(d); +this._propagate("resize",a);d=this._applyChanges();!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();b.isEmptyObject(d)||(this._updatePrevProperties(),this._trigger("resize",a,this.ui()),this._applyChanges());return!1},_mouseStop:function(a){this.resizing=!1;var d,c,e,f=this.options;this._helper&&(d=this._proportionallyResizeElements,d=(c=d.length&&/textarea/i.test(d[0].nodeName))&&this._hasScroll(d[0],"left")?0:this.sizeDiff.height,c=c?0:this.sizeDiff.width,c= +{width:this.helper.width()-c,height:this.helper.height()-d},d=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null,e=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null,f.animate||this.element.css(b.extend(c,{top:e,left:d})),this.helper.height(this.size.height),this.helper.width(this.size.width),this._helper&&!f.animate&&this._proportionallyResize());b("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing"); +this._propagate("stop",a);this._helper&&this.helper.remove();return!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left};this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var a={};this.position.top!==this.prevPosition.top&&(a.top=this.position.top+"px");this.position.left!==this.prevPosition.left&&(a.left=this.position.left+"px");this.size.width!==this.prevSize.width&&(a.width=this.size.width+"px");this.size.height!== +this.prevSize.height&&(a.height=this.size.height+"px");this.helper.css(a);return a},_updateVirtualBoundaries:function(a){var b,c,e,f;f=this.options;f={minWidth:this._isNumber(f.minWidth)?f.minWidth:0,maxWidth:this._isNumber(f.maxWidth)?f.maxWidth:Infinity,minHeight:this._isNumber(f.minHeight)?f.minHeight:0,maxHeight:this._isNumber(f.maxHeight)?f.maxHeight:Infinity};if(this._aspectRatio||a)a=f.minHeight*this.aspectRatio,c=f.minWidth/this.aspectRatio,b=f.maxHeight*this.aspectRatio,e=f.maxWidth/this.aspectRatio, +a>f.minWidth&&(f.minWidth=a),c>f.minHeight&&(f.minHeight=c),ba.width,h=this._isNumber(a.height)&&b.minHeight&& +b.minHeight>a.height,l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,p=/sw|nw|w/.test(c),c=/nw|ne|n/.test(c);g&&(a.width=b.minWidth);h&&(a.height=b.minHeight);e&&(a.width=b.maxWidth);f&&(a.height=b.maxHeight);g&&p&&(a.left=l-b.minWidth);e&&p&&(a.left=l-b.maxWidth);h&&c&&(a.top=m-b.minHeight);f&&c&&(a.top=m-b.maxHeight);a.width||a.height||a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null;return a},_getPaddingPlusBorderDimensions:function(a){var b= +0,c=[],e=[a.css("borderTopWidth"),a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")];for(a=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];4>b;b++)c[b]=parseInt(e[b],10)||0,c[b]+=parseInt(a[b],10)||0;return{height:c[0]+c[2],width:c[1]+c[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var a,b=0,c=this.helper||this.element;b"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+ +"px",top:this.elementOffset.top+"px",zIndex:++a.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){return{left:this.originalPosition.left+b,width:this.originalSize.width-b}},n:function(a,b,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(a,d,c){return b.extend(this._change.s.apply(this, +arguments),this._change.e.apply(this,[a,d,c]))},sw:function(a,d,c){return b.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[a,d,c]))},ne:function(a,d,c){return b.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[a,d,c]))},nw:function(a,d,c){return b.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[a,d,c]))}},_propagate:function(a,d){b.ui.plugin.call(this,a,[d,this.ui()]);"resize"!==a&&this._trigger(a,d,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement, +element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});b.ui.plugin.add("resizable","animate",{stop:function(a){var d=b(this).resizable("instance"),c=d.options,e=d._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&d._hasScroll(e[0],"left")?0:d.sizeDiff.height,f={width:d.size.width-(f?0:d.sizeDiff.width),height:d.size.height-g},g=parseInt(d.element.css("left"),10)+(d.position.left- +d.originalPosition.left)||null,h=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;d.element.animate(b.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var c={width:parseInt(d.element.css("width"),10),height:parseInt(d.element.css("height"),10),top:parseInt(d.element.css("top"),10),left:parseInt(d.element.css("left"),10)};e&&e.length&&b(e[0]).css({width:c.width,height:c.height});d._updateCache(c);d._propagate("resize", +a)}})}});b.ui.plugin.add("resizable","containment",{start:function(){var a,d,c,e,f,g=b(this).resizable("instance"),h=g.element;c=g.options.containment;if(h=c instanceof b?c.get(0):/parent/.test(c)?h.parent().get(0):c)g.containerElement=b(h),/document/.test(c)||c===document?(g.containerOffset={left:0,top:0},g.containerPosition={left:0,top:0},g.parentData={element:b(document),left:0,top:0,width:b(document).width(),height:b(document).height()||document.body.parentNode.scrollHeight}):(a=b(h),d=[],b(["Top", +"Right","Left","Bottom"]).each(function(b,c){d[b]=g._num(a.css("padding"+c))}),g.containerOffset=a.offset(),g.containerPosition=a.position(),g.containerSize={height:a.innerHeight()-d[3],width:a.innerWidth()-d[1]},c=g.containerOffset,e=g.containerSize.height,f=g.containerSize.width,f=g._hasScroll(h,"left")?h.scrollWidth:f,e=g._hasScroll(h)?h.scrollHeight:e,g.parentData={element:h,left:c.left,top:c.top,width:f,height:e})},resize:function(a){var d,c,e,f=b(this).resizable("instance");d=f.options;c=f.containerOffset; +e=f.position;a=f._aspectRatio||a.shiftKey;var g={top:0,left:0},h=f.containerElement,l=!0;h[0]!==document&&/static/.test(h.css("position"))&&(g=c);e.left<(f._helper?c.left:0)&&(f.size.width+=f._helper?f.position.left-c.left:f.position.left-g.left,a&&(f.size.height=f.size.width/f.aspectRatio,l=!1),f.position.left=d.helper?c.left:0);e.top<(f._helper?c.top:0)&&(f.size.height+=f._helper?f.position.top-c.top:f.position.top,a&&(f.size.width=f.size.height*f.aspectRatio,l=!1),f.position.top=f._helper?c.top: +0);d=f.containerElement.get(0)===f.element.parent().get(0);e=/relative|absolute/.test(f.containerElement.css("position"));d&&e?(f.offset.left=f.parentData.left+f.position.left,f.offset.top=f.parentData.top+f.position.top):(f.offset.left=f.element.offset().left,f.offset.top=f.element.offset().top);d=Math.abs(f.sizeDiff.width+(f._helper?f.offset.left-g.left:f.offset.left-c.left));c=Math.abs(f.sizeDiff.height+(f._helper?f.offset.top-g.top:f.offset.top-c.top));d+f.size.width>=f.parentData.width&&(f.size.width= +f.parentData.width-d,a&&(f.size.height=f.size.width/f.aspectRatio,l=!1));c+f.size.height>=f.parentData.height&&(f.size.height=f.parentData.height-c,a&&(f.size.width=f.size.height*f.aspectRatio,l=!1));l||(f.position.left=f.prevPosition.left,f.position.top=f.prevPosition.top,f.size.width=f.prevSize.width,f.size.height=f.prevSize.height)},stop:function(){var a=b(this).resizable("instance"),d=a.options,c=a.containerOffset,e=a.containerPosition,f=a.containerElement,g=b(a.helper),h=g.offset(),l=g.outerWidth()- +a.sizeDiff.width,g=g.outerHeight()-a.sizeDiff.height;a._helper&&!d.animate&&/relative/.test(f.css("position"))&&b(this).css({left:h.left-e.left-c.left,width:l,height:g});a._helper&&!d.animate&&/static/.test(f.css("position"))&&b(this).css({left:h.left-e.left-c.left,width:l,height:g})}});b.ui.plugin.add("resizable","alsoResize",{start:function(){var a=b(this).resizable("instance").options;b(a.alsoResize).each(function(){var a=b(this);a.data("ui-resizable-alsoresize",{width:parseInt(a.width(),10),height:parseInt(a.height(), +10),left:parseInt(a.css("left"),10),top:parseInt(a.css("top"),10)})})},resize:function(a,d){var c=b(this).resizable("instance"),e=c.originalSize,f=c.originalPosition,g={height:c.size.height-e.height||0,width:c.size.width-e.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0};b(c.options.alsoResize).each(function(){var a=b(this),c=b(this).data("ui-resizable-alsoresize"),e={},f=a.parents(d.originalElement[0]).length?["width","height"]:["width","height","top","left"];b.each(f,function(a, +b){var d=(c[b]||0)+(g[b]||0);d&&0<=d&&(e[b]=d||null)});a.css(e)})},stop:function(){b(this).removeData("resizable-alsoresize")}});b.ui.plugin.add("resizable","ghost",{start:function(){var a=b(this).resizable("instance"),d=a.options,c=a.size;a.ghost=a.originalElement.clone();a.ghost.css({opacity:.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"===typeof d.ghost?d.ghost:"");a.ghost.appendTo(a.helper)},resize:function(){var a= +b(this).resizable("instance");a.ghost&&a.ghost.css({position:"relative",height:a.size.height,width:a.size.width})},stop:function(){var a=b(this).resizable("instance");a.ghost&&a.helper&&a.helper.get(0).removeChild(a.ghost.get(0))}});b.ui.plugin.add("resizable","grid",{resize:function(){var a,d=b(this).resizable("instance"),c=d.options,e=d.size,f=d.originalSize,g=d.originalPosition,h=d.axis,l="number"===typeof c.grid?[c.grid,c.grid]:c.grid,m=l[0]||1,p=l[1]||1,n=Math.round((e.width-f.width)/m)*m,e= +Math.round((e.height-f.height)/p)*p,q=f.width+n,r=f.height+e,u=c.maxWidth&&c.maxWidthq,x=c.minHeight&&c.minHeight>r;c.grid=l;B&&(q+=m);x&&(r+=p);u&&(q-=m);w&&(r-=p);if(/^(se|s|e)$/.test(h))d.size.width=q,d.size.height=r;else if(/^(ne)$/.test(h))d.size.width=q,d.size.height=r,d.position.top=g.top-e;else if(/^(sw)$/.test(h))d.size.width=q,d.size.height=r,d.position.left=g.left-n;else{if(0>=r-p||0>=q-m)a=d._getPaddingPlusBorderDimensions(this); +0d&&b(this).css("top",a.top-d)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width, +minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;this._createWrapper();this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog);this._createTitlebar();this._createButtonPane(); +this.options.draggable&&b.fn.draggable&&this._makeDraggable();this.options.resizable&&b.fn.resizable&&this._makeResizable();this._isOpen=!1;this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var a=this.options.appendTo;return a&&(a.jquery||a.nodeType)?b(a):this.document.find(a||"body").eq(0)},_destroy:function(){var a,b=this.originalPosition;this._untrackInstance();this._destroyOverlay();this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(); +this.uiDialog.stop(!0,!0).remove();this.originalTitle&&this.element.attr("title",this.originalTitle);a=b.parent.children().eq(b.index);a.length&&a[0]!==this.element[0]?a.before(this.element):b.parent.append(this.element)},widget:function(){return this.uiDialog},disable:b.noop,enable:b.noop,close:function(a){var d,c=this;if(this._isOpen&&!1!==this._trigger("beforeClose",a)){this._isOpen=!1;this._focusedElement=null;this._destroyOverlay();this._untrackInstance();if(!this.opener.filter(":focusable").focus().length)try{(d= +this.document[0].activeElement)&&"body"!==d.nodeName.toLowerCase()&&b(d).blur()}catch(e){}this._hide(this.uiDialog,this.options.hide,function(){c._trigger("close",a)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(a,d){var c=!1,e=this.uiDialog.siblings(".ui-front:visible").map(function(){return+b(this).css("z-index")}).get(),e=Math.max.apply(null,e);e>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",e+1),c=!0);c&&!d&&this._trigger("focus", +a);return c},open:function(){var a=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=b(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){a._focusTabbable();a._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var a=this._focusedElement; +a||(a=this.element.find("[autofocus]"));a.length||(a=this.element.find(":tabbable"));a.length||(a=this.uiDialogButtonPane.find(":tabbable"));a.length||(a=this.uiDialogTitlebarClose.filter(":tabbable"));a.length||(a=this.uiDialog);a.eq(0).focus()},_keepFocus:function(a){function d(){var a=this.document[0].activeElement;this.uiDialog[0]===a||b.contains(this.uiDialog[0],a)||this._focusTabbable()}a.preventDefault();d.call(this);this._delay(d)},_createWrapper:function(){this.uiDialog=b("
      ").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+ +this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo());this._on(this.uiDialog,{keydown:function(a){if(this.options.closeOnEscape&&!a.isDefaultPrevented()&&a.keyCode&&a.keyCode===b.ui.keyCode.ESCAPE)a.preventDefault(),this.close(a);else if(a.keyCode===b.ui.keyCode.TAB&&!a.isDefaultPrevented()){var d=this.uiDialog.find(":tabbable"),c=d.filter(":first"),e=d.filter(":last");a.target!==e[0]&&a.target!==this.uiDialog[0]||a.shiftKey?a.target!==c[0]&&a.target!==this.uiDialog[0]|| +!a.shiftKey||(this._delay(function(){e.focus()}),a.preventDefault()):(this._delay(function(){c.focus()}),a.preventDefault())}},mousedown:function(a){this._moveToTop(a)&&this._focusTabbable()}});this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var a;this.uiDialogTitlebar=b("
      ").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog);this._on(this.uiDialogTitlebar, +{mousedown:function(a){b(a.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}});this.uiDialogTitlebarClose=b("").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar);this._on(this.uiDialogTitlebarClose,{click:function(a){a.preventDefault();this.close(a)}});a=b("").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar);this._title(a); +this.uiDialog.attr({"aria-labelledby":a.attr("id")})},_title:function(a){this.options.title||a.html(" ");a.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=b("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiButtonSet=b("
      ").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane);this._createButtons()},_createButtons:function(){var a=this,d=this.options.buttons;this.uiDialogButtonPane.remove();this.uiButtonSet.empty(); +b.isEmptyObject(d)||b.isArray(d)&&!d.length?this.uiDialog.removeClass("ui-dialog-buttons"):(b.each(d,function(c,d){var f,g;d=b.isFunction(d)?{click:d,text:c}:d;d=b.extend({type:"button"},d);f=d.click;d.click=function(){f.apply(a.element[0],arguments)};g={icons:d.icons,text:d.showText};delete d.icons;delete d.showText;b("",d).button(g).appendTo(a.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function a(a){return{position:a.position, +offset:a.offset}}var d=this,c=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(c,f){b(this).addClass("ui-dialog-dragging");d._blockFrames();d._trigger("dragStart",c,a(f))},drag:function(b,c){d._trigger("drag",b,a(c))},stop:function(e,f){var g=f.offset.left-d.document.scrollLeft(),h=f.offset.top-d.document.scrollTop();c.position={my:"left top",at:"left"+(0<=g?"+":"")+g+" top"+(0<=h?"+":"")+ +h,of:d.window};b(this).removeClass("ui-dialog-dragging");d._unblockFrames();d._trigger("dragStop",e,a(f))}})},_makeResizable:function(){function a(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}var d=this,c=this.options,e=c.resizable,f=this.uiDialog.css("position"),e="string"===typeof e?e:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:c.maxWidth,maxHeight:c.maxHeight, +minWidth:c.minWidth,minHeight:this._minHeight(),handles:e,start:function(c,e){b(this).addClass("ui-dialog-resizing");d._blockFrames();d._trigger("resizeStart",c,a(e))},resize:function(b,c){d._trigger("resize",b,a(c))},stop:function(e,f){var l=d.uiDialog.offset(),m=l.left-d.document.scrollLeft(),l=l.top-d.document.scrollTop();c.height=d.uiDialog.height();c.width=d.uiDialog.width();c.position={my:"left top",at:"left"+(0<=m?"+":"")+m+" top"+(0<=l?"+":"")+l,of:d.window};b(this).removeClass("ui-dialog-resizing"); +d._unblockFrames();d._trigger("resizeStop",e,a(f))}}).css("position",f)},_trackFocus:function(){this._on(this.widget(),{focusin:function(a){this._makeFocusTarget();this._focusedElement=b(a.target)}})},_makeFocusTarget:function(){this._untrackInstance();this._trackingInstances().unshift(this)},_untrackInstance:function(){var a=this._trackingInstances(),d=b.inArray(this,a);-1!==d&&a.splice(d,1)},_trackingInstances:function(){var a=this.document.data("ui-dialog-instances");a||(a=[],this.document.data("ui-dialog-instances", +a));return a},_minHeight:function(){var a=this.options;return"auto"===a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(){var a=this.uiDialog.is(":visible");a||this.uiDialog.show();this.uiDialog.position(this.options.position);a||this.uiDialog.hide()},_setOptions:function(a){var d=this,c=!1,e={};b.each(a,function(a,b){d._setOption(a,b);a in d.sizeRelatedOptions&&(c=!0);a in d.resizableRelatedOptions&&(e[a]=b)});c&&(this._size(),this._position());this.uiDialog.is(":data(ui-resizable)")&& +this.uiDialog.resizable("option",e)},_setOption:function(a,b){var c,e=this.uiDialog;"dialogClass"===a&&e.removeClass(this.options.dialogClass).addClass(b);"disabled"!==a&&(this._super(a,b),"appendTo"===a&&this.uiDialog.appendTo(this._appendTo()),"buttons"===a&&this._createButtons(),"closeText"===a&&this.uiDialogTitlebarClose.button({label:""+b}),"draggable"===a&&((c=e.is(":data(ui-draggable)"))&&!b&&e.draggable("destroy"),!c&&b&&this._makeDraggable()),"position"===a&&this._position(),"resizable"=== +a&&((c=e.is(":data(ui-resizable)"))&&!b&&e.resizable("destroy"),c&&"string"===typeof b&&e.resizable("option","handles",b),c||!1===b||this._makeResizable()),"title"===a&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var a,b,c,e=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});e.minWidth>e.width&&(e.width=e.minWidth);a=this.uiDialog.css({height:"auto",width:e.width}).outerHeight();b=Math.max(0,e.minHeight-a);c="number"===typeof e.maxHeight? +Math.max(0,e.maxHeight-a):"none";"auto"===e.height?this.element.css({minHeight:b,maxHeight:c,height:"auto"}):this.element.height(Math.max(0,e.height-a));this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var a=b(this);return b("
      ").css({position:"absolute",width:a.outerWidth(),height:a.outerHeight()}).appendTo(a.parent()).offset(a.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&& +(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(a){return b(a.target).closest(".ui-dialog").length?!0:!!b(a.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var a=!0;this._delay(function(){a=!1});this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(b){a||this._allowInteraction(b)||(b.preventDefault(),this._trackingInstances()[0]._focusTabbable())}});this.overlay=b("
      ").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()); +this._on(this.overlay,{mousedown:"_keepFocus"});this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var a=this.document.data("ui-dialog-overlays")-1;a?this.document.data("ui-dialog-overlays",a):this.document.unbind("focusin").removeData("ui-dialog-overlays");this.overlay.remove();this.overlay=null}}})}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./widget","./mouse","./draggable"],b):b(jQuery)})(function(b){b.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var a,d=this.options,c=d.accept;this.isover=!1;this.isout=!0;this.accept=b.isFunction(c)?c:function(a){return a.is(c)}; +this.proportions=function(){if(arguments.length)a=arguments[0];else return a?a:a={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}};this._addToManager(d.scope);d.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(a){b.ui.ddmanager.droppables[a]=b.ui.ddmanager.droppables[a]||[];b.ui.ddmanager.droppables[a].push(this)},_splice:function(a){for(var b=0;b=p&&a=m&&e=p&&g<=q||l>=p&&l<=q||gq)&&(f>=m&&f<=n||h>=m&&h<=n||fn);default:return!1}}}();b.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,d){var c,e,f=b.ui.ddmanager.droppables[a.options.scope]||[],g=d?d.type:null,h=(a.currentItem||a.element).find(":data(ui-droppable)").addBack();c=0;a:for(;ca?0:d.max6*c?a+(b-a)*c*6:1>2*c?b:2>3*c?a+(b-a)*(2/3-c)*6:a}var g=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55* +a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],l=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b, +c,d,e)},m={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},p={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},n=l.support={},q=a("

      ")[0],r,u=a.each;q.style.cssText="background-color:rgba(1,1,1,.5)";n.rgba=-1a.inArray(null,n[e].slice(0,3))&&(n[e][3]=1,d.from&&(n._rgba=d.from(n[e])))}),this},is:function(a){var b=l(a),c=!0,d=this;u(m,function(a,e){var f,g=b[e.cache];g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],u(e.props,function(a,b){if(null!=g[b.idx])return c=g[b.idx]===f[b.idx]}));return c});return c},_space:function(){var a=[],b=this;u(m,function(c,d){b[d.cache]&&a.push(c)});return a.pop()},transition:function(a, +b){var d=l(a),e=d._space(),f=m[e],g=0===this.alpha()?l("transparent"):this,h=g[f.cache]||f.to(g._rgba),n=h.slice(),d=d[f.cache];u(f.props,function(a,e){var f=e.idx,g=h[f],l=d[f],m=p[e.type]||{};null!==l&&(null===g?n[f]=l:(m.mod&&(l-g>m.mod/2?g+=m.mod:g-l>m.mod/2&&(g-=m.mod)),n[f]=c((l-g)*b+g,e)))});return this[e](n)},blend:function(b){if(1===this._rgba[3])return this;var c=this._rgba.slice(),d=c.pop(),e=l(b)._rgba;return l(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b= +"rgba(",c=a.map(this._rgba,function(a,b){return null==a?2b&&(a=Math.round(100*a)+"%");return a});1===c[3]&&(c.pop(),b="hsl(");return b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();b&&c.push(~~(255*d));return"#"+a.map(c,function(a){a=(a||0).toString(16);return 1===a.length?"0"+a:a}).join("")},toString:function(){return 0=== +this._rgba[3]?"transparent":this.toRgbaString()}});l.fn.parse.prototype=l.fn;m.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/255,c=a[1]/255,d=a[2]/255;a=a[3];var e=Math.max(b,c,d),f=Math.min(b,c,d),g=e-f,h=e+f,l=.5*h;return[Math.round(f===e?0:b===e?60*(c-d)/g+360:c===e?60*(d-b)/g+120:60*(b-c)/g+240)%360,0===g?0:.5>=l?g/h:g/(2-h),l,null==a?1:a]};m.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360, +c=a[1],d=a[2];a=a[3];c=.5>=d?d*(1+c):d+c-d*c;d=2*d-c;return[Math.round(255*f(d,c,b+1/3)),Math.round(255*f(d,c,b)),Math.round(255*f(d,c,b-1/3)),a]};u(m,function(e,f){var h=f.props,m=f.cache,p=f.to,n=f.from;l.fn[e]=function(e){p&&!this[m]&&(this[m]=p(this._rgba));if(e===b)return this[m].slice();var f,g=a.type(e),q="array"===g||"object"===g?e:arguments,r=this[m].slice();u(h,function(a,b){var d=q["object"===g?a:b.idx];null==d&&(d=r[b.idx]);r[b.idx]=c(d,b)});return n?(f=l(n(r)),f[m]=r,f):l(r)};u(h,function(b, +c){l.fn[b]||(l.fn[b]=function(d){var f=a.type(d),h="alpha"===b?this._hsla?"hsla":"rgba":e,l=this[h](),m=l[c.idx];if("undefined"===f)return m;"function"===f&&(d=d.call(this,m),f=a.type(d));if(null==d&&c.empty)return this;"string"===f&&(f=g.exec(d))&&(d=m+parseFloat(f[2])*("+"===f[1]?1:-1));l[c.idx]=d;return this[h](l)})})});l.hook=function(b){b=b.split(" ");u(b,function(b,c){a.cssHooks[c]={set:function(b,d){var f,g="";if("transparent"!==d&&("string"!==a.type(d)||(f=e(d)))){d=l(f||d);if(!n.rgba&&1!== +d._rgba[3]){for(f="backgroundColor"===c?b.parentNode:b;(""===g||"transparent"===g)&&f&&f.style;)try{g=a.css(f,"backgroundColor"),f=f.parentNode}catch(h){}d=d.blend(g&&"transparent"!==g?g:"_default")}d=d.toRgbaString()}try{b.style[c]=d}catch(h){}}};a.fx.step[c]=function(b){b.colorInit||(b.start=l(b.elem,c),b.end=l(b.end),b.colorInit=!0);a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})};l.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"); +a.cssHooks.borderColor={expand:function(a){var b={};u(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a});return b}};r=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(b);(function(){function a(a){var c,d=a.ownerDocument.defaultView? +a.ownerDocument.defaultView.getComputedStyle(a,null):a.currentStyle,h={};if(d&&d.length&&d[0]&&d[d[0]])for(a=d.length;a--;)c=d[a],"string"===typeof d[c]&&(h[b.camelCase(c)]=d[c]);else for(c in d)"string"===typeof d[c]&&(h[c]=d[c]);return h}var d=["add","remove","toggle"],c={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};b.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(a,c){b.fx.step[c]=function(a){if("none"!== +a.end&&!a.setAttr||1===a.pos&&!a.setAttr)b.style(a.elem,c,a.end),a.setAttr=!0}});b.fn.addBack||(b.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))});b.effects.animateClass=function(e,f,g,h){var l=b.speed(f,g,h);return this.queue(function(){var f=b(this),g=f.attr("class")||"",h,q=l.children?f.find("*").addBack():f,q=q.map(function(){return{el:b(this),start:a(this)}});h=function(){b.each(d,function(a,b){if(e[b])f[b+"Class"](e[b])})};h();q=q.map(function(){this.end= +a(this.el[0]);var d=this.start,e=this.end,f={},g,h;for(g in e)h=e[g],d[g]===h||c[g]||!b.fx.step[g]&&isNaN(parseFloat(h))||(f[g]=h);this.diff=f;return this});f.attr("class",g);q=q.map(function(){var a=this,c=b.Deferred(),d=b.extend({},l,{queue:!1,complete:function(){c.resolve(a)}});this.el.animate(this.diff,d);return c.promise()});b.when.apply(b,q.get()).done(function(){h();b.each(arguments,function(){var a=this.el;b.each(this.diff,function(b){a.css(b,"")})});l.complete.call(f[0])})})};b.fn.extend({addClass:function(a){return function(c, +d,h,l){return d?b.effects.animateClass.call(this,{add:c},d,h,l):a.apply(this,arguments)}}(b.fn.addClass),removeClass:function(a){return function(c,d,h,l){return 1

      ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none", +margin:0,padding:0}),g={width:a.width(),height:a.height()},h=document.activeElement;try{h.id}catch(l){h=document.body}a.wrap(f);(a[0]===h||b.contains(a[0],h))&&b(h).focus();f=a.parent();"static"===a.css("position")?(f.css({position:"relative"}),a.css({position:"relative"})):(b.extend(d,{position:a.css("position"),zIndex:a.css("z-index")}),b.each(["top","left","bottom","right"],function(b,f){d[f]=a.css(f);isNaN(parseInt(d[f],10))&&(d[f]="auto")}),a.css({position:"relative",top:0,left:0,right:"auto", +bottom:"auto"}));a.css(g);return f.css(d).show()},removeWrapper:function(a){var d=document.activeElement;a.parent().is(".ui-effects-wrapper")&&(a.parent().replaceWith(a),(a[0]===d||b.contains(a[0],d))&&b(d).focus());return a},setTransition:function(a,d,f,g){g=g||{};b.each(d,function(b,d){var e=a.cssUnit(d);0a?c(2*a)/2:1-c(-2*a+2)/2}})})();return b.effects}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.blind=function(a,d){var c=b(this),e="position top bottom left right height width".split(" "),f=b.effects.setMode(c,a.mode||"hide"),g=a.direction||"up",h=/up|down|vertical/.test(g),l=h?"height":"width",m=h?"top":"left",g=/up|left|vertical|horizontal/.test(g),p={},n="show"===f,q,r,u;c.parent().is(".ui-effects-wrapper")?b.effects.save(c.parent(),e):b.effects.save(c,e);c.show(); +q=b.effects.createWrapper(c).css({overflow:"hidden"});r=q[l]();u=parseFloat(q.css(m))||0;p[l]=n?r:0;g||(c.css(h?"bottom":"right",0).css(h?"top":"left","auto").css({position:"absolute"}),p[m]=n?u:r+u);n&&(q.css(l,0),g||q.css(m,u+r));q.animate(p,{duration:a.duration,easing:a.easing,queue:!1,complete:function(){"hide"===f&&c.hide();b.effects.restore(c,e);b.effects.removeWrapper(c);d()}})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.bounce=function(a,d){var c=b(this),e="position top bottom left right height width".split(" "),f=b.effects.setMode(c,a.mode||"effect"),g="hide"===f,h="show"===f,l=a.direction||"up",f=a.distance,m=a.times||5,p=2*m+(h||g?1:0),n=a.duration/p,q=a.easing,r="up"===l||"down"===l?"top":"left",l="up"===l||"left"===l,u,w,B=c.queue(),x=B.length;(h||g)&&e.push("opacity");b.effects.save(c, +e);c.show();b.effects.createWrapper(c);f||(f=c["top"===r?"outerHeight":"outerWidth"]()/3);h&&(w={opacity:1},w[r]=0,c.css("opacity",0).css(r,l?2*-f:2*f).animate(w,n,q));g&&(f/=Math.pow(2,m-1));w={};for(h=w[r]=0;h
      ").css({position:"absolute",visibility:"visible",left:-r*m,top:-q*p}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:m,height:p,left:u+(h?B*m:0),top:w+(h?x*p:0),opacity:h?0:1}).animate({left:u+(h?0:B*m),top:w+(h?0:x*p),opacity:h?1:0},a.duration||500,a.easing,c)}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.fade=function(a,d){var c=b(this),e=b.effects.setMode(c,a.mode||"toggle");c.animate({opacity:e},{queue:!1,duration:a.duration,easing:a.easing,complete:d})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.fold=function(a,d){var c=b(this),e="position top bottom left right height width".split(" "),f=b.effects.setMode(c,a.mode||"hide"),g="show"===f,h="hide"===f,f=a.size||15,l=/([0-9]+)%/.exec(f),m=!!a.horizFirst,p=g!==m,n=p?["width","height"]:["height","width"],q=a.duration/2,r,u={},w={};b.effects.save(c,e);c.show();r=b.effects.createWrapper(c).css({overflow:"hidden"});p= +p?[r.width(),r.height()]:[r.height(),r.width()];l&&(f=parseInt(l[1],10)/100*p[h?0:1]);g&&r.css(m?{height:0,width:f}:{height:f,width:0});u[n[0]]=g?p[0]:f;w[n[1]]=g?p[1]:0;r.animate(u,q,a.easing).animate(w,q,a.easing,function(){h&&c.hide();b.effects.restore(c,e);b.effects.removeWrapper(c);d()})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.highlight=function(a,d){var c=b(this),e=["backgroundImage","backgroundColor","opacity"],f=b.effects.setMode(c,a.mode||"show"),g={backgroundColor:c.css("backgroundColor")};"hide"===f&&(g.opacity=0);b.effects.save(c,e);c.show().css({backgroundImage:"none",backgroundColor:a.color||"#ffff99"}).animate(g,{queue:!1,duration:a.duration,easing:a.easing,complete:function(){"hide"=== +f&&c.hide();b.effects.restore(c,e);d()}})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.size=function(a,d){var c,e,f,g,h,l,m=b(this),p="position top bottom left right width height overflow opacity".split(" ");h="position top bottom left right overflow opacity".split(" ");var n=["width","height","overflow"],q=["fontSize"],r=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],u=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"], +w=b.effects.setMode(m,a.mode||"effect"),B=a.restore||"effect"!==w,x=a.scale||"both";l=a.origin||["middle","center"];var D=m.css("position"),y=B?p:h,H={height:0,width:0,outerHeight:0,outerWidth:0};"show"===w&&m.show();h={height:m.height(),width:m.width(),outerHeight:m.outerHeight(),outerWidth:m.outerWidth()};"toggle"===a.mode&&"show"===w?(m.from=a.to||H,m.to=a.from||h):(m.from=a.from||("show"===w?H:h),m.to=a.to||("hide"===w?H:h));f=m.from.height/h.height;g=m.from.width/h.width;c=m.to.height/h.height; +e=m.to.width/h.width;if("box"===x||"both"===x)f!==c&&(y=y.concat(r),m.from=b.effects.setTransition(m,r,f,m.from),m.to=b.effects.setTransition(m,r,c,m.to)),g!==e&&(y=y.concat(u),m.from=b.effects.setTransition(m,u,g,m.from),m.to=b.effects.setTransition(m,u,e,m.to));"content"!==x&&"both"!==x||f===c||(y=y.concat(q).concat(n),m.from=b.effects.setTransition(m,q,f,m.from),m.to=b.effects.setTransition(m,q,c,m.to));b.effects.save(m,y);m.show();b.effects.createWrapper(m);m.css("overflow","hidden").css(m.from); +l&&(l=b.effects.getBaseline(l,h),m.from.top=(h.outerHeight-m.outerHeight())*l.y,m.from.left=(h.outerWidth-m.outerWidth())*l.x,m.to.top=(h.outerHeight-m.to.outerHeight)*l.y,m.to.left=(h.outerWidth-m.to.outerWidth)*l.x);m.css(m.from);if("content"===x||"both"===x)r=r.concat(["marginTop","marginBottom"]).concat(q),u=u.concat(["marginLeft","marginRight"]),n=p.concat(r).concat(u),m.find("*[width]").each(function(){var d=b(this),h=d.height(),l=d.width(),m=d.outerHeight(),p=d.outerWidth();B&&b.effects.save(d, +n);d.from={height:h*f,width:l*g,outerHeight:m*f,outerWidth:p*g};d.to={height:h*c,width:l*e,outerHeight:h*c,outerWidth:l*e};f!==c&&(d.from=b.effects.setTransition(d,r,f,d.from),d.to=b.effects.setTransition(d,r,c,d.to));g!==e&&(d.from=b.effects.setTransition(d,u,g,d.from),d.to=b.effects.setTransition(d,u,e,d.to));d.css(d.from);d.animate(d.to,a.duration,a.easing,function(){B&&b.effects.restore(d,n)})});m.animate(m.to,{queue:!1,duration:a.duration,easing:a.easing,complete:function(){0===m.to.opacity&& +m.css("opacity",m.from.opacity);"hide"===w&&m.hide();b.effects.restore(m,y);B||("static"===D?m.css({position:"relative",top:m.to.top,left:m.to.left}):b.each(["top","left"],function(a,b){m.css(b,function(b,c){var d=parseInt(c,10),e=a?m.to.left:m.to.top;return"auto"===c?e+"px":d+e+"px"})}));b.effects.removeWrapper(m);d()}})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect","./effect-size"],b):b(jQuery)})(function(b){return b.effects.effect.scale=function(a,d){var c=b(this),e=b.extend(!0,{},a),f=b.effects.setMode(c,a.mode||"effect"),g=parseInt(a.percent,10)||(0===parseInt(a.percent,10)?0:"hide"===f?0:100),h=a.direction||"both",l=a.origin,m={height:c.height(),width:c.width(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth()},p="horizontal"!==h?g/100:1,g="vertical"!==h?g/100:1;e.effect= +"size";e.queue=!1;e.complete=d;"effect"!==f&&(e.origin=l||["middle","center"],e.restore=!0);e.from=a.from||("show"===f?{height:0,width:0,outerHeight:0,outerWidth:0}:m);e.to={height:m.height*p,width:m.width*g,outerHeight:m.outerHeight*p,outerWidth:m.outerWidth*g};e.fade&&("show"===f&&(e.from.opacity=0,e.to.opacity=1),"hide"===f&&(e.from.opacity=1,e.to.opacity=0));c.effect(e)}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect","./effect-scale"],b):b(jQuery)})(function(b){return b.effects.effect.puff=function(a,d){var c=b(this),e=b.effects.setMode(c,a.mode||"hide"),f="hide"===e,g=parseInt(a.percent,10)||150,h=g/100,l={height:c.height(),width:c.width(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth()};b.extend(a,{effect:"scale",queue:!1,fade:!0,mode:e,complete:d,percent:f?g:100,from:f?l:{height:l.height*h,width:l.width*h,outerHeight:l.outerHeight* +h,outerWidth:l.outerWidth*h}});c.effect(a)}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect"],b):b(jQuery)})(function(b){return b.effects.effect.pulsate=function(a,d){var c=b(this),e=b.effects.setMode(c,a.mode||"show"),f="show"===e,g="hide"===e,e=2*(a.times||5)+(f||"hide"===e?1:0),h=a.duration/e,l=0,m=c.queue(),p=m.length;if(f||!c.is(":visible"))c.css("opacity",0).show(),l=1;for(f=1;f
      ").appendTo(document.body).addClass(a.className).css({top:l.top-h,left:l.left-g,height:c.innerHeight(), +width:c.innerWidth(),position:f?"fixed":"absolute"}).animate(e,a.duration,a.easing,function(){m.remove();d()})}}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./widget"],b):b(jQuery)})(function(b){return b.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue();this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min});this.valueDiv=b("
      ").appendTo(this.element); +this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove()},value:function(a){if(void 0===a)return this.options.value;this.options.value=this._constrainedValue(a);this._refreshValue()},_constrainedValue:function(a){void 0===a&&(a=this.options.value);this.indeterminate=!1===a;"number"!==typeof a&&(a=0);return this.indeterminate? +!1:Math.min(this.options.max,Math.max(this.min,a))},_setOptions:function(a){var b=a.value;delete a.value;this._super(a);this.options.value=this._constrainedValue(b);this._refreshValue()},_setOption:function(a,b){"max"===a&&(b=Math.max(this.min,b));"disabled"===a&&this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b);this._super(a,b)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var a= +this.options.value,d=this._percentage();this.valueDiv.toggle(this.indeterminate||a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(d.toFixed(0)+"%");this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate);this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=b("
      ").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":a}),this.overlayDiv&& +(this.overlayDiv.remove(),this.overlayDiv=null));this.oldValue!==a&&(this.oldValue=a,this._trigger("change"));a===this.options.max&&this._trigger("complete")}})}); +(function(b){"function"===typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],b):b(jQuery)})(function(b){return b.widget("ui.selectable",b.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var a,d=this;this.element.addClass("ui-selectable");this.dragged=!1;this.refresh=function(){a=b(d.options.filter,d.element[0]);a.addClass("ui-selectee"); +a.each(function(){var a=b(this),d=a.offset();b.data(this,"selectable-item",{element:this,$element:a,left:d.left,top:d.top,right:d.left+a.outerWidth(),bottom:d.top+a.outerHeight(),startselected:!1,selected:a.hasClass("ui-selected"),selecting:a.hasClass("ui-selecting"),unselecting:a.hasClass("ui-unselecting")})})};this.refresh();this.selectees=a.addClass("ui-selectee");this._mouseInit();this.helper=b("
      ")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"); +this.element.removeClass("ui-selectable ui-selectable-disabled");this._mouseDestroy()},_mouseStart:function(a){var d=this,c=this.options;this.opos=[a.pageX,a.pageY];this.options.disabled||(this.selectees=b(c.filter,this.element[0]),this._trigger("start",a),b(c.appendTo).append(this.helper),this.helper.css({left:a.pageX,top:a.pageY,width:0,height:0}),c.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var c=b.data(this,"selectable-item");c.startselected=!0;a.metaKey|| +a.ctrlKey||(c.$element.removeClass("ui-selected"),c.selected=!1,c.$element.addClass("ui-unselecting"),c.unselecting=!0,d._trigger("unselecting",a,{unselecting:c.element}))}),b(a.target).parents().addBack().each(function(){var c,f=b.data(this,"selectable-item");if(f)return c=!a.metaKey&&!a.ctrlKey||!f.$element.hasClass("ui-selected"),f.$element.removeClass(c?"ui-unselecting":"ui-selected").addClass(c?"ui-selecting":"ui-unselecting"),f.unselecting=!c,f.selecting=c,(f.selected=c)?d._trigger("selecting", +a,{selecting:f.element}):d._trigger("unselecting",a,{unselecting:f.element}),!1}))},_mouseDrag:function(a){this.dragged=!0;if(!this.options.disabled){var d,c=this,e=this.options,f=this.opos[0],g=this.opos[1],h=a.pageX,l=a.pageY;f>h&&(d=h,h=f,f=d);g>l&&(d=l,l=g,g=d);this.helper.css({left:f,top:g,width:h-f,height:l-g});this.selectees.each(function(){var d=b.data(this,"selectable-item"),p=!1;d&&d.element!==c.element[0]&&("touch"===e.tolerance?p=!(d.left>h||d.rightl||d.bottomf&&d.rightg&&d.bottom",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var a=this.element.uniqueId().attr("id");this.ids={element:a,button:a+ +"-button",menu:a+"-menu"};this._drawButton();this._drawMenu();this.options.disabled&&this.disable()},_drawButton:function(){var a=this;this.label=b("label[for='"+this.ids.element+"']").attr("for",this.ids.button);this._on(this.label,{click:function(a){this.button.focus();a.preventDefault()}});this.element.hide();this.button=b("",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false", +"aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element);b("",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button);this.buttonText=b("",{"class":"ui-selectmenu-text"}).appendTo(this.button);this._setText(this.buttonText,this.element.find("option:selected").text());this._resizeButton();this._on(this.button,this._buttonEvents);this.button.one("focusin",function(){a.menuItems||a._refreshMenu()});this._hoverable(this.button); +this._focusable(this.button)},_drawMenu:function(){var a=this;this.menu=b("
      "}); +$(".js-additional-connection-info").append(a);showAdditionalConnectionInfo();additionalConnectionInfoReceived=!0}},updateConnectionEndpointInfo=function(b){if(!cfConnectionOutputReceived&&""!=b){var a="";if(-1!==b.indexOf("")){var d="",c="";-1!==b.indexOf("dashboard")&&(c=" Dashboard");-1!==b.indexOf("launch")?(d=b.match(/href="([^"]*)/)[1],a+=""):a+="
      "+b+"
      "}else a+="
      "; +$(".js-cf-connection-output").append(a);$(".js-cf-connection-output").removeClass("is-hidden");$(".js-cf-connection-output").addClass("is-visible");cfConnectionOutputReceived=!0}},showAdditionalConnectionInfo=function(){$(".js-additional-connection-info").removeClass("is-hidden");$(".js-tab[data-tab='lab-resources']").click();$(".js-lab-sidebar").animate({scrollTop:$(".js-additional-connection-info").offset().top},750,function(){$(".js-additional-connection-info").addClass("is-visible")})},initExternalWindowListener= +function(){$(".js-external-window").click(function(b){b.preventDefault();if($(this)[0].hasAttribute("href"))consoleWindow=window.open($(this).attr("href"));else return!1})},closeConsoleWindow=function(){""!==consoleWindow&&consoleWindow.close()},resetVariables=function(){cfConnectionOutputReceived=additionalConnectionInfoReceived=pausePolling=!1;consoleWindow=consoleClipboard=focusDataPoll="";cloudProvisioned=consoleReady=consoleInfoFilled=endLabButtonDisplayed=!1},labStartSegment=function(){var b= +$(".js-lab_and_classroom_info").data();"undefined"!=typeof analytics&&analytics.track("start_lab",b)};initLabRun=function(){checkIfLabIsAlreadyRunning();initStartButtonListener();initEndButtonListener();initExternalWindowListener()};initSliderListener=function(){$(".js-sidebar-slider").click(function(){$(this).toggleClass("is-hidden");$(".js-lab-sidebar-container").toggleClass("is-hidden")})};showSidebar=function(){$(".js-sidebar-slider").removeClass("is-hidden");$(".js-lab-sidebar-container").removeClass("is-hidden")}; +hideSidebar=function(){$(".js-sidebar-slider").addClass("is-hidden");$(".js-lab-sidebar-container").addClass("is-hidden")};initLabSidebar=function(){initSliderListener()};var initFakeShadow=function(){$(".js-fake-shadow-waypoint").length&&new Waypoint({element:$(".js-fake-shadow-waypoint")[0],offset:60,handler:function(){$(".js-fake-shadow").toggleClass("is-stuck")}})},initTiles=function(){$(".js-landing-tiles").addClass("is-visible")},initLanding=function(){initFakeShadow();initTiles()}; +ql.MaterialDialog=function(b,a){this.dialog=b;this.dismissers=$(this.dialog).find("[data-dismiss]");this.isOpen=a||!1;this.listen();this.upgrade();this.render()};ql.MaterialDialog.prototype.upgrade=function(){$(this.dialog).addClass("is-upgraded")};ql.MaterialDialog.prototype.listen=function(){for(var b=0;b$(window).width()?($(".md-input").removeClass("md-input--horizontal"),$(".js-permissions-select").removeClass("permissions-select__container--horizontal"),$(".js-labs-resources").removeClass("labs__resources--horizontal")):($(".md-input").addClass("md-input--horizontal"),$(".js-student-resources .md-input").removeClass("md-input--horizontal"),$(".js-permissions-select").addClass("permissions-select__container--horizontal"),$(".js-labs-resources").addClass("labs__resources--horizontal"))}; +ql.initNewStudentResourceListener=function(){$(document).on("nested:fieldAdded",function(b){b=b.field.find(".md-input__input");for(var a=0;a"+this.permissions[a]+"");this.button.find("#permissions-display").html(b);this.menu.render()}; +ql.PermissionsMenu=function(b){var a=this;this.element=b;this.isVisible=!1;this.setPermissions="";this.categories=[];b=this.element.children("li");for(var d=0;de.max&&(e.max=n),n10||(h.releaseIds[e.slice(-200)]=(""+t).slice(-200))}var c=n(13),f=n(8),l=n(2),p=n(15),d=n(19),m=n(30),h=n("loader"),v=n("handle"),g=0;f.on("jserrors",function(){return{body:l.take(["cm"])}});var y={finished:p(o),setPageViewName:r,setErrorHandler:s,addToTrace:i,inlineHit:a,addRelease:u};m(y,function(n,e){c("api-"+n,e,"api")});var w=0},{}],4:[function(n,e,t){var r=/([^?#]*)[^#]*(#[^?]*|$).*/,o=/([^?#]*)().*/;e.exports=function(n,e){return n.replace(e?r:o,"$1$2")}},{}],5:[function(n,e,t){function r(n,e){var t=n[1];i(e[t],function(e,t){var r=n[0],o=t[0];if(o===r){var i=t[1],a=n[3],s=n[2];i.apply(a,s)}})}var o=n("ee"),i=n(30),a=n(13).handlers;e.exports=function(n){var e=o.backlog[n],t=a[n];if(t){for(var s=0;e&&se)return n.slice(0,r).join("");return n.join("")}function a(n,e){var t=0,r="";return u(n,function(n,i){var a,s,u=[];if("string"==typeof i)a="&"+n+"="+o(i),t+=a.length,r+=a;else if(i.length){for(t+=9,s=0;s=e));s++)u.push(a);r+="&"+n+"=%5B"+u.join(",")+"%5D"}}),r}function s(n,e){return e&&"string"==typeof e?"&"+n+"="+o(e):""}var u=n(30),c=n(18),f={"%2C":",","%3A":":","%2F":"/","%40":"@","%24":"$","%3B":";"},l=u(f,function(n){return n}),p=new RegExp(l.join("|"),"g");e.exports={obj:a,fromArray:i,qs:o,param:s}},{}],7:[function(n,e,t){var r=n(30),o=n("ee"),i=n(5);e.exports=function(n){n&&"object"==typeof n&&(r(n,function(n,e){e&&!a[n]&&(o.emit("feat-"+n,[]),a[n]=!0)}),i("feature"))};var a=e.exports.active={}},{}],8:[function(n,e,t){function r(n){if(n.info.beacon){n.info.queueTime&&b.store("measures","qt",{value:n.info.queueTime}),n.info.applicationTime&&b.store("measures","ap",{value:n.info.applicationTime}),k.measure("be","starttime","firstbyte"),k.measure("fe","firstbyte","onload"),k.measure("dc","firstbyte","domContent");var e=b.get("measures"),t=h(e,function(n,e){return"&"+n+"="+e.params.value}).join("");if(t){var r="1",o=[p(n)];if(o.push(t),o.push(g.param("tt",n.info.ttGuid)),o.push(g.param("us",n.info.user)),o.push(g.param("ac",n.info.account)),o.push(g.param("pr",n.info.product)),o.push(g.param("af",h(n.features,function(n){return n}).join(","))),window.performance&&"undefined"!=typeof window.performance.timing){var i={timing:v.addPT(window.performance.timing,{}),navigation:v.addPN(window.performance.navigation,{})};o.push(g.param("perf",y(i)))}o.push(g.param("xx",n.info.extra)),o.push(g.param("ua",n.info.userAttributes)),o.push(g.param("at",n.info.atts));var a=y(n.info.jsAttributes);o.push(g.param("ja","{}"===a?null:a));var s=g.fromArray(o,n.maxBytes);w.jsonp("https://"+n.info.beacon+"/"+r+"/"+n.info.licenseKey+s,A)}}}function o(n){var e=h(q,function(e){return a(e,n,{unload:!0})});return x(e,i)}function i(n,e){return n||e}function a(n,e,t){return u(e,n,s(n),t||{})}function s(n){for(var e=d({}),t=d({}),r=q[n]||[],o=0;o9||0===j.ieVersion);e.exports={sendRUM:m(r),sendFinal:o,pingErrors:c,sendX:a,on:l,xhrUsable:R}},{}],9:[function(n,e,t){var r=n("loader"),o=document.createElement("div");o.innerHTML="";var i=o.getElementsByTagName("div").length;4===i?r.ieVersion=6:3===i?r.ieVersion=7:2===i?r.ieVersion=8:1===i?r.ieVersion=9:r.ieVersion=0,e.exports=r.ieVersion},{}],10:[function(n,e,t){function r(n){c.sendFinal(p,!1),a.navCookie&&(document.cookie="NREUM=s="+Number(new Date)+"&r="+o(document.location.href)+"&p="+o(document.referrer)+"; path=/")}var o=n(14),i=n(1),a=n(16),s=n(17),u=n(15),c=n(8),f=n(13),l=n(7),p=n("loader"),d=n(29),m=n(5);n(3);var h="undefined"==typeof window.NREUM.autorun||window.NREUM.autorun;window.NREUM.setToken=l,6===n(9)?p.maxBytes=2e3:p.maxBytes=3e4,p.releaseIds={};var v=u(r);!d||navigator.sendBeacon?i("pagehide",v):i("beforeunload",v),i("unload",v),f("mark",s.mark,"api"),s.mark("done"),m("api"),h&&c.sendRUM(p)},{}],11:[function(n,e,t){e.exports=function(n,e){setTimeout(function t(){try{n()}finally{setTimeout(t,e)}},e)}},{}],12:[function(n,e,t){function r(n,e){var t=n["navigation"+a];return e.of=t,i(t,t,e,"n"),i(n[u+a],t,e,"u"),i(n[c+a],t,e,"r"),i(n[u+s],t,e,"ue"),i(n[c+s],t,e,"re"),i(n["fetch"+a],t,e,"f"),i(n[f+a],t,e,"dn"),i(n[f+s],t,e,"dne"),i(n["c"+l+a],t,e,"c"),i(n["secureC"+l+"ion"+a],t,e,"s"),i(n["c"+l+s],t,e,"ce"),i(n[p+a],t,e,"rq"),i(n[d+a],t,e,"rp"),i(n[d+s],t,e,"rpe"),i(n.domLoading,t,e,"dl"),i(n.domInteractive,t,e,"di"),i(n[h+a],t,e,"ds"),i(n[h+s],t,e,"de"),i(n.domComplete,t,e,"dc"),i(n[m+a],t,e,"l"),i(n[m+s],t,e,"le"),e}function o(n,e){return i(n.type,0,e,"ty"),i(n.redirectCount,0,e,"rc"),e}function i(n,e,t,r){var o;"number"==typeof n&&n>0&&(o=Math.round(n-e),t[r]=o),v.push(o)}var a="Start",s="End",u="unloadEvent",c="redirect",f="domainLookup",l="onnect",p="request",d="response",m="loadEvent",h="domContentLoadedEvent",v=[];e.exports={addPT:r,addPN:o,nt:v}},{}],13:[function(n,e,t){function r(n,e,t,r){o(r||i,n,e,t)}function o(n,e,t,r){r||(r="feature"),n||(n=i);var o=a[r]=a[r]||{},s=o[e]=o[e]||[];s.push([n,t])}var i=n("handle").ee;e.exports=r,r.on=o;var a=r.handlers={}},{}],14:[function(n,e,t){function r(n){var e,t=0;for(e=0;e6e4)return;return o}}}var a=n(14),s=n(17),u=n("loader"),c=n(29);e.exports={navCookie:!0},r()},{}],17:[function(n,e,t){function r(n,e){"undefined"==typeof e&&(e=a.now()+a.offset),s[n]=e}function o(n,e,t){var r=s[e],o=s[t];"undefined"!=typeof r&&"undefined"!=typeof o&&i.store("measures",n,{value:o-r})}var i=n(2),a=n("loader"),s={};e.exports={mark:r,measure:o}},{}],18:[function(n,e,t){function r(n){try{return i("",{"":n})}catch(e){try{s.emit("internal-error",[e])}catch(t){}}}function o(n){return u.lastIndex=0,u.test(n)?'"'+n.replace(u,function(n){var e=c[n];return"string"==typeof e?e:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function i(n,e){var t=e[n];switch(typeof t){case"string":return o(t);case"number":return isFinite(t)?String(t):"null";case"boolean":return String(t);case"object":if(!t)return"null";var r=[];if(t instanceof window.Array||"[object Array]"===Object.prototype.toString.apply(t)){for(var s=t.length,u=0;u1?e[1]:"unknown"}function f(n){return n&&n.indexOf("nrWrapper")>=0}function l(n){for(var e,t=n.stacktrace,r=/ line (\d+), column (\d+) in (?:]+)>|([^\)]+))\(.*\) in (.*):\s*$/i,o=t.split("\n"),i=[],a=[],s=!1,u=0,l=o.length;u100){var t=n.length-100;e=n.slice(0,50).join("\n"),e+="\n< ...truncated "+t+" lines... >\n",e+=n.slice(-50).join("\n")}else e=n.join("\n");return e.replace(r,"")}},{}],23:[function(n,e,t){function r(n){return p(n.exceptionClass)^n.stackHash}function o(n,e){if("string"!=typeof n)return"";var t=f(n);return t===e?"":t}function i(n,e){for(var t="",r=0;r=v)){var o,a,f={};"undefined"!=typeof window&&window.document&&window.document.documentElement&&(o=window.document.documentElement.clientWidth,a=window.document.documentElement.clientHeight);var l={timestamp:n+s.offset,timeSinceLoad:n/1e3,browserWidth:o,browserHeight:a,referrerUrl:i,currentUrl:p(""+location),pageUrl:p(s.origin),eventType:"PageAction"};u(l,r),u(y,r),t&&"object"==typeof t&&u(t,r),f.actionName=e||"",g.push(f)}}function o(n,e,t){y[e]=t}var i,a=n("ee"),s=n("loader"),u=n(30),c=n(18),f=n(13),l=n(8),p=n(4),d=n(11),m=120,h=30,v=m*h/60,g=[],y=s.info.jsAttributes={};document.referrer&&(i=p(document.referrer)),f("api-setCustomAttribute",o,"api"),a.on("feat-ins",function(){f("api-addPageAction",r),l.on("ins",function(){return{qs:{ua:s.info.userAttributes,at:s.info.atts},body:{ins:g.splice(0)}}}),d(function(){l.sendX("ins",s)},1e3*h),l.sendX("ins",s)})},{}],26:[function(n,e,t){function r(n){var e,t,r,o=Date.now();for(e in n)t=n[e],"number"==typeof t&&t>0&&ti.s-e?s.e=i.e:(r[i.o]=i,a.push(i)):(r[i.o]=null,i.n="scroll",a.push(i)),o}}function v(n,e){return e}function g(n,e){return n.concat(e)}function y(n){var e=4;return!!(n&&"number"==typeof n.e&&"number"==typeof n.s&&n.e-n.s9e5?void(C={}):(k(C,function(e,t){t&&t.length&&(n+=t.length)}),n>30&&b.sendX("resources",w),void(n>1e3&&(C={})))},1e4)});var B=0}}},{}],27:[function(n,e,t){function r(n,e,t){e.time=t,n.cat?o.store("xhr",s([n.status,n.cat]),n,e):o.store("xhr",s([n.status,n.host,n.pathname]),n,e)}var o=n(2),i=n(13),a=n(8),s=n(18),u=n("loader"),c=n("ee");u.features.xhr&&(a.on("jserrors",function(){return{body:o.take(["xhr"])}}),c.on("feat-err",function(){i("xhr",r)}),e.exports=r)},{}],28:[function(n,e,t){e.exports=function(n){var e=document.createElement("a"),t=window.location,r={};e.href=n,r.port=e.port;var o=e.href.split("://");!r.port&&o[1]&&(r.port=o[1].split("/")[0].split("@").pop().split(":")[1]),r.port&&"0"!==r.port||(r.port="https"===o[0]?"443":"80"),r.hostname=e.hostname||t.hostname,r.pathname=e.pathname,r.protocol=o[0],"/"!==r.pathname.charAt(0)&&(r.pathname="/"+r.pathname);var i=!e.protocol||":"===e.protocol||e.protocol===t.protocol,a=e.hostname===document.domain&&e.port===t.port;return r.sameOrigin=i&&(!e.hostname||a),r}},{}],29:[function(n,e,t){var r=0,o=navigator.userAgent.match(/Firefox[\/\s](\d+\.\d+)/);o&&(r=+o[1]),e.exports=r},{}],30:[function(n,e,t){function r(n,e){var t=[],r="",i=0;for(r in n)o.call(n,r)&&(t[i]=e(r,n[r]),i+=1);return t}var o=Object.prototype.hasOwnProperty;e.exports=r},{}],31:[function(n,e,t){function r(n,e,t){e||(e=0),"undefined"==typeof t&&(t=n?n.length:0);for(var r=-1,o=t-e||0,i=Array(o<0?0:o);++r + \ No newline at end of file diff --git a/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource(2).html b/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource(2).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource(2).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource(3).html b/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource(3).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource(3).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource(4).html b/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource(4).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource(4).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource(5).html b/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource(5).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource(5).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource(6).html b/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource(6).html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource(6).html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource.html b/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource.html new file mode 100755 index 0000000..cdd25c1 --- /dev/null +++ b/code/gcp/labs/Streaming Data Processing _ Qwiklabs + roitraining_files/saved_resource.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/code/gcp/slides_data_enginering/Data_Engineering_CPB101-05_BigQuery.pdf b/code/gcp/slides_data_enginering/Data_Engineering_CPB101-05_BigQuery.pdf new file mode 100755 index 0000000..f1253d1 Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_CPB101-05_BigQuery.pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_CPB101-06_Dataflow.pdf b/code/gcp/slides_data_enginering/Data_Engineering_CPB101-06_Dataflow.pdf new file mode 100755 index 0000000..7a7a582 Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_CPB101-06_Dataflow.pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_CPB102-01_Dataproc.pdf b/code/gcp/slides_data_enginering/Data_Engineering_CPB102-01_Dataproc.pdf new file mode 100755 index 0000000..e5d5705 Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_CPB102-01_Dataproc.pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_CPB102-02_Jobs.pdf b/code/gcp/slides_data_enginering/Data_Engineering_CPB102-02_Jobs.pdf new file mode 100755 index 0000000..2ccb324 Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_CPB102-02_Jobs.pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_CPB102-03_GCP.pdf b/code/gcp/slides_data_enginering/Data_Engineering_CPB102-03_GCP.pdf new file mode 100755 index 0000000..653b30d Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_CPB102-03_GCP.pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_CPB102-04_MLapis.pdf b/code/gcp/slides_data_enginering/Data_Engineering_CPB102-04_MLapis.pdf new file mode 100755 index 0000000..4a8bd64 Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_CPB102-04_MLapis.pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_CPB103-07_GettingStartedWithML_(2).pdf b/code/gcp/slides_data_enginering/Data_Engineering_CPB103-07_GettingStartedWithML_(2).pdf new file mode 100755 index 0000000..c1884f8 Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_CPB103-07_GettingStartedWithML_(2).pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_CPB103-08_TensorFlow_(2).pdf b/code/gcp/slides_data_enginering/Data_Engineering_CPB103-08_TensorFlow_(2).pdf new file mode 100755 index 0000000..6b06301 Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_CPB103-08_TensorFlow_(2).pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_CPB103-09_CloudML_(2).pdf b/code/gcp/slides_data_enginering/Data_Engineering_CPB103-09_CloudML_(2).pdf new file mode 100755 index 0000000..7c2deed Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_CPB103-09_CloudML_(2).pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_CPB103-10_FeatureEngineering_(2).pdf b/code/gcp/slides_data_enginering/Data_Engineering_CPB103-10_FeatureEngineering_(2).pdf new file mode 100755 index 0000000..130f08b Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_CPB103-10_FeatureEngineering_(2).pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_CPB104-11_StreamingAnalytics_(2).pdf b/code/gcp/slides_data_enginering/Data_Engineering_CPB104-11_StreamingAnalytics_(2).pdf new file mode 100755 index 0000000..6734845 Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_CPB104-11_StreamingAnalytics_(2).pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_CPB104-12_VariableVolumes_(1).pdf b/code/gcp/slides_data_enginering/Data_Engineering_CPB104-12_VariableVolumes_(1).pdf new file mode 100755 index 0000000..d57336a Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_CPB104-12_VariableVolumes_(1).pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_CPB104-13_StreamingPipelines_(2).pdf b/code/gcp/slides_data_enginering/Data_Engineering_CPB104-13_StreamingPipelines_(2).pdf new file mode 100755 index 0000000..0b4e3a4 Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_CPB104-13_StreamingPipelines_(2).pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_CPB104-14_Dashboards_(2).pdf b/code/gcp/slides_data_enginering/Data_Engineering_CPB104-14_Dashboards_(2).pdf new file mode 100755 index 0000000..5472e5a Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_CPB104-14_Dashboards_(2).pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_CPB104-15_ThroughputAndLatency_(2).pdf b/code/gcp/slides_data_enginering/Data_Engineering_CPB104-15_ThroughputAndLatency_(2).pdf new file mode 100755 index 0000000..cad5f75 Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_CPB104-15_ThroughputAndLatency_(2).pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_on_GCP_-_Summary_(1).pdf b/code/gcp/slides_data_enginering/Data_Engineering_on_GCP_-_Summary_(1).pdf new file mode 100755 index 0000000..940ef39 Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_on_GCP_-_Summary_(1).pdf differ diff --git a/code/gcp/slides_data_enginering/Data_Engineering_on_GCP_Appendix_MLArchitectures_(1).pdf b/code/gcp/slides_data_enginering/Data_Engineering_on_GCP_Appendix_MLArchitectures_(1).pdf new file mode 100755 index 0000000..57f61e0 Binary files /dev/null and b/code/gcp/slides_data_enginering/Data_Engineering_on_GCP_Appendix_MLArchitectures_(1).pdf differ diff --git a/code/gcp/slides_infrastructure/00_Course_Intro.pdf b/code/gcp/slides_infrastructure/00_Course_Intro.pdf new file mode 100755 index 0000000..7fb23be Binary files /dev/null and b/code/gcp/slides_infrastructure/00_Course_Intro.pdf differ diff --git a/code/gcp/slides_infrastructure/01_Introduction_to_GCP.pdf b/code/gcp/slides_infrastructure/01_Introduction_to_GCP.pdf new file mode 100755 index 0000000..49e3bd5 Binary files /dev/null and b/code/gcp/slides_infrastructure/01_Introduction_to_GCP.pdf differ diff --git a/code/gcp/slides_infrastructure/02_Virtual_Networks.pdf b/code/gcp/slides_infrastructure/02_Virtual_Networks.pdf new file mode 100755 index 0000000..4ecf998 Binary files /dev/null and b/code/gcp/slides_infrastructure/02_Virtual_Networks.pdf differ diff --git a/code/gcp/slides_infrastructure/03_Virtual_Machines.pdf b/code/gcp/slides_infrastructure/03_Virtual_Machines.pdf new file mode 100755 index 0000000..9afca82 Binary files /dev/null and b/code/gcp/slides_infrastructure/03_Virtual_Machines.pdf differ diff --git a/code/gcp/slides_infrastructure/04_Cloud_IAM.pdf b/code/gcp/slides_infrastructure/04_Cloud_IAM.pdf new file mode 100755 index 0000000..70deb96 Binary files /dev/null and b/code/gcp/slides_infrastructure/04_Cloud_IAM.pdf differ diff --git a/code/gcp/slides_infrastructure/05_Data_Storage_Services.pdf b/code/gcp/slides_infrastructure/05_Data_Storage_Services.pdf new file mode 100755 index 0000000..ed95142 Binary files /dev/null and b/code/gcp/slides_infrastructure/05_Data_Storage_Services.pdf differ diff --git a/code/gcp/slides_infrastructure/06_Resource_Management.pdf b/code/gcp/slides_infrastructure/06_Resource_Management.pdf new file mode 100755 index 0000000..c090055 Binary files /dev/null and b/code/gcp/slides_infrastructure/06_Resource_Management.pdf differ diff --git a/code/gcp/slides_infrastructure/07_Resource_Monitoring.pdf b/code/gcp/slides_infrastructure/07_Resource_Monitoring.pdf new file mode 100755 index 0000000..3a0b7aa Binary files /dev/null and b/code/gcp/slides_infrastructure/07_Resource_Monitoring.pdf differ diff --git a/code/gcp/slides_infrastructure/08_Interconnecting_Networks.pdf b/code/gcp/slides_infrastructure/08_Interconnecting_Networks.pdf new file mode 100755 index 0000000..7064d28 Binary files /dev/null and b/code/gcp/slides_infrastructure/08_Interconnecting_Networks.pdf differ diff --git a/code/gcp/slides_infrastructure/09_Load_Balancing.pdf b/code/gcp/slides_infrastructure/09_Load_Balancing.pdf new file mode 100755 index 0000000..1db3db7 Binary files /dev/null and b/code/gcp/slides_infrastructure/09_Load_Balancing.pdf differ diff --git a/code/gcp/slides_infrastructure/10_Autoscaling.pdf b/code/gcp/slides_infrastructure/10_Autoscaling.pdf new file mode 100755 index 0000000..9323033 Binary files /dev/null and b/code/gcp/slides_infrastructure/10_Autoscaling.pdf differ diff --git a/code/gcp/slides_infrastructure/11_Infrastructure_Automation_with_Google_Cloud_Platform_APIs.pdf b/code/gcp/slides_infrastructure/11_Infrastructure_Automation_with_Google_Cloud_Platform_APIs.pdf new file mode 100755 index 0000000..f1c591e Binary files /dev/null and b/code/gcp/slides_infrastructure/11_Infrastructure_Automation_with_Google_Cloud_Platform_APIs.pdf differ diff --git a/code/gcp/slides_infrastructure/12_Infrastructure_Automation_with_Deployment_Manager.pdf b/code/gcp/slides_infrastructure/12_Infrastructure_Automation_with_Deployment_Manager.pdf new file mode 100755 index 0000000..fbc2acb Binary files /dev/null and b/code/gcp/slides_infrastructure/12_Infrastructure_Automation_with_Deployment_Manager.pdf differ diff --git a/code/gcp/slides_infrastructure/13_Managed_Services.pdf b/code/gcp/slides_infrastructure/13_Managed_Services.pdf new file mode 100755 index 0000000..9ba04b9 Binary files /dev/null and b/code/gcp/slides_infrastructure/13_Managed_Services.pdf differ diff --git a/code/gcp/slides_infrastructure/14_Application_Infrastructure_Services.pdf b/code/gcp/slides_infrastructure/14_Application_Infrastructure_Services.pdf new file mode 100755 index 0000000..06f04dd Binary files /dev/null and b/code/gcp/slides_infrastructure/14_Application_Infrastructure_Services.pdf differ diff --git a/code/gcp/slides_infrastructure/15_Application_Development_Services.pdf b/code/gcp/slides_infrastructure/15_Application_Development_Services.pdf new file mode 100755 index 0000000..5aa37b8 Binary files /dev/null and b/code/gcp/slides_infrastructure/15_Application_Development_Services.pdf differ diff --git a/code/gcp/slides_infrastructure/16_Containers.pdf b/code/gcp/slides_infrastructure/16_Containers.pdf new file mode 100755 index 0000000..965d32c Binary files /dev/null and b/code/gcp/slides_infrastructure/16_Containers.pdf differ diff --git a/code/gcp/slides_infrastructure/17_Completion.pdf b/code/gcp/slides_infrastructure/17_Completion.pdf new file mode 100755 index 0000000..d9d98b2 Binary files /dev/null and b/code/gcp/slides_infrastructure/17_Completion.pdf differ diff --git a/code/kafka/AWS-MSK-commands.md b/code/kafka/AWS-MSK-commands.md new file mode 100644 index 0000000..eae83ed --- /dev/null +++ b/code/kafka/AWS-MSK-commands.md @@ -0,0 +1,41 @@ +## AWS MSK Commands + +### List clusters + +Returns a list of all the MSK clusters in the current Region: + +``` +aws kafka list-clusters +``` + +### Describing the cluster + +Returns a description of the MSK cluster whose (ARN) is specified in the request: + +``` +aws kafka describe-cluster --cluster-arn +``` + +### Listing nodes + +Returns a list of the broker nodes in the cluste: + +``` +aws kafka list-nodes --cluster-arn +``` + +### Listing bootstrap brokers urls + +A list of brokers that a client application can use to bootstrap: + +``` +aws kafka get-bootstrap-brokers --cluster-arn +``` + +### List clusters operation + +Returns a list of all the operations that have been performed on the specified MSK cluster: + +``` +aws kafka list-cluster-operations --cluster-arn +``` diff --git a/code/kafka/README.md b/code/kafka/README.md new file mode 100644 index 0000000..db4053f --- /dev/null +++ b/code/kafka/README.md @@ -0,0 +1,30 @@ +## resources on kafka and the streaming processing + +
      + +## tutorials + +* [Apache Guide for Kafka Basic Architecture](https://iteritory.com/beginners-guide-apache-kafka-basic-architecture-components-concepts/) +* [Confluent Tutorials](https://docs.confluent.io/current/tutorials/index.html) +* [Kafka streams](https://docs.confluent.io/current/streams/index.html) +* [Kafka Streams, the Clojure way](https://clojure-conundrums.co.uk/posts/kafka-streams-the-clojure-way/) + +
      + +## articles + +* [Apache Kafka for Beginners](http://blog.cloudera.com/blog/2014/09/apache-kafka-for-beginners/) +* [Introduction to Kafka](http://sysadvent.blogspot.com.br/2014/12/day-4-introduction-to-kafka.html) +* [Introducing Kafka Streams: Stream Processing Made Simple](http://www.confluent.io/blog/introducing-kafka-streams-stream-processing-made-simple) +* [Apache Kafka, Samza, and the Unix Philosophy of Distributed Data](http://www.confluent.io/blog/apache-kafka-samza-and-the-unix-philosophy-of-distributed-data) +* [Bottled Water: Real-time integration of PostgreSQL and Kafka](http://www.confluent.io/blog/bottled-water-real-time-integration-of-postgresql-and-kafka/) +* [Netflix tech blog posts on Kafka](http://techblog.netflix.com/search/label/kafka) +* [Linkedin tech blog posts on Kafka](https://engineering.linkedin.com/blog/topic/kafka) +* [Understanding Kafka with Factorio](https://hackernoon.com/understanding-kafka-with-factorio-74e8fc9bf181) +* [Event Streams Essentials](https://blog.reactioncommerce.com/event-streams-essentials/) + +
      + +## books + +* [Making sense of stream processing](http://www.confluent.io/making-sense-of-stream-processing-ebook) diff --git a/code/kafka/kafka_streams.md b/code/kafka/kafka_streams.md new file mode 100644 index 0000000..0203ca0 --- /dev/null +++ b/code/kafka/kafka_streams.md @@ -0,0 +1,5 @@ +## kafka streams + +
      + +* kafka streams is a client library for building applications and microservices, where the input and output data are stored in kafka clusters. diff --git a/code/kafka/topics-cheatsheet.md b/code/kafka/topics-cheatsheet.md new file mode 100644 index 0000000..1ef3ba5 --- /dev/null +++ b/code/kafka/topics-cheatsheet.md @@ -0,0 +1,52 @@ +## Kafka Topics Cheatsheet + +#### Create a temporary interactive container + +``` +kubectl exec -it -n kafka-tools -- bash +``` + +### List consumer groups + +``` +kafka-consumer-groups --bootstrap-server "$KAFKA_BOOTSTRAP_SERVERS" --list +``` + +### Inspect a consumer group + +``` +kafka-consumer-groups --bootstrap-server "$KAFKA_BOOTSTRAP_SERVERS" --describe --group GROUP +``` + + +### Remove Lag - Reset a consumer group to latest + +Reset offsets to latest (speeds up reset in Grafana): + +``` +kafka-consumer-groups --bootstrap-server "$KAFKA_BOOTSTRAP_SERVERS" --group GROUP \ +--reset-offsets --topic TOPIC --to-earliest --dry-run +``` + +### Delete a Consumer Group + +Reset offsets to latest (speeds up reset in Grafana): + +``` +kafka-consumer-groups --bootstrap-server "$KAFKA_BOOTSTRAP_SERVERS" --group GROUP \ +--reset-offsets --topic TOPIC --to-earliest --dry-run +``` + +### Delete group. + +``` +kafka-consumer-groups --bootstrap-server "$KAFKA_BOOTSTRAP_SERVERS" --group GROUP --delete +Shift consumer back 10k +``` + +### Specify the partition to shift, else all will be shifted + +``` +kafka-consumer-groups --bootstrap-server "$KAFKA_BOOTSTRAP_SERVERS" --group GROUP \ +--topic TOPIC:0 --reset-offsets --shift-by -10000 +``` diff --git a/code/kubernetes/README.md b/code/kubernetes/README.md new file mode 100644 index 0000000..b44c3ad --- /dev/null +++ b/code/kubernetes/README.md @@ -0,0 +1,96 @@ + +## kubernetes + +
      + +### tl; dr + +
      + +1. a **kubernetes cluster** consists of nodes (similar to servers) +2. **nodes** run **pods**, which are collections of **docker containers** +3. **containers** in a pod share the same network +4. **deployment** is a kubernetes object responsible for launching and maintaining pods +6. **services** objects allow pods to communicate with other pods + + +
      + +--- + +### examples in this repository + +
      + +* **[spin up a node server example](node-server-example)** +* **[using kustomize for deployment](kustomize)** +* **[using python cdk for deployment](python-cdk)** + + +
      + +--- + +### external resources + +
      + +##### learning K8s + +* [kubelabs](https://github.com/collabnix/kubelabs) +* [scalable microservices](https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615) + +##### tools + + +- [minikube](https://github.com/kubernetes/minikube) implements a local Kubernetes cluster on macOS, Linux, and Windows. You can install it following [this instructions](https://minikube.sigs.k8s.io/docs/start/) +- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) is a command line interface for running commands against Kubernetes clusters +- [kubectx](https://github.com/ahmetb/kubectx) is a tool to switch between k8s contexts +- [k14s](https://k14s.io/): Kubernetes Tools that follow Unix philosophy to be simple, and composable + +##### tutorials + + +* [Google's K8s 101](https://techdevguide.withgoogle.com/paths/cloud/sequence-2/kubernetes-101-pods-nodes-containers-and-clusters/#!) +* [K8s Bootcamp](https://kubernetesbootcamp.github.io/kubernetes-bootcamp/) +* [K8s the Hard Way](https://github.com/kelseyhightower/kubernetes-the-hard-way#labs). +* [Kubernetes Community Overview and Contributions Guide](https://docs.google.com/presentation/d/1JqcALpsg07eH665ZXQrIvOcin6SzzsIUjMRRVivrZMg/edit?usp=sharing) +* [An Intro to Google’s Kubernetes and How to Use It](http://www.ctl.io/developers/blog/post/what-is-kubernetes-and-how-to-use-it/) +* [Getting Started on Kubernetes](http://containertutorials.com/get_started_kubernetes/index.html) +* [Kubernetes: The Future of Cloud Hosting](https://github.com/meteorhacks/meteorhacks.github.io/blob/master/_posts/2015-04-22-learn-kubernetes-the-future-of-the-cloud.md) +* [Kubernetes by Google](http://thevirtualizationguy.wordpress.com/tag/kubernetes/) +* [Application Containers: Kubernetes and Docker from Scratch](http://keithtenzer.com/2015/06/01/application-containers-kubernetes-and-docker-from-scratch/) +* [Learn the Kubernetes Key Concepts in 10 Minutes](http://omerio.com/2015/12/18/learn-the-kubernetes-key-concepts-in-10-minutes/) +* [The Children's Illustrated Guide to Kubernetes](https://kubernetes.io/blog/2016/06/illustrated-childrens-guide-to-kubernetes/) +* [The ‘kubectl run’ command](http://medium.com/@mhausenblas/the-kubectl-run-command-27c68de5cb76#.mlwi5an7o) +* [Docker Kubernetes Lab Handbook](https://github.com/xiaopeng163/docker-k8s-lab) +* [Curated Resources for Kubernetes](https://hackr.io/tutorials/learn-kubernetes) +* [Kubernetes Comic](https://cloud.google.com/kubernetes-engine/kubernetes-comic/) +* [Kubernetes 101: Pods, Nodes, Containers, and Clusters](https://medium.com/google-cloud/kubernetes-101-pods-nodes-containers-and-clusters-c1509e409e16) +* [An Introduction to Kubernetes](http://www.digitalocean.com/community/tutorials/an-introduction-to-kubernetes). +* [Kubernetes and everything else - Introduction to Kubernetes and it's context](https://rinormaloku.com/introduction-application-architecture/) +* [Installation on Centos 7](http://severalnines.com/blog/installing-kubernetes-cluster-minions-centos7-manage-pods-services) +* [Setting Up a Kubernetes Cluster on Ubuntu 18.04](https://mherman.org/blog/2018/08/20/setting-up-a-kubernetes-cluster-on-ubuntu/) +* [Cloud Native Landscape](https://landscape.cncf.io/) +* [Kubernetes Tutorials by Kubernetes Team](http://kubernetes.io/docs/tutorials/) +* [Kubernetes By Example by OpenShift Team](http://kubernetesbyexample.com) +* [Kubernetes Tutorial by Tutorialspoint](http://www.tutorialspoint.com/kubernetes/) +* [Imperative vs. Declarative — a Kubernetes Tutorial](https://medium.com/payscale-tech/imperative-vs-declarative-a-kubernetes-tutorial-4be66c5d8914) + +##### MOOCs + +* [Learn Kubernetes Youtube series](https://www.youtube.com/playlist?list=PL34sAs7_26wNBRWM6BDhnonoA5FMERax0) +* [Scalable Microservices with Kubernetes at Udacity](http://in.udacity.com/course/scalable-microservices-with-kubernetes--ud615) +* [Introduction to Kubernetes at edX](http://www.edx.org/course/introduction-kubernetes-linuxfoundationx-lfs158x) + +##### articles + +* [Digital Ocean: How we launched our marketplace using k8s](https://blog.digitalocean.com/how-we-launched-our-marketplace-using-digitalocean-kubernetes-part-1/) +* [Are you Ready to Manage your Infrastructure like Google?](http://blog.jetstack.io/blog/k8s-getting-started-part1/) +* [Google is years ahead when it comes to the cloud, but it's happy the world is catching up](http://www.businessinsider.in/Google-is-years-ahead-when-it-comes-to-the-cloud-but-its-happy-the-world-is-catching-up/articleshow/47793327.cms) +* [Top Reasons Businesses Should Move to Kubernetes Now](http://supergiant.io/blog/top-reasons-businesses-should-move-to-kubernetes-now) + +##### prometheus operator + +* [Monitor external services with the prometheus operator](https://jpweber.io/blog/monitor-external-services-with-the-prometheus-operator/) +* [Prometheus Operator — How to monitor an external service](https://devops.college/prometheus-operator-how-to-monitor-an-external-service-3cb6ac8d5acb) diff --git a/code/kubernetes/kustomize/.gitignore b/code/kubernetes/kustomize/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/kustomize-example/README.md b/code/kubernetes/kustomize/README.md similarity index 86% rename from kustomize-example/README.md rename to code/kubernetes/kustomize/README.md index 1533dfc..23d5994 100644 --- a/kustomize-example/README.md +++ b/code/kubernetes/kustomize/README.md @@ -1,12 +1,16 @@ -# Introduction to Kustomize - Wordpress Example +## wordpress with cdk + +
      [Kustomize](https://kustomize.io/) is a tool that lets you create an entire Kubernetes application out of individual pieces — without touching the YAML for the individual components. -Kustomize traverses a Kubernetes manifest to add, remove or update configuration options without forking. It is available both as a standalone binary and as a native feature of kubectl. +Kustomize traverses a Kubernetes manifest to add, remove, or update configuration options without forking. Kustomize is available both as a standalone binary and as a native feature of kubectl. Kustomize enables you to do that by creating a file that ties everything together, or optionally includes “overrides” for individual parameters. -In this example, you will learn how to use Kustomize to setup a Wordpress Kubernetes clusters. +In this example, you will learn how to use Kustomize to setup a Wordpress Kubernetes clusters. Please also check out [this article for a more deatailed explanation](https://medium.com/python-for-the-utopian/a-quick-introduction-to-kustomize-for-kubernetes-73490efa0966). + +
      ### Set Minukube @@ -18,6 +22,7 @@ Start your cluster: minikube start ``` +
      ### Install Kustomize @@ -86,6 +91,7 @@ Now, you can check that the services are up (you should see `mysql` and `wordpre kubectl get services ``` +
      ### Applying Overlays diff --git a/kustomize-example/base/kustomization.yaml b/code/kubernetes/kustomize/base/kustomization.yaml similarity index 100% rename from kustomize-example/base/kustomization.yaml rename to code/kubernetes/kustomize/base/kustomization.yaml diff --git a/kustomize-example/base/mysql/deployment.yaml b/code/kubernetes/kustomize/base/mysql/deployment.yaml similarity index 100% rename from kustomize-example/base/mysql/deployment.yaml rename to code/kubernetes/kustomize/base/mysql/deployment.yaml diff --git a/kustomize-example/base/mysql/kustomization.yaml b/code/kubernetes/kustomize/base/mysql/kustomization.yaml similarity index 100% rename from kustomize-example/base/mysql/kustomization.yaml rename to code/kubernetes/kustomize/base/mysql/kustomization.yaml diff --git a/kustomize-example/base/mysql/secret.yaml b/code/kubernetes/kustomize/base/mysql/secret.yaml similarity index 100% rename from kustomize-example/base/mysql/secret.yaml rename to code/kubernetes/kustomize/base/mysql/secret.yaml diff --git a/kustomize-example/base/mysql/service.yaml b/code/kubernetes/kustomize/base/mysql/service.yaml similarity index 100% rename from kustomize-example/base/mysql/service.yaml rename to code/kubernetes/kustomize/base/mysql/service.yaml diff --git a/kustomize-example/base/wordpress/deployment.yaml b/code/kubernetes/kustomize/base/wordpress/deployment.yaml similarity index 100% rename from kustomize-example/base/wordpress/deployment.yaml rename to code/kubernetes/kustomize/base/wordpress/deployment.yaml diff --git a/kustomize-example/base/wordpress/kustomization.yaml b/code/kubernetes/kustomize/base/wordpress/kustomization.yaml similarity index 100% rename from kustomize-example/base/wordpress/kustomization.yaml rename to code/kubernetes/kustomize/base/wordpress/kustomization.yaml diff --git a/kustomize-example/base/wordpress/service.yaml b/code/kubernetes/kustomize/base/wordpress/service.yaml similarity index 100% rename from kustomize-example/base/wordpress/service.yaml rename to code/kubernetes/kustomize/base/wordpress/service.yaml diff --git a/code/kubernetes/kustomize/overlays/.gitkeep b/code/kubernetes/kustomize/overlays/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/code/kubernetes/kustomize/overlays/.gitkeep @@ -0,0 +1 @@ + diff --git a/kustomize-example/overlays/dev/kustomization.yaml b/code/kubernetes/kustomize/overlays/dev/kustomization.yaml similarity index 100% rename from kustomize-example/overlays/dev/kustomization.yaml rename to code/kubernetes/kustomize/overlays/dev/kustomization.yaml diff --git a/kustomize-example/overlays/dev/localserv.yaml b/code/kubernetes/kustomize/overlays/dev/localserv.yaml similarity index 100% rename from kustomize-example/overlays/dev/localserv.yaml rename to code/kubernetes/kustomize/overlays/dev/localserv.yaml diff --git a/node-server-example/Dockerfile b/code/kubernetes/node-server-example/Dockerfile similarity index 73% rename from node-server-example/Dockerfile rename to code/kubernetes/node-server-example/Dockerfile index df06395..2904781 100755 --- a/node-server-example/Dockerfile +++ b/code/kubernetes/node-server-example/Dockerfile @@ -1,5 +1,5 @@ FROM node:4.4 -MAINTAINER "bt3" +MAINTAINER "Mia Stein" EXPOSE 1337 diff --git a/node-server-example/Makefile b/code/kubernetes/node-server-example/Makefile similarity index 100% rename from node-server-example/Makefile rename to code/kubernetes/node-server-example/Makefile diff --git a/code/kubernetes/node-server-example/README.md b/code/kubernetes/node-server-example/README.md new file mode 100755 index 0000000..f4161cf --- /dev/null +++ b/code/kubernetes/node-server-example/README.md @@ -0,0 +1,92 @@ +## deploying a node.js K8s cluster with kubectl + +
      + + +* build the image: + +``` +make build: +``` + +* run the container: + +``` +make run +``` + +* check whether the server worked: + +``` +make curl +``` + +* check container's status: + +``` +make status +``` + +
      + +--- + +### useful commands + +
      + +* exec inside the container: + +``` +docker exec -i -t /bin/bash +``` + +* check images in disk: + +``` +docker images +``` + +
      + +---- + +### pushing the registry to kubernetes + +
      + +* in a real production system, we’ll want to build images in one place, then run these images in the Kubernetes cluster +* the system that images for distribution is called a **container registry** +* using a `yaml` Kubernetes files (for example, the one inside `node_server_example/`), you can now deploy the image with: + +``` +kubectl create -f node_example_kube_config.yaml +``` + +* after that, you are able to create the service with: + +``` +kubectl expose deployment node-app-test +``` + +* also, check out the service status with: + +``` +kubectl get services +``` + +
      + +--- + +### cleanning up + +
      + +* removing the service and the deployment when you are done: + +``` +kubectl delete service node-app-test +kubectl delete deployment node-app-test +``` + diff --git a/node-server-example/node_example_kube_config.yaml b/code/kubernetes/node-server-example/node_example_kube_config.yaml similarity index 83% rename from node-server-example/node_example_kube_config.yaml rename to code/kubernetes/node-server-example/node_example_kube_config.yaml index 2b8020a..8c4e631 100755 --- a/node-server-example/node_example_kube_config.yaml +++ b/code/kubernetes/node-server-example/node_example_kube_config.yaml @@ -15,4 +15,4 @@ spec: ports: - containerPort: 1337 imagePullSecrets: - - name: + - name: diff --git a/node-server-example/server.js b/code/kubernetes/node-server-example/server.js similarity index 100% rename from node-server-example/server.js rename to code/kubernetes/node-server-example/server.js diff --git a/code/kubernetes/python-cdk/.gitkeep b/code/kubernetes/python-cdk/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/code/kubernetes/python-cdk/.gitkeep @@ -0,0 +1 @@ + diff --git a/code/kubernetes/python-cdk/README.md b/code/kubernetes/python-cdk/README.md new file mode 100644 index 0000000..75a7ac8 --- /dev/null +++ b/code/kubernetes/python-cdk/README.md @@ -0,0 +1,7 @@ +## examples using python cdk to orchestrate kubernetes + +
      + +* [setting up a postgreSQL RDS with CDK](https://github.com/go-outside-labs/orchestration-toolkit/tree/master/kubernetes/python-cdk/python/PostgreSQL_example) +* [setting up a VPC with CDK](https://github.com/go-outside-labs/orchestration-toolkit/tree/master/kubernetes/python-cdk/python/VPC_example) +* [gitops, flux, and deploying services with CDK](https://github.com/go-outside-labs/orchestration-toolkit/blob/master/kubernetes/python-cdk/admin_guide_cdk.md) diff --git a/code/kubernetes/python-cdk/admin_guide_cdk.md b/code/kubernetes/python-cdk/admin_guide_cdk.md new file mode 100644 index 0000000..afab8fc --- /dev/null +++ b/code/kubernetes/python-cdk/admin_guide_cdk.md @@ -0,0 +1,416 @@ +# GitOps, Flux, and Deploying services with CDK + +An introduction to some concepts and tools we will be using. + +## What's **GitOps** + +In general, there are two ways to deploy infrastructure changes: + +- **Procedural way**: telling some tools what to do, e.g.: Ansible. This is also known as a push model. +- **Declarative way**: telling some tool what you want to have done, also known as infrastructure as code, e.g.: Terraform, Pulumi, CDK. + +[GitOps](https://www.weave.works/technologies/gitops/) is a term created by WeWorks and works by using Git as a source of truth for declarative infrastructure and applications. Automated CI/CD pipelines roll out changes to your infrastructure after commits are pushed and approved in Git. + +The GitOps methodology consists in describing the desired state of the system using a **declarative** specification for each environment (e.g., our Kubernetes cluster for a specific environment): + +- A Git repo is the single source of truth for the desired state of the system +- All changes to the desired state are Git commits +- All specified properties of the cluster are also observable in the cluster so that we can detect if the desired and observed states are the same (converged) or different (diverged) + +In GitOps you only push code. The developer interacts with the source control, which triggers the CI/CD tool (CicleCI), and this pushes the docker image to the container register (e.g. docker hub). You see the Docker image as an artifact. + +To deploy that Docker image, you have a different config repository which contains the Kubernetes manifests. CircleCI sends a pull request, and when it is merged, a pod in the Kubernetes cluster pulls the image to the cluster (similar to `kubectl apply`, or even `helm update`). Everything is controlled through pull requests. You push code, not containers. + +The refereed pod runs a tool called [Flux](https://github.com/fluxcd/flux), which automatically ensures that the state of a cluster matches the config in Git. It uses an operator in the cluster to trigger deployments inside Kubernetes, which means you don't need a separated CircleCI. It monitors all relevant image repositories, detects new images, triggers deployments, and updates the desired running configuration based on that. + +## Kubernetes + +A Kubernetes cluster consists of a series of objects: + +- **Nodes**, which can be equated to servers, be they bare-metal or virtual machines running in a cloud. +- Nodes run **Pods**, which are collections of Docker containers. A Pod is the unit of deployment in Kubernetes. All containers in a Pod share the same network and can refer to each other as if they were running on the same host. The Kubernetes object responsible for launching and maintaining the desired number of pods is called a **Deployment.** +- For Pods to communicate with other Pods, Kubernetes provides another kind of object called a **Service.** +- Services are tied to Deployments through **Selectors** and **Labels,** and are also exposed to external clients either by exposing a **NodePort** as a static port on each Kubernetes node or by creating a **LoadBalancer** object. + +## Kustomize + +Kustomize provides a **purely declarative approach** to configuration customization that adheres to and leverages the familiar and carefully designed Kubernetes API. + +Kustomize lets you customize raw, template-free YAML files for multiple purposes, leaving the original YAML untouched and usable as is. Kustomize targets Kubernetes; it understands and can patch. + +### How Kustomize works + +For each service, there is two directories, where a `kustomization.yaml` file list all the `yaml` files inside them: + +- `base/` - usually immutable. +- `overlay/`- where you add customizations and new code. + +--- + +# **Bootstrapping Services in an AWS EKS cluster** + +## **Pre-requisites** + +### **Install CLI tools** + +- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html). +- [Kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/). +- [sops](https://github.com/mozilla/sops). +- [Kustomize](https://github.com/kubernetes-sigs/kustomize/blob/master/docs/INSTALL.md). +- [fluxctl](https://www.weave.works/blog/install-fluxctl-and-manage-your-deployments-easily). + +### **Get access to our AWS Cluster** + +We spin up clusters' resources using AWS CDK. This provisions a **developer EKS cluster** and **MSK cluster**, together with the following resources: a dedicated **VPC**, a **VPN**, **Elasticsearch cluster**, **Cloudwatch dashboards**, and an **RDS Postgres instance configured for Hydra.** + +This staging and dev clusters are already available for you in our AWS staging account. For full access you need: + +- AWS credentials (`AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`) +- The VPN `.ovpn` file (can be downloaded from the dashboard) and VPN client private key. +- Kubeconfig file. + +However, if you would like to bootstrap an entirely new cluster, follow the instructions below. + + +## **Bootstrapping Step-by-step** + +### **Update Kubeconfig** + +Edit `./bootstrap/kubeconfig/aws-auth-configmap.yaml` with your account's `rolearn`. + +Set env variables: + + export REGION= + +Get kubectl config: + + ./get_kubeconfig.sh + +Remember, you can always change your kubeconfig context with: + + kubectl config use-context + +You can also use [kubectx](https://github.com/ahmetb/kubectx) for this. + +### **Create Nginx ingress controller in the EKS cluster** + +Create Nginx ingress controller's namespaces, services, roless, deployments, etc. by running: + + kubectl apply -f ./bootstrap/nginx-ingress-alb/all-in-one.yaml + +This is the output: + + namespace/kube-ingress created + serviceaccount/nginx-ingress-controller created + clusterrole.rbac.authorization.k8s.io/nginx-ingress-controller created + role.rbac.authorization.k8s.io/nginx-ingress-controller created + clusterrolebinding.rbac.authorization.k8s.io/nginx-ingress-controller created + rolebinding.rbac.authorization.k8s.io/nginx-ingress-controller created + service/nginx-default-backend created + deployment.extensions/nginx-default-backend created + configmap/ingress-nginx created + service/ingress-nginx created + deployment.extensions/ingress-nginx created + priorityclass.scheduling.k8s.io/high-priority created + +Check whether all the pods created: + + kubectl get pods --namespace kube-ingress + +Should result: + + NAMESPACE NAME READY STATUS RESTARTS AGE + kube-ingress ingress-nginx-55966f5cf8-bpvwj 1/1 Running 0 7m53s + kube-ingress ingress-nginx-55966f5cf8-vssfl 1/1 Running 0 7m53s + kube-ingress ingress-nginx-55966f5cf8-xtkv9 1/1 Running 0 7m53s + kube-ingress nginx-default-backend-c4bbbc8b7-j5cnh 1/1 Running 0 7m57s + +Check all the services created: + + kubectl get services --namespace kube-ingress + +Should result: + + NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE + kube-ingress ingress-nginx NodePort 172.20.203.36 80:30080/TCP,443:30443/TCP 6m32s + kube-ingress nginx-default-backend ClusterIP 172.20.128.3 80/TCP 6m35s + +Note that the `Service` type for the `ingress-nginx` service is `NodePort` and not `LoadBalancer`. We don't want AWS to create a new Load Balancer every time we recreate the ingress. Instead, we provision an ALB and send both HTTP and HTTPS traffic to a `Target Group` that targets port `30080` on the EKS worker nodes (which is the `nodePort` in the manifest above for HTTP traffic). + +### **Create a namespace in the EKS cluster** + +This step is necessary in case you are creating an entirely new cluster namespace (i.e., if it's not `dev` nor `staging`). + +To add a new namespace, just follow the current examples in `/bootstrap/namespaces/overlays/` and then apply the changes in the overlay: + + cd ./bootstrap/namespaces/overlays/ + kustomize build . | kubectl apply -k + +You should see something like: + + namespace/ created + namespace/logging created + namespace/monitoring created + namespace/observability created + +Check whether it worked: + + kubectl get ns + +### **Create secret for DockerHub credentials in EKS cluster** + +All right, if you are working on an AWS account that is not staging, hold tight, because this step is a trip. + +Currently, we use [sops](https://github.com/mozilla/sops) to manage secrets in Kubernetes. + +You have a file named `./bootstrap/dockerhub-creds-secret/docker-hub.yaml` that possess the secret for DockerHub credentials and it's encrypted. So the first thing we need to do is decrypt it so we can use the secret for our cluster. The caveat is that you need to set your AWS creds to the account `773713188930` (staging) account (or it won't be able to grab the key to decrypt): + + sops -d docker-hub.yaml > dec.yaml + +Take a look at `dec.yaml`, you will see something like this: + + apiVersion: v1 + type: kubernetes.io/dockerconfigjson + kind: Secret + metadata: + name: docker-hub + data: + .dockerconfigjson: + +Now, the next step is either to go to the [AWS KMS dashboard](https://us-east-2.console.aws.amazon.com/kms/home?region=us-east-2#/kms/keys) or run `aws kms create-custom-key-store` to create a `Customer managed keys`. + +KMS is a service that encrypts and decrypts data with AES_GCM, using keys that are never visible to users of the service. Each KMS master key has a set of role-based access controls, and individual roles are permitted to encrypt or decrypt using the master key. KMS helps solve the problem of distributing keys, by shifting it into an access control problem that can be solved using AWS's trust model. + +Once you have this ready, grab its ARN. + +Create a new encrypted file with your new KMS key: + + sops --kms="ARN" --encrypt dec.yaml > docker-hub-.yaml + + +This Secret is created in several namespaces (default, monitoring, logging, flux-system). + +### **Apply overlay config for fluentd, jaeger-operator and prometheus-operator** + +Follow the same procedure for each of these services: `./bootstrap/fluentd`, `./bootstrap/jaeger-operator` and `./bootstrap/prometheus-operator`, copying an overlay subdirectory for your namespace, replacing your namespace string to anywhere where `staging` is, and running: + + cd ./bootstrap//overlays/ + kustomize build . | kubectl apply -f - + +### **Install and configure Flux in EKS cluster** + +This part is a little longer. [Here](https://docs.fluxcd.io/en/latest/tutorials/get-started-kustomize.html) is the official Flux documentation with Kustomize. + +Flux (and memcached) is bootstrapped by following the instructions inside `bootstrap/flux/`. That directory should have the following structure: + + ├── base + │ ├── flux + │ └── memcached + ├── overlays + +The first step is creating an `overlay/` directory for your deployment, similar to `overlay/staging`. + +### **How Flux works** + +Flux runs by looking at `./.flux.yaml`. This calls `./generate_kustomize_output.sh` in a docker container and runs the following: + +1. Set the environment (e.g. `staging`). +2. For each sub-directory in `kustomize/`, `cd` inside each `overlays/` for the environment and runs `kustomize build`. +3. If there are `sops` secrets inside these directories, decrypts the secret as well. + +### **Setting up Flux Docker image** + +The default `Deployment` for Flux is using `weaveworks/flux` Docker image. + +You will need to push a docker image to DockerHub for your namespace. + +Once you have a [docker image in Docker Hub] grab its tag (e.g. `staging-af87bcc`). + + +### **Building and deploying** + +Inside your overlay directory, run: + + cd bootstrap/flux/overlays/ + kustomize build . | kubectl apply -f - + +You should see the following: + + namespace/flux-system created + serviceaccount/flux created + podsecuritypolicy.policy/flux created + role.rbac.authorization.k8s.io/flux created + clusterrole.rbac.authorization.k8s.io/flux-psp created + clusterrole.rbac.authorization.k8s.io/flux created + clusterrole.rbac.authorization.k8s.io/flux-readonly created + rolebinding.rbac.authorization.k8s.io/flux created + clusterrolebinding.rbac.authorization.k8s.io/flux-psp created + clusterrolebinding.rbac.authorization.k8s.io/flux created + configmap/flux-kube-config-hmbbmcb469 created + secret/flux-git-deploy created + service/flux-memcached created + deployment.apps/flux created + deployment.apps/flux-memcached created + +Wait for Flux and memcached to start: + + kubectl -n flux-system rollout status deployment.apps/flux + +Check that the pods are up: + + kubectl get pods --namespace flux-system + +You should see two pods, something like this: + + NAME READY STATUS RESTARTS AGE + flux- 1/1 Running 0 21m + flux-memcached- 1/1 Running 0 60m + +At any point you can debug your pod by running: + + kubectl describe pod flux- -n flux-system + +### **Adding key to Github** + +Generate a deployment key: + + fluxctl --k8s-fwd-ns=flux-system identity + + +Later on, when you have everything set, you can force Flux `git pull` with + + fluxctl sync --k8s-fwd-ns flux-system + + +### **Create k8s-developer-role in multiple namespaces in EKS cluster** + +Similarly to the previous step, create an overlay to your namespace (e.g. dev) in the [RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) kustomize resources. You can do this by copying the files from `./bootstrap/rbac/overlays/staging`, and changing the namespace string from `staging` inside `k8s-developer-user.yaml`: + + ... + metadata: + name: k8s-developer-role + namespace: + ... + metadata: + name: k8s-developer-rolebinding + namespace: + +Apply the changes with: + + cd bootstrap/rbac/overlays/ + kustomize build . | kubectl apply -f - + +You should see the following: + + role.rbac.authorization.k8s.io/k8s-developer-role-default created + role.rbac.authorization.k8s.io/k8s-developer-role created + role.rbac.authorization.k8s.io/k8s-developer-role-monitoring created + rolebinding.rbac.authorization.k8s.io/k8s-developer-rolebinding-default created + rolebinding.rbac.authorization.k8s.io/k8s-developer-rolebinding created + rolebinding.rbac.authorization.k8s.io/k8s-developer-rolebinding-monitoring created + + + +--- + +# **Deploying Advanced services in an AWS EKS cluster** + + +## **Porting Hydra** + +### **Customizing the overlay directory** + +Inside `./kustomize/hydra`, create `overlay/` subdirectory for your environment. + +Create a KMS key (the same way as in step *Create secret for DockerHub credentials in EKS cluster* in `./boostrap`). Grab its ARN and add it too `./kustomize/hydra/overlays/.sops.yaml`. + +Replace the `staging` string (and the correct host URLS) for your namespace, inside `kustomization.yaml`, `configmap.yaml`. + +### **Creating sops secrets for Hydra** + +We use sops to encrypt secret values for environment variables representing credentials, database connections, etc. so that Flux can pick these secrets when it needs. + +We place these files inside a `.sops/` directory inside the overlay environment directory. + +Grab the RDS Postgres data and create secret string: + + echo -n "postgres://hydradbadmin:< hydra_passport>@ .sops/DATABASE_URL.enc + sops -e -i .sops/DATABASE_URL.enc + +Create password salt: + + echo -n " .sops/OIDC_SUBJECT_TYPE_PAIRWISE_SALT.enc + sops -e -i .sops/OIDC_SUBJECT_TYPE_PAIRWISE_SALT.enc + +Create system secret: + + echo -n " .sops/SYSTEM_SECRET.enc + sops -e -i .sops/SYSTEM_SECRET.enc + +Generate `secrets.yaml': + + npx --quiet --package @reactioncommerce/merge-sops-secrets@1.2.1 sops-to-secret secret-stub.yaml > secret.yaml + +### **Building and applying** + +Now, just run: + + cd ./kustomize/hydra/overlays/ + kustomize build . | kubectl apply -f - + + +### **Create MongoDB database and user in Atlas** + +So that you can have MongDB URL and MongDB OPLOG URL for the next step. + +### **Creating sops secrets** + +Create MongDB URL secret: + + echo -n "" .sops/MONGO_URL.enc + sops -e -i .sops/MONGO_URL.enc + +Create MongDB OPLOG URL secret: + + echo -n "" .sops/MONGO_OPLOG_URL.enc + sops -e -i .sops/MONGO_OPLOG_URL.enc + + +Generate `secrets.yaml': + + npx --quiet --package @reactioncommerce/merge-sops-secrets@1.2.1 sops-to-secret secret-stub.yaml > secret.yaml + +### **Building and applying** + +Now, just run: + + cd ./kustomize/hydra/overlays/ + kustomize build . | kubectl apply -f - + + +### **Testing pod** + + kubectl get pods -ntest + +Exec to the pod: + + kubectl exec -it -ntest -- bash + +## **Setting DNS Records** + + +### **Adding NS recorders** + +First, add the nameserver records for `ENV.doman.io` in [Route53](https://console.aws.amazon.com/route53/home?region=us-east-2#hosted-zones:). + +### **Adding Certificate** + +You might have to add a net certificate `*.ENV.domain.io/` to [ACM](https://us-east-2.console.aws.amazon.com/acm/home?region=us-east-2#/), then add its record in Route53 (as CNAME), and associate it to the load balancer. + +In the [load balancer dashboard](https://us-east-2.console.aws.amazon.com/ec2/v2/home?region=us-east-2#LoadBalancers:sort=loadBalancerName), go to listeners and make sure `HTTPS : 443` uses that certificate. Make sure the load balancer has the correct security groups. + +### **Add All aliases** + +Then add all the URL aboves as IPv4 aliases pointing them to the load balancer. + + diff --git a/code/kubernetes/python-cdk/python/PostgreSQL_example/README.md b/code/kubernetes/python-cdk/python/PostgreSQL_example/README.md new file mode 100644 index 0000000..65e08fe --- /dev/null +++ b/code/kubernetes/python-cdk/python/PostgreSQL_example/README.md @@ -0,0 +1,70 @@ +# Setting up a PostgreSQL RDS with CDK in Python + +### Create a virtual environment and install dependencies: + +``` +virtualenv .env +source .env/bin/activate +pip3 install -r requirements.txt +``` + +### Define You RDS DB + +Add any constant variable in `cdk.json` and then define how you want your RDS instance in `postgre_sql_example/postgre_sql_example_stack.py`: + +``` +class PostgreSqlExampleStack(core.Stack): + + def __init__(self, scope: core.Construct, id: str, **kwargs) -> None: + super().__init__(scope, id, **kwargs) + + # Database Instance + instance = rds.DatabaseInstance(self, + 'examplepostgresdbinstance', + master_username=master_username, + engine=rds.DatabaseInstanceEngine.POSTGRES, instance_class=ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.MICRO), + vpc=self.vpc, + auto_minor_version_upgrade=auto_minor_version_upgrade, + availability_zone=availability_zone, + database_name=database_name, + enable_performance_insights=enable_performance_insights, + storage_encrypted=storage_encrypted, + multi_az=multi_az, + backup_retention=backup_retention, + monitoring_interval=monitoring_interval, + ) +``` + +### Create synthesized CloudFormation templates + +``` +cdk synth +``` + +You can check what changes are introduced into your current AWS resources with: +``` +cdk diff --profile +``` + + +### Deploy to AWS + +If everything looks OK, deploy with: + +``` +cdk deploy --profile +``` + +To check all the stacks in the app: + +``` +cdk ls +``` + +### Clean up + +To destroy/remove all the newly created resources, run: + +``` +cdk destroy --profile +``` diff --git a/code/kubernetes/python-cdk/python/PostgreSQL_example/app.py b/code/kubernetes/python-cdk/python/PostgreSQL_example/app.py new file mode 100644 index 0000000..9f53e87 --- /dev/null +++ b/code/kubernetes/python-cdk/python/PostgreSQL_example/app.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +from aws_cdk import core + +from postgre_sql_example.postgre_sql_example_stack import PostgreSqlExampleStack + + +app = core.App() +PostgreSqlExampleStack(app, "postgre-sql-example") + +app.synth() diff --git a/code/kubernetes/python-cdk/python/PostgreSQL_example/cdk.json b/code/kubernetes/python-cdk/python/PostgreSQL_example/cdk.json new file mode 100644 index 0000000..6ea5f9c --- /dev/null +++ b/code/kubernetes/python-cdk/python/PostgreSQL_example/cdk.json @@ -0,0 +1,16 @@ +{ + "app": "python3 app.py", + "context": { + "rds.auto_minor_version_upgrade": false, + "rds.availability_zone": + "rds.backup_retention": + "rds.database_name": "postgres_db", + "rds.enable_performance_insights": true, + "rds.master_username": "postgres", + "rds.monitoring_interval": 60, + "rds.multi_az": false, + "rds.storage_encrypted": false, + "vpc.cidr": "10.0.0.0/16", + "vpc.max_azs": + } +} diff --git a/code/kubernetes/python-cdk/python/PostgreSQL_example/postgre_sql_example/__init__.py b/code/kubernetes/python-cdk/python/PostgreSQL_example/postgre_sql_example/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/code/kubernetes/python-cdk/python/PostgreSQL_example/postgre_sql_example/postgre_sql_example_stack.py b/code/kubernetes/python-cdk/python/PostgreSQL_example/postgre_sql_example/postgre_sql_example_stack.py new file mode 100644 index 0000000..f158702 --- /dev/null +++ b/code/kubernetes/python-cdk/python/PostgreSQL_example/postgre_sql_example/postgre_sql_example_stack.py @@ -0,0 +1,59 @@ +import json +import sys +from aws_cdk import ( + aws_ec2 as ec2, + aws_rds as rds, + core as core, +) + +# Python CDK does not have get_context yet. +def _get_context(): + CONTEXT_FILE = 'cdk.json' + try: + with open(CONTEXT_FILE, 'r') as f: + return json.load(f)['context'] + except IOError: + print('Could not open context file {}. Exiting...'.format(CONTEXT_FILE)) + sys.exit(1) + except KeyError as e: + print('Context file {0} is misconfigured {1}. Exiting...'.format(CONTEXT_FILE, e)) + sys.exit(1) + +class PostgreSqlExampleStack(core.Stack): + + def __init__(self, scope: core.Construct, id: str, **kwargs) -> None: + super().__init__(scope, id, **kwargs) + + # Grab variables from cdk.json + context = _get_context() + auto_minor_version_upgrade = context["rds.auto_minor_version_upgrade"] + availability_zone = context["rds.availability_zone"] + backup_retention = core.Duration.days(context["rds.backup_retention"]) + database_name = context["rds.database_name"] + enable_performance_insights = context["rds.enable_performance_insights"] + master_username = context["rds.master_username"] + monitoring_interval = core.Duration.seconds(context["rds.monitoring_interval"]) + multi_az = context["rds.multi_az"] + storage_encrypted = context["rds.storage_encrypted"] + cidr = context["vpc.cidr"] + max_azs = context["vpc.max_azs"] + + # Set VPC + self.vpc = ec2.Vpc(self, "VPCTest", cidr=cidr, max_azs=max_azs) + + # Database Instance + instance = rds.DatabaseInstance(self, + 'storefrontrdspostgresdbinstance', + master_username=master_username, + engine=rds.DatabaseInstanceEngine.POSTGRES, instance_class=ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.MICRO), + vpc=self.vpc, + auto_minor_version_upgrade=auto_minor_version_upgrade, + availability_zone=availability_zone, + database_name=database_name, + enable_performance_insights=enable_performance_insights, + storage_encrypted=storage_encrypted, + multi_az=multi_az, + backup_retention=backup_retention, + monitoring_interval=monitoring_interval, + ) + diff --git a/code/kubernetes/python-cdk/python/PostgreSQL_example/requirements.txt b/code/kubernetes/python-cdk/python/PostgreSQL_example/requirements.txt new file mode 100644 index 0000000..74aaf6d --- /dev/null +++ b/code/kubernetes/python-cdk/python/PostgreSQL_example/requirements.txt @@ -0,0 +1,34 @@ +astroid==2.2.5 +attrs==19.1.0 +aws-cdk.assets==1.10.0 +aws-cdk.aws-cloudwatch==1.10.0 +aws-cdk.aws-ec2==1.10.0 +aws-cdk.aws-events==1.10.0 +aws-cdk.aws-iam==1.10.0 +aws-cdk.aws-kms==1.10.0 +aws-cdk.aws-lambda==1.10.0 +aws-cdk.aws-logs==1.10.0 +aws-cdk.aws-rds==1.10.0 +aws-cdk.aws-s3==1.10.0 +aws-cdk.aws-s3-assets==1.10.0 +aws-cdk.aws-sam==1.10.0 +aws-cdk.aws-secretsmanager==1.10.0 +aws-cdk.aws-sqs==1.10.0 +aws-cdk.aws-ssm==1.10.0 +aws-cdk.core==1.10.0 +aws-cdk.cx-api==1.10.0 +aws-cdk.region-info==1.10.0 +cattrs==0.9.0 +isort==4.3.21 +jsii==0.17.1 +lazy-object-proxy==1.4.2 +mccabe==0.6.1 +pep8==1.7.1 +publication==0.0.3 +pylint==2.3.1 +python-dateutil==2.8.0 +six==1.12.0 +typed-ast==1.4.0 +typing-extensions==3.7.4 +virtualenv==16.7.4 +wrapt==1.11.2 diff --git a/code/kubernetes/python-cdk/python/PostgreSQL_example/setup.py b/code/kubernetes/python-cdk/python/PostgreSQL_example/setup.py new file mode 100644 index 0000000..a3cabad --- /dev/null +++ b/code/kubernetes/python-cdk/python/PostgreSQL_example/setup.py @@ -0,0 +1,45 @@ +import setuptools + + +with open("README.md") as fp: + long_description = fp.read() + + +setuptools.setup( + name="postgre_sql_example", + version="0.0.1", + + description="A postgres CDK Python example", + long_description=long_description, + long_description_content_type="text/markdown", + + author="author", + + package_dir={"": "postgre_sql_example"}, + packages=setuptools.find_packages(where="postgre_sql_example"), + + install_requires=[ + "aws-cdk.core", + ], + + python_requires=">=3.6", + + classifiers=[ + "Development Status :: 4 - Beta", + + "Intended Audience :: Developers", + + "License :: OSI Approved :: Apache Software License", + + "Programming Language :: JavaScript", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + + "Topic :: Software Development :: Code Generators", + "Topic :: Utilities", + + "Typing :: Typed", + ], +) diff --git a/code/kubernetes/python-cdk/python/VPC_example/README.md b/code/kubernetes/python-cdk/python/VPC_example/README.md new file mode 100644 index 0000000..cf5f952 --- /dev/null +++ b/code/kubernetes/python-cdk/python/VPC_example/README.md @@ -0,0 +1,69 @@ +# Setting up a VPC with CDK in Python + +[AWS CDK](https://docs.aws.amazon.com/cdk/latest/guide/home.html) is a very neat way to write infrastructure as code, enabling you to create and provision AWS infrastructure deployments predictably and repeatedly. + +You choose your favorite language to code what resources (stacks) you want, and CDK synthetizes them to CloudFormation and helps you to deploy them to AWS. + +In this example we see how to setup a VPC using CDK in Python. + +### Install AWS CDK + +Follow [this instructions](https://github.com/aws/aws-cdk#at-a-glance). + +### Create a virtual environment and install dependencies: + +``` +virtualenv venv +source venv/bin/activate +pip install -r requirements.txt +``` + +Note: If you are starting from a blank project with `cdk init app --language=python` instead, you will we need to manually install resources, such as `pip install aws_cdk.aws_ec2`. + +### Define You VPC + +Define how you want your VPC in the file `vpc_example/vpc_example_stack.py`: + +``` +class VpcExampleStack(core.Stack): + + def __init__(self, scope: core.Construct, id: str, **kwargs) -> None: + super().__init__(scope, id, **kwargs) + + vpc = aws_ec2.Vpc(self, "MiaVPCTest", cidr="10.0.0.0/16", max_azs=3) +``` + + +### Create synthesized CloudFormation template + +``` +cdk synth +``` + +You can check what changes this introduces into your AWS account: +``` +cdk diff --profile +``` + +### Deploy to AWS + +If everything looks right, deploy: + +``` +cdk deploy --profile +``` + +To check all the stacks in the app: + +``` +cdk ls +``` + +### Clean up + +To destroy/remove all the newly created resources, run: + +``` +cdk destroy --profile +``` + diff --git a/code/kubernetes/python-cdk/python/VPC_example/app.py b/code/kubernetes/python-cdk/python/VPC_example/app.py new file mode 100644 index 0000000..1a926a6 --- /dev/null +++ b/code/kubernetes/python-cdk/python/VPC_example/app.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +from aws_cdk import core + +from vpc_example.vpc_example_stack import VpcExampleStack + + +app = core.App() +VpcExampleStack(app, "vpc-example") + +app.synth() diff --git a/code/kubernetes/python-cdk/python/VPC_example/cdk.json b/code/kubernetes/python-cdk/python/VPC_example/cdk.json new file mode 100644 index 0000000..787a71d --- /dev/null +++ b/code/kubernetes/python-cdk/python/VPC_example/cdk.json @@ -0,0 +1,3 @@ +{ + "app": "python3 app.py" +} diff --git a/code/kubernetes/python-cdk/python/VPC_example/imgs/vpc.png b/code/kubernetes/python-cdk/python/VPC_example/imgs/vpc.png new file mode 100644 index 0000000..c3e50e6 Binary files /dev/null and b/code/kubernetes/python-cdk/python/VPC_example/imgs/vpc.png differ diff --git a/code/kubernetes/python-cdk/python/VPC_example/requirements.txt b/code/kubernetes/python-cdk/python/VPC_example/requirements.txt new file mode 100644 index 0000000..385c3d0 --- /dev/null +++ b/code/kubernetes/python-cdk/python/VPC_example/requirements.txt @@ -0,0 +1,14 @@ +attrs==19.1.0 +aws-cdk.aws-cloudwatch==1.10.0 +aws-cdk.aws-ec2==1.10.0 +aws-cdk.aws-iam==1.10.0 +aws-cdk.aws-ssm==1.10.0 +aws-cdk.core==1.10.0 +aws-cdk.cx-api==1.10.0 +aws-cdk.region-info==1.10.0 +cattrs==0.9.0 +jsii==0.17.1 +publication==0.0.3 +python-dateutil==2.8.0 +six==1.12.0 +typing-extensions==3.7.4 diff --git a/code/kubernetes/python-cdk/python/VPC_example/setup.py b/code/kubernetes/python-cdk/python/VPC_example/setup.py new file mode 100644 index 0000000..7319fcb --- /dev/null +++ b/code/kubernetes/python-cdk/python/VPC_example/setup.py @@ -0,0 +1,45 @@ +import setuptools + + +with open("README.md") as fp: + long_description = fp.read() + + +setuptools.setup( + name="vpc_example", + version="0.0.1", + + description="A VPC CDK Python example", + long_description=long_description, + long_description_content_type="text/markdown", + + author="author", + + package_dir={"": "vpc_example"}, + packages=setuptools.find_packages(where="vpc_example"), + + install_requires=[ + "aws-cdk.core", + ], + + python_requires=">=3.6", + + classifiers=[ + "Development Status :: 4 - Beta", + + "Intended Audience :: Developers", + + "License :: OSI Approved :: Apache Software License", + + "Programming Language :: JavaScript", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + + "Topic :: Software Development :: Code Generators", + "Topic :: Utilities", + + "Typing :: Typed", + ], +) diff --git a/code/kubernetes/python-cdk/python/VPC_example/vpc_example/__init__.py b/code/kubernetes/python-cdk/python/VPC_example/vpc_example/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/code/kubernetes/python-cdk/python/VPC_example/vpc_example/vpc_example_stack.py b/code/kubernetes/python-cdk/python/VPC_example/vpc_example/vpc_example_stack.py new file mode 100644 index 0000000..688cf43 --- /dev/null +++ b/code/kubernetes/python-cdk/python/VPC_example/vpc_example/vpc_example_stack.py @@ -0,0 +1,8 @@ +from aws_cdk import core, aws_ec2 + +class VpcExampleStack(core.Stack): + + def __init__(self, scope: core.Construct, id: str, **kwargs) -> None: + super().__init__(scope, id, **kwargs) + + vpc = aws_ec2.Vpc(self, "MiaVPCTest", cidr="10.0.0.0/16", max_azs=3) diff --git a/code/kubernetes/python-cdk/ts/.gitignore b/code/kubernetes/python-cdk/ts/.gitignore new file mode 100644 index 0000000..4b8f5bb --- /dev/null +++ b/code/kubernetes/python-cdk/ts/.gitignore @@ -0,0 +1,136 @@ +# CDK +*.js +!jest.config.js +*.d.ts +node_modules +.cdk.staging +cdk.out + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.idea +.DS_Store +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# Kubernetes kubectl configuration +kubeconfig + +# CDK +cdk.out/ + +# Python +__pycache__/ +*.py[cod] +*$py.class +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# Certs +*.key +*.crt +easy-rsa/ diff --git a/code/kubernetes/python-cdk/ts/MSK_example/README.md b/code/kubernetes/python-cdk/ts/MSK_example/README.md new file mode 100644 index 0000000..e860d08 --- /dev/null +++ b/code/kubernetes/python-cdk/ts/MSK_example/README.md @@ -0,0 +1,61 @@ +# CDK MSK Example + + + +### Deploy VPC + +[Amazon VPC](https://aws.amazon.com/vpc/) lets you provision a logically isolated section of the AWS Cloud where you can all the resources as in a virtual network. + +These are the default values in `cdk.json`: + +``` +"vpc.cidr": "10.0.0.0/16", +"vpc.maxAzs": 3, +``` + +Deploy with: + +``` +cdk deploy VPCStack +``` + +### Deploy MSK + +[Amazon MSK](https://aws.amazon.com/msk/) is a managed service that makes it easy for you to build and run applications that use Apache Kafka to process streaming data. + +These are the default values in `cdk.json`: + +``` +"msk.DevMskCluster": "MskCluster", +"msk.ClusterTag": "MSK cluster", +"msk.brokerNodeGroupBrokerAzDistribution": "DEFAULT", +"msk.enhancedMonitoring": "PER_BROKER", +"msk.brokerNodeGroupEBSVolumeSize": 100, +"msk.brokerNodeGroupInstanceType": "kafka.m5.large", +"msk.brokerPort": 9092, +"msk.kafkaVersion": "2.2.1", +"msk.numberOfBrokerNodes": 3 +``` + +Deploy with: + +``` +cdk deploy MskClusterStack +``` + +#### Kafka CLI + +Note that the CLI commands for MKS are given by the keyword `kafka`, for example: + +``` +aws kafka list-clusters +``` + +To retrieve `BootstrapBrokerStringTls`, run: + +``` + aws kafka get-bootstrap-brokers --cluster-arn + ``` + +However, access and development within the cluster (e.g. creating topics, accessing brokers) need to be done while connected to the VPN. + diff --git a/code/kubernetes/python-cdk/ts/MSK_example/bin/example.ts b/code/kubernetes/python-cdk/ts/MSK_example/bin/example.ts new file mode 100644 index 0000000..bf1b4c8 --- /dev/null +++ b/code/kubernetes/python-cdk/ts/MSK_example/bin/example.ts @@ -0,0 +1,15 @@ +#!/usr/bin/env node +import 'source-map-support/register'; +import cdk = require('@aws-cdk/core'); + +import { VPCStack } from "../lib/Vpc"; +import { MskClusterStack } from "../lib/MskCluster"; + +const app = new cdk.App(); +const app_env = { + region: , + account: +}; + +const vpcStack = new VPCStack(app, 'VPCStack', {env: app_env}); +new MskClusterStack(app, 'MskClusterStack',{env: app_env, vpc: vpcStack.Vpc}); diff --git a/code/kubernetes/python-cdk/ts/MSK_example/cdk.context.json b/code/kubernetes/python-cdk/ts/MSK_example/cdk.context.json new file mode 100644 index 0000000..414ef3b --- /dev/null +++ b/code/kubernetes/python-cdk/ts/MSK_example/cdk.context.json @@ -0,0 +1,7 @@ +{ + "availability-zones:account=:region=us-west-1": [ + "us-west-1a", + "us-west-1b", + "us-west-1c" + ] +} diff --git a/code/kubernetes/python-cdk/ts/MSK_example/cdk.json b/code/kubernetes/python-cdk/ts/MSK_example/cdk.json new file mode 100644 index 0000000..98e9e8f --- /dev/null +++ b/code/kubernetes/python-cdk/ts/MSK_example/cdk.json @@ -0,0 +1,17 @@ +{ + "app": "npx ts-node bin/example.ts", + "context": { + "env.type": "dev", + "vpc.cidr": "10.0.0.0/16", + "vpc.maxAzs": 3, + "msk.DevMskCluster": "MskCluster", + "msk.ClusterTag": "MSK cluster", + "msk.brokerNodeGroupBrokerAzDistribution": "DEFAULT", + "msk.enhancedMonitoring": "PER_BROKER", + "msk.brokerNodeGroupEBSVolumeSize": 100, + "msk.brokerNodeGroupInstanceType": "kafka.m5.large", + "msk.brokerPort": 9092, + "msk.kafkaVersion": "2.2.1", + "msk.numberOfBrokerNodes": 3 + } +} diff --git a/code/kubernetes/python-cdk/ts/MSK_example/lib/MskCluster.ts b/code/kubernetes/python-cdk/ts/MSK_example/lib/MskCluster.ts new file mode 100644 index 0000000..def9d39 --- /dev/null +++ b/code/kubernetes/python-cdk/ts/MSK_example/lib/MskCluster.ts @@ -0,0 +1,75 @@ +import cdk = require("@aws-cdk/core"); +import ec2 = require("@aws-cdk/aws-ec2"); +import msk = require("@aws-cdk/aws-msk"); + + +interface MSKStackProps extends cdk.StackProps { + vpc: ec2.IVpc; +} +export class MskClusterStack extends cdk.Stack { + private vpc: ec2.IVpc; + + constructor(scope: cdk.Construct, id: string, props?: MSKStackProps) { + super(scope, id, props); + const current_env = this.node.tryGetContext("env.type"); + + //****************************** Context variables **************************************// + const clusterName = this.node.tryGetContext("msk.DevMskCluster"); + const clusterTag = this.node.tryGetContext("msk.mskClusterTag"); + const brokerNodeGroupBrokerAzDistribution = this.node.tryGetContext("msk.brokerNodeGroupBrokerAzDistribution"); + const brokerNodeGroupEBSVolumeSize = this.node.tryGetContext("msk.brokerNodeGroupEBSVolumeSize"); + const brokerNodeGroupInstanceType = this.node.tryGetContext("msk.brokerNodeGroupInstanceType"); + const brokerPort = this.node.tryGetContext("msk.brokerPort"); + const kafkaVersion = this.node.tryGetContext("msk.kafkaVersion"); + const numberOfBrokerNodes = this.node.tryGetContext("msk.numberOfBrokerNodes"); + const enhancedMonitoring = this.node.tryGetContext("msk.enhancedMonitoring"); + + //**************************************** VPC + if (props) + this.vpc = props.vpc; + else + this.vpc = ec2.Vpc.fromLookup(this, current_env+"Vpc", { + vpcName: "VPCStack/"+current_env+"Vpc" + }); + + //**************************************** SG + const description = "Allow access to "+current_env+" MSK Cluster"; + const SecurityGroup = new ec2.SecurityGroup( + this, + current_env+"MskClusterSG", + { + vpc: this.vpc, + securityGroupName: current_env+"MskClusterSG", + description: description, + allowAllOutbound: true + } + ); + SecurityGroup.addIngressRule( + ec2.Peer.anyIpv4(), + ec2.Port.tcp(brokerPort), + description + ); + + //******************************* MSK Cluster **************************// + const cluster = new msk.CfnCluster(this, "MskCluster", { + brokerNodeGroupInfo: { + clientSubnets: this.vpc.privateSubnets.map(x => x.subnetId), + instanceType: brokerNodeGroupInstanceType, + brokerAzDistribution: brokerNodeGroupBrokerAzDistribution, + storageInfo: { + ebsStorageInfo: { + volumeSize: brokerNodeGroupEBSVolumeSize + } + } + }, + clusterName: clusterName, + kafkaVersion: kafkaVersion, + numberOfBrokerNodes: numberOfBrokerNodes, + enhancedMonitoring: enhancedMonitoring, + tags: { + name: current_env+clusterTag, + } + }); + } + } + diff --git a/code/kubernetes/python-cdk/ts/MSK_example/lib/Vpc.ts b/code/kubernetes/python-cdk/ts/MSK_example/lib/Vpc.ts new file mode 100644 index 0000000..ec7ad66 --- /dev/null +++ b/code/kubernetes/python-cdk/ts/MSK_example/lib/Vpc.ts @@ -0,0 +1,19 @@ +import cdk = require('@aws-cdk/core'); +import ec2 = require("@aws-cdk/aws-ec2"); + +export class VPCStack extends cdk.Stack { + readonly Vpc: ec2.IVpc; + + constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { + super(scope, id, props); + const current_env = this.node.tryGetContext("env.type"); + + const vpc_cidr = this.node.tryGetContext("vpc.cidr"); + const vpc_maxAzs = this.node.tryGetContext("vpc.maxAzs"); + const vpc = new ec2.Vpc(this, current_env+"Vpc", { + cidr: vpc_cidr, + maxAzs: vpc_maxAzs + }); + this.Vpc = vpc; + } +} diff --git a/code/kubernetes/python-cdk/ts/MSK_example/package-lock.json b/code/kubernetes/python-cdk/ts/MSK_example/package-lock.json new file mode 100644 index 0000000..33b7733 --- /dev/null +++ b/code/kubernetes/python-cdk/ts/MSK_example/package-lock.json @@ -0,0 +1,3331 @@ +{ + "name": "dev", + "version": "0.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@aws-cdk/assert": { + "version": "2.68.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/assert/-/assert-2.68.0.tgz", + "integrity": "sha512-bEztvoYdVp17I/ClYRGZa4wlEP/qNNq4Q+Z7EKwRL0cLDmvq4EI1m1N8LhUPAH7B6YXp5d1164gC6Nr0lV8bbA==", + "dev": true, + "requires": { + "@aws-cdk/cloudformation-diff": "2.68.0" + } + }, + "@aws-cdk/aws-cloudwatch": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/aws-cloudwatch/-/aws-cloudwatch-1.12.0.tgz", + "integrity": "sha512-GUlsa5/qqafbNXb2xbQs52nmYme/hjCydlOJAHXjhdvnq4pJ8f6/axtpq8Icfkg4UT5SG1d8jcl7WMT0e1Lmdg==", + "requires": { + "@aws-cdk/aws-iam": "^1.12.0", + "@aws-cdk/core": "^1.12.0" + } + }, + "@aws-cdk/aws-ec2": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/aws-ec2/-/aws-ec2-1.12.0.tgz", + "integrity": "sha512-kmQKlQ6AOdK2PVPcgK0fqRr4qpvxmW6jZbHjzylIEYRwi1FbOMTEh0zVpguuB0i+hl8AHgdWMF0v13g25Lg82g==", + "requires": { + "@aws-cdk/aws-cloudwatch": "^1.12.0", + "@aws-cdk/aws-iam": "^1.12.0", + "@aws-cdk/aws-ssm": "^1.12.0", + "@aws-cdk/core": "^1.12.0", + "@aws-cdk/cx-api": "^1.12.0" + } + }, + "@aws-cdk/aws-iam": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/aws-iam/-/aws-iam-1.12.0.tgz", + "integrity": "sha512-fXtEhMek08wbwpIeQcglmM8NwhqdxHsQCNJAK2HfmZPdvXmUom+UYZoaQaZHyKnYt1Ou6daZOsU6JtIGGfjLiQ==", + "requires": { + "@aws-cdk/core": "^1.12.0", + "@aws-cdk/region-info": "^1.12.0" + } + }, + "@aws-cdk/aws-msk": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/aws-msk/-/aws-msk-1.12.0.tgz", + "integrity": "sha512-P/udTrOTBA/BbdkkUK/ExgSsuUtg+GqY5ifqSzb+yejKiFPWEdwzgTFRgaMjhJ0KnlbERbjU1bYwHl4CGB5TDQ==", + "requires": { + "@aws-cdk/core": "^1.12.0" + } + }, + "@aws-cdk/aws-ssm": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/aws-ssm/-/aws-ssm-1.12.0.tgz", + "integrity": "sha512-RbSOZLiRvECjU1N+kbj0RPwretcEU5Xjtz4neuarSO4OyLM9Wcpbipm2rGS/+7A9rYVjJsIlrQ++3bhQAcjt6g==", + "requires": { + "@aws-cdk/aws-iam": "^1.12.0", + "@aws-cdk/core": "^1.12.0", + "@aws-cdk/cx-api": "^1.12.0" + } + }, + "@aws-cdk/cfnspec": { + "version": "2.68.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/cfnspec/-/cfnspec-2.68.0.tgz", + "integrity": "sha512-g062ljKOvMaeEgp2GR2ewoF3BzeGYpu+AA7UvN/SN+2S0detSwU+qHlxSFeTe0DLyCFaMttNEh81VmYCfiHtpg==", + "dev": true, + "requires": { + "fs-extra": "^9.1.0", + "md5": "^2.3.0" + } + }, + "@aws-cdk/cloud-assembly-schema": { + "version": "1.203.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-1.203.0.tgz", + "integrity": "sha512-r252InZ8Oh7q7ztriaA3n6F48QOFVfNcT/KO4XOlYyt1xDWRMENDYf+D+DVr6O5klcaa3ivvvDT7DRuW3xdVOQ==", + "requires": { + "jsonschema": "^1.4.1", + "semver": "^7.3.8" + }, + "dependencies": { + "jsonschema": { + "version": "1.4.1", + "bundled": true + }, + "lru-cache": { + "version": "6.0.0", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.3.8", + "bundled": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "bundled": true + } + } + }, + "@aws-cdk/cloudformation-diff": { + "version": "2.68.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/cloudformation-diff/-/cloudformation-diff-2.68.0.tgz", + "integrity": "sha512-JnX0sygxNHWU3aKdzSus25B1TuKYWDwnNL2tw3svZvfHcw3Nwz857JTOn/yNOJxT7cZbCbOqNPrOT6Xv+LrxTQ==", + "dev": true, + "requires": { + "@aws-cdk/cfnspec": "2.68.0", + "chalk": "^4", + "diff": "^5.1.0", + "fast-deep-equal": "^3.1.3", + "string-width": "^4.2.3", + "table": "^6.8.1" + }, + "dependencies": { + "diff": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "dev": true + } + } + }, + "@aws-cdk/core": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/core/-/core-1.12.0.tgz", + "integrity": "sha512-70eXa4Xv4F4NMISpGf+bkiUky8iQ04upByW9QJtqoxaFheg89pMVnMClqvAPs934C0ig97/gW2oQLIuY+0CrEg==", + "requires": { + "@aws-cdk/cx-api": "^1.12.0" + } + }, + "@aws-cdk/cx-api": { + "version": "1.203.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/cx-api/-/cx-api-1.203.0.tgz", + "integrity": "sha512-W2flnJFGytifPw2ojEsh9l8MAI4UANaUcMKr+qt4eJmFwrtVcS7nasdJQGSatQdxkAwd2pX4x10brAHYoAqjjQ==", + "requires": { + "@aws-cdk/cloud-assembly-schema": "1.203.0", + "semver": "^7.3.8" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.3.8", + "bundled": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "bundled": true + } + } + }, + "@aws-cdk/region-info": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/region-info/-/region-info-1.12.0.tgz", + "integrity": "sha512-eSNKN/rXpV9eVG5yuxxC1UpZULgljSKfRBjfoCmqgUBij5VXjGfsQ+g9whr65R3KIx4mSRYVYU0SimWZV+EF5g==" + }, + "@babel/code-frame": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", + "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "dev": true, + "requires": { + "@babel/highlight": "^7.22.5" + } + }, + "@babel/compat-data": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.6.tgz", + "integrity": "sha512-29tfsWTq2Ftu7MXmimyC0C5FDZv5DYxOZkh3XD3+QW4V/BYuv/LyEsjj3c0hqedEaDt6DBfDvexMKU8YevdqFg==", + "dev": true + }, + "@babel/core": { + "version": "7.22.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.8.tgz", + "integrity": "sha512-75+KxFB4CZqYRXjx4NlR4J7yGvKumBuZTmV4NV6v09dVXXkuYVYLT68N6HCzLvfJ+fWCxQsntNzKwwIXL4bHnw==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.7", + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helpers": "^7.22.6", + "@babel/parser": "^7.22.7", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.8", + "@babel/types": "^7.22.5", + "@nicolo-ribaudo/semver-v6": "^6.3.3", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.2" + }, + "dependencies": { + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.22.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.7.tgz", + "integrity": "sha512-p+jPjMG+SI8yvIaxGgeW24u7q9+5+TGpZh8/CuB7RhBKd7RCy8FayNEFNNKrNK/eUcY/4ExQqLmyrvBXKsIcwQ==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.6.tgz", + "integrity": "sha512-534sYEqWD9VfUm3IPn2SLcH4Q3P86XL+QvqdC7ZsFrzyyPF3T4XGiVghF6PTYNdWg6pXuoqXxNQAhbYeEInTzA==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.22.6", + "@babel/helper-validator-option": "^7.22.5", + "@nicolo-ribaudo/semver-v6": "^6.3.3", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1" + }, + "dependencies": { + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } + }, + "@babel/helper-environment-visitor": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", + "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "dev": true + }, + "@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-module-imports": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", + "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-module-transforms": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz", + "integrity": "sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "dev": true + }, + "@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true + }, + "@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", + "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", + "dev": true + }, + "@babel/helpers": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.6.tgz", + "integrity": "sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==", + "dev": true, + "requires": { + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.6", + "@babel/types": "^7.22.5" + } + }, + "@babel/highlight": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", + "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.22.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz", + "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==", + "dev": true + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-jsx": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", + "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", + "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/template": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", + "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5" + } + }, + "@babel/traverse": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, + "requires": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + } + }, + "@babel/generator": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", + "dev": true, + "requires": { + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true + }, + "@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "dev": true, + "requires": { + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true + }, + "@babel/highlight": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "dev": true + }, + "@babel/template": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + } + }, + "@babel/types": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + } + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/types": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", + "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "to-fast-properties": "^2.0.0" + } + }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + } + }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jest/console": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.6.1.tgz", + "integrity": "sha512-Aj772AYgwTSr5w8qnyoJ0eDYvN6bMsH3ORH1ivMotrInHLKdUz6BDlaEXHdM6kODaBIkNIyQGzsMvRdOv7VG7Q==", + "dev": true, + "requires": { + "@jest/types": "^29.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.6.1", + "jest-util": "^29.6.1", + "slash": "^3.0.0" + } + }, + "@jest/core": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.6.1.tgz", + "integrity": "sha512-CcowHypRSm5oYQ1obz1wfvkjZZ2qoQlrKKvlfPwh5jUXVU12TWr2qMeH8chLMuTFzHh5a1g2yaqlqDICbr+ukQ==", + "dev": true, + "requires": { + "@jest/console": "^29.6.1", + "@jest/reporters": "^29.6.1", + "@jest/test-result": "^29.6.1", + "@jest/transform": "^29.6.1", + "@jest/types": "^29.6.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.5.0", + "jest-config": "^29.6.1", + "jest-haste-map": "^29.6.1", + "jest-message-util": "^29.6.1", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.6.1", + "jest-resolve-dependencies": "^29.6.1", + "jest-runner": "^29.6.1", + "jest-runtime": "^29.6.1", + "jest-snapshot": "^29.6.1", + "jest-util": "^29.6.1", + "jest-validate": "^29.6.1", + "jest-watcher": "^29.6.1", + "micromatch": "^4.0.4", + "pretty-format": "^29.6.1", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "@jest/environment": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.6.1.tgz", + "integrity": "sha512-RMMXx4ws+Gbvw3DfLSuo2cfQlK7IwGbpuEWXCqyYDcqYTI+9Ju3a5hDnXaxjNsa6uKh9PQF2v+qg+RLe63tz5A==", + "dev": true, + "requires": { + "@jest/fake-timers": "^29.6.1", + "@jest/types": "^29.6.1", + "@types/node": "*", + "jest-mock": "^29.6.1" + } + }, + "@jest/expect": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.6.1.tgz", + "integrity": "sha512-N5xlPrAYaRNyFgVf2s9Uyyvr795jnB6rObuPx4QFvNJz8aAjpZUDfO4bh5G/xuplMID8PrnuF1+SfSyDxhsgYg==", + "dev": true, + "requires": { + "expect": "^29.6.1", + "jest-snapshot": "^29.6.1" + } + }, + "@jest/expect-utils": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.6.1.tgz", + "integrity": "sha512-o319vIf5pEMx0LmzSxxkYYxo4wrRLKHq9dP1yJU7FoPTB0LfAKSz8SWD6D/6U3v/O52t9cF5t+MeJiRsfk7zMw==", + "dev": true, + "requires": { + "jest-get-type": "^29.4.3" + } + }, + "@jest/fake-timers": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.6.1.tgz", + "integrity": "sha512-RdgHgbXyosCDMVYmj7lLpUwXA4c69vcNzhrt69dJJdf8azUrpRh3ckFCaTPNjsEeRi27Cig0oKDGxy5j7hOgHg==", + "dev": true, + "requires": { + "@jest/types": "^29.6.1", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.6.1", + "jest-mock": "^29.6.1", + "jest-util": "^29.6.1" + } + }, + "@jest/globals": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.6.1.tgz", + "integrity": "sha512-2VjpaGy78JY9n9370H8zGRCFbYVWwjY6RdDMhoJHa1sYfwe6XM/azGN0SjY8kk7BOZApIejQ1BFPyH7FPG0w3A==", + "dev": true, + "requires": { + "@jest/environment": "^29.6.1", + "@jest/expect": "^29.6.1", + "@jest/types": "^29.6.1", + "jest-mock": "^29.6.1" + } + }, + "@jest/reporters": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.6.1.tgz", + "integrity": "sha512-9zuaI9QKr9JnoZtFQlw4GREQbxgmNYXU6QuWtmuODvk5nvPUeBYapVR/VYMyi2WSx3jXTLJTJji8rN6+Cm4+FA==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.6.1", + "@jest/test-result": "^29.6.1", + "@jest/transform": "^29.6.1", + "@jest/types": "^29.6.1", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.6.1", + "jest-util": "^29.6.1", + "jest-worker": "^29.6.1", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + } + }, + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/source-map": { + "version": "29.6.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.0.tgz", + "integrity": "sha512-oA+I2SHHQGxDCZpbrsCQSoMLb3Bz547JnM+jUr9qEbuw0vQlWZfpPS7CO9J7XiwKicEz9OFn/IYoLkkiUD7bzA==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + } + }, + "@jest/test-result": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.6.1.tgz", + "integrity": "sha512-Ynr13ZRcpX6INak0TPUukU8GWRfm/vAytE3JbJNGAvINySWYdfE7dGZMbk36oVuK4CigpbhMn8eg1dixZ7ZJOw==", + "dev": true, + "requires": { + "@jest/console": "^29.6.1", + "@jest/types": "^29.6.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.6.1.tgz", + "integrity": "sha512-oBkC36PCDf/wb6dWeQIhaviU0l5u6VCsXa119yqdUosYAt7/FbQU2M2UoziO3igj/HBDEgp57ONQ3fm0v9uyyg==", + "dev": true, + "requires": { + "@jest/test-result": "^29.6.1", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.6.1", + "slash": "^3.0.0" + } + }, + "@jest/transform": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.6.1.tgz", + "integrity": "sha512-URnTneIU3ZjRSaf906cvf6Hpox3hIeJXRnz3VDSw5/X93gR8ycdfSIEy19FlVx8NFmpN7fe3Gb1xF+NjXaQLWg==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.1", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.6.1", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.6.1", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "dependencies": { + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + } + } + }, + "@jest/types": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.1.tgz", + "integrity": "sha512-tPKQNMPuXgvdOn2/Lg9HNfUvjYVGolt04Hp03f5hAk878uwOLikN+JzeLY0HcVgKgFl9Hs3EIqpu3WX27XNhnw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "dependencies": { + "@jest/schemas": { + "version": "29.6.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.0.tgz", + "integrity": "sha512-rxLjXyJBTL4LQeJW3aKo0M/+GkCOXsO+8i9Iu7eDb6KwtP65ayoDsitrdPBtujxQ88k4wI2FNYfa6TOGwSn6cQ==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.27.8" + } + }, + "@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + } + } + }, + "@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + }, + "dependencies": { + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + } + } + }, + "@nicolo-ribaudo/semver-v6": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/semver-v6/-/semver-v6-6.3.3.tgz", + "integrity": "sha512-3Yc1fUTs69MG/uZbJlLSI3JISMn2UV2rg+1D/vROUqZyh3l6iYHCs7GMp+M40ZD7yOdDbYjJcU1oTJhrc+dGKg==", + "dev": true + }, + "@sinclair/typebox": { + "version": "0.24.47", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.47.tgz", + "integrity": "sha512-J4Xw0xYK4h7eC34MNOPQi6IkNxGRck6n4VJpWDzXIFVTW8I/D43Gf+NfWz/v/7NHlzWOPd3+T4PJ4OqklQ2u7A==", + "dev": true + }, + "@sinonjs/commons": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^3.0.0" + } + }, + "@types/babel__core": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", + "integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==", + "dev": true, + "requires": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "@types/babel__generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@types/babel__template": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@types/babel__traverse": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz", + "integrity": "sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==", + "dev": true, + "requires": { + "@babel/types": "^7.20.7" + } + }, + "@types/graceful-fs": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/istanbul-lib-coverage": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", + "integrity": "sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg==", + "dev": true + }, + "@types/istanbul-lib-report": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz", + "integrity": "sha512-3BUTyMzbZa2DtDI2BkERNC6jJw2Mr2Y0oGI7mRxYNBPxppbtEK1F66u3bKwU2g+wxwWI7PAoRpJnOY1grJqzHg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "*" + } + }, + "@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "requires": { + "@types/istanbul-lib-report": "*" + } + }, + "@types/jest": { + "version": "24.0.18", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-24.0.18.tgz", + "integrity": "sha512-jcDDXdjTcrQzdN06+TSVsPPqxvsZA/5QkYfIZlq1JMw7FdP5AZylbOc+6B/cuDurctRe+MziUMtQ3xQdrbjqyQ==", + "dev": true, + "requires": { + "@types/jest-diff": "*" + } + }, + "@types/jest-diff": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@types/jest-diff/-/jest-diff-20.0.1.tgz", + "integrity": "sha512-yALhelO3i0hqZwhjtcr6dYyaLoCHbAMshwtj6cGxTvHZAKXHsYGdff6E8EPw3xLKY0ELUTQ69Q1rQiJENnccMA==", + "dev": true + }, + "@types/node": { + "version": "18.11.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.2.tgz", + "integrity": "sha512-BWN3M23gLO2jVG8g/XHIRFWiiV4/GckeFIqbU/C4V3xpoBBWSMk4OZomouN0wCkfQFPqgZikyLr7DOYDysIkkw==", + "dev": true + }, + "@types/prettier": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", + "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", + "dev": true + }, + "@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true + }, + "@types/yargs": { + "version": "17.0.24", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", + "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-13.1.0.tgz", + "integrity": "sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg==", + "dev": true + }, + "ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "requires": { + "type-fest": "^0.21.3" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "arg": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz", + "integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true + }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, + "aws-cdk": { + "version": "1.176.0", + "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-1.176.0.tgz", + "integrity": "sha512-WZtKZABRpgh20ysVdBxyNNGCc3Ul6W2Kj495U4z34oG+0Oihu8hvXTh6D97I/oPt1rUS/oRmZqL0uHL+lzOxMg==", + "dev": true, + "requires": { + "fsevents": "2.3.2" + }, + "dependencies": { + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + } + } + }, + "babel-jest": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.6.1.tgz", + "integrity": "sha512-qu+3bdPEQC6KZSPz+4Fyjbga5OODNcp49j6GKzG1EKbkfyJBxEYGVUmVGpwCSeGouG52R4EgYMLb6p9YeEEQ4A==", + "dev": true, + "requires": { + "@jest/transform": "^29.6.1", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.5.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + } + }, + "babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + } + }, + "babel-plugin-jest-hoist": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz", + "integrity": "sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==", + "dev": true, + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + } + }, + "babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "requires": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + } + }, + "babel-preset-jest": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz", + "integrity": "sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^29.5.0", + "babel-preset-current-node-syntax": "^1.0.0" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browserslist": { + "version": "4.21.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", + "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" + } + }, + "bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "requires": { + "fast-json-stable-stringify": "2.x" + } + }, + "bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "requires": { + "node-int64": "^0.4.0" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001515", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001515.tgz", + "integrity": "sha512-eEFDwUOZbE24sb+Ecsx3+OvNETqjWIdabMy52oOkIgcUtAsQifjUG9q4U9dgTHJM2mfk4uEPxc0+xuFdJ629QA==", + "dev": true + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true + }, + "charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", + "dev": true + }, + "ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true + }, + "cjs-module-lexer": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", + "dev": true + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true + }, + "collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", + "dev": true + }, + "deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true + }, + "detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true + }, + "diff": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", + "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", + "dev": true + }, + "diff-sequences": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", + "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.4.455", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.455.tgz", + "integrity": "sha512-8tgdX0Odl24LtmLwxotpJCVjIndN559AvaOtd67u+2mo+IDsgsTF580NB+uuDCqsHw8yFg53l5+imFV9Fw3cbA==", + "dev": true + }, + "emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true + }, + "expect": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.6.1.tgz", + "integrity": "sha512-XEdDLonERCU1n9uR56/Stx9OqojaLAQtZf9PrCHH9Hl8YXiEIka3H4NXJ3NOIBmQJTg7+j7buh34PMHfJujc8g==", + "dev": true, + "requires": { + "@jest/expect-utils": "^29.6.1", + "@types/node": "*", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.6.1", + "jest-message-util": "^29.6.1", + "jest-util": "^29.6.1" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "requires": { + "bser": "2.1.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-core-module": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + } + }, + "istanbul-reports": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jest": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.6.1.tgz", + "integrity": "sha512-Nirw5B4nn69rVUZtemCQhwxOBhm0nsp3hmtF4rzCeWD7BkjAXRIji7xWQfnTNbz9g0aVsBX6aZK3n+23LM6uDw==", + "dev": true, + "requires": { + "@jest/core": "^29.6.1", + "@jest/types": "^29.6.1", + "import-local": "^3.0.2", + "jest-cli": "^29.6.1" + }, + "dependencies": { + "jest-cli": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.6.1.tgz", + "integrity": "sha512-607dSgTA4ODIN6go9w6xY3EYkyPFGicx51a69H7yfvt7lN53xNswEVLovq+E77VsTRi5fWprLH0yl4DJgE8Ing==", + "dev": true, + "requires": { + "@jest/core": "^29.6.1", + "@jest/test-result": "^29.6.1", + "@jest/types": "^29.6.1", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^29.6.1", + "jest-util": "^29.6.1", + "jest-validate": "^29.6.1", + "prompts": "^2.0.1", + "yargs": "^17.3.1" + } + } + } + }, + "jest-changed-files": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.5.0.tgz", + "integrity": "sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==", + "dev": true, + "requires": { + "execa": "^5.0.0", + "p-limit": "^3.1.0" + }, + "dependencies": { + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + } + } + }, + "jest-circus": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.6.1.tgz", + "integrity": "sha512-tPbYLEiBU4MYAL2XoZme/bgfUeotpDBd81lgHLCbDZZFaGmECk0b+/xejPFtmiBP87GgP/y4jplcRpbH+fgCzQ==", + "dev": true, + "requires": { + "@jest/environment": "^29.6.1", + "@jest/expect": "^29.6.1", + "@jest/test-result": "^29.6.1", + "@jest/types": "^29.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.6.1", + "jest-matcher-utils": "^29.6.1", + "jest-message-util": "^29.6.1", + "jest-runtime": "^29.6.1", + "jest-snapshot": "^29.6.1", + "jest-util": "^29.6.1", + "p-limit": "^3.1.0", + "pretty-format": "^29.6.1", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "dependencies": { + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + } + } + }, + "jest-config": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.6.1.tgz", + "integrity": "sha512-XdjYV2fy2xYixUiV2Wc54t3Z4oxYPAELUzWnV6+mcbq0rh742X2p52pii5A3oeRzYjLnQxCsZmp0qpI6klE2cQ==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.6.1", + "@jest/types": "^29.6.1", + "babel-jest": "^29.6.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.6.1", + "jest-environment-node": "^29.6.1", + "jest-get-type": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.6.1", + "jest-runner": "^29.6.1", + "jest-util": "^29.6.1", + "jest-validate": "^29.6.1", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.6.1", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + } + }, + "jest-diff": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.6.1.tgz", + "integrity": "sha512-FsNCvinvl8oVxpNLttNQX7FAq7vR+gMDGj90tiP7siWw1UdakWUGqrylpsYrpvj908IYckm5Y0Q7azNAozU1Kg==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^29.4.3", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.6.1" + } + }, + "jest-docblock": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz", + "integrity": "sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==", + "dev": true, + "requires": { + "detect-newline": "^3.0.0" + } + }, + "jest-each": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.6.1.tgz", + "integrity": "sha512-n5eoj5eiTHpKQCAVcNTT7DRqeUmJ01hsAL0Q1SMiBHcBcvTKDELixQOGMCpqhbIuTcfC4kMfSnpmDqRgRJcLNQ==", + "dev": true, + "requires": { + "@jest/types": "^29.6.1", + "chalk": "^4.0.0", + "jest-get-type": "^29.4.3", + "jest-util": "^29.6.1", + "pretty-format": "^29.6.1" + } + }, + "jest-environment-node": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.6.1.tgz", + "integrity": "sha512-ZNIfAiE+foBog24W+2caIldl4Irh8Lx1PUhg/GZ0odM1d/h2qORAsejiFc7zb+SEmYPn1yDZzEDSU5PmDkmVLQ==", + "dev": true, + "requires": { + "@jest/environment": "^29.6.1", + "@jest/fake-timers": "^29.6.1", + "@jest/types": "^29.6.1", + "@types/node": "*", + "jest-mock": "^29.6.1", + "jest-util": "^29.6.1" + } + }, + "jest-get-type": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", + "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", + "dev": true + }, + "jest-haste-map": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.6.1.tgz", + "integrity": "sha512-0m7f9PZXxOCk1gRACiVgX85knUKPKLPg4oRCjLoqIm9brTHXaorMA0JpmtmVkQiT8nmXyIVoZd/nnH1cfC33ig==", + "dev": true, + "requires": { + "@jest/types": "^29.6.1", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.6.1", + "jest-worker": "^29.6.1", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + } + }, + "jest-leak-detector": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.6.1.tgz", + "integrity": "sha512-OrxMNyZirpOEwkF3UHnIkAiZbtkBWiye+hhBweCHkVbCgyEy71Mwbb5zgeTNYWJBi1qgDVfPC1IwO9dVEeTLwQ==", + "dev": true, + "requires": { + "jest-get-type": "^29.4.3", + "pretty-format": "^29.6.1" + } + }, + "jest-matcher-utils": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.6.1.tgz", + "integrity": "sha512-SLaztw9d2mfQQKHmJXKM0HCbl2PPVld/t9Xa6P9sgiExijviSp7TnZZpw2Fpt+OI3nwUO/slJbOfzfUMKKC5QA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^29.6.1", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.6.1" + } + }, + "jest-message-util": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.6.1.tgz", + "integrity": "sha512-KoAW2zAmNSd3Gk88uJ56qXUWbFk787QKmjjJVOjtGFmmGSZgDBrlIL4AfQw1xyMYPNVD7dNInfIbur9B2rd/wQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.6.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-mock": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.6.1.tgz", + "integrity": "sha512-brovyV9HBkjXAEdRooaTQK42n8usKoSRR3gihzUpYeV/vwqgSoNfrksO7UfSACnPmxasO/8TmHM3w9Hp3G1dgw==", + "dev": true, + "requires": { + "@jest/types": "^29.6.1", + "@types/node": "*", + "jest-util": "^29.6.1" + } + }, + "jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true + }, + "jest-regex-util": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.4.3.tgz", + "integrity": "sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==", + "dev": true + }, + "jest-resolve": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.6.1.tgz", + "integrity": "sha512-AeRkyS8g37UyJiP9w3mmI/VXU/q8l/IH52vj/cDAyScDcemRbSBhfX/NMYIGilQgSVwsjxrCHf3XJu4f+lxCMg==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.6.1", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.6.1", + "jest-validate": "^29.6.1", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + } + }, + "jest-resolve-dependencies": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.6.1.tgz", + "integrity": "sha512-BbFvxLXtcldaFOhNMXmHRWx1nXQO5LoXiKSGQcA1LxxirYceZT6ch8KTE1bK3X31TNG/JbkI7OkS/ABexVahiw==", + "dev": true, + "requires": { + "jest-regex-util": "^29.4.3", + "jest-snapshot": "^29.6.1" + } + }, + "jest-runner": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.6.1.tgz", + "integrity": "sha512-tw0wb2Q9yhjAQ2w8rHRDxteryyIck7gIzQE4Reu3JuOBpGp96xWgF0nY8MDdejzrLCZKDcp8JlZrBN/EtkQvPQ==", + "dev": true, + "requires": { + "@jest/console": "^29.6.1", + "@jest/environment": "^29.6.1", + "@jest/test-result": "^29.6.1", + "@jest/transform": "^29.6.1", + "@jest/types": "^29.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.4.3", + "jest-environment-node": "^29.6.1", + "jest-haste-map": "^29.6.1", + "jest-leak-detector": "^29.6.1", + "jest-message-util": "^29.6.1", + "jest-resolve": "^29.6.1", + "jest-runtime": "^29.6.1", + "jest-util": "^29.6.1", + "jest-watcher": "^29.6.1", + "jest-worker": "^29.6.1", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "dependencies": { + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + } + } + }, + "jest-runtime": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.6.1.tgz", + "integrity": "sha512-D6/AYOA+Lhs5e5il8+5pSLemjtJezUr+8zx+Sn8xlmOux3XOqx4d8l/2udBea8CRPqqrzhsKUsN/gBDE/IcaPQ==", + "dev": true, + "requires": { + "@jest/environment": "^29.6.1", + "@jest/fake-timers": "^29.6.1", + "@jest/globals": "^29.6.1", + "@jest/source-map": "^29.6.0", + "@jest/test-result": "^29.6.1", + "@jest/transform": "^29.6.1", + "@jest/types": "^29.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.6.1", + "jest-message-util": "^29.6.1", + "jest-mock": "^29.6.1", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.6.1", + "jest-snapshot": "^29.6.1", + "jest-util": "^29.6.1", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + } + }, + "jest-snapshot": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.6.1.tgz", + "integrity": "sha512-G4UQE1QQ6OaCgfY+A0uR1W2AY0tGXUPQpoUClhWHq1Xdnx1H6JOrC2nH5lqnOEqaDgbHFgIwZ7bNq24HpB180A==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.6.1", + "@jest/transform": "^29.6.1", + "@jest/types": "^29.6.1", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.6.1", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.6.1", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.6.1", + "jest-message-util": "^29.6.1", + "jest-util": "^29.6.1", + "natural-compare": "^1.4.0", + "pretty-format": "^29.6.1", + "semver": "^7.5.3" + }, + "dependencies": { + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "jest-util": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.6.1.tgz", + "integrity": "sha512-NRFCcjc+/uO3ijUVyNOQJluf8PtGCe/W6cix36+M3cTFgiYqFOOW5MgN4JOOcvbUhcKTYVd1CvHz/LWi8d16Mg==", + "dev": true, + "requires": { + "@jest/types": "^29.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "jest-validate": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.6.1.tgz", + "integrity": "sha512-r3Ds69/0KCN4vx4sYAbGL1EVpZ7MSS0vLmd3gV78O+NAx3PDQQukRU5hNHPXlyqCgFY8XUk7EuTMLugh0KzahA==", + "dev": true, + "requires": { + "@jest/types": "^29.6.1", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.4.3", + "leven": "^3.1.0", + "pretty-format": "^29.6.1" + }, + "dependencies": { + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + } + } + }, + "jest-watcher": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.6.1.tgz", + "integrity": "sha512-d4wpjWTS7HEZPaaj8m36QiaP856JthRZkrgcIY/7ISoUWPIillrXM23WPboZVLbiwZBt4/qn2Jke84Sla6JhFA==", + "dev": true, + "requires": { + "@jest/test-result": "^29.6.1", + "@jest/types": "^29.6.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.6.1", + "string-length": "^4.0.1" + } + }, + "jest-worker": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.6.1.tgz", + "integrity": "sha512-U+Wrbca7S8ZAxAe9L6nb6g8kPdia5hj32Puu5iOqBCMTMWFHXuK6dOV2IFrpedbTV8fjMFLdWNttQTBL6u2MRA==", + "dev": true, + "requires": { + "@types/node": "*", + "jest-util": "^29.6.1", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "dependencies": { + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true + }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "make-error": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "dev": true + }, + "makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "requires": { + "tmpl": "1.0.5" + } + }, + "md5": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", + "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", + "dev": true, + "requires": { + "charenc": "0.0.2", + "crypt": "0.0.2", + "is-buffer": "~1.1.6" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node-releases": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "pretty-format": { + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.6.1.tgz", + "integrity": "sha512-7jRj+yXO0W7e4/tSJKoR7HRIHLPPjtNaUGG2xxKQnGvPNRkgWcQ0AZX6P4KBRJN4FcTBWb3sa7DVUJmocYuoog==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "@jest/schemas": { + "version": "29.6.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.0.tgz", + "integrity": "sha512-rxLjXyJBTL4LQeJW3aKo0M/+GkCOXsO+8i9Iu7eDb6KwtP65ayoDsitrdPBtujxQ88k4wI2FNYfa6TOGwSn6cQ==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.27.8" + } + }, + "@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "requires": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + } + }, + "punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true + }, + "pure-rand": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz", + "integrity": "sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ==", + "dev": true + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, + "resolve": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "dev": true, + "requires": { + "is-core-module": "^2.11.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true + }, + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "requires": { + "escape-string-regexp": "^2.0.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + } + } + }, + "string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "requires": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "table": { + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", + "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", + "dev": true, + "requires": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + } + }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, + "tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "ts-jest": { + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.0.3.tgz", + "integrity": "sha512-Ibygvmuyq1qp/z3yTh9QTwVVAbFdDy/+4BtIQR2sp6baF2SJU/8CKK/hhnGIDY2L90Az2jIqTwZPnN2p+BweiQ==", + "dev": true, + "requires": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^29.0.0", + "json5": "^2.2.1", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "7.x", + "yargs-parser": "^21.0.1" + }, + "dependencies": { + "@jest/types": { + "version": "29.2.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.2.1.tgz", + "integrity": "sha512-O/QNDQODLnINEPAI0cl9U6zUIDXEWXt6IC1o2N2QENuos7hlGUIthlKyV4p6ki3TvXFX071blj8HUhgLGquPjw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "requires": { + "@types/istanbul-lib-report": "*" + } + }, + "@types/yargs": { + "version": "17.0.13", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", + "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "ci-info": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", + "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jest-util": { + "version": "29.2.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.2.1.tgz", + "integrity": "sha512-P5VWDj25r7kj7kl4pN2rG/RN2c1TLfYYYZYULnS/35nFDjBai+hBeo3MDrYZS7p6IoY3YHZnt2vq4L6mKnLk0g==", + "dev": true, + "requires": { + "@jest/types": "^29.2.1", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + } + } + }, + "ts-node": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.4.1.tgz", + "integrity": "sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.6", + "yn": "^3.0.0" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + }, + "typescript": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz", + "integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg==", + "dev": true + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + }, + "update-browserslist-db": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "v8-to-istanbul": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", + "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + }, + "dependencies": { + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + } + } + }, + "walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "requires": { + "makeerror": "1.0.12" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + } + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + } + } +} diff --git a/code/kubernetes/python-cdk/ts/MSK_example/package.json b/code/kubernetes/python-cdk/ts/MSK_example/package.json new file mode 100644 index 0000000..8d5d51e --- /dev/null +++ b/code/kubernetes/python-cdk/ts/MSK_example/package.json @@ -0,0 +1,28 @@ +{ + "name": "dev", + "version": "0.1.0", + "bin": { + "dev": "bin/dev.js" + }, + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "test": "jest", + "cdk": "cdk" + }, + "devDependencies": { + "@aws-cdk/assert": "^2.68.0", + "@types/jest": "^24.0.18", + "aws-cdk": "^1.176.0", + "jest": "^29.6.1", + "ts-jest": "^29.0.3", + "ts-node": "^8.4.1", + "typescript": "~3.6.4" + }, + "dependencies": { + "@aws-cdk/aws-ec2": "^1.12.0", + "@aws-cdk/aws-msk": "^1.12.0", + "@aws-cdk/core": "^1.12.0", + "source-map-support": "^0.5.13" + } +} diff --git a/code/kubernetes/python-cdk/ts/MSK_example/tsconfig.json b/code/kubernetes/python-cdk/ts/MSK_example/tsconfig.json new file mode 100644 index 0000000..3f61627 --- /dev/null +++ b/code/kubernetes/python-cdk/ts/MSK_example/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target":"ES2018", + "module": "commonjs", + "lib": ["es2016", "es2017.object", "es2017.string"], + "declaration": true, + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": false, + "inlineSourceMap": true, + "inlineSources": true, + "experimentalDecorators": true, + "strictPropertyInitialization":false, + "typeRoots": ["./node_modules/@types"] + }, + "exclude": ["cdk.out"] +} diff --git a/code/kubernetes/python-cdk/ts/README.md b/code/kubernetes/python-cdk/ts/README.md new file mode 100644 index 0000000..ddb5530 --- /dev/null +++ b/code/kubernetes/python-cdk/ts/README.md @@ -0,0 +1,3 @@ +# CDK TypeScript Examples + +* MSK + VPC \ No newline at end of file diff --git a/code/kubernetes/references_for_kubectl.md b/code/kubernetes/references_for_kubectl.md new file mode 100644 index 0000000..afe047d --- /dev/null +++ b/code/kubernetes/references_for_kubectl.md @@ -0,0 +1,62 @@ +## Kubectl Commands + + +### **Pods** + +Get pods: + +``` + kubectl get pods -n +``` + +Debug pods: + +``` + kubectl describe pod +``` + +Get pod's log: + +``` + kubectl logs +``` + +### **Services** + +Get services: + +``` + kubectl get services -n +``` + +### **Deployments** + +Get deployments: + +``` + kubectl get deployment -n +``` + +### **Secrets** + +``` + kubectl get secret +``` + +### **Namespaces** + +``` + kubectl get namespaces +``` + +### **Configmaps** + +``` + kubectl get configmaps -n +``` + +### **Ingress** + +``` + kubectl get ingress -n +``` diff --git a/code/protocol_demos/grpc-demo/.gitignore b/code/protocol_demos/grpc-demo/.gitignore new file mode 100644 index 0000000..30bc162 --- /dev/null +++ b/code/protocol_demos/grpc-demo/.gitignore @@ -0,0 +1 @@ +/node_modules \ No newline at end of file diff --git a/code/protocol_demos/grpc-demo/client.js b/code/protocol_demos/grpc-demo/client.js new file mode 100644 index 0000000..607c709 --- /dev/null +++ b/code/protocol_demos/grpc-demo/client.js @@ -0,0 +1,35 @@ +const grpc = require("grpc"); +const protoLoader = require("@grpc/proto-loader") +const packageDef = protoLoader.loadSync("todo.proto", {}); +const grpcObject = grpc.loadPackageDefinition(packageDef); +const todoPackage = grpcObject.todoPackage; + +const text = process.argv[2]; + +const client = new todoPackage.Todo("localhost:40000", +grpc.credentials.createInsecure()) +console.log(text) + +client.createTodo({ + "id": -1, + "text": text +}, (err, response) => { + + console.log("Recieved from server " + JSON.stringify(response)) + +}) +/* +client.readTodos(null, (err, response) => { + + console.log("read the todos from server " + JSON.stringify(response)) + if (!response.items) + response.items.forEach(a=>console.log(a.text)); +}) +*/ + +const call = client.readTodosStream(); +call.on("data", item => { + console.log("received item from server " + JSON.stringify(item)) +}) + +call.on("end", e => console.log("server done!")) \ No newline at end of file diff --git a/code/protocol_demos/grpc-demo/package.json b/code/protocol_demos/grpc-demo/package.json new file mode 100644 index 0000000..49d80cb --- /dev/null +++ b/code/protocol_demos/grpc-demo/package.json @@ -0,0 +1,16 @@ +{ + "name": "grpc-demo", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "@grpc/proto-loader": "^0.5.3", + "grpc": "^1.24.9" + } +} diff --git a/code/protocol_demos/grpc-demo/server.js b/code/protocol_demos/grpc-demo/server.js new file mode 100644 index 0000000..d6773a4 --- /dev/null +++ b/code/protocol_demos/grpc-demo/server.js @@ -0,0 +1,38 @@ +const grpc = require("grpc"); +const protoLoader = require("@grpc/proto-loader") +const packageDef = protoLoader.loadSync("todo.proto", {}); +const grpcObject = grpc.loadPackageDefinition(packageDef); +const todoPackage = grpcObject.todoPackage; + +const server = new grpc.Server(); +server.bind("0.0.0.0:40000", + grpc.ServerCredentials.createInsecure()); + +server.addService(todoPackage.Todo.service, + { + "createTodo": createTodo, + "readTodos" : readTodos, + "readTodosStream": readTodosStream + }); +server.start(); + +const todos = [] +function createTodo (call, callback) { + const todoItem = { + "id": todos.length + 1, + "text": call.request.text + } + todos.push(todoItem) + callback(null, todoItem); +} + +function readTodosStream(call, callback) { + + todos.forEach(t => call.write(t)); + call.end(); +} + + +function readTodos(call, callback) { + callback(null, {"items": todos}) +} diff --git a/code/protocol_demos/grpc-demo/todo.proto b/code/protocol_demos/grpc-demo/todo.proto new file mode 100644 index 0000000..e8299f2 --- /dev/null +++ b/code/protocol_demos/grpc-demo/todo.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package todoPackage; + +service Todo { + rpc createTodo(TodoItem) returns (TodoItem); + rpc readTodos(voidNoParam) returns (TodoItems); + rpc readTodosStream(voidNoParam) returns (stream TodoItem); + +} + +message voidNoParam {} + +message TodoItem { + int32 id = 1; + string text = 2; +} + +message TodoItems { + repeated TodoItem items = 1; +} \ No newline at end of file diff --git a/code/protocol_demos/long-polling/index.js b/code/protocol_demos/long-polling/index.js new file mode 100644 index 0000000..47c812b --- /dev/null +++ b/code/protocol_demos/long-polling/index.js @@ -0,0 +1,36 @@ +const app = require("express")(); +const jobs = {} + +app.post("/submit", (req, res) => { + const jobId = `job:${Date.now()}` + jobs[jobId] = 0; + updateJob(jobId,0); + res.end("\n\n" + jobId + "\n\n"); +}) + +app.get("/checkstatus", async (req, res) => { + console.log(jobs[req.query.jobId]) + //long polling, don't respond until done + while(await checkJobComplete(req.query.jobId) == false); + res.end("\n\nJobStatus: Complete " + jobs[req.query.jobId] + "%\n\n") + +} ) + +app.listen(8080, () => console.log("listening on 8080")); + +async function checkJobComplete(jobId) { + return new Promise( (resolve, reject) => { + if (jobs[jobId] < 100) + this.setTimeout(()=> resolve(false), 1000); + else + resolve(true); + }) + +} + +function updateJob(jobId, prg) { + jobs[jobId] = prg; + console.log(`updated ${jobId} to ${prg}`) + if (prg == 100) return; + this.setTimeout(()=> updateJob(jobId, prg + 10), 10000) +} \ No newline at end of file diff --git a/code/protocol_demos/long-polling/package.json b/code/protocol_demos/long-polling/package.json new file mode 100644 index 0000000..1f6087c --- /dev/null +++ b/code/protocol_demos/long-polling/package.json @@ -0,0 +1,15 @@ +{ + "name": "short-polling", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "express": "^4.18.2" + } +} diff --git a/code/protocol_demos/rabbitmq/consumer.js b/code/protocol_demos/rabbitmq/consumer.js new file mode 100644 index 0000000..eecec01 --- /dev/null +++ b/code/protocol_demos/rabbitmq/consumer.js @@ -0,0 +1,29 @@ +const amqp = require("amqplib"); + +connect(); +async function connect() { + + try { + const amqpServer = "amqp://localhost:5672" + const connection = await amqp.connect(amqpServer) + const channel = await connection.createChannel(); + await channel.assertQueue("jobs"); + + channel.consume("jobs", message => { + const input = JSON.parse(message.content.toString()); + console.log(`Recieved job with input ${input.number}`) + //"7" == 7 true + //"7" === 7 false + + if (input.number == 7 ) + channel.ack(message); + }) + + console.log("Waiting for messages...") + + } + catch (ex){ + console.error(ex) + } + +} \ No newline at end of file diff --git a/code/protocol_demos/rabbitmq/package.json b/code/protocol_demos/rabbitmq/package.json new file mode 100644 index 0000000..f18dfcd --- /dev/null +++ b/code/protocol_demos/rabbitmq/package.json @@ -0,0 +1,16 @@ +{ + "name": "rabbitmq", + "version": "1.0.0", + "description": "", + "main": "publisher.js", + "scripts": { + "publish": "node publisher.js", + "consume": "node consumer.js" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "amqplib": "^0.5.5" + } +} diff --git a/code/protocol_demos/rabbitmq/publisher.js b/code/protocol_demos/rabbitmq/publisher.js new file mode 100644 index 0000000..5e232d8 --- /dev/null +++ b/code/protocol_demos/rabbitmq/publisher.js @@ -0,0 +1,22 @@ +/* RabbitMQ */ +const amqp = require("amqplib"); + +const msg = {number: process.argv[2]} +connect(); +async function connect() { + + try { + const amqpServer = "amqp://localhost:5672" + const connection = await amqp.connect(amqpServer) + const channel = await connection.createChannel(); + await channel.assertQueue("jobs"); + await channel.sendToQueue("jobs", Buffer.from(JSON.stringify(msg))) + console.log(`Job sent successfully ${msg.number}`); + await channel.close(); + await connection.close(); + } + catch (ex){ + console.error(ex) + } + +} \ No newline at end of file diff --git a/code/protocol_demos/rabbitmq/scripts.md b/code/protocol_demos/rabbitmq/scripts.md new file mode 100644 index 0000000..e9904c6 --- /dev/null +++ b/code/protocol_demos/rabbitmq/scripts.md @@ -0,0 +1,20 @@ +## docker commands + +### Spin rabbitmq server docker +docker run --name rabbitmq -p 5672:5672 -d rabbitmq + +### Spin rabbitmq server HTTP server docker + +docker run --name rabbitmq -p 5672:5672 -p 15672:15672 -d rabbitmq:3-management + + + +HTTP +fetch("http://localhost:15672/api/vhosts”, {headers: {"Authorization" : `Basic ${btoa('guest:guest')}`}}).then(a=>a.json()).then(console.log) + + +fetch("http://localhost:15672/api/channels", {headers: {"Authorization" : `Basic ${btoa('guest:guest')}`}}).then(a=>a.json()).then(console.log) + + +fetch("http://localhost:15672/api/queues", {headers: {"Authorization" : `Basic ${btoa('guest:guest')}`}}).then(a=>a.json()).then(console.log) + diff --git a/code/protocol_demos/server-sent-events/index.js b/code/protocol_demos/server-sent-events/index.js new file mode 100644 index 0000000..c7af410 --- /dev/null +++ b/code/protocol_demos/server-sent-events/index.js @@ -0,0 +1,30 @@ +/* Client Code + +let sse = new EventSource("http://localhost:8080/stream"); +sse.onmessage = console.log + +*/ + +const app = require("express")(); + +app.get("/", (req, res) => res.send("hello!")); + +app.get("/stream", (req,res) => { + + res.setHeader("Content-Type", "text/event-stream"); + send(res); + +}) +const port = process.env.PORT || 8888; + +let i = 0; +function send (res) { + + res.write("data: " + `hello from server ---- [${i++}]\n\n`); + + + setTimeout(() => send(res), 1000); +} + +app.listen(port) +console.log(`Listening on ${port}`) \ No newline at end of file diff --git a/code/protocol_demos/server-sent-events/package.json b/code/protocol_demos/server-sent-events/package.json new file mode 100644 index 0000000..fad691d --- /dev/null +++ b/code/protocol_demos/server-sent-events/package.json @@ -0,0 +1,15 @@ +{ + "name": "server-sent-events", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "express": "^4.18.2" + } +} diff --git a/code/protocol_demos/short-polling/index.js b/code/protocol_demos/short-polling/index.js new file mode 100644 index 0000000..ef09907 --- /dev/null +++ b/code/protocol_demos/short-polling/index.js @@ -0,0 +1,24 @@ +const app = require("express")(); +const jobs = {} + +app.post("/submit", (req, res) => { + const jobId = `job:${Date.now()}` + jobs[jobId] = 0; + updateJob(jobId,0); + res.end("\n\n" + jobId + "\n\n"); +}) + +app.get("/checkstatus", (req, res) => { + console.log(jobs[req.query.jobId]) + res.end("\n\nJobStatus: " + jobs[req.query.jobId] + "%\n\n") + +} ) + +app.listen(8080, () => console.log("listening on 8080")); + +function updateJob(jobId, prg) { + jobs[jobId] = prg; + console.log(`updated ${jobId} to ${prg}`) + if (prg == 100) return; + this.setTimeout(()=> updateJob(jobId, prg + 10), 3000) +} \ No newline at end of file diff --git a/code/protocol_demos/short-polling/package.json b/code/protocol_demos/short-polling/package.json new file mode 100644 index 0000000..1f6087c --- /dev/null +++ b/code/protocol_demos/short-polling/package.json @@ -0,0 +1,15 @@ +{ + "name": "short-polling", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "express": "^4.18.2" + } +} diff --git a/code/protocol_demos/sync-async/async.js b/code/protocol_demos/sync-async/async.js new file mode 100644 index 0000000..6bfea90 --- /dev/null +++ b/code/protocol_demos/sync-async/async.js @@ -0,0 +1,7 @@ +const fs = require("fs"); + +console.log("first"); + +fs.readFile("file.txt", (err,data)=> console.log(data.toString())); + +console.log("second"); diff --git a/code/protocol_demos/sync-async/file.txt b/code/protocol_demos/sync-async/file.txt new file mode 100644 index 0000000..c211a99 --- /dev/null +++ b/code/protocol_demos/sync-async/file.txt @@ -0,0 +1 @@ +gm anon \ No newline at end of file diff --git a/code/protocol_demos/sync-async/package.json b/code/protocol_demos/sync-async/package.json new file mode 100644 index 0000000..b6c1bff --- /dev/null +++ b/code/protocol_demos/sync-async/package.json @@ -0,0 +1,12 @@ +{ + "name": "demo_sync-async", + "version": "1.0.0", + "description": "", + "main": "async.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "" +} diff --git a/code/protocol_demos/sync-async/sync.js b/code/protocol_demos/sync-async/sync.js new file mode 100644 index 0000000..1a3246b --- /dev/null +++ b/code/protocol_demos/sync-async/sync.js @@ -0,0 +1,10 @@ +const fs = require("fs"); + +console.log("first"); + +const res = fs.readFileSync("file.txt"); + +console.log(res); + +console.log("second"); + diff --git a/kustomize-example/.gitignore b/kustomize-example/.gitignore deleted file mode 100644 index c5a7add..0000000 --- a/kustomize-example/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/base/mysql/kubeconfig_victoria_eks_ggtest.json -/base/wordpress/kubeconfig_victoria_eks_ggtest.json -/overlays/dev/kubeconfig_victoria_eks_ggtest.json diff --git a/node-server-example/README.md b/node-server-example/README.md deleted file mode 100755 index 4fd2ece..0000000 --- a/node-server-example/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# Deploying a Node.js K8s Cluster with Kubectl - - -Build the image: - -``` -make build: -``` - -Run the container: - -``` -make run -``` - -Check whether the server worked - -``` -make curl -``` - -Check container's status - -``` -$ make status -``` - - -#### Other useful commands - -Exec inside the container: - -``` -$ docker exec -i -t /bin/bash -``` - -Check images in disk: - -``` -$ docker images -``` - - -### Pushing the Registry to Kubernetes - -In a real production system, we’ll want to build images in one place, then run these images in the Kubernetes cluster. - -The system that images for distribution is called a **container registry**. - - -Using a `yaml` Kubernetes files (for example, the one inside `node_server_example/`), you can now deploy the image with: - -``` -$ kubectl create -f node_example_kube_config.yaml -``` - -After that, you are able to create the service with: - -``` -$ kubectl expose deployment node-app-test -``` - -Also, check out the service status with: - -``` -$ kubectl get services -``` - -### Clean up - -Removing the service and the deployment when you are done: - -``` -$ kubectl delete service node-app-test -$ kubectl delete deployment node-app-test -``` - - -## Some References: - -* [Dockerfiles good practices](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#general-guidelines-and-recommendations). \ No newline at end of file diff --git a/resources/communication/README.md b/resources/communication/README.md new file mode 100644 index 0000000..4e985f8 --- /dev/null +++ b/resources/communication/README.md @@ -0,0 +1,327 @@ +## 📡 communication design patterns + +
      + +### Request Response model + +
      + +#### used in + +- the web, HTTP, DNS, SSH +- RPC (remote procedure call) +- SQL and database protocols +- APIs (REST/SOAP/GraphQL) + +
      + + +#### the basic idea + +1. clients sends a request + - the request structure is defined by both client and server and has a boundary +2. server parses the request + - the parsing cost is not cheap (e.g. `json` vs. `xml` vs. protocol buffers) + - for example, for a large image, chunks can be sent, with a request per chunk +3. Server processes the request +4. Server sends a response +5. Client parse the Response and consume + +
      + +#### an example in your terminal + + +* see how it always get the headers firsts: + +```bash +curl -v --trace souza.xyz + +== Info: Trying 76.76.21.21:80... +== Info: Connected to souza.xyz (76.76.21.21) port 80 (#0) +=> Send header, 79 bytes (0x4f) +0000: 47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d 0a GET / HTTP/1.1.. +0010: 48 6f 73 74 3a 20 6d 61 72 69 6e 61 73 6f 75 7a Host: souz +0020: 61 2e 78 79 7a 0d 0a 55 73 65 72 2d 41 67 65 6e a.xyz..User-Agen +0030: 74 3a 20 63 75 72 6c 2f 37 2e 38 38 2e 31 0d 0a t: curl/7.88.1.. +0040: 41 63 63 65 70 74 3a 20 2a 2f 2a 0d 0a 0d 0a Accept: */*.... +== Info: HTTP 1.0, assume close after body +<= Recv header, 33 bytes (0x21) +0000: 48 54 54 50 2f 31 2e 30 20 33 30 38 20 50 65 72 HTTP/1.0 308 Per +0010: 6d 61 6e 65 6e 74 20 52 65 64 69 72 65 63 74 0d manent Redirect. +0020: 0a . +<= Recv header, 26 bytes (0x1a) +0000: 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 Content-Type: te +0010: 78 74 2f 70 6c 61 69 6e 0d 0a xt/plain.. +<= Recv header, 36 bytes (0x24) +0000: 4c 6f 63 61 74 69 6f 6e 3a 20 68 74 74 70 73 3a Location: https: +0010: 2f 2f 6d 61 72 69 6e 61 73 6f 75 7a 61 2e 78 79 //souza.xy +0020: 7a 2f 0d 0a z/.. +<= Recv header, 41 bytes (0x29) +0000: 52 65 66 72 65 73 68 3a 20 30 3b 75 72 6c 3d 68 Refresh: 0;url=h +0010: 74 74 70 73 3a 2f 2f 6d 61 72 69 6e 61 73 6f 75 ttps://sou +0020: 7a 61 2e 78 79 7a 2f 0d 0a za.xyz/.. +<= Recv header, 16 bytes (0x10) +0000: 73 65 72 76 65 72 3a 20 56 65 72 63 65 6c 0d 0a server: Vercel.. +<= Recv header, 2 bytes (0x2) +0000: 0d 0a .. +<= Recv data, 14 bytes (0xe) +0000: 52 65 64 69 72 65 63 74 69 +``` + + +
      + +---- + +### Synchronous vs. Asynchronous workloads + +
      + +#### Synchronous I/O: the basic idea + +1. Caller sends a request and blocks +2. Caller cannot execute any code meanwhile +3. Receiver responds, Caller unblocks +4. Caller and Receiver are in sync + + +
      + +##### example (note the waste!) + +1. program asks OS to read from disk +2. program main threads is taken off the CPU +3. read is complete and program resume execution (costly) + +
      + +#### Asynchronous I/O: the basic idea + +1. caller sends a request +2. caller can work until it gets a response +3. caller either: + - checks whether the response is ready (epoll) + - receiver calls back when it's done (io_uring) + - spins up a new thread that blocks +4. caller and receiver not in sync + +
      + +#### Sync vs. Async in a Request Response + +- synchronicity is a client property +- most modern client libraries are async + + +
      + +#### Async workload is everywhere + +- async programming (promises, futures) +- async backend processing +- async commits in postgres +- async IO in Linux (epoll, io_uring) +- async replication +- async OS fsync (filesystem cache) + +
      + +---- + +### Push + +
      + +#### pros and coins + +- real-time +- the client must be online (connected to the server) +- the client must be able to handle the load +- polling is preferred for light clients. +- used by RabbitMQ (clients consume the queues, and the messages are pushed to the clients) + +
      + +#### the basic idea + +1. client connects to a server +2. server sends data to the client +3. client doesn't have to request anything +4. protocol must be bidirectional + + +
      + +---- + +### Polling + +
      + +* used when a request takes long time to process (e.g., upload a video) and very simple to build +* however, it can be too chatting, use too much network bandwidth and backend resources + +
      + +#### the basic idea + +1. client sends a request +2. server responds immediately with a handle +3. server continues to process the request +4. client uses that handle to check for status +5. multiple short request response as polls + + +
      + +--- + +### Long Polling + + +
      + +* a poll requests where the server only responds when the job is ready (used when a request takes long time to process and it's not real time) +* used by Kafka + +
      + +#### the basic idea + + + +1. clients sends a request +2. server responds immediately with a handle +3. server continues to process the request +4. client uses that handle to check for status +5. server does not reply until has the response (and there are some timeouts) + + +
      + +--- + +### Server Sent Events + + +
      + +* one request with a long response, but the client must be online and be able to handle the response + +
      + +#### the basic idea + +1. a response has start and end +2. client sends a request +3. server sends logical events as part of response +4. server never writes the end of the response +5. it's still a request but an unending response +6. client parses the streams data +7. works with HTTP + +
      + +---- + +### Publish Subscribe (Pub/Sub) + +
      + +* one publisher has many reader (and there can be many publishers) +* relevant when there are many servers (e.g., upload, compress, format, notification) +* great for microservices as it scales with multiple receivers +* loose coupling (clients are not connected to each other and works while clients not running) +* however, you cannot know if the consumer/subscriber got the message or got it twice, etc. +* also, it might result on network saturation and extra complexity +* used by RabbitQ and Kafka + + + +
      + +--- + +### Multiplexing vs. Demultiplexing + +
      + + +* used by HTTP/2, QUIC, connection pool, MPTCP +* connection pooling is a technique where you can spin several backend connections and keep them "hot" + + +
      + +--- + +### Stateful vs. Stateless + + +
      + +* a very contentious topic: is state stored in the backend? how do you rely on the state of an application, system, or protocol? +* **stateful backend**: store state about clients in its memory and depends on the information being there +* **stateless backend**: client is responsible to "transfer the state" with every request (you may store but can safely lose it). + +
      + +#### Stateless backends + +* stateless backends can still store data somewhere else +* the backend remain stateless but the system is stateful (can you restart the backend during idle time while the client workflow continues to work?) + +
      + +#### Stateful backend + +* the server generate a session, store locally, and return to the user +* the client check if the session is in memory to authenticate and return +* if the backend is restarted, sessions are empty (it never relied on the databases) + +
      + +#### Stateless vs. Stateful protocols + +* the protocols can be designed to store date +* TCP is stateful: sequences, connection file descriptor +* UDP is stateless: DNS send queryID in UDP to identify queries +* QUIC is stateful but because it sends connectionID to identify connection, it transfer the state across the protocol +* you can build a stateless protocol on top of a stateful one and vice versa (e.g., HTTP on top of TCP, with cookies) + +
      + +#### Complete stateless systems + +* stateless systems are very rare +* state is carried with every request +* a backend service that relies completely on the input +* **JWT (JSON Web Token)**, everything is in the token and you cannot mark it as invalid + + + + +
      + +--- + +### Sidecar Pattern + +
      + +* every protocol requires a library, but changing the library is hard as the app is entrenched to it and breaking changes backward compatibility +* sidecar pattern is the idea of delegating communication through a proxy with a rich library (and the client has a thin library) +* in this case, every client has a sidecar proxy +* pros: it's language agnostic, provides extra security, service discovery, caching. +* cons: complexity, latency + +
      + +#### Examples + +* service mesh proxies (Linkerd, Istio, Envoy) +* sidecar proxy container (must be layer 7 proxy) + + +
      \ No newline at end of file diff --git a/resources/communication/load_balancing.pdf b/resources/communication/load_balancing.pdf new file mode 100644 index 0000000..34aad39 Binary files /dev/null and b/resources/communication/load_balancing.pdf differ diff --git a/resources/communication/messaging_patterns.pdf b/resources/communication/messaging_patterns.pdf new file mode 100644 index 0000000..184e349 Binary files /dev/null and b/resources/communication/messaging_patterns.pdf differ diff --git a/resources/data_engineering/README.md b/resources/data_engineering/README.md new file mode 100644 index 0000000..20b0814 --- /dev/null +++ b/resources/data_engineering/README.md @@ -0,0 +1,35 @@ +## data engineering + +
      + +### articles + +* [machine learning system design](https://medium.com/@ricomeinl/machine-learning-system-design-f2f4018f2f8) +* [how to code neat ml pipelines](https://www.neuraxio.com/en/blog/neuraxle/2019/10/26/neat-machine-learning-pipelines.html) + +
      + +### enterprise solutions + +* [netflix data pipeline](https://medium.com/netflix-techblog/evolution-of-the-netflix-data-pipeline-da246ca36905) +* [netlix data videos](https://www.youtube.com/channel/UC00QATOrSH4K2uOljTnnaKw) +* [yelp data pipeline](https://engineeringblog.yelp.com/2016/07/billions-of-messages-a-day-yelps-real-time-data-pipeline.html) +* [gusto data pipeline](https://engineering.gusto.com/building-a-data-informed-culture/) +* [500px data pipeline](https://medium.com/@samson_hu/building-analytics-at-500px-92e9a7005c83) +* [twitter data pipeline](https://blog.twitter.com/engineering/en_us/topics/insights/2018/ml-workflows.html) +* [coursera data pipeline](https://medium.com/@zhaojunzhang/building-data-infrastructure-in-coursera-15441ebe18c2) +* [cloudfare data pipeline](https://blog.cloudflare.com/how-cloudflare-analyzes-1m-dns-queries-per-second/) +* [pandora data pipeline](https://engineering.pandora.com/apache-airflow-at-pandora-1d7a844d68ee) +* [heroku data pipeline](https://medium.com/@damesavram/running-airflow-on-heroku-ed1d28f8013d) +* [zillow data pipeline](https://www.zillow.com/data-science/airflow-at-zillow/) +* [airbnb data pipeline](https://medium.com/airbnb-engineering/https-medium-com-jonathan-parks-scaling-erf-23fd17c91166) +* [walmart data pipeline](https://medium.com/walmartlabs/how-we-built-a-data-pipeline-with-lambda-architecture-using-spark-spark-streaming-9d3b4b4555d3) +* [robinwood data pipeline](https://robinhood.engineering/why-robinhood-uses-airflow-aed13a9a90c8) +* [lyft data pipeline](https://eng.lyft.com/running-apache-airflow-at-lyft-6e53bb8fccff) +* [slack data pipeline](https://speakerdeck.com/vananth22/operating-data-pipeline-with-airflow-at-slack) +* [remind data pipeline](https://medium.com/@RemindEng/beyond-a-redshift-centric-data-model-1e5c2b542442) +* [wish data pipeline](https://medium.com/wish-engineering/scaling-analytics-at-wish-619eacb97d16) +* [databrick data pipeline](https://databricks.com/blog/2017/03/31/delivering-personalized-shopping-experience-apache-spark-databricks.html) + + + diff --git a/resources/data_engineering/airflow_and_luigi.md b/resources/data_engineering/airflow_and_luigi.md new file mode 100644 index 0000000..02646ab --- /dev/null +++ b/resources/data_engineering/airflow_and_luigi.md @@ -0,0 +1,130 @@ +## airflow and luigi + +
      + +### airflow + +
      + +* **[apache airflow](https://github.com/apache/airflow)** was a tool **[developed by airbnb in 2014 and later open-sourced](https://medium.com/airbnb-engineering/airflow-a-workflow-management-platform-46318b977fd8)** + +* it is a platform to programmatically author, schedule, and monitor workflows. when workflows are defined as code, they become more maintainable, versionable, testable, and collaborative + +* you can use airflow to author workflows as directed acyclic graphs (DAGs) of tasks: the airflow scheduler executes your tasks on an array of workers while following the specified dependencies. + +* here is **[a very simple toy example of an airflow job](https://gist.github.com/robert8138/c6e492d00cd7b7e7626670ba2ed32e6a)** that simply prints the date in bash every day after waiting for one second to pass, after the execution date is reached: + +
      + +```python + +from datetime import datetime, timedelta +from airflow.models import DAG # Import the DAG class +from airflow.operators.bash_operator import BashOperator +from airflow.operators.sensors import TimeDeltaSensor + +default_args = { + 'owner': 'you', + 'depends_on_past': False, + 'start_date': datetime(2018, 1, 8), +} + +dag = DAG( + dag_id='anatomy_of_a_dag', + description="This describes my DAG", + default_args=default_args, + schedule_interval=timedelta(days=1)) # This is a daily DAG. + +# t0 and t1 are examples of tasks created by instantiating operators +t0 = TimeDeltaSensor( + task_id='wait_a_second', + delta=timedelta(seconds=1), + dag=dag) + +t1 = BashOperator( + task_id='print_date_in_bash', + bash_command='date', + dag=dag) + +t1.set_upstream(t0) +``` + +
      + +--- + +### luigi + +
      + +- **[luigi data pipelining](https://github.com/spotify/luigi)** is spotify's python module that helps you build complex pipelines of batch jobs. it handles dependency resolution, workflow management, visualization, etc. + +- the basic units of Luigi are task classes that model an atomic ETL operation, in three parts: a requirements part that includes pointers to other tasks that need to run before this task, the data transformation step, and the output. All tasks can be feed into a final table (e.g. on Redshift) into one file. + +- here is **[an example of a simple workflow in luigi](https://towardsdatascience.com/data-pipelines-luigi-airflow-everything-you-need-to-know-18dc741449b7)**: + +
      + +```python +import luigi + +class WritePipelineTask(luigi.Task): + + def output(self): + return luigi.LocalTarget("data/output_one.txt") + + def run(self): + with self.output().open("w") as output_file: + output_file.write("pipeline") + + +class AddMyTask(luigi.Task): + + def output(self): + return luigi.LocalTarget("data/output_two.txt") + + def requires(self): + return WritePipelineTask() + + def run(self): + with self.input().open("r") as input_file: + line = input_file.read() + + with self.output().open("w") as output_file: + decorated_line = "My "+line + output_file.write(decorated_line) +``` + +
      + +---- + +### airflow vs. luigi + +
      + +| | airflow | luigi | +|---------------------------------------|-----------------------|------------------------| +| web dashboard | very nice | minimal | +| Built-in scheduler | yes | no | +| Separates output data and task state | yes | no | +| calendar scheduling | yes | no, use cron | +| parallelism | yes, workers | threads per workers | +| finds new deployed tasks | yes | no | +| persists state | yes, to db | sort of | +| sync tasks to workers | yes | no | +| scheduling | yes | no | + + +
      + +--- + +### cool resources + +
      + +* **[incubator airflow data pipelining](https://github.com/apache/incubator-airflow)** +* **[awesome airflow Resources](https://github.com/jghoman/awesome-apache-airflow)** +* **[airflow in kubernetes](https://github.com/rolanddb/airflow-on-kubernetes)** +* **[astronomer: airflow as a service](https://github.com/astronomer/astronomer)** diff --git a/resources/data_engineering/arrow_project.md b/resources/data_engineering/arrow_project.md new file mode 100644 index 0000000..b8c6886 --- /dev/null +++ b/resources/data_engineering/arrow_project.md @@ -0,0 +1,13 @@ +## the arrow project + +
      + +* the [arrow project](https://arrow.apache.org/) is an open-source, cross-language columnar in-memory data representation that is designed to accelerate big data processing. it was initially developed by the Apache Software Foundation and is now a top-level project of the foundation. + +* arrow provides a standard for representing data in a columnar format that can be used across different programming languages and different computing platforms. this enables more efficient data exchange between different systems, as well as faster processing of data using modern hardware such as CPUs, GPUs, and FPGAs. + +* one of the key benefits of Arrow is its memory-efficient design. because data is stored in a columnar format, it can be compressed more effectively than with traditional row-based storage methods. this can result in significant reductions in memory usage and faster processing times. + +* arrow is also designed to be extensible, with support for a wide range of data types and operations. it supports many programming languages, including C++, Java, Python, and Rust, among others. Arrow also integrates with popular big data frameworks such as Apache Spark, Apache Kafka, and Apache Flink. + +* arrow is a powerful tool for accelerating big data processing across different systems and programming languages. its columnar data format and memory-efficient design make it an attractive option for data-intensive applications that require fast and efficient data processing. diff --git a/resources/data_engineering/or_tools.md b/resources/data_engineering/or_tools.md new file mode 100644 index 0000000..55279cf --- /dev/null +++ b/resources/data_engineering/or_tools.md @@ -0,0 +1,12 @@ +## google's or-tools + +
      + + +* the goal of optimization is to find the best solution to a problem out of a large set of possible solutions (or any feasible solution) + +* all optimization problems have the following elements: + * the **objective**: the quantity you want to optimize. an optimal solution is one for which the value of the objective function is the best, i.e. max or min + * the **constraints**: restrictions on the set of possible solutions, based on the specific requirements of the problem. a feasible solution is one that satisfies all the given constraints for the problem, without necessarily being optimal + +* **[google's or-tools](https://developers.google.com/optimization/introduction)** is an open-source software for combinatorial optimization, which seeks to find the best solution to a problem out of a very large set of possible solutions diff --git a/resources/databases/README.md b/resources/databases/README.md new file mode 100644 index 0000000..8027f2f --- /dev/null +++ b/resources/databases/README.md @@ -0,0 +1,11 @@ +## databases + +
      + + +* **[database overview](database_overview.pdf)** +* **[caching best practices](caching.pdf)** +* **[distributed caching](distributed_caching.pdf)** +* **[database loadbalancing](database_loadbalancing.pdf)** +* **[database partitioning](database_partitioning.pdf)** +* **[failure detection: heartbeats, pings, gossip](failure_detection.pdf)** diff --git a/resources/databases/caching.pdf b/resources/databases/caching.pdf new file mode 100644 index 0000000..6bc1af6 Binary files /dev/null and b/resources/databases/caching.pdf differ diff --git a/resources/databases/database_loadbalancing.pdf b/resources/databases/database_loadbalancing.pdf new file mode 100644 index 0000000..9d8064d Binary files /dev/null and b/resources/databases/database_loadbalancing.pdf differ diff --git a/resources/databases/database_overview.pdf b/resources/databases/database_overview.pdf new file mode 100644 index 0000000..6bc1af6 Binary files /dev/null and b/resources/databases/database_overview.pdf differ diff --git a/resources/databases/database_partitioning.pdf b/resources/databases/database_partitioning.pdf new file mode 100644 index 0000000..e366cf2 Binary files /dev/null and b/resources/databases/database_partitioning.pdf differ diff --git a/resources/databases/distributed_caching.pdf b/resources/databases/distributed_caching.pdf new file mode 100644 index 0000000..da44826 Binary files /dev/null and b/resources/databases/distributed_caching.pdf differ diff --git a/resources/databases/failure_detection.pdf b/resources/databases/failure_detection.pdf new file mode 100644 index 0000000..469c6cd Binary files /dev/null and b/resources/databases/failure_detection.pdf differ diff --git a/resources/protocols/README.md b/resources/protocols/README.md new file mode 100644 index 0000000..0528ada --- /dev/null +++ b/resources/protocols/README.md @@ -0,0 +1,210 @@ +## 🪡 Protocols + +
      + +#### What's a protocol + +* a protocol is a system that allows two parties to communicate +* they are designed with a set of properties, depending on their purpose + +
      + +#### Protocol design properties + + +* **data format** + - text based (plain text, JSON, XML) + - binary (protobuf, RESP, h2, h3) +* **transfer mode** + - message based (UDP, HTTP) + - stream (TCP, WebRTC) +* **addressing system** + - DNS name, IP, MAC +* **directionality** + - bidirectional (TCP) + - unidirectional (HTTP) + - full/half duplex +* **state** + * stateful + * stateless +* **routing** + * proxies, gateways + + + +
      + +#### Why do you need a communication model? + +* you want to build agnostic applications +* without a standard model, upgrading network equipments become difficult +* innovations can be done in each layer separately without affecting the rest of the models +* the OSI model is 7 layers, each describing a specific networking component + +
      + +#### What's the OSI model? + +* **layer 7**, application: HTTP, FTP, gRCP +* **layer 6**, presentation: encoding, serialization +* **layer 5**, session: connection establishment, TLS +* **layer 4**, transport: UDP, TCP +* **layer 3**, network: IP +* **layer 2**, data link: frames, mac address ethernet +* **layer 1**, physical: electric signals, fiber or radio waves + + +
      + +##### An example sending a POST request + +* **layer 7:** POST request with JSON data to HTTP server +* **layer 6:** serialize JSON to flat byte strings +* **layer 5:** request to establish TCP connection/TLS +* **layer 4:** send SYN request target port 443 +* **layer 3:** SYN is placed an IP packet(s) and adds the source/dest IPs +* **layer 2:** each packet goes into a single frame and adds the source/dest MAC addresses +* **layer 1:** each frame becomes a string of bits which converted into either radio signal (wifi), electric signal (ethernet), or light (fiber) + +
      + +--- + +### HTTP/1.1, 2, 3 + +
      + +* clients example: browser, apps that make http request +* server examples: IIS, Apache TomCat, Python Tornado, NodeJS + +
      + +#### What's an HTTP request + +* a method (GET, POST, etc.) +* a path (the URL) +* a protocol (HTTP/1.1, 2, 3 etc.) +* headers (key-values) +* body + +
      + +#### HTTP/2 + +* by google, called SPDY +* support compression in both head and body +* multiplexing +* server push +* secure by default +* protocol negotiation during TLS (NPN/ALPN) + +
      + +#### HTTP/3 + +
      + +* HTTP over QUIC and multiplexed streams over UDP +* merges connection setup + TLS in one handshake +* has congestion control at stream level + +
      + +---- + +### WebSockets (ws://, wss://) + +
      + +* bidirectional communications on the web +* use cases: chatting, live feed, multiplayer gaming, showing client progress/logging +* apps: twitch, whatsapp +* **pros**: full-duplex (no polling), http compatible, firewall friendly +* **cons**: proxying is tricky, layer 7 load balancing is challenging (timeouts), stateful and difficult to horizontally scale +* long polling and side server events might be better solutions + +
      + +---- + +### gRPC + +
      + +* built on top of HTTP/2 (as a hidden implementation), adding several features +* any communication protocol needs client library for the language of choice, but with gRPC you only have one client library +* message format is protocol buffers +* the gRPC modes are: unary, server streaming, client streaming, and bidirectional streaming +* **pros**: fast and compact, one client library, progress feedback (upload), cancel request (H2), H2/protobuf +* **cons**: schema, thick client (libraries have bugs), proxies, no native error handling, no native browser support, timeouts (pub/sub) + +
      + +--- + +### WebRTC (web real-time communication) + +
      + +* find a p2p path to exchange video and audio in an efficient and low-latency manner +* standardized API +* enables rich communication browsers, mobile, IOT devices +* **pros**: p2p is great (low latency for high bandwidth content), standardized api +* **cons**: maintaining STUN and TURN servers, p2p falls apart in case of multiple participants (e.g., discord) + +
      + +#### WebRTC overview + +1. A wants to connect to B +2. A finds out all possible ways the public can connect to it +3. B finds out all possible ways the public can connect to it +4. A and B signal this session information via other means (whatsapp, QR, tweet, etc.) +5. A connects to B via the most optimal path +6. A and B also exchange their supported media and security + + +
      + +----- + +### Proxies + +
      + +#### What's a proxy + +* a server that makes requests on your behalf (you as a client) +* this means that your tcp connection is being established not with the server, but with the proxy +* in other words, the proxy has the role of layer 4, but layer 7 content gets forwarded (there are exceptions when the proxy adds a header such as with `X-Forwarded-For`) +* **uses**: caching, anonymity, logging, block sites, microservices + +
      + +#### What's a reverse proxy + +* the client does not know the "final destination server", meaning that the server thar serves the url requested could be a reverse proxy that will forward the request to the underline server +* **uses**: load balancing, caching, CDN, api gateway/ingress, canary deployment, microservices + + + + +
      + + +#### Layer 4 vs. Layer 7 Load Balancers + +
      + +* load balancers, also known as fault tolerant systems, is a reverse proxy talking to many backends +* a **layer 4 load balancer** starts with several TCP connection and keep them "warm" + - when a user starts a connection, this connection will have a state, the LB chooses one server and all segments for that connection go to that server and through ONE connection (layer 4 is stateful) + - the LB almost acts like a router + - **pros**: simpler load balancing, efficient, more secure, works with any protocol, one TCP connection (NAT) + - **cons**: no smart load balancing, NA services, sticky per connection, no caching, protocol unaware (can be risky) bypass rules +* a **layer 7 load balancer** starts with several TCP connection and keep them "warm", but in this case, when a client connects to the L7 LB, it becomes protocol specific + - any logical request will be buffered, parsed, and then forwarded to a new backend server + - this could be one or more segments + - certificates, private keys, all need to live in the load balancer + - **pros**: smart LB, caching, great for microservices, API gateway logic, authentication + - **cons**: expensive (because it's looking at the data), decrypts (terminates TLS), two TCP connections, needs to buffer, needs to understand protocol \ No newline at end of file