ustc-hackergame / hackergame2023-writeups Goto Github PK
View Code? Open in Web Editor NEWHackergame 2023 的官方与非官方题解
License: Other
Hackergame 2023 的官方与非官方题解
License: Other
原文中
至于如何能用一个输入同时获得两个 flag,出题人认为最短的答案需要 13 个字符:{"":1e2,"":0}。
然而在网页终端中输入此答案,只能获取flag2,没有flag1。
Input your JSON: {"":1e2,"":0}
As JSON: {'': 0}
As YAML 1.1: {'': 0}
No flag1
Flag2: flag{.............}
RFC 8259 的表述更严格一些,它说:
The names within an object SHOULD be unique.
其中大写的“SHOULD”是 RFC 的一个术语,表示特定情况下可以违反这个规则,但是要考虑到可能会导致的问题。然而,YAML 1.2 说:
The content of a mapping node is an unordered set of key/value node pairs, with the restriction that each of the keys is unique.
这个规则是绝对的,YAML 1.2 解析器在遇到重复的键时必须报错。
但是注意到RFC 8259是这么说的
When the names within an object are not unique, the behavior of software that receives such an object is unpredictable. Many implementations report the last name/value pair only. Other implementations report an error or fail to parse the object, and some implementations report all of the name/value pairs, including duplicates.
也就是说YAML 1.2选择直接报错也是一种合法的unpredictable的JSON实现,未违反RFC 8259解析JSON的要求。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.