this post was submitted on 24 Jul 2024
122 points (94.9% liked)

main

15736 readers
84 users here now

THE MAIN RULE: ALL TEXT POSTS MUST CONTAIN "MAIN" OR BE ENTIRELY IMAGES (INLINE OR EMOJI)

(Temporary moratorium on main rule to encourage more posting on main. We reserve the right to arbitrarily enforce it whenever we wish and the right to strike this line and enforce mainposting with zero notification to the users because its funny)

A hexbear.net commainity. Main sure to subscribe to other communities as well. Your feed will become the Lion's Main!

Top Image of the Month will remain the Banner for a Month

Good comrades mainly sort posts by hot and comments by new!


gun-unity State-by-state guide on maintaining firearm ownership

guaido Domain guide on mutual aid and foodbank resources

smoker-on-the-balcony Tips for looking at financials of non-profits (How to donate amainly)

frothingfash Community-sourced megapost on the main media sources to radicalize libs and chuds with

just-a-theory An Amainzing Organizing Story

feminism Main Source for Feminism for Babies

data-revolutionary Maintaining OpSec / Data Spring Cleaning guide


ussr-cry Remain up to date on what time is it in Moscow

founded 4 years ago
MODERATORS
 

Account in picture was banned within minutes of posting this information

all 43 comments
sorted by: hot top controversial new old
[–] footfaults@hexbear.net 60 points 2 months ago (1 children)

ignore-wordlist-regex

Not a regex

squidward-nochill

squidward-chill

Fake

[–] PaX@hexbear.net 24 points 2 months ago* (last edited 2 months ago) (1 children)

Assuming all those substrings of usernames are split into different expressions like "EndWokeness" (without quotes ofc) it's valid regex, it's just an exact match

Mainposting on main rn

[–] footfaults@hexbear.net 20 points 2 months ago (2 children)

See the thing is, they're not even strings. They're not enclosed in quotes.

[–] PaX@hexbear.net 12 points 2 months ago* (last edited 2 months ago) (1 children)

A program that separates these out of that config file/representation/whatever this is (idk what Okta is tbh) into individual substrings is really easy

