{"id":25594078,"url":"https://github.com/cpnxp/ps2fas","last_synced_at":"2025-11-11T07:06:35.095Z","repository":{"id":276504786,"uuid":"860158158","full_name":"cpnxp/PS2Fas","owner":"cpnxp","description":"This is an unoffical PowerShell client for 2FAS Auth","archived":false,"fork":false,"pushed_at":"2024-09-21T02:16:22.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T17:32:29.257Z","etag":null,"topics":["2fas","csharp","powershell-module","unofficial"],"latest_commit_sha":null,"homepage":"","language":"C#","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/cpnxp.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-19T23:41:42.000Z","updated_at":"2024-09-21T02:15:54.000Z","dependencies_parsed_at":"2025-02-08T17:42:41.219Z","dependency_job_id":null,"html_url":"https://github.com/cpnxp/PS2Fas","commit_stats":null,"previous_names":["cpnxp/ps2fas"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpnxp%2FPS2Fas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpnxp%2FPS2Fas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpnxp%2FPS2Fas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpnxp%2FPS2Fas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cpnxp","download_url":"https://codeload.github.com/cpnxp/PS2Fas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239997024,"owners_count":19731337,"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":["2fas","csharp","powershell-module","unofficial"],"created_at":"2025-02-21T10:31:38.505Z","updated_at":"2025-11-11T07:06:32.797Z","avatar_url":"https://github.com/cpnxp.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PS2Fas\nThis is an unoffical PowerShell client for 2FAS Auth.  It was made by connecting to the Browser extension API.\n\n## Install\nThe module is now on the PSGallery, you can install it by using Install-Module\n```PowerShell\nInstall-Module -Name PS2Fas\n```\n\n## Build\nBuilt using Visual Studio Community 2022. This project uses several libraries that are included as NuGet deps.\nBuild this using the following command. Tested on Windows and Linux, might work on Macs?\n\nTested on:\\\nWindows 11 x64 PowerShell 5.1 and 7.4.5\\\nUbuntu 22.04 PowerShell 7.4.5\n\n```\ndotnet publish -c Release -f netstandard2.0 --self-contained true -p:PublishReadyToRun=true\n```\n\nThen take the contents of the publish folder and put them into a folder called PS2Fas, then place that folder in\nyour location for PowerShell modules\n\nWindows: Documents\\\\\\\u003cPowerShell or WindowsPowerShell\u003e\\\\Modules\nLinux: ~/.local/share/powershell/Modules\n\n## Use\nAfter getting your module installed, you must configure the module on the system this is a one time per system\noperation.\n\n```\nConnect-2Fas\n```\n\nThis will output a QRCode to the console which you will need to scan with your 2Fas app on your phone like\n the browser extension.  From here you can now call the get OTP cmdlet and get codes for a domain.\nthe QRCode and keys will be written out to your home directory in a folder called .ps2fas, keep this safe\nlike an SSH key.  In the event you were unable to scan the QRCode in the console it is saved into a text file in\nthe .ps2fas directory.  Open in an text editor with a mono space font set, then scan with phone.\n\n```\nGet-2FasOTP -Domain \"https://github.com\"\n```\n\nThis will return just your current 6 digit code after the request has been approved on the phone app.\nThe request will timeout after two minutes if it is rejected or ignored and will return an exception.\nThe timeout can be changed by passing -Timeout and a number of minutes (ex. ```-Timeout 5```)  Domain\nmust be a well formated URL or the prompt on your 2FAS will be empty.  At a later time I may add some\ncode to deal with this so anything can be entered and converted into a valid non routeable URL usable for \nautosending tokens.\n\n## Acknowledgements\nThis module is made using the following BouncyCastle.Cryptography, Newtonsoft.Json, websocketsharp.core and\nQRCoder all of which are MIT licensed and can be downloaded via NuGet.org.\\\nThanks to 2FAS itself which is a great app and project. No 2FAS source was used in this project but the source\nwas used to reverse engineer the API contracts.  https://github.com/twofas and https://2fas.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpnxp%2Fps2fas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpnxp%2Fps2fas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpnxp%2Fps2fas/lists"}