Ancestors

Written by da_667 on 2025-01-22 at 16:55

spending my day slamming my head into a concrete wall fixing invalid escape sequence warnings.

=> More informations about this toot | More toots from da_667@infosec.exchange

Written by da_667 on 2025-01-22 at 17:21

when you reach the end and the python script runs with no more invalid escape sequences, and you're unsure on whether or not you fucked up all the regex sequences, or if you've committed the perfect surgical code incision, just to get python to shut the fuck up:

=> View attached media

=> More informations about this toot | More toots from da_667@infosec.exchange

Toot

Written by da_667 on 2025-01-22 at 17:44

We have a python script that we use internally that will, take a suricata 5 formatted rule, then try to dump a similarly formatted rule that should be nearly similar and should pass syntax validation for snort 2.9 and suricata 4. It was throwing a lot of syntax warnings for invalid escape sequences. New python syntax changes for escape sequences wants you to pass an r in front of your strings with escape characters to denote its a raw string.

https://stackoverflow.com/questions/52335970/how-to-fix-syntaxwarning-invalid-escape-sequence-in-python

Took me an afternoon, but no more syntax warnings, and it seems to be working as it did before so far

=> More informations about this toot | More toots from da_667@infosec.exchange

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113873248445344419
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
295.141072 milliseconds
Gemini-to-HTML Time
0.944006 milliseconds

This content has been proxied by September (ba2dc).