• 0 Posts
  • 24 Comments
Joined 3 years ago
cake
Cake day: July 3rd, 2023

help-circle


  • For loops with find are evil for a lot of reasons, one of which is spaces:

    $ tree
    .
    ├── arent good with find loops
    │   ├── a
    │   └── innerdira
    │       └── docker-compose.yml
    └── dirs with spaces
        ├── b
        └── innerdirb
            └── docker-compose.yml
    
    3 directories, 2 files
    $ for y in $(find .); do echo $y; done
    .
    ./are
    t good with fi
    d loops
    ./are
    t good with fi
    d loops/i
    
    erdira
    ./are
    t good with fi
    d loops/i
    
    erdira/docker-compose.yml
    ./are
    t good with fi
    d loops/a
    ./dirs with spaces
    ./dirs with spaces/i
    
    erdirb
    ./dirs with spaces/i
    
    erdirb/docker-compose.yml
    ./dirs with spaces/b
    

    You can kinda fix that with IFS (this breaks if newlines are in the filename which would probably only happen in a malicious context):

    $ OIFS=$IFS
    $ IFS=$'\n'
    $ for y in $(find .); do echo "$y"; done
    .
    ./arent good with find loops
    ./arent good with find loops/innerdira
    ./arent good with find loops/innerdira/docker-compose.yml
    ./arent good with find loops/a
    ./dirs with spaces
    ./dirs with spaces/innerdirb
    ./dirs with spaces/innerdirb/docker-compose.yml
    ./dirs with spaces/b
    $ IFS=$OIFS
    

    But you can also use something like:

    find . -name 'docker-compose.yml' -printf '%h\0' | while read -r -d $'\0' dir; do
          ....
    done
    

    or in your case this could all be done from find alone:

    find . -name 'docker-compose.yml' -execdir ...
    

    -execdir in this case is basically replacing your cd $(dirname $y), which is also brittle when it comes to spaces and should be quoted: cd "$(dirname "$y")".


  • I don’t want to tell you one way or the other because it’s kinda dubious anyway, but if all services run as the same user the need for root is kinda moot when it comes to crossing between services or expanding the scope of an attack. Of course it is better than all things running as root, but if I popped a machine as some “low privilege” user that still had access to all running services I’m not sure I’d care so much about escalating to root.


  • Woah, no. Sure escaping via a kernel bug or some issue in the container runtime is unexpected, but I “escape” containers all the time in my job because of configuration issues, poorly considered bind mounts, or the “contained” service itself ends up being designed to manage some things outside of the container.

    Might be valid to not consider it with the services you run, but that reasoning is very wrong.




  • Nobody is gonna be using a quantum computer to “crack email hashes” of Plex users in a few years… I’m not even sure there is a speedup to hash cracking with quantum computers.

    But depending on the hashing algorithm used, it’s likely pretty easy to crack hashes of email addresses today with a normal computer. They’re not particularly high entropy.



  • Honestly I wouldn’t even go so far as home assistant. Do you have any IP cameras or just USB webcams? If you have IP cameras all you need is the VPN and then just access them as if you’re at home. If you only have USB webcams, you’re going to have to stream the content and I believe ffmpeg is actually capable of taking /dev/videoX and serving it over RTSP somehow, but I don’t remember exactly how. I see some references to it in some quick searches though. Maybe start here (some blog) or here (Stackoverflow question)?

    Another thing to remember is that you’re going to be limited by your upload speed. If you’re not on fiber and in the US that’s likely going to be pretty bad, so set your resolution and the like accordingly.


  • Sorry about your cat. We typically have a Rover stop in to check on our cats when we’re gone for a bit; it’s nice to get them some human interaction and they always send pictures and give updates.

    I personally have a camera setup inside that just streams to HomeAssistant so we can check on them ourselves when we’re out just for the weekend. I disconnect it when Rovers are stopping by though because I don’t want them to feel spied on. No need for anything fancy really, but if you really want NVR I just use Frigate (for other things, the cat camera really is just a stream). It’s free and open source and really easy to set up.

    WireGuard is a very easy way to set up the access. My router has just the single WireGuard UDP port forwarded





  • qqq@lemmy.worldtopolitics @lemmy.world•*Permanently Deleted*
    link
    fedilink
    arrow-up
    2
    arrow-down
    2
    ·
    edit-2
    2 years ago

    Her platform had plenty that progressives agree with! Progressives need to not act like toddlers when they don’t get everything they want; we’re only going to move to the left gradually. They need to stop asking everyone to treat them like the prettiest girl in school and instead start understanding that politics isn’t all or nothing. We almost got Bernie, gradually. We could have potentially gotten someone like him if we didn’t let Trump catapult US politics so far right in just 8 years. (Yes I know the the Republicans have been moving in this direction since Reagan, but the acceleration in the past decade is crazy)

    I don’t buy that any progressives looked at both platforms and avoided voting in good faith. That’s absolutely ridiculous. It makes no logical sense at all. Anyone who did that is simply not progressive. That’s not a no true Scotsman argument either; it’s just bananas that anyone who agrees with progressive ideas would let Trump win.

    Think about what you’re saying. If a politician doesn’t bend over backwards for progressives we should let fascism win? What the fuck? People love saying Republicans are voting against their own interests. Well, progressives who don’t vote are also voting against their own interests by abstaining.


  • qqq@lemmy.worldtopolitics @lemmy.world•*Permanently Deleted*
    link
    fedilink
    arrow-up
    1
    arrow-down
    4
    ·
    edit-2
    2 years ago

    Harris shouldn’t have needed to reach out to progressives. We have two parties in the US. We have one vote only. Progressives had a choice to say “let’s let Trump win and move the country significantly further right” or “I like most of Harris’s policies and something is better than nothing”. The choice for progressives was crystal clear. Let’s not pretend otherwise. The progressives that didn’t vote let everyone down, including themselves. Their argument is completely invalid when you look at the real world in front of us.

    If anyone calls themself a progressive and didn’t vote in this election, I have news for them: you’re not a progressive.


  • qqq@lemmy.worldtopolitics @lemmy.world•*Permanently Deleted*
    link
    fedilink
    arrow-up
    9
    arrow-down
    5
    ·
    edit-2
    2 years ago

    Where is build the wall and prosecute immigrants in her platform?

    Associating with the Cheneys was a terrible move; I agree.

    Look at her platform, there is plenty of economic change proposed. The president also has a small effect on the economy, usually at least. Trump wants to shock it with tariffs.

    Actually look at her platform because you’re wrong about almost everything in this comment. People, and bots, on social media perpetuated the claims your making on social media, not the platform.


  • qqq@lemmy.worldtopolitics @lemmy.world•*Permanently Deleted*
    link
    fedilink
    arrow-up
    9
    arrow-down
    2
    ·
    edit-2
    2 years ago

    Better than Trump wasn’t her platform. I will die on this hill because I’m so sick of this. Look at her platform. What is too far right about her platform? Tell me specifically.

    No her platform and campaign weren’t the biggest problem. The way you’re talking and everyone is parroting that was. The “everything or nothing” people were. The left sows its own apathy.

    And, regardless of all of that, regardless of the fact that her platform was actually good, the idea that you only get to look at her platform in a vacuum is a complete joke. The idealism of the left is fucking us all. This isn’t a theoretical exercise. You realize Trump wants to pull out of NATO? That the right wants to outlaw life saving medical procedures? You realize real people are going to actually, without hyperbole, die because of this election?

    We’re in a fight against a Christian fascist state right now. Miss me with this bullshit. I would have been 100% motivated to vote for a turkey sandwich. This is all such a joke and this narrative is infuriating. The left is constantly acting like a bunch of toddlers kicking and screaming because they got the wrong ice cream flavor while the right marches towards the end of everything I thought we believed in.


  • qqq@lemmy.worldtopolitics @lemmy.world•*Permanently Deleted*
    link
    fedilink
    arrow-up
    18
    arrow-down
    2
    ·
    2 years ago

    No. https://kamalaharris.com/issues/ this is not too far right. People need to stop just listening to sound bites and talking points. All of the socialist voters think we’re going to just randomly have a socialist state one presidential cycle? Come on. I don’t buy it. The real fact here is that people who considered themselves unaffected by Trump couldn’t get off their high horse and try to help. You know what drags us more right? Trump winning and Republicans owning Congress.


  • qqq@lemmy.worldtopolitics @lemmy.world•*Permanently Deleted*
    link
    fedilink
    arrow-up
    35
    arrow-down
    3
    ·
    2 years ago

    I’m so sick of this; that wasn’t her platform. People constantly saying that was her platform stopped people from actually looking at her platform. I’m so sick of Dems that think they can just not vote because they don’t fall in love with their candidate. Politics is practical and the USA just shit the bed and it will have a real impact on the world. All of the Dems or left leaning people who didn’t vote are complicit.