{ "info": { "author": "Roy Ragsdale", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# President's CTF Bot\n\nA local scoreboard and bot to track the [President's Cybersecurity Cup][p].\n\n[p]:https://www.cisa.gov/presidentscup\n\n## Quick Start\n\n```\npip install presidentsCTF-bot\nwget https://gitlab.com/royragsdale/presidentsctf-bot/raw/master/config.json\npresidentsCTF\n```\n\n1. Install the tool.\n2. Get a baseline configuration with the existing events.\n3. Fetch the scoreboards.\n\nBy default this will fetch all the events from the configuration and show any\nactive teams on the scoreboard. If there are no active events you will not be\nshown anything.\n\nConsult the `--help` for the full set of options as well as the\n[Examples](#Examples) section below.\n\n## Features\n\n- Track solves over time.\n- Locally annotate known teams.\n- Highlight active teams.\n- Send updates to slack or [twitter][t].\n\n[t]:https://twitter.com/presidentsctf\n\n## Background\n\nThe scoreboard data for each event (e.g. Team Round 1) is publicly available.\nThis tool merely fetches the json data and does some local processing to provide\na better experience.\n\n\n## Examples\n\n### Just One Event\n\nOften you only want to display the current event.\n\nYou can use a configuration file (e.g. `config.json` or with `--config`) that\nonly specifies that event.\n\n```\npresidentsCTF --config solo-round-1.json\n```\n\nOr you can use the `--event` option to limit the display (`6e8a18` is the\nprefix of the Solo Round 1 leaderboard event_id).\n\n```\npresidentsCTF --event 6e8a18\n```\n\n### More Teams\n\nBy default the scoreboard only shows active teams. If the event is not live\nthere will be no results. The following flags change what is shown. These can be\nused in combination. \n\n```\n--active show active teams (default=True)\n--known show known teams (default=False)\n--top TOP show top N teams\n```\n\n```\n$ presidentsCTF --event 6e8a18 --top 3\n##############################################################\nSolo Round 1\n##############################################################\n| Rank | Team | Score | Solves | Remaining |\n|--------|----------------|---------|----------|-------------|\n| 1 | DOD-Player-513 | 5500 | 9 | Final |\n| 2 | DOD-Player-280 | 5500 | 9 | Final |\n| 3 | DOD-Player-262 | 5500 | 10 | Final |\n```\n\n### Log solves\n\nBy running the fetch in a recurring fashion the tool can compute differences and\ninfer challenge solves. This is easy to automate with a tool like `watch`. For\nexample the following invocation will capture minute by minute updates as well\nas export the received json data for other use, and store the update messages to\n`log`.\n\n```\n$ watch -n 60 'presidentsCTF --event 6e8a18 --export | tee -a log'\n```\n\n### Known Teams\n\nBy default the scoreboard only shows anonymous team names. This makes it\nchallenging to follow your friends and enemies. If you know who a team is you\ncan add a custom mapping into your `config.json` under the `\"teams\"` section.\n\n## Notifications\n\nIf you want the updates delivered live in real time, this tool can also post\nupdates to slack or twitter. Check the example `config.json` for the information\nrequired to use this functionality.\n\nThe `\"watch\"` field of the `\"slack\"` configuration maps a team name to a slack\nuser id. This will `@mention` the user for any changes on that team.\n\nCaution using the known teams feature with the notification feature so as not to\nunintentionally expose who is on what team.\n\nThough the bot has twitter functionality, you should probably just follow the\nunofficial account .\n\n## Filter only unique updates\n\nWhen logging solves you will likely end up with a large number of json files\nthat are effectively identical. These take up space, slow things down and are\njust not necessary. The following command is an example of filtering out only\nthe files that contain updates:\n\n```\npresidentsCTF --local . --quiet --debug 2>&1 | grep \"loaded with changes\" | awk '{print $7}' | xargs -I {} cp {} ./uniq/\n```\n\nThis assumes:\n- the `uniq` directory exists (the destination for the unique files to be\ncopied to)\n- the command is run from a directory (`.`) containing json files created with\n`--export`\n\n## Stats\n\nFor an event it is interesting to see who many challenges of each point value\nhave been solved, and things like the average solve duration. This tool also\nships with a `presidentsCTF-stats` command that can be used on an existing\ndatabase to quickly display these kinds of statistics. For example:\n\n```\n$ presidentsCTF-stats\nTeam Round 2 - fab611\n---------------------\nTeams on scoreboard : 35\nSolve Breakdown (Hours:Minutes)\n###################################################\n| Points | Solved | Min | Average | Max |\n|----------|----------|-------|-----------|-------|\n| 1000 | 67 | 00:05 | 01:38 | 05:53 |\n| 2000 | 61 | 00:24 | 04:17 | 06:41 |\n| 3000 | 4 | 00:14 | 04:57 | 07:40 |\n###################################################\n```\n\nThe `--team` flag can be used to see stats for a specific team as well.\n\n**Note:** The ability to display per solve statistics relies on logging solves\nover time and computing the differences as per the [Log Solves](#log-solves)\nsection.\n\n# Thanks\n\nThe President's Cup Cybersecurity Competition organizers for putting on the\nevent. jchristman for pointing out that api endpoint. All bugs are mine.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/royragsdale/presidentsctf-bot", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "presidentsCTF-bot", "package_url": "https://pypi.org/project/presidentsCTF-bot/", "platform": "", "project_url": "https://pypi.org/project/presidentsCTF-bot/", "project_urls": { "Bug Reports": "https://gitlab.com/royragsdale/presidentsctf-bot/issues", "Homepage": "https://gitlab.com/royragsdale/presidentsctf-bot", "Source": "https://gitlab.com/royragsdale/presidentsctf-bot/" }, "release_url": "https://pypi.org/project/presidentsCTF-bot/0.0.6/", "requires_dist": [ "tabulate", "slackclient", "tweepy" ], "requires_python": ">=3.6", "summary": "Local scoreboard and bot to track the President's Cup.", "version": "0.0.6", "yanked": false, "yanked_reason": null }, "last_serial": 6059140, "releases": { "0.0.4": [ { "comment_text": "", "digests": { "md5": "77cc5a942c78c521c6578d9d58c8e347", "sha256": "b4e86f2e2dd1079650995f1f6fc730ddd3992398b141494ee930587f3975a52b" }, "downloads": -1, "filename": "presidentsCTF_bot-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "77cc5a942c78c521c6578d9d58c8e347", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 11784, "upload_time": "2019-10-18T23:34:54", "upload_time_iso_8601": "2019-10-18T23:34:54.730320Z", "url": "https://files.pythonhosted.org/packages/f4/60/5e11f55d1519d2fc31f33de250bfe6b2379b31393a7117022ac87ca1c7e3/presidentsCTF_bot-0.0.4-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "b648c14d17ab40a006824f6cc72b0c10", "sha256": "319a22611a375aebc1d2d461cf3812a90cdf6b88fb00923a8b577328f49ba07c" }, "downloads": -1, "filename": "presidentsCTF-bot-0.0.4.tar.gz", "has_sig": false, "md5_digest": "b648c14d17ab40a006824f6cc72b0c10", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8894, "upload_time": "2019-10-18T23:34:57", "upload_time_iso_8601": "2019-10-18T23:34:57.167129Z", "url": "https://files.pythonhosted.org/packages/43/c7/72224e7187214d2079f25e6e0f92a950d2fc02d76fac61249f61f54d6269/presidentsCTF-bot-0.0.4.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "b4f8603f206efd852660b25bb3278dd1", "sha256": "26689fefdc323b0d29af661e72c4af07a8906a186bb323ebf056856095f8a2f7" }, "downloads": -1, "filename": "presidentsCTF_bot-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "b4f8603f206efd852660b25bb3278dd1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 11836, "upload_time": "2019-10-21T17:27:00", "upload_time_iso_8601": "2019-10-21T17:27:00.372130Z", "url": "https://files.pythonhosted.org/packages/4f/aa/ead869513877db60edf6b4a4bb2a5ba9deeb7b74270897f980a84e746362/presidentsCTF_bot-0.0.5-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "37eb906a8a22b2845a71573a0434a716", "sha256": "aa16bd043e569564e65661dbf7ea919f916fd73cba4a804a8baad71bb1175278" }, "downloads": -1, "filename": "presidentsCTF-bot-0.0.5.tar.gz", "has_sig": false, "md5_digest": "37eb906a8a22b2845a71573a0434a716", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8932, "upload_time": "2019-10-21T17:27:02", "upload_time_iso_8601": "2019-10-21T17:27:02.654783Z", "url": "https://files.pythonhosted.org/packages/43/63/e31f9f404219fb2917c8949deb238b9e76913521773fdf65e36996ac4823/presidentsCTF-bot-0.0.5.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "de7032d3f0ef52ce08875d1466bfbf5f", "sha256": "1a915076347c853f0479764bc3eceb0c8dc3a877a90688befbf40c96e78100af" }, "downloads": -1, "filename": "presidentsCTF_bot-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "de7032d3f0ef52ce08875d1466bfbf5f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 14719, "upload_time": "2019-10-31T15:42:25", "upload_time_iso_8601": "2019-10-31T15:42:25.722972Z", "url": "https://files.pythonhosted.org/packages/cc/a3/02fe733e7b51bb1496c87e249c6d7128f250724afc36df0f19d8d8076cba/presidentsCTF_bot-0.0.6-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "88634f6a12d2156027522db756bd9e9a", "sha256": "142db3e12da924c6d4a27758219654334a78fe8a84191912e627dc8da9189d9d" }, "downloads": -1, "filename": "presidentsCTF-bot-0.0.6.tar.gz", "has_sig": false, "md5_digest": "88634f6a12d2156027522db756bd9e9a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 13444, "upload_time": "2019-10-31T15:42:27", "upload_time_iso_8601": "2019-10-31T15:42:27.241450Z", "url": "https://files.pythonhosted.org/packages/b9/6c/cdf50e06a8c9767d96413223a44c8627133d0b63925a9fd58fc2b578a8bc/presidentsCTF-bot-0.0.6.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "de7032d3f0ef52ce08875d1466bfbf5f", "sha256": "1a915076347c853f0479764bc3eceb0c8dc3a877a90688befbf40c96e78100af" }, "downloads": -1, "filename": "presidentsCTF_bot-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "de7032d3f0ef52ce08875d1466bfbf5f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 14719, "upload_time": "2019-10-31T15:42:25", "upload_time_iso_8601": "2019-10-31T15:42:25.722972Z", "url": "https://files.pythonhosted.org/packages/cc/a3/02fe733e7b51bb1496c87e249c6d7128f250724afc36df0f19d8d8076cba/presidentsCTF_bot-0.0.6-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "88634f6a12d2156027522db756bd9e9a", "sha256": "142db3e12da924c6d4a27758219654334a78fe8a84191912e627dc8da9189d9d" }, "downloads": -1, "filename": "presidentsCTF-bot-0.0.6.tar.gz", "has_sig": false, "md5_digest": "88634f6a12d2156027522db756bd9e9a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 13444, "upload_time": "2019-10-31T15:42:27", "upload_time_iso_8601": "2019-10-31T15:42:27.241450Z", "url": "https://files.pythonhosted.org/packages/b9/6c/cdf50e06a8c9767d96413223a44c8627133d0b63925a9fd58fc2b578a8bc/presidentsCTF-bot-0.0.6.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }