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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

S/party/hack like it's 1999

77 点作者 bqe超过 9 年前

11 条评论

zorked超过 9 年前
The ANSI driver that came with MS-DOS, ANSI.SYS, also allowed keys to be rebound to small macros.<p>So you could TYPE (cat) a file and then later press a harmless key like D and ANSI.SYS could output something like whatever the DOS equivalent of &quot;rm -fr &#x2F;&quot; was (probably DELTREE &#x2F;Y C:\) as though it had come from your very keyboard.<p>This was very common in the BBS era. Anti-virus software would usually detect those sequences. People who wanted to look at ANSI art but were aware of this would use alternative ANSI implementations like the one from PC Magazine, which I am a bit surprised to find out can still be downloaded from their website, which also still exists: <a href="http:&#x2F;&#x2F;www.pcmag.com&#x2F;article2&#x2F;0,2817,5343,00.asp" rel="nofollow">http:&#x2F;&#x2F;www.pcmag.com&#x2F;article2&#x2F;0,2817,5343,00.asp</a>
评论 #10238408 未加载
rohansingh超过 9 年前
FTA:<p>&gt; Hint: &gt; &#x27;less&#x27; doesn&#x27;t interpret escape sequences unless the -r switch is used, &gt; so stop aliasing it to &#x27;less -r&#x27; just because there&#x27;s no colored output.<p>Instead you can just use `less -R` which allows colored output but doesn&#x27;t interpret any other escape sequences.
评论 #10238066 未加载
6502nerdface超过 9 年前
You can even put ANSI escape sequences <i>in file names,</i> since there is no notion of an encoding for file names in POSIX. They&#x27;re just strings of any byte except &#x2F; and NUL. Fortunately GNU ls won&#x27;t print most escape sequences verbatim to stdout, but other implementations and&#x2F;or programs might, and I have had some success creating a file name that GNU ls always prints in a fixed color (this was a while ago, don&#x27;t have it on hand).
Mahn超过 9 年前
&gt; <i>You might be thinking &quot;If I opened that in my browser, I would detect it being malicious!&quot; Well, think again... One can have all sorts of fun with user-agents, something that can easily come to mind is verifying if the user-agent is from curl or wget, and make them download the malicious file, if not, redirect them to a legitimate file that looks like the original output. Your browser would fool you then.</i><p>I can&#x27;t decide whether this is evil, genius or disturbing. I don&#x27;t typically copy paste curl commands, but it never occurred to me that even if you check the URL curl is pointing to with your browser that&#x27;s no guarantee that the same script will be downloaded and parsed in the server.
评论 #10237711 未加载
评论 #10237189 未加载
daveloyall超过 9 年前
Title is wrong. Should be:<p><pre><code> s&#x2F;party&#x2F;hack&#x2F; like it&#x27;s 1999</code></pre>
评论 #10236669 未加载
评论 #10237989 未加载
评论 #10236831 未加载
jewel超过 9 年前
Combine this with <a href="https:&#x2F;&#x2F;thejh.net&#x2F;misc&#x2F;website-terminal-copy-paste" rel="nofollow">https:&#x2F;&#x2F;thejh.net&#x2F;misc&#x2F;website-terminal-copy-paste</a> and you&#x27;ve got something especially nasty.
评论 #10241132 未加载
评论 #10236918 未加载
arjovr超过 9 年前
cat, diff, etc... doesn&#x27;t interpret escape sequences, your terminal does.
rsync超过 9 年前
Early irc&#x27;ing involved simply typing:<p>NO CARRIER<p>or:<p>ATM0<p>... and watching 10-20-30 people suddenly disappear from the channel as their DOS based comm program passed them as commands directly to the modem.
评论 #10237732 未加载
kylek超过 9 年前
<a href="http:&#x2F;&#x2F;curlpipesh.tumblr.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;curlpipesh.tumblr.com&#x2F;</a>
评论 #10237878 未加载
akkartik超过 9 年前
But it wouldn&#x27;t fool any text editor, right? Or even <i>less</i>?
评论 #10236521 未加载
评论 #10237862 未加载
评论 #10237017 未加载
ised超过 9 年前
Can escape sequences survive being piped through &quot;col -bx&quot;?
评论 #10241095 未加载