15 Comments
User's avatar
Alex's avatar
Apr 26Edited

Why even bother with a local file?

LD_PRELOAD=./remote_includes.so gcc https://example.com/software.c && ./a.out

Using a compiled language makes it so much faster than curl | sh.

Tanveer Salim's avatar

How did you make this? Were you inspired by Golang's downloadable modules? There are risks to this--careless people can now download dangerous modules onto their computer. Of course that has been a problem since people can talk to each other on the Internet anyway so that's nothing new.

Michael's avatar

In this age of AI we should really be able to use an AI prompt to find the include instead of looking up some bit rotting web link for this. So why not improve this with support for: #include <"chatgpt://i need some leftpad include find one!">

Jörg Plate's avatar

the best post i read this year

Manuel Capel's avatar

coredump.cx, what could possibly go wrong? 😄

Adam Kłobukowski's avatar

Where is the mandatory github link? :P

Ritesh's avatar

I can’t believe we’re finally seeing some true innovation in LD_PRELOAD hijinks. Not to look a gift horse in the mouth but does macos allow you to load .so/whateverlib files that are outside of their SIP blessed paths?

jpa's avatar

This is so useful! I have added that LD_PRELOAD setting to my .bash_profile and now all my programs are web-enabled.

Hariharan Iyer's avatar

A long time back, I worked on a C++ project where we needed to download api definitions in xml and generate c++ code for them. Since we were already using cmake to build, I used the download step in cmake to do this. I suppose it could be used for something like this too.

Noah Fect's avatar

Finally, a use for the new Firefox feature: https://i.imgur.com/p9UwuCv.png

Ben Hekster's avatar

I’m overcome by intrusive thoughts to try it

What’s the worst that could happen?

Trebuchette's avatar

Only one way to find out!

lcamtuf's avatar

I don't know, but I had about a hundred downloads by what I assume are LLM scrapers, so this is probably coming soon to software near you.

Samantha's avatar

At least one is by a real person I share a discord with, who appreciates SKILL.md