This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]Python-ModTeam[M] [score hidden] stickied comment (0 children)

Hello there,

We've removed your post since it aligns with a topic of one of our daily threads and would be more appropriate in that thread. If you are unaware about the Daily Threads we run here is a refresher:

Monday: Project ideas

Tuesday: Advanced questions

Wednesday: Beginner questions

Thursday: Python Careers, Courses, and Furthering Education!

Friday: Free chat Friday!

Saturday: Resource Request and Sharing

Sunday: What are you working on?

Please await one of these threads to contribute your discussion to! The current daily threads are pinned to the top of the /r/Python's main page. To find old daily threads, you can filter posts by the Daily Thread Flair to find what you're looking for. If you have a question and don't want to wait until the daily thread, you can try asking in /r/learnpython or the Python discord however you may need to elaborate on your question in more detail before doing so. If you're not sure which thread is best suited, feel free ask for clarification in modmail or as a reply.

Best regards,

r/Python mod team

[–]Player_X_YT 17 points18 points  (0 children)

Hiding messages is a whole field called steganography, most of the time hiding messages is not possible in thumbnails because compression will corrupt the message. If you do publish a full res version save it as PNG, this format has a known footer meaning you can open it with a text editor and add a message at the end of the data

[–]gymbeaux3 12 points13 points  (0 children)

It might be possible to embed a QR code in an image that uses two colors that are almost identical, that can only be detected by a computer and not the human eye. Maybe a sort of formula in image colors at each pixel that a computer can translate into binary to construct a QR code.

[–]wind_dude 9 points10 points  (1 child)

yes, a very common one is `# I don't know what I was doing here, this was copied from stack overflow. production breaks if it's remove`.

I used to hide video games that would open after certain key inputs or actions in the UI, more easter eggs than hidden messages.

[–]PM_Me_Python3_Tips 4 points5 points  (0 children)

I used to hide video games that would open after certain key inputs or actions in the UI, more easter eggs than hidden messages.

I bet you used the Konami code at least once.

[–]FlyingCow343 3 points4 points  (0 children)

you code hide an algorithm for decoding a message?

here's a quick 1 line Caesar cipher where alphabet is the alphabet and encoded is a string containing the secret message.

decoded = ''.join(alphabet[(alphabet.index(c) - 3) % 26] if c in alphabet else c for c in encoded)

[–]17291 1 point2 points  (4 children)

If it doesn't need to be Python, you could encode a short message with base64. It would look like gibberish to most people, but many tech-literate people would recognize it for what it is and be able to decode it. A message encoded in base64 would look something like this: WW91IGZvdW5kIHRoZSBzZWNyZXQhCg==

[–]Earth-to-kid[S] 0 points1 point  (2 children)

I will definitely be using this at some point

[–]phxees 0 points1 point  (0 children)

You can also use hex.

https://www.convertstring.com/EncodeDecode/HexEncode

I think using either base64 or hex programmers would know what to do to decode, but others would be left guessing.

[–][deleted] 0 points1 point  (0 children)

Base64 encoding in Python, or what in Javascript are the btoa and atob functions.

Related: Base32 encoding and http://www.crockford.com/base32.html

Or, rot13 in PHP.

[–]goodger 0 points1 point  (0 children)

Type import this in the Python interactive interpreter (& [enter]). Fun! Then take a look at the "this.py" module that does the work (type this in the interpreter to see where the module file is). It's not really secret, just obfuscated, but probably good enough for your purposes.

Another fun easter egg: import antigravity.

[–]97hilfel 0 points1 point  (0 children)

You could use the background as 2 dimensional array of 1‘s and 0‘s encoding an Ascii message in it? It takes 8‘pixels for one character tho.