{"id":13686006,"url":"https://github.com/jleclanche/python-bna","last_synced_at":"2025-10-08T20:46:39.594Z","repository":{"id":939806,"uuid":"714651","full_name":"jleclanche/python-bna","owner":"jleclanche","description":"Python implementation of the mobile Blizzard Authenticator (TOTP)","archived":false,"fork":false,"pushed_at":"2022-02-11T14:18:46.000Z","size":123,"stargazers_count":258,"open_issues_count":9,"forks_count":37,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-09-04T10:58:56.209Z","etag":null,"topics":["2fa","authenticator","battlenet","blizzard","totp"],"latest_commit_sha":null,"homepage":"https://eu.battle.net/support/en/article/24520","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jleclanche.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-06-10T22:55:38.000Z","updated_at":"2025-08-30T22:37:17.000Z","dependencies_parsed_at":"2022-07-18T04:00:30.466Z","dependency_job_id":null,"html_url":"https://github.com/jleclanche/python-bna","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/jleclanche/python-bna","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jleclanche%2Fpython-bna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jleclanche%2Fpython-bna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jleclanche%2Fpython-bna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jleclanche%2Fpython-bna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jleclanche","download_url":"https://codeload.github.com/jleclanche/python-bna/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jleclanche%2Fpython-bna/sbom","scorecard":{"id":523138,"data":{"date":"2025-08-11","repo":{"name":"github.com/jleclanche/python-bna","commit":"8116e41a87b80402e9fca6a5fd47e006260cb839"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 2/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/jleclanche/python-bna/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/jleclanche/python-bna/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/jleclanche/python-bna/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/jleclanche/python-bna/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/jleclanche/python-bna/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/jleclanche/python-bna/ci.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:39","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:57","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T03:35:19.513Z","repository_id":939806,"created_at":"2025-08-20T03:35:19.514Z","updated_at":"2025-08-20T03:35:19.514Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000637,"owners_count":26082819,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["2fa","authenticator","battlenet","blizzard","totp"],"created_at":"2024-08-02T14:01:01.173Z","updated_at":"2025-10-08T20:46:39.572Z","avatar_url":"https://github.com/jleclanche.png","language":"Python","readme":"# python-bna\n\n## Requirements\n\n- Python 3.6+\n\n\n## Command-line usage\n\nbna is a command line interface to the python-bna library. It can store\nand manage multiple authenticators, as well as create new ones.\n\n\nRemember: Using an authenticator on the same device as the one you log in with\nis less secure than keeping the devices separate. Use this at your own risk.\n\nConfiguration is stored in `~/.config/bna/bna.conf`. You can pass a\ndifferent config path with `bna --config=~/.bna.conf` for example.\n\n\n### Creating a new authenticator\n\n    $ bna new\n\nIf you do not already have an authenticator, it will be set as default.\nYou can pass `--set-default` otherwise.\n\n\n### Getting an authentication token\n\n    $ bna\n    01234567\n    $ bna EU-1234-1234-1234\n    76543210\n\n\n### Getting an authenticator's restore code\n\n    $ bna show-restore-code\n    Z45Q9CVXRR\n    $ bna restore EU-1234-1234-1234 ABCDE98765\n    Restored EU-1234-1234-1234\n\n\n### Getting an OTPAuth URL\n\nTo display the OTPAuth URL (used for setup QR Codes):\n\n    $ bna show-url\n    otpauth://totp/Blizzard:EU123412341234:?secret=ASFAS75ASDF75889G9AD7S69AS7697AS\u0026issuer=Blizzard\u0026digits=8\n\nNow paste this to your OTP app, or convert to QRCode and scan, or\nmanually enter the secret.\n\nThis is compatible with standard TOTP clients and password managers such as:\n- [andOTP](https://play.google.com/store/apps/details?id=org.shadowice.flocke.andotp) (Android),\n- [KeepassXC](https://keepassxc.org/) (Cross-platform)\n- [1Password](https://1password.com/) (Cross-platform)\n\n\n#### Getting a QR code\n\nTo encode to a QRCode on your local system install \\'qrencode\\'\n\nFor a PNG file saved to disk :\n\n    $ bna show-url | qrencode -o ~/BNA-qrcode.png\n    # Scan QRCode\n    $ rm ~/BNA-qrcode.png\n\nOr to attempt ot display QRCode in terminal as text output :\n\n    $ bna --otpauth-url | qrencode -t ANSI\n\n\n## Python library usage\n\n### Requesting a new authenticator\n\n```py\nimport bna\ntry:\n    # region is EU or US\n    # note that EU authenticators are valid in the US, and vice versa\n    serial, secret = bna.request_new_serial(\"US\")\nexcept bna.HTTPError as e:\n    print(\"Could not connect:\", e)\n```\n\n### Getting a token\n\n```py\n    # Get and print a token using PyOTP\n    from pyotp import TOTP\n    totp = TOTP(secret, digits=8)\n    print(totp.now())\n```\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjleclanche%2Fpython-bna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjleclanche%2Fpython-bna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjleclanche%2Fpython-bna/lists"}