mac 钥匙串密码_从命令行获取钥匙串密码
mac 鑰匙串密碼
One of my favorite command line utilities is Guillermo Rauch's wifi-password, a utility that allows you to get?a saved password for the wifi network you're presently connected to (to share with colleagues or creeper in the cafe you're in). ?The idea of being able to get a password from command line is super useful, especially when it comes to retrieving a password for a website.
我最喜歡的命令行實(shí)用程序之一是Guillermo Rauch的wifi-password ,該實(shí)用程序可讓您獲取您當(dāng)前連接的wifi網(wǎng)絡(luò)的已保存密碼(與同事或您所在咖啡館中的爬行者共享)。 能夠從命令行獲取密碼的想法非常有用,尤其是在檢索網(wǎng)站密碼時(shí)。
If I?don't?recall a password but know that Mac OS' keychain has it, I need to open my browser, go to the desired website, use the developer tools to change the input?type?from password?to text, a process that?takes far too long for my liking. ?Shouldn't getting a password from keychain be faster? ?It can be with security:
如果我不記得密碼,但知道Mac OS的鑰匙串有密碼,則需要打開瀏覽器,轉(zhuǎn)到所需的網(wǎng)站,使用開發(fā)人員工具將input type從password為text ,這需要很長(zhǎng)時(shí)間。我喜歡的時(shí)間太長(zhǎng)了。 從鑰匙串獲取密碼是否應(yīng)該更快? 可以具有security :
sudo security find-internet-password -gs www.facebook.comThe snippet above queries the keychain (sometimes triggering a system permission dialog or two along the way), returning the account (username or email) and password registered on my system for the given domain!
上面的代碼段查詢了鑰匙串(有時(shí)會(huì)觸發(fā)一兩個(gè)系統(tǒng)權(quán)限對(duì)話框),返回給定域在我的系統(tǒng)上注冊(cè)的帳戶(用戶名或電子郵件)和密碼!
keychain: "/Users/myuser/Library/Keychains/login.keychain-db" version: 512 class: "inet" attributes:0x00000007 <blob>="www.facebook.com"0x00000008 <blob>=<NULL>"acct"<blob>="myemailaddress@gmail.com""atyp"<blob>="form""crtr"<uint32>="rimZ""cusi"<sint32>=<NULL>"desc"<blob>=<NULL>"icmt"<blob>=<NULL>"invi"<sint32>=<NULL>"nega"<sint32>=<NULL>"path"<blob>="/""port"<uint32>=0x00000000"prot"<blob>=<NULL>"ptcl"<uint32>="htps""scrp"<sint32>=<NULL>"sdmn"<blob>=<NULL>"srvr"<blob>="www.facebook.com""type"<uint32>=<NULL> password: "wouldntyouliketoknow"If you've not explored the security?utility, I highly recommend it. ?You can get an exported credential list, set passwords, create new dictionaries and more!
如果您尚未探索security實(shí)用程序,則強(qiáng)烈建議您使用。 您可以獲取導(dǎo)出的證書列表,設(shè)置密碼,創(chuàng)建新詞典等等!
翻譯自: https://davidwalsh.name/keychain-command-line
mac 鑰匙串密碼
總結(jié)
以上是生活随笔為你收集整理的mac 钥匙串密码_从命令行获取钥匙串密码的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: git密码修改问题解决方案(Window
- 下一篇: wemall:新的时代新的商业模式