HackerLangs
トップ新着トレンドコメント過去質問紹介求人

somat

5,609 カルマ登録 5 年前
Runs the outband public shell accounts at https://www.public.outband.net

投稿

Pfsync Packet Header Field Renamed to Avoid AI Bug Report Noise

undeadly.org
1 ポイント·投稿者 somat·3 か月前·0 コメント

コメント

somat
·7 時間前·議論
"But let’s look at what happens if an attacker discovers a blind SQL injection vulnerability anywhere else in the application.

The attacker doesn’t need to read the database or invert any hashes. An attacker can simply register a legitimate account and generate his own valid API key."

No they can't, The given scenario has not pushed the auth into the database at all. if your accounts are also database accounts why does the user have permission to create new accounts.

I have done this as an experiment, I was dreading building a comprehensive auth system and noticed that the barely used postgres internal auth system is very well fleshed out so just made every user be a database user. The application has little concept of auth at all, it just passes the user login into the database connection and all the auth (logins, what data the user can get, what data the user can write) is all done as database policy. It worked surprisingly well, I don't know if I would use it on a real system(whatever that means, pg logins probably do not scale) The idea still sort of makes my skin crawl, Nobody does it this way, I assume for a reason. But in theory it is fine.

I probably got the idea from the schemaverse game, where the whole game is internal to postgres, and the users are given direct select access.

https://github.com/Abstrct/Schemaverse
somat
·8 時間前·議論
I sort of wish we had went with base 12 instead of base 10 for our counting system.

Based on the number of base 12 systems it was a near thing. Don't get me wrong using base 12 units in a base 10 number world is several sorts of cursed. but if we had went with base 12 numbers and cleaned up some of the stupider unit variants into a SI I could see it working well.

And before someone brings up the 10 fingers thing, I don't buy it. One. we have 8 fingers. and Two. for the most part the people who actually needed to count(the shepherds counting their sheep) did it in base 12, thus why it was so common. The method as I understand it is to count on your finger bones using your thumb as a marker, this gets you to a dozen, then use the other hand to keep your twelves place to get to a gross. There is the normal off by one error when counting, but nobody wants base 13 so do the standard thing and ignore it.

But really it is just fun fantasy, There is nothing wrong with base 10 (but the lack of divisors sort of sucks) and the way effectively the whole world regardless of language uses the exact same arabic derived numbering system is pretty neat.
somat
·9 時間前·議論
Weeks are quarter months. Or are supposed to be. Months have been screwed up for a long time now.

I can imagine in prehistorical times keeping track of midrange time by the phase of the moon, if months were kept synced to the moon we would probably name weeks as such, waxing gibbous, waning crescent...

On the subject of keeping months in sync, I can imagine having a fun festival season around the weird 13th month(all months being 29.5 days long) that bisects the new year.
somat
·昨日·議論
I use NSD myself, but the man page sez an auth-zone directive could act like a self contained authoritive zone served from a file. the other way it can be used to to speed up the cache for the actual authoritive data.

https://man.openbsd.org/unbound.conf#AUTHORITY_ZONE_OPTIONS

"Authority zones are configured with auth-zone:, and each one must have a name. There can be multiple ones, by listing multiple auth-zone section clauses, each with a different name, pertaining to that part of the namespace. The authority zone with the name closest to the name looked up is used. Authority zones can be processed on two distinct, non-exclusive, configurable stages.

With for-downstream: yes (default), authority zones are processed after local-zones and before cache. When used in this manner, Unbound responds like an authority server with no further processing other than returning an answer from the zone contents. A notable example, in this case, is CNAME records which are returned verbatim to downstream clients without further resolution.

With for-upstream: yes (default), authority zones are processed after the cache lookup, just before going to the network to fetch information for recursion. When used in this manner they provide a local copy of an authority server that speeds up lookups for that data during resolving.

If both options are enabled (default), client queries for an authority zone are answered authoritatively from Unbound, while internal queries that require data from the authority zone consult the local zone data instead of going to the network.

An interesting configuration is for-downstream: no, for-upstream: yes that allows for hyperlocal behavior where both client and internal queries consult the local zone data while resolving. In this case, the aforementioned CNAME example will result in a thoroughly resolved answer.

Authority zones can be read from a zonefile. And can be kept updated via AXFR and IXFR. After update the zonefile is rewritten. The update mechanism uses the SOA timer values and performs SOA UDP queries to detect zone changes."
somat
·昨日·議論
It may also be telling to figure out why no startup is offering $400 ambulance rides and dominating on volume.
somat
·一昨日·議論
Unbound can do authoritative dns. It is a bit clunky so usually what you do is have NSD for the authoritative parts and unbound for the recursive parts. but unbound has local-zone: stub-zone: forward-zone: auth-zone: directives. I am not the most sophisticated dns admin but I am fairly sure that just unbound by itself can do almost any dns party trick you care to throw at it.
somat
·一昨日·議論
And as a counter example here you have openbsd "we are going to install a bgp daemon on every single device, because you never know when you may need one"

