IPython:如何有选择地擦除IPython的历史记录安全? [英] IPython: How to wipe IPython's history selectively & securely?

查看:285
本文介绍了IPython:如何有选择地擦除IPython的历史记录安全?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在学习如何使用 paramiko 包来发现我在IPython的%hist 。不太好。

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.

因此,我需要摆脱存储在%hist 中的特定部分。说,我不想擦除整个历史。 - 只有我不小心输入密码= 或类似选择条款的部分。

I therefore need to get rid of particular parts of what is stored in %hist. Saying that, I do not want to wipe the whole history. - Only the parts where I have been careless enough to type password = or similar chosen terms.

谢谢

评论我不需要:


  • %clear 仅清除会话。它不会消除历史。

  • 是的。从现在开始我只会使用xSA_keys。

  • %clear only clears the session. It does not wipe the history.
  • Yes. I will only use xSA_keys from now on.

推荐答案

历史存储在 $(ipython locate)/profile_default/history.sqlite 默认情况下。
您可以删除文件,或者对其执行任何操作(安全擦除等)。
这是一个sqlite文件,所以你可以用任何sqlite程序加载它并对它进行查询。

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.

签入 $(ipython locate )/ profile_default / 和其他 $(ipython locate)/ profile_xxx 您没有任何其他历史文件。 $(ipython locate)通常是〜/ .ipython / 但可能会有所不同:

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

这篇关于IPython:如何有选择地擦除IPython的历史记录安全?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