📜 ⬆️ ⬇️

View all keystrokes in Google Docs

Since May 2010, Google Docs has introduced a new document format that stores a detailed version history. You can unscrew the action, as if in a slow motion movie. A text editor stores keystroke times to the nearest microsecond.

Journalist and hacker James Somers managed to crack the internal format of Google Docs and extract time stamps for each keystroke. Thus, you can see the history of creating a document from beginning to end. Moreover, the Google Docs keylogger is very advanced: it assigns unique identifiers to characters, so it even knows where and where each letter is copied from!

The most important thing is that you have a history of keystrokes and other people's documents that your colleagues have shared with you for collaboration. This can be called an unexpected program behavior. If I create a document and then open it for sharing, I cannot expect all colleagues to see the full story, how this text was created, what words were corrected and what sentences were deleted before the document was put on public display.

James Somers has been creating text editors for several years. The introduction of Google Docs in 2010 was a personal challenge for him, and he began a thorough study, wrote an extension to Chrome to intercept keystrokes, created the first version of the player with a history of edits.
')
The breakthrough happened at the moment when James noticed on the Network tab in the Chrome Inspector that after each key press, Chrome generates a call to save .



For example, when dialing a point at the end of a sentence, the following information is sent:



This data is stored in the change history, along with time stamps. A full version history of Google Docs can be obtained by going to the Revision History menu. It is called at a URL of the following form:

docs.google.com/document/d/#{docid}/revisions/load?id=#{docid}&start=1330&end=1341

Just change the start and end parameters in this URL to download the full history of changes to the document. The first is the one, and the last number is selected using the binary search method .

To generate "video clips" with a history of keystrokes, James Somers launched the site Draftback.com , which works through the Google API. By uploading your own (or other people's) documents there, you can see how they were created.



Draftback automatically generates a graph with the frequency of edits in time (above).

Sommers says that most of his colleagues were unpleasantly surprised when he told them about such "side" functionality of Google Docs. Although, this is quite a logical function: how else to save the history of edits, if not with the help of a keylogger?

But, on the other hand, after all, such a function can open up new facets of creativity for writers and poets, show the history of creating journalistic articles and texts of state laws ... All that is needed is for the author to work at Google Docs, and at the end of the work lay out his work in the open access. We can see from start to finish how each text was created.

Source: https://habr.com/ru/post/242433/


All Articles