Live data from Hacker News

Be careful what you copy: Invisibly inserting usernames into text

medium.com

41–50 of 200 posts

Re: Be careful what you copy: Invisibly inserting usernames into text

#41

const zeroPad = num => ‘00000000’.slice(String(num).length) + num; What a bad way to declare a function. Starting with the word 'function' will make the code much more readable. Arrow functions are supposed to be used as a small callbacks, not to obfuscate the meaning of the code.

I was more confused by the parameter being named 'num' before having the String function called on it and its length taken - when in fact 'num' should be a binary string when it's passed into the function. But maybe I've been spoiled by strong types.

Re: Be careful what you copy: Invisibly inserting usernames into text

#42

Unicode should not have invisible characters.

Then how would you indicate that a space or newline is intended? Or how would I indicate that a length of text is to be displayed from right to left when I post Hebrew text to an English-expecting text field?

Emoticons

Re: Be careful what you copy: Invisibly inserting usernames into text

#43
post #12

Where can I find a full list of zero-width characters?

It looks like there are just four: https://en.wikipedia.org/wiki/Zero_width

Not that the zero-width characters are not the only characters that one is unlikely to notice. I regularly use the RLE, LRE, and other non-printing characters [1] in my text.

[1] http://dotancohen.com/howto/rtl_right_to_left.html

Re: Be careful what you copy: Invisibly inserting usernames into text

#45

Zero-width characters are invisible, `non-printing' characters that are not displayed by the majority of applications. F*or exam*ple, I've ins*erted 10 ze*ro-width spa*ces in*to thi*s sentence, c*an you tel**l? (Hint: paste the sentence into Diff Checker to see the locations of the characters!). These characters can be used to `fingerprint' text for certain users. Above is what paragraph looks like in text-only brows…

Links 2.8 " rel="nofollow">http://links.twibright.com/> also shows the non-printing characters as big black asterisks. But Emacs doesn't show them in text-mode, have to switch to hexl-mode.

Re: Be careful what you copy: Invisibly inserting usernames into text

#46

const zeroPad = num => ‘00000000’.slice(String(num).length) + num; What a bad way to declare a function. Starting with the word 'function' will make the code much more readable. Arrow functions are supposed to be used as a small callbacks, not to obfuscate the meaning of the code.

function keyword carries a lot of stuff: this variable, arguments variable, function name can be accidentally changed later. constant lambda is easier to understand.

Re: Be careful what you copy: Invisibly inserting usernames into text

#47
My favorite use of invisible characters was to enable spoilers in Facebook without littering the post with garbage.

First line explains it's a spoiler and for what, hundreds of invisible characters, actual spoiler.

That way FB would just show the first line followed by "read more"

Re: Be careful what you copy: Invisibly inserting usernames into text

#50
post #28

Earlier quoted context omitted.

How do you synthetically alter the frequencies of letters?

The easiest is again to do synonym/word/punctuation replacement but with the intent of altering the letter frequency instead of embedding information directly. It's effectively a compression scheme built on-top of synonym replacement using "extra" available information to pack more bits in less words. This means even sentence long quotes in summary form are enough to compromise someone.

It sounds to me that it would be blatantly obvious that a human didn't write whatever result that may produce.

And I don't quite get how you can encode that much information in a sentence without it being completely garbled.

Post reply on HN