TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A one-line X11 keylogger (2016)

4 点作者 davidshepherd712 个月前

1 comment

yjftsjthsd-h12 个月前
As the article notes, it&#x27;s hard to be too worried from a security perspective since an attacker that can run arbitrary commands as you has already won.<p>From a utility perspective, though, this is pretty handy; I&#x27;ve used either this or something really close when I was trying to figure out how to design a better keyboard layout (including some interest in chords and shortcuts). So I just keylogged myself for a few hours (or days, I forget), then ran some simple analysis on the result to see what keys I used the most, and what combinations were most common (both in the sense of chords like ctrl-t, and sequences like &quot;th&quot;). Honestly the biggest takeaways I remember were that non-letter keys were <i>really</i> big (space&#x2F;shift&#x2F;ctrl&#x2F;enter got used more than most if not all letters), and that I was hitting backspace enough that I really needed to prioritize getting my error rate down:P<p>IIRC it&#x27;s easy to do the same thing without needing X (that is, in a way that works on console&#x2F;X11&#x2F;Wayland) by reading the raw &#x2F;dev&#x2F;input devices, though that requires either root or (depending on your OS, I assume) being in the input group.