#!/usr/bin/pythonimport onetimepass as otp
my_secret = 'MFRGGZDFMZTWQ2LK'
my_token = otp.get_totp(my_secret)
print my_token
这段代码片段来自onetimepass的GitHub官网
https://github.com/tadeck/onetimepass
这里my_secret是你注册完Google Authenticator Application后得到的密钥,运维会给你
运行下面的命令
python onetimepass_demp.py
经过测试,发现这个结果和Android手机应用Google Authenticator Application上是一样的
在安装一个Python库onetimepass时发生下面的问题: pip install onetimepass Could not fetch URL https://pypi.python.org/simple/six/: There was a problem confirming the ssl certificate:...
反向索引案例:CREATE TABLE my_tab(x VARCHAR2(20)); INSERT INTO my_tab VALUES('abcde'); COMMIT;CREATE INDEX my_tab_idx ON my_tab(REVERSE(x)); SELECT * FROM my_tab t WHERE REVE...