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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Smuggling Python Code Using Shrugging Faces

3 点作者 juliusgeo2 个月前

1 comment

zahlman2 个月前
&gt;which creates a new REPL with some very important changes<p>I don&#x27;t like shrug! I don&#x27;t want any shrug!<p>... Of course, if you can arrange for the target system to decode and execute the embedded code, it&#x27;s already compromised...<p>&gt;eval doesn&#x27;t like statements and everyone already knows to suspect exec code.<p>If people don&#x27;t equally well suspect `eval` then education attempts have seriously failed.<p>Incidentally: one way every Pythonista can help improve OSS is to search on GitHub for insecure-but-intentional - as well as inappropriate-but-legitimate -uses of `eval` to submit PRs. For example, it often gets used to convert hex digits to raw byte values (<a href="https:&#x2F;&#x2F;github.com&#x2F;search?q=%22eval%28%5C%220x%22+lang%3APython+&amp;type=code" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;search?q=%22eval%28%5C%220x%22+lang%3APyt...</a>), rather than simply passing a `base` argument to `int`.
评论 #43413574 未加载