Skip to content

Instantly share code, notes, and snippets.

@nil0x42
Created September 15, 2020 12:02
Show Gist options
  • Save nil0x42/9decc6cac36ec9ab6b5542d76ff511c3 to your computer and use it in GitHub Desktop.
Save nil0x42/9decc6cac36ec9ab6b5542d76ff511c3 to your computer and use it in GitHub Desktop.
[OPSEC,SSH] Leave no tracks while editing file with vim
# author: @nil0x42
# OPSEC, anti-forensics, bash
# - Preserve file's `mtime` after edition
# - Prevent vim from using .swp & .viminfo
vim-OPSEC(){ cp -fp "$1" /tmp/x && vim -ni NONE /tmp/x && touch -r "$1" /tmp/x && cp -fp /tmp/x "$1";}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment