News for hackers. Stuff that matters.
Re:Stopping phishing campaigns with Bash by b0re on Thursday August 13, 2020 @05:36AM (#24141501)
noob question: what does an \ at the end of a bash script do? Is it the same as ; ?
Re:Stopping phishing campaigns with Bash by oddeyed on Thursday August 13, 2020 @05:42AM (#24141532)
The opposite. ; is the same as a newline. Prepending the newline with a backslash \ is like saying "pretend this newline isn't here". So all of the -H arguments get applied to the same command in the example, rather than being treated as commands in their own right.
Re:Stopping phishing campaigns with Bash by newswasboring on Thursday August 13, 2020 @09:57AM (#24143367)
Oh... I am having one of those moments where I feel like everyone else but me knew this and I'm a dummy. But when put like this, I realize \ here is an escape character thing, making the newline into \\n.
Re:Stopping phishing campaigns with Bash by jtylr on Thursday August 13, 2020 @05:38AM (#24141511)
The end of a bash script or a line?

If it's at the end of the line it's just signifying that the line continues underneath and to run that block as "one line". It's just escaping the newline character.

Re:Stopping phishing campaigns with Bash by liuyong on Thursday August 13, 2020 @06:50AM (#24141930)
In bash '\' would escape the character behind it. In this case, newline was escaped, which means you could ignore the newline character and treat those lines as one line.