I am not complaining, I like the feeling that I could single handedly rebuild the internet using only what is found in an openbsd base install. But wow, considering the size there is a lot in there. They definitely punch above their weight.
somat
·一昨日·議論
That does not match my experience with obsd. It is not so much minimalism as they are not afraid to reinvent the wheel. A obsd install is full of services, more than most linux installs I have seen.

For example you can imagine my disappointment when I discovered what a pain in the ass it is to get a pflow producer working on linux after doing the first one on openbsd.
somat
·3 日前·議論
Has anyone ever made a monospace font with dynamic kerning? Which is a silly thing I never thought of until I read the above comment. This sounds nonsensical at first glance(and it may be) but hear me out.

We use monospace fonts for a reason, they stack in a grid nicely. But within the confines of that grid there is room to shift a character left or right a bit which may lead to a nicer to read monospace. (it is equally likely to lead to a hideous mess, every time a letter would shift left it would leave a larger space right)
somat
·3 日前·議論
In the devils advocate position. The union is a club you join with dues paid every month, in the sort of vague hope this will get you greater bargaining power with the employer. And it mostly works but there are downsides. If there is any meritocracy left in the corporation it is sucked out, replaced by seniority, that is, the only people that get ahead are those too stupid to leave. You have to maintain a bunch of useless leeches in the union administration. and when the company does poorly it tends to implode violently under the labor burden rather than be able to scale down. (everybody loses their job rather than just a few)
somat
·4 日前·議論
Did WRT mean anything? Wireless RouTer?
somat
·5 日前·議論
But why?? We have had rocket powered anti-aircraft interceptor drones that go at mach 3 since 1955.
somat
·5 日前·議論
It is sort of the same for DOS. When you start digging around in the source you realize it is only really half an operating system and a surprising amount is done in the BIOS.
somat
·5 日前·議論
With regards to the user agent matching it reminds me of the time I loaded the full useragent database(the same data php get_browser() uses) into postgres and landed my first 3+ hour query.

  from log join ua_data on log.useragent ~ ua_data.match_exp
It was intractable to indexing (gin can almost do it. using like instead of ~ but gin only works on pure prefix or suffix matches) so I moved on to better things.
somat
·8 日前·議論
Generated content has a real duality to it. I would describe it as It feels great to use. It feels terrible to have it used on you.

Very few people appear happy to receive generated content. It is fun to make however.

We as a society will probably figure this out(and look back fondly on the days of real handcrafted artisanal writing) but for now there is a lot of tension between the two sides.

I know I loose all interest in a thing when I learn it is generated.
somat
·9 日前·議論
Is that not the same with anything published to the internet. For example I could keep your comment published and available for as long as I had interest in doing so despite any effort you may take to remove it from HN. I mean I guess tech like ipfs and bittorrent try to automate this process(keeping something on the internet as long as there is interest) but you let something out on the internet it could stay there a long while. Or it could go poof and disappear, it depends on how much interest there is in the subject.
somat
·11 日前·議論
In windows the shadow copy facility is used to sneak files around when they are open. I remember using a utility called "hobocopy" (a sort of pun on the more famous robocopy) that provided a command line user interface around shadow copy to let you move locked files.

In my specific case it was to save youtube videos when it was still a flash player. the video would be cached in a file but that file would be inaccessible because it was "open" hobocopy to the rescue. On linux it would make then delete the file depending on the open file descriptor to keep it around. The way to save it was to relink another name onto the inode. I can't quite remember but on linux I think you could use a /proc entry to get that inode and on obsd I would use fstat to find it and fsdb to make the relink.

As a unix aficionado I despise windows open file locking with a passion. Sure I understand it is probably more correct, An open file could be in any sort of corrupted state the only safe thing to do is default to single access and locking. But it is far more respectful to the user to just let them grab it whenever they want to. corruption be dammed.
somat
·11 日前·議論
Javascript does have structs, it calls them objects.

If I parsed an emailAddress the thing that came out it would look like {'domain':'example.com', 'user':'john-doe'} or emailaddr.domain emailaddr.user and a emailaddr.address method if you like that form. Even if what I parsed ended up as a single string-like field, I would still name that field. emailaddr.address

Salutes for the bit on hiding the constructor, that makes a lot of sense.

It probably does not help anything that in my one attempt at making a javascript web application I did not bother trying to understand how javascript likes it's objects and just forced a python looking model onto it. If any of the web development team saw my code I would definitely get laughed out of the club.
somat
·11 日前·議論
"TypeScript is structurally typed, which means two types with the same shape are the same type. string is string is string"

I don't speak typescript so am probably missing something obvious. but. why would you parse an email(or anything really) into a string? (or string equivalent) When parsed it will end up as a specific email object, that is, something closer to a C struct. What is the articles dance doing?
somat
·13 日前·議論
I have only messed with midi virtually so don't know much beyond the bit packing. But when you go to actual hardware and cables is there not a rigid speed it should be running at. 30Kbaud or something. That is, why is the interface running too fast and crashing the synth? the synth(no matter how old and limited) should handle the specified 30Kbaud stream all day long.