Challenge: recover the secret from the logs
Buffer token holds the token, saved to ~/token.txt and pasted into window 0, with the mouse on.
Nothing new. The whole level, in order:
C-b f- find the window
C-b [thenC-r- find the line in its history
C-Space,M-w- copy it
setb -n,saveb- name the buffer and save it
C-b ]- paste it back
set -g mouse on- finish
The catch is the gap between the two searches. find-window reads what a pane shows now, so it finds the crash notice printed last. The token printed earlier and has scrolled off — only copy mode’s search reaches that far back.
Reach this state:
The window that printed crashed is current, found with C-b f.
The tok- value from its scrollback is copied into a buffer.
That buffer is named token and saved to ~/token.txt.
The token is pasted into the shell in window 0.
The mouse option is on.
Challenge cleared.
find-window filtered by visible content; search-backward-incremental walked the full scrollback. copy-selection-and-cancel made buffer0; set-buffer -n turned it into a named buffer that will not be recycled; save-buffer wrote it out; paste-buffer typed it back in.
Go further
list-buffersshows every buffer and a sample of its text.- With the mouse on, a drag copies text the same way
M-wdoes.
- 1
C-b fsearches what is on screen, not the scrollback. The crash line is visible; the token is not. - 2In the right window,
C-b [thenC-rsearches backward through the scrollback for text you type. - 3After
M-w, rename with:setb -b buffer0 -n token, then:saveb -b token ~/token.txt. - 4
C-b 0,C-b ]to paste, then:set -g mouse on.
This is a live terminal. Typing goes to the machine, including Tab. Press Shift and Tab together to move focus back out to the page.
A real terminal, in this tab
Alpine Linux and tmux 3.4 on an x86 emulator. Nothing to install, and no server behind it.
about 15 MB, once
Done when
not started- A buffer named token holds the tok- value— not done yet
- The buffer was saved to ~/token.txt— not done yet
- The token was pasted into window 0— not done yet
- The mouse option is left enabled— not done yet