惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
爱范儿
爱范儿
T
The Exploit Database - CXSecurity.com
量子位
T
Tailwind CSS Blog
T
Threatpost
The GitHub Blog
The GitHub Blog
AWS News Blog
AWS News Blog
云风的 BLOG
云风的 BLOG
K
Kaspersky official blog
P
Proofpoint News Feed
博客园 - 司徒正美
L
LangChain Blog
T
Threat Research - Cisco Blogs
C
CERT Recently Published Vulnerability Notes
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
S
Secure Thoughts
The Last Watchdog
The Last Watchdog
Spread Privacy
Spread Privacy
H
Hacker News: Front Page
T
Troy Hunt's Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
W
WeLiveSecurity
A
Arctic Wolf
Apple Machine Learning Research
Apple Machine Learning Research
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
P
Proofpoint News Feed
T
Tor Project blog
T
The Blog of Author Tim Ferriss
I
Intezer
P
Privacy & Cybersecurity Law Blog
美团技术团队
N
Netflix TechBlog - Medium
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
Google Developers Blog
Attack and Defense Labs
Attack and Defense Labs
T
Tenable Blog
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
腾讯CDC
Microsoft Security Blog
Microsoft Security Blog
A
About on SuperTechFans
Last Week in AI
Last Week in AI

Ruby | 酷 壳 - CoolShell

数据即代码:元驱动编程 | 酷 壳 - CoolShell API设计:用流畅接口构造内部DSL | 酷 壳 - CoolShell 对象的消息模型 | 酷 壳 - CoolShell 程序员眼中的编程语言 | 酷 壳 - CoolShell 编程语言汽车 | 酷 壳 - CoolShell 到处都是Unix的胎记 | 酷 壳 - CoolShell 让Ruby增加30%的性能改进 | 酷 壳 - CoolShell 免费电子书:Ruby Complete | 酷 壳 - CoolShell 2009年脚本语言排名 | 酷 壳 - CoolShell
StackOverflow的404错误页 | 酷 壳 - CoolShell
陈皓 · 2010-06-25 · via Ruby | 酷 壳 - CoolShell

不知道大家有没有注意到StakeOverflow的404错误页面?其显示了下面的这个图片:

这个是一个很有意思的图片,不知道你看懂了吗?看上去像Python,又像 Ruby,还像 Perl,当然也有 C的影子,还有Brainfuck。是的,这是一个杂交程序,杂交了Python,Ruby,Perl,C,还有Brainfuck(注意其中的#号),所有的语句都是输出“404”字符串。

关于这种杂交程序,本站以前也发布过《C语言和sh脚本的杂交代码》,大家可以前往一看。这样的有趣的玩法叫“Polyglot”,也就是说,把N种语言写在一个文件中,然后,该文件在任何编译器下都可以运行,上述的那段代码在Python,Ruby,Perl,Brainfuck下都可以正常运行,也可以被C和的编译器编译通过,并被运行。

下面是这个图片的字符码,以供各位试试。

# define v putchar
#   define print(x) main(){v(4+v(v(52)-4));return 0;}/*
#>+++++++4+[>++++++<-]>++++.----.++++.*/
print(202*2);exit();
#define/*>.@*/exit()

欢迎你留下你的看法。

(全文完)

Loading...