IPython: How to wipe IPython's history selectively & securely?

后端 未结 6 1228
北海茫月
北海茫月 2020-12-29 02:52

I have been learning how to use the paramiko package only to discover that all I stored passwords in plain text in IPython\'s %hist. Not so good.

6条回答
  •  独厮守ぢ
    2020-12-29 03:01

    History is store on $(ipython locate)/profile_default/history.sqlite by default. You can remove the file, and or do any operation you want on it (secure erase, etc..). It's an sqlite file so you can load it with any sqlite program and do query on it.

    Check in $(ipython locate)/profile_default/ and other $(ipython locate)/profile_xxx that you do not have any other history files. $(ipython locate) is usually ~/.ipython/ but can vary:

    ls $(ipython locate)/profile_*/*.sqlite
    

提交回复
热议问题