Better HN
topnewbestaskshowjobs
Log inSign up

CodeHz

27 karma · joined Feb 2, 2016 (10y ago) · 21 submissions

Submissions

comment 1y ago · link · parent

Actually, it won't compile in msvc (the linking phase, to be precise), MSVC uses different names for methods with different visibilities

comment 3y ago · link · parent

Windows do have this API, NtDeleteFile, AND it could be used to delete current running exe. https://twitter.com/jonaslyk/status/1345167613643661312 but it is undocumented...

comment 3y ago · link · parent

Funiest thing is, in win11, the notepad use RichEdit again (but use winui's richedit control, not win32

comment 3y ago · link · parent

no, you can do it by define SQLITE_DEFAULT_FOREIGN_KEYS=1 while compiling sqlite3

comment 3y ago · link · parent

Btw, you can even run a executable file which has been renamed to any extension (.txt or .whatever) in command line. (See PATHEXT env) It just recognized by the explorer (and shellexecute api’ third parameter). So that’s mean all files have “executable” permission by default.

comment 3y ago · link · parent

Maybe it just a transparent div that blocked all the pointer events?

comment 4y ago · link · parent

it could come from a template function which don't have a sfinae branch (or `if constexpr (std::is_empty<T>::value)`) for empty type

comment 4y ago · link · parent

You could try adguard (android version), but it is paid.

And the biggest problem is most of sites are already upgraded to https, it needs MITM attack, but lots of applications won't accept any user certificate... (so adguard needs be installed to let those apps bypass its proxy, that's mean, you cannot just host a central proxy server to filter all ssl traffic)

comment 4y ago · link · parent

BTW, the GitHub mobile app rendering them correctly (since it doesn't use html)

comment 4y ago · link · parent

Tested on: Steam (search box), Apple (icloud), Minecraft (both server and client, just type PoC in chat box) (Tip: use dnslog to test(no payload), so it should not cause any problems)

11.

Apache Log4j2 Jndi RCE(twitter.com ↗)

16 points · by CodeHz · 4y ago · 3 comments

comment 5y ago · link · parent

It's not perfect, since the scrollbar is keep while while the content has dark background... maybe you need a <meta name="color-scheme" content="light dark" />

comment 5y ago · link · parent

at least the oldest icons are still exists in modern win 10, yes, even after ms decided to update some icons to fit new "Fluent Design" https://imgur.com/a/6T31ziE (from latest insider build

comment 5y ago · link · parent

You can achieve it without CSS actually (in chrome) Just put <meta name="color-scheme" content="light dark"> to <head> It will also make vanilla scrollbar into dark theme

comment 5y ago · link · parent

根据相关法律政策,该内容无法显示 is "According to relevant laws and policies, the content cannot be displayed" So they just consered content in source code level

comment 5y ago · link · parent

The readme.md has been blocked, translation for 根据相关法律政策,该内容无法显示 is "According to relevant laws and policies, the content cannot be displayed". You can still get content by `git clone`, but you can never get it in web page (including https://gitee.com/gsls200808/chinese-opensource-mirror-site/...). By the way, unlinke github, you cannot do any useful things though the web interface without a verified account(even clone through git protocol has been limited to the verified account). This sounds like a very common thing in China, but it is incredible that censorship appears on open source platforms.

17.

Censorship of Gitee:the github alternative in China(gitee.com ↗)

2 points · by CodeHz · 5y ago · 3 comments

comment 5y ago · link · parent

It looks similar to nim's ARC/ORC gc approach... Just curious, have you ever compared them?

comment 6y ago · link · parent

I think we can achieve this through windows container(not docker, it won't support interactive GUI application), by using process isolation, most api have been implemented in container.dll(see the exported functions table!), but it is undocumented... There's some demos that using this API https://github.com/microsoft/BuildXL/blob/master/Public/Src/...

20.

Hterm vs. Xterm.js in 2020(codehz.github.io ↗)

1 points · by CodeHz · 6y ago · discuss

comment 7y ago · link · parent

it happened in my system in last boot, dmesg says dbus-daemon tried (twice!) to read urandom before its seeded, and the next message (same second, about 200ms) is about urandom has been seeded, it is a race condition!