@e_nomem@hachyderm.io avatar

e_nomem

@e_nomem@hachyderm.io

Professional software dev, semi-professional infra nut, hobbyist in infosec and cryptography, amateur human being. I tend to have ideas and then not write them down.

1/N of the Hachyderm Infra Crew

This profile is from a federated server and may be incomplete. Browse more on the original instance.

cstross, to random
@cstross@wandering.shop avatar

Welp, I knew Microsoft's CoPilot+ Recall was going to be a privacy disaster but I didn't expect it to turn into an enterprise computing catastrophe for Microsoft quite this fast!

But this can't be a one-off. Any large enterprise that has to comply with a regulated privacy environment—HIPAA in the USA, GDPR in the EU, banking/insurance/finance globally—must be considering a ban on Microsoft installations on laptop/desktop computers right now or be breaking the law.

https://infosec.exchange/@SecurityWriter/112558224281615019

e_nomem,
@e_nomem@hachyderm.io avatar

@rivetgeek @cstross I'm fairly certain that it has already been enabled on, and tested with, non-NPU systems

nedbat, to python
@nedbat@hachyderm.io avatar

Are you sure you know how #Python decorators work? This should be no problem! 😈 🤯 🤓

e_nomem,
@e_nomem@hachyderm.io avatar

@nedbat It took me a moment to remember that the execution happens at load but yeah, you can do some pretty bonkers stuff with decorators.

thisismissem, to random
@thisismissem@hachyderm.io avatar

Most annoying keys to break on your keyboard? cmd and 0 / ) because it really messes up coding.

e_nomem,
@e_nomem@hachyderm.io avatar

@thisismissem I once damaged the R and E keys which sucked when you had to type let, var, def, for, etc.

It also didn't help that I worked in code that had me typing words like referral, referee, and referrer all day long.

thisismissem, to random
@thisismissem@hachyderm.io avatar

Why would google be sending emails on behalf of my domain without SPF or DKIM alignment?

e_nomem,
@e_nomem@hachyderm.io avatar

@thisismissem I don't have an answer to your question but what did you use to generate that DMARC report?

danderson, to random
@danderson@hachyderm.io avatar

Turns out, I can still enter a fugue state and rant about BGP, I just need a prompt that starts with "can terrible thing X happen? Where would the packets go?"

It is impossible to know and a sin to ask

e_nomem,
@e_nomem@hachyderm.io avatar

@danderson networks are a nightmare like that. I once spent a week debugging a vanishing packet where the sending system marked it as sent, but the receiving system on the same L2 network never saw it. Turned out to be a bug in the sending systems network stack when a packet was sent in the middle of an ARP refresh.

mcc, to random
@mcc@mastodon.social avatar

Every time I use certbot I forget how it was I used it last time. If the HTTP challenge for a server returns a self-signed certificate, will certbot accept that?

e_nomem,
@e_nomem@hachyderm.io avatar

@mcc can't speak for all CAs, but Let's Encrypt does not validate the server certificate during the HTTP-01 challenge

danderson, to random
@danderson@hachyderm.io avatar

Tax season sucks, and I'm holding off the impinging Darkness by fantasizing about holding Razzies but for financial institutions. Categories so far:

Worst audio codec used in a phone call

Most inventively awful way to browse statements

Highest response time to every click

Shortest fuse on For Your Safety logout timers

Most confusing refusal to yield relevant information

Best collection of all consonant acronyms that are one letter different to each other

e_nomem,
@e_nomem@hachyderm.io avatar

@danderson I feel like Indian banks would win every category.

e_nomem,
@e_nomem@hachyderm.io avatar

@danderson wow, true innovation right there.

danderson, (edited ) to random
@danderson@hachyderm.io avatar

Okay rust has confused me and I need help: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=ad23ba5c6511f1bdd40515efefcb9193

I have two fns set_deep_val1 and set_deep_val2. The first works fine, the second angers the borrow checker. By my current understanding of borrows, either both should work or both should fail. What am I missing?

Help?

EDIT: answer is at https://hachyderm.io/@danderson/112233659311769059

e_nomem,
@e_nomem@hachyderm.io avatar

@danderson I recall running into this myself and not fully understanding it until I read https://fasterthanli.me/articles/a-rust-match-made-in-hell#what-the-fuck-is-happening

danderson, to random
@danderson@hachyderm.io avatar

Hmm, annoying: struct initialization turns out to be hard for unfortunate reasons.

My struct has an array of Option<Foo>, and I want to initialize it to all None.

But ents: [None; 512] doesn't compile, because the spec says that the initializer value must implement Copy, and my Foo does not (and must not) implement Copy.

Even though None is a trivially replicable value, the type system isn't expressive enough to say "this arm of an enum doesn't require a Copy bound to implement Copy".

