TriLinder

joined 1 year ago
[–] [email protected] 1 points 10 months ago (1 children)

Oh, how did I not notice that before? Now should be fixed.

[–] [email protected] 2 points 10 months ago

It's just a simple Flask server. I parse the user-agent using the user_agents Python library, apply some conditionals upon the result, render the image using Pillow and send it to the user.

[–] [email protected] 2 points 10 months ago

Looks like your home instance hexbear.net is filtering external images.

[–] [email protected] 3 points 10 months ago

Cool, didn't know some Lemmy instances did this

[–] [email protected] 2 points 10 months ago

That's weird. The extension should definitely work with the image, as that's what I used when building this quick demo. Does the content of a site like this update?

[–] [email protected] 2 points 10 months ago

Thought about adding the user's location, but was worried PythonAnywhere could somehow cache the image between multiple people.

[–] [email protected] 1 points 10 months ago

Yeah, I just use whatever the user_agents Python library gives me as user_agent.os.family.

[–] [email protected] 4 points 10 months ago (1 children)

You could also send the image through a DM if you want to find a particular user

[–] [email protected] 3 points 10 months ago (1 children)

The user-agent detection definitely isn’t great. If it doesn't recognize a client, it just says unknown. But that wasn't the main point of the post anyway, this was just meant as a quick proof of concept for anyone curious.

[–] [email protected] 7 points 10 months ago (1 children)

The user-agent detection definitely isn't great, this was just meant as a quick proof of concept for anyone curios.

[–] [email protected] 4 points 10 months ago* (last edited 10 months ago)

Thought about adding the user's location, but was worried PythonAnywhere could somehow cache the image between multiple people. A great demo though!

[–] [email protected] 193 points 10 months ago (23 children)

This is possible because Lemmy doesn't proxy external images but instead loads them directly. While not all that bad, this could be used for Spy pixels by nefarious posters and commenters.

Note, that the only thing that I willingly log is the "hit count" visible in the image, and I have no intention to misuse the data.

 

An external image showing your user-agent and the total "hit count"

 

An external image showing your user-agent and the total "hit count"

view more: next ›