Pricefield | Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Ignacio to [email protected] • 2 years ago

The only cheat sheet you need

cheat.sh

message-square
19
fedilink
121
external-link

The only cheat sheet you need

cheat.sh

Ignacio to [email protected] • 2 years ago
message-square
19
fedilink
alert-triangle
You must log in or register to comment.
  • @[email protected]
    link
    fedilink
    6•2 years ago

    Appears to be the same developer as wttr.in

  • Arthur BesseM
    link
    fedilink
    8•
    edit-2
    2 years ago

    sites like this are neat until you remember that curl’s willingness to write ansi escape codes to stdout when it is a tty (as this site relies on to format the output when the user agent is curl) is actually a security vulnerability.

    • @[email protected]
      link
      fedilink
      3•2 years ago

      I’m more-inclined to blame a virtual terminal than the program writing the sequences if there’s an exploit there.

      • Arthur BesseM
        link
        fedilink
        2•2 years ago

        Of course the terminal emulators are ultimately to blame but when there are so many problems in so many of them, imo curl’s default behavior should be to filter its output when writing to a tty.

        • @[email protected]
          link
          fedilink
          1•2 years ago

          is there a curl argument that can be used to block this behavior?

          • Arthur BesseM
            link
            fedilink
            1•2 years ago

            You can redirect curl’s output to a file with the -o filename option (or with > filename for shell redirection). But in the case of sites like this which output ansi-escape-formatted data that isn’t very useful.

            Also, after saving unknown data to a file it’s common to look at it with less or perhaps xxd or strings or file … all of which have had their own CVEs in recent years 🤦

            Computer security is a fractal of bad news.

    • @[email protected]
      link
      fedilink
      5•2 years ago

      Could you give me an ELI5 please

      • Arthur BesseM
        link
        fedilink
        1•
        edit-2
        2 years ago

        This post The Terminal Escapes: Engineering unexpected execution from command line interfaces has a summary of the longer paper in the first link.

        tldr: There are a variety of ways that attackers can cause you to execute execute arbitrary code when you echo their maliciously-crafted data to your terminal. Therefore, when you run curl without redirecting its output, or when you cat a file you’ve downloaded, you’re trusting the server (and also the network, when you don’t have https:// in the url) not to exploit you.

        • @[email protected]
          link
          fedilink
          2•2 years ago

          Ah ok that makes sense, thank you!

  • @[email protected]
    link
    fedilink
    43•2 years ago

    TL;DR

    sudo rm -rf /* # can't have problems without a system
    
    • @[email protected]
      link
      fedilink
      8•2 years ago

      Copy. Paste. Enter.

    • @[email protected]
      link
      fedilink
      2•2 years ago

      System administrators hate this trick!

  • @[email protected]
    link
    fedilink
    8•
    edit-2
    2 years ago
    cheat() {
      curl cht.sh/$1
    }
    
    • @[email protected]
      link
      fedilink
      2•2 years ago

      Awesome!

  • @[email protected]
    link
    fedilink
    23•2 years ago

    Ok, this is a very good cheat sheet

    • nelson
      link
      fedilink
      4•2 years ago

      I haven’t had as much luck with that program as I’d like to. :(

    • @[email protected]
      link
      fedilink
      8•2 years ago

      Thefuck is a cool program, but I stopped using it because it was slow.

    • @[email protected]
      link
      fedilink
      3•2 years ago

      My .bash_history using this program…

  • @[email protected]
    link
    fedilink
    1•2 years ago

    deleted by creator

  • @[email protected]
    link
    fedilink
    4•2 years ago

    IIRC this site uses TLDR pages

[email protected]

[email protected]
Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

  • 101 users / day
  • 663 users / week
  • 2.3K users / month
  • 5.85K users / 6 months
  • 3 subscribers
  • 7.54K Posts
  • 196K Comments
  • Modlog
  • mods:
  • @[email protected]
  • @[email protected]
  • @[email protected]
  • Arthur Besse
  • Cyclohexane
  • @[email protected]
  • UI: 0.18.4
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org