console

Capturing and replaying console/terminal sessions with script and scriptreplay

Have you ever wondered how you can easily capture a console session on Linux (and probably most other Unix-like OSes) without the need for special video recording software?

Here's how: you can use the script(1) command (part of the bsdutils package).

  • Start the script command. Without parameters the sessions will be logged to a file called typescript. You can also supply a filename on the command line: script mysession.log.
  • Type whatever you want to record...
  • End the recording session with exit or CTRL-d.
  • You can now view the file with less -r mysession.log (it contains line feeds, escape sequences etc., so a simple text viewer will probably display garbage). You can even print it with lpr(1). Or simply display it on the terminal with cat mysession.log.

An even cooler feature is that you can replay a script with the correct timing information:

  • First you have to also record the timing information using the -t switch: script -t 2>mysession.timing mysession.log.
  • You can then replay the script: scriptreplay mysession.timing mysession.log.

See the script(1) and scriptreplay(1) manpages for more details.

17 Mistakes Microsoft Made in the Xbox Security System

Nice. Very nice. The Xbox-Linux / Free60 team around Michael Steil has published a paper / wiki page called 17 Mistakes Microsoft Made in the Xbox Security System. I'm currently reading the paper, but I'm not quite through yet (the PDF is 13 pages long). It contains a very detailed analysis of the 17 types of mistakes Microsoft made (they made most of them multiple times)...

The paper and the findings will be presented at the 22C3 in Berlin — this is one of the lectures I will definately be attending, that's for sure!

Quoting from the article:

"[Conclusion: ]The security system of the Xbox has been a complete failure.".

Also nice: the earlier (now obsolete) version of the paper was called The Hidden Boot Code of the Xbox — or "How to fit three bugs in 512 bytes of security code" ;-)

(via Golem)

Syndicate content