I actually wrote a regex that matches each username in that structure for fun lol: (?<=[\[| ])[a-zA-Z0-9_]+ but you can match regex with regex too (It's long as hell though, relatively)

You can try it in your browser at: https://regex101.com/

Idk why they called that field .*regex though, probably cuz it's fake

Wait I can write a better regex lol

Edit: this will match all substrings properly inside that structure, including more regexes, correctly(edit edit: WRONG!): (?<=[\[| ])[^,]+(?=[,|\]])

Edit edit: It's all fucked and my brain hurts now because I wanted to match any valid regex inside of that structure, separately

I will be back with the ultimate regex later, probably recursive and with the caveat that if you want to use comma literals, you will have to escape them, call that shit X-regex (special X.com regex syntax)

I am going to bed I am so tired

I'm sorry, there's no way I can write this in a sane-sounding way, it's been a journey and I'm probably drastically overcomplicating this

[–] alexandra_kollontai@hexbear.net 4 points 2 months ago (1 children)

you can match regex with regex too

You can't because the regular languages cannot describe properly nested parentheses.

[–] PaX@hexbear.net 2 points 2 months ago* (last edited 2 months ago)

I should not have said that, I'm sorry I was really tired, but I think it's also more complicated than no

Many implementations of "regular expressions" are actually capable of describing more than regular languages

Like Perl/PCRE's regular expression parser (which I used to write the above regexes) is capable of recursive evaluation and backreferences and probably other stuff I don't know about cuz I don't use it very often

I don't actually know if you can or not but yeah

Tbh, you probably know more about formal language theory than me blob-no-thoughts

[–] PaX@hexbear.net 2 points 2 months ago* (last edited 2 months ago) (2 children)

Hi, idk if you saw my other reply, but I have returned with the promised regular expression capable of doing this kitty-cri-potato (at least when parsed by PCRE and similar)

(?<=(?<!\\)\[|(?<!\\), ).*?(?=(?<!\\)]|(?<!\\),)

It will match each username/regex matching usernames as an individual substring

In the end I didn't need recursion and managed to accomplish the task by using nested lookarounds and making the assumption that brackets and commas are escaped with backslashes. It could probably be further simplified by using subroutines that some regex parsers are capable of using. Also it is most likely possible to write a regex that doesn't require escaping brackets, besides when you need to escape brackets when writing regexes anyway ofc. The requirement that commas be escaped is analogous to requiring that quotes be escaped inside a string literal if instead the usernames/regexes that match usernames were enclosed in quotes

I uhhhh don't write many regexes blob-no-thoughts

There's probably something to be said about this task being easier to accomplish in languages "more powerful" (in chomsky-yes-honey terms: "Chomsky hierarchy") than regular languages but I'm not chomsky-yes-honey (kamala-coconut-tree-free languages, etc contextphobic )

I have a tendency toward owning myself, if you find a way to break my regex without breaking the assumptions specified above I will be further owned

[–] footfaults@hexbear.net 3 points 2 months ago* (last edited 2 months ago) (1 children)

I saw your comments. I was trying to get home and use my FreeBSD machine to reply since I was on mobile today and of course amdgpu decided to start causing kernel panics so it ate all my time. I'll respond probably tomorrow evening.

You've done enough work where it is worth having a full discussion instead of trying to type something up on my mobile device. It's all good stuff, you put the work in

[–] PaX@hexbear.net 2 points 2 months ago* (last edited 2 months ago) (1 children)

Ohh, you're good, I hope I didn't make you feel pressured to reply or anything. Sometimes I just start writing and it ends up being a lot lol, besides I just like writing regular expressions sometimes lol

Also 07 to another BSD user. I'm speaking to you with an OpenBSD machine rn lol. I hope you got your kernel panicking fixed

Post stack trace here if you want help perhaps, I've also had to debug BSD kernels before (although the graphics stuff is mostly ripped straight from Linux lol)

[–] footfaults@hexbear.net 3 points 2 months ago (1 children)

Here's the the thing. The snippet that was posted by that account is not any known format. It's not YAML, it's not INI syntax, it's not JSON, or TOML, or anything that is a common configuration syntax. It's not valid JS. It's bullshit. It's just close enough to programming code that it would maybe convince some people.

So, while you spent a lot of time proving that you if you were forced to work with this file, there's an incredibly nasty set of regex and parsing that you could do to make this actually work, there's absolutely no reason why this would be done.

[–] PaX@hexbear.net 1 points 2 months ago

People rolling their own formats isn't really that uncommon. And besides, that file is one s/ =/:/g away from being valid YAML. There might even be a YAML or TOML parser around that will accept this, idk

there's an incredibly nasty set of regex and parsing that you could do to make this actually work

It only really looks nasty cuz I wanted to "parse" this file mentioning regex with regex for fun lol, it's basically YAML

The syntax of that file isn't the sus part imo. I feel like I'm being an annoying pedant but yeah

[–] GaveUp@hexbear.net 42 points 2 months ago (2 children)

Fakest config file I've ever seen. I ain't gonna explain it but it's way too shit for Okta to have created a custom internal format like this

[–] xj9@hexbear.net 13 points 2 months ago (1 children)

the format kinda looks like toml to me, but why okta has anything to do with content filtering is a mystery to me.

[–] GaveUp@hexbear.net 8 points 2 months ago (2 children)
[–] CoolerOpposide@hexbear.net 7 points 2 months ago

my-hero nesting? We got rid of that when we renamed the site to X. I want every last thing related to birds GONE

[–] Tabitha@hexbear.net 2 points 2 months ago

it looks like any random yaml/toml to me, which is not that different from reddit's automod config.

[–] combat_brandonism@hexbear.net 37 points 2 months ago* (last edited 2 months ago) (1 children)

I don't think okta mainly works like this (it's an internal company account SSO software provider, not something you'd use for your user's accounts), so this is instantly sus. Happy to be wrong though but be careful sharing this around until there's more info.

[–] Alaskaball@hexbear.net 22 points 2 months ago (1 children)

Ergo why it's on main and not news.

Also spamsus no main?

[–] Starlet@hexbear.net 37 points 2 months ago (1 children)
[–] GaveUp@hexbear.net 47 points 2 months ago* (last edited 2 months ago)

It was confirmed by a redditor who got 10k upvotes. Are you suggesting 10k redditors in agreement with each other are wrong?

[–] Des@hexbear.net 34 points 2 months ago (1 children)

having "Russia" on here makes it kind of sus. blueanon wet dream

[–] RyanGosling@hexbear.net 12 points 2 months ago (2 children)

Why? Right wingers love Russia. The politicians pay lip service to their ‘anti woke’ culture while funding ward against it, but the voters think Putin is their friend lol

[–] PolandIsAStateOfMind@lemmygrad.ml 16 points 2 months ago

They don't. If they did there would be some resistance against constant US warmongering, hate and hostility against it, but we see it unbroken since 1991 (and really since 1917)

[–] ProletarianDictator@hexbear.net 13 points 2 months ago (1 children)

right wingers dont particularly like russia, but they'll adopt anything that triggers the libs.

[–] Grandpa_garbagio@hexbear.net 5 points 2 months ago

I mean they definitely like Putin, at least towards the fringe right.

[–] SoloboiNanook@hexbear.net 21 points 2 months ago (2 children)

Lol I use okta at work for SSO and I am failing to understand what an "okta config" for Twitter would be Mayne I'm dumb

[–] flan@hexbear.net 13 points 2 months ago
[–] Tabitha@hexbear.net 3 points 2 months ago

also begs the question, did Twitter configure Okta wrong, or is Okta (being used as a foundational cornerstone of Twitter employee authentication security?) just really insecure?

[–] buh@hexbear.net 21 points 2 months ago

catturd didn't make the cut, it's joever joever

[–] comrade_pibb@hexbear.net 15 points 2 months ago
[–] WaterBowlSlime@lemmygrad.ml 14 points 2 months ago (1 children)

Are regular Twitter users not allowed to use the word Mexican then? lol

[–] Black_Mald_Futures@hexbear.net 12 points 2 months ago

Or the word cotton, or picker

[–] RedWizard@hexbear.net 14 points 2 months ago* (last edited 2 months ago)

https://news.ycombinator.com/item?id=41062348

For as much as Hacker News is a dumpster fire of liberalism, they are also probably the most likely to confirm this screenshot, and they are overwhelmingly skeptical.

lol

[–] ZWQbpkzl@hexbear.net 13 points 2 months ago

You have privilege to say slurs but only these 24 slurs.

[–] CoolerOpposide@hexbear.net 10 points 2 months ago

And where did that bring you?

back-to-me-shining

For the bourgeoisie, freedom of the press meant freedom for the rich to publish and for the capitalists to control the newspapers, a practice which in all countries, including even the freest, produced a corrupt press...

The publication of a newspaper is a big and profitable capitalist undertaking in which the rich invest millions upon millions of rubles. “Freedom of the press” in bourgeois society means freedom for the rich systematically, unremittingly, daily, in millions of copies, to deceive, corrupt and fool the exploited and oppressed mass of the people, the poor. This is the simple, generally known, obvious truth which everyone sees and realises but which “almost everyone” “bashfully” passes over in silence, timidly evades.

Look at Russkoye Slovo, Novoye Vremya, Birzhevka, Rech, etc. — you will see a multitude of private advertisements, which yield a tremendous income, in fact the principal income, to their capitalist publishers. This is how bourgeois papers hold sway, how they get rich, and how they deal in poison for the people all over the world. In Europe there are newspapers which have a circulation as large as one-third the number of inhabitants of the town (for instance, 12,000 copies in a town with a population of 40,000) and are delivered free to every home, and yet yield their owners a sizable income. These papers live by advertisements paid by private people, while the free delivery of the paper to every home ensures the best circulation of the advertisements.

[–] FiniteBanjo 1 points 2 months ago

You dudes should post this to some other instances as well, ones with actual credibility or users instead of chucking it into the CCP Bot filled void.