Skip to content

Commit

Permalink
[+] Make bash not store command history
Browse files Browse the repository at this point in the history
  • Loading branch information
WangYihang committed Oct 5, 2020
1 parent 01b9839 commit 9f80cc7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/context/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,9 @@ func (c *TCPClient) FileExists(path string) (bool, error) {
}

func (c *TCPClient) System(command string) {
c.Conn.Write([]byte(command + "\n"))
// https://www.technovelty.org/linux/skipping-bash-history-for-command-lines-starting-with-space.html
// Make bash not store command history
c.Conn.Write([]byte(" " + command + "\n"))
}

func (c *TCPClient) SystemToken(command string) string {
Expand Down

0 comments on commit 9f80cc7

Please sign in to comment.