def scapy_write_history_file(readline):
if conf.histfile:
try:
readline.write_history_file(conf.histfile)
except IOError,e:
try:
warning("Could not write history to [%s]\n\t (%s)" % (conf.histfile,e))
tmp = utils.get_temp_file(keep=True)
readline.write_history_file(tmp)
warning("Wrote history to [%s]" % tmp)
except:
warning("Cound not write history to [%s]. Discarded" % tmp)
评论列表
文章目录