Live data from Hacker News

`curl wttr.in`: Weather in your terminal

github.com

61–70 of 147 posts

Re: `curl wttr.in`: Weather in your terminal

#61
post #43

Only HN can be so critical of what is a really cool project. Honestly this is a great _simple_ way to access weather without leaving my terminal. Love the basic ASCII graphics. I noticed it's a LOT faster when I provide the city, probably because it doesn't have to look it up from IP: ``` curl wttr.in/atlanta ``` Nice work.

It's just cool but practically I never check weather until I'm about to leave home and then I'll just check a local weather app on my phone which should give more accurate and detailed info than a service that covers the entire world with presumably varying degree of accuracy.

but imagine if you're in a bunker hacking on your fav project, no artificial light and you wonder.. shall i go to the surface? you curl this website and, if tolerable weather conditions, you plan your ascent.

Re: `curl wttr.in`: Weather in your terminal

#62

More cool console services like this one: https://github.com/chubin/awesome-console-services curl wttr.in/Moon Shows moon phases curl rate.sx Shows cryptocurrency exchange rates, from the same author as wttr.in I sourced the above commands from a previous HN post: https://news.ycombinator.com/item?id=23646953

rate.sx is very good. much better than all of the desktop client trackers out there and the web ones with too much granularity. sometimes i don't want to see the candles i just want to see the price of a particular coin

Re: `curl wttr.in`: Weather in your terminal

#63
post #15

Remember with this kind of thing you're trusting the remote site with access to your terminal emulator. There have been various security problems with some more advanced terminals and escape sequences in the past[1][2]. Personally I think it's a cute thing and have implemented some similar little easter eggs to this via: curl ip.wtf/moo [1]: https://blog.mozilla.org/security/2019/10/09/iterm2-critical... [2]: https:/…

Is curl unsafe? This is a pretty basic invocation of curl, no fancy flags needed.

Re: `curl wttr.in`: Weather in your terminal

#64
post #57
post #23

Earlier quoted context omitted.

I'm speechless. I never expected running curl could lead to such a security disaster.

The terminal (or rather terminal emulation) is a mistake, people should stop glorifying it. It has no inherent value, beyond being able to run historical software that was bound to a terminal. Most of all one should stop confusing the terminal and the shell, which remains an interesting concept.

Then where should the shell be run?

Re: `curl wttr.in`: Weather in your terminal

#65
post #15

Remember with this kind of thing you're trusting the remote site with access to your terminal emulator. There have been various security problems with some more advanced terminals and escape sequences in the past[1][2]. Personally I think it's a cute thing and have implemented some similar little easter eggs to this via: curl ip.wtf/moo [1]: https://blog.mozilla.org/security/2019/10/09/iterm2-critical... [2]: https:/…

which begs the quotation: is there such a thing as a “firewall” for terminals? my idea is to limit the terminal’s cpu usage so that any breach does not spread quickly in the system, and maybe limit the terminal’s network access, but leave the shell out of it. idk if the last part is possible.

ObLogicalFallaciesNit: It raises the question.

Begging the question is to answer the question with a premise that assumes the result. It's a form of circular reasoning.

https://www.thoughtco.com/what-is-begging-the-question-falla...

https://www.writersdigest.com/write-better-fiction/begging-t...

And to be clear, your question is a good one. It's just that it's raised and not begged. That said, I see and hear this all the time, including by historians of philosophy who are strongly familiar with logical fallacies and their distinctions.

Re: `curl wttr.in`: Weather in your terminal

#66
post #43

Earlier quoted context omitted.

It's just cool but practically I never check weather until I'm about to leave home and then I'll just check a local weather app on my phone which should give more accurate and detailed info than a service that covers the entire world with presumably varying degree of accuracy.

but imagine if you're in a bunker hacking on your fav project, no artificial light and you wonder.. shall i go to the surface? you curl this website and, if tolerable weather conditions, you plan your ascent.

There isno weather app which gives you the status of nuclear downfall.

Re: `curl wttr.in`: Weather in your terminal

#67
post #42

In the USA, I like the National Weather Service direct APIs. I wish I could get more granular forecast data, both in time and space, but they forecast dewpoint/humidity, which is really nice.

Any links on that?

I wrote a set of scripts --- it takes thee, a bash function, sed, and awk --- to parse the dumped formatted HTML to a more usable form on a terminal.

Raw APIs might be more convenient / less complicated.

Re: `curl wttr.in`: Weather in your terminal

#68
post #57
post #23

Earlier quoted context omitted.

I'm speechless. I never expected running curl could lead to such a security disaster.

The terminal (or rather terminal emulation) is a mistake, people should stop glorifying it. It has no inherent value, beyond being able to run historical software that was bound to a terminal. Most of all one should stop confusing the terminal and the shell, which remains an interesting concept.

Hard disagree, it has a lot of value and there's a reason it still exists and lots of tooling is still developed for running in terminals and shells, sometimes as exclusive target.

Problems with untrusted, unknown input from any source affects *all* software that process it, internet browsers, document editors, archive extractors, even just opening a file can do lots of funky stuff depending on the file system.

Re: `curl wttr.in`: Weather in your terminal

#69
post #15

Remember with this kind of thing you're trusting the remote site with access to your terminal emulator. There have been various security problems with some more advanced terminals and escape sequences in the past[1][2]. Personally I think it's a cute thing and have implemented some similar little easter eggs to this via: curl ip.wtf/moo [1]: https://blog.mozilla.org/security/2019/10/09/iterm2-critical... [2]: https:/…

Is curl unsafe? This is a pretty basic invocation of curl, no fancy flags needed.

No it isn't, or it's at least not the problematic part. curl is just the messenger, and on outputting things to a terminal you can use escape codes, and other things, to do some funky stuff like changing colors or making text blink.

If the terminal has a bug w.r.t. something it processes one could leverage that, but they'd probably need to know which terminal and maybe even which shell you're using; so maybe don't let curl/wget but also `cat` of a downloaded file output directly to the terminal if it isn't a trusted origin or if it looks/feels shady.

Re: `curl wttr.in`: Weather in your terminal

#70
post #15

Remember with this kind of thing you're trusting the remote site with access to your terminal emulator. There have been various security problems with some more advanced terminals and escape sequences in the past[1][2]. Personally I think it's a cute thing and have implemented some similar little easter eggs to this via: curl ip.wtf/moo [1]: https://blog.mozilla.org/security/2019/10/09/iterm2-critical... [2]: https:/…

This is true of anything that ever renders to your terminal. I'm not sure this class of issue is worth worrying about, generally. Sure, these are neat and scary examples. Have you seen some of the recent GPU driver ACEs? Better not render any graphics! A generalization of this is "receiving information from third parties can lead to security issues" which is of course true. Untrusted inputs are always untrusted. Pipi…

Completely agree, but also I remember that 'piping curl into bash' was always one of the biggest no-no's. I held onto this for so long, but then realized every time I run 'npm i' arbitrary commands can also run, and now it seems wild that I ever cared about curl | bash on websites that I trust
Post reply on HN