e_nomem,
@e_nomem@hachyderm.io avatar
e_nomem,
@e_nomem@hachyderm.io avatar

@danderson Ah, yes. The different initializer for each generic type because Option::&lt;A&gt;::None != Option::&lt;B&gt;::None 😆

e_nomem,
@e_nomem@hachyderm.io avatar

@danderson Yeah, I'm hardly an expert myself and it's fun poking at some of the internals.

I generally end up getting myself in trouble when I start attempting to erase generic types.

danderson, to random
@danderson@hachyderm.io avatar

Hmm, tailscale.com/net/art was reasonably fun to implement in Go, and more control over memory layout plus more aggressive optimization could actually make it interesting to write in rust and compare... Does rust stdlib have IP and prefix types that are any good?...

e_nomem,
@e_nomem@hachyderm.io avatar

@danderson What raw bits are you trying to get? Or did you mean the literal bits of the network address?

e_nomem,
@e_nomem@hachyderm.io avatar

@danderson So if you can do the following:

let network: Ipv4Net = ...;  
let bits: [u8; 4] = network  
 trunc() // Assuming that the host bits are set, clear them  
 .addr()  
 .octets();  

.

e_nomem,
@e_nomem@hachyderm.io avatar
e_nomem,
@e_nomem@hachyderm.io avatar

@danderson If you want to work on both v4 and v6 networks, it's pretty similar but you'll need a match statement at the end to deal with the differing address sizes.

let network: IpNet = ...;  
let addr: IpAddr = network  
 .trunc()  
 .addr();  
let bits: Vec&lt;u8&gt; = match addr {  
 IpAddr::V4(addr) =&gt; addr.octets().to_vec(),  
 IpAddr::V6(addr) =&gt; addr.octets().to_vec(),  
};  
e_nomem,
@e_nomem@hachyderm.io avatar

@danderson Yeah, the enums carry the convenient APIs where the signature can be the same across all the variants but matching on the inner type is something you end up doing quite a bit to get at the full functionality.

e_nomem, to amateurradio
@e_nomem@hachyderm.io avatar

I've had my general ham license in the US for a while but living in an apartment/lacking an HF transceiver means that I really haven't done much with it yet. Any recommendations on low footprint HF setup to get started?

anderseknert, to random
@anderseknert@hachyderm.io avatar

Apps that will only present the challenge upon a successful password — isn’t there a very good point in always providing both, as to not give any hints on whether the first factor credentials were correct or not?

e_nomem,
@e_nomem@hachyderm.io avatar

@anderseknert this idea only works with second factors that don't leak personal info (e.g. asking which email or phone to send the code to), but I honestly think that asking for TOTP before password is a good thing. Failing TOTP doesn't leak any info and the request can be rate limited

e_nomem,
@e_nomem@hachyderm.io avatar

@anderseknert I'm guessing that caveat about not leaking personal info during the second factor verification is the reason you wouldn't want to proceed with 2FA if the password didn't match through

e_nomem,
@e_nomem@hachyderm.io avatar

@anderseknert True 100% agree. That's just not how I've generally seen it implemented though. Also I haven't sat down and properly thought through the UX of using device names instead of something like phone number or email address fragments.

e_nomem, to random
@e_nomem@hachyderm.io avatar

@danderson Random Q. I read a thread some time ago talking about bootstraping a compiler toolchain starting from a small hex blob and I'm having trouble finding it. Was it you that posted about it?

e_nomem,
@e_nomem@hachyderm.io avatar

@danderson That was definitely part of it, yes, but I was thinking specifically about https://hachyderm.io/@danderson/111360381599777499

Thank you!

hazelweakly, to random
@hazelweakly@hachyderm.io avatar

Writing me the good code todayyy

Set all variables to their known defaults if they aren't already set

set_if_unset() {
key=$1
current_value="${!key}"
array_value="${base_variable_defaults["$key"]-${derived_variable_defaults["$key"]}}"
if [[ $current_value =~ "WARNING: UNSET" ]]; then
printf -v "$key" -- "$array_value"
fi
}

e_nomem,
@e_nomem@hachyderm.io avatar

@hazelweakly Reminds me of when I wrote bash functions that took an array as an input argument...

myarray=(some stuff here)

array_as_arg() {  
 arrayname="$1[@]"  
 input_array=( "${!arrayname}" )

 echo "${input_array[@]}"  
}

array_as_arg myarray  
hacks4pancakes, to random

deleted_by_author

  • Loading...
  • e_nomem,
    @e_nomem@hachyderm.io avatar

    @hazelweakly Hey y'all, this is a reminder that 40 year olds party and dance. Stop complaining.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • megavids
  • GTA5RPClips
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • provamag3
  • Leos
  • cisconetworking
  • lostlight
  • All magazines