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
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:
=> More informations about this toot | More toots from da_667@infosec.exchange
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
text/gemini
This content has been proxied by September (ba2dc).