{"id":19874134,"url":"https://github.com/pythoninthegrass/unhackable_calculator","last_synced_at":"2025-04-05T17:26:16.029Z","repository":{"id":44708914,"uuid":"450895404","full_name":"pythoninthegrass/unhackable_calculator","owner":"pythoninthegrass","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-07T23:02:52.000Z","size":91,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-11T14:28:11.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pythoninthegrass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-22T18:00:32.000Z","updated_at":"2022-01-27T05:54:48.000Z","dependencies_parsed_at":"2022-09-08T04:02:01.523Z","dependency_job_id":null,"html_url":"https://github.com/pythoninthegrass/unhackable_calculator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Funhackable_calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Funhackable_calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Funhackable_calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Funhackable_calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pythoninthegrass","download_url":"https://codeload.github.com/pythoninthegrass/unhackable_calculator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247371849,"owners_count":20928292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T16:21:55.994Z","updated_at":"2025-04-05T17:26:16.007Z","avatar_url":"https://github.com/pythoninthegrass.png","language":"Python","readme":"# unhackable_calculator\n\nPythonistas [Remote Code Execution Meetup](https://www.meetup.com/pythonistas/events/283364790/) on January 22, 2022\n\n## Setup\n* Install \n    * [editorconfig](https://editorconfig.org/)\n    * [poetry](https://python-poetry.org/docs/)\n    * [docker-compose](https://docs.docker.com/compose/install/)\n    * [playwright](https://playwright.dev/python/docs/intro#installation)\n\n## Usage\n### Poetry\n```bash\n# Install\ncurl -sSL https://install.python-poetry.org | $(which python3) -\n\n# Change config\npoetry config virtualenvs.in-project true          # .venv in `pwd`\npoetry config experimental.new-installer false     # fixes JSONDecodeError on Python3.10\n\n# Activate virtual environment (venv)\npoetry shell\n\n# Deactivate venv\nexit  # ctrl-d\n\n# Install multiple libraries\npoetry add google-auth google-api-python-client\n\n# Initialize existing project\npoetry init\n\n# Run script and exit environment\npoetry run python your_script.py\n\n# Install from requirements.txt\npoetry add `cat requirements.txt`\n\n# Update dependencies\npoetry update\n\n# Remove library\npoetry remove google-auth\n\n# Generate requirements.txt\npoetry export -f requirements.txt --output requirements.txt --without-hashes\n```\n\n### Docker\n```bash\n# clean build (remove `--no-cache` for speed)\ndocker-compose build --no-cache --parallel\n\n# start container\ndocker-compose up --remove-orphans -d\n\n# exec into container\ndocker attach unhackable\n\n# run command inside container\npython unhackable.py\n\n# destroy container\ndocker-compose down\n```\n\n#### Docker Troubleshooting\n* Watch logs in real-time: `docker-compose logs -tf --tail=\"50\" unhackable`\n* Check exit code\n    ```bash\n    $ docker-compose ps\n    Name                          Command               State    Ports\n    ------------------------------------------------------------------------------\n    docker_python      python manage.py runserver ...   Exit 0\n    ```\n\n### Playwright\n```bash\n# install\npip install --upgrade pip\npip install playwright\nplaywright install\n\n# download new browsers (chromedriver, gecko)\nnpx playwright install\n\n# generate code via macro\nplaywright codegen wikipedia.org\n```\n\n## TODO\n* ~~Poetry~~\n* ~~Dockerfile~~\n* ~~Playwright~~\n* Hack [sw33tr0ll](https://github.com/sw33tr0ll)'s [Lambda box](https://app.cloud-logon.com/dev/calculator) (no DDoS plz)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Funhackable_calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythoninthegrass%2Funhackable_calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Funhackable_calculator/lists"}