Exceeding the posted speed limit is also illegal, and few care. What's important is the consequence for getting caught. Provided you haven't angered the flight attendant, he'll politely ask you to stop.
Source: I found zero reports of someone getting in trouble for this. Just requests to cease.
It's perfectly legal to bring these on your carry on. I see plenty of passengers order cokes and pour in their own whisky from their bag. It's common. The duty free in the airport even sells you these bottles.
So is punching flight attendants. It didn't stop them in this instance.