Hacker News new | ask | show | jobs
by nick_name 1757 days ago

  # python3 -m pip install pyotp
  SECRET='JBSWY3DPEHPK3PXP' python3 -c "import pyotp; print(pyotp.TOTP('${SECRET}').now())"
1 comments

I think you forgot to install that 3rd party dependency that does all the heavy lifting here.
Although "heavy lifting" is a bit of an overstatement here. pyotp has around 200 lines of code.