Hey everyone,

I made a script that updates my adlists, regex and dns wildcards every week, bases on a few scripts I found here a while ago. It’s worked fine for me for about a year, and then I notices there was a lot of garbage in my gravity.list. I decided to rewrite the script and clean as much as possible and make it run as efficiently as I can.

Now I get every part working just fine, but when it’s all strung together it’s prone to get a “fork: Cannot allocate memory” when trying to remove regex matches from gravity, and mostly at the end when trying to remove wildcard matches from gravity.

When I test those parts seperatly from the rest of the code it works fine, so I guess the memory issue has something to do with the huge variables from gravity and the wildcards, but I can’t seem to solve the problem.

I figured I’d post here since 5.0 is coming up anyways and I’d need to convert the script to work with the database system which I have zero experience in.

If anybody would be able to help this script run smoothly and ready for the 5.0 update it would be greatly appreciated.

Disclaimer: I’m not a good coder by any means, just a hobbyist.